Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 55 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,83 +25,83 @@
},
"homepage": "https://canonical.github.io/react-components",
"devDependencies": {
"@babel/cli": "7.26.4",
"@babel/eslint-parser": "7.26.8",
"@babel/plugin-transform-class-properties": "7.25.9",
"@babel/preset-env": "7.26.9",
"@babel/preset-react": "7.26.3",
"@babel/preset-typescript": "7.26.0",
"@eslint/compat": "1.2.6",
"@eslint/eslintrc": "3.2.0",
"@eslint/js": "9.20.0",
"@percy/cli": "1.30.7",
"@percy/storybook": "6.0.3",
"@babel/cli": "7.28.6",
"@babel/eslint-parser": "7.28.6",
"@babel/plugin-transform-class-properties": "7.28.6",
"@babel/preset-env": "7.28.6",
"@babel/preset-react": "7.28.5",
"@babel/preset-typescript": "7.28.5",
"@eslint/compat": "1.4.1",
"@eslint/eslintrc": "3.3.3",
"@eslint/js": "9.39.2",
"@percy/cli": "1.31.8",
"@percy/storybook": "6.0.4",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@storybook/addon-a11y": "8.5.6",
"@storybook/addon-essentials": "8.5.6",
"@storybook/addon-interactions": "8.5.6",
"@storybook/addon-links": "8.5.6",
"@storybook/addon-onboarding": "8.5.6",
"@storybook/addon-webpack5-compiler-babel": "3.0.5",
"@storybook/blocks": "8.5.6",
"@storybook/react": "8.5.6",
"@storybook/react-webpack5": "8.5.6",
"@testing-library/cypress": "10.0.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
"@storybook/addon-a11y": "8.6.15",
"@storybook/addon-essentials": "8.6.14",
"@storybook/addon-interactions": "8.6.14",
"@storybook/addon-links": "8.6.15",
"@storybook/addon-onboarding": "8.6.15",
"@storybook/addon-webpack5-compiler-babel": "3.0.6",
"@storybook/blocks": "8.6.14",
"@storybook/react": "8.6.15",
"@storybook/react-webpack5": "8.6.15",
"@testing-library/cypress": "10.1.0",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.1",
"@testing-library/user-event": "14.6.1",
"babel-jest": "29.7.0",
"babel-loader": "9.2.1",
"babel-plugin-module-resolver": "5.0.2",
"babel-plugin-typescript-to-proptypes": "2.1.0",
"concurrently": "9.1.2",
"concurrently": "9.2.1",
"css-loader": "7.1.2",
"cypress": "14.0.3",
"cypress": "14.5.4",
"deepmerge": "4.3.1",
"eslint": "9.20.1",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-cypress": "4.1.0",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-cypress": "4.3.0",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-prettier": "5.2.3",
"eslint-plugin-react": "7.37.4",
"eslint-plugin-react-hooks": "5.1.0",
"eslint-plugin-storybook": "0.11.3",
"eslint-plugin-testing-library": "7.1.1",
"formik": "2.4.6",
"eslint-plugin-prettier": "5.5.5",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
"eslint-plugin-storybook": "0.12.0",
"eslint-plugin-testing-library": "7.15.4",
"formik": "2.4.9",
"jest": "29.7.0",
"npm-package-json-lint": "8.0.0",
"prettier": "3.5.1",
"react": "19.0.0",
"prettier": "3.8.0",
"react": "19.2.3",
"react-docgen-typescript-loader": "3.7.2",
"react-dom": "19.0.0",
"sass": "1.85.0",
"sass-loader": "16.0.5",
"react-dom": "19.2.3",
"sass": "1.97.2",
"sass-loader": "16.0.6",
"semantic-release": "25.0.2",
"storybook": "8.6.15",
"strip-ansi": "7.1.0",
"strip-ansi": "7.1.2",
"style-loader": "4.0.0",
"stylelint": "16.14.1",
"stylelint": "16.26.1",
"stylelint-config-prettier": "9.0.5",
"stylelint-config-recommended-scss": "14.1.0",
"stylelint-order": "6.0.4",
"stylelint-prettier": "5.0.3",
"ts-jest": "29.2.5",
"tsc-alias": "1.8.10",
"typescript": "5.7.3",
"typescript-eslint": "8.24.1",
"ts-jest": "29.4.6",
"tsc-alias": "1.8.16",
"typescript": "5.9.3",
"typescript-eslint": "8.53.0",
"vanilla-framework": "4.39.0",
"wait-on": "8.0.2",
"webpack": "5.98.0"
"wait-on": "8.0.5",
"webpack": "5.104.1"
},
"dependencies": {
"@types/jest": "29.5.14",
"@types/node": "20.17.19",
"@types/react": "19.0.10",
"@types/react-dom": "19.0.4",
"@types/node": "20.19.30",
"@types/react": "19.2.8",
"@types/react-dom": "19.2.3",
"@types/react-table": "7.7.20",
"classnames": "2.5.1",
"fast-deep-equal": "3.1.3",
Expand All @@ -117,6 +117,9 @@
"react-dom": "^18.0.0 || ^19.0.0",
"vanilla-framework": "^3.15.1 || ^4.0.0"
},
"resolutions": {
"csstype": "3.1.3"
},
"scripts": {
"build": "rm -rf dist && yarn build-cjs && yarn build-declaration && yarn build-esm && yarn build-declaration-esm",
"build-cjs": "NODE_ENV=production BABEL_ENV=cjs babel src --out-dir dist --copy-files --extensions '.js,.jsx,.ts,.tsx'",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Accordion/Accordion.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("Accordion", () => {
);
const tab = screen.getByRole("tab", { name: "Advanced topics" });
await userEvent.click(tab);
expect(onExpandedChange).toHaveBeenCalledWith(":r6:", "Advanced topics");
expect(onExpandedChange).toHaveBeenCalledWith("_r_6_", "Advanced topics");
// Clicking the tab again should close the accordion section.
await userEvent.click(tab);
expect(onExpandedChange).toHaveBeenCalledWith(null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe("AccordionSection ", () => {
/>,
);
await userEvent.click(screen.getByRole("tab", { name: "Test section" }));
expect(onTitleClick).toHaveBeenCalledWith(true, ":r4:");
expect(onTitleClick).toHaveBeenCalledWith(true, "_r_4_");
rerender(
<AccordionSection
content={<span>Test</span>}
Expand All @@ -64,7 +64,7 @@ describe("AccordionSection ", () => {
// Clicking the title again should close the accordion section.
await userEvent.click(screen.getByRole("tab", { name: "Test section" }));

expect(onTitleClick.mock.calls[1]).toEqual([false, ":r4:"]);
expect(onTitleClick.mock.calls[1]).toEqual([false, "_r_4_"]);
});

it("can use a key for expanded state", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ exports[`AccordionSection renders 1`] = `
role="heading"
>
<button
aria-controls="#:r0:"
aria-controls="#_r_0_"
aria-expanded="false"
class="p-accordion__tab"
id=":r1:"
id="_r_1_"
role="tab"
type="button"
>
Expand All @@ -22,9 +22,9 @@ exports[`AccordionSection renders 1`] = `
</div>
<section
aria-hidden="true"
aria-labelledby=":r1:"
aria-labelledby="_r_1_"
class="p-accordion__panel"
id=":r0:"
id="_r_0_"
role="tabpanel"
>
<span>
Expand Down
16 changes: 8 additions & 8 deletions src/components/Accordion/__snapshots__/Accordion.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ exports[`Accordion renders 1`] = `
role="heading"
>
<button
aria-controls="#:r0:"
aria-controls="#_r_0_"
aria-expanded="false"
class="p-accordion__tab"
id=":r1:"
id="_r_1_"
role="tab"
type="button"
>
Expand All @@ -30,9 +30,9 @@ exports[`Accordion renders 1`] = `
</div>
<section
aria-hidden="true"
aria-labelledby=":r1:"
aria-labelledby="_r_1_"
class="p-accordion__panel"
id=":r0:"
id="_r_0_"
role="tabpanel"
>
test content
Expand All @@ -47,10 +47,10 @@ exports[`Accordion renders 1`] = `
role="heading"
>
<button
aria-controls="#:r2:"
aria-controls="#_r_2_"
aria-expanded="false"
class="p-accordion__tab"
id=":r3:"
id="_r_3_"
role="tab"
type="button"
>
Expand All @@ -59,9 +59,9 @@ exports[`Accordion renders 1`] = `
</div>
<section
aria-hidden="true"
aria-labelledby=":r3:"
aria-labelledby="_r_3_"
class="p-accordion__panel"
id=":r2:"
id="_r_2_"
role="tabpanel"
>
More test content
Expand Down
4 changes: 2 additions & 2 deletions src/components/Card/__snapshots__/Card.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

exports[`Card renders 1`] = `
<div
aria-labelledby=":r0:"
aria-labelledby="_r_0_"
class="p-card"
role="group"
>
<h3
class="p-card__title"
id=":r0:"
id="_r_0_"
>
This is the title
</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`CustomSelect renders 1`] = `
>
<label
class="p-form__label"
for=":r1:"
for="_r_1_"
>
Test Select
</label>
Expand All @@ -24,12 +24,12 @@ exports[`CustomSelect renders 1`] = `
style="width: 100%;"
>
<button
aria-controls=":r3:"
aria-controls="_r_3_"
aria-expanded="false"
aria-haspopup="true"
aria-pressed="false"
class="p-button p-contextual-menu__toggle p-custom-select__toggle p-form-validation__input"
id=":r1:"
id="_r_1_"
tabindex="0"
type="button"
>
Expand Down
Loading
Loading