From 59c4a4b88c150e94f739d34502dac3b995ca9c19 Mon Sep 17 00:00:00 2001 From: Michael Marszalek Date: Thu, 5 Dec 2024 22:28:39 +0100 Subject: [PATCH 01/11] upgrade to React 19 --- .vscode/settings.json | 7 +- apps/storefront/package.json | 8 +- apps/storybook/package.json | 8 +- apps/theme/package.json | 8 +- packages/react/package.json | 4 +- plugins/figma/package.json | 8 +- yarn.lock | 238 ++++++++++++++++++++++++++++++++++- 7 files changed, 258 insertions(+), 23 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 06d7fab162..2f6f565756 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,7 +7,9 @@ "source.organizeImports.biome": "explicit" }, "editor.defaultFormatter": "biomejs.biome", - "css.customData": ["./.vscode/css-data.json"], + "css.customData": [ + "./.vscode/css-data.json" + ], "[css]": { "editor.defaultFormatter": "biomejs.biome" }, @@ -24,5 +26,8 @@ }, "[html]": { "editor.defaultFormatter": "biomejs.biome" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "biomejs.biome" } } diff --git a/apps/storefront/package.json b/apps/storefront/package.json index 7953d089cb..e1a596cd89 100644 --- a/apps/storefront/package.json +++ b/apps/storefront/package.json @@ -22,8 +22,8 @@ "clsx": "^2.1.1", "hastscript": "^9.0.0", "next": "^14.2.5", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "rehype-autolink-headings": "^7.1.0", "rehype-highlight": "^7.0.0", "rehype-slug": "^6.0.0", @@ -31,7 +31,7 @@ "webpack": "^5.94.0" }, "devDependencies": { - "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0" } } diff --git a/apps/storybook/package.json b/apps/storybook/package.json index ca5d2ccf7f..a208d9146c 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -15,8 +15,8 @@ "description": "", "dependencies": { "clsx": "^2.1.1", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "devDependencies": { "@chromatic-com/storybook": "^1.6.1", @@ -38,8 +38,8 @@ "@storybook/test-runner": "^0.19.1", "@storybook/theming": "^8.3.4", "@storybook/types": "^8.3.4", - "@types/react": "18.3.3", - "@types/react-dom": "^18.3.0", + "@types/react": "19.0.0", + "@types/react-dom": "^19.0.0", "axe-playwright": "^2.0.2", "concurrently": "^9.0.1", "http-server": "^14.1.1", diff --git a/apps/theme/package.json b/apps/theme/package.json index 5fcb75675a..5d9c71303b 100644 --- a/apps/theme/package.json +++ b/apps/theme/package.json @@ -19,17 +19,17 @@ "chroma-js": "^2.6.0", "clsx": "^2.1.1", "next": "^14.2.5", - "react": "^18.3.1", + "react": "^19.0.0", "react-color": "^2.19.3", "react-color-palette": "^7.3.0", - "react-dom": "^18.3.1", + "react-dom": "^19.0.0", "recharts": "^2.12.7", "zustand": "^4.5.4" }, "devDependencies": { "@types/chroma-js": "^2.4.4", - "@types/react": "^18.3.3", + "@types/react": "^19.0.0", "@types/react-color": "^3.0.12", - "@types/react-dom": "^18.3.0" + "@types/react-dom": "^19.0.0" } } diff --git a/packages/react/package.json b/packages/react/package.json index f924d4d472..ca7db3512d 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -59,8 +59,8 @@ "@testing-library/user-event": "^14.5.2", "copyfiles": "^2.4.1", "jsdom": "^24.1.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "rimraf": "^6.0.1", "rollup": "^4.22.4", "rollup-plugin-copy": "^3.5.0", diff --git a/plugins/figma/package.json b/plugins/figma/package.json index 62b10ba9cb..e586d042c6 100644 --- a/plugins/figma/package.json +++ b/plugins/figma/package.json @@ -21,15 +21,15 @@ "@digdir/designsystemet-react": "workspace:^", "@digdir/designsystemet-theme": "workspace:^", "clsx": "^2.1.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "react-router-dom": "^6.26.0" }, "devDependencies": { "@figma/plugin-typings": "^1.95.0", - "@types/react": "^18.0.28", + "@types/react": "^19.0.0", "@types/react-color": "^3.0.12", - "@types/react-dom": "^18.0.11", + "@types/react-dom": "^19.0.0", "@vitejs/plugin-react": "^4.3.1", "npm-run-all2": "^6.2.2", "postcss": "^8.4.41", diff --git a/yarn.lock b/yarn.lock index d40985ebf1..df81882244 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,9 +1,6 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - __metadata: version: 8 - cacheKey: 10 + cacheKey: merged "@adobe/css-tools@npm:^4.4.0": version: 4.4.0 @@ -1232,6 +1229,7 @@ __metadata: "@biomejs/cli-darwin-arm64@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-darwin-arm64@npm:1.9.3" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -1239,6 +1237,7 @@ __metadata: "@biomejs/cli-darwin-x64@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-darwin-x64@npm:1.9.3" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -1246,6 +1245,7 @@ __metadata: "@biomejs/cli-linux-arm64-musl@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.3" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -1253,6 +1253,7 @@ __metadata: "@biomejs/cli-linux-arm64@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-linux-arm64@npm:1.9.3" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -1260,6 +1261,7 @@ __metadata: "@biomejs/cli-linux-x64-musl@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.3" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -1267,6 +1269,7 @@ __metadata: "@biomejs/cli-linux-x64@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-linux-x64@npm:1.9.3" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -1274,6 +1277,7 @@ __metadata: "@biomejs/cli-win32-arm64@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-win32-arm64@npm:1.9.3" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -1281,6 +1285,7 @@ __metadata: "@biomejs/cli-win32-x64@npm:1.9.3": version: 1.9.3 resolution: "@biomejs/cli-win32-x64@npm:1.9.3" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1688,6 +1693,7 @@ __metadata: rimraf: "npm:^6.0.1" storybook: "npm:^8.3.4" wait-on: "npm:^8.0.1" + checksum: 10/undefined languageName: unknown linkType: soft @@ -1702,6 +1708,7 @@ __metadata: postcss-import: "npm:^16.1.0" postcss-nesting: "npm:^13.0.0" rimraf: "npm:^6.0.1" + checksum: 10/undefined languageName: unknown linkType: soft @@ -1733,6 +1740,7 @@ __metadata: peerDependencies: react: ">=18.3.1" react-dom: ">=18.3.1" + checksum: 10/undefined languageName: unknown linkType: soft @@ -1741,6 +1749,7 @@ __metadata: resolution: "@digdir/designsystemet-theme@workspace:packages/theme" dependencies: rimraf: "npm:^6.0.1" + checksum: 10/undefined languageName: unknown linkType: soft @@ -1779,12 +1788,14 @@ __metadata: typescript: "npm:^5.5.4" bin: designsystemet: dist/bin/designsystemet.js + checksum: 10/undefined languageName: unknown linkType: soft "@esbuild/aix-ppc64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/aix-ppc64@npm:0.20.2" + checksum: 10/undefined conditions: os=aix & cpu=ppc64 languageName: node linkType: hard @@ -1792,6 +1803,7 @@ __metadata: "@esbuild/aix-ppc64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/aix-ppc64@npm:0.21.5" + checksum: 10/undefined conditions: os=aix & cpu=ppc64 languageName: node linkType: hard @@ -1799,6 +1811,7 @@ __metadata: "@esbuild/aix-ppc64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/aix-ppc64@npm:0.23.0" + checksum: 10/undefined conditions: os=aix & cpu=ppc64 languageName: node linkType: hard @@ -1806,6 +1819,7 @@ __metadata: "@esbuild/aix-ppc64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/aix-ppc64@npm:0.23.1" + checksum: 10/undefined conditions: os=aix & cpu=ppc64 languageName: node linkType: hard @@ -1813,6 +1827,7 @@ __metadata: "@esbuild/android-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm64@npm:0.20.2" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -1820,6 +1835,7 @@ __metadata: "@esbuild/android-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/android-arm64@npm:0.21.5" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -1827,6 +1843,7 @@ __metadata: "@esbuild/android-arm64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/android-arm64@npm:0.23.0" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -1834,6 +1851,7 @@ __metadata: "@esbuild/android-arm64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/android-arm64@npm:0.23.1" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -1841,6 +1859,7 @@ __metadata: "@esbuild/android-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm@npm:0.20.2" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -1848,6 +1867,7 @@ __metadata: "@esbuild/android-arm@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/android-arm@npm:0.21.5" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -1855,6 +1875,7 @@ __metadata: "@esbuild/android-arm@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/android-arm@npm:0.23.0" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -1862,6 +1883,7 @@ __metadata: "@esbuild/android-arm@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/android-arm@npm:0.23.1" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -1869,6 +1891,7 @@ __metadata: "@esbuild/android-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -1876,6 +1899,7 @@ __metadata: "@esbuild/android-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/android-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -1883,6 +1907,7 @@ __metadata: "@esbuild/android-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/android-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -1890,6 +1915,7 @@ __metadata: "@esbuild/android-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/android-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -1897,6 +1923,7 @@ __metadata: "@esbuild/darwin-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-arm64@npm:0.20.2" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -1904,6 +1931,7 @@ __metadata: "@esbuild/darwin-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/darwin-arm64@npm:0.21.5" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -1911,6 +1939,7 @@ __metadata: "@esbuild/darwin-arm64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/darwin-arm64@npm:0.23.0" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -1918,6 +1947,7 @@ __metadata: "@esbuild/darwin-arm64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/darwin-arm64@npm:0.23.1" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -1925,6 +1955,7 @@ __metadata: "@esbuild/darwin-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -1932,6 +1963,7 @@ __metadata: "@esbuild/darwin-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/darwin-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -1939,6 +1971,7 @@ __metadata: "@esbuild/darwin-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/darwin-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -1946,6 +1979,7 @@ __metadata: "@esbuild/darwin-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/darwin-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -1953,6 +1987,7 @@ __metadata: "@esbuild/freebsd-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-arm64@npm:0.20.2" + checksum: 10/undefined conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -1960,6 +1995,7 @@ __metadata: "@esbuild/freebsd-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/freebsd-arm64@npm:0.21.5" + checksum: 10/undefined conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -1967,6 +2003,7 @@ __metadata: "@esbuild/freebsd-arm64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/freebsd-arm64@npm:0.23.0" + checksum: 10/undefined conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -1974,6 +2011,7 @@ __metadata: "@esbuild/freebsd-arm64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/freebsd-arm64@npm:0.23.1" + checksum: 10/undefined conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -1981,6 +2019,7 @@ __metadata: "@esbuild/freebsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -1988,6 +2027,7 @@ __metadata: "@esbuild/freebsd-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/freebsd-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -1995,6 +2035,7 @@ __metadata: "@esbuild/freebsd-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/freebsd-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -2002,6 +2043,7 @@ __metadata: "@esbuild/freebsd-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/freebsd-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -2009,6 +2051,7 @@ __metadata: "@esbuild/linux-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm64@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -2016,6 +2059,7 @@ __metadata: "@esbuild/linux-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-arm64@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -2023,6 +2067,7 @@ __metadata: "@esbuild/linux-arm64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-arm64@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -2030,6 +2075,7 @@ __metadata: "@esbuild/linux-arm64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-arm64@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -2037,6 +2083,7 @@ __metadata: "@esbuild/linux-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -2044,6 +2091,7 @@ __metadata: "@esbuild/linux-arm@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-arm@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -2051,6 +2099,7 @@ __metadata: "@esbuild/linux-arm@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-arm@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -2058,6 +2107,7 @@ __metadata: "@esbuild/linux-arm@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-arm@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -2065,6 +2115,7 @@ __metadata: "@esbuild/linux-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ia32@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2072,6 +2123,7 @@ __metadata: "@esbuild/linux-ia32@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-ia32@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2079,6 +2131,7 @@ __metadata: "@esbuild/linux-ia32@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-ia32@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2086,6 +2139,7 @@ __metadata: "@esbuild/linux-ia32@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-ia32@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2093,6 +2147,7 @@ __metadata: "@esbuild/linux-loong64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-loong64@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -2100,6 +2155,7 @@ __metadata: "@esbuild/linux-loong64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-loong64@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -2107,6 +2163,7 @@ __metadata: "@esbuild/linux-loong64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-loong64@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -2114,6 +2171,7 @@ __metadata: "@esbuild/linux-loong64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-loong64@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -2121,6 +2179,7 @@ __metadata: "@esbuild/linux-mips64el@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-mips64el@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -2128,6 +2187,7 @@ __metadata: "@esbuild/linux-mips64el@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-mips64el@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -2135,6 +2195,7 @@ __metadata: "@esbuild/linux-mips64el@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-mips64el@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -2142,6 +2203,7 @@ __metadata: "@esbuild/linux-mips64el@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-mips64el@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -2149,6 +2211,7 @@ __metadata: "@esbuild/linux-ppc64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ppc64@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -2156,6 +2219,7 @@ __metadata: "@esbuild/linux-ppc64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-ppc64@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -2163,6 +2227,7 @@ __metadata: "@esbuild/linux-ppc64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-ppc64@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -2170,6 +2235,7 @@ __metadata: "@esbuild/linux-ppc64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-ppc64@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -2177,6 +2243,7 @@ __metadata: "@esbuild/linux-riscv64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-riscv64@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -2184,6 +2251,7 @@ __metadata: "@esbuild/linux-riscv64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-riscv64@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -2191,6 +2259,7 @@ __metadata: "@esbuild/linux-riscv64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-riscv64@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -2198,6 +2267,7 @@ __metadata: "@esbuild/linux-riscv64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-riscv64@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -2205,6 +2275,7 @@ __metadata: "@esbuild/linux-s390x@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-s390x@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -2212,6 +2283,7 @@ __metadata: "@esbuild/linux-s390x@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-s390x@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -2219,6 +2291,7 @@ __metadata: "@esbuild/linux-s390x@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-s390x@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -2226,6 +2299,7 @@ __metadata: "@esbuild/linux-s390x@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-s390x@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -2233,6 +2307,7 @@ __metadata: "@esbuild/linux-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -2240,6 +2315,7 @@ __metadata: "@esbuild/linux-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -2247,6 +2323,7 @@ __metadata: "@esbuild/linux-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/linux-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -2254,6 +2331,7 @@ __metadata: "@esbuild/linux-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/linux-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -2261,6 +2339,7 @@ __metadata: "@esbuild/netbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/netbsd-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -2268,6 +2347,7 @@ __metadata: "@esbuild/netbsd-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/netbsd-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -2275,6 +2355,7 @@ __metadata: "@esbuild/netbsd-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/netbsd-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -2282,6 +2363,7 @@ __metadata: "@esbuild/netbsd-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/netbsd-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -2289,6 +2371,7 @@ __metadata: "@esbuild/openbsd-arm64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/openbsd-arm64@npm:0.23.0" + checksum: 10/undefined conditions: os=openbsd & cpu=arm64 languageName: node linkType: hard @@ -2296,6 +2379,7 @@ __metadata: "@esbuild/openbsd-arm64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/openbsd-arm64@npm:0.23.1" + checksum: 10/undefined conditions: os=openbsd & cpu=arm64 languageName: node linkType: hard @@ -2303,6 +2387,7 @@ __metadata: "@esbuild/openbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/openbsd-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -2310,6 +2395,7 @@ __metadata: "@esbuild/openbsd-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/openbsd-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -2317,6 +2403,7 @@ __metadata: "@esbuild/openbsd-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/openbsd-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -2324,6 +2411,7 @@ __metadata: "@esbuild/openbsd-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/openbsd-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -2331,6 +2419,7 @@ __metadata: "@esbuild/sunos-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/sunos-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -2338,6 +2427,7 @@ __metadata: "@esbuild/sunos-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/sunos-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -2345,6 +2435,7 @@ __metadata: "@esbuild/sunos-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/sunos-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -2352,6 +2443,7 @@ __metadata: "@esbuild/sunos-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/sunos-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -2359,6 +2451,7 @@ __metadata: "@esbuild/win32-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-arm64@npm:0.20.2" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -2366,6 +2459,7 @@ __metadata: "@esbuild/win32-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/win32-arm64@npm:0.21.5" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -2373,6 +2467,7 @@ __metadata: "@esbuild/win32-arm64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/win32-arm64@npm:0.23.0" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -2380,6 +2475,7 @@ __metadata: "@esbuild/win32-arm64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/win32-arm64@npm:0.23.1" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -2387,6 +2483,7 @@ __metadata: "@esbuild/win32-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-ia32@npm:0.20.2" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -2394,6 +2491,7 @@ __metadata: "@esbuild/win32-ia32@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/win32-ia32@npm:0.21.5" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -2401,6 +2499,7 @@ __metadata: "@esbuild/win32-ia32@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/win32-ia32@npm:0.23.0" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -2408,6 +2507,7 @@ __metadata: "@esbuild/win32-ia32@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/win32-ia32@npm:0.23.1" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -2415,6 +2515,7 @@ __metadata: "@esbuild/win32-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-x64@npm:0.20.2" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2422,6 +2523,7 @@ __metadata: "@esbuild/win32-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/win32-x64@npm:0.21.5" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2429,6 +2531,7 @@ __metadata: "@esbuild/win32-x64@npm:0.23.0": version: 0.23.0 resolution: "@esbuild/win32-x64@npm:0.23.0" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2436,6 +2539,7 @@ __metadata: "@esbuild/win32-x64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/win32-x64@npm:0.23.1" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3066,6 +3170,7 @@ __metadata: "@next/swc-darwin-arm64@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-darwin-arm64@npm:14.2.5" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3073,6 +3178,7 @@ __metadata: "@next/swc-darwin-x64@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-darwin-x64@npm:14.2.5" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3080,6 +3186,7 @@ __metadata: "@next/swc-linux-arm64-gnu@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-linux-arm64-gnu@npm:14.2.5" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3087,6 +3194,7 @@ __metadata: "@next/swc-linux-arm64-musl@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-linux-arm64-musl@npm:14.2.5" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3094,6 +3202,7 @@ __metadata: "@next/swc-linux-x64-gnu@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-linux-x64-gnu@npm:14.2.5" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3101,6 +3210,7 @@ __metadata: "@next/swc-linux-x64-musl@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-linux-x64-musl@npm:14.2.5" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3108,6 +3218,7 @@ __metadata: "@next/swc-win32-arm64-msvc@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-win32-arm64-msvc@npm:14.2.5" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -3115,6 +3226,7 @@ __metadata: "@next/swc-win32-ia32-msvc@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-win32-ia32-msvc@npm:14.2.5" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3122,6 +3234,7 @@ __metadata: "@next/swc-win32-x64-msvc@npm:14.2.5": version: 14.2.5 resolution: "@next/swc-win32-x64-msvc@npm:14.2.5" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3237,6 +3350,7 @@ __metadata: peerDependencies: react: ">=18.3.1" react-dom: ">=18.3.1" + checksum: 10/undefined languageName: unknown linkType: soft @@ -3313,6 +3427,7 @@ __metadata: "@rollup/rollup-android-arm-eabi@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-android-arm-eabi@npm:4.14.0" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -3320,6 +3435,7 @@ __metadata: "@rollup/rollup-android-arm-eabi@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-android-arm-eabi@npm:4.20.0" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -3327,6 +3443,7 @@ __metadata: "@rollup/rollup-android-arm-eabi@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-android-arm-eabi@npm:4.22.4" + checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -3334,6 +3451,7 @@ __metadata: "@rollup/rollup-android-arm64@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-android-arm64@npm:4.14.0" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -3341,6 +3459,7 @@ __metadata: "@rollup/rollup-android-arm64@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-android-arm64@npm:4.20.0" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -3348,6 +3467,7 @@ __metadata: "@rollup/rollup-android-arm64@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-android-arm64@npm:4.22.4" + checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -3355,6 +3475,7 @@ __metadata: "@rollup/rollup-darwin-arm64@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-darwin-arm64@npm:4.14.0" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3362,6 +3483,7 @@ __metadata: "@rollup/rollup-darwin-arm64@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-darwin-arm64@npm:4.20.0" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3369,6 +3491,7 @@ __metadata: "@rollup/rollup-darwin-arm64@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-darwin-arm64@npm:4.22.4" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3376,6 +3499,7 @@ __metadata: "@rollup/rollup-darwin-x64@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-darwin-x64@npm:4.14.0" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3383,6 +3507,7 @@ __metadata: "@rollup/rollup-darwin-x64@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-darwin-x64@npm:4.20.0" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3390,6 +3515,7 @@ __metadata: "@rollup/rollup-darwin-x64@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-darwin-x64@npm:4.22.4" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3397,6 +3523,7 @@ __metadata: "@rollup/rollup-linux-arm-gnueabihf@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -3404,6 +3531,7 @@ __metadata: "@rollup/rollup-linux-arm-gnueabihf@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard @@ -3411,6 +3539,7 @@ __metadata: "@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard @@ -3418,6 +3547,7 @@ __metadata: "@rollup/rollup-linux-arm-musleabihf@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard @@ -3425,6 +3555,7 @@ __metadata: "@rollup/rollup-linux-arm-musleabihf@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard @@ -3432,6 +3563,7 @@ __metadata: "@rollup/rollup-linux-arm64-gnu@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3439,6 +3571,7 @@ __metadata: "@rollup/rollup-linux-arm64-gnu@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3446,6 +3579,7 @@ __metadata: "@rollup/rollup-linux-arm64-gnu@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3453,6 +3587,7 @@ __metadata: "@rollup/rollup-linux-arm64-musl@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3460,6 +3595,7 @@ __metadata: "@rollup/rollup-linux-arm64-musl@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3467,6 +3603,7 @@ __metadata: "@rollup/rollup-linux-arm64-musl@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3474,6 +3611,7 @@ __metadata: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=ppc64le & libc=glibc languageName: node linkType: hard @@ -3481,6 +3619,7 @@ __metadata: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard @@ -3488,6 +3627,7 @@ __metadata: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard @@ -3495,6 +3635,7 @@ __metadata: "@rollup/rollup-linux-riscv64-gnu@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard @@ -3502,6 +3643,7 @@ __metadata: "@rollup/rollup-linux-riscv64-gnu@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard @@ -3509,6 +3651,7 @@ __metadata: "@rollup/rollup-linux-riscv64-gnu@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard @@ -3516,6 +3659,7 @@ __metadata: "@rollup/rollup-linux-s390x-gnu@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard @@ -3523,6 +3667,7 @@ __metadata: "@rollup/rollup-linux-s390x-gnu@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard @@ -3530,6 +3675,7 @@ __metadata: "@rollup/rollup-linux-s390x-gnu@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard @@ -3537,6 +3683,7 @@ __metadata: "@rollup/rollup-linux-x64-gnu@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3544,6 +3691,7 @@ __metadata: "@rollup/rollup-linux-x64-gnu@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3551,6 +3699,7 @@ __metadata: "@rollup/rollup-linux-x64-gnu@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3558,6 +3707,7 @@ __metadata: "@rollup/rollup-linux-x64-musl@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-linux-x64-musl@npm:4.14.0" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3565,6 +3715,7 @@ __metadata: "@rollup/rollup-linux-x64-musl@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-linux-x64-musl@npm:4.20.0" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3572,6 +3723,7 @@ __metadata: "@rollup/rollup-linux-x64-musl@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-linux-x64-musl@npm:4.22.4" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3579,6 +3731,7 @@ __metadata: "@rollup/rollup-win32-arm64-msvc@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.14.0" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -3586,6 +3739,7 @@ __metadata: "@rollup/rollup-win32-arm64-msvc@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.20.0" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -3593,6 +3747,7 @@ __metadata: "@rollup/rollup-win32-arm64-msvc@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.22.4" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -3600,6 +3755,7 @@ __metadata: "@rollup/rollup-win32-ia32-msvc@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.14.0" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3607,6 +3763,7 @@ __metadata: "@rollup/rollup-win32-ia32-msvc@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.20.0" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3614,6 +3771,7 @@ __metadata: "@rollup/rollup-win32-ia32-msvc@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.22.4" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3621,6 +3779,7 @@ __metadata: "@rollup/rollup-win32-x64-msvc@npm:4.14.0": version: 4.14.0 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.14.0" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3628,6 +3787,7 @@ __metadata: "@rollup/rollup-win32-x64-msvc@npm:4.20.0": version: 4.20.0 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.20.0" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3635,6 +3795,7 @@ __metadata: "@rollup/rollup-win32-x64-msvc@npm:4.22.4": version: 4.22.4 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.22.4" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -4431,6 +4592,7 @@ __metadata: "@swc/core-darwin-arm64@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-darwin-arm64@npm:1.6.5" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -4438,6 +4600,7 @@ __metadata: "@swc/core-darwin-arm64@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-darwin-arm64@npm:1.7.28" + checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -4445,6 +4608,7 @@ __metadata: "@swc/core-darwin-x64@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-darwin-x64@npm:1.6.5" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -4452,6 +4616,7 @@ __metadata: "@swc/core-darwin-x64@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-darwin-x64@npm:1.7.28" + checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -4459,6 +4624,7 @@ __metadata: "@swc/core-linux-arm-gnueabihf@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-linux-arm-gnueabihf@npm:1.6.5" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -4466,6 +4632,7 @@ __metadata: "@swc/core-linux-arm-gnueabihf@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-linux-arm-gnueabihf@npm:1.7.28" + checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -4473,6 +4640,7 @@ __metadata: "@swc/core-linux-arm64-gnu@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-linux-arm64-gnu@npm:1.6.5" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -4480,6 +4648,7 @@ __metadata: "@swc/core-linux-arm64-gnu@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-linux-arm64-gnu@npm:1.7.28" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -4487,6 +4656,7 @@ __metadata: "@swc/core-linux-arm64-musl@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-linux-arm64-musl@npm:1.6.5" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -4494,6 +4664,7 @@ __metadata: "@swc/core-linux-arm64-musl@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-linux-arm64-musl@npm:1.7.28" + checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -4501,6 +4672,7 @@ __metadata: "@swc/core-linux-x64-gnu@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-linux-x64-gnu@npm:1.6.5" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -4508,6 +4680,7 @@ __metadata: "@swc/core-linux-x64-gnu@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-linux-x64-gnu@npm:1.7.28" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -4515,6 +4688,7 @@ __metadata: "@swc/core-linux-x64-musl@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-linux-x64-musl@npm:1.6.5" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -4522,6 +4696,7 @@ __metadata: "@swc/core-linux-x64-musl@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-linux-x64-musl@npm:1.7.28" + checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -4529,6 +4704,7 @@ __metadata: "@swc/core-win32-arm64-msvc@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-win32-arm64-msvc@npm:1.6.5" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -4536,6 +4712,7 @@ __metadata: "@swc/core-win32-arm64-msvc@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-win32-arm64-msvc@npm:1.7.28" + checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -4543,6 +4720,7 @@ __metadata: "@swc/core-win32-ia32-msvc@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-win32-ia32-msvc@npm:1.6.5" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -4550,6 +4728,7 @@ __metadata: "@swc/core-win32-ia32-msvc@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-win32-ia32-msvc@npm:1.7.28" + checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -4557,6 +4736,7 @@ __metadata: "@swc/core-win32-x64-msvc@npm:1.6.5": version: 1.6.5 resolution: "@swc/core-win32-x64-msvc@npm:1.6.5" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -4564,6 +4744,7 @@ __metadata: "@swc/core-win32-x64-msvc@npm:1.7.28": version: 1.7.28 resolution: "@swc/core-win32-x64-msvc@npm:1.7.28" + checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -5375,6 +5556,15 @@ __metadata: languageName: node linkType: hard +"@types/react-dom@npm:^19.0.0": + version: 19.0.0 + resolution: "@types/react-dom@npm:19.0.0" + dependencies: + "@types/react": "npm:*" + checksum: 10/86945c4d4c4cd82e993acdd380c3d9d8e8ca297228aa72c0fa6af4620abb145e7b12235c9165d569f1b25b5f72d1dbe4b4e3f2419432248de9838b22e94295a2 + languageName: node + linkType: hard + "@types/react-syntax-highlighter@npm:^15.5.13": version: 15.5.13 resolution: "@types/react-syntax-highlighter@npm:15.5.13" @@ -5405,6 +5595,15 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:19.0.0, @types/react@npm:^19.0.0": + version: 19.0.0 + resolution: "@types/react@npm:19.0.0" + dependencies: + csstype: "npm:^3.0.2" + checksum: 10/5596d9a2c9c982d5e86add54f5d9b115153c4d47073dd3f8f8369a5e5b7f3088d614a935f85a2cf26eb6631d7ebebc7b913c5d22bf880847370070f2e60e63e6 + languageName: node + linkType: hard + "@types/react@npm:^16.8.0 || ^17.0.0 || ^18.0.0": version: 18.2.74 resolution: "@types/react@npm:18.2.74" @@ -9046,6 +9245,7 @@ __metadata: vite-plugin-generate-file: "npm:^0.2.0" vite-plugin-react-rich-svg: "npm:^1.1.1" vite-plugin-singlefile: "npm:^2.0.2" + checksum: 10/undefined languageName: unknown linkType: soft @@ -9387,6 +9587,7 @@ __metadata: resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" dependencies: node-gyp: "npm:latest" + checksum: 10/undefined conditions: os=darwin languageName: node linkType: hard @@ -9396,6 +9597,7 @@ __metadata: resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: node-gyp: "npm:latest" + checksum: 10/undefined conditions: os=darwin languageName: node linkType: hard @@ -15003,6 +15205,17 @@ __metadata: languageName: node linkType: hard +"react-dom@npm:^19.0.0": + version: 19.0.0 + resolution: "react-dom@npm:19.0.0" + dependencies: + scheduler: "npm:^0.25.0" + peerDependencies: + react: ^19.0.0 + checksum: 10/aa64a2f1991042f516260e8b0eca0ae777b6c8f1aa2b5ae096e80bbb6ac9b005aef2bca697969841d34f7e1819556263476bdfea36c35092e8d9aefde3de2d9a + languageName: node + linkType: hard + "react-element-to-jsx-string@npm:^15.0.0": version: 15.0.0 resolution: "react-element-to-jsx-string@npm:15.0.0" @@ -15138,6 +15351,13 @@ __metadata: languageName: node linkType: hard +"react@npm:^19.0.0": + version: 19.0.0 + resolution: "react@npm:19.0.0" + checksum: 10/2490969c503f644703c88990d20e4011fa6119ddeca451e9de48f6d7ab058d670d2852a5fcd3aa3cd90a923ab2815d532637bd4a814add402ae5c0d4f129ee71 + languageName: node + linkType: hard + "reactcss@npm:^1.2.0": version: 1.2.3 resolution: "reactcss@npm:1.2.3" @@ -15832,6 +16052,7 @@ __metadata: typescript-plugin-css-modules: "npm:^5.1.0" vite: "npm:^5.3.6" vitest: "npm:^2.0.5" + checksum: 10/undefined languageName: unknown linkType: soft @@ -15942,6 +16163,13 @@ __metadata: languageName: node linkType: hard +"scheduler@npm:^0.25.0": + version: 0.25.0 + resolution: "scheduler@npm:0.25.0" + checksum: 10/e661e38503ab29a153429a99203fefa764f28b35c079719eb5efdd2c1c1086522f6653d8ffce388209682c23891a6d1d32fa6badf53c35fb5b9cd0c55ace42de + languageName: node + linkType: hard + "schema-utils@npm:^3.1.1, schema-utils@npm:^3.2.0": version: 3.3.0 resolution: "schema-utils@npm:3.3.0" @@ -16458,6 +16686,7 @@ __metadata: rehype-slug: "npm:^6.0.0" remark-gfm: "npm:^4.0.0" webpack: "npm:^5.94.0" + checksum: 10/undefined languageName: unknown linkType: soft @@ -16951,6 +17180,7 @@ __metadata: react-dom: "npm:^18.3.1" recharts: "npm:^2.12.7" zustand: "npm:^4.5.4" + checksum: 10/undefined languageName: unknown linkType: soft From 39d31791c0c1731e6a871a0cbfce5f186229fce8 Mon Sep 17 00:00:00 2001 From: Michael Marszalek Date: Thu, 5 Dec 2024 22:29:18 +0100 Subject: [PATCH 02/11] fix errors for build:react --- .../components/Modal/ModalTriggerContext.tsx | 2 +- .../src/components/form/Combobox/Combobox.tsx | 2 +- .../form/Combobox/ComboboxContext.tsx | 2 +- .../Combobox/Option/useComboboxOption.tsx | 11 +++++++- .../utilities/RovingFocus/RovingFocusRoot.tsx | 2 +- packages/react/src/utilities/hooks/index.ts | 1 - .../useCheckboxGroup/useCheckboxGroup.ts | 19 ++++++++++++-- .../src/utilities/hooks/usePrevious.test.ts | 25 ------------------- .../react/src/utilities/hooks/usePrevious.ts | 9 ------- .../hooks/useRadioGroup/useRadioGroup.ts | 15 +++++++++-- 10 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 packages/react/src/utilities/hooks/usePrevious.test.ts delete mode 100644 packages/react/src/utilities/hooks/usePrevious.ts diff --git a/packages/react/src/components/Modal/ModalTriggerContext.tsx b/packages/react/src/components/Modal/ModalTriggerContext.tsx index c05ec16975..2515dcc5ca 100644 --- a/packages/react/src/components/Modal/ModalTriggerContext.tsx +++ b/packages/react/src/components/Modal/ModalTriggerContext.tsx @@ -1,7 +1,7 @@ import { createContext, useRef } from 'react'; import type { ReactNode, RefObject } from 'react'; -export const Context = createContext>({ +export const Context = createContext>({ current: null, }); diff --git a/packages/react/src/components/form/Combobox/Combobox.tsx b/packages/react/src/components/form/Combobox/Combobox.tsx index f2ae7dec86..467ccacf34 100644 --- a/packages/react/src/components/form/Combobox/Combobox.tsx +++ b/packages/react/src/components/form/Combobox/Combobox.tsx @@ -152,7 +152,7 @@ export const ComboboxComponent = forwardRef( }, forwareddRef, ) => { - const inputRef = useRef(null); + const inputRef = useRef(null); const portalRef = useRef(null); const listRef = useRef>([]); diff --git a/packages/react/src/components/form/Combobox/ComboboxContext.tsx b/packages/react/src/components/form/Combobox/ComboboxContext.tsx index 831e048f9e..abb7f54e13 100644 --- a/packages/react/src/components/form/Combobox/ComboboxContext.tsx +++ b/packages/react/src/components/form/Combobox/ComboboxContext.tsx @@ -27,7 +27,7 @@ export type ComboboxContextType = { size: NonNullable; formFieldProps: ReturnType; refs: UseFloatingReturn['refs']; - inputRef: RefObject; + inputRef: RefObject; open: boolean; inputValue: string; customIds: string[]; diff --git a/packages/react/src/components/form/Combobox/Option/useComboboxOption.tsx b/packages/react/src/components/form/Combobox/Option/useComboboxOption.tsx index 010670a1df..10fe82d5fa 100644 --- a/packages/react/src/components/form/Combobox/Option/useComboboxOption.tsx +++ b/packages/react/src/components/form/Combobox/Option/useComboboxOption.tsx @@ -5,6 +5,7 @@ import type { Ref } from 'react'; import { useDebounceCallback } from '../../../../utilities/hooks/useDebounceCallback/useDebounceCallback'; import { ComboboxContext } from '../ComboboxContext'; import { useComboboxId, useComboboxIdDispatch } from '../ComboboxIdContext'; +import type { Option } from '../useCombobox'; import { prefix } from '../utilities'; type UseComboboxOptionProps = { @@ -13,11 +14,19 @@ type UseComboboxOptionProps = { value: string; }; +type UseComboboxOptionReturn = { + id: string; + ref: Ref; + selected: Option; + active: boolean; + onOptionClick: () => void; +}; + export const useComboboxOption = ({ id, ref, value, -}: UseComboboxOptionProps) => { +}: UseComboboxOptionProps): UseComboboxOptionReturn => { const generatedId = useId(); const newId = id || generatedId; diff --git a/packages/react/src/utilities/RovingFocus/RovingFocusRoot.tsx b/packages/react/src/utilities/RovingFocus/RovingFocusRoot.tsx index 8e111302fc..e1b514dd9c 100644 --- a/packages/react/src/utilities/RovingFocus/RovingFocusRoot.tsx +++ b/packages/react/src/utilities/RovingFocus/RovingFocusRoot.tsx @@ -77,7 +77,7 @@ export const RovingFocusRoot = forwardRef< const [focusableValue, setFocusableValue] = useState(null); const [isShiftTabbing, setIsShiftTabbing] = useState(false); const elements = useRef(new Map()); - const myRef = useRef(); + const myRef = useRef(null); const refs = useMergeRefs([ref, myRef]); diff --git a/packages/react/src/utilities/hooks/index.ts b/packages/react/src/utilities/hooks/index.ts index 1e50bd9603..a34d865b0d 100644 --- a/packages/react/src/utilities/hooks/index.ts +++ b/packages/react/src/utilities/hooks/index.ts @@ -2,4 +2,3 @@ export { useDebounceCallback } from './useDebounceCallback/useDebounceCallback'; export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect/useIsomorphicLayoutEffect'; export { useMediaQuery } from './useMediaQuery/useMediaQuery'; export { useSynchronizedAnimation } from './useSynchronizedAnimation/useSynchronizedAnimation'; -export { usePrevious } from './usePrevious'; diff --git a/packages/react/src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.ts b/packages/react/src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.ts index bfc8ca156a..16eae612e9 100644 --- a/packages/react/src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.ts +++ b/packages/react/src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.ts @@ -60,7 +60,7 @@ export type GetCheckboxProps = Omit< > & { /** Enables indeterminate handling for this `Checkbox` and `CheckboxGroup` */ allowIndeterminate?: boolean; - ref?: React.RefObject; + ref?: React.Ref; value?: string; }; @@ -78,7 +78,22 @@ const toggleIndeterminate = ( } }; -export function useCheckboxGroup(props?: UseCheckboxGroupProps) { +type useCheckboxGroupReturn = { + value: string[]; + setValue: React.Dispatch>; + getCheckboxProps: ( + propsOrValue?: string | GetCheckboxProps, + ) => GetCheckboxProps; + validationMessageProps: { + children: ReactNode; + hidden: boolean; + id: string; + }; +}; + +export function useCheckboxGroup( + props?: UseCheckboxGroupProps, +): useCheckboxGroupReturn { const { error, name: groupName, diff --git a/packages/react/src/utilities/hooks/usePrevious.test.ts b/packages/react/src/utilities/hooks/usePrevious.test.ts deleted file mode 100644 index fe65b33f95..0000000000 --- a/packages/react/src/utilities/hooks/usePrevious.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { renderHook } from '@testing-library/react'; - -import { usePrevious } from './'; - -const renderUsePrevious = () => - renderHook(({ state }) => usePrevious(state), { initialProps: { state: 0 } }); - -describe('usePrevious', () => { - it('Returns undefined on initial render', () => { - const { result } = renderUsePrevious(); - expect(result.current).toBeUndefined(); - }); - - it('Returns previous state after rerender', () => { - const { result, rerender } = renderUsePrevious(); - rerender({ state: 1 }); - expect(result.current).toBe(0); - rerender({ state: 2 }); - expect(result.current).toBe(1); - rerender({ state: 4 }); - expect(result.current).toBe(2); - rerender({ state: 8 }); - expect(result.current).toBe(4); - }); -}); diff --git a/packages/react/src/utilities/hooks/usePrevious.ts b/packages/react/src/utilities/hooks/usePrevious.ts deleted file mode 100644 index 93ac0c5ab0..0000000000 --- a/packages/react/src/utilities/hooks/usePrevious.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { useEffect, useRef } from 'react'; - -export function usePrevious(value: T) { - const ref = useRef(); - useEffect(() => { - ref.current = value; - }, [value]); - return ref.current; -} diff --git a/packages/react/src/utilities/hooks/useRadioGroup/useRadioGroup.ts b/packages/react/src/utilities/hooks/useRadioGroup/useRadioGroup.ts index cd0204db2d..5fc8a89e5d 100644 --- a/packages/react/src/utilities/hooks/useRadioGroup/useRadioGroup.ts +++ b/packages/react/src/utilities/hooks/useRadioGroup/useRadioGroup.ts @@ -41,10 +41,21 @@ export type GetRadioProps = Omit< | 'checked' | 'value' > & { - ref?: React.RefObject; + ref?: React.Ref; value?: string; }; +type useRadioGroupReturn = { + value: string; + setValue: React.Dispatch>; + getRadioProps: (propsOrValue: string | GetRadioProps) => GetRadioProps; + validationMessageProps: { + children: ReactNode; + hidden: boolean; + id: string; + }; +}; + /** * useRadioGroup is used to group multiple components * @example @@ -66,7 +77,7 @@ export function useRadioGroup({ name, onChange, value: initalValue = '', -}: UseRadioGroupProps = {}) { +}: UseRadioGroupProps = {}): useRadioGroupReturn { const [groupValue, setGroupValue] = useState(initalValue); const errorId = useId(); const namedId = useId(); From dd2f26659a5856394300c48df171b799cce4ccae Mon Sep 17 00:00:00 2001 From: Barsnes Date: Fri, 6 Dec 2024 09:25:46 +0100 Subject: [PATCH 03/11] fix react types --- packages/react/src/components/Link/Link.test.tsx | 2 +- packages/react/src/components/Tag/Tag.stories.tsx | 4 ++-- packages/react/src/components/form/Field/Field.stories.tsx | 2 +- packages/react/src/components/form/Select/Select.test.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react/src/components/Link/Link.test.tsx b/packages/react/src/components/Link/Link.test.tsx index 46121fc5ea..a894fc716b 100644 --- a/packages/react/src/components/Link/Link.test.tsx +++ b/packages/react/src/components/Link/Link.test.tsx @@ -36,7 +36,7 @@ describe('Link', () => { const render = ( props: Partial> = {}, - ref?: RefObject, + ref?: RefObject, ) => { const allProps = { ...defaultProps, ...props }; return renderRtl( diff --git a/packages/react/src/components/Tag/Tag.stories.tsx b/packages/react/src/components/Tag/Tag.stories.tsx index 60baa3e6f4..153e93fbe5 100644 --- a/packages/react/src/components/Tag/Tag.stories.tsx +++ b/packages/react/src/components/Tag/Tag.stories.tsx @@ -22,7 +22,7 @@ export const Preview: Story = { }; const sizes: TagProps['data-size'][] = ['sm', 'md', 'lg']; -export const Sizes: StoryFn = ({ ...rest }): JSX.Element => { +export const Sizes: StoryFn = ({ ...rest }) => { return (
= ({ ...rest }): JSX.Element => { +export const Colors: StoryFn = ({ ...rest }) => { return ( <> {colors.map((color) => ( diff --git a/packages/react/src/components/form/Field/Field.stories.tsx b/packages/react/src/components/form/Field/Field.stories.tsx index a8008ff817..6be2faf63c 100644 --- a/packages/react/src/components/form/Field/Field.stories.tsx +++ b/packages/react/src/components/form/Field/Field.stories.tsx @@ -54,7 +54,7 @@ export const Preview: Story = (args) => { validationId, moveToBody, } = args as typeof toggles; - const Component = type as keyof JSX.IntrinsicElements; + const Component = type as keyof React.JSX.IntrinsicElements; useEffect(() => { const label = document.querySelector('label'); diff --git a/packages/react/src/components/form/Select/Select.test.tsx b/packages/react/src/components/form/Select/Select.test.tsx index 665d01dd18..adf4185230 100644 --- a/packages/react/src/components/form/Select/Select.test.tsx +++ b/packages/react/src/components/form/Select/Select.test.tsx @@ -107,5 +107,5 @@ describe('Select', () => { const render = ( props?: Partial, - ref?: RefObject, + ref?: RefObject, ) => renderRtl(