diff --git a/.changeset/mean-rice-remember.md b/.changeset/mean-rice-remember.md new file mode 100644 index 000000000..3ca7685e9 --- /dev/null +++ b/.changeset/mean-rice-remember.md @@ -0,0 +1,5 @@ +--- +"@cloudoperators/juno-ui-components": patch +--- + +Migrate storybook to vite diff --git a/package-lock.json b/package-lock.json index 412484777..ddb46025a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1969,6 +1969,8 @@ "version": "7.8.4", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1980,6 +1982,8 @@ "version": "7.8.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1991,6 +1995,8 @@ "version": "7.12.13", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -2002,6 +2008,8 @@ "version": "7.14.5", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -2044,6 +2052,8 @@ "version": "7.10.4", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -2055,6 +2065,8 @@ "version": "7.8.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -2080,6 +2092,8 @@ "version": "7.10.4", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -2091,6 +2105,8 @@ "version": "7.8.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -2102,6 +2118,8 @@ "version": "7.10.4", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -2113,6 +2131,8 @@ "version": "7.8.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -2124,6 +2144,8 @@ "version": "7.8.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -2135,6 +2157,8 @@ "version": "7.8.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -2146,6 +2170,8 @@ "version": "7.14.5", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -2160,6 +2186,8 @@ "version": "7.14.5", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -3270,7 +3298,9 @@ "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@bundled-es-modules/cookie": { "version": "2.0.1", @@ -4111,6 +4141,8 @@ }, "node_modules/@esbuild/darwin-arm64": { "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], @@ -4340,6 +4372,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -4855,6 +4888,8 @@ "version": "1.1.0", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -4870,6 +4905,8 @@ "version": "1.0.10", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -4878,6 +4915,8 @@ "version": "5.3.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" } @@ -4886,6 +4925,8 @@ "version": "4.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -4898,6 +4939,8 @@ "version": "3.14.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -4910,6 +4953,8 @@ "version": "5.0.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -4921,6 +4966,8 @@ "version": "4.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -4932,6 +4979,8 @@ "version": "0.1.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=8" } @@ -4940,6 +4989,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -4956,6 +5007,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", @@ -5002,6 +5055,8 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -5013,6 +5068,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -5025,12 +5082,16 @@ "node_modules/@jest/core/node_modules/react-is": { "version": "18.3.1", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@jest/environment": { "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", @@ -5045,6 +5106,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" @@ -5068,6 +5131,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", @@ -5084,6 +5149,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -5098,6 +5165,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", @@ -5140,6 +5209,8 @@ "version": "7.2.3", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5159,6 +5230,8 @@ "version": "6.0.3", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", @@ -5174,6 +5247,8 @@ "version": "4.0.2", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -5197,6 +5272,8 @@ "version": "29.6.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", @@ -5210,6 +5287,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", @@ -5224,6 +5303,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", @@ -5238,6 +5319,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -5275,6 +5358,39 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@joshwooding/vite-plugin-react-docgen-typescript": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@joshwooding/vite-plugin-react-docgen-typescript/-/vite-plugin-react-docgen-typescript-0.4.2.tgz", + "integrity": "sha512-feQ+ntr+8hbVudnsTUapiMN9q8T90XA1d5jn9QzY09sNoj4iD9wi0PY1vsBFTda4ZjEaxRK9S81oarR2nj7TFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.27.0", + "react-docgen-typescript": "^2.2.2" + }, + "peerDependencies": { + "typescript": ">= 4.3.x", + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@joshwooding/vite-plugin-react-docgen-typescript/node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "license": "MIT", @@ -5305,6 +5421,7 @@ "version": "0.3.6", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -6264,6 +6381,8 @@ "version": "3.0.1", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "type-detect": "4.0.8" } @@ -6272,12 +6391,16 @@ "version": "10.3.0", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.0" } }, "node_modules/@storybook/addon-actions": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-8.4.7.tgz", + "integrity": "sha512-mjtD5JxcPuW74T6h7nqMxWTvDneFtokg88p6kQ5OnC1M259iAXb//yiSZgu/quunMHPCXSiqn4FNOSgASTSbsA==", "dev": true, "license": "MIT", "dependencies": { @@ -6292,11 +6415,13 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/addon-backgrounds": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-backgrounds/-/addon-backgrounds-8.4.7.tgz", + "integrity": "sha512-I4/aErqtFiazcoWyKafOAm3bLpxTj6eQuH/woSbk1Yx+EzN+Dbrgx1Updy8//bsNtKkcrXETITreqHC+a57DHQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6309,11 +6434,13 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/addon-controls": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-controls/-/addon-controls-8.4.7.tgz", + "integrity": "sha512-377uo5IsJgXLnQLJixa47+11V+7Wn9KcDEw+96aGCBCfLbWNH8S08tJHHnSu+jXg9zoqCAC23MetntVp6LetHA==", "dev": true, "license": "MIT", "dependencies": { @@ -6326,18 +6453,20 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/addon-docs": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-8.4.7.tgz", + "integrity": "sha512-NwWaiTDT5puCBSUOVuf6ME7Zsbwz7Y79WF5tMZBx/sLQ60vpmJVQsap6NSjvK1Ravhc21EsIXqemAcBjAWu80w==", "dev": true, "license": "MIT", "dependencies": { "@mdx-js/react": "^3.0.0", - "@storybook/blocks": "8.4.6", - "@storybook/csf-plugin": "8.4.6", - "@storybook/react-dom-shim": "8.4.6", + "@storybook/blocks": "8.4.7", + "@storybook/csf-plugin": "8.4.7", + "@storybook/react-dom-shim": "8.4.7", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", "ts-dedent": "^2.0.0" @@ -6347,11 +6476,13 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/addon-docs/node_modules/@mdx-js/react": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", + "integrity": "sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6366,20 +6497,38 @@ "react": ">=16" } }, + "node_modules/@storybook/addon-docs/node_modules/@storybook/react-dom-shim": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.4.7.tgz", + "integrity": "sha512-6bkG2jvKTmWrmVzCgwpTxwIugd7Lu+2btsLAqhQSzDyIj2/uhMNp8xIMr/NBDtLgq3nomt9gefNa9xxLwk/OMg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "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": "^8.4.7" + } + }, "node_modules/@storybook/addon-essentials": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-essentials/-/addon-essentials-8.4.7.tgz", + "integrity": "sha512-+BtZHCBrYtQKILtejKxh0CDRGIgTl9PumfBOKRaihYb4FX1IjSAxoV/oo/IfEjlkF5f87vouShWsRa8EUauFDw==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/addon-actions": "8.4.6", - "@storybook/addon-backgrounds": "8.4.6", - "@storybook/addon-controls": "8.4.6", - "@storybook/addon-docs": "8.4.6", - "@storybook/addon-highlight": "8.4.6", - "@storybook/addon-measure": "8.4.6", - "@storybook/addon-outline": "8.4.6", - "@storybook/addon-toolbars": "8.4.6", - "@storybook/addon-viewport": "8.4.6", + "@storybook/addon-actions": "8.4.7", + "@storybook/addon-backgrounds": "8.4.7", + "@storybook/addon-controls": "8.4.7", + "@storybook/addon-docs": "8.4.7", + "@storybook/addon-highlight": "8.4.7", + "@storybook/addon-measure": "8.4.7", + "@storybook/addon-outline": "8.4.7", + "@storybook/addon-toolbars": "8.4.7", + "@storybook/addon-viewport": "8.4.7", "ts-dedent": "^2.0.0" }, "funding": { @@ -6387,11 +6536,13 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/addon-highlight": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-highlight/-/addon-highlight-8.4.7.tgz", + "integrity": "sha512-whQIDBd3PfVwcUCrRXvCUHWClXe9mQ7XkTPCdPo4B/tZ6Z9c6zD8JUHT76ddyHivixFLowMnA8PxMU6kCMAiNw==", "dev": true, "license": "MIT", "dependencies": { @@ -6402,17 +6553,19 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/addon-interactions": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-interactions/-/addon-interactions-8.4.7.tgz", + "integrity": "sha512-fnufT3ym8ht3HHUIRVXAH47iOJW/QOb0VSM+j269gDuvyDcY03D1civCu1v+eZLGaXPKJ8vtjr0L8zKQ/4P0JQ==", "dev": true, "license": "MIT", "dependencies": { "@storybook/global": "^5.0.0", - "@storybook/instrumenter": "8.4.6", - "@storybook/test": "8.4.6", + "@storybook/instrumenter": "8.4.7", + "@storybook/test": "8.4.7", "polished": "^4.2.2", "ts-dedent": "^2.2.0" }, @@ -6421,191 +6574,585 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, - "node_modules/@storybook/addon-links": { - "version": "8.4.6", + "node_modules/@storybook/addon-interactions/node_modules/@storybook/instrumenter": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.4.7.tgz", + "integrity": "sha512-k6NSD3jaRCCHAFtqXZ7tw8jAzD/yTEWXGya+REgZqq5RCkmJ+9S4Ytp/6OhQMPtPFX23gAuJJzTQVLcCr+gjRg==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/csf": "^0.1.11", "@storybook/global": "^5.0.0", - "ts-dedent": "^2.0.0" + "@vitest/utils": "^2.1.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.4.6" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - } + "storybook": "^8.4.7" } }, - "node_modules/@storybook/addon-mdx-gfm": { - "version": "8.4.6", + "node_modules/@storybook/addon-interactions/node_modules/@storybook/test": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.4.7.tgz", + "integrity": "sha512-AhvJsu5zl3uG40itSQVuSy5WByp3UVhS6xAnme4FWRwgSxhvZjATJ3AZkkHWOYjnnk+P2/sbz/XuPli1FVCWoQ==", "dev": true, "license": "MIT", "dependencies": { - "remark-gfm": "^4.0.0", - "ts-dedent": "^2.0.0" + "@storybook/csf": "^0.1.11", + "@storybook/global": "^5.0.0", + "@storybook/instrumenter": "8.4.7", + "@testing-library/dom": "10.4.0", + "@testing-library/jest-dom": "6.5.0", + "@testing-library/user-event": "14.5.2", + "@vitest/expect": "2.0.5", + "@vitest/spy": "2.0.5" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, - "node_modules/@storybook/addon-measure": { - "version": "8.4.6", + "node_modules/@storybook/addon-interactions/node_modules/@vitest/expect": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", + "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/global": "^5.0.0", - "tiny-invariant": "^1.3.1" + "@vitest/spy": "2.0.5", + "@vitest/utils": "2.0.5", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.4.6" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/addon-outline": { - "version": "8.4.6", + "node_modules/@storybook/addon-interactions/node_modules/@vitest/expect/node_modules/@vitest/utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", + "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/global": "^5.0.0", - "ts-dedent": "^2.0.0" + "@vitest/pretty-format": "2.0.5", + "estree-walker": "^3.0.3", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.4.6" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/addon-toolbars": { - "version": "8.4.6", + "node_modules/@storybook/addon-interactions/node_modules/@vitest/pretty-format": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", + "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", "dev": true, "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" + "dependencies": { + "tinyrainbow": "^1.2.0" }, - "peerDependencies": { - "storybook": "^8.4.6" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/addon-viewport": { - "version": "8.4.6", + "node_modules/@storybook/addon-interactions/node_modules/@vitest/spy": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", + "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", "dev": true, "license": "MIT", "dependencies": { - "memoizerific": "^1.11.3" + "tinyspy": "^3.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.4.6" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/addon-webpack5-compiler-babel": { + "node_modules/@storybook/addon-interactions/node_modules/estree-walker": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.23.7", - "babel-loader": "^9.1.3" - }, - "engines": { - "node": ">=18" + "@types/estree": "^1.0.0" } }, - "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/ajv": { - "version": "8.17.1", + "node_modules/@storybook/addon-links": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-8.4.7.tgz", + "integrity": "sha512-L/1h4dMeMKF+MM0DanN24v5p3faNYbbtOApMgg7SlcBT/tgo3+cAjkgmNpYA8XtKnDezm+T2mTDhB8mmIRZpIQ==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" + "@storybook/csf": "^0.1.11", + "@storybook/global": "^5.0.0", + "ts-dedent": "^2.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/ajv-formats": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" + "type": "opencollective", + "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "ajv": "^8.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", + "storybook": "^8.4.7" }, "peerDependenciesMeta": { - "ajv": { + "react": { "optional": true } } }, - "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/ajv-keywords": { - "version": "5.1.0", + "node_modules/@storybook/addon-mdx-gfm": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-mdx-gfm/-/addon-mdx-gfm-8.4.7.tgz", + "integrity": "sha512-RLenpDmY0HZLqh8T6ZamSeUaLkFFJGMivIs5T3IhAo+BecYA1gWzD+T5er/k8AH8HyYJUtxt/IMCx5UrGnUr7g==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.3" + "remark-gfm": "^4.0.0", + "ts-dedent": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "ajv": "^8.8.2" + "storybook": "^8.4.7" } }, - "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/babel-loader": { - "version": "9.2.1", + "node_modules/@storybook/addon-measure": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-measure/-/addon-measure-8.4.7.tgz", + "integrity": "sha512-QfvqYWDSI5F68mKvafEmZic3SMiK7zZM8VA0kTXx55hF/+vx61Mm0HccApUT96xCXIgmwQwDvn9gS4TkX81Dmw==", "dev": true, "license": "MIT", "dependencies": { - "find-cache-dir": "^4.0.0", - "schema-utils": "^4.0.0" + "@storybook/global": "^5.0.0", + "tiny-invariant": "^1.3.1" }, - "engines": { - "node": ">= 14.15.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "@babel/core": "^7.12.0", - "webpack": ">=5" + "storybook": "^8.4.7" } }, - "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/find-cache-dir": { - "version": "4.0.0", + "node_modules/@storybook/addon-outline": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-outline/-/addon-outline-8.4.7.tgz", + "integrity": "sha512-6LYRqUZxSodmAIl8icr585Oi8pmzbZ90aloZJIpve+dBAzo7ydYrSQxxoQEVltXbKf3VeVcrs64ouAYqjisMYA==", "dev": true, "license": "MIT", "dependencies": { - "common-path-prefix": "^3.0.0", - "pkg-dir": "^7.0.0" - }, - "engines": { - "node": ">=14.16" + "@storybook/global": "^5.0.0", + "ts-dedent": "^2.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.4.7" + } + }, + "node_modules/@storybook/addon-postcss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@storybook/addon-postcss/-/addon-postcss-2.0.0.tgz", + "integrity": "sha512-Nt82A7e9zJH4+A+VzLKKswUfru+T6FJTakj4dccP0i8DSn7a0CkzRPrLuZBq8tg4voV6gD74bcDf3gViCVBGtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/node-logger": "^6.1.14", + "css-loader": "^3.6.0", + "postcss": "^7.0.35", + "postcss-loader": "^4.2.0", + "style-loader": "^1.3.0" + }, + "engines": { + "node": ">=10", + "yarn": "^1.17.0" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/css-loader": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.6.0.tgz", + "integrity": "sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.32", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.2.0", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^2.7.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/css-loader/node_modules/loader-utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/css-loader/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/icss-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss": "^7.0.14" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true, + "license": "ISC" + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.3.0.tgz", + "integrity": "sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "semver": "^7.3.4" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss-loader/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss-modules-extract-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss": "^7.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss-modules-local-by-default": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz", + "integrity": "sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^4.1.1", + "postcss": "^7.0.32", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss-modules-scope": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz", + "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/postcss-modules-values": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-utils": "^4.0.0", + "postcss": "^7.0.6" + } + }, + "node_modules/@storybook/addon-postcss/node_modules/style-loader": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz", + "integrity": "sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^2.7.0" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/@storybook/addon-toolbars": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-toolbars/-/addon-toolbars-8.4.7.tgz", + "integrity": "sha512-OSfdv5UZs+NdGB+nZmbafGUWimiweJ/56gShlw8Neo/4jOJl1R3rnRqqY7MYx8E4GwoX+i3GF5C3iWFNQqlDcw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.4.7" + } + }, + "node_modules/@storybook/addon-viewport": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/addon-viewport/-/addon-viewport-8.4.7.tgz", + "integrity": "sha512-hvczh/jjuXXcOogih09a663sRDDSATXwbE866al1DXgbDFraYD/LxX/QDb38W9hdjU9+Qhx8VFIcNWoMQns5HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "memoizerific": "^1.11.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.4.7" + } + }, + "node_modules/@storybook/addon-webpack5-compiler-babel": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.23.7", + "babel-loader": "^9.1.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/ajv": { + "version": "8.17.1", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/ajv-formats": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/ajv-keywords": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/babel-loader": { + "version": "9.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/find-cache-dir": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/@storybook/addon-webpack5-compiler-babel/node_modules/find-up": { "version": "6.3.0", @@ -6710,7 +7257,9 @@ } }, "node_modules/@storybook/blocks": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/blocks/-/blocks-8.4.7.tgz", + "integrity": "sha512-+QH7+JwXXXIyP3fRCxz/7E2VZepAanXJM7G8nbR3wWsqWgrRp4Wra6MvybxAYCxU7aNfJX5c+RW84SNikFpcIA==", "dev": true, "license": "MIT", "dependencies": { @@ -6725,7 +7274,7 @@ "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": "^8.4.6" + "storybook": "^8.4.7" }, "peerDependenciesMeta": { "react": { @@ -6736,77 +7285,30 @@ } } }, - "node_modules/@storybook/builder-webpack5": { - "version": "8.4.6", + "node_modules/@storybook/builder-vite": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/builder-vite/-/builder-vite-8.4.7.tgz", + "integrity": "sha512-LovyXG5VM0w7CovI/k56ZZyWCveQFVDl0m7WwetpmMh2mmFJ+uPQ35BBsgTvTfc8RHi+9Q3F58qP1MQSByXi9g==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core-webpack": "8.4.6", - "@types/node": "^22.0.0", - "@types/semver": "^7.3.4", + "@storybook/csf-plugin": "8.4.7", "browser-assert": "^1.2.1", - "case-sensitive-paths-webpack-plugin": "^2.4.0", - "cjs-module-lexer": "^1.2.3", - "constants-browserify": "^1.0.0", - "css-loader": "^6.7.1", - "es-module-lexer": "^1.5.0", - "fork-ts-checker-webpack-plugin": "^8.0.0", - "html-webpack-plugin": "^5.5.0", - "magic-string": "^0.30.5", - "path-browserify": "^1.0.1", - "process": "^0.11.10", - "semver": "^7.3.7", - "style-loader": "^3.3.1", - "terser-webpack-plugin": "^5.3.1", - "ts-dedent": "^2.0.0", - "url": "^0.11.0", - "util": "^0.12.4", - "util-deprecate": "^1.0.2", - "webpack": "5", - "webpack-dev-middleware": "^6.1.2", - "webpack-hot-middleware": "^2.25.1", - "webpack-virtual-modules": "^0.6.0" + "ts-dedent": "^2.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@storybook/builder-webpack5/node_modules/@types/node": { - "version": "22.10.1", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" - } - }, - "node_modules/@storybook/builder-webpack5/node_modules/undici-types": { - "version": "6.20.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@storybook/components": { - "version": "8.4.6", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + "storybook": "^8.4.7", + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" } }, "node_modules/@storybook/core": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/core/-/core-8.4.7.tgz", + "integrity": "sha512-7Z8Z0A+1YnhrrSXoKKwFFI4gnsLbWzr8fnDCU6+6HlDukFYh8GHRcZ9zKfqmy6U3hw2h8H5DrHsxWfyaYUUOoA==", "dev": true, "license": "MIT", "dependencies": { @@ -6835,35 +7337,6 @@ } } }, - "node_modules/@storybook/core-webpack": { - "version": "8.4.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "^22.0.0", - "ts-dedent": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.4.6" - } - }, - "node_modules/@storybook/core-webpack/node_modules/@types/node": { - "version": "22.10.1", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" - } - }, - "node_modules/@storybook/core-webpack/node_modules/undici-types": { - "version": "6.20.0", - "dev": true, - "license": "MIT" - }, "node_modules/@storybook/csf": { "version": "0.1.11", "dev": true, @@ -6873,7 +7346,9 @@ } }, "node_modules/@storybook/csf-plugin": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/csf-plugin/-/csf-plugin-8.4.7.tgz", + "integrity": "sha512-Fgogplu4HImgC+AYDcdGm1rmL6OR1rVdNX1Be9C/NEXwOCpbbBwi0BxTf/2ZxHRk9fCeaPEcOdP5S8QHfltc1g==", "dev": true, "license": "MIT", "dependencies": { @@ -6884,71 +7359,62 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" } }, "node_modules/@storybook/global": { "version": "5.0.0", "dev": true, "license": "MIT" - }, - "node_modules/@storybook/icons": { - "version": "1.2.12", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@storybook/instrumenter": { - "version": "8.4.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@storybook/global": "^5.0.0", - "@vitest/utils": "^2.1.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" + }, + "node_modules/@storybook/icons": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@storybook/icons/-/icons-1.3.0.tgz", + "integrity": "sha512-Nz/UzeYQdUZUhacrPyfkiiysSjydyjgg/p0P9HxB4p/WaJUUjMAcaoaLgy3EXx61zZJ3iD36WPuDkZs5QYrA0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "storybook": "^8.4.6" + "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" } }, - "node_modules/@storybook/manager-api": { - "version": "8.4.6", + "node_modules/@storybook/node-logger": { + "version": "6.5.16", + "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.5.16.tgz", + "integrity": "sha512-YjhBKrclQtjhqFNSO+BZK+RXOx6EQypAELJKoLFaawg331e8VUfvUuRCNB3fcEWp8G9oH13PQQte0OTjLyyOYg==", "dev": true, "license": "MIT", + "dependencies": { + "@types/npmlog": "^4.1.2", + "chalk": "^4.1.0", + "core-js": "^3.8.2", + "npmlog": "^5.0.1", + "pretty-hrtime": "^1.0.3" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, - "node_modules/@storybook/preset-react-webpack": { - "version": "8.4.6", + "node_modules/@storybook/react-vite": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/react-vite/-/react-vite-8.4.7.tgz", + "integrity": "sha512-iiY9iLdMXhDnilCEVxU6vQsN72pW3miaf0WSenOZRyZv3HdbpgOxI0qapOS0KCyRUnX9vTlmrSPTMchY4cAeOg==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core-webpack": "8.4.6", - "@storybook/react": "8.4.6", - "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0", - "@types/node": "^22.0.0", - "@types/semver": "^7.3.4", + "@joshwooding/vite-plugin-react-docgen-typescript": "0.4.2", + "@rollup/pluginutils": "^5.0.2", + "@storybook/builder-vite": "8.4.7", + "@storybook/react": "8.4.7", "find-up": "^5.0.0", - "magic-string": "^0.30.5", + "magic-string": "^0.30.0", "react-docgen": "^7.0.0", "resolve": "^1.22.8", - "semver": "^7.3.7", - "tsconfig-paths": "^4.2.0", - "webpack": "5" + "tsconfig-paths": "^4.2.0" }, "engines": { "node": ">=18.0.0" @@ -6960,29 +7426,14 @@ "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": "^8.4.6" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@storybook/preset-react-webpack/node_modules/@types/node": { - "version": "22.10.1", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.20.0" + "storybook": "^8.4.7", + "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" } }, - "node_modules/@storybook/preset-react-webpack/node_modules/undici-types": { - "version": "6.20.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@storybook/preview-api": { - "version": "8.4.6", + "node_modules/@storybook/react-vite/node_modules/@storybook/components": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-8.4.7.tgz", + "integrity": "sha512-uyJIcoyeMWKAvjrG9tJBUCKxr2WZk+PomgrgrUwejkIfXMO76i6jw9BwLa0NZjYdlthDv30r9FfbYZyeNPmF0g==", "dev": true, "license": "MIT", "funding": { @@ -6993,61 +7444,44 @@ "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, - "node_modules/@storybook/react": { - "version": "8.4.6", + "node_modules/@storybook/react-vite/node_modules/@storybook/instrumenter": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.4.7.tgz", + "integrity": "sha512-k6NSD3jaRCCHAFtqXZ7tw8jAzD/yTEWXGya+REgZqq5RCkmJ+9S4Ytp/6OhQMPtPFX23gAuJJzTQVLcCr+gjRg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@storybook/components": "8.4.6", "@storybook/global": "^5.0.0", - "@storybook/manager-api": "8.4.6", - "@storybook/preview-api": "8.4.6", - "@storybook/react-dom-shim": "8.4.6", - "@storybook/theming": "8.4.6" - }, - "engines": { - "node": ">=18.0.0" + "@vitest/utils": "^2.1.1" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "@storybook/test": "8.4.6", - "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": "^8.4.6", - "typescript": ">= 4.2.x" - }, - "peerDependenciesMeta": { - "@storybook/test": { - "optional": true - }, - "typescript": { - "optional": true - } + "storybook": "^8.4.7" } }, - "node_modules/@storybook/react-docgen-typescript-plugin": { - "version": "1.0.6--canary.9.0c3f3b7.0", + "node_modules/@storybook/react-vite/node_modules/@storybook/manager-api": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/manager-api/-/manager-api-8.4.7.tgz", + "integrity": "sha512-ELqemTviCxAsZ5tqUz39sDmQkvhVAvAgiplYy9Uf15kO0SP2+HKsCMzlrm2ue2FfkUNyqbDayCPPCB0Cdn/mpQ==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^4.1.1", - "endent": "^2.0.1", - "find-cache-dir": "^3.3.1", - "flat-cache": "^3.0.4", - "micromatch": "^4.0.2", - "react-docgen-typescript": "^2.2.2", - "tslib": "^2.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "typescript": ">= 4.x", - "webpack": ">= 4" + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, - "node_modules/@storybook/react-dom-shim": { - "version": "8.4.6", + "node_modules/@storybook/react-vite/node_modules/@storybook/preview-api": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/preview-api/-/preview-api-8.4.7.tgz", + "integrity": "sha512-0QVQwHw+OyZGHAJEXo6Knx+6/4er7n2rTDE5RYJ9F2E2Lg42E19pfdLlq2Jhoods2Xrclo3wj6GWR//Ahi39Eg==", "dev": true, "license": "MIT", "funding": { @@ -7055,20 +7489,22 @@ "url": "https://opencollective.com/storybook" }, "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": "^8.4.6" + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, - "node_modules/@storybook/react-webpack5": { - "version": "8.4.6", + "node_modules/@storybook/react-vite/node_modules/@storybook/react": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/react/-/react-8.4.7.tgz", + "integrity": "sha512-nQ0/7i2DkaCb7dy0NaT95llRVNYWQiPIVuhNfjr1mVhEP7XD090p0g7eqUmsx8vfdHh2BzWEo6CoBFRd3+EXxw==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/builder-webpack5": "8.4.6", - "@storybook/preset-react-webpack": "8.4.6", - "@storybook/react": "8.4.6", - "@types/node": "^22.0.0" + "@storybook/components": "8.4.7", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "8.4.7", + "@storybook/preview-api": "8.4.7", + "@storybook/react-dom-shim": "8.4.7", + "@storybook/theming": "8.4.7" }, "engines": { "node": ">=18.0.0" @@ -7078,33 +7514,49 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { + "@storybook/test": "8.4.7", "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": "^8.4.6", + "storybook": "^8.4.7", "typescript": ">= 4.2.x" }, "peerDependenciesMeta": { + "@storybook/test": { + "optional": true + }, "typescript": { "optional": true } } }, - "node_modules/@storybook/react-webpack5/node_modules/@types/node": { - "version": "22.7.5", + "node_modules/@storybook/react-vite/node_modules/@storybook/react-dom-shim": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.4.7.tgz", + "integrity": "sha512-6bkG2jvKTmWrmVzCgwpTxwIugd7Lu+2btsLAqhQSzDyIj2/uhMNp8xIMr/NBDtLgq3nomt9gefNa9xxLwk/OMg==", "dev": true, "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "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": "^8.4.7" } }, - "node_modules/@storybook/test": { - "version": "8.4.6", + "node_modules/@storybook/react-vite/node_modules/@storybook/test": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.4.7.tgz", + "integrity": "sha512-AhvJsu5zl3uG40itSQVuSy5WByp3UVhS6xAnme4FWRwgSxhvZjATJ3AZkkHWOYjnnk+P2/sbz/XuPli1FVCWoQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@storybook/csf": "^0.1.11", "@storybook/global": "^5.0.0", - "@storybook/instrumenter": "8.4.6", + "@storybook/instrumenter": "8.4.7", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@testing-library/user-event": "14.5.2", @@ -7116,13 +7568,31 @@ "url": "https://opencollective.com/storybook" }, "peerDependencies": { - "storybook": "^8.4.6" + "storybook": "^8.4.7" + } + }, + "node_modules/@storybook/react-vite/node_modules/@storybook/theming": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-8.4.7.tgz", + "integrity": "sha512-99rgLEjf7iwfSEmdqlHkSG3AyLcK0sfExcr0jnc6rLiAkBhzuIsvcHjjUwkR210SOCgXqBPW0ZA6uhnuyppHLw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, - "node_modules/@storybook/test/node_modules/@vitest/expect": { + "node_modules/@storybook/react-vite/node_modules/@vitest/expect": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", + "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@vitest/spy": "2.0.5", "@vitest/utils": "2.0.5", @@ -7133,62 +7603,66 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/test/node_modules/@vitest/pretty-format": { + "node_modules/@storybook/react-vite/node_modules/@vitest/expect/node_modules/@vitest/utils": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", + "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { + "@vitest/pretty-format": "2.0.5", + "estree-walker": "^3.0.3", + "loupe": "^3.1.1", "tinyrainbow": "^1.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/test/node_modules/@vitest/spy": { + "node_modules/@storybook/react-vite/node_modules/@vitest/pretty-format": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", + "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "tinyspy": "^3.0.0" + "tinyrainbow": "^1.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/test/node_modules/@vitest/utils": { + "node_modules/@storybook/react-vite/node_modules/@vitest/spy": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", + "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@vitest/pretty-format": "2.0.5", - "estree-walker": "^3.0.3", - "loupe": "^3.1.1", - "tinyrainbow": "^1.2.0" + "tinyspy": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@storybook/test/node_modules/estree-walker": { + "node_modules/@storybook/react-vite/node_modules/estree-walker": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/estree": "^1.0.0" } }, - "node_modules/@storybook/theming": { - "version": "8.4.6", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" - } - }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "7.0.0", "dev": true, @@ -8298,6 +8772,8 @@ "version": "4.1.9", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/node": "*" } @@ -8310,11 +8786,6 @@ "@types/unist": "*" } }, - "node_modules/@types/html-minifier-terser": { - "version": "6.1.0", - "dev": true, - "license": "MIT" - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "dev": true, @@ -8374,16 +8845,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/jsdom": { - "version": "20.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, "node_modules/@types/json-schema": { "version": "7.0.15", "dev": true, @@ -8433,6 +8894,16 @@ "undici-types": "~6.19.2" } }, + "node_modules/@types/npmlog": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/npmlog/-/npmlog-4.1.6.tgz", + "integrity": "sha512-0l3z16vnlJGl2Mi/rgJFrdwfLZ4jfNYgE6ZShEpjqhHuGTqdEzNles03NpYHwUMVYZa+Tj46UxKIEpE78lQ3DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/parse-json": { "version": "4.0.2", "dev": true, @@ -8500,6 +8971,8 @@ }, "node_modules/@types/uuid": { "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true, "license": "MIT" }, @@ -9051,6 +9524,7 @@ "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -9059,22 +9533,26 @@ "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.11.6", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.12.1", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -9084,12 +9562,14 @@ "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.6", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -9101,6 +9581,7 @@ "version": "1.11.6", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -9109,6 +9590,7 @@ "version": "1.11.6", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -9116,12 +9598,14 @@ "node_modules/@webassemblyjs/utf8": { "version": "1.11.6", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -9137,6 +9621,7 @@ "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -9149,6 +9634,7 @@ "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -9160,6 +9646,7 @@ "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -9173,6 +9660,7 @@ "version": "1.12.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -9181,12 +9669,14 @@ "node_modules/@xtuc/ieee754": { "version": "1.2.0", "dev": true, - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "peer": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "dev": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "peer": true }, "node_modules/abab": { "version": "2.0.6", @@ -9357,17 +9847,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "license": "Apache-2.0", - "bin": { - "ansi-html": "bin/ansi-html" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "license": "MIT", @@ -9403,6 +9882,28 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/arg": { "version": "5.0.2", "license": "MIT" @@ -9574,6 +10075,8 @@ }, "node_modules/ast-types": { "version": "0.16.1", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", + "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -9641,6 +10144,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -9657,28 +10162,12 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-loader": { - "version": "8.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.4", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 8.9" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -9694,6 +10183,8 @@ "version": "29.6.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -9752,6 +10243,8 @@ "version": "1.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -9777,6 +10270,8 @@ "version": "29.6.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" @@ -9803,6 +10298,8 @@ }, "node_modules/better-opn": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/better-opn/-/better-opn-3.0.2.tgz", + "integrity": "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9915,6 +10412,8 @@ "version": "2.1.1", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "node-int64": "^0.4.0" } @@ -9922,7 +10421,8 @@ "node_modules/buffer-from": { "version": "1.1.2", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/cac": { "version": "6.7.14", @@ -9957,15 +10457,6 @@ "node": ">=6" } }, - "node_modules/camel-case": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, "node_modules/camelcase": { "version": "6.3.0", "dev": true, @@ -10003,14 +10494,6 @@ ], "license": "CC-BY-4.0" }, - "node_modules/case-sensitive-paths-webpack-plugin": { - "version": "2.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/catharsis": { "version": "0.9.0", "dev": true, @@ -10064,6 +10547,8 @@ "version": "1.0.2", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" } @@ -10153,6 +10638,7 @@ "version": "1.0.4", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6.0" } @@ -10174,23 +10660,14 @@ "node_modules/cjs-module-lexer": { "version": "1.4.1", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/classnames": { "version": "2.5.1", "license": "MIT" }, - "node_modules/clean-css": { - "version": "5.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 10.0" - } - }, "node_modules/cli-width": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", @@ -10229,6 +10706,8 @@ "version": "4.6.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -10237,7 +10716,9 @@ "node_modules/collect-v8-coverage": { "version": "1.0.2", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/color-convert": { "version": "2.0.1", @@ -10253,10 +10734,15 @@ "version": "1.1.4", "license": "MIT" }, - "node_modules/colorette": { - "version": "2.0.20", + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true, - "license": "MIT" + "license": "ISC", + "bin": { + "color-support": "bin.js" + } }, "node_modules/combined-stream": { "version": "1.0.8", @@ -10278,24 +10764,11 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/commander": { - "version": "8.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, "node_modules/common-path-prefix": { "version": "3.0.0", "dev": true, "license": "ISC" }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/compare-func": { "version": "2.0.0", "dev": true, @@ -10325,10 +10798,12 @@ "dev": true, "license": "MIT" }, - "node_modules/constants-browserify": { - "version": "1.0.0", + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true, - "license": "MIT" + "license": "ISC" }, "node_modules/conventional-changelog-angular": { "version": "7.0.0", @@ -10383,6 +10858,18 @@ "node": ">= 0.6" } }, + "node_modules/core-js": { + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", + "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-compat": { "version": "3.38.1", "dev": true, @@ -10440,6 +10927,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -10721,11 +11210,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/dedent": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, "node_modules/deep-eql": { "version": "5.0.2", "dev": true, @@ -10795,6 +11279,8 @@ }, "node_modules/define-lazy-prop": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", "dev": true, "license": "MIT", "engines": { @@ -10825,6 +11311,13 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true, + "license": "MIT" + }, "node_modules/dequal": { "version": "2.0.3", "dev": true, @@ -10857,6 +11350,8 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=8" } @@ -10916,14 +11411,6 @@ "dev": true, "license": "MIT" }, - "node_modules/dom-converter": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "utila": "~0.4" - } - }, "node_modules/dom-serializer": { "version": "1.4.1", "dev": true, @@ -11027,6 +11514,8 @@ "version": "0.13.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=12" }, @@ -11046,16 +11535,6 @@ "node": ">= 4" } }, - "node_modules/endent": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "dedent": "^0.7.0", - "fast-json-parse": "^1.0.3", - "objectorarray": "^1.0.5" - } - }, "node_modules/enhanced-resolve": { "version": "5.17.1", "dev": true, @@ -11229,7 +11708,8 @@ "node_modules/es-module-lexer": { "version": "1.5.4", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/es-object-atoms": { "version": "1.0.0", @@ -11281,6 +11761,8 @@ }, "node_modules/esbuild": { "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -11319,6 +11801,8 @@ }, "node_modules/esbuild-register": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.6.0.tgz", + "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==", "dev": true, "license": "MIT", "dependencies": { @@ -11336,6 +11820,7 @@ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" @@ -11352,6 +11837,7 @@ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -11368,6 +11854,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -11384,6 +11871,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -11400,6 +11888,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -11416,6 +11905,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -11432,6 +11922,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -11448,6 +11939,7 @@ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11464,6 +11956,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11480,6 +11973,7 @@ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11496,6 +11990,7 @@ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11512,6 +12007,7 @@ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11528,6 +12024,7 @@ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11544,6 +12041,7 @@ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11560,6 +12058,7 @@ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11576,6 +12075,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -11592,6 +12092,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -11608,6 +12109,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -11624,6 +12126,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -11640,6 +12143,7 @@ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -11656,6 +12160,7 @@ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -11672,6 +12177,7 @@ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -12165,6 +12671,7 @@ "version": "3.3.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.8.x" } @@ -12173,6 +12680,8 @@ "version": "5.1.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -12194,6 +12703,8 @@ "node_modules/exit": { "version": "0.1.2", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.8.0" } @@ -12271,11 +12782,6 @@ "node": ">= 6" } }, - "node_modules/fast-json-parse": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "dev": true, @@ -12302,6 +12808,8 @@ "version": "2.0.2", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "bser": "2.1.1" } @@ -12332,22 +12840,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -12439,97 +12931,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/fork-ts-checker-webpack-plugin": { - "version": "8.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "cosmiconfig": "^7.0.1", - "deepmerge": "^4.2.2", - "fs-extra": "^10.0.0", - "memfs": "^3.4.1", - "minimatch": "^3.0.4", - "node-abort-controller": "^3.0.1", - "schema-utils": "^3.1.1", - "semver": "^7.3.5", - "tapable": "^2.2.1" - }, - "engines": { - "node": ">=12.13.0", - "yarn": ">=1.0.0" - }, - "peerDependencies": { - "typescript": ">3.6.0", - "webpack": "^5.11.0" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/cosmiconfig": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/fs-extra": { - "version": "10.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/jsonfile": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/universalify": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/form-data": { "version": "4.0.1", "dev": true, @@ -12568,11 +12969,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/fs-monkey": { - "version": "1.0.6", - "dev": true, - "license": "Unlicense" - }, "node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -12621,6 +13017,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "dev": true, @@ -12665,6 +13083,8 @@ "version": "0.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=8.0.0" } @@ -12673,6 +13093,8 @@ "version": "6.0.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -12754,7 +13176,8 @@ "node_modules/glob-to-regexp": { "version": "0.4.1", "dev": true, - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "peer": true }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", @@ -12968,6 +13391,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true, + "license": "ISC" + }, "node_modules/hasown": { "version": "2.0.2", "license": "MIT", @@ -13073,45 +13503,12 @@ "node": ">=18" } }, - "node_modules/html-entities": { - "version": "2.5.2", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ], - "license": "MIT" - }, "node_modules/html-escaper": { "version": "2.0.2", "dev": true, - "license": "MIT" - }, - "node_modules/html-minifier-terser": { - "version": "6.1.0", - "dev": true, "license": "MIT", - "dependencies": { - "camel-case": "^4.1.2", - "clean-css": "^5.2.2", - "commander": "^8.3.0", - "he": "^1.2.0", - "param-case": "^3.0.4", - "relateurl": "^0.2.7", - "terser": "^5.10.0" - }, - "bin": { - "html-minifier-terser": "cli.js" - }, - "engines": { - "node": ">=12" - } + "optional": true, + "peer": true }, "node_modules/html-url-attributes": { "version": "3.0.1", @@ -13122,63 +13519,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/html-webpack-plugin": { - "version": "5.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/html-minifier-terser": "^6.0.0", - "html-minifier-terser": "^6.0.2", - "lodash": "^4.17.21", - "pretty-error": "^4.0.0", - "tapable": "^2.0.0" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/html-webpack-plugin" - }, - "peerDependencies": { - "@rspack/core": "0.x || 1.x", - "webpack": "^5.20.0" - }, - "peerDependenciesMeta": { - "@rspack/core": { - "optional": true - }, - "webpack": { - "optional": true - } - } - }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "2.2.0", - "dev": true, - "license": "BSD-2-Clause", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/http-proxy-agent": { "version": "7.0.2", "dev": true, @@ -13212,6 +13552,8 @@ "version": "2.1.0", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "engines": { "node": ">=10.17.0" } @@ -13314,6 +13656,8 @@ "version": "3.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -13575,6 +13919,8 @@ }, "node_modules/is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, "license": "MIT", "bin": { @@ -13616,6 +13962,8 @@ "version": "2.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" } @@ -13782,6 +14130,8 @@ "version": "2.0.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=8" }, @@ -13901,6 +14251,8 @@ }, "node_modules/is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "license": "MIT", "dependencies": { @@ -13923,6 +14275,8 @@ "version": "3.2.2", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "engines": { "node": ">=8" } @@ -13931,6 +14285,8 @@ "version": "5.2.1", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -13946,6 +14302,8 @@ "version": "6.3.1", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "bin": { "semver": "bin/semver.js" } @@ -13954,6 +14312,8 @@ "version": "3.0.1", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -13967,6 +14327,8 @@ "version": "4.0.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "semver": "^7.5.3" }, @@ -13981,6 +14343,8 @@ "version": "4.0.1", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -13994,6 +14358,8 @@ "version": "3.1.7", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -14034,6 +14400,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -14059,6 +14427,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", @@ -14072,6 +14442,8 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -14086,6 +14458,8 @@ "version": "0.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -14097,6 +14471,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -14127,6 +14503,8 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -14138,6 +14516,8 @@ "version": "1.5.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, @@ -14151,6 +14531,8 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -14165,6 +14547,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -14177,12 +14561,16 @@ "node_modules/jest-circus/node_modules/react-is": { "version": "18.3.1", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/jest-circus/node_modules/yocto-queue": { "version": "0.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -14194,6 +14582,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -14226,6 +14616,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", @@ -14270,6 +14662,8 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -14281,6 +14675,8 @@ "version": "7.2.3", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -14293,400 +14689,145 @@ "node": "*" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-config/node_modules/react-is": { - "version": "18.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/react-is": { - "version": "18.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/react-is": { - "version": "18.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-environment-jsdom": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-environment-jsdom/node_modules/acorn": { - "version": "8.12.1", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/acorn-globals": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, - "node_modules/jest-environment-jsdom/node_modules/acorn-walk": { - "version": "8.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/cssstyle": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-jsdom/node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-environment-jsdom/node_modules/data-urls": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-environment-jsdom/node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-environment-jsdom/node_modules/https-proxy-agent": { - "version": "5.0.1", + "node_modules/jest-config/node_modules/pretty-format": { + "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">= 6" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/iconv-lite": { - "version": "0.6.3", + "node_modules/jest-config/node_modules/react-is": { + "version": "18.3.1", "dev": true, "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } + "optional": true, + "peer": true }, - "node_modules/jest-environment-jsdom/node_modules/jsdom": { - "version": "20.0.3", + "node_modules/jest-diff": { + "version": "29.7.0", "dev": true, "license": "MIT", "dependencies": { - "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">=14" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/tough-cookie": { - "version": "4.1.4", + "node_modules/jest-diff/node_modules/ansi-styles": { + "version": "5.2.0", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-environment-jsdom/node_modules/tr46": { - "version": "3.0.0", + "node_modules/jest-diff/node_modules/pretty-format": { + "version": "29.7.0", "dev": true, "license": "MIT", "dependencies": { - "punycode": "^2.1.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=12" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/universalify": { - "version": "0.2.0", + "node_modules/jest-diff/node_modules/react-is": { + "version": "18.3.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } + "license": "MIT" }, - "node_modules/jest-environment-jsdom/node_modules/w3c-xmlserializer": { - "version": "4.0.0", + "node_modules/jest-docblock": { + "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "xml-name-validator": "^4.0.0" + "detect-newline": "^3.0.0" }, "engines": { - "node": ">=14" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-encoding": { - "version": "2.0.0", + "node_modules/jest-each": { + "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "iconv-lite": "0.6.3" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">=12" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-mimetype": { - "version": "3.0.0", + "node_modules/jest-each/node_modules/ansi-styles": { + "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-url": { - "version": "11.0.0", + "node_modules/jest-each/node_modules/pretty-format": { + "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=12" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/xml-name-validator": { - "version": "4.0.0", + "node_modules/jest-each/node_modules/react-is": { + "version": "18.3.1", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12" - } + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/jest-environment-node": { "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -14711,6 +14852,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -14735,6 +14878,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" @@ -14747,6 +14892,8 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -14758,6 +14905,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -14770,7 +14919,9 @@ "node_modules/jest-leak-detector/node_modules/react-is": { "version": "18.3.1", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/jest-matcher-utils": { "version": "29.7.0", @@ -14867,6 +15018,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -14880,6 +15033,8 @@ "version": "1.2.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" }, @@ -14896,6 +15051,8 @@ "version": "29.6.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -14904,6 +15061,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", @@ -14923,6 +15082,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" @@ -14935,6 +15096,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", @@ -14966,6 +15129,8 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -14980,6 +15145,8 @@ "version": "0.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -14991,6 +15158,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -15023,6 +15192,8 @@ "version": "7.2.3", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -15042,6 +15213,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", @@ -15072,6 +15245,8 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -15083,6 +15258,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -15095,7 +15272,9 @@ "node_modules/jest-snapshot/node_modules/react-is": { "version": "18.3.1", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/jest-util": { "version": "29.7.0", @@ -15117,6 +15296,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", @@ -15133,6 +15314,8 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -15144,6 +15327,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -15156,12 +15341,16 @@ "node_modules/jest-validate/node_modules/react-is": { "version": "18.3.1", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/jest-watcher": { "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -15180,6 +15369,8 @@ "version": "4.0.2", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -15192,6 +15383,8 @@ "version": "29.7.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -15206,6 +15399,8 @@ "version": "8.1.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -15282,6 +15477,8 @@ }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", + "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", "dev": true, "license": "MIT", "engines": { @@ -15625,6 +15822,8 @@ "version": "3.0.3", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" } @@ -15646,6 +15845,8 @@ "version": "3.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" } @@ -15710,6 +15911,7 @@ "version": "4.3.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6.11.5" } @@ -15911,12 +16113,16 @@ "version": "1.0.12", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { "tmpl": "1.0.5" } }, "node_modules/map-or-similar": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", + "integrity": "sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==", "dev": true, "license": "MIT" }, @@ -16240,19 +16446,10 @@ "dev": true, "license": "MIT" }, - "node_modules/memfs": { - "version": "3.5.3", - "dev": true, - "license": "Unlicense", - "dependencies": { - "fs-monkey": "^1.0.4" - }, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/memoizerific": { "version": "1.11.3", + "resolved": "https://registry.npmjs.org/memoizerific/-/memoizerific-1.11.3.tgz", + "integrity": "sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==", "dev": true, "license": "MIT", "dependencies": { @@ -16862,6 +17059,8 @@ "version": "2.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" } @@ -17072,11 +17271,6 @@ "tslib": "^2.0.3" } }, - "node_modules/node-abort-controller": { - "version": "3.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/node-addon-api": { "version": "7.1.1", "license": "MIT", @@ -17085,7 +17279,9 @@ "node_modules/node-int64": { "version": "0.4.0", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/node-releases": { "version": "2.0.18", @@ -17175,6 +17371,8 @@ "version": "4.0.1", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "path-key": "^3.0.0" }, @@ -17182,6 +17380,20 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "node_modules/nth-check": { "version": "2.1.1", "dev": true, @@ -17313,11 +17525,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/objectorarray": { - "version": "1.0.5", - "dev": true, - "license": "ISC" - }, "node_modules/once": { "version": "1.4.0", "dev": true, @@ -17330,6 +17537,8 @@ "version": "5.1.2", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -17342,6 +17551,8 @@ }, "node_modules/open": { "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dev": true, "license": "MIT", "dependencies": { @@ -17483,15 +17694,6 @@ "dev": true, "license": "MIT" }, - "node_modules/param-case": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/parent-module": { "version": "1.0.1", "dev": true, @@ -17545,23 +17747,14 @@ } }, "node_modules/parse5": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^4.5.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/pascal-case": { - "version": "3.1.2", + "version": "7.2.0", "dev": true, "license": "MIT", "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/path-browserify": { @@ -17675,6 +17868,8 @@ "version": "4.2.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "find-up": "^4.0.0" }, @@ -17686,6 +17881,8 @@ "version": "4.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -17698,6 +17895,8 @@ "version": "5.0.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -17709,6 +17908,8 @@ "version": "4.1.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -18011,15 +18212,6 @@ "node": ">=6.0.0" } }, - "node_modules/pretty-error": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.20", - "renderkid": "^3.0.0" - } - }, "node_modules/pretty-format": { "version": "27.5.1", "dev": true, @@ -18044,6 +18236,16 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/process": { "version": "0.11.10", "dev": true, @@ -18056,6 +18258,8 @@ "version": "2.4.2", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -18118,21 +18322,9 @@ "url": "https://opencollective.com/fast-check" } ], - "license": "MIT" - }, - "node_modules/qs": { - "version": "6.13.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/querystringify": { "version": "2.2.0", @@ -18160,18 +18352,11 @@ "version": "2.1.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "safe-buffer": "^5.1.0" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/react": { "version": "18.3.1", "license": "MIT", @@ -18474,6 +18659,21 @@ "node": ">=4" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "license": "MIT", @@ -18494,6 +18694,8 @@ }, "node_modules/recast": { "version": "0.23.9", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.9.tgz", + "integrity": "sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==", "dev": true, "license": "MIT", "dependencies": { @@ -18634,14 +18836,6 @@ "regjsparser": "bin/parser" } }, - "node_modules/relateurl": { - "version": "0.2.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/remark-gfm": { "version": "4.0.0", "dev": true, @@ -18709,18 +18903,6 @@ "dev": true, "license": "MIT" }, - "node_modules/renderkid": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "css-select": "^4.1.3", - "dom-converter": "^0.2.0", - "htmlparser2": "^6.1.0", - "lodash": "^4.17.21", - "strip-ansi": "^6.0.1" - } - }, "node_modules/require-directory": { "version": "2.1.1", "license": "MIT", @@ -18767,6 +18949,8 @@ "version": "3.0.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "resolve-from": "^5.0.0" }, @@ -18786,6 +18970,8 @@ "version": "2.0.2", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" } @@ -19066,10 +19252,18 @@ "version": "6.0.2", "dev": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "randombytes": "^2.1.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true, + "license": "ISC" + }, "node_modules/set-function-length": { "version": "1.2.2", "license": "MIT", @@ -19176,7 +19370,9 @@ "node_modules/sisteransi": { "version": "1.0.5", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/slash": { "version": "3.0.0", @@ -19222,6 +19418,8 @@ "version": "0.5.13", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -19384,11 +19582,13 @@ } }, "node_modules/storybook": { - "version": "8.4.6", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/storybook/-/storybook-8.4.7.tgz", + "integrity": "sha512-RP/nMJxiWyFc8EVMH5gp20ID032Wvk+Yr3lmKidoegto5Iy+2dVQnUoElZb2zpbVXNHWakGuAkfI0dY1Hfp/vw==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core": "8.4.6" + "@storybook/core": "8.4.7" }, "bin": { "getstorybook": "bin/index.cjs", @@ -19414,6 +19614,16 @@ "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", "license": "MIT" }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-argv": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", @@ -19605,6 +19815,8 @@ "version": "4.0.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=8" } @@ -19613,6 +19825,8 @@ "version": "2.0.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=6" } @@ -19943,6 +20157,7 @@ "version": "5.34.1", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -19960,6 +20175,7 @@ "version": "5.3.10", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -19993,6 +20209,7 @@ "version": "27.5.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -20006,6 +20223,7 @@ "version": "3.3.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -20023,6 +20241,7 @@ "version": "8.1.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -20037,6 +20256,7 @@ "version": "8.12.1", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -20047,12 +20267,14 @@ "node_modules/terser/node_modules/commander": { "version": "2.20.3", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/terser/node_modules/source-map-support": { "version": "0.5.21", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -20062,6 +20284,8 @@ "version": "6.0.0", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -20075,6 +20299,8 @@ "version": "7.2.3", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -20147,6 +20373,8 @@ }, "node_modules/tiny-invariant": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", "dev": true, "license": "MIT" }, @@ -20261,7 +20489,9 @@ "node_modules/tmpl": { "version": "1.0.5", "dev": true, - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "optional": true, + "peer": true }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -20480,6 +20710,8 @@ "version": "4.0.8", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=4" } @@ -20976,6 +21208,8 @@ }, "node_modules/unplugin": { "version": "1.16.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.0.tgz", + "integrity": "sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==", "dev": true, "license": "MIT", "dependencies": { @@ -20988,6 +21222,8 @@ }, "node_modules/unplugin/node_modules/acorn": { "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -21034,18 +21270,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url": { - "version": "0.11.4", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^1.4.1", - "qs": "^6.12.3" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/url-parse": { "version": "1.5.10", "license": "MIT", @@ -21054,11 +21278,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/url/node_modules/punycode": { - "version": "1.4.1", - "dev": true, - "license": "MIT" - }, "node_modules/use-sync-external-store": { "version": "1.2.2", "license": "MIT", @@ -21081,13 +21300,10 @@ "version": "1.0.2", "license": "MIT" }, - "node_modules/utila": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/uuid": { "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true, "funding": [ "https://github.com/sponsors/broofa", @@ -21102,6 +21318,8 @@ "version": "9.3.0", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -22088,182 +22306,85 @@ "node_modules/walker": { "version": "1.0.8", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/watchpack": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, - "node_modules/webpack": { - "version": "5.95.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-dev-middleware": { - "version": "6.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^3.4.12", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - } - } - }, - "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-middleware/node_modules/ajv-formats": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "makeerror": "1.0.12" } }, - "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { - "version": "5.1.0", + "node_modules/watchpack": { + "version": "2.4.2", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "fast-deep-equal": "^3.1.3" + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" }, - "peerDependencies": { - "ajv": "^8.8.2" + "engines": { + "node": ">=10.13.0" } }, - "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": { - "version": "1.0.0", + "node_modules/webidl-conversions": { + "version": "7.0.0", "dev": true, - "license": "MIT" + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } }, - "node_modules/webpack-dev-middleware/node_modules/schema-utils": { - "version": "4.2.0", + "node_modules/webpack": { + "version": "5.95.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" }, "engines": { - "node": ">= 12.13.0" + "node": ">=10.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" - } - }, - "node_modules/webpack-hot-middleware": { - "version": "2.26.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-html-community": "0.0.8", - "html-entities": "^2.1.0", - "strip-ansi": "^6.0.0" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } } }, "node_modules/webpack-sources": { "version": "3.2.3", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10.13.0" } @@ -22277,6 +22398,7 @@ "version": "8.12.1", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -22288,6 +22410,7 @@ "version": "1.9.5", "dev": true, "license": "MIT", + "peer": true, "peerDependencies": { "acorn": "^8" } @@ -22296,6 +22419,7 @@ "version": "5.1.1", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -22308,6 +22432,7 @@ "version": "4.3.0", "dev": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": ">=4.0" } @@ -22316,6 +22441,7 @@ "version": "3.3.0", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -22473,6 +22599,16 @@ "node": ">=8" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "dev": true, @@ -22543,6 +22679,8 @@ "version": "4.0.2", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" @@ -23590,29 +23728,27 @@ }, "packages/ui-components": { "name": "@cloudoperators/juno-ui-components", - "version": "2.35.0", + "version": "2.35.1", "license": "Apache-2.0", "devDependencies": { - "@babel/plugin-transform-parameters": "7.25.9", - "@babel/preset-env": "7.26.0", - "@babel/preset-react": "7.25.9", "@cloudoperators/juno-config": "*", "@floating-ui/react": "0.25.4", "@headlessui-float/react": "0.15.0", "@headlessui/react": "1.7.19", "@material-design-icons/svg": "0.14.13", "@mdx-js/react": "2.3.0", - "@storybook/addon-docs": "8.4.6", - "@storybook/addon-essentials": "8.4.6", - "@storybook/addon-interactions": "8.4.6", - "@storybook/addon-links": "8.4.6", - "@storybook/addon-mdx-gfm": "8.4.6", + "@storybook/addon-docs": "8.4.7", + "@storybook/addon-essentials": "8.4.7", + "@storybook/addon-interactions": "8.4.7", + "@storybook/addon-links": "8.4.7", + "@storybook/addon-mdx-gfm": "8.4.7", + "@storybook/addon-postcss": "^2.0.0", "@storybook/addon-webpack5-compiler-babel": "3.0.3", - "@storybook/blocks": "8.4.6", - "@storybook/manager-api": "8.4.6", - "@storybook/react": "8.4.6", - "@storybook/react-webpack5": "8.4.6", - "@storybook/test": "8.4.6", + "@storybook/blocks": "8.4.7", + "@storybook/manager-api": "8.4.7", + "@storybook/react": "8.4.7", + "@storybook/react-vite": "8.4.7", + "@storybook/test": "8.4.7", "@svgr/webpack": "6.5.1", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", @@ -23622,14 +23758,10 @@ "@vitejs/plugin-react": "4.3.4", "add": "2.0.6", "autoprefixer": "10.4.20", - "babel-jest": "29.7.0", - "babel-loader": "8.4.1", "css-loader": "6.11.0", "flatpickr": "4.6.13", "focus-trap-react": "10.3.1", "glob": "8.1.0", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", "jsdom": "24.1.3", "node-sass-glob-importer": "3.0.2", "postcss": "8.4.49", @@ -23644,7 +23776,7 @@ "regenerator-runtime": "0.14.1", "sass": "^1.81.1", "sass-loader": "12.6.0", - "storybook": "8.4.6", + "storybook": "8.4.7", "style-loader": "3.3.4", "tailwindcss": "3.4.15", "ts-loader": "9.5.1", @@ -23719,6 +23851,236 @@ "darwin" ] }, + "packages/ui-components/node_modules/@storybook/components": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-8.4.7.tgz", + "integrity": "sha512-uyJIcoyeMWKAvjrG9tJBUCKxr2WZk+PomgrgrUwejkIfXMO76i6jw9BwLa0NZjYdlthDv30r9FfbYZyeNPmF0g==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + } + }, + "packages/ui-components/node_modules/@storybook/instrumenter": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.4.7.tgz", + "integrity": "sha512-k6NSD3jaRCCHAFtqXZ7tw8jAzD/yTEWXGya+REgZqq5RCkmJ+9S4Ytp/6OhQMPtPFX23gAuJJzTQVLcCr+gjRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/global": "^5.0.0", + "@vitest/utils": "^2.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.4.7" + } + }, + "packages/ui-components/node_modules/@storybook/manager-api": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/manager-api/-/manager-api-8.4.7.tgz", + "integrity": "sha512-ELqemTviCxAsZ5tqUz39sDmQkvhVAvAgiplYy9Uf15kO0SP2+HKsCMzlrm2ue2FfkUNyqbDayCPPCB0Cdn/mpQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + } + }, + "packages/ui-components/node_modules/@storybook/preview-api": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/preview-api/-/preview-api-8.4.7.tgz", + "integrity": "sha512-0QVQwHw+OyZGHAJEXo6Knx+6/4er7n2rTDE5RYJ9F2E2Lg42E19pfdLlq2Jhoods2Xrclo3wj6GWR//Ahi39Eg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + } + }, + "packages/ui-components/node_modules/@storybook/react": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/react/-/react-8.4.7.tgz", + "integrity": "sha512-nQ0/7i2DkaCb7dy0NaT95llRVNYWQiPIVuhNfjr1mVhEP7XD090p0g7eqUmsx8vfdHh2BzWEo6CoBFRd3+EXxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/components": "8.4.7", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "8.4.7", + "@storybook/preview-api": "8.4.7", + "@storybook/react-dom-shim": "8.4.7", + "@storybook/theming": "8.4.7" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "@storybook/test": "8.4.7", + "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": "^8.4.7", + "typescript": ">= 4.2.x" + }, + "peerDependenciesMeta": { + "@storybook/test": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "packages/ui-components/node_modules/@storybook/react/node_modules/@storybook/react-dom-shim": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.4.7.tgz", + "integrity": "sha512-6bkG2jvKTmWrmVzCgwpTxwIugd7Lu+2btsLAqhQSzDyIj2/uhMNp8xIMr/NBDtLgq3nomt9gefNa9xxLwk/OMg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "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": "^8.4.7" + } + }, + "packages/ui-components/node_modules/@storybook/test": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.4.7.tgz", + "integrity": "sha512-AhvJsu5zl3uG40itSQVuSy5WByp3UVhS6xAnme4FWRwgSxhvZjATJ3AZkkHWOYjnnk+P2/sbz/XuPli1FVCWoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/csf": "^0.1.11", + "@storybook/global": "^5.0.0", + "@storybook/instrumenter": "8.4.7", + "@testing-library/dom": "10.4.0", + "@testing-library/jest-dom": "6.5.0", + "@testing-library/user-event": "14.5.2", + "@vitest/expect": "2.0.5", + "@vitest/spy": "2.0.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.4.7" + } + }, + "packages/ui-components/node_modules/@storybook/test/node_modules/@testing-library/jest-dom": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.5.0.tgz", + "integrity": "sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "packages/ui-components/node_modules/@storybook/test/node_modules/@vitest/expect": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", + "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "2.0.5", + "@vitest/utils": "2.0.5", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/ui-components/node_modules/@storybook/test/node_modules/@vitest/pretty-format": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", + "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/ui-components/node_modules/@storybook/test/node_modules/@vitest/spy": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", + "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/ui-components/node_modules/@storybook/test/node_modules/@vitest/utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", + "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.0.5", + "estree-walker": "^3.0.3", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/ui-components/node_modules/@storybook/theming": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-8.4.7.tgz", + "integrity": "sha512-99rgLEjf7iwfSEmdqlHkSG3AyLcK0sfExcr0jnc6rLiAkBhzuIsvcHjjUwkR210SOCgXqBPW0ZA6uhnuyppHLw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + } + }, "packages/ui-components/node_modules/@testing-library/jest-dom": { "version": "6.6.3", "dev": true, diff --git a/packages/config/eslint/juno-typescript.mjs b/packages/config/eslint/juno-typescript.mjs index ecefa34db..ee75b75cc 100644 --- a/packages/config/eslint/juno-typescript.mjs +++ b/packages/config/eslint/juno-typescript.mjs @@ -71,6 +71,12 @@ export default [ }, }, { - ignores: ["**/build/*", "**/dist/*", "**/vite.config.ts.timestamp-*"], + ignores: [ + "**/build/*", + "**/dist/*", + "**/vite.config.ts.timestamp-*", + "**/src/deprecated_js/*", + "**/storybook-static/*", + ], }, ] diff --git a/packages/ui-components/.storybook/local-preset.js b/packages/ui-components/.storybook/local-preset.js new file mode 100644 index 000000000..988848eb7 --- /dev/null +++ b/packages/ui-components/.storybook/local-preset.js @@ -0,0 +1,15 @@ +/** + * to load the built addon in this test Storybook + */ +function previewAnnotations(entry = []) { + return [...entry, require.resolve("../src/juno-addon/preview.js")] +} + +function managerEntries(entry = []) { + return [...entry, require.resolve("../src/juno-addon/manager.js")] +} + +module.exports = { + managerEntries, + previewAnnotations, +} diff --git a/packages/ui-components/.storybook/main.js b/packages/ui-components/.storybook/main.js index b55d41e4b..fa3b2ff77 100644 --- a/packages/ui-components/.storybook/main.js +++ b/packages/ui-components/.storybook/main.js @@ -2,11 +2,12 @@ * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors * SPDX-License-Identifier: Apache-2.0 */ - /** @type { import('@storybook/react-webpack5').StorybookConfig } */ -const path = require("path") const globImporter = require("node-sass-glob-importer") +const vitePluginGlob = require("vite-plugin-glob") +import { merge } from "@storybook/manager-api" +import svgr from "vite-plugin-svgr" const config = { stories: ["../src/docs/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], @@ -14,7 +15,7 @@ const config = { "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-docs", - "./juno-addon", + "./local-preset", "@storybook/addon-mdx-gfm", "@storybook/addon-webpack5-compiler-babel", { @@ -30,81 +31,29 @@ const config = { reactDocgen: "react-docgen-typescript", }, staticDirs: ["../public"], - webpackFinal: async (config) => { - const fileLoaderRule = config.module.rules.find((rule) => rule.test && rule.test.test(".svg")) - fileLoaderRule.exclude = /\.svg$/ - - config.module.rules.push({ - test: /\.svg$/i, - type: "asset", - resourceQuery: /url/, // import filename: *.svg?url - }) - - config.module.rules.push({ - test: /\.svg$/i, - enforce: "pre", - issuer: /\.(js|jsx|ts|tsx)$/, // Updated to include ts and tsx - resourceQuery: { not: [/url/] }, // exclude react component if import filename *.svg?url - loader: require.resolve("@svgr/webpack"), - options: { - svgo: false, - titleProp: true, - }, - }) - - // this is for background svgs in css - config.module.rules.push({ - test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, - issuer: /\.s?css$/, - type: "asset", - }) - - // other images - config.module.rules.push({ - test: /\.(png|jpg)$/i, - type: "asset", - }) - - config.module.rules.push({ - test: /\.scss$/, - use: [ - "css-loader", - { - loader: "postcss-loader", - options: { - implementation: require("postcss"), - }, - }, - { - loader: "sass-loader", - options: { + viteFinal: async (config) => { + config = merge(config, { + assetsInclude: ["**/*.png", "**/*.jpg"], + plugins: [ + vitePluginGlob(), + svgr({ + svgo: false, + }), + ], + css: { + preprocessorOptions: { + scss: { sassOptions: { importer: globImporter(), }, }, }, - ], - include: [path.resolve(__dirname, "../src")], - }) - // Add TypeScript support - config.module.rules.push({ - test: /\.(ts|tsx)$/, - use: [ - { - loader: require.resolve("ts-loader"), - options: { - transpileOnly: true, - configFile: path.resolve(__dirname, "tsconfig.storybook.json"), // Specify the path to your tsconfig.json - }, - }, - ], + }, }) - config.resolve.extensions.push(".ts", ".tsx") - return config }, framework: { - name: "@storybook/react-webpack5", + name: "@storybook/react-vite", options: {}, }, docs: { diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index a64bbfdae..baf4d2f36 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -32,26 +32,24 @@ "npm": ">=10.0.0 <11.0.0" }, "devDependencies": { - "@babel/plugin-transform-parameters": "7.25.9", - "@babel/preset-env": "7.26.0", - "@babel/preset-react": "7.25.9", "@cloudoperators/juno-config": "*", "@floating-ui/react": "0.25.4", "@headlessui-float/react": "0.15.0", "@headlessui/react": "1.7.19", "@material-design-icons/svg": "0.14.13", "@mdx-js/react": "2.3.0", - "@storybook/addon-docs": "8.4.6", - "@storybook/addon-essentials": "8.4.6", - "@storybook/addon-interactions": "8.4.6", - "@storybook/addon-links": "8.4.6", - "@storybook/addon-mdx-gfm": "8.4.6", + "@storybook/addon-docs": "8.4.7", + "@storybook/addon-essentials": "8.4.7", + "@storybook/addon-interactions": "8.4.7", + "@storybook/addon-links": "8.4.7", + "@storybook/addon-mdx-gfm": "8.4.7", + "@storybook/addon-postcss": "^2.0.0", "@storybook/addon-webpack5-compiler-babel": "3.0.3", - "@storybook/blocks": "8.4.6", - "@storybook/manager-api": "8.4.6", - "@storybook/react": "8.4.6", - "@storybook/react-webpack5": "8.4.6", - "@storybook/test": "8.4.6", + "@storybook/blocks": "8.4.7", + "@storybook/manager-api": "8.4.7", + "@storybook/react": "8.4.7", + "@storybook/react-vite": "8.4.7", + "@storybook/test": "8.4.7", "@svgr/webpack": "6.5.1", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", @@ -61,14 +59,10 @@ "@vitejs/plugin-react": "4.3.4", "add": "2.0.6", "autoprefixer": "10.4.20", - "babel-jest": "29.7.0", - "babel-loader": "8.4.1", "css-loader": "6.11.0", "flatpickr": "4.6.13", "focus-trap-react": "10.3.1", "glob": "8.1.0", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", "jsdom": "24.1.3", "node-sass-glob-importer": "3.0.2", "postcss": "8.4.49", @@ -83,7 +77,7 @@ "regenerator-runtime": "0.14.1", "sass": "^1.81.1", "sass-loader": "12.6.0", - "storybook": "8.4.6", + "storybook": "8.4.7", "style-loader": "3.3.4", "tailwindcss": "3.4.15", "ts-loader": "9.5.1", @@ -106,36 +100,12 @@ "build-storybook": "storybook build", "dev": "vite", "lint": "eslint", - "test": "npm run test-vitest && npm run test-jest", - "test-vitest": "vitest run", + "test": "vitest run", "typecheck": "tsc --noEmit", "test-jest": "jest", "test:watch": "jest --watchAll", "test-vitest:watch": "vitest", "clean": "rm -rf build && rm -rf node_modules && rm -rf .turbo", "clean:cache": "rm -rf .turbo" - }, - "jest": { - "verbose": true, - "testEnvironment": "jsdom", - "transformIgnorePatterns": [ - "node_modules/(?!(react-merge-refs)/)" - ], - "testMatch": [ - "**/__tests__/**/*.[j]s?(x)", - "**/?(*.)+(spec|test).[j]s?(x)" - ], - "setupFilesAfterEnv": [ - "./setupTests.js" - ], - "transform": { - "\\.[j]sx?$": "babel-jest", - "\\.mjs$": "babel-jest", - "^.+\\.svg$": "/test/__mocks__/svg.js" - }, - "moduleNameMapper": { - "^.+\\.(css|scss)$": "/test/__mocks__/styleMock.js", - "@material-design-icons/svg/.+\\.svg$": "/test/__mocks__/svgLib.js" - } } } diff --git a/packages/ui-components/setupTests.js b/packages/ui-components/setupTests.js deleted file mode 100644 index 60bde43b4..000000000 --- a/packages/ui-components/setupTests.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import "@testing-library/jest-dom" -import "regenerator-runtime/runtime" - -/* -Mock ResizeObserver. -Required to test Radix-UI-based components. -https://github.com/ZeeCoder/use-resize-observer/issues/40 -https://stackoverflow.com/questions/64558062/how-to-mock-resizeobserver-to-work-in-unit-tests-using-react-testing-library -*/ -class ResizeObserver { - observe() {} - unobserve() {} - disconnect() {} -} - -window.ResizeObserver = ResizeObserver - -/** - * Required to test Radix-UI-based components: - * JSDOM doesn't implement PointerEvent so we need to mock our own implementation - * Default to mouse left click interaction - * https://github.com/radix-ui/primitives/issues/1822 - * https://github.com/jsdom/jsdom/pull/2666 - */ - -class MockPointerEvent extends Event { - constructor(type, props) { - super(type, props) - this.button = props.button || 0 - this.ctrlKey = props.ctrlKey || false - this.pointerType = props.pointerType || "mouse" - } -} - -window.PointerEvent = MockPointerEvent -window.HTMLElement.prototype.scrollIntoView = jest.fn() -window.HTMLElement.prototype.releasePointerCapture = jest.fn() -window.HTMLElement.prototype.hasPointerCapture = jest.fn() diff --git a/packages/ui-components/src/deprecated_js/AppIntro/AppIntro.test.tsx b/packages/ui-components/src/deprecated_js/AppIntro/AppIntro.test.tsx deleted file mode 100644 index 312b35f7c..000000000 --- a/packages/ui-components/src/deprecated_js/AppIntro/AppIntro.test.tsx +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { AppIntro } from "./index" - -describe("AppIntro", () => { - test("renders an app intro", () => { - render() - expect(screen.getByTestId("app-intro")).toBeInTheDocument() - expect(screen.getByTestId("app-intro")).toHaveClass("juno-app-intro") - }) - - test("renders children as passed", () => { - render( - - - - ) - expect(screen.getByTestId("app-intro")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeInTheDocument() - }) - - test("renders a custom className", () => { - render() - expect(screen.getByTestId("app-intro")).toBeInTheDocument() - expect(screen.getByTestId("app-intro")).toHaveClass("my-custom-classname") - }) - - test("renders all props", () => { - render() - expect(screen.getByTestId("app-intro")).toBeInTheDocument() - expect(screen.getByTestId("app-intro")).toHaveAttribute("data-lolol", "some-prop") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/Button/Button.test.js b/packages/ui-components/src/deprecated_js/Button/Button.test.js deleted file mode 100644 index 735d98ef3..000000000 --- a/packages/ui-components/src/deprecated_js/Button/Button.test.js +++ /dev/null @@ -1,140 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { Button } from "./index" - -describe("Button", () => { - test("renders a button with text passed as label", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveTextContent("Click me") - }) - - test("renders a button with text passed as children", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveTextContent("Click me") - }) - - test("renders a disabled button as passed", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveAttribute("title", "Click me title") - }) - - test("renders label as title if no title given", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveAttribute("title", "Click me label") - }) - - test("renders a default button", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-button-default") - }) - - test("renders a primary button", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-button-primary") - }) - - test("renders a primary-danger button", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-button-primary-danger") - }) - - test("renders a disabled button", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveAttribute("disabled") - }) - - test("renders an icon as passed", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "warning") - }) - - test("renders a small button", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-button-small-size") - }) - - test("renders a default sized button", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-button-default-size") - }) - - test("renders a custom className as passed", async () => { - render() - expect(screen.getByRole("button")).toHaveClass("my-custom-classname") - }) - - test("renders a default in progress button as passed", async () => { - render() - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("in-progress") - expect(screen.getByRole("progressbar")).toHaveClass("juno-spinner") - }) - - test("renders a default in progress button with a progressLabel as passed", async () => { - render( - - ) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("in-progress") - expect(screen.getByRole("button")).toHaveTextContent("In Progress…") - }) - - test("renders all props as passed", async () => { - render( - - ) - expect(screen.getByTestId("content-area")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeInTheDocument() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("content-area")).toBeInTheDocument() - expect(screen.getByTestId("content-area")).toHaveClass("my-custom-classname") - }) - - test("renders all props", async () => { - render() - expect(screen.getByTestId("content-area")).toBeInTheDocument() - expect(screen.getByTestId("content-area")).toHaveAttribute("data-lolol", "some-prop") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.js b/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.js rename to packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.test.js b/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.test.js deleted file mode 100644 index fd48fb385..000000000 --- a/packages/ui-components/src/deprecated_js/ContentAreaWrapper/ContentAreaWrapper.test.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { ContentAreaWrapper } from "./index" - -describe("ContentAreaWrapper", () => { - test("renders a content area wrapper", async () => { - render() - expect(screen.getByTestId("content-area-wrapper")).toBeInTheDocument() - expect(screen.getByTestId("content-area-wrapper")).toHaveClass("juno-content-area-wrapper") - }) - - test("renders a content area with flex grow", async () => { - render() - expect(screen.getByTestId("content-area-wrapper")).toBeInTheDocument() - expect(screen.getByTestId("content-area-wrapper")).toHaveClass("jn-grow") - }) - - test("renders a content area with flex col layout", async () => { - render() - expect(screen.getByTestId("content-area-wrapper")).toBeInTheDocument() - expect(screen.getByTestId("content-area-wrapper")).toHaveClass("jn-flex-col") - }) - - test("renders children as passed", async () => { - render( - - - - ) - expect(screen.getByTestId("content-area-wrapper")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeInTheDocument() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("content-area-wrapper")).toBeInTheDocument() - expect(screen.getByTestId("content-area-wrapper")).toHaveClass("my-custom-classname") - }) - - test("renders all props", async () => { - render() - expect(screen.getByTestId("content-area-wrapper")).toBeInTheDocument() - expect(screen.getByTestId("content-area-wrapper")).toHaveAttribute("data-lolol", "some-prop") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/DataList/DataList.stories.js b/packages/ui-components/src/deprecated_js/DataList/DataList.stories.jsx similarity index 95% rename from packages/ui-components/src/deprecated_js/DataList/DataList.stories.js rename to packages/ui-components/src/deprecated_js/DataList/DataList.stories.jsx index 28a0343d6..a5a65c87f 100644 --- a/packages/ui-components/src/deprecated_js/DataList/DataList.stories.js +++ b/packages/ui-components/src/deprecated_js/DataList/DataList.stories.jsx @@ -8,11 +8,11 @@ import React from "react" import { DataList } from "./index.js" import { DataListRow } from "../DataListRow/index.js" import { DataListCell } from "../DataListCell/index.js" -import { Default as DataListRowStory } from "../DataListRow/DataListRow.stories.js" -import { Selectable as SelectableDataListRowStory } from "../DataListRow/DataListRow.stories.js" -import { AutoWidth as AutoWidthDataListRowStory } from "../DataListRow/DataListRow.stories.js" -import { PercentageWidths as PercentageWidthsDataListRowStory } from "../DataListRow/DataListRow.stories.js" -import { GridFitted as GridFittedDataListRowStory } from "../DataListRow/DataListRow.stories.js" +import { Default as DataListRowStory } from "../DataListRow/DataListRow.stories.jsx" +import { Selectable as SelectableDataListRowStory } from "../DataListRow/DataListRow.stories.jsx" +import { AutoWidth as AutoWidthDataListRowStory } from "../DataListRow/DataListRow.stories.jsx" +import { PercentageWidths as PercentageWidthsDataListRowStory } from "../DataListRow/DataListRow.stories.jsx" +import { GridFitted as GridFittedDataListRowStory } from "../DataListRow/DataListRow.stories.jsx" export default { title: "Deprecated/DataList/DataList", diff --git a/packages/ui-components/src/deprecated_js/DataList/DataList.test.js b/packages/ui-components/src/deprecated_js/DataList/DataList.test.js deleted file mode 100644 index bb0363e63..000000000 --- a/packages/ui-components/src/deprecated_js/DataList/DataList.test.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { DataList } from "./index" - -describe("DataList", () => { - test("renders a DataList", async () => { - render() - expect(screen.getByTestId("my-datalist")).toBeInTheDocument() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-datalist")).toBeInTheDocument() - expect(screen.getByTestId("my-datalist")).toHaveClass("my-custom-class") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/DataListCell/DataListCell.stories.js b/packages/ui-components/src/deprecated_js/DataListCell/DataListCell.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/DataListCell/DataListCell.stories.js rename to packages/ui-components/src/deprecated_js/DataListCell/DataListCell.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/DataListCell/DataListCell.test.js b/packages/ui-components/src/deprecated_js/DataListCell/DataListCell.test.js deleted file mode 100644 index 30b1e8b01..000000000 --- a/packages/ui-components/src/deprecated_js/DataListCell/DataListCell.test.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { DataListCell } from "./index" - -describe("DataListCell", () => { - test("renders a DataListCell", async () => { - render() - expect(screen.getByTestId("my-datalistcell")).toBeInTheDocument() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-datalistcell")).toBeInTheDocument() - expect(screen.getByTestId("my-datalistcell")).toHaveClass("my-custom-class") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.stories.js b/packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.stories.js rename to packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.test.js b/packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.test.js deleted file mode 100644 index cda561d34..000000000 --- a/packages/ui-components/src/deprecated_js/DataListCheckboxCell/DataListCheckboxCell.test.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { DataListCheckboxCell } from "./index" - -describe("DataListCheckboxCell", () => { - test("renders a DataListCheckboxCell containing a checkbox", async () => { - render() - expect(screen.getByTestId("my-datalistcell")).toBeInTheDocument() - expect(screen.getByRole("checkbox")).toBeInTheDocument() - }) - - test("renders a DataListCheckboxCell containing a checked checkbox if passed", async () => { - render() - expect(screen.getByRole("checkbox")).toBeInTheDocument() - expect(screen.getByRole("checkbox")).toBeChecked() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-datalistcell")).toBeInTheDocument() - expect(screen.getByTestId("my-datalistcell")).toHaveClass("my-custom-class") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.stories.js b/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.stories.jsx similarity index 99% rename from packages/ui-components/src/deprecated_js/DataListRow/DataListRow.stories.js rename to packages/ui-components/src/deprecated_js/DataListRow/DataListRow.stories.jsx index 109a6265c..44aeeeab7 100644 --- a/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.stories.js +++ b/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.stories.jsx @@ -8,7 +8,7 @@ import PropTypes from "prop-types" import { DataListRow } from "./index.js" import { DataListCell } from "../DataListCell/index.js" import { DataListCheckboxCell } from "../DataListCheckboxCell/index.js" -import { Default as DataListCellStory } from "../DataListCell/DataListCell.stories.js" +import { Default as DataListCellStory } from "../DataListCell/DataListCell.stories.jsx" export default { title: "Deprecated/DataList/DataListRow", diff --git a/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.test.js b/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.test.js deleted file mode 100644 index e4919b00e..000000000 --- a/packages/ui-components/src/deprecated_js/DataListRow/DataListRow.test.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { DataListRow } from "./index" - -describe("DataListRow", () => { - test("renders a DataListRow", async () => { - render() - expect(screen.getByTestId("my-datalistrow")).toBeInTheDocument() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-datalistrow")).toBeInTheDocument() - expect(screen.getByTestId("my-datalistrow")).toHaveClass("my-custom-class") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/FilterInput/FilterInput.stories.js b/packages/ui-components/src/deprecated_js/FilterInput/FilterInput.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/FilterInput/FilterInput.stories.js rename to packages/ui-components/src/deprecated_js/FilterInput/FilterInput.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/FilterInput/FilterInput.test.js b/packages/ui-components/src/deprecated_js/FilterInput/FilterInput.test.js deleted file mode 100644 index ac479ea6e..000000000 --- a/packages/ui-components/src/deprecated_js/FilterInput/FilterInput.test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import userEvent from "@testing-library/user-event" -import { FilterInput } from "./index" - -describe("FilterInput", () => { - test("renders a FilterInput", async () => { - render() - expect(screen.getByTestId("filter-input")).toBeInTheDocument() - expect(screen.getByTestId("filter-input")).toHaveClass("juno-filter-input") - }) - - test("renders a FilterInput with a Select and a TextInput", async () => { - render() - expect(screen.getByRole("combobox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toBeInTheDocument() - }) - - test("renders a Select with an aria-label as passed", async () => { - render() - expect(screen.getByRole("combobox")).toBeInTheDocument() - expect(screen.getByRole("combobox")).toHaveAttribute("aria-label", "my select") - }) - - test("renders a Select with a default option selected if no selectedFilterKey is passed", async () => { - render() - expect(screen.getByRole("option", { name: "Select Filter" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "Select Filter" }).selected).toBe(true) - }) - - test("renders a Select with a default option as passed", async () => { - render() - expect(screen.getByRole("option", { name: "My Custom Key Label" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "My Custom Key Label" }).selected).toBe(true) - }) - - test("renders a select with options and values as passed", async () => { - render( - - ) - expect(screen.getByRole("option", { name: "option 1" })).toHaveValue("option-1") - expect(screen.getByRole("option", { name: "option 2" })).toHaveValue("option-2") - }) - - test("renders a select with arbitrary props for options", async () => { - render( - - ) - expect(screen.getByRole("option", { name: "option 1" })).toHaveValue("option-1") - expect(screen.getByRole("option", { name: "option 1" })).toBeDisabled() - }) - - test("renders a text input with an aria-label as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("aria-label", "my value input") - }) - - test("renders a text input with a placeholder as passed", async () => { - render( - - ) - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("placeholder", "my value placeholder") - }) - - test("renders a selected filter as passed", async () => { - const filterOptions = [ - { label: "OS", value: "byOs" }, - { label: "Region", value: "byRegion" }, - ] - render() - expect(screen.getByRole("combobox")).toBeInTheDocument() - expect(screen.getByRole("option", { name: "Region" }).selected).toBe(true) - }) - - test("allows users to change the filter key", async () => { - const filters = [ - { label: "OS", value: "byOs" }, - { label: "Region", value: "byRegion" }, - { label: "Time Zone", value: "byTimezone" }, - ] - render() - await userEvent.selectOptions(screen.getByRole("combobox"), screen.getByRole("option", { name: "Time Zone" })) - expect(screen.getByRole("option", { name: "Time Zone" }).selected).toBe(true) - }) - - test("should reset the filter value when the selected filter key changes", async () => { - const filters = [ - { label: "OS", value: "byOs" }, - { label: "Region", value: "byRegion" }, - { label: "Time Zone", value: "byTimezone" }, - ] - render() - expect(screen.getByRole("textbox")).toHaveValue("MacOS") - await userEvent.selectOptions(screen.getByRole("combobox"), screen.getByRole("option", { name: "Region" })) - expect(screen.getByRole("textbox")).toHaveValue("") - }) - - test("executes a handler as passed when selected filter key changes", async () => { - const handleSelectedFilterChange = jest.fn() - const filters = [ - { label: "OS", key: "byOs" }, - { label: "Region", key: "byRegion" }, - { label: "Time Zone", key: "byTimezone" }, - ] - render( - - ) - expect(screen.getByRole("option", { name: "Region" }).selected).toBe(true) - await userEvent.selectOptions(screen.getByRole("combobox"), screen.getByRole("option", { name: "OS" })) - expect(screen.getByRole("option", { name: "OS" }).selected).toBe(true) - expect(handleSelectedFilterChange).toHaveBeenCalledTimes(1) - }) - - test("renders a FilterInput with a value as passed", async () => { - const opts = [{ label: "something", key: "something" }] - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveValue("123abc") - }) - - test("renders a Close button when the Input has a value", async () => { - const opts = [{ label: "something", key: "something" }] - render() - expect(screen.getByTitle("Clear")).toBeInTheDocument() - }) - - test("executes a handler as passed when the input value changes", async () => { - const opts = [{ label: "A Filter", key: "a-filter" }] - const handleFilterValueChange = jest.fn() - render() - await userEvent.type(screen.getByRole("textbox"), "987") - expect(handleFilterValueChange).toHaveBeenCalledTimes(3) - }) - - test("empties the field when Clear button is clicked", async () => { - const opts = [{ label: "something", key: "something" }] - render() - expect(screen.getByTitle("Clear")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveValue("abc") - await userEvent.click(screen.getByTitle("Clear")) - expect(screen.getByRole("textbox")).toHaveValue("") - }) - - test("executes onFilter handler as passed when Filter icon is clicked and return the text input value", async () => { - const handleFilter = jest.fn() - const opts = [{ label: "A Filter", key: "a-filter" }] - render() - await userEvent.click(screen.getByTitle("Filter")) - expect(handleFilter).toHaveBeenCalledTimes(1) - expect(handleFilter).toHaveBeenCalledWith("abc") - }) - - test("executes onFilter handler as passed when the input has focus and the user presses enter and return the text input value", async () => { - const handleFilter = jest.fn() - const opts = [{ label: "A Filter", key: "a-filter" }] - render() - await userEvent.type(screen.getByRole("textbox"), "{enter}") - expect(handleFilter).toHaveBeenCalledTimes(1) - expect(handleFilter).toHaveBeenCalledWith("abc") - }) - - test("renders loading filter input as passed", async () => { - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByRole("textbox")).toBeDisabled() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - }) - - test("renders a loading filter if passed options are present but empty", async () => { - const filters = [] - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByRole("textbox")).toBeDisabled() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeDisabled() - }) - - test("renders loading filter as passed even if options are present and not empty", async () => { - const opts = [{ label: "A Filter", key: "a-filter" }] - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByRole("textbox")).toBeDisabled() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - }) - - test("renders a filter input with an error as passed", async () => { - const opts = [{ label: "A Filter", key: "a-filter" }] - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByRole("textbox")).toBeDisabled() - expect(screen.getByTitle("Error")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeDisabled() - }) - - test("renders a custom class to the row as passed", async () => { - render() - expect(screen.getByTestId("filter-input")).toBeInTheDocument() - expect(screen.getByTestId("filter-input")).toHaveClass("my-custom-class") - }) - - test("renders all props as passed", async () => { - render() - expect(screen.getByTestId("filter-input")).toBeInTheDocument() - expect(screen.getByTestId("filter-input")).toHaveAttribute("data-lolol", "some-prop") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/FilterPill/FilterPill.stories.js b/packages/ui-components/src/deprecated_js/FilterPill/FilterPill.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/FilterPill/FilterPill.stories.js rename to packages/ui-components/src/deprecated_js/FilterPill/FilterPill.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/FilterPill/FilterPill.test.js b/packages/ui-components/src/deprecated_js/FilterPill/FilterPill.test.js deleted file mode 100644 index c5459c580..000000000 --- a/packages/ui-components/src/deprecated_js/FilterPill/FilterPill.test.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { FilterPill } from "./index" - -describe("FilterPill", () => { - test("renders a FilterPill", async () => { - render() - expect(screen.getByTestId("my-filterpill")).toBeInTheDocument() - expect(screen.getByTestId("my-filterpill")).toHaveClass("juno-filterpill") - }) - - test("renders a filter key label as passed", async () => { - render() - expect(screen.getByText("My FilterPill Key")).toBeInTheDocument() - }) - - test("renders a filter key if filter key label missing", async () => { - render() - expect(screen.getByText("my_filterPill_key")).toBeInTheDocument() - }) - - test("renders nothing if filter key label not set", async () => { - // the attribute filterKey and filterValue are required keep them empty to test render nothing - render() - expect(screen.getByTestId("23")).toBeInTheDocument() - expect(screen.getByTestId("23")).toHaveTextContent("") - }) - - test("renders a filter value label as passed", async () => { - render( - - ) - expect(screen.getByText("My FilterPill Value")).toBeInTheDocument() - }) - - test("renders a filter value if value label missing", async () => { - render() - expect(screen.getByText("my_filterPill_value")).toBeInTheDocument() - }) - - test("renders nothing if filter value or value label not given", async () => { - // the attribute filterKey and filterValue are required keep them empty to test render nothing - render() - expect(screen.getByTestId("23")).toBeInTheDocument() - expect(screen.getByTestId("23")).toHaveTextContent("") - }) - - test("an onClose handler is called as passed and returns the uid", () => { - const handleClose = jest.fn() - render() - screen.getByRole("button").click() - expect(handleClose).toHaveBeenCalledTimes(1) - expect(handleClose).toHaveBeenCalledWith("uidAbc") - }) - - test("an onClose handler is called as passed and returns the filterKey if uid missing", () => { - const handleClose = jest.fn() - render() - screen.getByRole("button").click() - expect(handleClose).toHaveBeenCalledTimes(1) - expect(handleClose).toHaveBeenCalledWith("abc") - }) - - test("renders a custom className", async () => { - render( - - ) - expect(screen.getByTestId("my-filterpill")).toBeInTheDocument() - expect(screen.getByTestId("my-filterpill")).toHaveClass("my-custom-class") - }) - - test("renders all props as passed", async () => { - render() - expect(screen.getByTestId("23")).toBeInTheDocument() - expect(screen.getByTestId("23")).toHaveAttribute("data-lolol") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/Filters/Filters.stories.js b/packages/ui-components/src/deprecated_js/Filters/Filters.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/Filters/Filters.stories.js rename to packages/ui-components/src/deprecated_js/Filters/Filters.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/Filters/Filters.test.js b/packages/ui-components/src/deprecated_js/Filters/Filters.test.js deleted file mode 100644 index d1d8690a5..000000000 --- a/packages/ui-components/src/deprecated_js/Filters/Filters.test.js +++ /dev/null @@ -1,167 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import userEvent from "@testing-library/user-event" -import { Filters } from "./index" - -describe("Filters", () => { - test("renders Filters", async () => { - render() - expect(screen.getByTestId("my-filters")).toBeInTheDocument() - expect(screen.getByTestId("my-filters")).toHaveClass("juno-filters") - }) - - test("renders a FilterInput when filter prop is passed", async () => { - const filters = { options: [{ label: "option 1", value: "option-1" }] } - render() - expect(screen.getByRole("combobox")).toBeInTheDocument() - expect(screen.getByRole("combobox")).toHaveClass("juno-filter-input-select") - }) - - test("renders Select with options as passed", async () => { - const filters = { - keyLabel: "Filter", - options: [ - { label: "option 1", value: "option-1" }, - { label: "option 2", value: "option-2" }, - ], - } - render() - expect(screen.getByRole("option", { name: "Filter" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "option 1" })).toHaveValue("option-1") - expect(screen.getByRole("option", { name: "option 2" })).toHaveValue("option-2") - }) - - test("renders a Select with selected filter key as passed", async () => { - const filters = { - options: [ - { label: "option 1", value: "option-1" }, - { label: "option 2", value: "option-2" }, - ], - } - render() - expect(screen.getByRole("option", { name: "option 2" }).selected).toBe(true) - }) - - test("renders a Filter value text input with an aria-label as passed", async () => { - const filters = { valueLabel: "Enter a filter value", options: [] } - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("aria-label", "Enter a filter value") - }) - - test("renders a Filter vlaue text input witn a placeholder as passed", async () => { - const filters = { - valueLabel: "Enter a filter value", - options: [ - { label: "option 1", value: "option-1" }, - { label: "option 2", value: "option-2" }, - ], - } - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("placeholder", "my placeholder") - }) - - test("renders a Filter value as passed", async () => { - const filters = { options: [{ label: "option 1", value: "option-1" }] } - render() - expect(screen.getByRole("textbox")).toHaveValue("abc") - }) - - test("executes a handler as passed when the filter input value changes", async () => { - const handleFilterValueChange = jest.fn() - const filters = { options: [{ label: "option 1", value: "option-1" }] } - render() - await userEvent.type(screen.getByRole("textbox"), "123") - expect(handleFilterValueChange).toHaveBeenCalledTimes(3) - }) - - test("executes a handler as passed when the filter icon is clicked", async () => { - const handleFilter = jest.fn() - const filters = { - label: "Filter", - options: [{ label: "option 1", value: "option-1" }], - } - render() - await userEvent.click(screen.getByTitle("Filter")) - expect(handleFilter).toHaveBeenCalledTimes(1) - }) - - test("executes a handler as passed when the input has focus and the user presses enter", async () => { - const handleFilter = jest.fn() - const filters = { - label: "Filter", - options: [{ label: "option 1", value: "option-1" }], - } - render() - await userEvent.type(screen.getByRole("textbox"), "{enter}") - expect(handleFilter).toHaveBeenCalledTimes(1) - expect(handleFilter).toHaveBeenCalledTimes(1) - }) - - test("clears the filter input and executes a handler as passed when the filter input clear icon is clicked", async () => { - const handleClear = jest.fn() - const filters = { - label: "Filter", - options: [{ label: "option 1", value: "option-1" }], - } - render() - expect(screen.getByRole("textbox")).toHaveValue("some option") - await userEvent.click(screen.getByTitle("Clear")) - expect(screen.getByRole("textbox")).toHaveValue("") - expect(handleClear).toHaveBeenCalledTimes(1) - }) - - test("renders loading Filters as passed", async () => { - const filters = { - label: "Filter", - options: [{ label: "option 1", value: "option-1" }], - } - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - }) - - test("renders Filters with an error as passed", async () => { - const filters = { - label: "Filter", - options: [{ label: "option 1", value: "option-1" }], - } - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByTestId("my-filters")).toBeInTheDocument() - expect(screen.getByTestId("my-filters")).toHaveClass("juno-filters-error") - expect(screen.getByRole("button")).toBeDisabled() - }) - - test("renders Filters with error and an errortext as passed", async () => { - const filters = { - label: "Filter", - options: [{ label: "option 1", value: "option-1" }], - } - render() - expect(screen.getByRole("combobox")).toBeDisabled() - expect(screen.getByTestId("my-filters")).toBeInTheDocument() - expect(screen.getByTestId("my-filters")).toHaveClass("juno-filters-error") - expect(document.querySelector(".juno-filters-errortext")).toBeInTheDocument() - expect(document.querySelector(".juno-filters-errortext")).toHaveTextContent("These Filters have an error") - expect(screen.getByRole("button")).toBeDisabled() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-filters")).toBeInTheDocument() - expect(screen.getByTestId("my-filters")).toHaveClass("my-custom-class") - }) - - test("renders all props as passed", async () => { - render() - expect(screen.getByTestId("23")).toBeInTheDocument() - expect(screen.getByTestId("23")).toHaveAttribute("data-lolol") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/FormHint/FormHint.test.js b/packages/ui-components/src/deprecated_js/FormHint/FormHint.test.js deleted file mode 100644 index 12b98b231..000000000 --- a/packages/ui-components/src/deprecated_js/FormHint/FormHint.test.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { FormHint } from "./index" - -describe("FormHint", () => { - test("renders a FormHint", async () => { - render() - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - }) - - test("renders children as passed", async () => { - render( - - - - ) - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeInTheDocument() - }) - - test("renders a text as passed", async () => { - render() - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByTestId("my-form-hint")).toHaveTextContent("My form-related message") - }) - - test("renders children if both children and text have been passed", async () => { - render( - - <>abc - - ) - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByTestId("my-form-hint")).toHaveTextContent("abc") - expect(screen.getByTestId("my-form-hint")).not.toHaveTextContent("123") - }) - - test("renders a help message by default", async () => { - render() - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByTestId("my-form-hint")).toHaveClass("juno-form-hint-help") - }) - - test("renders an error message as passed", async () => { - render() - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByTestId("my-form-hint")).toHaveClass("juno-form-hint-error") - }) - - test("renders a success message as passed", async () => { - render() - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByTestId("my-form-hint")).toHaveClass("juno-form-hint-success") - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-form-hint")).toBeInTheDocument() - expect(screen.getByTestId("my-form-hint")).toHaveClass("my-custom-class") - }) - - test("renders all props as passed", async () => { - render() - expect(screen.getByTestId("23")).toBeInTheDocument() - expect(screen.getByTestId("23")).toHaveAttribute("data-lolol") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/FormRow/FormRow.test.js b/packages/ui-components/src/deprecated_js/FormRow/FormRow.test.js deleted file mode 100644 index f34586cb4..000000000 --- a/packages/ui-components/src/deprecated_js/FormRow/FormRow.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { FormRow } from "./index" - -describe("FormSection", () => { - test("renders a FormRow", async () => { - render() - expect(screen.getByTestId("my-form-row")).toBeInTheDocument() - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByTestId("my-form-row")).toBeInTheDocument() - expect(screen.getByTestId("my-form-row")).toHaveClass("my-custom-class") - }) - - test("renders children as passed", async () => { - render( - - - - ) - expect(screen.getByRole("button")).toBeInTheDocument() - }) - - test("renders all props as passed", async () => { - render() - expect(screen.getByTestId("23")).toBeInTheDocument() - expect(screen.getByTestId("23")).toHaveAttribute("data-lolol") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/Icon/Icon.test.js b/packages/ui-components/src/deprecated_js/Icon/Icon.test.js deleted file mode 100644 index 04e2c9615..000000000 --- a/packages/ui-components/src/deprecated_js/Icon/Icon.test.js +++ /dev/null @@ -1,363 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { Icon } from "./index" - -describe("Icon", () => { - test("renders an Icon as passed", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "warning") - }) - - test("renders a custom className as passed", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveClass("my-custom-class") - }) - - test("renders a default icon when none was passed", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - // note: currently the default icon is the help icon - expect(screen.getByRole("img")).toHaveAttribute("alt", "help") - }) - - test("renders an Icon with no text class by default so that text color is inherited from context", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - // check that there is no class that contains 'text-' - expect(screen.getByRole("img")).not.toHaveAttribute("class", expect.stringContaining("text-")) - }) - - test("renders an Icon with color as passed", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveClass("text-juno-blue") - }) - - test("renders an Icon with default size", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("width", "24") - expect(screen.getByRole("img")).toHaveAttribute("height", "24") - }) - - test("renders an Icon with size as passed", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("width", "48") - expect(screen.getByRole("img")).toHaveAttribute("height", "48") - }) - - test("renders a custom alt text instead of default when passed", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "my super custom icon alt text") - }) - - // Test individual icons: - - test("renders an accessTime icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "time") - }) - - test("renders an accountCircle icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "account") - }) - - test("renders an addCircle icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "add") - }) - - test("renders a autoAwesomeMosaic icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "mosaic") - }) - - test("renders a autoAwesomeMotion icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "items stacked behind each other") - }) - - test("renders a bolt icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "bolt") - }) - - test("renders a cancel icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "cancel") - }) - - test("renders a check icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "check") - }) - - test("renders a checkCircle icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "checkCircle") - }) - - test("renders a chevronLeft icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "chevronLeft") - }) - - test("renders a chevronRight icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "chevronRight") - }) - - test("renders a close icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "close") - }) - - test("renders a copy icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "copy") - }) - - test("renders a danger icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "danger") - }) - - test("renders a dangerous icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "dangerous") - }) - - test("renders a deleteForever icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "delete forever") - }) - - test("renders a description icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "description") - }) - - test("renders a dns icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "service") - }) - - test("renders an edit icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "edit") - }) - - test("renders an error icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "error") - }) - - test("renders an outlined error icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "error outline") - }) - - test("renders an exitToApp icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "exit to other app") - }) - - test("renders an expandLess icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "expand less") - }) - - test("renders an expandMore icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "expand more") - }) - - test("renders an filterAlt icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "filter") - }) - - test("renders an forum icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "forum") - }) - - test("renders a forum help icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "help") - }) - - test("renders a Home icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "home") - }) - - test("renders an info icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "info") - }) - - test("renders a comment icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "comment") - }) - - test("renders a manageAccounts icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "user account configuration") - }) - - test("renders an openInBrowser icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "open in browser") - }) - - test("renders a place icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "location") - }) - - test("renders a search icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "search") - }) - - test("renders a success icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "success") - }) - - test("renders a warning icon", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("alt", "warning") - }) - - test("renders a custom title", async () => { - render() - expect(screen.getByRole("img")).toBeInTheDocument() - expect(screen.getByRole("img")).toHaveAttribute("title", "My custom title") - }) - - test("renders an element if href is passed as prop", async () => { - render() - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("href", "#") - }) - - test("renders an element with correct aria-label-attribute as passed", async () => { - render() - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("aria-label", "my link title") - }) - - test("renders an element with correct aria-label-attribute fallback if not passed", async () => { - render() - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("aria-label", "warning") - }) - - test("renders a , portalRef) -} - -// A test component to consume the portal context and render the className of the portal root: -const TestConsumer = () => { - const portalRef = useContext(PortalContext) - if (!portalRef) return null - return ( - <> -
{portalRef?.current?.className}
- - ) -} - -describe("PortalProvider", () => { - test("renders a portal root container", () => { - render() - const portalRoot = document.getElementById("juno-portal-root") - expect(portalRoot).toBeInTheDocument() - expect(portalRoot).toHaveClass("juno-portal-root") - }) - - test("renders children wrapped into a .juno-portal container into a portal using PortalProvider.Portal", () => { - render( - - - - - - ) - expect(document.getElementById("juno-portal-root")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeInTheDocument() - const parentEl = screen.getByRole("button").parentElement - expect(parentEl).toHaveClass("juno-portal") - expect(parentEl.parentElement).toHaveClass("juno-portal-root") - }) - - test("renders a portal root container with an id as passed", () => { - render() - expect(document.getElementById("portal-provider-test-id")).toBeInTheDocument() - }) - - test("renders children wrapped into a .juno-portal-container into a portal using usePortalRef", () => { - render( - - - - ) - expect(document.getElementById("juno-portal-root")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeInTheDocument() - const parentEl = screen.getByRole("button").parentElement - expect(parentEl).toHaveClass("juno-portal") - expect(parentEl.parentElement).toHaveClass("juno-portal-root") - }) - - test("renders individual juno portal containers for multiple portals", () => { - render( - - - - - - - - - - - - ) - const portalContainers = document.querySelectorAll(".juno-portal") - expect(portalContainers.length).toBe(3) - }) - - test("removes the portal root container when unmounting", () => { - const { unmount } = render( - - - - ) - expect(document.querySelector("#juno-portal-root")).toBeInTheDocument() - unmount() - expect(document.querySelector("#juno-portal-root")).not.toBeInTheDocument() - }) - - test("removes the juno portal container when a child component unmounts while leaving the portal root intact", async () => { - const { rerender } = render( - - - - ) - const portalRoot = document.querySelector("#juno-portal-root") - expect(portalRoot).toBeInTheDocument() - const portalContainer = document.querySelector(".juno-portal") - expect(portalContainer).toBeInTheDocument() - // Remove children, assert root element is still there, container elements rendered for child component is removed: - rerender() - expect(portalRoot).toBeInTheDocument() - expect(document.querySelector(".juno-portal")).not.toBeInTheDocument() - }) - - test("provides a ref to the rendered portal root container in context", async () => { - render( - - - - ) - const portalRefId = screen.getByTestId("portal-root-ref-id") - await waitFor(() => { - expect(portalRefId).toHaveTextContent("juno-portal-root") - expect(document.querySelector(".juno-portal-root")).toBeInTheDocument() - }) - }) - - test("logs a warning to the console when used outside of a PortalProvider", async () => { - let consoleWarnSpy = jest.spyOn(console, "warn").mockImplementation(() => {}) - render() - await waitFor(() => { - expect(consoleWarnSpy).toHaveBeenCalledWith( - "usePortalRef must be called inside a PortalProvider. You are probably using a component that renders a portal, e.g. Modal or Select. Make sure your app is wrapped in an AppShellProvider. Alternatively, a PortalProvider can be included manually." - ) - }) - consoleWarnSpy.mockRestore() - }) - - test("does not log a warning to the console when used inside a PortalProvider", () => { - let consoleWarnSpy = jest.spyOn(console, "warn").mockImplementation(() => {}) - render( - - - - ) - expect(consoleWarnSpy).not.toHaveBeenCalled() - consoleWarnSpy.mockRestore() - }) - - test("renders an additional custom className to the portal root as passed", () => { - render() - const portalRoot = document.getElementById("juno-portal-root") - expect(portalRoot).toBeInTheDocument() - expect(portalRoot).toHaveClass("juno-portal-root") - expect(portalRoot).toHaveClass("my-custom-class") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/RadioRow/RadioRow.test.tsx b/packages/ui-components/src/deprecated_js/RadioRow/RadioRow.test.tsx deleted file mode 100644 index e0f4341d8..000000000 --- a/packages/ui-components/src/deprecated_js/RadioRow/RadioRow.test.tsx +++ /dev/null @@ -1,108 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from "react" -import { act, render, screen } from "@testing-library/react" -import { RadioRow } from "./index" - -describe("RadioRow", () => { - test("renders a radio row", () => { - render() - expect(screen.getByTestId("radio-row")).toBeInTheDocument() - }) - - test("renders a radio row with a value as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByRole("radio")).toHaveAttribute("value", "radio-12") - }) - - test("renders a checked radio as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByRole("radio")).toBeChecked() - }) - - test("renders a radio group with a radio and an associated label with an id as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByLabelText("My Radio Row")).toBeInTheDocument() - expect(screen.getByRole("radio")).toHaveAttribute("id", "radio-row") - }) - - test("renders a help text as passed", () => { - render() - expect(screen.getByText("Helptext goes here")).toBeInTheDocument() - }) - - test("renders a helpt text with a link as passed", () => { - render(Link
} />) - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("href", "#") - expect(screen.getByRole("link")).toHaveTextContent("Link") - }) - - test("renders a disabled radio as passed", () => { - render() - expect(screen.getByRole("radio")).toBeDisabled() - }) - - test("renders a required RadioRow as passed if a label is supplied", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(document.querySelector(".juno-required")).toBeInTheDocument() - }) - - test("renders an invalid RadioRow as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByRole("radio")).toHaveClass("juno-radio-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders an invalid RadioRow with an error text as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByRole("radio")).toHaveClass("juno-radio-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - expect(screen.getByText("This is an error text")).toBeInTheDocument() - }) - - test("renders a valid RadioRow as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByRole("radio")).toHaveClass("juno-radio-valid") - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders a valid RadioRow with a successtext as passed", () => { - render() - expect(screen.getByRole("radio")).toBeInTheDocument() - expect(screen.getByRole("radio")).toHaveClass("juno-radio-valid") - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - expect(screen.getByText("GREAT SUCCESS!!!")).toBeInTheDocument() - }) - - test("renders a custom className to the parent", () => { - render() - expect(screen.getByTestId("radio-row")).toBeInTheDocument() - expect(screen.getByTestId("radio-row")).toHaveClass("my-class") - }) - - test("renders all props as passed", () => { - render() - expect(screen.getByTestId("radio-row")).toBeInTheDocument() - expect(screen.getByTestId("radio-row")).toHaveAttribute("data-lolol", "random-prop") - }) - - test("fire handler on change as passed", () => { - const onChangeSpy = vi.fn() - render() - act(() => { - screen.getByRole("radio").click() - }) - expect(onChangeSpy).toHaveBeenCalled() - }) -}) diff --git a/packages/ui-components/src/deprecated_js/SelectOption/SelectOption.test.js b/packages/ui-components/src/deprecated_js/SelectOption/SelectOption.test.js deleted file mode 100644 index 563701576..000000000 --- a/packages/ui-components/src/deprecated_js/SelectOption/SelectOption.test.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { cleanup, render, screen, waitFor } from "@testing-library/react" -import userEvent from "@testing-library/user-event" -import { Select } from "../Select/Select.component" -import { SelectOption } from "../SelectOption/SelectOption.component" - -globalThis.console.warn = jest.fn() -describe("SelectOption", () => { - afterEach(() => { - cleanup() - jest.clearAllMocks() - }) - - test("renders a SelectOption", async () => { - await waitFor(() => - render( - - ) - ) - expect(console.warn).toHaveBeenCalledTimes(1) - const toggle = screen.getByRole("button") - expect(toggle).toBeInTheDocument() - await waitFor(() => userEvent.click(toggle)) - expect(screen.getByRole("option")).toBeInTheDocument() - expect(screen.getByRole("option")).toHaveTextContent("Option 1") - }) - - test("renders a SelectOption with label as passed", async () => { - await waitFor(() => - render( - - ) - ) - const toggle = screen.getByRole("button") - expect(toggle).toBeInTheDocument() - await waitFor(() => userEvent.click(toggle)) - expect(screen.getByRole("option")).toBeInTheDocument() - expect(screen.getByRole("option")).toHaveTextContent("Option 1 Label") - }) - - test("renders a SelectOption with children as passed", async () => { - await waitFor(() => - render( - - ) - ) - const toggle = screen.getByRole("button") - expect(toggle).toBeInTheDocument() - await waitFor(() => userEvent.click(toggle)) - expect(screen.getByRole("option")).toBeInTheDocument() - expect(screen.getByRole("option")).toHaveTextContent("Option 1 child") - }) - - test("renders a SelectOption with children if both label and children are passed", async () => { - await waitFor(() => - render( - - ) - ) - const toggle = screen.getByRole("button") - expect(toggle).toBeInTheDocument() - await waitFor(() => userEvent.click(toggle)) - expect(screen.getByRole("option")).toBeInTheDocument() - expect(screen.getByRole("option")).toHaveTextContent("Option 1 child") - }) - - test("renders a className as passed", async () => { - await waitFor(() => - render( - - ) - ) - const toggle = screen.getByRole("button") - expect(toggle).toBeInTheDocument() - await waitFor(() => userEvent.click(toggle)) - expect(screen.getByRole("option")).toBeInTheDocument() - expect(screen.getByRole("option")).toHaveClass("my-fancy-class") - }) - - test("renders all props as passed", async () => { - await waitFor(() => - render( - - ) - ) - const toggle = screen.getByRole("button") - expect(toggle).toBeInTheDocument() - await waitFor(() => userEvent.click(toggle)) - expect(screen.getByRole("option")).toBeInTheDocument() - expect(screen.getByRole("option")).toHaveAttribute("data-lolol", "123") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/SelectRow/SelectRow.stories.js b/packages/ui-components/src/deprecated_js/SelectRow/SelectRow.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/SelectRow/SelectRow.stories.js rename to packages/ui-components/src/deprecated_js/SelectRow/SelectRow.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/SelectRow/SelectRow.test.js b/packages/ui-components/src/deprecated_js/SelectRow/SelectRow.test.js deleted file mode 100644 index 5724fed38..000000000 --- a/packages/ui-components/src/deprecated_js/SelectRow/SelectRow.test.js +++ /dev/null @@ -1,225 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import PropTypes from "prop-types" -import { cleanup, render, screen, waitFor } from "@testing-library/react" -import userEvent from "@testing-library/user-event" -import { SelectRow } from "./index" -import { SelectOption } from "../../deprecated_js/SelectOption/SelectOption.component" - -const mockOnChange = jest.fn() -// disable warnings for deprecated components -globalThis.console.warn = jest.fn() - -/** Create a Parent component to test functionality and interactions of controlled components. */ -const SelectRowParent = ({ value, onChange, children, ...props }) => { - const [val, setVal] = React.useState(value) - - const handleChange = (v) => { - onChange() - setVal(v) - } - - return ( - - {children} - - ) -} - -SelectRowParent.propTypes = { - value: PropTypes.string, - onChange: PropTypes.func, - children: PropTypes.node, -} - -describe("SelectRow", () => { - afterEach(() => { - cleanup() - jest.clearAllMocks() - }) - - test("renders a select row", async () => { - await waitFor(() => render()) - expect(screen.getByTestId("select-row")).toBeInTheDocument() - }) - - test("renders a select row with a Select toggle and an associated label with an id as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByLabelText("my-select")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveAttribute("id", "select-row") - }) - - test("renders a help text as passed", async () => { - await waitFor(() => render()) - expect(screen.getByText("Helptext goes here")).toBeInTheDocument() - }) - - test("renders a helpt text with a link as passed", async () => { - await waitFor(() => render(Link} />)) - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("href", "#") - expect(screen.getByRole("link")).toHaveTextContent("Link") - }) - - test("renders a required label as passed", async () => { - await waitFor(() => render()) - expect(document.querySelector(".juno-required")).toBeInTheDocument() - }) - - test("renders a custom class to the row as passed", async () => { - await waitFor(() => render()) - expect(screen.getByTestId("select-row")).toBeInTheDocument() - expect(screen.getByTestId("select-row")).toHaveClass("my-custom-class") - }) - - test("renders a placeholder in the Select toggle as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveTextContent("my placeholder") - }) - - test("renders a disabled select as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toBeDisabled() - }) - - test("renders an invalid SelectRow as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-select-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders an invalid SelectRow when errortext prop was passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-select-invalid") - expect(screen.getByText("This is an error text")).toBeInTheDocument() - }) - - test("renders a valid SelectRow as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-select-valid") - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders a valid SelectRow when successtext prop was passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-select-valid") - expect(screen.getByText("This is a success text")).toBeInTheDocument() - }) - - test("renders a loading SelectRow as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-select-loading") - }) - - test("renders a SelectRow with an error Select as passed", async () => { - await waitFor(() => render()) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.getByRole("button")).toHaveClass("juno-select-error") - }) - - test("renders all props as passed", async () => { - await waitFor(() => render()) - expect(screen.getByTestId("select-row")).toBeInTheDocument() - expect(screen.getByTestId("select-row")).toHaveAttribute("data-lolol", "some-prop") - }) - - test("sets selected option for an uncontrolled Select as passed", async () => { - await waitFor(() => - render( - - - - - ) - ) - expect(screen.getByRole("button")).toHaveTextContent("Value 2") - expect(screen.getByRole("button")).not.toHaveTextContent("Value 1") - }) - - test("sets selected option for a controlled Select as passed", async () => { - await waitFor(() => - render( - - - - - ) - ) - expect(screen.getByRole("button")).toHaveTextContent("Value 2") - expect(screen.getByRole("button")).not.toHaveTextContent("Value 1") - }) - - test("allows user to open a Select in a SelectRow by clicking on it, showing all children rendered as passed", async () => { - await waitFor(() => - render( - - Option 1 - Option 2 - Option 3 - - ) - ) - expect(screen.getByRole("button")).toBeInTheDocument() - expect(screen.queryByRole("listbox")).not.toBeInTheDocument() - await waitFor(() => userEvent.click(screen.getByRole("button"))) - expect(screen.getByRole("listbox")).toBeInTheDocument() - expect(screen.getByRole("option", { name: "Option 1" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "Option 2" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "Option 3" })).toBeInTheDocument() - }) - - test("allows user to change a value on an uncontrolled SelectRow", async () => { - await waitFor(() => - render( - - - - - - ) - ) - const select = screen.getByRole("button") - expect(select).toBeInTheDocument() - expect(select).toHaveTextContent("val-1") - await waitFor(() => userEvent.click(select)) - expect(screen.getByRole("listbox")).toBeInTheDocument() - await waitFor(() => userEvent.click(screen.getByRole("option", { name: "val-2" }))) - expect(select).toHaveTextContent("val-2") - expect(mockOnChange).toHaveBeenCalled() - }) - - test("allows user to change a value on a controlled SelectRow", async () => { - await waitFor(() => - render( - - - - - - ) - ) - const select = screen.getByRole("button") - expect(select).toBeInTheDocument() - expect(select).toHaveTextContent("v-1") - await waitFor(() => userEvent.click(select)) - expect(screen.getByRole("listbox")).toBeInTheDocument() - expect(screen.getByRole("option", { name: "v-1" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "v-2" })).toBeInTheDocument() - expect(screen.getByRole("option", { name: "v-3" })).toBeInTheDocument() - await waitFor(() => userEvent.click(screen.getByRole("option", { name: "v-2" }))) - expect(select).toHaveTextContent("v-2") - expect(mockOnChange).toHaveBeenCalled() - }) -}) diff --git a/packages/ui-components/src/deprecated_js/Spinner/Spinner.test.js b/packages/ui-components/src/deprecated_js/Spinner/Spinner.test.js deleted file mode 100644 index 0f5f793b3..000000000 --- a/packages/ui-components/src/deprecated_js/Spinner/Spinner.test.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen } from "@testing-library/react" -import { Spinner } from "./index" - -describe("Spinner", () => { - test("renders a Spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - }) - - test("renders a default color spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).toHaveClass("jn-text-theme-on-default") - }) - - test("renders a primary color spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).toHaveClass("jn-text-theme-accent") - }) - - test("renders a warning color spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).toHaveClass("jn-text-theme-warning") - }) - - test("renders a danger color spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).toHaveClass("jn-text-theme-danger") - }) - - test("renders a success color spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).toHaveClass("jn-text-theme-success") - }) - - test("renders a custom colored spinner", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).not.toHaveClass("jn-text-theme-success") - expect(screen.getByRole("progressbar")).toHaveClass("jn-text-theme-button-primary") - }) - - test("renders a default sized Spinner", async () => { - render() - const spinner = screen.getByRole("progressbar") - expect(spinner).toHaveClass("jn-h-5") - expect(spinner).toHaveClass("jn-w-5") - // this test is semi-brittle: in case we begin to use the style attribute on spinner this will break: - expect(spinner).not.toHaveAttribute("style") - }) - - test("renders a small Spinner", async () => { - render() - const spinner = document.getElementById("spinner") - const spinnerstyles = window.getComputedStyle(spinner) - expect(spinnerstyles.height).toBe("1rem") - expect(spinnerstyles.width).toBe("1rem") - }) - - test("renders a large Spinner", async () => { - render() - const spinner = document.getElementById("spinner") - const spinnerstyles = window.getComputedStyle(spinner) - expect(spinnerstyles.height).toBe("3rem") - expect(spinnerstyles.width).toBe("3rem") - }) - - test("renders a custom sized Spinner", async () => { - render() - const spinner = document.getElementById("spinner") - const spinnerstyles = window.getComputedStyle(spinner) - expect(spinnerstyles.height).toBe("8rem") - expect(spinnerstyles.width).toBe("8rem") - }) - - test("renders a custom className", async () => { - render() - expect(screen.getByRole("progressbar")).toBeInTheDocument() - expect(screen.getByRole("progressbar")).toHaveClass("my-custom-class") - }) - - test("renders all props", async () => { - render() - const spinner = screen.getByRole("progressbar") - expect(spinner).toHaveAttribute("id", "a-spinner") - expect(spinner).toHaveAttribute("name", "the-spinner-to-test") - expect(spinner).toHaveAttribute("data-lolol", "some-random-prop") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/StyleProvider/Fonts.js b/packages/ui-components/src/deprecated_js/StyleProvider/Fonts.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/StyleProvider/Fonts.js rename to packages/ui-components/src/deprecated_js/StyleProvider/Fonts.jsx diff --git a/packages/ui-components/src/deprecated_js/StyleProvider/GlobalStyles.js b/packages/ui-components/src/deprecated_js/StyleProvider/GlobalStyles.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/StyleProvider/GlobalStyles.js rename to packages/ui-components/src/deprecated_js/StyleProvider/GlobalStyles.jsx diff --git a/packages/ui-components/src/deprecated_js/StyleProvider/StyleProvider.test.js b/packages/ui-components/src/deprecated_js/StyleProvider/StyleProvider.test.js deleted file mode 100644 index 8aaa072b2..000000000 --- a/packages/ui-components/src/deprecated_js/StyleProvider/StyleProvider.test.js +++ /dev/null @@ -1,179 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen, fireEvent, waitFor } from "@testing-library/react" -import userEvent from "@testing-library/user-event" -import { StyleProvider } from "./index" - -jest.mock("../../hooks/useLocalStorage", () => ({ - __esModule: true, - default: jest.fn((key, initialValue) => [initialValue, jest.fn()]), -})) - -describe("StyleProvider", () => { - test("renders a StyleProvider wrapper div with 'theme-dark' theme class by default", async () => { - const { container } = render() - expect(container.querySelector("div.juno-app-body")).toHaveClass("theme-dark") - }) - - test("renders a StyleProvider wrapper div with theme class as passed", async () => { - const { container } = render() - expect(container.querySelector("div.juno-app-body")).toHaveClass("my-theme") - }) - - test("allows a child component to set the theme correctly via the function provided", async () => { - const TestToggleComponent = () => { - const { setThemeClass } = StyleProvider.useStyles() - return - } - const { container } = render( - - - - ) - // Verify initial theme class - const appBody = container.querySelector(".juno-app-body") - expect(appBody).toHaveClass("theme-light") - - // Simulate theme toggle - fireEvent.click(screen.getByText("Toggle Theme")) - expect(appBody).toHaveClass("theme-dark") - }) - - test("allows a child component to set a css class on the container via the function provided", async () => { - const TestAddClassComponent = () => { - const { addCssClass } = StyleProvider.useStyles() - return - } - const { container } = render( - - - - ) - // Verify initial theme class - const appBody = container.querySelector(".juno-app-body") - expect(appBody).toHaveClass("theme-dark") - // Simulate adding a class - fireEvent.click(screen.getByText("Set a Class")) - expect(appBody).toHaveClass("added-css-class") - // double-check existing classes are still there: - expect(appBody).toHaveClass("theme-dark") - }) - - test("allows a child component to remove a css class on the container via the function provided", async () => { - const TestRemoveClassComponent = () => { - const { removeCssClass } = StyleProvider.useStyles() - return - } - const { container } = render( - - - - ) - - // Verify initial theme class - const appBody = container.querySelector(".juno-app-body") - expect(appBody).toHaveClass("theme-dark") - // Simulate removing a class - fireEvent.click(screen.getByText("Remove a Class")) - expect(appBody).not.toHaveClass("theme-dark") - }) - - test("allows child components to consume the current theme name via the context it provides", async () => { - const TestChildComponent = () => { - const { currentTheme } = StyleProvider.useStyles() - return - } - const { container } = render( - - - - ) - const appBody = container.querySelector(".juno-app-body") - expect(appBody).toHaveClass("theme-test") - expect(screen.getByRole("button")).toHaveTextContent("theme-test") - }) - - test("persists the user's preferred theme across re-renders", async () => { - const ToggleChildComponent = () => { - const { currentTheme, setThemeClass } = StyleProvider.useStyles() - return ( - - ) - } - const { rerender } = render( - - - - ) - const appBody = document.querySelector(".juno-app-body") - const toggleButton = screen.getByRole("button") - const user = userEvent.setup() - - // Assert initial state - expect(appBody).toHaveClass("theme-dark") - - // Simulate user changing the theme - await user.click(toggleButton) - - // Assert updated state - expect(appBody).toHaveClass("theme-light") - - // Rerender to force component to decide about theme again - rerender( - - - - ) - - // Assert final state (i.e. last user choice was used) - expect(appBody).toHaveClass("theme-light") - }) - - // This test keeps failing, presumably because of issues with asynchronously updating currentTheme in the context. - // When using a similar set-up in storybook, updating the theme works as desired. - // leaving the skipped test for now, as it still has a value illustrating what the test aims to achieve. - test.skip("updates the current theme name provided when the theme is changed", async () => { - // Define a child component to use the context - const TestChildComponent = () => { - const { currentTheme, setThemeClass } = StyleProvider.useStyles() - - return - } - - // Render the component with a specific theme - const { container } = render( - - - - ) - - // Query for the container element and the toggle button - const appBody = container.querySelector(".juno-app-body") - const toggleButton = screen.getByRole("button") - - // Assert initial state - expect(appBody).toHaveClass("theme-test") - expect(toggleButton).toHaveTextContent("theme-test") - - // Create a userEvent instance and await click interaction - const user = userEvent.setup() - await user.click(toggleButton) // Ensure to await the click - - // Wait for theme updates and assert final state - await waitFor(() => { - expect(appBody).not.toHaveClass("theme-test") // Ensure old theme is removed - expect(appBody).toHaveClass("theme-light") // Check new theme is applied - expect(toggleButton).toHaveTextContent("theme-light") // Validate button text - }) - }) -}) diff --git a/packages/ui-components/src/deprecated_js/Switch/Switch.test.js b/packages/ui-components/src/deprecated_js/Switch/Switch.test.js deleted file mode 100644 index b4afe420d..000000000 --- a/packages/ui-components/src/deprecated_js/Switch/Switch.test.js +++ /dev/null @@ -1,184 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from "react" -import { render, screen, act } from "@testing-library/react" -import { Switch } from "./index" - -describe("Switch", () => { - test("renders a switch button", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - }) - - test("renders a switch with a name as passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("name", "My Switch") - }) - - test("renders a switch with an id as passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("id", "my-switch") - }) - - test("renders a switch with an auto-generated id if no id is passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("id") - expect(screen.getByRole("switch").getAttribute("id")).toMatch("juno-switch") - }) - - test("renders a Switch with an associated label with an id as passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByLabelText("My Switch")).toBeInTheDocument() - expect(document.querySelector(".juno-label")).toBeInTheDocument() - expect(document.querySelector(".juno-label")).toHaveTextContent("My Switch") - }) - - test("renders a Switch with a label associated by an auto-generated id if no id was passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByLabelText("This is a Switch")).toBeInTheDocument() - }) - - test("renders a disabled switch as passed", () => { - act(() => { - render() - }) - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toBeDisabled() - }) - - test("renders an invalid Switch as passed", () => { - act(() => { - render() - }) - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders a valid Switch as passed", () => { - act(() => { - render() - }) - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-valid") - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders a default size switch by default", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-default") - }) - - test("renders a small switch as passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-small") - }) - - test("renders a large switch as passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-large") - }) - - test("renders an aria-checked switch as passed", () => { - act(() => { - render() - }) - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("aria-checked") - }) - - test("renders an aria-checked attribute set to false if off", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("aria-checked", "false") - }) - - test("renders a helptext as passed", () => { - render() - expect(document.querySelector(".juno-form-hint")).toBeInTheDocument() - expect(document.querySelector(".juno-form-hint")).toHaveClass("juno-form-hint-help") - expect(document.querySelector(".juno-form-hint")).toHaveTextContent("this is a helptext") - }) - - test("renders a successtext as passed and validates the Element", () => { - render() - expect(document.querySelector(".juno-form-hint")).toBeInTheDocument() - expect(document.querySelector(".juno-form-hint")).toHaveClass("juno-form-hint-success") - expect(document.querySelector(".juno-form-hint")).toHaveTextContent("great success!") - expect(screen.getByRole("switch")).toHaveClass("juno-switch-valid") - }) - - test("renders an errortext as passed and invalidates the Element", () => { - render() - expect(document.querySelector(".juno-form-hint")).toBeInTheDocument() - expect(document.querySelector(".juno-form-hint")).toHaveClass("juno-form-hint-error") - expect(document.querySelector(".juno-form-hint")).toHaveTextContent("this is an error!") - expect(screen.getByRole("switch")).toHaveClass("juno-switch-invalid") - }) - - test("renders a wrapperClassName to the outer wrapper element", () => { - render() - expect(document.querySelector(".juno-switch-wrapper")).toBeInTheDocument() - expect(document.querySelector(".juno-switch-wrapper")).toHaveClass("my-wrapper-class") - }) - - test("renders a custom className", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("my-custom-class") - }) - - test("renders all props as passed", () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("id", "switch-1") - expect(screen.getByRole("switch")).toHaveAttribute("data-test", "23") - }) - - test("executes custom handler on change as passed", () => { - const onChangeSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onChangeSpy).toHaveBeenCalled() - }) - - test("executes handler on click as passed", () => { - const onClickSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onClickSpy).toHaveBeenCalled() - }) - - test("does not execute handler on change when disabled", () => { - const onChangeSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onChangeSpy).not.toHaveBeenCalled() - }) - - test("does not execute handler on click when disabled", () => { - const onClickSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onClickSpy).not.toHaveBeenCalled() - }) -}) diff --git a/packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.stories.js b/packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.stories.js rename to packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.test.js b/packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.test.js deleted file mode 100644 index 0ed3115e1..000000000 --- a/packages/ui-components/src/deprecated_js/SwitchRow/SwitchRow.test.js +++ /dev/null @@ -1,129 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from "react" -import { render, screen, act } from "@testing-library/react" -import { SwitchRow } from "./index" - -describe("SwitchRow", () => { - test("renders a switch row", async () => { - render() - expect(screen.getByTestId("switch-row")).toBeInTheDocument() - }) - - test("renders a switch row with a name as passed", async () => { - render() - expect(screen.getByTestId("switch-row")).toBeInTheDocument() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("name", "my-switch") - }) - - test("renders a switch row with a switch button and an associated label with an id as passed", async () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByLabelText("My Switch Row")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("id", "switch-row") - }) - - test("renders a help text as passed", async () => { - render() - expect(screen.getByText("Helptext goes here")).toBeInTheDocument() - }) - - test("renders a helpt text with a link as passed", async () => { - render(Link} />) - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("href", "#") - expect(screen.getByRole("link")).toHaveTextContent("Link") - }) - - test("renders a disabled switch as passed", async () => { - render() - expect(screen.getByRole("switch")).toBeDisabled() - }) - - test("renders a custom className to the parent as passed", async () => { - render() - expect(screen.getByTestId("switch-row")).toBeInTheDocument() - expect(screen.getByTestId("switch-row")).toHaveClass("my-custom-class") - }) - - test("renders an invalid SwitchRow as passed", async () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders an invalid SwitchRow with an error text as passed", async () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-invalid") - expect(screen.getByText("This is an error text")).toBeInTheDocument() - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders a valid SwitchRow with a successtext as passed", async () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveClass("juno-switch-valid") - expect(screen.getByText("This is a success text")).toBeInTheDocument() - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders all props as passed", async () => { - render() - expect(screen.getByTestId("switch-row")).toBeInTheDocument() - expect(screen.getByTestId("switch-row")).toHaveAttribute("data-test", "47") - }) - - test("renders a Switch with aria-checked set to false by default", async () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("aria-checked", "false") - }) - - test("renders a Switch that is aria-checked if ON is passed", async () => { - render() - expect(screen.getByRole("switch")).toBeInTheDocument() - expect(screen.getByRole("switch")).toHaveAttribute("aria-checked", "true") - }) - - test("executes handler on change as passed", async () => { - const onChangeSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onChangeSpy).toHaveBeenCalled() - }) - - test("executes handler on click as passed", async () => { - const onClickSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onClickSpy).toHaveBeenCalled() - }) - - test("does not execute handler on change as passed when disabled", async () => { - const onChangeSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onChangeSpy).not.toHaveBeenCalled() - }) - - test("does not execute handler on click as passed when disabled", async () => { - const onClickSpy = jest.fn() - render() - act(() => { - screen.getByRole("switch").click() - }) - expect(onClickSpy).not.toHaveBeenCalled() - }) -}) diff --git a/packages/ui-components/src/deprecated_js/TextInput/TextInput.test.js b/packages/ui-components/src/deprecated_js/TextInput/TextInput.test.js deleted file mode 100644 index bdfe72581..000000000 --- a/packages/ui-components/src/deprecated_js/TextInput/TextInput.test.js +++ /dev/null @@ -1,186 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen, fireEvent } from "@testing-library/react" -import { TextInput } from "./index" - -describe("TextInput", () => { - test("renders a html default text input with no type attribute", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).not.toHaveAttribute("type") - }) - - test("renders a text input with a name as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("name", "My TextInput") - }) - - test("renders a text input with a value as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("value", "Some kind of value") - }) - - test("renders a label as passed", () => { - render() - expect(document.querySelector(".juno-label")).toBeInTheDocument() - expect(document.querySelector(".juno-label")).toHaveTextContent("The Label") - }) - - test("renders a text input with an id as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("id", "my-textinput") - }) - - test("renders a text input with an auto-generated id if no id is passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("id") - expect(screen.getByRole("textbox").getAttribute("id")).toMatch("juno-textinput") - }) - - test("renders a text input with a label associated by an id as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("id") - expect(screen.getByRole("textbox").getAttribute("id")).toMatch("ti-1") - expect(screen.getByLabelText("TextInput goes here")).toBeInTheDocument() - }) - - test("renders a text input with a label associated by an auto-generated id if no id was passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByLabelText("This is a TextInput")).toBeInTheDocument() - }) - - test("renders a placeholder as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("placeholder", "my placeholder") - }) - - // resort to using a testId since { - render() - expect(screen.getByTestId("pw")).toBeInTheDocument() - expect(screen.getByTestId("pw")).toHaveAttribute("type", "password") - }) - - test("renders an email input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "email") - }) - - test("renders a telephone number input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "tel") - }) - - test("renders an url input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "url") - }) - - test("renders a number input as passed", () => { - render() - expect(screen.getByRole("spinbutton")).toBeInTheDocument() - expect(screen.getByRole("spinbutton")).toHaveAttribute("type", "number") - }) - - test("renders a disabled input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toBeDisabled() - }) - - test("renders a readonly input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("readonly") - }) - - test("renders a focussed input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveFocus() - }) - - test("renders an invalid input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders a valid input as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-valid") - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders a helptext as passed", () => { - render() - expect(document.querySelector(".juno-form-hint")).toBeInTheDocument() - expect(document.querySelector(".juno-form-hint")).toHaveClass("juno-form-hint-help") - expect(document.querySelector(".juno-form-hint")).toHaveTextContent("this is a helptext") - }) - - test("renders a successtext as passed and validates the Element", () => { - render() - expect(document.querySelector(".juno-form-hint")).toBeInTheDocument() - expect(document.querySelector(".juno-form-hint")).toHaveClass("juno-form-hint-success") - expect(document.querySelector(".juno-form-hint")).toHaveTextContent("great success!") - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-valid") - }) - - test("renders an errortext as passed and invalidates the Element", () => { - render() - expect(document.querySelector(".juno-form-hint")).toBeInTheDocument() - expect(document.querySelector(".juno-form-hint")).toHaveClass("juno-form-hint-error") - expect(document.querySelector(".juno-form-hint")).toHaveTextContent("this is an error!") - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-invalid") - }) - - test("fires onChange handler as passed", () => { - const handleChange = jest.fn() - render() - const textinput = screen.getByRole("textbox") - fireEvent.change(textinput, { target: { value: "a" } }) - expect(handleChange).toHaveBeenCalledTimes(1) - }) - - test("does not fire onChange handler when disabled", () => { - const onChangeSpy = jest.fn() - render() - screen.getByRole("textbox").click() - expect(onChangeSpy).not.toHaveBeenCalled() - }) - - test("renders a wrapperClassName to the outer wrapper element", () => { - render() - expect(document.querySelector(".juno-textinput-wrapper")).toBeInTheDocument() - expect(document.querySelector(".juno-textinput-wrapper")).toHaveClass("my-wrapper-class") - }) - - test("renders a className as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("my-custom-class") - }) - - test("renders other props as passed", () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("data-lolol", "527") - }) -}) diff --git a/packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.stories.js b/packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.stories.jsx similarity index 100% rename from packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.stories.js rename to packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.stories.jsx diff --git a/packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.test.js b/packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.test.js deleted file mode 100644 index a310cee55..000000000 --- a/packages/ui-components/src/deprecated_js/TextInputRow/TextInputRow.test.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen, fireEvent } from "@testing-library/react" -import { TextInputRow } from "./index" - -describe("TextInputRow", () => { - test("renders a text input row", async () => { - render() - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - }) - - test("renders an text input row with an input type email as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "email") - }) - - // There is no implicit aria-role for password input, using getByLabelText instead as per recommendation: https://github.com/testing-library/dom-testing-library/issues/567 - test("renders a text input row with an input type password as passed", async () => { - render() - expect(screen.getByLabelText("Password")).toBeInTheDocument() - }) - - test("renders a text input row with an input type number as passed", async () => { - render() - expect(screen.getByRole("spinbutton")).toBeInTheDocument() - expect(screen.getByRole("spinbutton")).toHaveAttribute("type", "number") - }) - - test("renders a text input row with an input type email as passed", async () => { - render() - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "email") - }) - - test("renders a text input row with an input type tel as passed", async () => { - render() - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "tel") - }) - - test("renders a text input row with an input type url as passed", async () => { - render() - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("type", "url") - }) - - test("renders a text input with a name as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("name", "my-text-input") - }) - - test("renders a text input with a value as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("value", "Some Value") - }) - - test("renders a text input row with a text input and an associated label with an id as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByLabelText("my-text-input")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("id", "text-input-row") - }) - - test("renders a text input with a placeholder as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveAttribute("placeholder", "Some Placeholder") - }) - - test("renders a help text as passed", async () => { - render() - expect(screen.getByText("Helptext goes here")).toBeInTheDocument() - }) - - test("renders a helpt text with a link as passed", async () => { - render(Link} />) - expect(screen.getByRole("link")).toBeInTheDocument() - expect(screen.getByRole("link")).toHaveAttribute("href", "#") - expect(screen.getByRole("link")).toHaveTextContent("Link") - }) - - test("renders a required label as passed", async () => { - render() - expect(document.querySelector(".juno-required")).toBeInTheDocument() - }) - - test("renders a className to the row as passed", async () => { - render() - expect(screen.getByTestId("text-input-row")).toHaveClass("my-custom-class") - }) - - test("renders a disabled text input as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toBeDisabled() - }) - - test("renders an invalid text input group as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-invalid") - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders an invalid text input group with an error text as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-invalid") - expect(screen.getByText("This is an error text")).toBeInTheDocument() - expect(screen.getByTitle("Dangerous")).toBeInTheDocument() - }) - - test("renders a valid text input group as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-valid") - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders a valid text input group with a success text as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveClass("juno-textinput-valid") - expect(screen.getByText("This is a success text")).toBeInTheDocument() - expect(screen.getByTitle("CheckCircle")).toBeInTheDocument() - }) - - test("renders a focussed text input as passed", async () => { - render() - expect(screen.getByRole("textbox")).toBeInTheDocument() - expect(screen.getByRole("textbox")).toHaveFocus() - }) - - test("renders all props to the row as passed", async () => { - render() - expect(screen.getByTestId("text-input-row")).toHaveAttribute("data-lolol", "some-prop") - }) - - test("fires onChange handler as passed when set", async () => { - const handleChange = jest.fn() - render() - const input = screen.getByRole("textbox") - fireEvent.change(input, { target: { value: "test value a" } }) - expect(handleChange).toHaveBeenCalledTimes(1) - expect(handleChange).toHaveBeenCalledWith( - expect.objectContaining({ - _reactName: "onChange", - target: expect.objectContaining({ - value: "test value a", - }), - type: "change", - }) - ) - }) - - test("fires onFocus handler as passed when set", async () => { - const handleFocus = jest.fn() - render() - const input = screen.getByRole("textbox") - fireEvent.focus(input) - expect(handleFocus).toHaveBeenCalledTimes(1) - }) - - test("fires onBlur handler as passed when set", async () => { - const handleBlur = jest.fn() - render() - const input = screen.getByRole("textbox") - fireEvent.focusOut(input) - expect(handleBlur).toHaveBeenCalledTimes(1) - }) - - test("onChange, onFocus, onBlur handlers not required", async () => { - render() - const input = screen.getByRole("textbox") - fireEvent.focus(input) - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - fireEvent.change(input, { target: { value: "test value a" } }) - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - fireEvent.focusOut(input) - expect(screen.getByTestId("text-input-row")).toBeInTheDocument() - }) -}) diff --git a/packages/ui-components/src/deprecated_js/Textarea/Textarea.test.js b/packages/ui-components/src/deprecated_js/Textarea/Textarea.test.js deleted file mode 100644 index f656c1b18..000000000 --- a/packages/ui-components/src/deprecated_js/Textarea/Textarea.test.js +++ /dev/null @@ -1,152 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as React from "react" -import { render, screen, fireEvent } from "@testing-library/react" -import { Textarea } from "./index" - -describe("Textarea", () => { - test("renders a native html textarea", () => { - render(