From fc26a37b2b3cee4643876f096101310e0be3a3f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 16:03:43 +0000 Subject: [PATCH 1/6] Bump the tools group with 6 updates Bumps the tools group with 6 updates: | Package | From | To | | --- | --- | --- | | [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `9.1.10` | `10.0.2` | | [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/links) | `9.1.10` | `10.0.2` | | [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `9.1.10` | `10.0.2` | | [sass-embedded](https://github.com/sass/embedded-host-node) | `1.93.2` | `1.93.3` | | [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `9.1.10` | `10.0.2` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `7.1.11` | `7.1.12` | Updates `@storybook/addon-docs` from 9.1.10 to 10.0.2 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.0.2/code/addons/docs) Updates `@storybook/addon-links` from 9.1.10 to 10.0.2 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.0.2/code/addons/links) Updates `@storybook/react-vite` from 9.1.10 to 10.0.2 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.0.2/code/frameworks/react-vite) Updates `sass-embedded` from 1.93.2 to 1.93.3 - [Changelog](https://github.com/sass/embedded-host-node/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/embedded-host-node/compare/1.93.2...1.93.3) Updates `storybook` from 9.1.10 to 10.0.2 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.0.2/code/core) Updates `vite` from 7.1.11 to 7.1.12 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v7.1.12/packages/vite) --- updated-dependencies: - dependency-name: "@storybook/addon-docs" dependency-version: 10.0.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: tools - dependency-name: "@storybook/addon-links" dependency-version: 10.0.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: tools - dependency-name: "@storybook/react-vite" dependency-version: 10.0.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: tools - dependency-name: sass-embedded dependency-version: 1.93.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: tools - dependency-name: storybook dependency-version: 10.0.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: tools - dependency-name: vite dependency-version: 7.1.12 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: tools ... Signed-off-by: dependabot[bot] --- package.json | 12 +- yarn.lock | 532 ++++++++++++++++++--------------------------------- 2 files changed, 194 insertions(+), 350 deletions(-) diff --git a/package.json b/package.json index 8685c230..ad5e6cc1 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,9 @@ "@rollup/plugin-commonjs": "^29.0.0", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-typescript": "^12.3.0", - "@storybook/addon-docs": "9.1.10", - "@storybook/addon-links": "^9.1.10", - "@storybook/react-vite": "^9.1.10", + "@storybook/addon-docs": "10.0.3", + "@storybook/addon-links": "^10.0.3", + "@storybook/react-vite": "^10.0.3", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.0", @@ -114,12 +114,12 @@ "react-dom": "^19.2.0", "rollup": "^4.52.5", "rollup-preserve-directives": "^1.1.3", - "sass-embedded": "^1.93.2", - "storybook": "^9.1.10", + "sass-embedded": "^1.93.3", + "storybook": "^10.0.3", "tslib": "^2.8.1", "typescript": "^5.9.3", "typescript-eslint": "^8.46.2", - "vite": "^7.1.11", + "vite": "^7.1.12", "vite-tsconfig-paths": "^5.1.4" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index b4155364..b88af8cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3340,59 +3340,72 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-docs@npm:9.1.10": - version: 9.1.10 - resolution: "@storybook/addon-docs@npm:9.1.10" +"@storybook/addon-docs@npm:10.0.3": + version: 10.0.3 + resolution: "@storybook/addon-docs@npm:10.0.3" dependencies: "@mdx-js/react": "npm:^3.0.0" - "@storybook/csf-plugin": "npm:9.1.10" - "@storybook/icons": "npm:^1.4.0" - "@storybook/react-dom-shim": "npm:9.1.10" + "@storybook/csf-plugin": "npm:10.0.3" + "@storybook/icons": "npm:^1.6.0" + "@storybook/react-dom-shim": "npm:10.0.3" react: "npm:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" react-dom: "npm:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" ts-dedent: "npm:^2.0.0" peerDependencies: - storybook: ^9.1.10 - checksum: 10c0/331cf0e05ec81b67b4307bbef322a3da6ff291a03727c7ee92537ba4c674052181fbae5a59bd0486277f403b22f25fc149b2576a806423c84ef35f2ca499d0e4 + storybook: ^10.0.3 + checksum: 10c0/58336d63d0faf470ecb810a0bebf3cf14001acf10c3c6427b4b03cd8f506e56a3df176d35404a95c0af60f872822d5ee60bc4cdea7d91f68e43ef18f8654554e languageName: node linkType: hard -"@storybook/addon-links@npm:^9.1.10": - version: 9.1.10 - resolution: "@storybook/addon-links@npm:9.1.10" +"@storybook/addon-links@npm:^10.0.3": + version: 10.0.3 + resolution: "@storybook/addon-links@npm:10.0.3" dependencies: "@storybook/global": "npm:^5.0.0" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.10 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + storybook: ^10.0.3 peerDependenciesMeta: react: optional: true - checksum: 10c0/c32ff0a4f2bc0f65d4adee7ae33b1b3f3d23b6862977c825b7061bd3c91f64a6867c9689d3bee26632c4ec1d7ac75dc4b1f3111b74363b341e1519e9d0aa07bf + checksum: 10c0/f32b7e55f2797e07a5b7b7541ac29bd658396000eb2e5851aa229477022bd7fdf26548f3c1bad72bb8746836a4bb12e3b65c305c903ec95ff2d1bf6107afa9e6 languageName: node linkType: hard -"@storybook/builder-vite@npm:9.1.10": - version: 9.1.10 - resolution: "@storybook/builder-vite@npm:9.1.10" +"@storybook/builder-vite@npm:10.0.3": + version: 10.0.3 + resolution: "@storybook/builder-vite@npm:10.0.3" dependencies: - "@storybook/csf-plugin": "npm:9.1.10" + "@storybook/csf-plugin": "npm:10.0.3" ts-dedent: "npm:^2.0.0" peerDependencies: - storybook: ^9.1.10 + storybook: ^10.0.3 vite: ^5.0.0 || ^6.0.0 || ^7.0.0 - checksum: 10c0/96ffce92448b5bf2c6d0c1f3c71e57f5093bd7b80492b24c14c1277d15a7f9cf4153bfc15fbbc6d30c21a5ac2605f5fa02cdb0ae7fc1abe28a30e64afd9ba210 + checksum: 10c0/3b72d04ea4681e15efcf691b402c280240b9cd0a95cec4bc54105aa69be4bfaf362f4259773049f3b90f531172d84a2a67044e02a50d88e88ea5de7a6938ac4c languageName: node linkType: hard -"@storybook/csf-plugin@npm:9.1.10": - version: 9.1.10 - resolution: "@storybook/csf-plugin@npm:9.1.10" +"@storybook/csf-plugin@npm:10.0.3": + version: 10.0.3 + resolution: "@storybook/csf-plugin@npm:10.0.3" dependencies: - unplugin: "npm:^1.3.1" + unplugin: "npm:^2.3.5" peerDependencies: - storybook: ^9.1.10 - checksum: 10c0/1608ee463a5cc606266cf71498fe045ebe634a0d85880272a6d3aee6a039bad46f9bca8a3c21b3cfb6e8e9b306191785daa4aff94f02f4cfc6ec65275a695864 + esbuild: "*" + rollup: "*" + storybook: ^10.0.3 + vite: "*" + webpack: "*" + peerDependenciesMeta: + esbuild: + optional: true + rollup: + optional: true + vite: + optional: true + webpack: + optional: true + checksum: 10c0/d12e7b714761f5e8b9cc23e4aac361264746bfed53161bdd6bb91290325b1a0ef07a482b03bbd0a3a49262e52cddaa33e391dd92f4d6d988bf41af0c6a8913b8 languageName: node linkType: hard @@ -3403,7 +3416,7 @@ __metadata: languageName: node linkType: hard -"@storybook/icons@npm:^1.4.0": +"@storybook/icons@npm:^1.6.0": version: 1.6.0 resolution: "@storybook/icons@npm:1.6.0" peerDependencies: @@ -3413,54 +3426,54 @@ __metadata: languageName: node linkType: hard -"@storybook/react-dom-shim@npm:9.1.10": - version: 9.1.10 - resolution: "@storybook/react-dom-shim@npm:9.1.10" +"@storybook/react-dom-shim@npm:10.0.3": + version: 10.0.3 + resolution: "@storybook/react-dom-shim@npm:10.0.3" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.10 - checksum: 10c0/00a54dedda008857d6478c2dcbf24612e3681958c48bad2831882bd467dc89c7ffc6939a8ee013d72d989ab248017017b335cfe6efd12fcfed9647518c59e0ce + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + storybook: ^10.0.3 + checksum: 10c0/bfdfa2c5e5f931f903c98d42b61389bc77b7b62012e631a4c592f0034bec28d54df52e26a6871b3bd6e97e3dcb503e8cce9d3770318d0ca08217f7bbeef09244 languageName: node linkType: hard -"@storybook/react-vite@npm:^9.1.10": - version: 9.1.10 - resolution: "@storybook/react-vite@npm:9.1.10" +"@storybook/react-vite@npm:^10.0.3": + version: 10.0.3 + resolution: "@storybook/react-vite@npm:10.0.3" dependencies: "@joshwooding/vite-plugin-react-docgen-typescript": "npm:0.6.1" "@rollup/pluginutils": "npm:^5.0.2" - "@storybook/builder-vite": "npm:9.1.10" - "@storybook/react": "npm:9.1.10" - find-up: "npm:^7.0.0" + "@storybook/builder-vite": "npm:10.0.3" + "@storybook/react": "npm:10.0.3" + empathic: "npm:^2.0.0" magic-string: "npm:^0.30.0" react-docgen: "npm:^8.0.0" resolve: "npm:^1.22.8" tsconfig-paths: "npm:^4.2.0" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.10 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + storybook: ^10.0.3 vite: ^5.0.0 || ^6.0.0 || ^7.0.0 - checksum: 10c0/cafa9e6cc1abadd557a47898db613ae4adc73b958a4556e341bc604433dc1da6c210b7b452471c16b4ad6bfd4e62f086330288b65ead3dde7692e8a63efd3a2f + checksum: 10c0/9933375b3977e0ce4e29e397fa16f10c86e48bafaf5c3038e8d261ac3742aaba3f279b8c5530301feb9101d6b5cac1f5ae02c865de03f00de1a4b501a7aaa9a8 languageName: node linkType: hard -"@storybook/react@npm:9.1.10": - version: 9.1.10 - resolution: "@storybook/react@npm:9.1.10" +"@storybook/react@npm:10.0.3": + version: 10.0.3 + resolution: "@storybook/react@npm:10.0.3" dependencies: "@storybook/global": "npm:^5.0.0" - "@storybook/react-dom-shim": "npm:9.1.10" + "@storybook/react-dom-shim": "npm:10.0.3" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.10 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + storybook: ^10.0.3 typescript: ">= 4.9.x" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/a04e7fd81210e0bb79807333e49d444736f524359e70225ce4db2f1262b047d4a9b5c99ff60367925e5405639508e91fc499ba29e9ea151c7539d3282dee5ec5 + checksum: 10c0/998431007c699269324768e3755a0d7085028091ecc14dbcc3be44571bd3f3a59fa79ad309509c150efdf3f05f8394f32a2d773fbbf32cf963b387fefa590d8e languageName: node linkType: hard @@ -4175,15 +4188,6 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.3": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" - bin: - acorn: bin/acorn - checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 - languageName: node - linkType: hard - "acorn@npm:^8.15.0": version: 8.15.0 resolution: "acorn@npm:8.15.0" @@ -4286,7 +4290,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.1.3, anymatch@npm:~3.1.2": +"anymatch@npm:^3.1.3": version: 3.1.3 resolution: "anymatch@npm:3.1.3" dependencies: @@ -4721,22 +4725,6 @@ __metadata: languageName: node linkType: hard -"better-opn@npm:^3.0.2": - version: 3.0.2 - resolution: "better-opn@npm:3.0.2" - dependencies: - open: "npm:^8.0.4" - checksum: 10c0/911ef25d44da75aabfd2444ce7a4294a8000ebcac73068c04a60298b0f7c7506b60421aa4cd02ac82502fb42baaff7e4892234b51e6923eded44c5a11185f2f5 - languageName: node - linkType: hard - -"binary-extensions@npm:^2.0.0": - version: 2.3.0 - resolution: "binary-extensions@npm:2.3.0" - checksum: 10c0/75a59cafc10fb12a11d510e77110c6c7ae3f4ca22463d52487709ca7f18f69d886aa387557cc9864fbdb10153d0bdb4caacabf11541f55e89ed6e18d12ece2b5 - languageName: node - linkType: hard - "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -4756,7 +4744,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": +"braces@npm:^3.0.2, braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -4958,25 +4946,6 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.6.0": - version: 3.6.0 - resolution: "chokidar@npm:3.6.0" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 - languageName: node - linkType: hard - "chokidar@npm:^4.0.0": version: 4.0.3 resolution: "chokidar@npm:4.0.3" @@ -5335,13 +5304,6 @@ __metadata: languageName: node linkType: hard -"define-lazy-prop@npm:^2.0.0": - version: 2.0.0 - resolution: "define-lazy-prop@npm:2.0.0" - checksum: 10c0/db6c63864a9d3b7dc9def55d52764968a5af296de87c1b2cc71d8be8142e445208071953649e0386a8cc37cfcf9a2067a47207f1eb9ff250c2a269658fdae422 - languageName: node - linkType: hard - "define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" @@ -5468,6 +5430,13 @@ __metadata: languageName: node linkType: hard +"empathic@npm:^2.0.0": + version: 2.0.0 + resolution: "empathic@npm:2.0.0" + checksum: 10c0/7d3b14b04a93b35c47bcc950467ec914fd241cd9acc0269b0ea160f13026ec110f520c90fae64720fde72cc1757b57f3f292fb606617b7fccac1f4d008a76506 + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -5758,17 +5727,6 @@ __metadata: languageName: node linkType: hard -"esbuild-register@npm:^3.5.0": - version: 3.5.0 - resolution: "esbuild-register@npm:3.5.0" - dependencies: - debug: "npm:^4.3.4" - peerDependencies: - esbuild: ">=0.12 <1" - checksum: 10c0/9ccd0573cb66018e4cce3c1416eed0f5f3794c7026ce469a94e2f8761335abed8e363fc8e8bb036ab9ad7e579bb4296b8568a04ae5626596c123576b0d9c9bde - languageName: node - linkType: hard - "esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0, esbuild@npm:^0.25.0": version: 0.25.10 resolution: "esbuild@npm:0.25.10" @@ -6383,17 +6341,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^7.0.0": - version: 7.0.0 - resolution: "find-up@npm:7.0.0" - dependencies: - locate-path: "npm:^7.2.0" - path-exists: "npm:^5.0.0" - unicorn-magic: "npm:^0.1.0" - checksum: 10c0/e6ee3e6154560bc0ab3bc3b7d1348b31513f9bdf49a5dd2e952495427d559fa48cdf33953e85a309a323898b43fa1bfbc8b80c880dfc16068384783034030008 - languageName: node - linkType: hard - "flat-cache@npm:^4.0.0": version: 4.0.1 resolution: "flat-cache@npm:4.0.1" @@ -6633,7 +6580,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -7093,15 +7040,6 @@ __metadata: languageName: node linkType: hard -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 - languageName: node - linkType: hard - "is-boolean-object@npm:^1.1.0": version: 1.1.2 resolution: "is-boolean-object@npm:1.1.2" @@ -7195,15 +7133,6 @@ __metadata: languageName: node linkType: hard -"is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": - version: 2.2.1 - resolution: "is-docker@npm:2.2.1" - bin: - is-docker: cli.js - checksum: 10c0/e828365958d155f90c409cdbe958f64051d99e8aedc2c8c4cd7c89dcf35329daed42f7b99346f7828df013e27deb8f721cf9408ba878c76eb9e8290235fbcdcc - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -7243,7 +7172,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -7468,15 +7397,6 @@ __metadata: languageName: node linkType: hard -"is-wsl@npm:^2.2.0": - version: 2.2.0 - resolution: "is-wsl@npm:2.2.0" - dependencies: - is-docker: "npm:^2.0.0" - checksum: 10c0/a6fa2d370d21be487c0165c7a440d567274fbba1a817f2f0bfa41cc5e3af25041d84267baa22df66696956038a43973e72fca117918c91431920bdef490fa25e - languageName: node - linkType: hard - "isarray@npm:^2.0.5": version: 2.0.5 resolution: "isarray@npm:2.0.5" @@ -8366,15 +8286,6 @@ __metadata: languageName: node linkType: hard -"locate-path@npm:^7.2.0": - version: 7.2.0 - resolution: "locate-path@npm:7.2.0" - dependencies: - p-locate: "npm:^6.0.0" - checksum: 10c0/139e8a7fe11cfbd7f20db03923cacfa5db9e14fa14887ea121345597472b4a63c1a42a8a5187defeeff6acf98fd568da7382aa39682d38f0af27433953a97751 - languageName: node - linkType: hard - "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -8775,9 +8686,9 @@ __metadata: "@rollup/plugin-commonjs": "npm:^29.0.0" "@rollup/plugin-node-resolve": "npm:^16.0.3" "@rollup/plugin-typescript": "npm:^12.3.0" - "@storybook/addon-docs": "npm:9.1.10" - "@storybook/addon-links": "npm:^9.1.10" - "@storybook/react-vite": "npm:^9.1.10" + "@storybook/addon-docs": "npm:10.0.3" + "@storybook/addon-links": "npm:^10.0.3" + "@storybook/react-vite": "npm:^10.0.3" "@testing-library/dom": "npm:^10.4.1" "@testing-library/jest-dom": "npm:^6.9.1" "@testing-library/react": "npm:^16.3.0" @@ -8811,12 +8722,12 @@ __metadata: react-dom: "npm:^19.2.0" rollup: "npm:^4.52.5" rollup-preserve-directives: "npm:^1.1.3" - sass-embedded: "npm:^1.93.2" - storybook: "npm:^9.1.10" + sass-embedded: "npm:^1.93.3" + storybook: "npm:^10.0.3" tslib: "npm:^2.8.1" typescript: "npm:^5.9.3" typescript-eslint: "npm:^8.46.2" - vite: "npm:^7.1.11" + vite: "npm:^7.1.12" vite-tsconfig-paths: "npm:^5.1.4" peerDependencies: classnames: ">=2.5.0" @@ -8888,7 +8799,7 @@ __metadata: languageName: node linkType: hard -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": +"normalize-path@npm:^3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 @@ -9041,17 +8952,6 @@ __metadata: languageName: node linkType: hard -"open@npm:^8.0.4": - version: 8.4.2 - resolution: "open@npm:8.4.2" - dependencies: - define-lazy-prop: "npm:^2.0.0" - is-docker: "npm:^2.1.1" - is-wsl: "npm:^2.2.0" - checksum: 10c0/bb6b3a58401dacdb0aad14360626faf3fb7fba4b77816b373495988b724fb48941cad80c1b65d62bb31a17609b2cd91c41a181602caea597ca80dfbcc27e84c9 - languageName: node - linkType: hard - "optionator@npm:^0.9.3": version: 0.9.3 resolution: "optionator@npm:0.9.3" @@ -9102,15 +9002,6 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^4.0.0": - version: 4.0.0 - resolution: "p-limit@npm:4.0.0" - dependencies: - yocto-queue: "npm:^1.0.0" - checksum: 10c0/a56af34a77f8df2ff61ddfb29431044557fcbcb7642d5a3233143ebba805fc7306ac1d448de724352861cb99de934bc9ab74f0d16fe6a5460bdbdf938de875ad - languageName: node - linkType: hard - "p-locate@npm:^3.0.0": version: 3.0.0 resolution: "p-locate@npm:3.0.0" @@ -9138,15 +9029,6 @@ __metadata: languageName: node linkType: hard -"p-locate@npm:^6.0.0": - version: 6.0.0 - resolution: "p-locate@npm:6.0.0" - dependencies: - p-limit: "npm:^4.0.0" - checksum: 10c0/d72fa2f41adce59c198270aa4d3c832536c87a1806e0f69dffb7c1a7ca998fb053915ca833d90f166a8c082d3859eabfed95f01698a3214c20df6bb8de046312 - languageName: node - linkType: hard - "p-map@npm:^4.0.0": version: 4.0.0 resolution: "p-map@npm:4.0.0" @@ -9216,13 +9098,6 @@ __metadata: languageName: node linkType: hard -"path-exists@npm:^5.0.0": - version: 5.0.0 - resolution: "path-exists@npm:5.0.0" - checksum: 10c0/b170f3060b31604cde93eefdb7392b89d832dfbc1bed717c9718cbe0f230c1669b7e75f87e19901da2250b84d092989a0f9e44d2ef41deb09aa3ad28e691a40a - languageName: node - linkType: hard - "path-is-absolute@npm:^1.0.0": version: 1.0.1 resolution: "path-is-absolute@npm:1.0.1" @@ -9285,7 +9160,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be @@ -9520,15 +9395,6 @@ __metadata: languageName: node linkType: hard -"readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" - dependencies: - picomatch: "npm:^2.2.1" - checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b - languageName: node - linkType: hard - "recast@npm:^0.23.5": version: 0.23.6 resolution: "recast@npm:0.23.6" @@ -10081,163 +9947,163 @@ __metadata: languageName: node linkType: hard -"sass-embedded-all-unknown@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-all-unknown@npm:1.93.2" +"sass-embedded-all-unknown@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-all-unknown@npm:1.93.3" dependencies: - sass: "npm:1.93.2" + sass: "npm:1.93.3" conditions: (!cpu=arm | !cpu=arm64 | !cpu=riscv64 | !cpu=x64) languageName: node linkType: hard -"sass-embedded-android-arm64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-android-arm64@npm:1.93.2" +"sass-embedded-android-arm64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-android-arm64@npm:1.93.3" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"sass-embedded-android-arm@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-android-arm@npm:1.93.2" +"sass-embedded-android-arm@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-android-arm@npm:1.93.3" conditions: os=android & cpu=arm languageName: node linkType: hard -"sass-embedded-android-riscv64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-android-riscv64@npm:1.93.2" +"sass-embedded-android-riscv64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-android-riscv64@npm:1.93.3" conditions: os=android & cpu=riscv64 languageName: node linkType: hard -"sass-embedded-android-x64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-android-x64@npm:1.93.2" +"sass-embedded-android-x64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-android-x64@npm:1.93.3" conditions: os=android & cpu=x64 languageName: node linkType: hard -"sass-embedded-darwin-arm64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-darwin-arm64@npm:1.93.2" +"sass-embedded-darwin-arm64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-darwin-arm64@npm:1.93.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"sass-embedded-darwin-x64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-darwin-x64@npm:1.93.2" +"sass-embedded-darwin-x64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-darwin-x64@npm:1.93.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"sass-embedded-linux-arm64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-arm64@npm:1.93.2" +"sass-embedded-linux-arm64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-arm64@npm:1.93.3" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"sass-embedded-linux-arm@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-arm@npm:1.93.2" +"sass-embedded-linux-arm@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-arm@npm:1.93.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"sass-embedded-linux-musl-arm64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-musl-arm64@npm:1.93.2" +"sass-embedded-linux-musl-arm64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-musl-arm64@npm:1.93.3" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"sass-embedded-linux-musl-arm@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-musl-arm@npm:1.93.2" +"sass-embedded-linux-musl-arm@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-musl-arm@npm:1.93.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"sass-embedded-linux-musl-riscv64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-musl-riscv64@npm:1.93.2" +"sass-embedded-linux-musl-riscv64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-musl-riscv64@npm:1.93.3" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"sass-embedded-linux-musl-x64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-musl-x64@npm:1.93.2" +"sass-embedded-linux-musl-x64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-musl-x64@npm:1.93.3" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"sass-embedded-linux-riscv64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-riscv64@npm:1.93.2" +"sass-embedded-linux-riscv64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-riscv64@npm:1.93.3" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"sass-embedded-linux-x64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-linux-x64@npm:1.93.2" +"sass-embedded-linux-x64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-linux-x64@npm:1.93.3" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"sass-embedded-unknown-all@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-unknown-all@npm:1.93.2" +"sass-embedded-unknown-all@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-unknown-all@npm:1.93.3" dependencies: - sass: "npm:1.93.2" + sass: "npm:1.93.3" conditions: (!os=android | !os=darwin | !os=linux | !os=win32) languageName: node linkType: hard -"sass-embedded-win32-arm64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-win32-arm64@npm:1.93.2" +"sass-embedded-win32-arm64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-win32-arm64@npm:1.93.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"sass-embedded-win32-x64@npm:1.93.2": - version: 1.93.2 - resolution: "sass-embedded-win32-x64@npm:1.93.2" +"sass-embedded-win32-x64@npm:1.93.3": + version: 1.93.3 + resolution: "sass-embedded-win32-x64@npm:1.93.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"sass-embedded@npm:^1.93.2": - version: 1.93.2 - resolution: "sass-embedded@npm:1.93.2" +"sass-embedded@npm:^1.93.3": + version: 1.93.3 + resolution: "sass-embedded@npm:1.93.3" dependencies: "@bufbuild/protobuf": "npm:^2.5.0" buffer-builder: "npm:^0.2.0" colorjs.io: "npm:^0.5.0" immutable: "npm:^5.0.2" rxjs: "npm:^7.4.0" - sass-embedded-all-unknown: "npm:1.93.2" - sass-embedded-android-arm: "npm:1.93.2" - sass-embedded-android-arm64: "npm:1.93.2" - sass-embedded-android-riscv64: "npm:1.93.2" - sass-embedded-android-x64: "npm:1.93.2" - sass-embedded-darwin-arm64: "npm:1.93.2" - sass-embedded-darwin-x64: "npm:1.93.2" - sass-embedded-linux-arm: "npm:1.93.2" - sass-embedded-linux-arm64: "npm:1.93.2" - sass-embedded-linux-musl-arm: "npm:1.93.2" - sass-embedded-linux-musl-arm64: "npm:1.93.2" - sass-embedded-linux-musl-riscv64: "npm:1.93.2" - sass-embedded-linux-musl-x64: "npm:1.93.2" - sass-embedded-linux-riscv64: "npm:1.93.2" - sass-embedded-linux-x64: "npm:1.93.2" - sass-embedded-unknown-all: "npm:1.93.2" - sass-embedded-win32-arm64: "npm:1.93.2" - sass-embedded-win32-x64: "npm:1.93.2" + sass-embedded-all-unknown: "npm:1.93.3" + sass-embedded-android-arm: "npm:1.93.3" + sass-embedded-android-arm64: "npm:1.93.3" + sass-embedded-android-riscv64: "npm:1.93.3" + sass-embedded-android-x64: "npm:1.93.3" + sass-embedded-darwin-arm64: "npm:1.93.3" + sass-embedded-darwin-x64: "npm:1.93.3" + sass-embedded-linux-arm: "npm:1.93.3" + sass-embedded-linux-arm64: "npm:1.93.3" + sass-embedded-linux-musl-arm: "npm:1.93.3" + sass-embedded-linux-musl-arm64: "npm:1.93.3" + sass-embedded-linux-musl-riscv64: "npm:1.93.3" + sass-embedded-linux-musl-x64: "npm:1.93.3" + sass-embedded-linux-riscv64: "npm:1.93.3" + sass-embedded-linux-x64: "npm:1.93.3" + sass-embedded-unknown-all: "npm:1.93.3" + sass-embedded-win32-arm64: "npm:1.93.3" + sass-embedded-win32-x64: "npm:1.93.3" supports-color: "npm:^8.1.1" sync-child-process: "npm:^1.0.2" varint: "npm:^6.0.0" @@ -10280,13 +10146,13 @@ __metadata: optional: true bin: sass: dist/bin/sass.js - checksum: 10c0/de0a00b40258fc9d6f067f5566a3bb7089cd56a42431e3d1b525dde3e5e85dcb2ff7350943c3f43f6ad6d1276bcc4570fb8fbc801e9af8a11f3dd67f1ced3e7d + checksum: 10c0/fdaecf90af7f131494f2800f0db6212133200ff18939e504aeca93c7ce6230a5366c514fce14585d766623e9feace7d521e499b66f2116a98b55821c81ee9250 languageName: node linkType: hard -"sass@npm:1.93.2": - version: 1.93.2 - resolution: "sass@npm:1.93.2" +"sass@npm:1.93.3": + version: 1.93.3 + resolution: "sass@npm:1.93.3" dependencies: "@parcel/watcher": "npm:^2.4.1" chokidar: "npm:^4.0.0" @@ -10297,7 +10163,7 @@ __metadata: optional: true bin: sass: sass.js - checksum: 10c0/5a19f12dbe8c142e40c1e0473d1e624898242b1c21010301e169b528be8c580df6356329c798522b525eb11eda4b04b9b77422badc55c47889600f8477201d2b + checksum: 10c0/b9facc64de10c9d1514272c1dcbb48ca99d5f591a1cd43fd27d641275d9d95948f1299107ab5b309e2abb552667cca84a38a1a3df5116eb72eba4144bf850b6a languageName: node linkType: hard @@ -10588,19 +10454,18 @@ __metadata: languageName: node linkType: hard -"storybook@npm:^9.1.10": - version: 9.1.10 - resolution: "storybook@npm:9.1.10" +"storybook@npm:^10.0.3": + version: 10.0.3 + resolution: "storybook@npm:10.0.3" dependencies: "@storybook/global": "npm:^5.0.0" + "@storybook/icons": "npm:^1.6.0" "@testing-library/jest-dom": "npm:^6.6.3" "@testing-library/user-event": "npm:^14.6.1" "@vitest/expect": "npm:3.2.4" "@vitest/mocker": "npm:3.2.4" "@vitest/spy": "npm:3.2.4" - better-opn: "npm:^3.0.2" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0" - esbuild-register: "npm:^3.5.0" recast: "npm:^0.23.5" semver: "npm:^7.6.2" ws: "npm:^8.18.0" @@ -10610,8 +10475,8 @@ __metadata: prettier: optional: true bin: - storybook: ./bin/index.cjs - checksum: 10c0/e44ced87d5ed1c3260c65824d5e1c5d09d4f58731ba63371bb5b52f68f5b73d52062d79c17c63ad85a4ffa69774b26b51210bbc22ffa495bb44d4fe5c87d95a7 + storybook: ./dist/bin/dispatcher.js + checksum: 10c0/48c432f8db5bfe7c5c0101c176a65bfa1bff8b9d365bcee8acf5ba3b6b3d6b10d2f96976e08169cc4057566fb63848d3800ea9f20a640800e23cfd791093699e languageName: node linkType: hard @@ -11301,13 +11166,6 @@ __metadata: languageName: node linkType: hard -"unicorn-magic@npm:^0.1.0": - version: 0.1.0 - resolution: "unicorn-magic@npm:0.1.0" - checksum: 10c0/e4ed0de05b0a05e735c7d8a2930881e5efcfc3ec897204d5d33e7e6247f4c31eac92e383a15d9a6bccb7319b4271ee4bea946e211bf14951fec6ff2cbbb66a92 - languageName: node - linkType: hard - "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" @@ -11326,15 +11184,15 @@ __metadata: languageName: node linkType: hard -"unplugin@npm:^1.3.1": - version: 1.10.1 - resolution: "unplugin@npm:1.10.1" +"unplugin@npm:^2.3.5": + version: 2.3.10 + resolution: "unplugin@npm:2.3.10" dependencies: - acorn: "npm:^8.11.3" - chokidar: "npm:^3.6.0" - webpack-sources: "npm:^3.2.3" - webpack-virtual-modules: "npm:^0.6.1" - checksum: 10c0/6fe469785a46ff2a2d5c077db8b8b8d2c5429016f2561cffed4eb0068ea085c50b8c503891a4ea028f8226da0b9a8b878118a0b9eeded511b53adec4edbb38d3 + "@jridgewell/remapping": "npm:^2.3.5" + acorn: "npm:^8.15.0" + picomatch: "npm:^4.0.3" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10c0/29dcd738772aeff91c6f0154f156c95c58a37a4674fcb7cc34d6868af763834f0f447a1c3af074818c0c5602baead49bd3b9399a13f0425d69a00a527e58ddda languageName: node linkType: hard @@ -11476,9 +11334,9 @@ __metadata: languageName: node linkType: hard -"vite@npm:^7.1.11": - version: 7.1.11 - resolution: "vite@npm:7.1.11" +"vite@npm:^7.1.12": + version: 7.1.12 + resolution: "vite@npm:7.1.12" dependencies: esbuild: "npm:^0.25.0" fdir: "npm:^6.5.0" @@ -11527,7 +11385,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/c4aa7f47b1fb07f734ed6f4f605d73e5acf7ff9754d75b4adbfbdddf0e520413019834620c1f7b4a207bce7e1d20a2636c584db2b1b17f5a3ba2cd23d47e50ab + checksum: 10c0/cef4d4b4a84e663e09b858964af36e916892ac8540068df42a05ced637ceeae5e9ef71c72d54f3cfc1f3c254af16634230e221b6e2327c2a66d794bb49203262 languageName: node linkType: hard @@ -11556,17 +11414,10 @@ __metadata: languageName: node linkType: hard -"webpack-sources@npm:^3.2.3": - version: 3.2.3 - resolution: "webpack-sources@npm:3.2.3" - checksum: 10c0/2ef63d77c4fad39de4a6db17323d75eb92897b32674e97d76f0a1e87c003882fc038571266ad0ef581ac734cbe20952912aaa26155f1905e96ce251adbb1eb4e - languageName: node - linkType: hard - -"webpack-virtual-modules@npm:^0.6.1": - version: 0.6.1 - resolution: "webpack-virtual-modules@npm:0.6.1" - checksum: 10c0/696bdc1acf3806374bdeb4b9b9856b79ee70b31e92f325dfab9b8c8c7e14bb6ddffa9f895a214770c4fb8fea45a21f34ca64310f74e877292a90f4a9966c9c2f +"webpack-virtual-modules@npm:^0.6.2": + version: 0.6.2 + resolution: "webpack-virtual-modules@npm:0.6.2" + checksum: 10c0/5ffbddf0e84bf1562ff86cf6fcf039c74edf09d78358a6904a09bbd4484e8bb6812dc385fe14330b715031892dcd8423f7a88278b57c9f5002c84c2860179add languageName: node linkType: hard @@ -11823,13 +11674,6 @@ __metadata: languageName: node linkType: hard -"yocto-queue@npm:^1.0.0": - version: 1.2.1 - resolution: "yocto-queue@npm:1.2.1" - checksum: 10c0/5762caa3d0b421f4bdb7a1926b2ae2189fc6e4a14469258f183600028eb16db3e9e0306f46e8ebf5a52ff4b81a881f22637afefbef5399d6ad440824e9b27f9f - languageName: node - linkType: hard - "zod-validation-error@npm:^3.5.0 || ^4.0.0": version: 4.0.2 resolution: "zod-validation-error@npm:4.0.2" From 2e17b40620f6ea9549ce045dad079a1338274323 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Mon, 3 Nov 2025 16:26:10 +0000 Subject: [PATCH 2/6] Fix resolutions --- .yarnrc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.yarnrc.yml b/.yarnrc.yml index 39440f5b..ba2296b0 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -13,6 +13,8 @@ packageExtensions: storybook@*: peerDependencies: "@testing-library/dom": "*" + react: "*" + react-dom: "*" vite@*: peerDependencies: rollup: "*" From 1f8ec3b42a6a9f67b2b9f7674dad5d6cddf39aec Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Mon, 3 Nov 2025 21:54:29 +0000 Subject: [PATCH 3/6] Fix source map relative paths to sources --- rollup.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 7a98d9b5..4611322d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,4 @@ -import { join } from 'node:path'; +import { dirname, join, relative, resolve } from 'node:path'; import { DEFAULT_EXTENSIONS as extensions } from '@babel/core'; import { babel } from '@rollup/plugin-babel'; import commonjs from '@rollup/plugin-commonjs'; @@ -38,6 +38,12 @@ export default defineConfig( preserveModulesRoot: 'src', sourcemap: true, sourcemapExcludeSources: true, + + // Fix source map relative paths to sources + sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { + const sourcePath = resolve(sourcemapPath, relativeSourcePath); + return relative(dirname(sourcemapPath), sourcePath); + }, }, ], external: ['react/jsx-runtime', ...external], From ac610424517d60f7573326972784f1fadc0ece06 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Mon, 3 Nov 2025 21:59:29 +0000 Subject: [PATCH 4/6] Use ES modules for Storybook --- .storybook/manager.ts | 2 +- package.json | 8 -------- stories/Content Presentation/Details.stories.tsx | 2 +- stories/Content Presentation/DoAndDontList.stories.tsx | 2 +- stories/Content Presentation/Hero.stories.tsx | 2 +- stories/Content Presentation/Icons.stories.tsx | 2 +- stories/Content Presentation/Images.stories.tsx | 2 +- stories/Content Presentation/InsetText.stories.tsx | 2 +- .../Content Presentation/NotificationBanner.stories.tsx | 4 ++-- stories/Content Presentation/Panel.stories.tsx | 2 +- stories/Content Presentation/SummaryList.stories.tsx | 3 ++- stories/Content Presentation/Table.stories.tsx | 4 +++- stories/Content Presentation/Tabs.stories.tsx | 2 +- stories/Content Presentation/Tag.stories.tsx | 2 +- stories/Content Presentation/WarningCallout.stories.tsx | 2 +- stories/Form Elements/Button.stories.tsx | 2 +- stories/Form Elements/CharacterCount.stories.tsx | 2 +- stories/Form Elements/Checkboxes.stories.tsx | 3 ++- stories/Form Elements/DateInput.stories.tsx | 2 +- stories/Form Elements/ErrorMessage.stories.tsx | 2 +- stories/Form Elements/ErrorSummary.stories.tsx | 2 +- stories/Form Elements/Fieldset.stories.tsx | 3 ++- stories/Form Elements/HintText.stories.tsx | 2 +- stories/Form Elements/Label.stories.tsx | 2 +- stories/Form Elements/Radios.stories.tsx | 4 +++- stories/Form Elements/Select.stories.tsx | 3 ++- stories/Form Elements/TextInput.stories.tsx | 2 +- stories/Form Elements/Textarea.stories.tsx | 3 ++- stories/Layout/Grid.stories.tsx | 3 ++- stories/Navigation/ActionLink.stories.tsx | 2 +- stories/Navigation/BackLink.stories.tsx | 2 +- stories/Navigation/Breadcrumb.stories.tsx | 3 ++- stories/Navigation/Card.stories.tsx | 3 ++- stories/Navigation/ContentsList.stories.tsx | 2 +- stories/Navigation/Footer.stories.tsx | 2 +- stories/Navigation/Header.stories.tsx | 2 +- stories/Navigation/Pagination.stories.tsx | 2 +- stories/Navigation/SkipLink.stories.tsx | 3 ++- stories/Patterns/NavAZ.stories.tsx | 2 +- stories/Patterns/PageAZ.stories.tsx | 6 ++++-- stories/Patterns/ReviewDate.stories.tsx | 2 +- tsconfig.base.json | 2 -- tsconfig.dev.json | 2 -- tsconfig.json | 3 +++ tsconfig.stories.json | 8 ++++++++ 45 files changed, 68 insertions(+), 54 deletions(-) create mode 100644 tsconfig.stories.json diff --git a/.storybook/manager.ts b/.storybook/manager.ts index 2a4e8134..b1234689 100644 --- a/.storybook/manager.ts +++ b/.storybook/manager.ts @@ -1,5 +1,5 @@ import { addons } from 'storybook/manager-api'; -import nhsTheme from './theme'; +import nhsTheme from './theme.js'; import { startCase, upperFirst } from 'lodash'; const sentenceCase = (name = '') => { diff --git a/package.json b/package.json index ad5e6cc1..832f85d3 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,10 @@ "import": "./dist/esm/components/*", "require": "./dist/cjs/components/*" }, - "#components": { - "import": "./dist/esm/components/index.js", - "require": "./dist/cjs/components/index.cjs" - }, "#patterns/*": { "import": "./dist/esm/patterns/*", "require": "./dist/cjs/patterns/*" }, - "#patterns": { - "import": "./dist/esm/patterns/index.js", - "require": "./dist/cjs/patterns/index.cjs" - }, "#util/*": { "import": "./dist/esm/util/*", "require": "./dist/cjs/util/*" diff --git a/stories/Content Presentation/Details.stories.tsx b/stories/Content Presentation/Details.stories.tsx index 2c9a1606..4f8c786b 100644 --- a/stories/Content Presentation/Details.stories.tsx +++ b/stories/Content Presentation/Details.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Details } from '#components'; +import { Details } from '#components/content-presentation/details/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Content Presentation/DoAndDontList.stories.tsx b/stories/Content Presentation/DoAndDontList.stories.tsx index 0089f79c..033a1338 100644 --- a/stories/Content Presentation/DoAndDontList.stories.tsx +++ b/stories/Content Presentation/DoAndDontList.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { DoAndDontList } from '#components'; +import { DoAndDontList } from '#components/content-presentation/do-and-dont-list/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Content Presentation/Hero.stories.tsx b/stories/Content Presentation/Hero.stories.tsx index 4b80325e..a343fe38 100644 --- a/stories/Content Presentation/Hero.stories.tsx +++ b/stories/Content Presentation/Hero.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Hero } from '#components'; +import { Hero } from '#components/content-presentation/hero/index.js'; const meta: Meta = { title: 'Content Presentation/Hero', diff --git a/stories/Content Presentation/Icons.stories.tsx b/stories/Content Presentation/Icons.stories.tsx index 7f568897..dde715df 100644 --- a/stories/Content Presentation/Icons.stories.tsx +++ b/stories/Content Presentation/Icons.stories.tsx @@ -8,7 +8,7 @@ import { SearchIcon, TickIcon, UserIcon, -} from '#components'; +} from '#components/content-presentation/icons/individual/index.js'; const meta: Meta = { title: 'Content Presentation/Icons', diff --git a/stories/Content Presentation/Images.stories.tsx b/stories/Content Presentation/Images.stories.tsx index d9080e1e..d39c40af 100644 --- a/stories/Content Presentation/Images.stories.tsx +++ b/stories/Content Presentation/Images.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Images } from '#components'; +import { Images } from '#components/content-presentation/images/index.js'; const meta: Meta = { title: 'Content Presentation/Images', diff --git a/stories/Content Presentation/InsetText.stories.tsx b/stories/Content Presentation/InsetText.stories.tsx index 0ac53ce0..536509e0 100644 --- a/stories/Content Presentation/InsetText.stories.tsx +++ b/stories/Content Presentation/InsetText.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { InsetText } from '#components'; +import { InsetText } from '#components/content-presentation/inset-text/index.js'; const meta: Meta = { title: 'Content Presentation/InsetText', diff --git a/stories/Content Presentation/NotificationBanner.stories.tsx b/stories/Content Presentation/NotificationBanner.stories.tsx index d5d4bae2..a0d9000c 100644 --- a/stories/Content Presentation/NotificationBanner.stories.tsx +++ b/stories/Content Presentation/NotificationBanner.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { NotificationBanner } from '#components'; -import { NotificationBannerLink } from '#components/content-presentation/notification-banner/components'; +import { NotificationBanner } from '#components/content-presentation/notification-banner/index.js'; +import { NotificationBannerLink } from '#components/content-presentation/notification-banner/components/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Content Presentation/Panel.stories.tsx b/stories/Content Presentation/Panel.stories.tsx index 2e519947..3de96c54 100644 --- a/stories/Content Presentation/Panel.stories.tsx +++ b/stories/Content Presentation/Panel.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Panel } from '#components'; +import { Panel } from '#components/content-presentation/panel/index.js'; const meta: Meta = { title: 'Content Presentation/Panel', diff --git a/stories/Content Presentation/SummaryList.stories.tsx b/stories/Content Presentation/SummaryList.stories.tsx index d9374011..2f458b25 100644 --- a/stories/Content Presentation/SummaryList.stories.tsx +++ b/stories/Content Presentation/SummaryList.stories.tsx @@ -1,6 +1,7 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { BodyText, SummaryList } from '#components'; +import { BodyText } from '#components/typography/BodyText.js'; +import { SummaryList } from '#components/content-presentation/summary-list/index.js'; /** * ## Implementation notes diff --git a/stories/Content Presentation/Table.stories.tsx b/stories/Content Presentation/Table.stories.tsx index 3402d3e0..8f961d61 100644 --- a/stories/Content Presentation/Table.stories.tsx +++ b/stories/Content Presentation/Table.stories.tsx @@ -1,5 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Col, HintText, Row, Table } from '#components'; +import { Table } from '#components/content-presentation/table/index.js'; +import { HintText } from '#components/form-elements/hint-text/index.js'; +import { Col, Row } from '#components/layout/index.js'; const meta: Meta = { title: 'Content Presentation/Table', diff --git a/stories/Content Presentation/Tabs.stories.tsx b/stories/Content Presentation/Tabs.stories.tsx index 01a66a61..c8996388 100644 --- a/stories/Content Presentation/Tabs.stories.tsx +++ b/stories/Content Presentation/Tabs.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Tabs } from '#components'; +import { Tabs } from '#components/content-presentation/tabs/index.js'; /** * The tabs component lets users navigate between related sections of content, displaying 1 section at a time. diff --git a/stories/Content Presentation/Tag.stories.tsx b/stories/Content Presentation/Tag.stories.tsx index 2bf3cef5..a6665edc 100644 --- a/stories/Content Presentation/Tag.stories.tsx +++ b/stories/Content Presentation/Tag.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Tag } from '#components'; +import { Tag } from '#components/content-presentation/tag/index.js'; const meta: Meta = { title: 'Content Presentation/Tag', diff --git a/stories/Content Presentation/WarningCallout.stories.tsx b/stories/Content Presentation/WarningCallout.stories.tsx index 2f4210df..685c3b10 100644 --- a/stories/Content Presentation/WarningCallout.stories.tsx +++ b/stories/Content Presentation/WarningCallout.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { WarningCallout } from '#components'; +import { WarningCallout } from '#components/content-presentation/warning-callout/index.js'; const meta: Meta = { title: 'Content Presentation/WarningCallout', diff --git a/stories/Form Elements/Button.stories.tsx b/stories/Form Elements/Button.stories.tsx index 0e6c64ca..8cf794f0 100644 --- a/stories/Form Elements/Button.stories.tsx +++ b/stories/Form Elements/Button.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Button } from '#components'; +import { Button } from '#components/form-elements/button/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Form Elements/CharacterCount.stories.tsx b/stories/Form Elements/CharacterCount.stories.tsx index 6a5555e3..fa259f42 100644 --- a/stories/Form Elements/CharacterCount.stories.tsx +++ b/stories/Form Elements/CharacterCount.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { CharacterCount } from '#components'; +import { CharacterCount } from '#components/form-elements/character-count/index.js'; /** * Help users know how much text they can enter when there is a limit on the number of characters. diff --git a/stories/Form Elements/Checkboxes.stories.tsx b/stories/Form Elements/Checkboxes.stories.tsx index 6857694b..9b2e3846 100644 --- a/stories/Form Elements/Checkboxes.stories.tsx +++ b/stories/Form Elements/Checkboxes.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useEffect, useRef, useState, type SyntheticEvent } from 'react'; -import { Checkboxes, TextInput } from '#components'; +import { Checkboxes } from '#components/form-elements/checkboxes/index.js'; +import { TextInput } from '#components/form-elements/text-input/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Form Elements/DateInput.stories.tsx b/stories/Form Elements/DateInput.stories.tsx index 674c1855..e5fff547 100644 --- a/stories/Form Elements/DateInput.stories.tsx +++ b/stories/Form Elements/DateInput.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; -import { DateInput, type DateInputValue } from '#components'; +import { DateInput, type DateInputValue } from '#components/form-elements/date-input/index.js'; const meta: Meta = { title: 'Form Elements/DateInput', diff --git a/stories/Form Elements/ErrorMessage.stories.tsx b/stories/Form Elements/ErrorMessage.stories.tsx index f72a05fd..4368e2d4 100644 --- a/stories/Form Elements/ErrorMessage.stories.tsx +++ b/stories/Form Elements/ErrorMessage.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { ErrorMessage } from '#components'; +import { ErrorMessage } from '#components/form-elements/error-message/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Form Elements/ErrorSummary.stories.tsx b/stories/Form Elements/ErrorSummary.stories.tsx index 79002df3..56ae4ee1 100644 --- a/stories/Form Elements/ErrorSummary.stories.tsx +++ b/stories/Form Elements/ErrorSummary.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { ErrorSummary } from '#components'; +import { ErrorSummary } from '#components/form-elements/error-summary/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Form Elements/Fieldset.stories.tsx b/stories/Form Elements/Fieldset.stories.tsx index cb4e4c16..04688364 100644 --- a/stories/Form Elements/Fieldset.stories.tsx +++ b/stories/Form Elements/Fieldset.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Fieldset, TextInput } from '#components'; +import { Fieldset } from '#components/form-elements/fieldset/index.js'; +import { TextInput } from '#components/form-elements/text-input/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Form Elements/HintText.stories.tsx b/stories/Form Elements/HintText.stories.tsx index 995f4e0e..d812e26a 100644 --- a/stories/Form Elements/HintText.stories.tsx +++ b/stories/Form Elements/HintText.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { HintText } from '#components'; +import { HintText } from '#components/form-elements/hint-text/index.js'; const meta: Meta = { title: 'Form Elements/HintText', diff --git a/stories/Form Elements/Label.stories.tsx b/stories/Form Elements/Label.stories.tsx index a9a559ef..68f4a7a3 100644 --- a/stories/Form Elements/Label.stories.tsx +++ b/stories/Form Elements/Label.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Label } from '#components'; +import { Label } from '#components/form-elements/label/index.js'; const meta: Meta = { title: 'Form Elements/Label', diff --git a/stories/Form Elements/Radios.stories.tsx b/stories/Form Elements/Radios.stories.tsx index 65a41645..0f28e558 100644 --- a/stories/Form Elements/Radios.stories.tsx +++ b/stories/Form Elements/Radios.stories.tsx @@ -1,6 +1,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; -import { Checkboxes, Radios, TextInput } from '#components'; +import { Checkboxes } from '#components/form-elements/checkboxes/index.js'; +import { Radios } from '#components/form-elements/radios/index.js'; +import { TextInput } from '#components/form-elements/text-input/index.js'; const meta: Meta = { title: 'Form Elements/Radios', diff --git a/stories/Form Elements/Select.stories.tsx b/stories/Form Elements/Select.stories.tsx index ea9180da..70570c7f 100644 --- a/stories/Form Elements/Select.stories.tsx +++ b/stories/Form Elements/Select.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; -import { Select, TextInput } from '#components'; +import { Select } from '#components/form-elements/select/index.js'; +import { TextInput } from '#components/form-elements/text-input/index.js'; const meta: Meta = { title: 'Form Elements/Select', diff --git a/stories/Form Elements/TextInput.stories.tsx b/stories/Form Elements/TextInput.stories.tsx index 9cc2228c..0367ca25 100644 --- a/stories/Form Elements/TextInput.stories.tsx +++ b/stories/Form Elements/TextInput.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { TextInput } from '#components'; +import { TextInput } from '#components/form-elements/text-input/index.js'; const meta: Meta = { title: 'Form Elements/TextInput', diff --git a/stories/Form Elements/Textarea.stories.tsx b/stories/Form Elements/Textarea.stories.tsx index 10077c82..94838ac1 100644 --- a/stories/Form Elements/Textarea.stories.tsx +++ b/stories/Form Elements/Textarea.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; -import { TextInput, Textarea } from '#components'; +import { TextInput } from '#components/form-elements/text-input/index.js'; +import { Textarea } from '#components/form-elements/textarea/index.js'; const meta: Meta = { title: 'Form Elements/Textarea', diff --git a/stories/Layout/Grid.stories.tsx b/stories/Layout/Grid.stories.tsx index 8ccefc72..b01de5cb 100644 --- a/stories/Layout/Grid.stories.tsx +++ b/stories/Layout/Grid.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Card, Col, Container, Row } from '#components'; +import { Card } from '#components/navigation/card/index.js'; +import { Col, Container, Row } from '#components/layout/index.js'; const meta: Meta = { title: 'Layout/Grid', diff --git a/stories/Navigation/ActionLink.stories.tsx b/stories/Navigation/ActionLink.stories.tsx index 4852586b..201b802f 100644 --- a/stories/Navigation/ActionLink.stories.tsx +++ b/stories/Navigation/ActionLink.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { ActionLink } from '#components'; +import { ActionLink } from '#components/navigation/action-link/index.js'; const meta: Meta = { title: 'Navigation/ActionLink', diff --git a/stories/Navigation/BackLink.stories.tsx b/stories/Navigation/BackLink.stories.tsx index 9cb64bd6..1e06ae02 100644 --- a/stories/Navigation/BackLink.stories.tsx +++ b/stories/Navigation/BackLink.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { BackLink } from '#components'; +import { BackLink } from '#components/navigation/back-link/index.js'; const meta: Meta = { title: 'Navigation/BackLink', diff --git a/stories/Navigation/Breadcrumb.stories.tsx b/stories/Navigation/Breadcrumb.stories.tsx index 14d7072b..34a9317f 100644 --- a/stories/Navigation/Breadcrumb.stories.tsx +++ b/stories/Navigation/Breadcrumb.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Breadcrumb, Container } from '#components'; +import { Breadcrumb } from '#components/navigation/breadcrumb/index.js'; +import { Container } from '#components/layout/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Navigation/Card.stories.tsx b/stories/Navigation/Card.stories.tsx index cc8d2985..9784e8e1 100644 --- a/stories/Navigation/Card.stories.tsx +++ b/stories/Navigation/Card.stories.tsx @@ -1,6 +1,7 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Card, ChevronRightCircleIcon } from '#components'; +import { Card } from '#components/navigation/card/index.js'; +import { ChevronRightCircleIcon } from '#components/content-presentation/icons/individual/index.js'; const meta: Meta = { title: 'Navigation/Card', diff --git a/stories/Navigation/ContentsList.stories.tsx b/stories/Navigation/ContentsList.stories.tsx index 1da0b7b4..91c832c2 100644 --- a/stories/Navigation/ContentsList.stories.tsx +++ b/stories/Navigation/ContentsList.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { ContentsList } from '#components'; +import { ContentsList } from '#components/navigation/contents-list/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Navigation/Footer.stories.tsx b/stories/Navigation/Footer.stories.tsx index 489d65f6..b70ec074 100644 --- a/stories/Navigation/Footer.stories.tsx +++ b/stories/Navigation/Footer.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Footer } from '#components'; +import { Footer } from '#components/navigation/footer/index.js'; const meta: Meta = { title: 'Navigation/Footer', diff --git a/stories/Navigation/Header.stories.tsx b/stories/Navigation/Header.stories.tsx index 39ee41c7..d04eacf4 100644 --- a/stories/Navigation/Header.stories.tsx +++ b/stories/Navigation/Header.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { type ComponentProps } from 'react'; -import { Header } from '#components'; +import { Header } from '#components/navigation/header/index.js'; const meta: Meta = { title: 'Navigation/Header', diff --git a/stories/Navigation/Pagination.stories.tsx b/stories/Navigation/Pagination.stories.tsx index b9b07350..92561106 100644 --- a/stories/Navigation/Pagination.stories.tsx +++ b/stories/Navigation/Pagination.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Pagination } from '#components'; +import { Pagination } from '#components/navigation/pagination/index.js'; const meta: Meta = { title: 'Navigation/Pagination', diff --git a/stories/Navigation/SkipLink.stories.tsx b/stories/Navigation/SkipLink.stories.tsx index ba96f3f4..044f17b4 100644 --- a/stories/Navigation/SkipLink.stories.tsx +++ b/stories/Navigation/SkipLink.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { type FC, type ReactNode } from 'react'; -import { HintText, SkipLink } from '#components'; +import { HintText } from '#components/form-elements/hint-text/index.js'; +import { SkipLink } from '#components/navigation/skip-link/index.js'; const CodeText: FC<{ children: ReactNode }> = ({ children }) => ( = { title: 'Patterns/ReviewDate', diff --git a/tsconfig.base.json b/tsconfig.base.json index 2cbb9ef6..e274130b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -17,9 +17,7 @@ "verbatimModuleSyntax": true, "paths": { "#components/*": ["./src/components/*"], - "#components": ["./src/components/index.ts"], "#patterns/*": ["./src/patterns/*"], - "#patterns": ["./src/patterns/index.ts"], "#util/*": ["./src/util/*"], "nhsuk-react-components": ["./src/index.ts"] } diff --git a/tsconfig.dev.json b/tsconfig.dev.json index c26c5bf0..f2af06c8 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -7,11 +7,9 @@ "types": ["jest", "node"] }, "include": [ - "./.storybook/*.ts", "./src/**/*.test.ts", "./src/**/*.test.tsx", "./src/setupTests.ts", - "./stories/**/*.tsx", "./*.config.cjs", "./*.config.js" ] diff --git a/tsconfig.json b/tsconfig.json index 4b3b4c43..e5a98c18 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,9 @@ }, { "path": "./tsconfig.build.json" + }, + { + "path": "./tsconfig.stories.json" } ] } diff --git a/tsconfig.stories.json b/tsconfig.stories.json new file mode 100644 index 00000000..ae0ba131 --- /dev/null +++ b/tsconfig.stories.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "jsx": "react-jsxdev", + "types": ["node"] + }, + "include": ["./.storybook/*.ts", "./stories/**/*.tsx"] +} From 4d6f8d31140cb452998fe4b4980cad1c939373bf Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Mon, 3 Nov 2025 22:08:13 +0000 Subject: [PATCH 5/6] Sync ESLint rules with NHS.UK frontend --- eslint.config.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index 8ae6aae0..ea13b36c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -44,8 +44,23 @@ export default defineConfig([ 'import/no-unresolved': 'off', 'import/no-unused-modules': 'off', + // Always import Node.js packages from `node:*` + 'import/enforce-node-protocol-usage': ['error', 'always'], + + // Check import or require statements are A-Z ordered + 'import/order': [ + 'error', + { + 'alphabetize': { order: 'asc' }, + 'newlines-between': 'always', + }, + ], + // Prefer rules that are type aware + 'no-redeclare': 'off', + 'no-undef': 'off', 'no-unused-vars': 'off', + '@typescript-eslint/no-redeclare': 'error', '@typescript-eslint/no-unused-vars': [ 'error', { From e8b9cd590e17cced6c8b33ea2aa6f1862a1adfa9 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Mon, 3 Nov 2025 22:10:07 +0000 Subject: [PATCH 6/6] ESLint fix --- .storybook/manager.ts | 3 ++- .storybook/theme.ts | 1 + eslint.config.js | 11 ++++++----- rollup.config.js | 4 +++- .../details/__tests__/Details.test.tsx | 2 ++ .../do-and-dont-list/DoAndDontList.tsx | 4 +++- .../do-and-dont-list/__tests__/DoAndDontList.test.tsx | 2 ++ .../do-and-dont-list/components/DoAndDontListItem.tsx | 1 + src/components/content-presentation/hero/Hero.tsx | 1 + .../content-presentation/hero/__tests__/Hero.test.tsx | 1 + .../icons/__tests__/Icons.test.tsx | 1 + .../icons/individual/ArrowLeftIcon.tsx | 1 + .../icons/individual/ArrowRightCircleIcon.tsx | 1 + .../icons/individual/ArrowRightIcon.tsx | 1 + .../icons/individual/ChevronRightCircleIcon.tsx | 1 + .../icons/individual/CrossIcon.tsx | 1 + .../icons/individual/SearchIcon.tsx | 1 + .../icons/individual/TickIcon.tsx | 1 + .../icons/individual/UserIcon.tsx | 1 + .../images/__tests__/Images.test.tsx | 1 + .../inset-text/__tests__/InsetText.test.tsx | 1 + .../notification-banner/NotificationBanner.tsx | 6 ++++-- .../__tests__/NotificationBanner.test.tsx | 5 +++-- .../components/NotificationBannerHeading.tsx | 3 ++- .../components/NotificationBannerLink.tsx | 5 +++-- .../components/NotificationBannerTitle.tsx | 3 ++- src/components/content-presentation/panel/Panel.tsx | 4 +++- .../panel/__tests__/Panel.test.tsx | 2 ++ .../panel/components/PanelTitle.tsx | 1 + .../summary-list/__tests__/SummaryList.test.tsx | 1 + src/components/content-presentation/table/Table.tsx | 3 ++- .../content-presentation/table/TableHelpers.ts | 2 ++ .../table/components/TableBody.tsx | 1 + .../table/components/TableCaption.tsx | 1 + .../table/components/TableCell.tsx | 2 ++ .../table/components/TableHead.tsx | 1 + .../table/components/TablePanel.tsx | 1 + .../table/components/TableRow.tsx | 3 ++- .../table/components/__tests__/Table.test.tsx | 2 ++ .../table/components/__tests__/TableBody.test.tsx | 1 + .../table/components/__tests__/TableCaption.test.tsx | 2 ++ .../table/components/__tests__/TableCell.test.tsx | 1 + .../components/__tests__/TableContainer.test.tsx | 1 + .../table/components/__tests__/TableHead.test.tsx | 1 + .../table/components/__tests__/TablePanel.test.tsx | 1 + .../table/components/__tests__/TableRow.test.tsx | 1 + src/components/content-presentation/tabs/Tabs.tsx | 1 + .../content-presentation/tabs/__tests__/Tabs.test.tsx | 2 ++ .../content-presentation/tag/__tests__/Tag.test.tsx | 1 + .../warning-callout/WarningCallout.tsx | 1 + .../warning-callout/__tests__/WarningCallout.test.tsx | 1 + src/components/form-elements/button/Button.tsx | 1 + .../form-elements/button/__tests__/Button.test.tsx | 2 ++ .../form-elements/character-count/CharacterCount.tsx | 1 + .../character-count/__tests__/CharacterCount.test.tsx | 2 ++ .../form-elements/checkboxes/Checkboxes.tsx | 4 +++- .../checkboxes/__tests__/Checkboxes.test.tsx | 2 ++ .../checkboxes/components/CheckboxesItem.tsx | 2 ++ src/components/form-elements/date-input/DateInput.tsx | 4 +++- .../date-input/__tests__/DateInput.test.tsx | 2 ++ .../date-input/components/DateInputField.tsx | 2 ++ .../error-message/__tests__/ErrorMessage.test.tsx | 1 + .../form-elements/error-summary/ErrorSummary.tsx | 4 +++- .../error-summary/__tests__/ErrorSummary.test.tsx | 2 ++ src/components/form-elements/fieldset/Fieldset.tsx | 1 + .../fieldset/__tests__/Fieldset.test.tsx | 1 + src/components/form-elements/form/Form.tsx | 1 + .../form-elements/hint-text/__tests__/Hint.test.tsx | 1 + src/components/form-elements/label/Label.tsx | 1 + .../form-elements/label/__tests__/Label.test.tsx | 2 ++ src/components/form-elements/legend/Legend.tsx | 1 + .../form-elements/legend/__tests__/Legend.test.tsx | 2 ++ src/components/form-elements/radios/Radios.tsx | 4 +++- .../form-elements/radios/__tests__/Radios.test.tsx | 2 ++ .../form-elements/radios/components/RadiosItem.tsx | 2 ++ src/components/form-elements/select/Select.tsx | 1 + .../form-elements/select/__tests__/Select.test.tsx | 2 ++ src/components/form-elements/text-input/TextInput.tsx | 1 + .../text-input/__tests__/TextInput.test.tsx | 2 ++ src/components/form-elements/textarea/Textarea.tsx | 1 + .../textarea/__tests__/Textarea.test.tsx | 2 ++ src/components/layout/Col.tsx | 1 + src/components/layout/__tests__/Col.test.tsx | 1 + src/components/layout/__tests__/Container.test.tsx | 1 + src/components/layout/__tests__/Row.test.tsx | 1 + src/components/navigation/action-link/ActionLink.tsx | 1 + .../action-link/__tests__/ActionLink.test.tsx | 1 + src/components/navigation/back-link/BackLink.tsx | 1 + .../navigation/back-link/__tests__/BackLink.test.tsx | 1 + src/components/navigation/breadcrumb/Breadcrumb.tsx | 4 +++- .../breadcrumb/__tests__/Breadcrumb.test.tsx | 1 + .../breadcrumb/components/BreadcrumbBack.tsx | 2 +- .../breadcrumb/components/BreadcrumbItem.tsx | 1 + src/components/navigation/card/Card.tsx | 4 +++- src/components/navigation/card/CardContext.ts | 1 + .../navigation/card/__tests__/Card.test.tsx | 2 ++ .../navigation/card/components/CardContent.tsx | 1 + .../navigation/card/components/CardGroup.tsx | 1 + .../navigation/card/components/CardGroupItem.tsx | 1 + .../navigation/card/components/CardHeading.tsx | 2 ++ .../navigation/card/components/CardLink.tsx | 1 + .../navigation/contents-list/ContentsList.tsx | 1 + .../contents-list/__tests__/ContentsList.test.tsx | 1 + src/components/navigation/footer/Footer.tsx | 4 +++- .../navigation/footer/__tests__/Footer.test.tsx | 1 + .../navigation/footer/components/FooterListItem.tsx | 1 + .../navigation/footer/components/FooterMeta.tsx | 6 ++++-- src/components/navigation/header/Header.tsx | 4 +++- .../navigation/header/__tests__/Header.test.tsx | 2 ++ .../header/components/HeaderAccountItem.tsx | 1 + .../navigation/header/components/HeaderNavigation.tsx | 3 +++ .../header/components/HeaderNavigationItem.tsx | 1 + .../navigation/header/components/HeaderSearch.tsx | 1 + .../header/components/HeaderServiceName.tsx | 1 + src/components/navigation/pagination/Pagination.tsx | 2 ++ .../pagination/__tests__/Pagination.test.tsx | 3 ++- .../pagination/components/PaginationItem.tsx | 4 +++- .../pagination/components/PaginationLink.tsx | 4 +++- .../navigation/skip-link/__tests__/SkipLink.test.tsx | 2 ++ src/components/typography/__tests__/BodyText.test.tsx | 1 + src/components/typography/__tests__/LedeText.test.tsx | 1 + src/components/utils/FormGroup.tsx | 2 ++ src/components/utils/__tests__/FormGroup.test.tsx | 2 ++ src/components/utils/__tests__/HeadingLevel.test.tsx | 1 + src/patterns/nav-a-z/NavAZ.tsx | 1 + src/patterns/nav-a-z/__tests__/NavAZ.test.tsx | 1 + .../review-date/__tests__/ReviewDate.test.tsx | 1 + src/setupTests.ts | 1 + src/util/hooks/UseDevWarning.tsx | 1 + src/util/types/TypeGuards.ts | 1 + stories/Content Presentation/Details.stories.tsx | 1 + .../Content Presentation/DoAndDontList.stories.tsx | 1 + stories/Content Presentation/Hero.stories.tsx | 1 + stories/Content Presentation/Icons.stories.tsx | 1 + stories/Content Presentation/Images.stories.tsx | 1 + stories/Content Presentation/InsetText.stories.tsx | 1 + .../NotificationBanner.stories.tsx | 3 ++- stories/Content Presentation/Panel.stories.tsx | 1 + stories/Content Presentation/SummaryList.stories.tsx | 3 ++- stories/Content Presentation/Table.stories.tsx | 1 + stories/Content Presentation/Tabs.stories.tsx | 1 + stories/Content Presentation/Tag.stories.tsx | 1 + .../Content Presentation/WarningCallout.stories.tsx | 1 + stories/Form Elements/Button.stories.tsx | 1 + stories/Form Elements/CharacterCount.stories.tsx | 1 + stories/Form Elements/Checkboxes.stories.tsx | 1 + stories/Form Elements/DateInput.stories.tsx | 1 + stories/Form Elements/ErrorMessage.stories.tsx | 1 + stories/Form Elements/ErrorSummary.stories.tsx | 1 + stories/Form Elements/Fieldset.stories.tsx | 1 + stories/Form Elements/HintText.stories.tsx | 1 + stories/Form Elements/Label.stories.tsx | 1 + stories/Form Elements/Radios.stories.tsx | 1 + stories/Form Elements/Select.stories.tsx | 1 + stories/Form Elements/TextInput.stories.tsx | 1 + stories/Form Elements/Textarea.stories.tsx | 1 + stories/Layout/Grid.stories.tsx | 3 ++- stories/Navigation/ActionLink.stories.tsx | 1 + stories/Navigation/BackLink.stories.tsx | 1 + stories/Navigation/Breadcrumb.stories.tsx | 3 ++- stories/Navigation/Card.stories.tsx | 3 ++- stories/Navigation/ContentsList.stories.tsx | 1 + stories/Navigation/Footer.stories.tsx | 1 + stories/Navigation/Header.stories.tsx | 1 + stories/Navigation/Pagination.stories.tsx | 1 + stories/Navigation/SkipLink.stories.tsx | 1 + stories/Patterns/NavAZ.stories.tsx | 1 + stories/Patterns/PageAZ.stories.tsx | 3 ++- stories/Patterns/ReviewDate.stories.tsx | 1 + 169 files changed, 253 insertions(+), 39 deletions(-) diff --git a/.storybook/manager.ts b/.storybook/manager.ts index b1234689..c3520bbf 100644 --- a/.storybook/manager.ts +++ b/.storybook/manager.ts @@ -1,6 +1,7 @@ +import { startCase, upperFirst } from 'lodash'; import { addons } from 'storybook/manager-api'; + import nhsTheme from './theme.js'; -import { startCase, upperFirst } from 'lodash'; const sentenceCase = (name = '') => { if (!name || typeof name !== 'string') { diff --git a/.storybook/theme.ts b/.storybook/theme.ts index a7f0b8e9..46a24c4f 100644 --- a/.storybook/theme.ts +++ b/.storybook/theme.ts @@ -1,4 +1,5 @@ import { create } from 'storybook/theming/create'; + import packageJson from '../package.json' with { type: 'json' }; export default create({ diff --git a/eslint.config.js b/eslint.config.js index ea13b36c..098f475d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,13 +1,14 @@ import { join } from 'node:path'; + +import { includeIgnoreFile } from '@eslint/compat'; +import eslint from '@eslint/js'; +import { defineConfig, globalIgnores } from 'eslint/config'; import configPrettier from 'eslint-config-prettier/flat'; +import pluginImport from 'eslint-plugin-import'; +import pluginJsxA11y from 'eslint-plugin-jsx-a11y'; import pluginReact from 'eslint-plugin-react'; import pluginReactHooks from 'eslint-plugin-react-hooks'; -import eslint from '@eslint/js'; -import pluginJsxA11y from 'eslint-plugin-jsx-a11y'; -import { includeIgnoreFile } from '@eslint/compat'; -import { defineConfig, globalIgnores } from 'eslint/config'; import globals from 'globals'; -import pluginImport from 'eslint-plugin-import'; import pluginTypeScript from 'typescript-eslint'; const rootPath = import.meta.dirname; diff --git a/rollup.config.js b/rollup.config.js index 4611322d..80b9c916 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,11 +1,13 @@ import { dirname, join, relative, resolve } from 'node:path'; + import { DEFAULT_EXTENSIONS as extensions } from '@babel/core'; import { babel } from '@rollup/plugin-babel'; import commonjs from '@rollup/plugin-commonjs'; import { nodeResolve } from '@rollup/plugin-node-resolve'; import typescript from '@rollup/plugin-typescript'; -import preserveDirectives from 'rollup-preserve-directives'; import { defineConfig } from 'rollup'; +import preserveDirectives from 'rollup-preserve-directives'; + import packageJson from './package.json' with { type: 'json' }; import tsBuildConfig from './tsconfig.build.json' with { type: 'json' }; diff --git a/src/components/content-presentation/details/__tests__/Details.test.tsx b/src/components/content-presentation/details/__tests__/Details.test.tsx index 5e558eea..f4169e57 100644 --- a/src/components/content-presentation/details/__tests__/Details.test.tsx +++ b/src/components/content-presentation/details/__tests__/Details.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { Details } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Details', () => { diff --git a/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx b/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx index d8b6502a..3e6697a2 100644 --- a/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx +++ b/src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx @@ -2,10 +2,12 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef } from 'react'; -import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; + import { DoAndDontListContext, type DoAndDontListType } from './DoAndDontListContext.js'; import { DoAndDontListItem } from './components/index.js'; +import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; + export interface DoAndDontListProps extends ComponentPropsWithoutRef<'div'>, Pick { diff --git a/src/components/content-presentation/do-and-dont-list/__tests__/DoAndDontList.test.tsx b/src/components/content-presentation/do-and-dont-list/__tests__/DoAndDontList.test.tsx index f7519b4f..19dd00ab 100644 --- a/src/components/content-presentation/do-and-dont-list/__tests__/DoAndDontList.test.tsx +++ b/src/components/content-presentation/do-and-dont-list/__tests__/DoAndDontList.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { DoAndDontList } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('DoAndDontList', () => { diff --git a/src/components/content-presentation/do-and-dont-list/components/DoAndDontListItem.tsx b/src/components/content-presentation/do-and-dont-list/components/DoAndDontListItem.tsx index bdf5e35b..08fe8065 100644 --- a/src/components/content-presentation/do-and-dont-list/components/DoAndDontListItem.tsx +++ b/src/components/content-presentation/do-and-dont-list/components/DoAndDontListItem.tsx @@ -1,6 +1,7 @@ 'use client'; import { useContext, type ComponentPropsWithoutRef, type FC, type ReactNode } from 'react'; + import { CrossIcon, TickIcon } from '../../icons/index.js'; import { DoAndDontListContext, type DoAndDontListType } from '../DoAndDontListContext.js'; diff --git a/src/components/content-presentation/hero/Hero.tsx b/src/components/content-presentation/hero/Hero.tsx index 69a21843..da016dcd 100644 --- a/src/components/content-presentation/hero/Hero.tsx +++ b/src/components/content-presentation/hero/Hero.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react'; + import { Col, Container, Row } from '#components/layout/index.js'; import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; diff --git a/src/components/content-presentation/hero/__tests__/Hero.test.tsx b/src/components/content-presentation/hero/__tests__/Hero.test.tsx index 39c661c7..8083ceb3 100644 --- a/src/components/content-presentation/hero/__tests__/Hero.test.tsx +++ b/src/components/content-presentation/hero/__tests__/Hero.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { Hero } from '..'; describe('Hero', () => { diff --git a/src/components/content-presentation/icons/__tests__/Icons.test.tsx b/src/components/content-presentation/icons/__tests__/Icons.test.tsx index 41ad773e..9b534804 100644 --- a/src/components/content-presentation/icons/__tests__/Icons.test.tsx +++ b/src/components/content-presentation/icons/__tests__/Icons.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import * as Icons from '..'; describe('Icons', () => { diff --git a/src/components/content-presentation/icons/individual/ArrowLeftIcon.tsx b/src/components/content-presentation/icons/individual/ArrowLeftIcon.tsx index deb0dacf..350316a9 100644 --- a/src/components/content-presentation/icons/individual/ArrowLeftIcon.tsx +++ b/src/components/content-presentation/icons/individual/ArrowLeftIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const ArrowLeftIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/ArrowRightCircleIcon.tsx b/src/components/content-presentation/icons/individual/ArrowRightCircleIcon.tsx index 09453d52..61430c66 100644 --- a/src/components/content-presentation/icons/individual/ArrowRightCircleIcon.tsx +++ b/src/components/content-presentation/icons/individual/ArrowRightCircleIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const ArrowRightCircleIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/ArrowRightIcon.tsx b/src/components/content-presentation/icons/individual/ArrowRightIcon.tsx index 515271de..ed40ae24 100644 --- a/src/components/content-presentation/icons/individual/ArrowRightIcon.tsx +++ b/src/components/content-presentation/icons/individual/ArrowRightIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const ArrowRightIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/ChevronRightCircleIcon.tsx b/src/components/content-presentation/icons/individual/ChevronRightCircleIcon.tsx index 48299f2d..caf3dec4 100644 --- a/src/components/content-presentation/icons/individual/ChevronRightCircleIcon.tsx +++ b/src/components/content-presentation/icons/individual/ChevronRightCircleIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const ChevronRightCircleIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/CrossIcon.tsx b/src/components/content-presentation/icons/individual/CrossIcon.tsx index 2eb4b285..c871d581 100644 --- a/src/components/content-presentation/icons/individual/CrossIcon.tsx +++ b/src/components/content-presentation/icons/individual/CrossIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const CrossIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/SearchIcon.tsx b/src/components/content-presentation/icons/individual/SearchIcon.tsx index 28d66cdb..ab5ac215 100644 --- a/src/components/content-presentation/icons/individual/SearchIcon.tsx +++ b/src/components/content-presentation/icons/individual/SearchIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const SearchIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/TickIcon.tsx b/src/components/content-presentation/icons/individual/TickIcon.tsx index d5072767..55804ff6 100644 --- a/src/components/content-presentation/icons/individual/TickIcon.tsx +++ b/src/components/content-presentation/icons/individual/TickIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const TickIcon: FC = (props) => ( diff --git a/src/components/content-presentation/icons/individual/UserIcon.tsx b/src/components/content-presentation/icons/individual/UserIcon.tsx index 0a6100f3..752fc28e 100644 --- a/src/components/content-presentation/icons/individual/UserIcon.tsx +++ b/src/components/content-presentation/icons/individual/UserIcon.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { Icon, type IconProps } from '../Icon.js'; export const UserIcon: FC = (props) => ( diff --git a/src/components/content-presentation/images/__tests__/Images.test.tsx b/src/components/content-presentation/images/__tests__/Images.test.tsx index 06137534..af659189 100644 --- a/src/components/content-presentation/images/__tests__/Images.test.tsx +++ b/src/components/content-presentation/images/__tests__/Images.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { Images } from '..'; describe('Images', () => { diff --git a/src/components/content-presentation/inset-text/__tests__/InsetText.test.tsx b/src/components/content-presentation/inset-text/__tests__/InsetText.test.tsx index 1e44a5ae..6920e4dc 100644 --- a/src/components/content-presentation/inset-text/__tests__/InsetText.test.tsx +++ b/src/components/content-presentation/inset-text/__tests__/InsetText.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { InsetText } from '..'; describe('InsetText', () => { diff --git a/src/components/content-presentation/notification-banner/NotificationBanner.tsx b/src/components/content-presentation/notification-banner/NotificationBanner.tsx index d035612f..bbcfdbea 100644 --- a/src/components/content-presentation/notification-banner/NotificationBanner.tsx +++ b/src/components/content-presentation/notification-banner/NotificationBanner.tsx @@ -1,5 +1,7 @@ 'use client'; +import classNames from 'classnames'; +import { type NotificationBanner as NotificationBannerModule } from 'nhsuk-frontend'; import { Children, forwardRef, @@ -9,13 +11,13 @@ import { useState, type ComponentPropsWithoutRef, } from 'react'; -import classNames from 'classnames'; + import { NotificationBannerHeading, NotificationBannerLink, NotificationBannerTitle, } from './components/index.js'; -import { type NotificationBanner as NotificationBannerModule } from 'nhsuk-frontend'; + import { childIsOfComponentType } from '#util/types/TypeGuards.js'; export interface NotificationBannerProps extends ComponentPropsWithoutRef<'div'> { diff --git a/src/components/content-presentation/notification-banner/__tests__/NotificationBanner.test.tsx b/src/components/content-presentation/notification-banner/__tests__/NotificationBanner.test.tsx index 537c5d08..42dc305b 100644 --- a/src/components/content-presentation/notification-banner/__tests__/NotificationBanner.test.tsx +++ b/src/components/content-presentation/notification-banner/__tests__/NotificationBanner.test.tsx @@ -1,7 +1,8 @@ -import { renderClient, renderServer } from '#util/components'; -import { NotificationBanner } from '#components/content-presentation/notification-banner'; import { createRef } from 'react'; + +import { NotificationBanner } from '#components/content-presentation/notification-banner'; import { NotificationBannerLink } from '#components/content-presentation/notification-banner/components'; +import { renderClient, renderServer } from '#util/components'; describe('NotificationBanner', () => { it('matches snapshot', async () => { diff --git a/src/components/content-presentation/notification-banner/components/NotificationBannerHeading.tsx b/src/components/content-presentation/notification-banner/components/NotificationBannerHeading.tsx index a8a30a3b..e2cb59ca 100644 --- a/src/components/content-presentation/notification-banner/components/NotificationBannerHeading.tsx +++ b/src/components/content-presentation/notification-banner/components/NotificationBannerHeading.tsx @@ -1,8 +1,9 @@ 'use client'; -import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; import type { FC } from 'react'; +import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; + export type NotificationBannerHeadingProps = HeadingLevelProps; export const NotificationBannerHeading: FC = ({ diff --git a/src/components/content-presentation/notification-banner/components/NotificationBannerLink.tsx b/src/components/content-presentation/notification-banner/components/NotificationBannerLink.tsx index bc145aac..b94fd897 100644 --- a/src/components/content-presentation/notification-banner/components/NotificationBannerLink.tsx +++ b/src/components/content-presentation/notification-banner/components/NotificationBannerLink.tsx @@ -1,6 +1,7 @@ -import type { AsElementLink } from '#util/types/index.js'; -import { forwardRef } from 'react'; import classNames from 'classnames'; +import { forwardRef } from 'react'; + +import type { AsElementLink } from '#util/types/index.js'; export type NotificationBannerLinkProps = AsElementLink; diff --git a/src/components/content-presentation/notification-banner/components/NotificationBannerTitle.tsx b/src/components/content-presentation/notification-banner/components/NotificationBannerTitle.tsx index 7cf033d5..7118d4b4 100644 --- a/src/components/content-presentation/notification-banner/components/NotificationBannerTitle.tsx +++ b/src/components/content-presentation/notification-banner/components/NotificationBannerTitle.tsx @@ -1,6 +1,7 @@ -import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; import type { FC } from 'react'; +import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; + export interface NotificationBannerTitleProps extends HeadingLevelProps { success?: boolean; } diff --git a/src/components/content-presentation/panel/Panel.tsx b/src/components/content-presentation/panel/Panel.tsx index 0bc49de5..da44261a 100644 --- a/src/components/content-presentation/panel/Panel.tsx +++ b/src/components/content-presentation/panel/Panel.tsx @@ -1,8 +1,10 @@ import classNames from 'classnames'; import { Children, forwardRef, type ComponentPropsWithoutRef } from 'react'; -import { childIsOfComponentType } from '#util/types/TypeGuards.js'; + import { PanelTitle } from './components/index.js'; +import { childIsOfComponentType } from '#util/types/TypeGuards.js'; + export type PanelProps = ComponentPropsWithoutRef<'div'>; const PanelComponent = forwardRef( diff --git a/src/components/content-presentation/panel/__tests__/Panel.test.tsx b/src/components/content-presentation/panel/__tests__/Panel.test.tsx index 1cfde1a6..2ecdd460 100644 --- a/src/components/content-presentation/panel/__tests__/Panel.test.tsx +++ b/src/components/content-presentation/panel/__tests__/Panel.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { Panel, type PanelTitleProps } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Panel', () => { diff --git a/src/components/content-presentation/panel/components/PanelTitle.tsx b/src/components/content-presentation/panel/components/PanelTitle.tsx index a24263eb..71f6c685 100644 --- a/src/components/content-presentation/panel/components/PanelTitle.tsx +++ b/src/components/content-presentation/panel/components/PanelTitle.tsx @@ -1,4 +1,5 @@ import { type FC } from 'react'; + import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; export type PanelTitleProps = HeadingLevelProps; diff --git a/src/components/content-presentation/summary-list/__tests__/SummaryList.test.tsx b/src/components/content-presentation/summary-list/__tests__/SummaryList.test.tsx index a34c39b4..02398c01 100644 --- a/src/components/content-presentation/summary-list/__tests__/SummaryList.test.tsx +++ b/src/components/content-presentation/summary-list/__tests__/SummaryList.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { SummaryList } from '..'; describe('SummaryList', () => { diff --git a/src/components/content-presentation/table/Table.tsx b/src/components/content-presentation/table/Table.tsx index 07bad0ae..85abd85d 100644 --- a/src/components/content-presentation/table/Table.tsx +++ b/src/components/content-presentation/table/Table.tsx @@ -8,6 +8,8 @@ import { type ComponentPropsWithoutRef, type ReactNode, } from 'react'; + +import { TableContext, type ITableContext } from './TableContext.js'; import { TableBody, TableCaption, @@ -18,7 +20,6 @@ import { TableRow, type TableCaptionProps, } from './components/index.js'; -import { TableContext, type ITableContext } from './TableContext.js'; export interface TableProps extends ComponentPropsWithoutRef<'table'> { firstCellIsHeader?: boolean; diff --git a/src/components/content-presentation/table/TableHelpers.ts b/src/components/content-presentation/table/TableHelpers.ts index 6ce79057..374ec17e 100644 --- a/src/components/content-presentation/table/TableHelpers.ts +++ b/src/components/content-presentation/table/TableHelpers.ts @@ -1,5 +1,7 @@ import { Children, type ReactElement, type ReactNode } from 'react'; + import { TableCell, type TableCellProps } from './components/TableCell.js'; + import { childIsOfComponentType } from '#util/types/TypeGuards.js'; export const isTableCell = ( diff --git a/src/components/content-presentation/table/components/TableBody.tsx b/src/components/content-presentation/table/components/TableBody.tsx index ae16155d..d444bb7b 100644 --- a/src/components/content-presentation/table/components/TableBody.tsx +++ b/src/components/content-presentation/table/components/TableBody.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { TableSection, TableSectionContext } from '../TableSectionContext.js'; export type TableBodyProps = ComponentPropsWithoutRef<'tbody'>; diff --git a/src/components/content-presentation/table/components/TableCaption.tsx b/src/components/content-presentation/table/components/TableCaption.tsx index b5949cd7..b0c2928f 100644 --- a/src/components/content-presentation/table/components/TableCaption.tsx +++ b/src/components/content-presentation/table/components/TableCaption.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { type NHSUKSize } from '#util/types/NHSUKTypes.js'; export interface TableCaptionProps extends ComponentPropsWithoutRef<'caption'> { diff --git a/src/components/content-presentation/table/components/TableCell.tsx b/src/components/content-presentation/table/components/TableCell.tsx index 07288afc..29545ca6 100644 --- a/src/components/content-presentation/table/components/TableCell.tsx +++ b/src/components/content-presentation/table/components/TableCell.tsx @@ -2,8 +2,10 @@ import classNames from 'classnames'; import { useContext, type ComponentPropsWithoutRef, type FC } from 'react'; + import { TableContext, type ITableContext } from '../TableContext.js'; import { TableSection, TableSectionContext } from '../TableSectionContext.js'; + import { useDevWarning } from '#util/hooks/index.js'; const CellOutsideOfSectionWarning = diff --git a/src/components/content-presentation/table/components/TableHead.tsx b/src/components/content-presentation/table/components/TableHead.tsx index cc5b7d21..fc178387 100644 --- a/src/components/content-presentation/table/components/TableHead.tsx +++ b/src/components/content-presentation/table/components/TableHead.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import { useContext, type ComponentPropsWithoutRef, type FC } from 'react'; + import { TableContext, type ITableContext } from '../TableContext.js'; import { TableSection, TableSectionContext } from '../TableSectionContext.js'; diff --git a/src/components/content-presentation/table/components/TablePanel.tsx b/src/components/content-presentation/table/components/TablePanel.tsx index 2f9eb3e6..9067ab4b 100644 --- a/src/components/content-presentation/table/components/TablePanel.tsx +++ b/src/components/content-presentation/table/components/TablePanel.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; export interface TablePanelProps extends ComponentPropsWithoutRef<'div'> { diff --git a/src/components/content-presentation/table/components/TableRow.tsx b/src/components/content-presentation/table/components/TableRow.tsx index 027b30c4..6350e943 100644 --- a/src/components/content-presentation/table/components/TableRow.tsx +++ b/src/components/content-presentation/table/components/TableRow.tsx @@ -9,9 +9,10 @@ import { type ComponentPropsWithoutRef, type FC, } from 'react'; + import { TableContext } from '../TableContext.js'; -import { TableSection, TableSectionContext } from '../TableSectionContext.js'; import { getHeadingsFromChildren, isTableCell } from '../TableHelpers.js'; +import { TableSection, TableSectionContext } from '../TableSectionContext.js'; export const TableRow: FC> = ({ children, className, ...rest }) => { const section = useContext(TableSectionContext); diff --git a/src/components/content-presentation/table/components/__tests__/Table.test.tsx b/src/components/content-presentation/table/components/__tests__/Table.test.tsx index 3fe50890..a31cf264 100644 --- a/src/components/content-presentation/table/components/__tests__/Table.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/Table.test.tsx @@ -1,5 +1,7 @@ import { createRef } from 'react'; + import { Table } from '../..'; + import { renderClient, renderServer } from '#util/components'; describe('Table', () => { diff --git a/src/components/content-presentation/table/components/__tests__/TableBody.test.tsx b/src/components/content-presentation/table/components/__tests__/TableBody.test.tsx index 90fe2042..cfcd03ad 100644 --- a/src/components/content-presentation/table/components/__tests__/TableBody.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TableBody.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { TableBody } from '..'; import { Table, TableSection, TableSectionContext } from '../..'; diff --git a/src/components/content-presentation/table/components/__tests__/TableCaption.test.tsx b/src/components/content-presentation/table/components/__tests__/TableCaption.test.tsx index 99d64b40..5230ce90 100644 --- a/src/components/content-presentation/table/components/__tests__/TableCaption.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TableCaption.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; + import { TableCaption } from '..'; import { Table } from '../..'; + import { type NHSUKSize } from '#util/types/NHSUKTypes'; describe('TableCaption', () => { diff --git a/src/components/content-presentation/table/components/__tests__/TableCell.test.tsx b/src/components/content-presentation/table/components/__tests__/TableCell.test.tsx index 5a9c101b..b4978b59 100644 --- a/src/components/content-presentation/table/components/__tests__/TableCell.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TableCell.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { Table } from '../..'; describe('Table.Cell', () => { diff --git a/src/components/content-presentation/table/components/__tests__/TableContainer.test.tsx b/src/components/content-presentation/table/components/__tests__/TableContainer.test.tsx index 88e80167..229ff71d 100644 --- a/src/components/content-presentation/table/components/__tests__/TableContainer.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TableContainer.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { TableContainer } from '..'; describe('TableContainer', () => { diff --git a/src/components/content-presentation/table/components/__tests__/TableHead.test.tsx b/src/components/content-presentation/table/components/__tests__/TableHead.test.tsx index 5897dfc8..10e9adc5 100644 --- a/src/components/content-presentation/table/components/__tests__/TableHead.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TableHead.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { TableHead } from '..'; import { Table, TableSection, TableSectionContext } from '../..'; diff --git a/src/components/content-presentation/table/components/__tests__/TablePanel.test.tsx b/src/components/content-presentation/table/components/__tests__/TablePanel.test.tsx index b8dbd79f..79976362 100644 --- a/src/components/content-presentation/table/components/__tests__/TablePanel.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TablePanel.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { TablePanel } from '..'; describe('Table.Panel', () => { diff --git a/src/components/content-presentation/table/components/__tests__/TableRow.test.tsx b/src/components/content-presentation/table/components/__tests__/TableRow.test.tsx index 466501fd..2cddf918 100644 --- a/src/components/content-presentation/table/components/__tests__/TableRow.test.tsx +++ b/src/components/content-presentation/table/components/__tests__/TableRow.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { TableCell, TableRow } from '..'; import { TableContext, TableSection, TableSectionContext, type ITableContext } from '../..'; diff --git a/src/components/content-presentation/tabs/Tabs.tsx b/src/components/content-presentation/tabs/Tabs.tsx index e31c07b0..5785f278 100644 --- a/src/components/content-presentation/tabs/Tabs.tsx +++ b/src/components/content-presentation/tabs/Tabs.tsx @@ -11,6 +11,7 @@ import { type ComponentPropsWithoutRef, type FC, } from 'react'; + import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; export type TabsProps = ComponentPropsWithoutRef<'div'>; diff --git a/src/components/content-presentation/tabs/__tests__/Tabs.test.tsx b/src/components/content-presentation/tabs/__tests__/Tabs.test.tsx index 597a1cda..5acf710a 100644 --- a/src/components/content-presentation/tabs/__tests__/Tabs.test.tsx +++ b/src/components/content-presentation/tabs/__tests__/Tabs.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { Tabs, type TabsTitleProps } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Tabs', () => { diff --git a/src/components/content-presentation/tag/__tests__/Tag.test.tsx b/src/components/content-presentation/tag/__tests__/Tag.test.tsx index 2cf77408..26d2b1c8 100644 --- a/src/components/content-presentation/tag/__tests__/Tag.test.tsx +++ b/src/components/content-presentation/tag/__tests__/Tag.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { type ComponentPropsWithoutRef } from 'react'; + import { Tag } from '..'; describe('Tag', () => { diff --git a/src/components/content-presentation/warning-callout/WarningCallout.tsx b/src/components/content-presentation/warning-callout/WarningCallout.tsx index c3db83ea..24cdaa6a 100644 --- a/src/components/content-presentation/warning-callout/WarningCallout.tsx +++ b/src/components/content-presentation/warning-callout/WarningCallout.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react'; + import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; export const WarningCalloutHeading: FC = ({ children, className, ...rest }) => ( diff --git a/src/components/content-presentation/warning-callout/__tests__/WarningCallout.test.tsx b/src/components/content-presentation/warning-callout/__tests__/WarningCallout.test.tsx index 1edee5f1..adcec286 100644 --- a/src/components/content-presentation/warning-callout/__tests__/WarningCallout.test.tsx +++ b/src/components/content-presentation/warning-callout/__tests__/WarningCallout.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { WarningCallout } from '..'; describe('WarningCallout', () => { diff --git a/src/components/form-elements/button/Button.tsx b/src/components/form-elements/button/Button.tsx index aaf86184..0d03b9c5 100644 --- a/src/components/form-elements/button/Button.tsx +++ b/src/components/form-elements/button/Button.tsx @@ -11,6 +11,7 @@ import { type ForwardedRef, type MouseEvent, } from 'react'; + import { type AsElementLink } from '#util/types/LinkTypes.js'; export interface ButtonProps extends AsElementLink { diff --git a/src/components/form-elements/button/__tests__/Button.test.tsx b/src/components/form-elements/button/__tests__/Button.test.tsx index 202c3508..e529b6cc 100644 --- a/src/components/form-elements/button/__tests__/Button.test.tsx +++ b/src/components/form-elements/button/__tests__/Button.test.tsx @@ -1,5 +1,7 @@ import { createRef, forwardRef, type ComponentProps, type Ref } from 'react'; + import { Button } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Button', () => { diff --git a/src/components/form-elements/character-count/CharacterCount.tsx b/src/components/form-elements/character-count/CharacterCount.tsx index c939fe64..dc1ec21b 100644 --- a/src/components/form-elements/character-count/CharacterCount.tsx +++ b/src/components/form-elements/character-count/CharacterCount.tsx @@ -10,6 +10,7 @@ import { useState, type ComponentPropsWithoutRef, } from 'react'; + import { FormGroup } from '#components/utils/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/character-count/__tests__/CharacterCount.test.tsx b/src/components/form-elements/character-count/__tests__/CharacterCount.test.tsx index 7241b6c0..cb4d8221 100644 --- a/src/components/form-elements/character-count/__tests__/CharacterCount.test.tsx +++ b/src/components/form-elements/character-count/__tests__/CharacterCount.test.tsx @@ -1,5 +1,7 @@ import { createRef } from 'react'; + import { CharacterCount } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Character Count', () => { diff --git a/src/components/form-elements/checkboxes/Checkboxes.tsx b/src/components/form-elements/checkboxes/Checkboxes.tsx index ff1527b3..d6198074 100644 --- a/src/components/form-elements/checkboxes/Checkboxes.tsx +++ b/src/components/form-elements/checkboxes/Checkboxes.tsx @@ -10,8 +10,10 @@ import { useState, type ComponentPropsWithoutRef, } from 'react'; -import { CheckboxesDivider, CheckboxesItem } from './components/index.js'; + import { CheckboxesContext, type ICheckboxesContext } from './CheckboxesContext.js'; +import { CheckboxesDivider, CheckboxesItem } from './components/index.js'; + import { FormGroup } from '#components/utils/index.js'; import { generateRandomName } from '#util/tools/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/checkboxes/__tests__/Checkboxes.test.tsx b/src/components/form-elements/checkboxes/__tests__/Checkboxes.test.tsx index 0bd8d373..3306460a 100644 --- a/src/components/form-elements/checkboxes/__tests__/Checkboxes.test.tsx +++ b/src/components/form-elements/checkboxes/__tests__/Checkboxes.test.tsx @@ -1,5 +1,7 @@ import { createRef } from 'react'; + import { Checkboxes } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Checkboxes', () => { diff --git a/src/components/form-elements/checkboxes/components/CheckboxesItem.tsx b/src/components/form-elements/checkboxes/components/CheckboxesItem.tsx index 10e4a06a..97407bba 100644 --- a/src/components/form-elements/checkboxes/components/CheckboxesItem.tsx +++ b/src/components/form-elements/checkboxes/components/CheckboxesItem.tsx @@ -10,7 +10,9 @@ import { type ComponentPropsWithoutRef, type ReactNode, } from 'react'; + import { CheckboxesContext, type ICheckboxesContext } from '../CheckboxesContext.js'; + import { HintText } from '#components/form-elements/hint-text/index.js'; import { Label } from '#components/form-elements/label/index.js'; import { type ComponentPropsWithDataAttributes, type FormElementProps } from '#util/types/index.js'; diff --git a/src/components/form-elements/date-input/DateInput.tsx b/src/components/form-elements/date-input/DateInput.tsx index cf1b6f9c..5a37b282 100644 --- a/src/components/form-elements/date-input/DateInput.tsx +++ b/src/components/form-elements/date-input/DateInput.tsx @@ -10,8 +10,10 @@ import { type ComponentPropsWithoutRef, type EventHandler, } from 'react'; -import { DateInputDay, DateInputMonth, DateInputYear } from './components/index.js'; + import { DateInputContext, type IDateInputContext } from './DateInputContext.js'; +import { DateInputDay, DateInputMonth, DateInputYear } from './components/index.js'; + import { FormGroup } from '#components/utils/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/date-input/__tests__/DateInput.test.tsx b/src/components/form-elements/date-input/__tests__/DateInput.test.tsx index 729d64ce..60b32365 100644 --- a/src/components/form-elements/date-input/__tests__/DateInput.test.tsx +++ b/src/components/form-elements/date-input/__tests__/DateInput.test.tsx @@ -1,6 +1,8 @@ import { fireEvent } from '@testing-library/react'; import { createRef } from 'react'; + import { DateInput, type DateInputChangeEvent } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('DateInput', () => { diff --git a/src/components/form-elements/date-input/components/DateInputField.tsx b/src/components/form-elements/date-input/components/DateInputField.tsx index 2d71e2c0..a4b4f5da 100644 --- a/src/components/form-elements/date-input/components/DateInputField.tsx +++ b/src/components/form-elements/date-input/components/DateInputField.tsx @@ -2,7 +2,9 @@ import classNames from 'classnames'; import { forwardRef, useContext, type ChangeEvent, type ComponentPropsWithoutRef } from 'react'; + import { DateInputContext, type IDateInputContext } from '../DateInputContext.js'; + import { Label } from '#components/form-elements/label/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/error-message/__tests__/ErrorMessage.test.tsx b/src/components/form-elements/error-message/__tests__/ErrorMessage.test.tsx index c4fa106c..bae0afe4 100644 --- a/src/components/form-elements/error-message/__tests__/ErrorMessage.test.tsx +++ b/src/components/form-elements/error-message/__tests__/ErrorMessage.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { ErrorMessage } from '..'; describe('ErrorMessage', () => { diff --git a/src/components/form-elements/error-summary/ErrorSummary.tsx b/src/components/form-elements/error-summary/ErrorSummary.tsx index f077ff96..7030689f 100644 --- a/src/components/form-elements/error-summary/ErrorSummary.tsx +++ b/src/components/form-elements/error-summary/ErrorSummary.tsx @@ -11,9 +11,11 @@ import { useState, type ComponentPropsWithoutRef, } from 'react'; -import { childIsOfComponentType } from '#util/types/TypeGuards.js'; + import { ErrorSummaryList, ErrorSummaryListItem, ErrorSummaryTitle } from './components/index.js'; +import { childIsOfComponentType } from '#util/types/TypeGuards.js'; + export interface ErrorSummaryProps extends ComponentPropsWithoutRef<'div'> { disableAutoFocus?: boolean; } diff --git a/src/components/form-elements/error-summary/__tests__/ErrorSummary.test.tsx b/src/components/form-elements/error-summary/__tests__/ErrorSummary.test.tsx index 9525c2be..221be9a0 100644 --- a/src/components/form-elements/error-summary/__tests__/ErrorSummary.test.tsx +++ b/src/components/form-elements/error-summary/__tests__/ErrorSummary.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { ErrorSummary } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('ErrorSummary', () => { diff --git a/src/components/form-elements/fieldset/Fieldset.tsx b/src/components/form-elements/fieldset/Fieldset.tsx index ee23b7e1..df29978d 100644 --- a/src/components/form-elements/fieldset/Fieldset.tsx +++ b/src/components/form-elements/fieldset/Fieldset.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { Legend } from '#components/form-elements/legend/index.js'; export type FieldsetProps = ComponentPropsWithoutRef<'fieldset'>; diff --git a/src/components/form-elements/fieldset/__tests__/Fieldset.test.tsx b/src/components/form-elements/fieldset/__tests__/Fieldset.test.tsx index e12ef428..5af88014 100644 --- a/src/components/form-elements/fieldset/__tests__/Fieldset.test.tsx +++ b/src/components/form-elements/fieldset/__tests__/Fieldset.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { Fieldset } from '..'; import { TextInput } from '../..'; diff --git a/src/components/form-elements/form/Form.tsx b/src/components/form-elements/form/Form.tsx index 4ca40d32..ee475ced 100644 --- a/src/components/form-elements/form/Form.tsx +++ b/src/components/form-elements/form/Form.tsx @@ -1,6 +1,7 @@ 'use client'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { FormContext } from './FormContext.js'; export type FormProps = ComponentPropsWithoutRef<'form'> & { diff --git a/src/components/form-elements/hint-text/__tests__/Hint.test.tsx b/src/components/form-elements/hint-text/__tests__/Hint.test.tsx index e58b3a62..3c110e3b 100644 --- a/src/components/form-elements/hint-text/__tests__/Hint.test.tsx +++ b/src/components/form-elements/hint-text/__tests__/Hint.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { HintText } from '..'; describe('Hint', () => { diff --git a/src/components/form-elements/label/Label.tsx b/src/components/form-elements/label/Label.tsx index 13b0c242..12b6a23e 100644 --- a/src/components/form-elements/label/Label.tsx +++ b/src/components/form-elements/label/Label.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { type NHSUKSize } from '#util/types/NHSUKTypes.js'; export interface LabelProps extends ComponentPropsWithoutRef<'label'> { diff --git a/src/components/form-elements/label/__tests__/Label.test.tsx b/src/components/form-elements/label/__tests__/Label.test.tsx index de1ed486..baee8c9a 100644 --- a/src/components/form-elements/label/__tests__/Label.test.tsx +++ b/src/components/form-elements/label/__tests__/Label.test.tsx @@ -1,5 +1,7 @@ import { render } from '@testing-library/react'; + import { Label } from '..'; + import { type NHSUKSize } from '#util/types'; describe('Label', () => { diff --git a/src/components/form-elements/legend/Legend.tsx b/src/components/form-elements/legend/Legend.tsx index 448fc384..0d303b7a 100644 --- a/src/components/form-elements/legend/Legend.tsx +++ b/src/components/form-elements/legend/Legend.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; import { type NHSUKSize } from '#util/types/NHSUKTypes.js'; diff --git a/src/components/form-elements/legend/__tests__/Legend.test.tsx b/src/components/form-elements/legend/__tests__/Legend.test.tsx index 0b6bd5f9..2cc8b59e 100644 --- a/src/components/form-elements/legend/__tests__/Legend.test.tsx +++ b/src/components/form-elements/legend/__tests__/Legend.test.tsx @@ -1,5 +1,7 @@ import { render } from '@testing-library/react'; + import { Legend } from '..'; + import { type NHSUKSize } from '#util/types/NHSUKTypes'; describe('Legend', () => { diff --git a/src/components/form-elements/radios/Radios.tsx b/src/components/form-elements/radios/Radios.tsx index c4d6db6d..c302c3c9 100644 --- a/src/components/form-elements/radios/Radios.tsx +++ b/src/components/form-elements/radios/Radios.tsx @@ -10,8 +10,10 @@ import { useState, type ComponentPropsWithoutRef, } from 'react'; -import { RadiosDivider, RadiosItem } from './components/index.js'; + import { RadiosContext, type IRadiosContext } from './RadiosContext.js'; +import { RadiosDivider, RadiosItem } from './components/index.js'; + import { FormGroup } from '#components/utils/index.js'; import { generateRandomName } from '#util/tools/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/radios/__tests__/Radios.test.tsx b/src/components/form-elements/radios/__tests__/Radios.test.tsx index 66971e41..85630bbc 100644 --- a/src/components/form-elements/radios/__tests__/Radios.test.tsx +++ b/src/components/form-elements/radios/__tests__/Radios.test.tsx @@ -1,5 +1,7 @@ import { createRef } from 'react'; + import { Radios } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Radios', () => { diff --git a/src/components/form-elements/radios/components/RadiosItem.tsx b/src/components/form-elements/radios/components/RadiosItem.tsx index 5c7a3fbc..7e2fb8e8 100644 --- a/src/components/form-elements/radios/components/RadiosItem.tsx +++ b/src/components/form-elements/radios/components/RadiosItem.tsx @@ -10,7 +10,9 @@ import { type ComponentPropsWithoutRef, type ReactNode, } from 'react'; + import { RadiosContext, type IRadiosContext } from '../RadiosContext.js'; + import { HintText } from '#components/form-elements/hint-text/index.js'; import { Label } from '#components/form-elements/label/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/select/Select.tsx b/src/components/form-elements/select/Select.tsx index 25c91ed1..dbd47b53 100644 --- a/src/components/form-elements/select/Select.tsx +++ b/src/components/form-elements/select/Select.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef } from 'react'; + import { FormGroup } from '#components/utils/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/select/__tests__/Select.test.tsx b/src/components/form-elements/select/__tests__/Select.test.tsx index b439b40c..603143e5 100644 --- a/src/components/form-elements/select/__tests__/Select.test.tsx +++ b/src/components/form-elements/select/__tests__/Select.test.tsx @@ -1,5 +1,7 @@ import { createRef } from 'react'; + import { Select } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Select', () => { diff --git a/src/components/form-elements/text-input/TextInput.tsx b/src/components/form-elements/text-input/TextInput.tsx index 6e0034a1..cac33660 100644 --- a/src/components/form-elements/text-input/TextInput.tsx +++ b/src/components/form-elements/text-input/TextInput.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react'; + import { FormGroup } from '#components/utils/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; import { type InputWidth } from '#util/types/NHSUKTypes.js'; diff --git a/src/components/form-elements/text-input/__tests__/TextInput.test.tsx b/src/components/form-elements/text-input/__tests__/TextInput.test.tsx index 2ee64924..373dff48 100644 --- a/src/components/form-elements/text-input/__tests__/TextInput.test.tsx +++ b/src/components/form-elements/text-input/__tests__/TextInput.test.tsx @@ -1,6 +1,8 @@ import { render } from '@testing-library/react'; import { createRef } from 'react'; + import { TextInput } from '..'; + import { renderClient, renderServer } from '#util/components'; import { type InputWidth } from '#util/types'; diff --git a/src/components/form-elements/textarea/Textarea.tsx b/src/components/form-elements/textarea/Textarea.tsx index 9228fd08..1a47453c 100644 --- a/src/components/form-elements/textarea/Textarea.tsx +++ b/src/components/form-elements/textarea/Textarea.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef } from 'react'; + import { FormGroup } from '#components/utils/index.js'; import { type FormElementProps } from '#util/types/FormTypes.js'; diff --git a/src/components/form-elements/textarea/__tests__/Textarea.test.tsx b/src/components/form-elements/textarea/__tests__/Textarea.test.tsx index 1f21979e..978302fc 100644 --- a/src/components/form-elements/textarea/__tests__/Textarea.test.tsx +++ b/src/components/form-elements/textarea/__tests__/Textarea.test.tsx @@ -1,5 +1,7 @@ import { createRef } from 'react'; + import { Textarea } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Textarea', () => { diff --git a/src/components/layout/Col.tsx b/src/components/layout/Col.tsx index 0c99af31..066e41c4 100644 --- a/src/components/layout/Col.tsx +++ b/src/components/layout/Col.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { type ColWidth } from '#util/types/index.js'; export interface ColProps extends ComponentPropsWithoutRef<'div'> { diff --git a/src/components/layout/__tests__/Col.test.tsx b/src/components/layout/__tests__/Col.test.tsx index caa4fb94..0730319c 100644 --- a/src/components/layout/__tests__/Col.test.tsx +++ b/src/components/layout/__tests__/Col.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { Col } from '..'; describe('Col', () => { diff --git a/src/components/layout/__tests__/Container.test.tsx b/src/components/layout/__tests__/Container.test.tsx index e58f033b..1f87a4df 100644 --- a/src/components/layout/__tests__/Container.test.tsx +++ b/src/components/layout/__tests__/Container.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { Container } from '..'; describe('Container', () => { diff --git a/src/components/layout/__tests__/Row.test.tsx b/src/components/layout/__tests__/Row.test.tsx index 1a8a5273..e2002e3b 100644 --- a/src/components/layout/__tests__/Row.test.tsx +++ b/src/components/layout/__tests__/Row.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { Row } from '..'; describe('Row', () => { diff --git a/src/components/navigation/action-link/ActionLink.tsx b/src/components/navigation/action-link/ActionLink.tsx index 71107cb3..306f6470 100644 --- a/src/components/navigation/action-link/ActionLink.tsx +++ b/src/components/navigation/action-link/ActionLink.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; + import { ArrowRightCircleIcon } from '#components/content-presentation/index.js'; import { type AsElementLink } from '#util/types/LinkTypes.js'; diff --git a/src/components/navigation/action-link/__tests__/ActionLink.test.tsx b/src/components/navigation/action-link/__tests__/ActionLink.test.tsx index b70465ba..3aa980a4 100644 --- a/src/components/navigation/action-link/__tests__/ActionLink.test.tsx +++ b/src/components/navigation/action-link/__tests__/ActionLink.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef, type ComponentProps } from 'react'; + import { ActionLink } from '..'; describe('ActionLink', () => { diff --git a/src/components/navigation/back-link/BackLink.tsx b/src/components/navigation/back-link/BackLink.tsx index fa1511f0..8c9f77dd 100644 --- a/src/components/navigation/back-link/BackLink.tsx +++ b/src/components/navigation/back-link/BackLink.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; + import { type AsElementLink } from '#util/types/LinkTypes.js'; export type BackLinkProps = AsElementLink; diff --git a/src/components/navigation/back-link/__tests__/BackLink.test.tsx b/src/components/navigation/back-link/__tests__/BackLink.test.tsx index 41291b2f..2373a405 100644 --- a/src/components/navigation/back-link/__tests__/BackLink.test.tsx +++ b/src/components/navigation/back-link/__tests__/BackLink.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef, type ComponentProps } from 'react'; + import { BackLink } from '..'; describe('BackLink', () => { diff --git a/src/components/navigation/breadcrumb/Breadcrumb.tsx b/src/components/navigation/breadcrumb/Breadcrumb.tsx index 21a5c9e6..d05ac575 100644 --- a/src/components/navigation/breadcrumb/Breadcrumb.tsx +++ b/src/components/navigation/breadcrumb/Breadcrumb.tsx @@ -1,8 +1,10 @@ import classNames from 'classnames'; import { Children, forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react'; -import { childIsOfComponentType } from '#util/types/index.js'; + import { BreadcrumbBack, BreadcrumbItem } from './components/index.js'; +import { childIsOfComponentType } from '#util/types/index.js'; + export type BreadcrumbProps = ComponentPropsWithoutRef<'nav'>; const BreadcrumbComponent = forwardRef((props, forwardedRef) => { diff --git a/src/components/navigation/breadcrumb/__tests__/Breadcrumb.test.tsx b/src/components/navigation/breadcrumb/__tests__/Breadcrumb.test.tsx index 8d37f8e2..4ab72f2c 100644 --- a/src/components/navigation/breadcrumb/__tests__/Breadcrumb.test.tsx +++ b/src/components/navigation/breadcrumb/__tests__/Breadcrumb.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef, type ComponentProps } from 'react'; + import { Breadcrumb } from '..'; describe('Breadcrumb', () => { diff --git a/src/components/navigation/breadcrumb/components/BreadcrumbBack.tsx b/src/components/navigation/breadcrumb/components/BreadcrumbBack.tsx index 9417dc53..8fb8c5fc 100644 --- a/src/components/navigation/breadcrumb/components/BreadcrumbBack.tsx +++ b/src/components/navigation/breadcrumb/components/BreadcrumbBack.tsx @@ -1,7 +1,7 @@ import { forwardRef } from 'react'; -import { type AsElementLink } from '#util/types/index.js'; import { BackLink } from '#components/navigation/back-link/index.js'; +import { type AsElementLink } from '#util/types/index.js'; export type BreadcrumbBackProps = AsElementLink; diff --git a/src/components/navigation/breadcrumb/components/BreadcrumbItem.tsx b/src/components/navigation/breadcrumb/components/BreadcrumbItem.tsx index 024276fd..79595410 100644 --- a/src/components/navigation/breadcrumb/components/BreadcrumbItem.tsx +++ b/src/components/navigation/breadcrumb/components/BreadcrumbItem.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; + import { type AsElementLink } from '#util/types/index.js'; export type BreadcrumbItemProps = AsElementLink; diff --git a/src/components/navigation/card/Card.tsx b/src/components/navigation/card/Card.tsx index c57ee208..c337a555 100644 --- a/src/components/navigation/card/Card.tsx +++ b/src/components/navigation/card/Card.tsx @@ -2,6 +2,8 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef } from 'react'; + +import { CardContext } from './CardContext.js'; import { CardContent, CardDescription, @@ -11,7 +13,7 @@ import { CardImage, CardLink, } from './components/index.js'; -import { CardContext } from './CardContext.js'; + import { cardTypeIsCareCard, type CardType } from '#util/types/index.js'; export interface CardProps extends ComponentPropsWithoutRef<'div'> { diff --git a/src/components/navigation/card/CardContext.ts b/src/components/navigation/card/CardContext.ts index 17caf2e3..1af685a2 100644 --- a/src/components/navigation/card/CardContext.ts +++ b/src/components/navigation/card/CardContext.ts @@ -1,6 +1,7 @@ 'use client'; import { createContext } from 'react'; + import { type CardType } from '#util/types/index.js'; export interface ICardContext { diff --git a/src/components/navigation/card/__tests__/Card.test.tsx b/src/components/navigation/card/__tests__/Card.test.tsx index 73611559..ce5c815a 100644 --- a/src/components/navigation/card/__tests__/Card.test.tsx +++ b/src/components/navigation/card/__tests__/Card.test.tsx @@ -1,6 +1,8 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { render } from '@testing-library/react'; + import { Card } from '..'; + import { renderClient, renderServer } from '#util/components'; import { type CardType } from '#util/types'; diff --git a/src/components/navigation/card/components/CardContent.tsx b/src/components/navigation/card/components/CardContent.tsx index 9332921f..e0e9d1c6 100644 --- a/src/components/navigation/card/components/CardContent.tsx +++ b/src/components/navigation/card/components/CardContent.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import { forwardRef, useContext, type ComponentPropsWithoutRef } from 'react'; + import { CardContext } from '../CardContext.js'; export type CardContentProps = ComponentPropsWithoutRef<'div'>; diff --git a/src/components/navigation/card/components/CardGroup.tsx b/src/components/navigation/card/components/CardGroup.tsx index 196d31fd..c1cf90de 100644 --- a/src/components/navigation/card/components/CardGroup.tsx +++ b/src/components/navigation/card/components/CardGroup.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { Row } from '#components/layout/index.js'; export const CardGroup: FC> = ({ className, ...rest }) => ( diff --git a/src/components/navigation/card/components/CardGroupItem.tsx b/src/components/navigation/card/components/CardGroupItem.tsx index 007be266..5f3b73c5 100644 --- a/src/components/navigation/card/components/CardGroupItem.tsx +++ b/src/components/navigation/card/components/CardGroupItem.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type FC } from 'react'; + import { Col, type ColProps } from '#components/layout/index.js'; export const CardGroupItem: FC = ({ className, ...rest }) => ( diff --git a/src/components/navigation/card/components/CardHeading.tsx b/src/components/navigation/card/components/CardHeading.tsx index 93fd49a0..9646fc11 100644 --- a/src/components/navigation/card/components/CardHeading.tsx +++ b/src/components/navigation/card/components/CardHeading.tsx @@ -2,7 +2,9 @@ import classNames from 'classnames'; import { forwardRef, useContext } from 'react'; + import { CardContext } from '../CardContext.js'; + import { HeadingLevel, type HeadingLevelProps } from '#components/utils/HeadingLevel.js'; import { cardTypeIsCareCard, type CareCardType } from '#util/types/index.js'; diff --git a/src/components/navigation/card/components/CardLink.tsx b/src/components/navigation/card/components/CardLink.tsx index 5cf4cf48..558bfca9 100644 --- a/src/components/navigation/card/components/CardLink.tsx +++ b/src/components/navigation/card/components/CardLink.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; + import { type AsElementLink } from '#util/types/LinkTypes.js'; export type CardLinkProps = AsElementLink; diff --git a/src/components/navigation/contents-list/ContentsList.tsx b/src/components/navigation/contents-list/ContentsList.tsx index 4c17e6a5..06f1c7bb 100644 --- a/src/components/navigation/contents-list/ContentsList.tsx +++ b/src/components/navigation/contents-list/ContentsList.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef } from 'react'; + import { type AsElementLink } from '#util/types/LinkTypes.js'; export interface ContentsListItemLinkProps extends AsElementLink { diff --git a/src/components/navigation/contents-list/__tests__/ContentsList.test.tsx b/src/components/navigation/contents-list/__tests__/ContentsList.test.tsx index 917e2d1f..eb9400b6 100644 --- a/src/components/navigation/contents-list/__tests__/ContentsList.test.tsx +++ b/src/components/navigation/contents-list/__tests__/ContentsList.test.tsx @@ -1,5 +1,6 @@ import { render } from '@testing-library/react'; import { createRef, type ComponentProps } from 'react'; + import { ContentsList } from '..'; describe('ContentsList', () => { diff --git a/src/components/navigation/footer/Footer.tsx b/src/components/navigation/footer/Footer.tsx index 7fb67fec..423c6ab5 100644 --- a/src/components/navigation/footer/Footer.tsx +++ b/src/components/navigation/footer/Footer.tsx @@ -1,8 +1,10 @@ import classNames from 'classnames'; import { Children, forwardRef, type ComponentPropsWithoutRef } from 'react'; + +import { FooterCopyright, FooterList, FooterListItem, FooterMeta } from './components/index.js'; + import { Container } from '#components/layout/index.js'; import { childIsOfComponentType } from '#util/types/index.js'; -import { FooterCopyright, FooterList, FooterListItem, FooterMeta } from './components/index.js'; export interface FooterProps extends ComponentPropsWithoutRef<'div'> { containerClassName?: string; diff --git a/src/components/navigation/footer/__tests__/Footer.test.tsx b/src/components/navigation/footer/__tests__/Footer.test.tsx index 6e59b65b..c0049f08 100644 --- a/src/components/navigation/footer/__tests__/Footer.test.tsx +++ b/src/components/navigation/footer/__tests__/Footer.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { Footer } from '..'; jest.spyOn(console, 'warn').mockImplementation(); diff --git a/src/components/navigation/footer/components/FooterListItem.tsx b/src/components/navigation/footer/components/FooterListItem.tsx index 0ee5e179..4ad384de 100644 --- a/src/components/navigation/footer/components/FooterListItem.tsx +++ b/src/components/navigation/footer/components/FooterListItem.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; + import { type AsElementLink } from '#util/types/index.js'; export type FooterListItemProps = AsElementLink; diff --git a/src/components/navigation/footer/components/FooterMeta.tsx b/src/components/navigation/footer/components/FooterMeta.tsx index 52cbe06b..65334b1d 100644 --- a/src/components/navigation/footer/components/FooterMeta.tsx +++ b/src/components/navigation/footer/components/FooterMeta.tsx @@ -1,8 +1,10 @@ import { Children, type FC } from 'react'; -import { childIsOfComponentType } from '#util/types/index.js'; -import { FooterListItem } from './FooterListItem.js'; + import { FooterCopyright } from './FooterCopyright.js'; import { FooterList, type FooterListProps } from './FooterList.js'; +import { FooterListItem } from './FooterListItem.js'; + +import { childIsOfComponentType } from '#util/types/index.js'; export interface FooterMetaProps extends FooterListProps { visuallyHiddenText?: string; diff --git a/src/components/navigation/header/Header.tsx b/src/components/navigation/header/Header.tsx index 60b4fb45..c4a71dbb 100644 --- a/src/components/navigation/header/Header.tsx +++ b/src/components/navigation/header/Header.tsx @@ -12,6 +12,8 @@ import { useState, type ComponentPropsWithoutRef, } from 'react'; + +import { HeaderContext, type IHeaderContext } from './HeaderContext.js'; import { HeaderAccount, HeaderAccountItem, @@ -22,7 +24,7 @@ import { HeaderServiceName, type HeaderServiceNameProps, } from './components/index.js'; -import { HeaderContext, type IHeaderContext } from './HeaderContext.js'; + import { Container } from '#components/layout/index.js'; import { childIsOfComponentType } from '#util/types/index.js'; diff --git a/src/components/navigation/header/__tests__/Header.test.tsx b/src/components/navigation/header/__tests__/Header.test.tsx index 52d97f9a..114366b1 100644 --- a/src/components/navigation/header/__tests__/Header.test.tsx +++ b/src/components/navigation/header/__tests__/Header.test.tsx @@ -1,5 +1,7 @@ import { createRef, type ComponentProps } from 'react'; + import { Header } from '..'; + import { renderClient, renderServer } from '#util/components'; describe('Header', () => { diff --git a/src/components/navigation/header/components/HeaderAccountItem.tsx b/src/components/navigation/header/components/HeaderAccountItem.tsx index 1308d6f2..4306f457 100644 --- a/src/components/navigation/header/components/HeaderAccountItem.tsx +++ b/src/components/navigation/header/components/HeaderAccountItem.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithRef, type ForwardedRef, type ReactNode } from 'react'; + import { UserIcon } from '#components/content-presentation/index.js'; import { type AsElementLink } from '#util/types/LinkTypes.js'; diff --git a/src/components/navigation/header/components/HeaderNavigation.tsx b/src/components/navigation/header/components/HeaderNavigation.tsx index 252ab9b8..80a07995 100644 --- a/src/components/navigation/header/components/HeaderNavigation.tsx +++ b/src/components/navigation/header/components/HeaderNavigation.tsx @@ -2,8 +2,11 @@ import classNames from 'classnames'; import { useContext, useEffect, type ComponentPropsWithoutRef, type FC } from 'react'; + import { HeaderContext, type IHeaderContext } from '../HeaderContext.js'; + import { HeaderMenuToggle } from './HeaderMenuToggle.js'; + import { Container } from '#components/layout/index.js'; export interface HeaderNavigationProps extends ComponentPropsWithoutRef<'nav'> { diff --git a/src/components/navigation/header/components/HeaderNavigationItem.tsx b/src/components/navigation/header/components/HeaderNavigationItem.tsx index a5391d6f..6b8760d8 100644 --- a/src/components/navigation/header/components/HeaderNavigationItem.tsx +++ b/src/components/navigation/header/components/HeaderNavigationItem.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { type FC } from 'react'; + import { type AsElementLink } from '#util/types/LinkTypes.js'; export interface HeaderNavigationItemProps extends AsElementLink { diff --git a/src/components/navigation/header/components/HeaderSearch.tsx b/src/components/navigation/header/components/HeaderSearch.tsx index 23ec21ed..250011ac 100644 --- a/src/components/navigation/header/components/HeaderSearch.tsx +++ b/src/components/navigation/header/components/HeaderSearch.tsx @@ -1,4 +1,5 @@ import { type ComponentPropsWithoutRef, type FC } from 'react'; + import { SearchIcon } from '#components/content-presentation/index.js'; export interface HeaderSearchProps extends ComponentPropsWithoutRef<'form'> { diff --git a/src/components/navigation/header/components/HeaderServiceName.tsx b/src/components/navigation/header/components/HeaderServiceName.tsx index d6b3c4bb..e88c9488 100644 --- a/src/components/navigation/header/components/HeaderServiceName.tsx +++ b/src/components/navigation/header/components/HeaderServiceName.tsx @@ -1,4 +1,5 @@ import { type FC, type PropsWithChildren } from 'react'; + import { type HeaderLogoProps } from './HeaderLogo.js'; export type HeaderServiceNameInnerProps = NonNullable; diff --git a/src/components/navigation/pagination/Pagination.tsx b/src/components/navigation/pagination/Pagination.tsx index f7d01cff..2247ad57 100644 --- a/src/components/navigation/pagination/Pagination.tsx +++ b/src/components/navigation/pagination/Pagination.tsx @@ -1,6 +1,8 @@ import classNames from 'classnames'; import { Children, forwardRef, type ComponentPropsWithoutRef } from 'react'; + import { PaginationItem, PaginationLink } from './components/index.js'; + import { childIsOfComponentType } from '#util/types/TypeGuards.js'; export type PaginationProps = ComponentPropsWithoutRef<'nav'>; diff --git a/src/components/navigation/pagination/__tests__/Pagination.test.tsx b/src/components/navigation/pagination/__tests__/Pagination.test.tsx index 582ce208..279906b8 100644 --- a/src/components/navigation/pagination/__tests__/Pagination.test.tsx +++ b/src/components/navigation/pagination/__tests__/Pagination.test.tsx @@ -1,7 +1,8 @@ import { render } from '@testing-library/react'; -import { Pagination } from '..'; import { createRef } from 'react'; +import { Pagination } from '..'; + describe('Pagination', () => { it('matches snapshot', () => { const { container } = render(); diff --git a/src/components/navigation/pagination/components/PaginationItem.tsx b/src/components/navigation/pagination/components/PaginationItem.tsx index b2926137..2d8e0a1e 100644 --- a/src/components/navigation/pagination/components/PaginationItem.tsx +++ b/src/components/navigation/pagination/components/PaginationItem.tsx @@ -1,9 +1,11 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; -import { ArrowLeftIcon, ArrowRightIcon } from '#components/content-presentation/index.js'; + import { PaginationLink, type PaginationLinkProps } from './PaginationLink.js'; import { PaginationLinkText } from './PaginationLinkText.js'; +import { ArrowLeftIcon, ArrowRightIcon } from '#components/content-presentation/index.js'; + export type PaginationItemProps = PaginationLinkProps & { ellipsis?: boolean; }; diff --git a/src/components/navigation/pagination/components/PaginationLink.tsx b/src/components/navigation/pagination/components/PaginationLink.tsx index 2ee21d0f..800502b0 100644 --- a/src/components/navigation/pagination/components/PaginationLink.tsx +++ b/src/components/navigation/pagination/components/PaginationLink.tsx @@ -1,7 +1,9 @@ import { forwardRef } from 'react'; + +import { PaginationLinkText, type PaginationLinkTextProps } from './PaginationLinkText.js'; + import { ArrowLeftIcon, ArrowRightIcon } from '#components/content-presentation/index.js'; import { type AsElementLink } from '#util/types/LinkTypes.js'; -import { PaginationLinkText, type PaginationLinkTextProps } from './PaginationLinkText.js'; export type PaginationLinkProps = PaginationLinkTextProps & AsElementLink; diff --git a/src/components/navigation/skip-link/__tests__/SkipLink.test.tsx b/src/components/navigation/skip-link/__tests__/SkipLink.test.tsx index f2bacd4b..d41e0413 100644 --- a/src/components/navigation/skip-link/__tests__/SkipLink.test.tsx +++ b/src/components/navigation/skip-link/__tests__/SkipLink.test.tsx @@ -1,6 +1,8 @@ import { waitFor } from '@testing-library/react'; import { createRef } from 'react'; + import { SkipLink } from '..'; + import { Container } from '#components/layout'; import { renderClient, renderServer } from '#util/components'; diff --git a/src/components/typography/__tests__/BodyText.test.tsx b/src/components/typography/__tests__/BodyText.test.tsx index a190b365..32458ad0 100644 --- a/src/components/typography/__tests__/BodyText.test.tsx +++ b/src/components/typography/__tests__/BodyText.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { BodyText } from '..'; describe('BodyText', () => { diff --git a/src/components/typography/__tests__/LedeText.test.tsx b/src/components/typography/__tests__/LedeText.test.tsx index 00d2ab86..193f91d7 100644 --- a/src/components/typography/__tests__/LedeText.test.tsx +++ b/src/components/typography/__tests__/LedeText.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { LedeText } from '..'; describe('LedeText', () => { diff --git a/src/components/utils/FormGroup.tsx b/src/components/utils/FormGroup.tsx index d3bdbed2..f33f7e14 100644 --- a/src/components/utils/FormGroup.tsx +++ b/src/components/utils/FormGroup.tsx @@ -9,7 +9,9 @@ import { type JSX, type ReactNode, } from 'react'; + import { FormGroupContext, type IFormGroupContext } from './FormGroupContext.js'; + import { ErrorMessage } from '#components/form-elements/error-message/index.js'; import { Fieldset } from '#components/form-elements/fieldset/index.js'; import { useFormContext } from '#components/form-elements/form/index.js'; diff --git a/src/components/utils/__tests__/FormGroup.test.tsx b/src/components/utils/__tests__/FormGroup.test.tsx index 3fef0902..d62e938b 100644 --- a/src/components/utils/__tests__/FormGroup.test.tsx +++ b/src/components/utils/__tests__/FormGroup.test.tsx @@ -1,5 +1,7 @@ import { axe, toHaveNoViolations } from 'jest-axe'; + import { FormGroup, type FormElementRenderProps } from '..'; + import { type TextInputProps } from '#components/form-elements'; import { renderClient, renderServer } from '#util/components'; diff --git a/src/components/utils/__tests__/HeadingLevel.test.tsx b/src/components/utils/__tests__/HeadingLevel.test.tsx index d200820d..34e78a46 100644 --- a/src/components/utils/__tests__/HeadingLevel.test.tsx +++ b/src/components/utils/__tests__/HeadingLevel.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { HeadingLevel, type HeadingLevelProps } from '..'; describe('HeadingLevel', () => { diff --git a/src/patterns/nav-a-z/NavAZ.tsx b/src/patterns/nav-a-z/NavAZ.tsx index fc9e7917..84c90a6c 100644 --- a/src/patterns/nav-a-z/NavAZ.tsx +++ b/src/patterns/nav-a-z/NavAZ.tsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import { forwardRef, type ComponentPropsWithoutRef, type FC, type ReactNode } from 'react'; + import { type AsElementLink } from '#util/types/LinkTypes.js'; const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; diff --git a/src/patterns/nav-a-z/__tests__/NavAZ.test.tsx b/src/patterns/nav-a-z/__tests__/NavAZ.test.tsx index 9580dccc..5d24a1d5 100644 --- a/src/patterns/nav-a-z/__tests__/NavAZ.test.tsx +++ b/src/patterns/nav-a-z/__tests__/NavAZ.test.tsx @@ -1,4 +1,5 @@ import { render, screen } from '@testing-library/react'; + import { NavAZ } from '..'; const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; diff --git a/src/patterns/review-date/__tests__/ReviewDate.test.tsx b/src/patterns/review-date/__tests__/ReviewDate.test.tsx index 1a78e4d5..4bfc6c7a 100644 --- a/src/patterns/review-date/__tests__/ReviewDate.test.tsx +++ b/src/patterns/review-date/__tests__/ReviewDate.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react'; + import { ReviewDate } from '..'; describe('ReviewDate', () => { diff --git a/src/setupTests.ts b/src/setupTests.ts index 6f2db2ba..71ea4453 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -1,4 +1,5 @@ import { TextDecoder, TextEncoder } from 'node:util'; + import '@testing-library/jest-dom'; import { configure } from '@testing-library/react'; import { outdent } from 'outdent'; diff --git a/src/util/hooks/UseDevWarning.tsx b/src/util/hooks/UseDevWarning.tsx index c13657f5..6116305a 100644 --- a/src/util/hooks/UseDevWarning.tsx +++ b/src/util/hooks/UseDevWarning.tsx @@ -1,6 +1,7 @@ 'use client'; import { useEffect } from 'react'; + import { isDev } from '#util/tools/index.js'; type ConditionFn = () => boolean; diff --git a/src/util/types/TypeGuards.ts b/src/util/types/TypeGuards.ts index 58080be5..bdc4fe3a 100644 --- a/src/util/types/TypeGuards.ts +++ b/src/util/types/TypeGuards.ts @@ -5,6 +5,7 @@ import { type ReactElement, type ReactNode, } from 'react'; + import { type CardType, type CareCardType } from './NHSUKTypes.js'; type WithProps = T & { diff --git a/stories/Content Presentation/Details.stories.tsx b/stories/Content Presentation/Details.stories.tsx index 4f8c786b..107e4226 100644 --- a/stories/Content Presentation/Details.stories.tsx +++ b/stories/Content Presentation/Details.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Details } from '#components/content-presentation/details/index.js'; /** diff --git a/stories/Content Presentation/DoAndDontList.stories.tsx b/stories/Content Presentation/DoAndDontList.stories.tsx index 033a1338..0234d142 100644 --- a/stories/Content Presentation/DoAndDontList.stories.tsx +++ b/stories/Content Presentation/DoAndDontList.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { DoAndDontList } from '#components/content-presentation/do-and-dont-list/index.js'; /** diff --git a/stories/Content Presentation/Hero.stories.tsx b/stories/Content Presentation/Hero.stories.tsx index a343fe38..067984f0 100644 --- a/stories/Content Presentation/Hero.stories.tsx +++ b/stories/Content Presentation/Hero.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Hero } from '#components/content-presentation/hero/index.js'; const meta: Meta = { diff --git a/stories/Content Presentation/Icons.stories.tsx b/stories/Content Presentation/Icons.stories.tsx index dde715df..4aa88398 100644 --- a/stories/Content Presentation/Icons.stories.tsx +++ b/stories/Content Presentation/Icons.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { ArrowLeftIcon, ArrowRightCircleIcon, diff --git a/stories/Content Presentation/Images.stories.tsx b/stories/Content Presentation/Images.stories.tsx index d39c40af..baf05ab7 100644 --- a/stories/Content Presentation/Images.stories.tsx +++ b/stories/Content Presentation/Images.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Images } from '#components/content-presentation/images/index.js'; const meta: Meta = { diff --git a/stories/Content Presentation/InsetText.stories.tsx b/stories/Content Presentation/InsetText.stories.tsx index 536509e0..871e2efc 100644 --- a/stories/Content Presentation/InsetText.stories.tsx +++ b/stories/Content Presentation/InsetText.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { InsetText } from '#components/content-presentation/inset-text/index.js'; const meta: Meta = { diff --git a/stories/Content Presentation/NotificationBanner.stories.tsx b/stories/Content Presentation/NotificationBanner.stories.tsx index a0d9000c..17524905 100644 --- a/stories/Content Presentation/NotificationBanner.stories.tsx +++ b/stories/Content Presentation/NotificationBanner.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { NotificationBanner } from '#components/content-presentation/notification-banner/index.js'; + import { NotificationBannerLink } from '#components/content-presentation/notification-banner/components/index.js'; +import { NotificationBanner } from '#components/content-presentation/notification-banner/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Content Presentation/Panel.stories.tsx b/stories/Content Presentation/Panel.stories.tsx index 3de96c54..667d2042 100644 --- a/stories/Content Presentation/Panel.stories.tsx +++ b/stories/Content Presentation/Panel.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Panel } from '#components/content-presentation/panel/index.js'; const meta: Meta = { diff --git a/stories/Content Presentation/SummaryList.stories.tsx b/stories/Content Presentation/SummaryList.stories.tsx index 2f458b25..8cac5990 100644 --- a/stories/Content Presentation/SummaryList.stories.tsx +++ b/stories/Content Presentation/SummaryList.stories.tsx @@ -1,7 +1,8 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { BodyText } from '#components/typography/BodyText.js'; + import { SummaryList } from '#components/content-presentation/summary-list/index.js'; +import { BodyText } from '#components/typography/BodyText.js'; /** * ## Implementation notes diff --git a/stories/Content Presentation/Table.stories.tsx b/stories/Content Presentation/Table.stories.tsx index 8f961d61..ad5586d2 100644 --- a/stories/Content Presentation/Table.stories.tsx +++ b/stories/Content Presentation/Table.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Table } from '#components/content-presentation/table/index.js'; import { HintText } from '#components/form-elements/hint-text/index.js'; import { Col, Row } from '#components/layout/index.js'; diff --git a/stories/Content Presentation/Tabs.stories.tsx b/stories/Content Presentation/Tabs.stories.tsx index c8996388..6dbc2b50 100644 --- a/stories/Content Presentation/Tabs.stories.tsx +++ b/stories/Content Presentation/Tabs.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Tabs } from '#components/content-presentation/tabs/index.js'; /** diff --git a/stories/Content Presentation/Tag.stories.tsx b/stories/Content Presentation/Tag.stories.tsx index a6665edc..2ae6bd7f 100644 --- a/stories/Content Presentation/Tag.stories.tsx +++ b/stories/Content Presentation/Tag.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Tag } from '#components/content-presentation/tag/index.js'; const meta: Meta = { diff --git a/stories/Content Presentation/WarningCallout.stories.tsx b/stories/Content Presentation/WarningCallout.stories.tsx index 685c3b10..50ec08c7 100644 --- a/stories/Content Presentation/WarningCallout.stories.tsx +++ b/stories/Content Presentation/WarningCallout.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { WarningCallout } from '#components/content-presentation/warning-callout/index.js'; const meta: Meta = { diff --git a/stories/Form Elements/Button.stories.tsx b/stories/Form Elements/Button.stories.tsx index 8cf794f0..8c90fd79 100644 --- a/stories/Form Elements/Button.stories.tsx +++ b/stories/Form Elements/Button.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Button } from '#components/form-elements/button/index.js'; /** diff --git a/stories/Form Elements/CharacterCount.stories.tsx b/stories/Form Elements/CharacterCount.stories.tsx index fa259f42..d640e637 100644 --- a/stories/Form Elements/CharacterCount.stories.tsx +++ b/stories/Form Elements/CharacterCount.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { CharacterCount } from '#components/form-elements/character-count/index.js'; /** diff --git a/stories/Form Elements/Checkboxes.stories.tsx b/stories/Form Elements/Checkboxes.stories.tsx index 9b2e3846..0bfdf472 100644 --- a/stories/Form Elements/Checkboxes.stories.tsx +++ b/stories/Form Elements/Checkboxes.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useEffect, useRef, useState, type SyntheticEvent } from 'react'; + import { Checkboxes } from '#components/form-elements/checkboxes/index.js'; import { TextInput } from '#components/form-elements/text-input/index.js'; diff --git a/stories/Form Elements/DateInput.stories.tsx b/stories/Form Elements/DateInput.stories.tsx index e5fff547..89b24a86 100644 --- a/stories/Form Elements/DateInput.stories.tsx +++ b/stories/Form Elements/DateInput.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; + import { DateInput, type DateInputValue } from '#components/form-elements/date-input/index.js'; const meta: Meta = { diff --git a/stories/Form Elements/ErrorMessage.stories.tsx b/stories/Form Elements/ErrorMessage.stories.tsx index 4368e2d4..a8247d87 100644 --- a/stories/Form Elements/ErrorMessage.stories.tsx +++ b/stories/Form Elements/ErrorMessage.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { ErrorMessage } from '#components/form-elements/error-message/index.js'; /** diff --git a/stories/Form Elements/ErrorSummary.stories.tsx b/stories/Form Elements/ErrorSummary.stories.tsx index 56ae4ee1..f8032784 100644 --- a/stories/Form Elements/ErrorSummary.stories.tsx +++ b/stories/Form Elements/ErrorSummary.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { ErrorSummary } from '#components/form-elements/error-summary/index.js'; /** diff --git a/stories/Form Elements/Fieldset.stories.tsx b/stories/Form Elements/Fieldset.stories.tsx index 04688364..e6376c8f 100644 --- a/stories/Form Elements/Fieldset.stories.tsx +++ b/stories/Form Elements/Fieldset.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Fieldset } from '#components/form-elements/fieldset/index.js'; import { TextInput } from '#components/form-elements/text-input/index.js'; diff --git a/stories/Form Elements/HintText.stories.tsx b/stories/Form Elements/HintText.stories.tsx index d812e26a..dc8c5550 100644 --- a/stories/Form Elements/HintText.stories.tsx +++ b/stories/Form Elements/HintText.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { HintText } from '#components/form-elements/hint-text/index.js'; const meta: Meta = { diff --git a/stories/Form Elements/Label.stories.tsx b/stories/Form Elements/Label.stories.tsx index 68f4a7a3..a15744f4 100644 --- a/stories/Form Elements/Label.stories.tsx +++ b/stories/Form Elements/Label.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Label } from '#components/form-elements/label/index.js'; const meta: Meta = { diff --git a/stories/Form Elements/Radios.stories.tsx b/stories/Form Elements/Radios.stories.tsx index 0f28e558..12a35ccf 100644 --- a/stories/Form Elements/Radios.stories.tsx +++ b/stories/Form Elements/Radios.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; + import { Checkboxes } from '#components/form-elements/checkboxes/index.js'; import { Radios } from '#components/form-elements/radios/index.js'; import { TextInput } from '#components/form-elements/text-input/index.js'; diff --git a/stories/Form Elements/Select.stories.tsx b/stories/Form Elements/Select.stories.tsx index 70570c7f..ddc0e998 100644 --- a/stories/Form Elements/Select.stories.tsx +++ b/stories/Form Elements/Select.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; + import { Select } from '#components/form-elements/select/index.js'; import { TextInput } from '#components/form-elements/text-input/index.js'; diff --git a/stories/Form Elements/TextInput.stories.tsx b/stories/Form Elements/TextInput.stories.tsx index 0367ca25..bfb6efff 100644 --- a/stories/Form Elements/TextInput.stories.tsx +++ b/stories/Form Elements/TextInput.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { TextInput } from '#components/form-elements/text-input/index.js'; const meta: Meta = { diff --git a/stories/Form Elements/Textarea.stories.tsx b/stories/Form Elements/Textarea.stories.tsx index 94838ac1..d038be2f 100644 --- a/stories/Form Elements/Textarea.stories.tsx +++ b/stories/Form Elements/Textarea.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { useState } from 'react'; + import { TextInput } from '#components/form-elements/text-input/index.js'; import { Textarea } from '#components/form-elements/textarea/index.js'; diff --git a/stories/Layout/Grid.stories.tsx b/stories/Layout/Grid.stories.tsx index b01de5cb..6efa6cfc 100644 --- a/stories/Layout/Grid.stories.tsx +++ b/stories/Layout/Grid.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Card } from '#components/navigation/card/index.js'; + import { Col, Container, Row } from '#components/layout/index.js'; +import { Card } from '#components/navigation/card/index.js'; const meta: Meta = { title: 'Layout/Grid', diff --git a/stories/Navigation/ActionLink.stories.tsx b/stories/Navigation/ActionLink.stories.tsx index 201b802f..09037fc6 100644 --- a/stories/Navigation/ActionLink.stories.tsx +++ b/stories/Navigation/ActionLink.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { ActionLink } from '#components/navigation/action-link/index.js'; const meta: Meta = { diff --git a/stories/Navigation/BackLink.stories.tsx b/stories/Navigation/BackLink.stories.tsx index 1e06ae02..d34a2562 100644 --- a/stories/Navigation/BackLink.stories.tsx +++ b/stories/Navigation/BackLink.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { BackLink } from '#components/navigation/back-link/index.js'; const meta: Meta = { diff --git a/stories/Navigation/Breadcrumb.stories.tsx b/stories/Navigation/Breadcrumb.stories.tsx index 34a9317f..b464b2d4 100644 --- a/stories/Navigation/Breadcrumb.stories.tsx +++ b/stories/Navigation/Breadcrumb.stories.tsx @@ -1,6 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Breadcrumb } from '#components/navigation/breadcrumb/index.js'; + import { Container } from '#components/layout/index.js'; +import { Breadcrumb } from '#components/navigation/breadcrumb/index.js'; /** * This component can be found in the `nhsuk-frontend` repository here. diff --git a/stories/Navigation/Card.stories.tsx b/stories/Navigation/Card.stories.tsx index 9784e8e1..da9d84e1 100644 --- a/stories/Navigation/Card.stories.tsx +++ b/stories/Navigation/Card.stories.tsx @@ -1,7 +1,8 @@ /* eslint-disable jsx-a11y/anchor-is-valid */ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { Card } from '#components/navigation/card/index.js'; + import { ChevronRightCircleIcon } from '#components/content-presentation/icons/individual/index.js'; +import { Card } from '#components/navigation/card/index.js'; const meta: Meta = { title: 'Navigation/Card', diff --git a/stories/Navigation/ContentsList.stories.tsx b/stories/Navigation/ContentsList.stories.tsx index 91c832c2..2aa54a97 100644 --- a/stories/Navigation/ContentsList.stories.tsx +++ b/stories/Navigation/ContentsList.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { ContentsList } from '#components/navigation/contents-list/index.js'; /** diff --git a/stories/Navigation/Footer.stories.tsx b/stories/Navigation/Footer.stories.tsx index b70ec074..1ec88d9d 100644 --- a/stories/Navigation/Footer.stories.tsx +++ b/stories/Navigation/Footer.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Footer } from '#components/navigation/footer/index.js'; const meta: Meta = { diff --git a/stories/Navigation/Header.stories.tsx b/stories/Navigation/Header.stories.tsx index d04eacf4..7a7f0f64 100644 --- a/stories/Navigation/Header.stories.tsx +++ b/stories/Navigation/Header.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { type ComponentProps } from 'react'; + import { Header } from '#components/navigation/header/index.js'; const meta: Meta = { diff --git a/stories/Navigation/Pagination.stories.tsx b/stories/Navigation/Pagination.stories.tsx index 92561106..8cd740eb 100644 --- a/stories/Navigation/Pagination.stories.tsx +++ b/stories/Navigation/Pagination.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { Pagination } from '#components/navigation/pagination/index.js'; const meta: Meta = { diff --git a/stories/Navigation/SkipLink.stories.tsx b/stories/Navigation/SkipLink.stories.tsx index 044f17b4..1c7d3d49 100644 --- a/stories/Navigation/SkipLink.stories.tsx +++ b/stories/Navigation/SkipLink.stories.tsx @@ -1,5 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { type FC, type ReactNode } from 'react'; + import { HintText } from '#components/form-elements/hint-text/index.js'; import { SkipLink } from '#components/navigation/skip-link/index.js'; diff --git a/stories/Patterns/NavAZ.stories.tsx b/stories/Patterns/NavAZ.stories.tsx index e3fb0382..7a392091 100644 --- a/stories/Patterns/NavAZ.stories.tsx +++ b/stories/Patterns/NavAZ.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { NavAZ } from '#patterns/nav-a-z/index.js'; /** diff --git a/stories/Patterns/PageAZ.stories.tsx b/stories/Patterns/PageAZ.stories.tsx index 63d61fd9..7a70602b 100644 --- a/stories/Patterns/PageAZ.stories.tsx +++ b/stories/Patterns/PageAZ.stories.tsx @@ -1,7 +1,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + +import { Col, Container, Row } from '#components/layout/index.js'; import { Card } from '#components/navigation/card/index.js'; import { HeadingLevel } from '#components/utils/index.js'; -import { Col, Container, Row } from '#components/layout/index.js'; import { NavAZ } from '#patterns/nav-a-z/index.js'; /** diff --git a/stories/Patterns/ReviewDate.stories.tsx b/stories/Patterns/ReviewDate.stories.tsx index 141e73dc..cf31aec9 100644 --- a/stories/Patterns/ReviewDate.stories.tsx +++ b/stories/Patterns/ReviewDate.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; + import { ReviewDate } from '#patterns/review-date/index.js'; const meta: Meta = {