Skip to content

Commit 6d0a4e2

Browse files
Chakra UI upgrade (#1243)
* Upgrade Chakra UI to v2.10.10 Move @chakra-ui/react to 2.10.10 (the v2 head) with @chakra-ui/icons 2.2.6, @chakra-ui/cli 2.5.8, and the @emotion peers to 11.14.x. The single-package refactor in 2.10 drops the standalone subpackages, so imports from @chakra-ui/{layout,button,modal,icon,image,tooltip,system, input,form-control,toast,spinner,select,progress,portal,menu} are folded into @chakra-ui/react. Also: - CSSObject is no longer exported; use SystemStyleObject for the _collapsed prop in CollapsibleButton. - DocumentationContent.test mocks Image via @chakra-ui/react with importOriginal now that @chakra-ui/image is gone. * Apply npm audit fix for transitive vulnerabilities Resolves all 17 reported advisories via package-lock.json updates only; every fix fell within existing caret ranges so package.json is unchanged (notably vite 7.3.6, vitest 4.1.9, dompurify 3.4.11). * Update to version that uses prepare not postinstall
1 parent b1c5d1c commit 6d0a4e2

59 files changed

Lines changed: 3438 additions & 2922 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- run: npm ci
4040
env:
4141
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.2.0-dev.47 @microbit-foundation/website-deploy-aws@0.6.0 @microbit-foundation/website-deploy-aws-config@0.9.0 @microbit-foundation/circleci-npm-package-versioner@1
42+
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.2.0-dev.48 @microbit-foundation/website-deploy-aws@0.6.0 @microbit-foundation/website-deploy-aws-config@0.9.0 @microbit-foundation/circleci-npm-package-versioner@1
4343
if: github.repository_owner == 'microbit-foundation'
4444
env:
4545
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package-lock.json

Lines changed: 3249 additions & 2796 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"private": true,
77
"type": "module",
88
"dependencies": {
9-
"@chakra-ui/icons": "^2.1.1",
10-
"@chakra-ui/react": "^2.8.2",
9+
"@chakra-ui/icons": "^2.2.6",
10+
"@chakra-ui/react": "^2.10.10",
1111
"@codemirror/autocomplete": "^6.16.0",
1212
"@codemirror/commands": "6.5.0",
1313
"@codemirror/lang-python": "^6.1.6",
1414
"@codemirror/language": "^6.10.1",
1515
"@codemirror/state": "^6.4.1",
1616
"@codemirror/view": "^6.26.3",
17-
"@emotion/react": "^11.11.4",
18-
"@emotion/styled": "^11.11.5",
17+
"@emotion/react": "^11.14.0",
18+
"@emotion/styled": "^11.14.1",
1919
"@microbit/microbit-connection": "^1.0.0-beta.0",
2020
"@microbit/microbit-fs": "^0.10.0",
2121
"@sanity/block-content-to-react": "^3.0.0",
@@ -55,7 +55,7 @@
5555
"xterm-addon-fit": "^0.5.0"
5656
},
5757
"devDependencies": {
58-
"@chakra-ui/cli": "2.4.1",
58+
"@chakra-ui/cli": "2.5.8",
5959
"@formatjs/cli": "^6.2.7",
6060
"@playwright/test": "^1.58.2",
6161
"@testing-library/jest-dom": "^5.14.1",

src/common/AreaHeading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SPDX-License-Identifier: MIT
55
*/
6-
import { Box, Text } from "@chakra-ui/layout";
6+
import { Box, Text } from "@chakra-ui/react";
77
import { ReactNode } from "react";
88

99
interface AreaHeadingProps {

src/common/CollapsibleButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66
import {
77
Button,
8-
CSSObject,
98
HTMLChakraProps,
109
IconButton,
10+
SystemStyleObject,
1111
ThemingProps,
1212
} from "@chakra-ui/react";
1313
import React, { ForwardedRef } from "react";
@@ -26,7 +26,7 @@ export interface CollapsibleButtonProps
2626
/**
2727
* Styles used only when collapsed.
2828
*/
29-
_collapsed?: CSSObject;
29+
_collapsed?: SystemStyleObject;
3030
}
3131

3232
export type CollapsibleButtonComposableProps = Omit<

src/common/ConfirmDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
*
44
* SPDX-License-Identifier: MIT
55
*/
6-
import { Button } from "@chakra-ui/button";
76
import {
87
AlertDialog,
98
AlertDialogBody,
109
AlertDialogContent,
1110
AlertDialogFooter,
1211
AlertDialogHeader,
1312
AlertDialogOverlay,
14-
} from "@chakra-ui/modal";
15-
import { Text } from "@chakra-ui/react";
13+
Button,
14+
Text,
15+
} from "@chakra-ui/react";
1616
import { ReactNode, useRef } from "react";
1717
import { FormattedMessage } from "react-intl";
1818

src/common/ErrorBoundary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SPDX-License-Identifier: MIT
55
*/
6-
import { Text } from "@chakra-ui/layout";
6+
import { Text } from "@chakra-ui/react";
77
import React, { ErrorInfo, ReactNode } from "react";
88
import { FormattedMessage } from "react-intl";
99
import { LoggingContext } from "../logging/logging-hooks";

src/common/FileDropTarget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SPDX-License-Identifier: MIT
55
*/
6-
import { Box, BoxProps, Center } from "@chakra-ui/layout";
6+
import { Box, BoxProps, Center } from "@chakra-ui/react";
77
import { ReactNode, useCallback, useState } from "react";
88
import { RiFolderOpenLine } from "react-icons/ri";
99
import { useIntl } from "react-intl";

src/common/GenericDialog.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
* SPDX-License-Identifier: MIT
55
*/
66
import {
7+
Button,
8+
HStack,
9+
Link,
710
Modal,
811
ModalBody,
912
ModalContent,
1013
ModalFooter,
1114
ModalHeader,
1215
ModalOverlay,
13-
} from "@chakra-ui/modal";
14-
import { Button, HStack, Link, Text } from "@chakra-ui/react";
16+
Text,
17+
} from "@chakra-ui/react";
1518
import { ThemingProps } from "@chakra-ui/styled-system";
1619
import { ReactNode } from "react";
1720
import { FormattedMessage } from "react-intl";

src/common/HeadedScrollablePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SPDX-License-Identifier: MIT
55
*/
6-
import { Box, BoxProps, Divider, VStack } from "@chakra-ui/layout";
6+
import { Box, BoxProps, Divider, VStack } from "@chakra-ui/react";
77
import { ReactNode } from "react";
88
import { zIndexBreadcrumbContainer } from "../common/zIndex";
99
import ScrollablePanel from "./ScrollablePanel";

0 commit comments

Comments
 (0)