diff --git a/.github/publish-ci/vite/package.json b/.github/publish-ci/vite/package.json index d8a2d24de1..8640950ec7 100644 --- a/.github/publish-ci/vite/package.json +++ b/.github/publish-ci/vite/package.json @@ -22,7 +22,7 @@ "@vitejs/plugin-react": "^4.1.0", "prettier": "^3.1.1", "typescript": "^4.9.4", - "vite": "^4.0.0" + "vite": "^5.0.10" }, "msw": { "workerDirectory": "public" diff --git a/.github/publish-ci/vite/yarn.lock b/.github/publish-ci/vite/yarn.lock index ebb6e8dd49..88ad43415b 100644 --- a/.github/publish-ci/vite/yarn.lock +++ b/.github/publish-ci/vite/yarn.lock @@ -269,156 +269,163 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/android-arm64@npm:0.16.17" +"@esbuild/aix-ppc64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/aix-ppc64@npm:0.19.10" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/android-arm64@npm:0.19.10" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/android-arm@npm:0.16.17" +"@esbuild/android-arm@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/android-arm@npm:0.19.10" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/android-x64@npm:0.16.17" +"@esbuild/android-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/android-x64@npm:0.19.10" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/darwin-arm64@npm:0.16.17" +"@esbuild/darwin-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/darwin-arm64@npm:0.19.10" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/darwin-x64@npm:0.16.17" +"@esbuild/darwin-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/darwin-x64@npm:0.19.10" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/freebsd-arm64@npm:0.16.17" +"@esbuild/freebsd-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/freebsd-arm64@npm:0.19.10" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/freebsd-x64@npm:0.16.17" +"@esbuild/freebsd-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/freebsd-x64@npm:0.19.10" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-arm64@npm:0.16.17" +"@esbuild/linux-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-arm64@npm:0.19.10" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-arm@npm:0.16.17" +"@esbuild/linux-arm@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-arm@npm:0.19.10" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-ia32@npm:0.16.17" +"@esbuild/linux-ia32@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-ia32@npm:0.19.10" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-loong64@npm:0.16.17" +"@esbuild/linux-loong64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-loong64@npm:0.19.10" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-mips64el@npm:0.16.17" +"@esbuild/linux-mips64el@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-mips64el@npm:0.19.10" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-ppc64@npm:0.16.17" +"@esbuild/linux-ppc64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-ppc64@npm:0.19.10" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-riscv64@npm:0.16.17" +"@esbuild/linux-riscv64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-riscv64@npm:0.19.10" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-s390x@npm:0.16.17" +"@esbuild/linux-s390x@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-s390x@npm:0.19.10" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-x64@npm:0.16.17" +"@esbuild/linux-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-x64@npm:0.19.10" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/netbsd-x64@npm:0.16.17" +"@esbuild/netbsd-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/netbsd-x64@npm:0.19.10" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/openbsd-x64@npm:0.16.17" +"@esbuild/openbsd-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/openbsd-x64@npm:0.19.10" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/sunos-x64@npm:0.16.17" +"@esbuild/sunos-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/sunos-x64@npm:0.19.10" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/win32-arm64@npm:0.16.17" +"@esbuild/win32-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/win32-arm64@npm:0.19.10" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/win32-ia32@npm:0.16.17" +"@esbuild/win32-ia32@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/win32-ia32@npm:0.19.10" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/win32-x64@npm:0.16.17" +"@esbuild/win32-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/win32-x64@npm:0.19.10" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -569,6 +576,97 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.9.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-android-arm64@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-android-arm64@npm:4.9.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-arm64@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.9.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-x64@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.9.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.9.1" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.9.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-musl@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.9.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-gnu@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.9.1" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.9.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.9.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.9.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.9.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.9.1": + version: 4.9.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.9.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -959,33 +1057,36 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.16.14": - version: 0.16.17 - resolution: "esbuild@npm:0.16.17" - dependencies: - "@esbuild/android-arm": 0.16.17 - "@esbuild/android-arm64": 0.16.17 - "@esbuild/android-x64": 0.16.17 - "@esbuild/darwin-arm64": 0.16.17 - "@esbuild/darwin-x64": 0.16.17 - "@esbuild/freebsd-arm64": 0.16.17 - "@esbuild/freebsd-x64": 0.16.17 - "@esbuild/linux-arm": 0.16.17 - "@esbuild/linux-arm64": 0.16.17 - "@esbuild/linux-ia32": 0.16.17 - "@esbuild/linux-loong64": 0.16.17 - "@esbuild/linux-mips64el": 0.16.17 - "@esbuild/linux-ppc64": 0.16.17 - "@esbuild/linux-riscv64": 0.16.17 - "@esbuild/linux-s390x": 0.16.17 - "@esbuild/linux-x64": 0.16.17 - "@esbuild/netbsd-x64": 0.16.17 - "@esbuild/openbsd-x64": 0.16.17 - "@esbuild/sunos-x64": 0.16.17 - "@esbuild/win32-arm64": 0.16.17 - "@esbuild/win32-ia32": 0.16.17 - "@esbuild/win32-x64": 0.16.17 +"esbuild@npm:^0.19.3": + version: 0.19.10 + resolution: "esbuild@npm:0.19.10" + dependencies: + "@esbuild/aix-ppc64": 0.19.10 + "@esbuild/android-arm": 0.19.10 + "@esbuild/android-arm64": 0.19.10 + "@esbuild/android-x64": 0.19.10 + "@esbuild/darwin-arm64": 0.19.10 + "@esbuild/darwin-x64": 0.19.10 + "@esbuild/freebsd-arm64": 0.19.10 + "@esbuild/freebsd-x64": 0.19.10 + "@esbuild/linux-arm": 0.19.10 + "@esbuild/linux-arm64": 0.19.10 + "@esbuild/linux-ia32": 0.19.10 + "@esbuild/linux-loong64": 0.19.10 + "@esbuild/linux-mips64el": 0.19.10 + "@esbuild/linux-ppc64": 0.19.10 + "@esbuild/linux-riscv64": 0.19.10 + "@esbuild/linux-s390x": 0.19.10 + "@esbuild/linux-x64": 0.19.10 + "@esbuild/netbsd-x64": 0.19.10 + "@esbuild/openbsd-x64": 0.19.10 + "@esbuild/sunos-x64": 0.19.10 + "@esbuild/win32-arm64": 0.19.10 + "@esbuild/win32-ia32": 0.19.10 + "@esbuild/win32-x64": 0.19.10 dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true "@esbuild/android-arm": optional: true "@esbuild/android-arm64": @@ -1032,7 +1133,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: 4c2cc609ecfb426554bc3f75beb92d89eb2d0c515cfceebaa36c7599d7dcaab7056b70f6d6b51e72b45951ddf9021ee28e356cf205f8e42cc055d522312ea30c + checksum: b97f2f837c931e065839fe9adebba44b80aaa81c6b32dca4e1e77c068a0afb045d08a94d86abdacb29daef783ec092f0db688a31f3d463e2e42ac17e5a478265 languageName: node linkType: hard @@ -1076,6 +1177,16 @@ __metadata: languageName: node linkType: hard +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + "fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1" @@ -1085,10 +1196,12 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: b32fbaebb3f8ec4969f033073b43f5c8befbb58f1a79e12f1d7490358150359ebd92f49e72ff0144f65f2c48ea2a605bff2d07965f548f6474fd8efd95bf361a +"fsevents@patch:fsevents@~2.3.3#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: latest + conditions: os=darwin languageName: node linkType: hard @@ -1170,15 +1283,6 @@ __metadata: languageName: node linkType: hard -"has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: ^1.1.1 - checksum: b9ad53d53be4af90ce5d1c38331e712522417d017d5ef1ebd0507e07c2fbad8686fffb8e12ddecd4c39ca9b9b47431afbb975b8abf7f3c3b82c98e9aad052792 - languageName: node - linkType: hard - "http-cache-semantics@npm:^4.1.0": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -1270,15 +1374,6 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.9.0": - version: 2.11.0 - resolution: "is-core-module@npm:2.11.0" - dependencies: - has: ^1.0.3 - checksum: f96fd490c6b48eb4f6d10ba815c6ef13f410b0ba6f7eb8577af51697de523e5f2cd9de1c441b51d27251bf0e4aebc936545e33a5d26d5d51f28d25698d4a8bab - languageName: node - linkType: hard - "is-fullwidth-code-point@npm:^3.0.0": version: 3.0.0 resolution: "is-fullwidth-code-point@npm:3.0.0" @@ -1503,12 +1598,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.4": - version: 3.3.4 - resolution: "nanoid@npm:3.3.4" +"nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" bin: nanoid: bin/nanoid.cjs - checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c + checksum: d36c427e530713e4ac6567d488b489a36582ef89da1d6d4e3b87eded11eb10d7042a877958c6f104929809b2ab0bafa17652b076cdf84324aa75b30b722204f2 languageName: node linkType: hard @@ -1594,13 +1689,6 @@ __metadata: languageName: node linkType: hard -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -1608,14 +1696,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.21": - version: 8.4.21 - resolution: "postcss@npm:8.4.21" +"postcss@npm:^8.4.32": + version: 8.4.32 + resolution: "postcss@npm:8.4.32" dependencies: - nanoid: ^3.3.4 + nanoid: ^3.3.7 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: e39ac60ccd1542d4f9d93d894048aac0d686b3bb38e927d8386005718e6793dbbb46930f0a523fe382f1bbd843c6d980aaea791252bf5e176180e5a4336d9679 + checksum: 220d9d0bf5d65be7ed31006c523bfb11619461d296245c1231831f90150aeb4a31eab9983ac9c5c89759a3ca8b60b3e0d098574964e1691673c3ce5c494305ae languageName: node linkType: hard @@ -1684,32 +1772,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.22.1": - version: 1.22.1 - resolution: "resolve@npm:1.22.1" - dependencies: - is-core-module: ^2.9.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: 07af5fc1e81aa1d866cbc9e9460fbb67318a10fa3c4deadc35c3ad8a898ee9a71a86a65e4755ac3195e0ea0cfbe201eb323ebe655ce90526fd61917313a34e4e - languageName: node - linkType: hard - -"resolve@patch:resolve@^1.22.1#~builtin": - version: 1.22.1 - resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d" - dependencies: - is-core-module: ^2.9.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: 5656f4d0bedcf8eb52685c1abdf8fbe73a1603bb1160a24d716e27a57f6cecbe2432ff9c89c2bd57542c3a7b9d14b1882b73bfe2e9d7849c9a4c0b8b39f02b8b - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1728,17 +1790,56 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^3.10.0": - version: 3.19.1 - resolution: "rollup@npm:3.19.1" - dependencies: +"rollup@npm:^4.2.0": + version: 4.9.1 + resolution: "rollup@npm:4.9.1" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.9.1 + "@rollup/rollup-android-arm64": 4.9.1 + "@rollup/rollup-darwin-arm64": 4.9.1 + "@rollup/rollup-darwin-x64": 4.9.1 + "@rollup/rollup-linux-arm-gnueabihf": 4.9.1 + "@rollup/rollup-linux-arm64-gnu": 4.9.1 + "@rollup/rollup-linux-arm64-musl": 4.9.1 + "@rollup/rollup-linux-riscv64-gnu": 4.9.1 + "@rollup/rollup-linux-x64-gnu": 4.9.1 + "@rollup/rollup-linux-x64-musl": 4.9.1 + "@rollup/rollup-win32-arm64-msvc": 4.9.1 + "@rollup/rollup-win32-ia32-msvc": 4.9.1 + "@rollup/rollup-win32-x64-msvc": 4.9.1 fsevents: ~2.3.2 dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true fsevents: optional: true bin: rollup: dist/bin/rollup - checksum: f78198c6de224b26650c70b16db156762d1fcceeb375d34fb2c76fc5b23a78f712c3c881d3248e6f277a511589e20d50c247bcf5c7920f1ddc0a43cadf9f0140 + checksum: 70917da16960d52d6747bd7b8eb884157a0e9b4966f5f40d788782b92e7eeaf556a98bb477e17ec94ed12a20378403aa2a392b6d2fe425bb2e1bb37d55474714 languageName: node linkType: hard @@ -1755,7 +1856,7 @@ __metadata: react: ^18.2.0 react-dom: ^18.2.0 typescript: ^4.9.4 - vite: ^4.0.0 + vite: ^5.0.10 languageName: unknown linkType: soft @@ -1898,13 +1999,6 @@ __metadata: languageName: node linkType: hard -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 53b1e247e68e05db7b3808b99b892bd36fb096e6fba213a06da7fab22045e97597db425c724f2bbd6c99a3c295e1e73f3e4de78592289f38431049e1277ca0ae - languageName: node - linkType: hard - "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.13 resolution: "tar@npm:6.1.13" @@ -1992,18 +2086,18 @@ __metadata: languageName: node linkType: hard -"vite@npm:^4.0.0": - version: 4.1.4 - resolution: "vite@npm:4.1.4" +"vite@npm:^5.0.10": + version: 5.0.10 + resolution: "vite@npm:5.0.10" dependencies: - esbuild: ^0.16.14 - fsevents: ~2.3.2 - postcss: ^8.4.21 - resolve: ^1.22.1 - rollup: ^3.10.0 + esbuild: ^0.19.3 + fsevents: ~2.3.3 + postcss: ^8.4.32 + rollup: ^4.2.0 peerDependencies: - "@types/node": ">= 14" + "@types/node": ^18.0.0 || >=20.0.0 less: "*" + lightningcss: ^1.21.0 sass: "*" stylus: "*" sugarss: "*" @@ -2016,6 +2110,8 @@ __metadata: optional: true less: optional: true + lightningcss: + optional: true sass: optional: true stylus: @@ -2026,7 +2122,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 50a9a1f2e29e0ee8fefdec60314d38fb9b746df0bb6ae5a8114014b5bfd95e0fc9b29c0d5e73939361ba53af7eb66c7d20c5656bbe53a783e96540bd3b907c47 + checksum: a1c96be1dc8bafb981c0874813a6b783ee9c4cd235188d7dc746133972d8992fe85111b7402365fee698ffcb626cd31b39bf2f2523140e50b07b81ce3c0139d1 languageName: node linkType: hard diff --git a/.gitignore b/.gitignore index 77f0ad066a..9397966e18 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ report.*.json # docs/public/build docs/api/* +docs/vite.config.mts.timestamp-*.mjs diff --git a/.yarn/patches/@remix-run-dev-npm-1.15.0-33b55fa3ee.patch b/.yarn/patches/@remix-run-dev-npm-1.15.0-33b55fa3ee.patch deleted file mode 100644 index dafacefc4d..0000000000 --- a/.yarn/patches/@remix-run-dev-npm-1.15.0-33b55fa3ee.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/dist/compiler/plugins/mdx.js b/dist/compiler/plugins/mdx.js -index 727fa32c7ff0db6fd1db6ab81aa9c6d9d819d4a4..51ab32cb5a62dfe54883d7004f5c3499f3dc2422 100644 ---- a/dist/compiler/plugins/mdx.js -+++ b/dist/compiler/plugins/mdx.js -@@ -96,7 +96,8 @@ export const handle = typeof attributes !== "undefined" && attributes.handle; - pragma: "React.createElement", - pragmaFrag: "React.Fragment", - rehypePlugins, -- remarkPlugins -+ remarkPlugins, -+ providerImportSource: "@mdx-js/react" - }); - let contents = ` - ${compiled.value} diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..42ec5e40f1 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,11 @@ +node_modules + +.cache +.env +.vercel +.output + +build +public/build +api/index.js* +api/_assets* diff --git a/docs/.nvmrc b/docs/.nvmrc new file mode 100644 index 0000000000..25bf17fc5a --- /dev/null +++ b/docs/.nvmrc @@ -0,0 +1 @@ +18 \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..944936b342 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,34 @@ +# Welcome to Remix! + +- [Remix Docs](https://remix.run/docs) + +## Deployment + +After having run the `create-remix` command and selected "Vercel" as a deployment target, you only need to [import your Git repository](https://vercel.com/new) into Vercel, and it will be deployed. + +If you'd like to avoid using a Git repository, you can also deploy the directory by running [Vercel CLI](https://vercel.com/cli): + +```sh +npm i -g vercel +vercel +``` + +It is generally recommended to use a Git repository, because future commits will then automatically be deployed by Vercel, through its [Git Integration](https://vercel.com/docs/concepts/git). + +## Development + +To run your Remix app locally, make sure your project's local dependencies are installed: + +```sh +npm install +``` + +Afterwards, start the Remix development server like so: + +```sh +npm run dev +``` + +Open up [http://localhost:3000](http://localhost:3000) and you should be ready to go! + +If you're used to using the `vercel dev` command provided by [Vercel CLI](https://vercel.com/cli) instead, you can also use that, but it's not needed. diff --git a/docs/app/components/AccessibleIcon.tsx b/docs/app/components/AccessibleIcon.tsx index a67e816654..4b97c2f847 100644 --- a/docs/app/components/AccessibleIcon.tsx +++ b/docs/app/components/AccessibleIcon.tsx @@ -1,9 +1,5 @@ import { Children, cloneElement, ReactNode } from 'react' -import { styled } from '~/styles/stitches.config' - -const VisuallyHiddenLabel = styled('span', { - visuallyHidden: '', -}) +import { visuallyHidden } from '../styles/utilities.css' interface AccessibleIconProps { children: ReactNode @@ -24,7 +20,7 @@ export const AccessibleIcon = ({ focusable: 'false', className, })} - {label} + {label} ) } diff --git a/docs/app/components/Asides/StickyAside.css.ts b/docs/app/components/Asides/StickyAside.css.ts new file mode 100644 index 0000000000..0d23fbc71e --- /dev/null +++ b/docs/app/components/Asides/StickyAside.css.ts @@ -0,0 +1,27 @@ +import { recipe } from '@vanilla-extract/recipes' +import { BREAKPOINTS } from '../../styles/breakpoints.css' +import { vars } from '../../styles/theme-contract.css' + +export const aside = recipe({ + base: { + display: 'none', + flexShrink: 1, + width: '30rem', + gridArea: 'aside', + + '@media': { + [`screen and ${BREAKPOINTS.tabletUp}`]: { + display: 'block', + paddingTop: vars.space['25'], + height: '100%', + }, + }, + }, + variants: { + isStuck: { + true: { + position: 'fixed', + }, + }, + }, +}) diff --git a/docs/app/components/Asides/StickyAside.tsx b/docs/app/components/Asides/StickyAside.tsx index 82beab2d64..02c78a91ae 100644 --- a/docs/app/components/Asides/StickyAside.tsx +++ b/docs/app/components/Asides/StickyAside.tsx @@ -3,9 +3,8 @@ import { animated } from '@react-spring/web' import { useAnimatedHeader } from '~/hooks/useAnimatedHeader' -import { styled } from '~/styles/stitches.config' - import { getHeaderHeights } from '../Header/Header' +import { aside } from './StickyAside.css' interface StickyAsideProps { children?: ReactNode @@ -19,29 +18,13 @@ export const StickyAside = ({ children }: StickyAsideProps) => { }) return ( - + ) } - -const Aside = styled(animated.aside, { - display: 'none', - flexShrink: 1, - width: '30rem', - gridArea: 'aside', - - '@tabletUp': { - display: 'block', - pt: '$25', - height: '100%', - }, - - variants: { - isStuck: { - true: { - position: 'fixed', - }, - }, - }, -}) diff --git a/docs/app/components/AspectRatio.css.ts b/docs/app/components/AspectRatio.css.ts new file mode 100644 index 0000000000..d3c0eaa61c --- /dev/null +++ b/docs/app/components/AspectRatio.css.ts @@ -0,0 +1,36 @@ +import { createVar, globalStyle, style } from '@vanilla-extract/css' + +export const widthVar = createVar() +export const heightVar = createVar() + +export const container = style({ + position: 'relative', + + '@supports': { + '(aspect-ratio: 1)': { + overflow: 'hidden', + aspectRatio: `${widthVar} / ${heightVar}`, + }, + + 'not (aspect-ratio: 1)': { + ':before': { + paddingTop: `calc((${widthVar} / ${heightVar}) * 100%)`, + display: 'block', + content: '', + width: '100%', + }, + }, + }, +}) + +globalStyle(`${container} > *`, { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + minWidth: '100%', + maxWidth: '100%', + minHeight: '100%', + maxHeight: '100%', + objectFit: 'cover', +}) diff --git a/docs/app/components/AspectRatio.tsx b/docs/app/components/AspectRatio.tsx index 3b1113d87c..de19ec4359 100644 --- a/docs/app/components/AspectRatio.tsx +++ b/docs/app/components/AspectRatio.tsx @@ -1,6 +1,8 @@ +import clsx from 'clsx' import { ReactNode } from 'react' +import { assignInlineVars } from '@vanilla-extract/dynamic' -import { styled } from '~/styles/stitches.config' +import { container, heightVar, widthVar } from './AspectRatio.css' interface AspectRatioProps { children: ReactNode @@ -15,47 +17,15 @@ export const AspectRatio = ({ height = 1, className, }: AspectRatioProps) => ( - {children} - + ) - -const Container = styled('div', { - '@supports(aspect-ratio: 1)': { - overflow: 'hidden', - }, - - '@supports not (aspect-ratio: 1)': { - '&:before': { - display: 'block', - content: '', - width: '100%', - }, - }, - - position: 'relative', - - '& > *': { - position: 'absolute', - top: '50%', - left: '50%', - transform: 'translate(-50%, -50%)', - minWidth: '100%', - maxWidth: '100%', - minHeight: '100%', - maxHeight: '100%', - objectFit: 'cover', - }, -}) diff --git a/docs/app/components/BadgeNew.css.ts b/docs/app/components/BadgeNew.css.ts new file mode 100644 index 0000000000..4216e67ffa --- /dev/null +++ b/docs/app/components/BadgeNew.css.ts @@ -0,0 +1,19 @@ +import { style } from '@vanilla-extract/css' +import { vars } from '../styles/theme-contract.css' +import { darkThemeClass } from '../styles/dark-theme.css' + +export const badge = style({ + fontSize: '1.2rem', + lineHeight: '1.2rem', + fontWeight: vars.fontWeights.bold, + padding: '0.6rem 0.4rem', + borderRadius: vars.radii.r8, + color: vars.colors.white, + background: vars.colors.blueGreenGradient100, + + selectors: { + [`${darkThemeClass} &`]: { + background: vars.colors.redYellowGradient100, + }, + }, +}) diff --git a/docs/app/components/BadgeNew.tsx b/docs/app/components/BadgeNew.tsx index ea6492f1c8..6035374768 100644 --- a/docs/app/components/BadgeNew.tsx +++ b/docs/app/components/BadgeNew.tsx @@ -1,20 +1,5 @@ -import { dark, styled } from '~/styles/stitches.config' +import { badge } from './BadgeNew.css' export const BadgeNew = () => { - return New + return New } - -const Badge = styled('span', { - fontSize: '1.2rem', - lineHeight: '1.2rem', - fontWeight: '$bold', - px: 6, - py: 4, - borderRadius: '$r8', - color: '$white', - background: '$blueGreenGradient100', - - [`.${dark} &`]: { - background: '$redYellowGradient100', - }, -}) diff --git a/docs/app/components/Buttons/Button.css.ts b/docs/app/components/Buttons/Button.css.ts new file mode 100644 index 0000000000..9b0330d73f --- /dev/null +++ b/docs/app/components/Buttons/Button.css.ts @@ -0,0 +1,44 @@ +import { recipe } from '@vanilla-extract/recipes' +import { vars } from '../../styles/theme-contract.css' + +export const sharedStyles = recipe({ + base: { + border: `solid 1px ${vars.colors.black}`, + backgroundColor: 'transparent', + borderRadius: vars.radii.r4, + fontFamily: vars.fonts.sans, + fontSize: vars.fontSizes.XXS, + lineHeight: vars.lineHeights.code, + padding: `${vars.space['5']} ${vars.space['10']}`, + cursor: 'pointer', + display: 'inline-flex', + alignItems: 'center', + + '@media': { + '(prefers-reduced-motion: no-preference)': { + transition: 'border-color 200ms ease-out', + }, + + '(hover:hover)': { + ':hover': { + borderColor: vars.colors.red100, + }, + }, + }, + + ':disabled': { + pointerEvents: 'none', + opacity: 0.5, + }, + }, + + variants: { + variant: { + regular: {}, + large: { + padding: '11px 9px 11px 12px', + borderRadius: vars.radii.r8, + }, + }, + }, +}) diff --git a/docs/app/components/Buttons/Button.tsx b/docs/app/components/Buttons/Button.tsx index 4887c49954..fdafc6b6c2 100644 --- a/docs/app/components/Buttons/Button.tsx +++ b/docs/app/components/Buttons/Button.tsx @@ -1,7 +1,7 @@ -import { css } from '@stitches/react' -import { MouseEventHandler, ReactNode } from 'react' +import { MouseEventHandler, ReactNode, forwardRef } from 'react' import { Link } from '@remix-run/react' -import { styled } from '~/styles/stitches.config' +import clsx from 'clsx' +import { sharedStyles } from './Button.css' interface ButtonProps { children: ReactNode @@ -13,78 +13,57 @@ interface ButtonProps { variant?: 'regular' | 'large' } -export const Button = ({ - children, - className, - type = 'button', - onClick, - disabled = false, - href, - variant = 'regular', -}: ButtonProps) => { - const handleClick: MouseEventHandler = e => { - if (onClick) { - onClick(e) +export const Button = forwardRef( + ( + { + children, + className, + type = 'button', + onClick, + disabled = false, + href, + variant = 'regular', + }: ButtonProps, + forwardedRef: any + ) => { + const handleClick: MouseEventHandler = e => { + if (onClick) { + onClick(e) + } + } + + if (href) { + return ( + + {children} + + ) } - } - if (href) { return ( - + ) } - - return ( - - {children} - - ) -} - -const sharedStyles = css({ - border: 'solid 1px $black', - backgroundColor: 'transparent', - borderRadius: '$r4', - fontFamily: '$sans', - fontSize: '$XXS', - lineHeight: '$code', - padding: '5px $10', - cursor: 'pointer', - display: 'inline-flex', - alignItems: 'center', - - '@motion': { - transition: 'border-color 200ms ease-out', - }, - - hover: { - borderColor: '$red100', - }, - - '&:disabled': { - pointerEvents: 'none', - opacity: 0.5, - }, - - variants: { - variant: { - regular: {}, - large: { - p: '11px 9px 11px 12px', - borderRadius: '$r8', - }, - }, - }, -}) - -const StyledLink = styled(Link, { ...sharedStyles }) - -const StyledButton = styled('button', { ...sharedStyles }) +) diff --git a/docs/app/components/Buttons/ButtonCopy.css.ts b/docs/app/components/Buttons/ButtonCopy.css.ts new file mode 100644 index 0000000000..f8bf8eca31 --- /dev/null +++ b/docs/app/components/Buttons/ButtonCopy.css.ts @@ -0,0 +1,47 @@ +import { style } from '@vanilla-extract/css' +import { vars } from '../../styles/theme-contract.css' +import { darkThemeClass } from '../../styles/dark-theme.css' + +export const animatedIcon = style({ + position: 'absolute', + left: '50%', + top: '50%', + transform: 'translate(-50%, -50%)', +}) + +export const absoluteContainer = style({ + display: 'block', + position: 'relative', + height: '100%', + width: '100%', +}) + +export const copyButton = style({ + backgroundColor: vars.colors.codeBackground, + border: 'none', + padding: 0, + height: 32, + width: 32, + overflow: 'hidden', + borderRadius: vars.radii.r4, + marginLeft: 14, + cursor: 'pointer', + + '@media': { + '(hover: hover)': { + ':hover': { + backgroundColor: vars.colors.red40, + }, + + selectors: { + [`${darkThemeClass} &:hover`]: { + backgroundColor: vars.colors.red40, + }, + }, + }, + + '(prefers-reduced-motion: no-preference)': { + transition: 'background-color 250ms ease-out', + }, + }, +}) diff --git a/docs/app/components/Buttons/ButtonCopy.tsx b/docs/app/components/Buttons/ButtonCopy.tsx index a083767177..9a518e53c5 100644 --- a/docs/app/components/Buttons/ButtonCopy.tsx +++ b/docs/app/components/Buttons/ButtonCopy.tsx @@ -2,9 +2,9 @@ import { animated, useSprings } from '@react-spring/web' import { CheckCircle, CopySimple } from 'phosphor-react' import { useState } from 'react' -import { dark, styled } from '~/styles/stitches.config' - import { AccessibleIcon } from '../AccessibleIcon' +import { absoluteContainer, animatedIcon, copyButton } from './ButtonCopy.css' +import clsx from 'clsx' interface ButtonCopyProps { children: string @@ -46,6 +46,8 @@ export const ButtonCopy = ({ children, className }: ButtonCopyProps) => { 2, i => ({ scale: copied && i === 0 ? 0 : !copied && i === 1 ? 0 : 1, + y: '-50%', + x: '-50%', onRest: () => { if (i === 0) { setTimeout(() => setCopied(false), 800) @@ -56,61 +58,36 @@ export const ButtonCopy = ({ children, className }: ButtonCopyProps) => { ) return ( - - - + ) } -const CopyButton = styled('button', { - backgroundColor: '$codeBackground', - border: 'none', - padding: '4px 4px 1px 4px', - height: 32, - width: 32, - overflow: 'hidden', - borderRadius: '$r4', - ml: 14, - cursor: 'pointer', - - hover: { - backgroundColor: '$red40', - }, - - [`.${dark} &`]: { - hover: { - backgroundColor: '#ff6d6d66', - }, - }, - - '@motion': { - transition: 'background-color 250ms ease-out', - }, -}) - -const AbsoluteContainer = styled('span', { - display: 'block', - position: 'relative', - height: '100%', - width: '100%', -}) - -const AnimatedCheck = styled(animated(CheckCircle), { - position: 'absolute', - inset: 0, -}) +const AnimatedCheck = animated(CheckCircle) -const AnimatedCopy = styled(animated(CopySimple), { - position: 'absolute', - inset: 0, -}) +const AnimatedCopy = animated(CopySimple) diff --git a/docs/app/components/Buttons/GradientButton.css.ts b/docs/app/components/Buttons/GradientButton.css.ts new file mode 100644 index 0000000000..ec8dfc5e41 --- /dev/null +++ b/docs/app/components/Buttons/GradientButton.css.ts @@ -0,0 +1,85 @@ +import { vars } from '../../styles/theme-contract.css' +import { darkThemeClass } from '../../styles/dark-theme.css' +import { recipe } from '@vanilla-extract/recipes' +import { style } from '@vanilla-extract/css' + +export const button = recipe({ + base: { + color: vars.colors.steel100, + border: 'none', + borderRadius: vars.radii.r8, + padding: 2, + backgroundClip: 'content-box', + position: 'relative', + display: 'inline-block', + zIndex: 0, + + ':before': { + content: '', + width: '100%', + height: '100%', + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + zIndex: -1, + borderRadius: 'inherit', + background: vars.colors.redYellowGradient100, + transition: 'filter 250ms ease-out', + }, + + selectors: { + [`${darkThemeClass} &:before`]: { + background: vars.colors.blueGreenGradient100, + }, + + '&:hover:before': { + filter: 'brightness(120%)', + }, + + [`.${darkThemeClass} &:hover:before`]: { + filter: 'brightness(140%)', + }, + }, + }, + + variants: { + size: { + small: { + fontSize: 12, + fontWeight: 400, + lineHeight: '140%', + + selectors: { + [`${darkThemeClass} &`]: { + fontWeight: 300, + }, + }, + }, + regular: { + fontSize: vars.fontSizes.XXS, + lineHeight: vars.lineHeights.XXS, + }, + }, + }, +}) + +export const inner = recipe({ + base: { + display: 'block', + backgroundColor: vars.colors.white, + borderRadius: 'inherit', + }, + + variants: { + size: { + small: { + padding: `${vars.space['5']} ${vars.space['10']}`, + }, + regular: { + padding: `${vars.space['15']} ${vars.space['10']} `, + }, + }, + }, +}) diff --git a/docs/app/components/Buttons/GradientButton.tsx b/docs/app/components/Buttons/GradientButton.tsx index f5e33af567..bf53614ea4 100644 --- a/docs/app/components/Buttons/GradientButton.tsx +++ b/docs/app/components/Buttons/GradientButton.tsx @@ -1,5 +1,6 @@ +import clsx from 'clsx' import { ReactNode } from 'react' -import { dark, styled } from '~/styles/stitches.config' +import { button, inner } from './GradientButton.css' interface GradientButtonProps { children: ReactNode @@ -14,92 +15,22 @@ export const GradientButton = ({ className, href, children, - tag, + tag = 'a', variant = 'regular', type = 'button', ...props }: GradientButtonProps) => { + const Element = tag + return ( - + {children} + ) } - -const Button = styled('a', { - color: '$steel100', - border: 'none', - borderRadius: '$r8', - p: 2, - backgroundClip: 'content-box', - position: 'relative', - display: 'inline-block', - zIndex: 0, - - '&:before': { - content: '', - width: '100%', - height: '100%', - position: 'absolute', - left: 0, - right: 0, - top: 0, - bottom: 0, - zIndex: -1, - borderRadius: 'inherit', - background: '$redYellowGradient100', - transition: 'filter 250ms ease-out', - }, - - [`.${dark} &:before`]: { - background: '$blueGreenGradient100', - }, - - '& > span': { - display: 'block', - backgroundColor: '$white', - borderRadius: 'inherit', - }, - - '&:hover:before': { - filter: 'brightness(120%)', - }, - - [`.${dark} &:hover:before`]: { - filter: 'brightness(140%)', - }, - - variants: { - size: { - small: { - fontSize: 12, - fontWeight: 400, - lineHeight: '140%', - - '& > span': { - px: '$10', - py: 5, - }, - - [`.${dark} &`]: { - fontWeight: 300, - }, - }, - regular: { - fontSize: '$XXS', - lineHeight: '$XXS', - - '& > span': { - p: '$10 $15', - }, - }, - }, - }, -}) diff --git a/docs/app/components/Buttons/NavButton.css.ts b/docs/app/components/Buttons/NavButton.css.ts new file mode 100644 index 0000000000..954d90f68f --- /dev/null +++ b/docs/app/components/Buttons/NavButton.css.ts @@ -0,0 +1,100 @@ +import { style } from '@vanilla-extract/css' +import { vars } from '../../styles/theme-contract.css' +import { XXS } from '../../styles/fontStyles.css' +import { recipe } from '@vanilla-extract/recipes' +import { darkThemeClass } from '../../styles/dark-theme.css' + +export const navIconWrapper = recipe({ + base: { + position: 'relative', + zIndex: vars.zIndices['2'], + display: 'flex', + alignItems: 'center', + margin: vars.space['15'], + }, + + variants: { + isRoute: { + true: { + color: vars.colors.steel100, + + selectors: { + [`${darkThemeClass} &`]: { + color: '#363645', + }, + }, + }, + }, + }, +}) + +export const navIconLabel = style([ + XXS, + { + fontWeight: vars.fontWeights.bold, + marginLeft: vars.space['15'], + }, +]) + +export const navAnchor = recipe({ + base: { + height: '4.6rem', + width: '4.6rem', + color: vars.colors.steel100, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + position: 'relative', + borderRadius: vars.radii.r4, + padding: 2, + backgroundClip: 'content-box', + + ':before': { + content: '', + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + zIndex: -1, + borderRadius: 'inherit', + opacity: 0, + background: vars.colors.redYellowGradient100, + }, + + '@media': { + '(prefers-reduced-motion: no-preference)': { + ':before': { + transition: 'opacity 250ms ease-out', + }, + }, + }, + }, + + variants: { + active: { + true: { + background: vars.colors.redYellowGradient100, + }, + false: { + backgroundColor: '$white', + + '@media': { + '(hover: hover)': { + selectors: { + '&:hover:before': { + opacity: 1, + }, + }, + }, + }, + }, + }, + variant: { + withLabel: { + width: '100%', + justifyContent: 'flex-start', + }, + }, + }, +}) diff --git a/docs/app/components/Buttons/NavButton.tsx b/docs/app/components/Buttons/NavButton.tsx index 27786c6589..195efaa2e6 100644 --- a/docs/app/components/Buttons/NavButton.tsx +++ b/docs/app/components/Buttons/NavButton.tsx @@ -3,13 +3,12 @@ import { MouseEventHandler, RefAttributes, } from 'react' -import { useLocation } from '@remix-run/react' +import { Link, useLocation } from '@remix-run/react' import * as Toolbar from '@radix-ui/react-toolbar' import { IconProps } from 'phosphor-react' -import { dark, styled } from '~/styles/stitches.config' -import { getFontStyles } from '~/styles/fontStyles' import { useIsDarkTheme } from '~/hooks/useIsDarkTheme' +import { navAnchor, navIconLabel, navIconWrapper } from './NavButton.css' export interface NavigationButtonProps { title: string @@ -51,91 +50,26 @@ export const NavigationButton = ({ * TODO: refactor to use `Link` component */ return ( - - - - {showLabel ? {title} : null} - - + + + + {showLabel ? {title} : null} + + + ) } - -const NavAnchor = styled(Toolbar.Link, { - height: '4.6rem', - width: '4.6rem', - color: '$steel100', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - position: 'relative', - borderRadius: '$r8', - p: 2, - backgroundClip: 'content-box', - - '&:before': { - content: '', - position: 'absolute', - left: 0, - right: 0, - top: 0, - bottom: 0, - zIndex: -1, - borderRadius: 'inherit', - opacity: 0, - background: '$redYellowGradient100', - - '@motion': { - transition: 'opacity 250ms ease-out', - }, - }, - - variants: { - active: { - true: { - background: '$redYellowGradient100', - }, - false: { - backgroundColor: '$white', - - hover: { - '&::before': { - opacity: 1, - }, - }, - }, - }, - variant: { - withLabel: { - width: '100%', - justifyContent: 'flex-start', - }, - }, - }, -}) - -const NavIconWrapper = styled('span', { - position: 'relative', - zIndex: '$2', - display: 'flex', - alignItems: 'center', - m: '$15', - - '& > span': { - ...getFontStyles('$XXS'), - fontWeight: '$bold', - ml: '$15', - }, -}) diff --git a/docs/app/components/Callout.css.ts b/docs/app/components/Callout.css.ts new file mode 100644 index 0000000000..1f9f902e6c --- /dev/null +++ b/docs/app/components/Callout.css.ts @@ -0,0 +1,59 @@ +import { globalStyle } from '@vanilla-extract/css' +import { vars } from '../styles/theme-contract.css' +import { recipe } from '@vanilla-extract/recipes' + +export const calloutWrapper = recipe({ + base: { + borderRadius: vars.radii.r8, + padding: vars.space['30'], + margin: `${vars.space['20']} 0`, + }, + + variants: { + type: { + warning: { + backgroundColor: '#FF701933', + }, + danger: { + backgroundColor: 'red', + }, + success: { + backgroundColor: 'green', + }, + note: { + background: '#569AFF33', + }, + }, + }, +}) + +globalStyle(`${calloutWrapper} + pre`, { + marginTop: vars.space['40'], +}) + +export const label = recipe({ + base: { + fontWeight: vars.fontWeights.semiblack, + marginBottom: vars.space['15'], + display: 'flex', + gap: vars.space['5'], + alignItems: 'center', + }, + + variants: { + type: { + warning: { + color: '#FF7019CC', + }, + danger: { + color: '#FF7019CC', + }, + success: { + color: '#FF7019CC', + }, + note: { + color: '#569AFF', + }, + }, + }, +}) diff --git a/docs/app/components/Callout.tsx b/docs/app/components/Callout.tsx index 3d04699614..6a5416c3be 100644 --- a/docs/app/components/Callout.tsx +++ b/docs/app/components/Callout.tsx @@ -1,9 +1,9 @@ +import clsx from 'clsx' import { CheckCircle, Fire, Note, Warning } from 'phosphor-react' import { ReactNode } from 'react' import { capitalize } from '~/helpers/strings' -import { getFontStyles } from '~/styles/fontStyles' - -import { styled } from '~/styles/stitches.config' +import { S } from '../styles/fontStyles.css' +import { calloutWrapper, label } from './Callout.css' interface CalloutProps { children?: ReactNode @@ -21,66 +21,16 @@ export const Callout = ({ children, variant = 'warning' }: CalloutProps) => { const Icon = icons[variant] return ( - -