diff --git a/functions/_middleware.ts b/functions/_middleware.ts index 7672f8665..5bc0fc30d 100644 --- a/functions/_middleware.ts +++ b/functions/_middleware.ts @@ -1,4 +1,5 @@ /* eslint max-classes-per-file: "off" */ +import { cspOnlyFrameAncestors, cspWithFrameAncestors } from '@app/utils/createCsp' class ContentModifier { private newContent: string @@ -57,20 +58,14 @@ const firefoxRewrite: PagesFunction = async ({ request, next }) => { // firefox CSP exception + metamask script if (userAgent?.includes('gecko/20100101') && userAgent.includes('firefox/')) { - response.headers.set( - 'Content-Security-Policy', - "frame-ancestors 'self' https://app.safe.global;", - ) + response.headers.set('Content-Security-Policy', cspOnlyFrameAncestors) return new HTMLRewriter() .on('head', new ScriptWriter('/_next/static/chunks/initialise-metamask.js')) .transform(response) } // default headers - response.headers.set( - 'Content-Security-Policy', - "worker-src 'self'; script-src 'self' 'sha256-UyYcl+sKCF/ROFZPHBlozJrndwfNiC5KT5ZZfup/pPc=' plausible.io static.cloudflareinsights.com *.ens-app-v3.pages.dev https://app.intercom.io https://widget.intercom.io https://js.intercomcdn.com 'wasm-unsafe-eval'; frame-ancestors 'self' https://app.safe.global;", - ) + response.headers.set('Content-Security-Policy', cspWithFrameAncestors) return response } diff --git a/functions/tsconfig.json b/functions/tsconfig.json index 1680095d9..17ac1f51a 100644 --- a/functions/tsconfig.json +++ b/functions/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["../src/utils/gradient.ts", "./**/*"], + "include": ["../src/utils/createCsp.ts", "./**/*"], "compilerOptions": { "noEmit": true, "target": "ESNext", diff --git a/package.json b/package.json index 924500452..feb91e4b6 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@ensdomains/content-hash": "^3.0.0-beta.5", "@ensdomains/ens-contracts": "1.2.0-beta.0", "@ensdomains/ensjs": "4.0.2", - "@ensdomains/thorin": "0.6.50", + "@ensdomains/thorin": "1.0.0-beta.16", "@metamask/post-message-stream": "^6.1.2", "@metamask/providers": "^14.0.2", "@noble/hashes": "^1.3.2", @@ -123,7 +123,7 @@ "@types/node": "^18.7.13", "@types/pako": "^2.0.0", "@types/prettier": "^2.7.0", - "@types/react": "18.2.21", + "@types/react": "18.3.12", "@types/react-dom": "^18.2.7", "@types/styled-components": "5.1.23", "@types/ws": "^8.5.10", diff --git a/playwright.config.ts b/playwright.config.ts index 059e39758..35965d6a9 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig, devices } from '@playwright/test' export default defineConfig({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5bc20d3f..5874df4f2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,8 +128,8 @@ importers: specifier: 4.0.2 version: 4.0.2(encoding@0.1.13)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@ensdomains/thorin': - specifier: 0.6.50 - version: 0.6.50(react-dom@18.3.1(react@18.3.1))(react-transition-state@1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(styled-components@5.3.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)) + specifier: 1.0.0-beta.16 + version: 1.0.0-beta.16(@vanilla-extract/css@1.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@metamask/post-message-stream': specifier: ^6.1.2 version: 6.2.0 @@ -141,7 +141,7 @@ importers: version: 1.4.0 '@rainbow-me/rainbowkit': specifier: 2.1.2 - version: 2.1.2(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)) + version: 2.1.2(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)) '@sentry/nextjs': specifier: 7.43.x version: 7.43.0(encoding@0.1.13)(next@13.5.6(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.91.0(esbuild@0.17.19)) @@ -168,7 +168,7 @@ importers: version: 5.22.2(@tanstack/react-query@5.22.2(react@18.3.1))(react@18.3.1) '@wagmi/core': specifier: 2.13.3 - version: 2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) calendar-link: specifier: ^2.2.0 version: 2.6.0 @@ -225,7 +225,7 @@ importers: version: 7.51.0(react@18.3.1) react-i18next: specifier: ^11.18.5 - version: 11.18.6(i18next@21.10.0)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 11.18.6(i18next@21.10.0)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react-transition-state: specifier: ^1.1.5 version: 1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -255,7 +255,7 @@ importers: version: 2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) wagmi: specifier: 2.12.4 - version: 2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) devDependencies: '@cloudflare/workers-types': specifier: ^3.14.1 @@ -295,7 +295,7 @@ importers: version: 14.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@testing-library/react-hooks': specifier: ^8.0.1 - version: 8.0.1(@types/react@18.2.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 8.0.1(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@testing-library/user-event': specifier: ^14.5.2 version: 14.5.2(@testing-library/dom@9.3.4) @@ -312,8 +312,8 @@ importers: specifier: ^2.7.0 version: 2.7.3 '@types/react': - specifier: 18.2.21 - version: 18.2.21 + specifier: 18.3.12 + version: 18.3.12 '@types/react-dom': specifier: ^18.2.7 version: 18.3.0 @@ -1648,13 +1648,12 @@ packages: '@ensdomains/solsha1@0.0.3': resolution: {integrity: sha512-uhuG5LzRt/UJC0Ux83cE2rCKwSleRePoYdQVcqPN1wyf3/ekMzT/KZUF9+v7/AG5w9jlMLCQkUM50vfjr0Yu9Q==} - '@ensdomains/thorin@0.6.50': - resolution: {integrity: sha512-UA1Blyz1h/Yy9e2h8ykNwyIfFMa85+fM5viS1Jra7Ms/EbgLhiP/BEMNr1/oZvwLHE54UM/rZGij1GaxurrOoQ==} + '@ensdomains/thorin@1.0.0-beta.16': + resolution: {integrity: sha512-4iUyTL/UdwkRxXOW9y/bkcDmJUZkY3uYE03kdeQTCIRdJBlOvluZOS+pQpmQhgAoEhNqd/kYMmO+sz/g71PjyQ==} + engines: {node: '>=20'} peerDependencies: react: ^18.2.0 react-dom: ^18.2.0 - react-transition-state: ^1.1.4 - styled-components: ^5.3.3 '@esbuild-plugins/node-globals-polyfill@0.2.3': resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==} @@ -3655,8 +3654,8 @@ packages: '@types/react-dom@18.3.0': resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} - '@types/react@18.2.21': - resolution: {integrity: sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==} + '@types/react@18.3.12': + resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} '@types/responselike@1.0.3': resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} @@ -3664,9 +3663,6 @@ packages: '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} - '@types/scheduler@0.23.0': - resolution: {integrity: sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==} - '@types/secp256k1@4.0.6': resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} @@ -3823,6 +3819,11 @@ packages: peerDependencies: '@vanilla-extract/css': ^1.0.0 + '@vanilla-extract/sprinkles@1.6.3': + resolution: {integrity: sha512-oCHlQeYOBIJIA2yWy2GnY5wE2A7hGHDyJplJo4lb+KEIBcJWRnDJDg8ywDwQS5VfWJrBBO3drzYZPFpWQjAMiQ==} + peerDependencies: + '@vanilla-extract/css': ^1.0.0 + '@vitejs/plugin-react@4.3.1': resolution: {integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -4695,6 +4696,10 @@ packages: resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==} engines: {node: '>=6'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + code-point-at@1.1.0: resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} engines: {node: '>=0.10.0'} @@ -5805,9 +5810,6 @@ packages: fmix@0.1.0: resolution: {integrity: sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w==} - focus-visible@5.2.1: - resolution: {integrity: sha512-8Bx950VD1bWTQJEH/AM6SpEk+SU55aVnp4Ujhuuxy3eMEBCRwBnTBnVXr9YAPvZL3/CNjCa8u4IWfNmEO53whA==} - follow-redirects@1.15.6: resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} engines: {node: '>=4.0'} @@ -8119,6 +8121,12 @@ packages: react: ^18.2.0 react-dom: ^18.2.0 + react-transition-state@2.2.0: + resolution: {integrity: sha512-D3EyLku1Sdxrxq26Fo4Jh0q1BLEFQfDOxKKiSuyqWH84+hM6y0Guc0hcW2IXMXY5l5gQCgkOQ9y90xx6mNoj5w==} + peerDependencies: + react: ^18.2.0 + react-dom: ^18.2.0 + react-universal-interface@0.6.2: resolution: {integrity: sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==} peerDependencies: @@ -11592,16 +11600,16 @@ snapshots: dependencies: hash-test-vectors: 1.3.2 - '@ensdomains/thorin@0.6.50(react-dom@18.3.1(react@18.3.1))(react-transition-state@1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(styled-components@5.3.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1))': + '@ensdomains/thorin@1.0.0-beta.16(@vanilla-extract/css@1.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - clsx: 1.2.1 - focus-visible: 5.2.1 - lodash: 4.17.21 + '@vanilla-extract/sprinkles': 1.6.3(@vanilla-extract/css@1.14.0) + clsx: 2.1.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-transition-state: 1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - styled-components: 5.3.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1) - ts-pattern: 4.3.0 + react-transition-state: 2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + ts-pattern: 5.5.0 + transitivePeerDependencies: + - '@vanilla-extract/css' '@esbuild-plugins/node-globals-polyfill@0.2.3(esbuild@0.17.19)': dependencies: @@ -12343,21 +12351,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.26.5(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@metamask/sdk-install-modal-web@0.26.5(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: i18next: 23.11.5 qr-code-styling: 1.6.0-rc.1 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) - '@metamask/sdk@0.27.0(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.27.0(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(utf-8-validate@5.0.10)': dependencies: '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 '@metamask/sdk-communication-layer': 0.27.0(cross-fetch@4.0.0(encoding@0.1.13))(eciesjs@0.3.18)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.26.5(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@metamask/sdk-install-modal-web': 0.26.5(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@types/dom-screen-wake-lock': 1.0.3 bowser: 2.11.0 cross-fetch: 4.0.0(encoding@0.1.13) @@ -12370,7 +12378,7 @@ snapshots: obj-multiplex: 1.0.0 pump: 3.0.0 qrcode-terminal-nooctal: 0.12.1 - react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) readable-stream: 3.6.2 rollup-plugin-visualizer: 5.12.0(rollup@2.78.0) socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -12756,7 +12764,7 @@ snapshots: '@polka/url@1.0.0-next.25': {} - '@rainbow-me/rainbowkit@2.1.2(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))': + '@rainbow-me/rainbowkit@2.1.2(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))': dependencies: '@tanstack/react-query': 5.22.2(react@18.3.1) '@vanilla-extract/css': 1.14.0 @@ -12766,10 +12774,10 @@ snapshots: qrcode: 1.5.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-remove-scroll: 2.5.7(@types/react@18.2.21)(react@18.3.1) + react-remove-scroll: 2.5.7(@types/react@18.3.12)(react@18.3.1) ua-parser-js: 1.0.37 viem: 2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - wagmi: 2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + wagmi: 2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) transitivePeerDependencies: - '@types/react' @@ -13052,14 +13060,14 @@ snapshots: '@react-native/normalize-colors@0.74.83': {} - '@react-native/virtualized-lists@0.74.83(@types/react@18.2.21)(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@react-native/virtualized-lists@0.74.83(@types/react@18.3.12)(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: invariant: 2.2.4 nullthrows: 1.1.1 react: 18.3.1 - react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 '@rnx-kit/chromium-edge-launcher@1.0.0': dependencies: @@ -13741,13 +13749,13 @@ snapshots: '@types/jest': 29.5.12 vitest: 2.0.5(@types/node@18.19.33)(jsdom@24.1.0(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.31.5) - '@testing-library/react-hooks@8.0.1(@types/react@18.2.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@testing-library/react-hooks@8.0.1(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.6 react: 18.3.1 react-error-boundary: 3.1.4(react@18.3.1) optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 react-dom: 18.3.1(react@18.3.1) '@testing-library/react@14.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -13924,7 +13932,7 @@ snapshots: '@types/hoist-non-react-statics@3.3.5': dependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 hoist-non-react-statics: 3.3.2 '@types/http-cache-semantics@4.0.4': {} @@ -13999,12 +14007,11 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 - '@types/react@18.2.21': + '@types/react@18.3.12': dependencies: '@types/prop-types': 15.7.12 - '@types/scheduler': 0.23.0 csstype: 3.1.3 '@types/responselike@1.0.3': @@ -14015,8 +14022,6 @@ snapshots: dependencies: '@types/node': 18.19.33 - '@types/scheduler@0.23.0': {} - '@types/secp256k1@4.0.6': dependencies: '@types/node': 18.19.44 @@ -14032,7 +14037,7 @@ snapshots: '@types/styled-components@5.1.23': dependencies: '@types/hoist-non-react-statics': 3.3.5 - '@types/react': 18.2.21 + '@types/react': 18.3.12 csstype: 3.1.3 '@types/trusted-types@2.0.7': {} @@ -14240,6 +14245,10 @@ snapshots: dependencies: '@vanilla-extract/css': 1.14.0 + '@vanilla-extract/sprinkles@1.6.3(@vanilla-extract/css@1.14.0)': + dependencies: + '@vanilla-extract/css': 1.14.0 + '@vitejs/plugin-react@4.3.1(vite@5.2.11(@types/node@18.19.33)(terser@5.31.5))': dependencies: '@babel/core': 7.24.6 @@ -14302,15 +14311,15 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@wagmi/connectors@5.1.4(@types/react@18.2.21)(@wagmi/core@2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': + '@wagmi/connectors@5.1.4(@types/react@18.3.12)(@wagmi/core@2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': dependencies: '@coinbase/wallet-sdk': 4.0.4 - '@metamask/sdk': 0.27.0(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.27.0(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - '@wagmi/core': 2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.11.1(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) - '@walletconnect/modal': 2.6.2(@types/react@18.2.21)(react@18.3.1) + '@wagmi/core': 2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@walletconnect/ethereum-provider': 2.11.1(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) + '@walletconnect/modal': 2.6.2(@types/react@18.3.12)(react@18.3.1) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' viem: 2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: @@ -14341,12 +14350,12 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))': + '@wagmi/core@2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.4.5) viem: 2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - zustand: 4.4.1(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1) + zustand: 4.4.1(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1) optionalDependencies: '@tanstack/query-core': 5.22.2 typescript: 5.4.5 @@ -14397,13 +14406,13 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.11.1(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.11.1(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/modal': 2.6.2(@types/react@18.2.21)(react@18.3.1) + '@walletconnect/modal': 2.6.2(@types/react@18.3.12)(react@18.3.1) '@walletconnect/sign-client': 2.11.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@walletconnect/types': 2.11.1 '@walletconnect/universal-provider': 2.11.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -14513,16 +14522,16 @@ snapshots: '@walletconnect/safe-json': 1.0.2 pino: 7.11.0 - '@walletconnect/modal-core@2.6.2(@types/react@18.2.21)(react@18.3.1)': + '@walletconnect/modal-core@2.6.2(@types/react@18.3.12)(react@18.3.1)': dependencies: - valtio: 1.11.2(@types/react@18.2.21)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.6.2(@types/react@18.2.21)(react@18.3.1)': + '@walletconnect/modal-ui@2.6.2(@types/react@18.3.12)(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.6.2(@types/react@18.2.21)(react@18.3.1) + '@walletconnect/modal-core': 2.6.2(@types/react@18.3.12)(react@18.3.1) lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -14530,10 +14539,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.6.2(@types/react@18.2.21)(react@18.3.1)': + '@walletconnect/modal@2.6.2(@types/react@18.3.12)(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.6.2(@types/react@18.2.21)(react@18.3.1) - '@walletconnect/modal-ui': 2.6.2(@types/react@18.2.21)(react@18.3.1) + '@walletconnect/modal-core': 2.6.2(@types/react@18.3.12)(react@18.3.1) + '@walletconnect/modal-ui': 2.6.2(@types/react@18.3.12)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -15499,6 +15508,8 @@ snapshots: clsx@2.1.0: {} + clsx@2.1.1: {} + code-point-at@1.1.0: {} color-convert@1.9.3: @@ -16893,8 +16904,6 @@ snapshots: dependencies: imul: 1.0.1 - focus-visible@5.2.1: {} - follow-redirects@1.15.6(debug@4.3.4): optionalDependencies: debug: 4.3.4(supports-color@8.1.1) @@ -19446,7 +19455,7 @@ snapshots: dependencies: react: 18.3.1 - react-i18next@11.18.6(i18next@21.10.0)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-i18next@11.18.6(i18next@21.10.0)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: '@babel/runtime': 7.24.6 html-parse-stringify: 3.0.1 @@ -19454,7 +19463,7 @@ snapshots: react: 18.3.1 optionalDependencies: react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) react-is@16.13.1: {} @@ -19462,14 +19471,14 @@ snapshots: react-is@18.3.1: {} - react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: escape-string-regexp: 2.0.0 invariant: 2.2.4 react: 18.3.1 - react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) - react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10): + react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10): dependencies: '@jest/create-cache-key-function': 29.7.0 '@react-native-community/cli': 13.6.6(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -19481,7 +19490,7 @@ snapshots: '@react-native/gradle-plugin': 0.74.83 '@react-native/js-polyfills': 0.74.83 '@react-native/normalize-colors': 0.74.83 - '@react-native/virtualized-lists': 0.74.83(@types/react@18.2.21)(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@react-native/virtualized-lists': 0.74.83(@types/react@18.3.12)(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) abort-controller: 3.0.0 anser: 1.4.10 ansi-regex: 5.0.1 @@ -19510,7 +19519,7 @@ snapshots: ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) yargs: 17.7.2 optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 transitivePeerDependencies: - '@babel/core' - '@babel/preset-env' @@ -19521,24 +19530,24 @@ snapshots: react-refresh@0.14.2: {} - react-remove-scroll-bar@2.3.6(@types/react@18.2.21)(react@18.3.1): + react-remove-scroll-bar@2.3.6(@types/react@18.3.12)(react@18.3.1): dependencies: react: 18.3.1 - react-style-singleton: 2.2.1(@types/react@18.2.21)(react@18.3.1) + react-style-singleton: 2.2.1(@types/react@18.3.12)(react@18.3.1) tslib: 2.6.2 optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 - react-remove-scroll@2.5.7(@types/react@18.2.21)(react@18.3.1): + react-remove-scroll@2.5.7(@types/react@18.3.12)(react@18.3.1): dependencies: react: 18.3.1 - react-remove-scroll-bar: 2.3.6(@types/react@18.2.21)(react@18.3.1) - react-style-singleton: 2.2.1(@types/react@18.2.21)(react@18.3.1) + react-remove-scroll-bar: 2.3.6(@types/react@18.3.12)(react@18.3.1) + react-style-singleton: 2.2.1(@types/react@18.3.12)(react@18.3.1) tslib: 2.6.2 - use-callback-ref: 1.3.2(@types/react@18.2.21)(react@18.3.1) - use-sidecar: 1.1.2(@types/react@18.2.21)(react@18.3.1) + use-callback-ref: 1.3.2(@types/react@18.3.12)(react@18.3.1) + use-sidecar: 1.1.2(@types/react@18.3.12)(react@18.3.1) optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 react-shallow-renderer@16.15.0(react@18.3.1): dependencies: @@ -19546,20 +19555,25 @@ snapshots: react: 18.3.1 react-is: 18.3.1 - react-style-singleton@2.2.1(@types/react@18.2.21)(react@18.3.1): + react-style-singleton@2.2.1(@types/react@18.3.12)(react@18.3.1): dependencies: get-nonce: 1.0.1 invariant: 2.2.4 react: 18.3.1 tslib: 2.6.2 optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 react-transition-state@1.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) + react-transition-state@2.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-universal-interface@0.6.2(react@18.3.1)(tslib@2.6.2): dependencies: react: 18.3.1 @@ -20882,25 +20896,25 @@ snapshots: url-set-query@1.0.0: {} - use-callback-ref@1.3.2(@types/react@18.2.21)(react@18.3.1): + use-callback-ref@1.3.2(@types/react@18.3.12)(react@18.3.1): dependencies: react: 18.3.1 tslib: 2.6.2 optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 use-immer@0.7.0(immer@9.0.21)(react@18.3.1): dependencies: immer: 9.0.21 react: 18.3.1 - use-sidecar@1.1.2(@types/react@18.2.21)(react@18.3.1): + use-sidecar@1.1.2(@types/react@18.3.12)(react@18.3.1): dependencies: detect-node-es: 1.1.0 react: 18.3.1 tslib: 2.6.2 optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 use-sync-external-store@1.2.0(react@18.3.1): dependencies: @@ -20941,12 +20955,12 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - valtio@1.11.2(@types/react@18.2.21)(react@18.3.1): + valtio@1.11.2(@types/react@18.3.12)(react@18.3.1): dependencies: proxy-compare: 2.5.1 use-sync-external-store: 1.2.0(react@18.3.1) optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 react: 18.3.1 varint@5.0.2: {} @@ -21101,11 +21115,11 @@ snapshots: dependencies: xml-name-validator: 5.0.0 - wagmi@2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): + wagmi@2.12.4(@tanstack/query-core@5.22.2)(@tanstack/react-query@5.22.2(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): dependencies: '@tanstack/react-query': 5.22.2(react@18.3.1) - '@wagmi/connectors': 5.1.4(@types/react@18.2.21)(@wagmi/core@2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.2.21)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@wagmi/core': 2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@wagmi/connectors': 5.1.4(@types/react@18.3.12)(@wagmi/core@2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.24.6(@babel/core@7.24.6))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@2.78.0)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + '@wagmi/core': 2.13.3(@tanstack/query-core@5.22.2)(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1)(typescript@5.4.5)(viem@2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) react: 18.3.1 use-sync-external-store: 1.2.0(react@18.3.1) viem: 2.19.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -21995,10 +22009,10 @@ snapshots: zod@3.23.8: {} - zustand@4.4.1(@types/react@18.2.21)(immer@9.0.21)(react@18.3.1): + zustand@4.4.1(@types/react@18.3.12)(immer@9.0.21)(react@18.3.1): dependencies: use-sync-external-store: 1.2.0(react@18.3.1) optionalDependencies: - '@types/react': 18.2.21 + '@types/react': 18.3.12 immer: 9.0.21 react: 18.3.1 diff --git a/src/assets/CircleTick.svg b/src/assets/CircleTick.svg index 0f7a7e6cb..992ee47b8 100644 --- a/src/assets/CircleTick.svg +++ b/src/assets/CircleTick.svg @@ -1,5 +1,5 @@ - - + \ No newline at end of file diff --git a/src/components/@atoms/Calendar/Calendar.test.tsx b/src/components/@atoms/Calendar/Calendar.test.tsx index 96fe2ef0c..d37bee72e 100644 --- a/src/components/@atoms/Calendar/Calendar.test.tsx +++ b/src/components/@atoms/Calendar/Calendar.test.tsx @@ -3,11 +3,11 @@ import { fireEvent, mockFunction, render, screen } from '@app/test-utils' import { InputHTMLAttributes, useState } from 'react' import { describe, expect, it, vi } from 'vitest' +import { useBreakpoint } from '@app/utils/BreakpointProvider' import { secondsToDate, secondsToDateInput } from '@app/utils/date' import { formatExpiry } from '@app/utils/utils' import { Calendar } from './Calendar' -import { useBreakpoint } from '@app/utils/BreakpointProvider' vi.mock('@app/utils/BreakpointProvider') @@ -44,27 +44,26 @@ describe('Calendar', () => { it('should handle timezone offset correctly', async () => { const OnChange = vi.fn() // Render the Calendar component - const currentDate = new Date(); - const currentDateSeconds = Math.floor(currentDate.getTime() / 1000); - render(); + const currentDate = new Date() + const currentDateSeconds = Math.floor(currentDate.getTime() / 1000) + render() // Find the input element - const calendarInput = screen.getByTestId('calendar'); + const calendarInput = screen.getByTestId('calendar') // Prepare new date and format it - currentDate.setDate(currentDate.getDate() + 2); // Change to the next day - const newDateSeconds = Math.floor(currentDate.getTime() / 1000); - const newFormattedDate = secondsToDateInput(newDateSeconds); + currentDate.setDate(currentDate.getDate() + 2) // Change to the next day + const newDateSeconds = Math.floor(currentDate.getTime() / 1000) + const newFormattedDate = secondsToDateInput(newDateSeconds) - fireEvent.change(calendarInput, { target: { value: newFormattedDate }}) + fireEvent.change(calendarInput, { target: { value: newFormattedDate } }) // Assert the onChange handler was called - expect(OnChange).toHaveBeenCalledTimes(1); + expect(OnChange).toHaveBeenCalledTimes(1) - const receivedDate = OnChange.mock.calls[0][0].currentTarget.valueAsDate; + const receivedDate = OnChange.mock.calls[0][0].currentTarget.valueAsDate const receivedFormattedDate = receivedDate.toISOString().split('T')[0] - - expect(receivedFormattedDate).toEqual(newFormattedDate); - }); + expect(receivedFormattedDate).toEqual(newFormattedDate) + }) }) diff --git a/src/components/@atoms/CheckButton/CheckButton.tsx b/src/components/@atoms/CheckButton/CheckButton.tsx index d04a81ec7..450a8e55b 100644 --- a/src/components/@atoms/CheckButton/CheckButton.tsx +++ b/src/components/@atoms/CheckButton/CheckButton.tsx @@ -1,27 +1,26 @@ import styled, { css } from 'styled-components' -import CircleTick from '@app/assets/CircleTick.svg' - const Container = styled.button<{ $active: boolean }>( ({ theme, $active }) => css` cursor: pointer; flex: 0 0 ${theme.space['9']}; width: ${theme.space['9']}; height: ${theme.space['9']}; + color: ${$active ? theme.colors.accent : theme.colors.grey}; svg { path, rect { transition: all 0.15s ease-in-out; - stroke: ${$active ? theme.colors.accent : theme.colors.textTertiary}; + stroke-width: 1px; } } &:hover { + color: ${theme.colors.accent}; svg { path, rect { - stroke: ${theme.colors.accent}; stroke-width: 1.5px; } } @@ -42,7 +41,26 @@ export const CheckButton = ({ active = false, onChange }: Props) => { onClick={() => onChange?.(!active)} data-testid="check-button" > - + + + + ) } diff --git a/src/components/@atoms/ExpiryComponents/ExpiryComponents.tsx b/src/components/@atoms/ExpiryComponents/ExpiryComponents.tsx index 4fff61e51..416edfc40 100644 --- a/src/components/@atoms/ExpiryComponents/ExpiryComponents.tsx +++ b/src/components/@atoms/ExpiryComponents/ExpiryComponents.tsx @@ -140,7 +140,7 @@ export const ReadableExpiry = ({ expiry }: { expiry: Date }) => { day: 'numeric', })}, ${expiry.getFullYear()}`} - + {`at ${expiry.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', diff --git a/src/components/@atoms/GasDisplay.tsx b/src/components/@atoms/GasDisplay.tsx index 59ea5b317..29dc54379 100644 --- a/src/components/@atoms/GasDisplay.tsx +++ b/src/components/@atoms/GasDisplay.tsx @@ -14,7 +14,7 @@ const Container = styled.div( gap: ${theme.space['1']}; font-size: ${theme.fontSizes.small}; - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; font-weight: bold; padding: 0 ${theme.space['4']}; diff --git a/src/components/@atoms/InnerDialog.tsx b/src/components/@atoms/InnerDialog.tsx index 1a6d5ef1e..518e38ae1 100644 --- a/src/components/@atoms/InnerDialog.tsx +++ b/src/components/@atoms/InnerDialog.tsx @@ -1,7 +1,5 @@ import styled, { css } from 'styled-components' -import { mq } from '@ensdomains/thorin' - export const InnerDialog = styled.div( ({ theme }) => css` display: flex; @@ -12,9 +10,9 @@ export const InnerDialog = styled.div( gap: ${theme.space['4']}; max-height: 60vh; max-width: 100vw; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { width: calc(80vw - 2 * ${theme.space['6']}); max-width: ${theme.space['128']}; - `)} + } `, ) diff --git a/src/components/@atoms/Invoice/Invoice.tsx b/src/components/@atoms/Invoice/Invoice.tsx index 54286f564..ed954d386 100644 --- a/src/components/@atoms/Invoice/Invoice.tsx +++ b/src/components/@atoms/Invoice/Invoice.tsx @@ -23,7 +23,7 @@ const LineItem = styled.div<{ $color?: Colors }>( display: flex; justify-content: space-between; line-height: ${theme.space['5']}; - color: ${$color ? theme.colors[$color] : theme.colors.textTertiary}; + color: ${$color ? theme.colors[$color] : theme.colors.grey}; `, ) diff --git a/src/components/@atoms/MobileFullWidth.tsx b/src/components/@atoms/MobileFullWidth.tsx index b8711fe62..3e88ae063 100644 --- a/src/components/@atoms/MobileFullWidth.tsx +++ b/src/components/@atoms/MobileFullWidth.tsx @@ -1,18 +1,16 @@ import styled, { css } from 'styled-components' -import { mq } from '@ensdomains/thorin' - const MobileFullWidth = styled.div( ({ theme }) => css` & > div, & { width: ${theme.space.full}; max-width: ${theme.space.full}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { min-width: ${theme.space['40']}; width: fit-content; max-width: max-content; - `)} + } } `, ) diff --git a/src/components/@atoms/NameDetailItem/NameDetailItem.tsx b/src/components/@atoms/NameDetailItem/NameDetailItem.tsx index 52c1b2776..8e525589a 100644 --- a/src/components/@atoms/NameDetailItem/NameDetailItem.tsx +++ b/src/components/@atoms/NameDetailItem/NameDetailItem.tsx @@ -2,7 +2,7 @@ import { ReactNode } from 'react' import styled, { css } from 'styled-components' import { useEnsAvatar } from 'wagmi' -import { Avatar, mq } from '@ensdomains/thorin' +import { Avatar } from '@ensdomains/thorin' import CircleTick from '@app/assets/CircleTick.svg' import { useZorb } from '@app/hooks/useZorb' @@ -39,10 +39,10 @@ const NameItemWrapper = styled.div<{ $highlight: boolean; $disabled: boolean }>( &:last-of-type { border: none; } - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['3']} ${theme.space['4.5']}; gap: ${theme.space['4']}; - `)} + } `, ) diff --git a/src/components/@atoms/NameDetailItem/TaggedNameItem.tsx b/src/components/@atoms/NameDetailItem/TaggedNameItem.tsx index a4ed26f78..5299360e0 100644 --- a/src/components/@atoms/NameDetailItem/TaggedNameItem.tsx +++ b/src/components/@atoms/NameDetailItem/TaggedNameItem.tsx @@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { NameWithRelation } from '@ensdomains/ensjs/subgraph' -import { mq, Tag } from '@ensdomains/thorin' +import { Tag } from '@ensdomains/thorin' import { validateExpiry } from '@app/utils/utils' @@ -16,11 +16,11 @@ const OtherItemsContainer = styled.div( justify-content: center; gap: ${theme.space['2']}; flex-gap: ${theme.space['2']}; - ${mq.md.min(css` + @media (min-width: 768px) { flex-direction: row; gap: ${theme.space['4']}; flex-gap: ${theme.space['4']}; - `)} + } `, ) diff --git a/src/components/@atoms/PseudoActionButton/PseudoActionButton.test.tsx b/src/components/@atoms/PseudoActionButton/PseudoActionButton.test.tsx index ba3a0aad8..0525474fd 100644 --- a/src/components/@atoms/PseudoActionButton/PseudoActionButton.test.tsx +++ b/src/components/@atoms/PseudoActionButton/PseudoActionButton.test.tsx @@ -14,7 +14,7 @@ afterAll(() => { describe('PseudoActionButton', () => { it('should show loading state when clicked and reset after timeout has been run', async () => { - const testIcon =
+ const testIcon = () =>
render( Test @@ -35,7 +35,7 @@ describe('PseudoActionButton', () => { }) it('should maintain loading state if loading is set to true', async () => { - const testIcon =
+ const testIcon = () =>
render( Test diff --git a/src/components/@atoms/RegistrationTimeComparisonBanner/RegistrationTimeComparisonBanner.tsx b/src/components/@atoms/RegistrationTimeComparisonBanner/RegistrationTimeComparisonBanner.tsx index 5e34e36d0..d6699d4b3 100644 --- a/src/components/@atoms/RegistrationTimeComparisonBanner/RegistrationTimeComparisonBanner.tsx +++ b/src/components/@atoms/RegistrationTimeComparisonBanner/RegistrationTimeComparisonBanner.tsx @@ -1,7 +1,7 @@ import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' -import { Helper, mq } from '@ensdomains/thorin' +import { Helper } from '@ensdomains/thorin' const InnerContainer = styled.div( ({ theme }) => css` @@ -75,10 +75,10 @@ const Marker = styled.div<{ $percent: number }>( white-space: nowrap; } - ${mq.xs.min(css` + @media (min-width: 360px) { width: ${theme.space['18']}; font-size: ${theme.fontSizes.small}; - `)} + } &::before { content: ''; @@ -133,7 +133,7 @@ export const RegistrationTimeComparisonBanner = ({ message, yearlyFee, transacti const twentyRounded = calcPercent(twenty.gas, 3) return ( - +
{message}
diff --git a/src/components/@atoms/StyledName/StyledName.tsx b/src/components/@atoms/StyledName/StyledName.tsx index ad3642747..7cc8a1b22 100644 --- a/src/components/@atoms/StyledName/StyledName.tsx +++ b/src/components/@atoms/StyledName/StyledName.tsx @@ -14,7 +14,7 @@ const Container = styled.div( const Name = styled.span<{ $disabled?: boolean }>( ({ theme, $disabled }) => css` - color: ${$disabled ? theme.colors.textTertiary : theme.colors.text}; + color: ${$disabled ? theme.colors.grey : theme.colors.text}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -24,13 +24,13 @@ const Name = styled.span<{ $disabled?: boolean }>( const Dot = styled.span( ({ theme }) => css` - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; `, ) const Tld = styled.span( ({ theme }) => css` - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; white-space: nowrap; `, ) diff --git a/src/components/@molecules/AddRecordButton/AddRecordButton.tsx b/src/components/@molecules/AddRecordButton/AddRecordButton.tsx index 2ed6e8e60..eae2384a2 100644 --- a/src/components/@molecules/AddRecordButton/AddRecordButton.tsx +++ b/src/components/@molecules/AddRecordButton/AddRecordButton.tsx @@ -239,7 +239,7 @@ const NoOptionsContainer = styled.div<{ $inline: boolean }>( padding: 0 ${theme.space['3']} ${theme.space['0.75']} ${theme.space['3']}; display: flex; align-items: center; - color: ${theme.colors.textTertiary}; + color: ${theme.colors.text}; font-style: italic; margin-bottom: ${theme.space['0.75']}; `, @@ -280,6 +280,12 @@ type Props = { onAddRecord?: (value: string) => void } +const WrappedPlusSVG = () => ( + + + +) + export const AddRecordButton = ({ autocomplete, createable, @@ -429,11 +435,7 @@ export const AddRecordButton = ({
+ + Theme + { + const newValue = e.target.checked ? 'light' : 'dark' + if (newValue !== mode) { + setMode(newValue) + } + }} + /> + {disconnectedRoutes.map((route) => ( diff --git a/src/components/@molecules/LegacyDropdown/LegacyDropdown.tsx b/src/components/@molecules/LegacyDropdown/LegacyDropdown.tsx index 8850bc7db..a7ebb50b3 100644 --- a/src/components/@molecules/LegacyDropdown/LegacyDropdown.tsx +++ b/src/components/@molecules/LegacyDropdown/LegacyDropdown.tsx @@ -11,7 +11,7 @@ import { } from 'react' import styled, { css } from 'styled-components' -import { Button, Colors, DownChevronSVG } from '@ensdomains/thorin' +import { AsProp, Button, Colors, DownChevronSVG } from '@ensdomains/thorin' import { getTestId } from '@app/utils/utils' @@ -34,7 +34,7 @@ type DropdownItemObject = { onClick?: (value?: string) => void wrapper?: (children: React.ReactNode, key: React.Key) => JSX.Element as?: 'button' | 'a' - icon?: React.ReactNode + icon?: AsProp value?: string color?: Colors disabled?: boolean @@ -186,7 +186,7 @@ const MenuButton = styled.button( } ${disabled && css` - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; cursor: not-allowed; `} @@ -374,7 +374,7 @@ const InnerMenuButton = styled.button( border-${$direction === 'down' ? 'bottom' : 'top'}-left-radius: none; border-${$direction === 'down' ? 'bottom' : 'top'}-right-radius: none; border-${$direction === 'down' ? 'bottom' : 'top'}-width: 0; - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; transition: 0.35s all cubic-bezier(1, 0, 0.22, 1.6), 0.3s color ease-in-out, 0.2s border-radius ease-in-out, 0s border-width 0.1s, 0s padding linear; @@ -464,6 +464,10 @@ const ButtonWrapper = styled.div( `, ) +const ChevronSuffix = + ({ direction, isOpen }: { direction: Direction; isOpen?: boolean }) => + () => + export const LegacyDropdown = ({ children, buttonProps, @@ -527,7 +531,7 @@ export const LegacyDropdown = ({ diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.test.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.test.tsx index 8311a3387..320b569d8 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.test.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.test.tsx @@ -72,7 +72,7 @@ describe('AddProfileRecordView', () => { render() await userEvent.click(screen.getByTestId('profile-record-option-ipfs')) expect(screen.getByTestId('profile-record-option-ipfs')).toHaveStyle( - 'background-color: ButtonFace', + 'background-color: rgb(238, 245, 255)', ) expect(screen.getByTestId('profile-record-option-skynet')).toBeDisabled() expect(screen.getByTestId('profile-record-option-swarm')).toBeDisabled() diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx index 08b89c3fe..e05916af0 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx @@ -3,7 +3,7 @@ import { Control, useWatch } from 'react-hook-form' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' -import { Button, Dialog, MagnifyingGlassSimpleSVG, mq, ScrollBox } from '@ensdomains/thorin' +import { Button, Dialog, MagnifyingGlassSimpleSVG, ScrollBox } from '@ensdomains/thorin' import DismissDialogButton from '@app/components/@atoms/DismissDialogButton/DismissDialogButton' import { Spacer } from '@app/components/@atoms/Spacer' @@ -28,10 +28,10 @@ const Content = styled.div( gap: ${theme.space[6]}; overflow: hidden; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { width: 80vw; max-width: ${theme.space['128']}; - `)} + } `, ) diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/CustomProfileRecordInput.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/CustomProfileRecordInput.tsx index 799a1afb4..5075e49a5 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/CustomProfileRecordInput.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/CustomProfileRecordInput.tsx @@ -1,8 +1,8 @@ import { UseFormRegister, UseFormTrigger } from 'react-hook-form' import { useTranslation } from 'react-i18next' -import styled, { css, useTheme } from 'styled-components' +import styled, { css } from 'styled-components' -import { CrossSVG, Input, mq } from '@ensdomains/thorin' +import { CrossSVG, Input } from '@ensdomains/thorin' import { ProfileEditorForm } from '@app/hooks/useProfileEditorForm' @@ -15,37 +15,37 @@ const Container = styled.div( `, ) -const InnerResponsiveContainer = styled.div(({ theme }) => [ - css` +const InnerResponsiveContainer = styled.div( + ({ theme }) => css` display: flex; flex-direction: column; gap: ${theme.space[2]}; + @media (min-width: ${theme.breakpoints.sm}px) { + flex-direction: row; + } `, - mq.sm.min(css` - flex-direction: row; - `), -]) +) -const LabelWrapper = styled.div(() => [ - css` +const LabelWrapper = styled.div( + ({ theme }) => css` width: 100%; + @media (min-width: ${theme.breakpoints.sm}px) { + flex: 0 0 25%; + } `, - mq.sm.min(css` - flex: 0 0 25%; - `), -]) +) -const ValueWrapper = styled.div(() => [ - css` +const ValueWrapper = styled.div( + ({ theme }) => css` width: 100%; + @media (min-width: ${theme.breakpoints.sm}px) { + flex: 1; + } `, - mq.sm.min(css` - flex: 1; - `), -]) +) -const ButtonContainer = styled.div(({ theme }) => [ - css` +const ButtonContainer = styled.div( + ({ theme }) => css` width: ${theme.space['11']}; margin-right: -${theme.space['1']}; display: flex; @@ -53,11 +53,11 @@ const ButtonContainer = styled.div(({ theme }) => [ justify-content: flex-start; padding-top: calc(${theme.space['8']} + ${theme.space['12']} + ${theme.space['2']}); margin-top: -1px; + @media (min-width: ${theme.breakpoints.sm}px) { + padding-top: ${theme.space['8']}; + } `, - mq.sm.min(css` - padding-top: ${theme.space['8']}; - `), -]) +) const DeleteButton = styled.button( ({ theme }) => css` @@ -112,7 +112,6 @@ export const CustomProfileRecordInput = ({ error, onDelete, }: Props) => { - const theme = useTheme() const { t } = useTranslation('register') return ( @@ -123,9 +122,6 @@ export const CustomProfileRecordInput = ({ label="" hideLabel error={!!error} - parentStyles={css` - height: ${theme.space[12]}; - `} placeholder={t('steps.profile.options.groups.custom.key')} {...register(`records.${index}.key`, { required: t('steps.profile.errors.labelRequired'), diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/Field.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/Field.tsx index 580fe30b6..8c4b75939 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/Field.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/Field.tsx @@ -22,7 +22,7 @@ const LabelsContainer = styled.div( const Label = styled.div( ({ theme }) => css` - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; font-weight: ${theme.fontWeights.bold}; line-height: ${theme.space['5']}; `, @@ -30,7 +30,7 @@ const Label = styled.div( const SecondaryLabel = styled.div( ({ theme }) => css` - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; font-size: ${theme.space['3']}; `, ) diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/Profile.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/Profile.tsx index bbabfbad7..89d078eff 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/Profile.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/Profile.tsx @@ -6,7 +6,7 @@ import styled, { css } from 'styled-components' import { match } from 'ts-pattern' import { useAccount } from 'wagmi' -import { Button, Dialog, mq, PlusSVG, Typography } from '@ensdomains/thorin' +import { Button, Dialog, PlusSVG, Typography } from '@ensdomains/thorin' import { ConfirmationDialogView } from '@app/components/@molecules/ConfirmationDialogView/ConfirmationDialogView' import { AvatarClickType } from '@app/components/@molecules/ProfileEditor/Avatar/AvatarButton' @@ -40,11 +40,12 @@ const StyledCard = styled.form(({ theme }) => [ align-items: center; justify-content: center; gap: ${theme.space['4']}; + + @media (min-width: ${theme.breakpoints.sm}px) { + padding: ${theme.space['6']}; + gap: ${theme.space['6']}; + } `, - mq.sm.min(css` - padding: ${theme.space['6']}; - gap: ${theme.space['6']}; - `), ]) const CenterAlignedTypography = styled(Typography)( @@ -64,10 +65,10 @@ const Divider = styled.div( const ButtonWrapper = styled.div(({ theme }) => [ css` width: ${theme.space.full}; + @media (min-width: 360px) { + width: initial; + } `, - mq.xs.min(css` - width: initial; - `), ]) const SubmitButton = ({ @@ -320,7 +321,7 @@ const Profile = ({ name, callback, registrationData, resolverExists }: Props) => size="medium" onClick={handleShowAddRecordModal} data-testid="show-add-profile-records-modal-button" - prefix={} + prefix={PlusSVG} > {t('steps.profile.addMore')} diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/ProfileRecordInput.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/ProfileRecordInput.tsx index 75803659e..d0f50e296 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/ProfileRecordInput.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/ProfileRecordInput.tsx @@ -1,5 +1,5 @@ import { ComponentProps, FocusEvent, forwardRef, ReactNode, Ref, RefObject, useMemo } from 'react' -import styled, { css, useTheme } from 'styled-components' +import styled, { css } from 'styled-components' import { CrossSVG, Input } from '@ensdomains/thorin' @@ -125,8 +125,6 @@ export const ProfileRecordInput = forwardRef( }: Props, ref: Ref, ) => { - const theme = useTheme() - const prefix = useMemo(() => { if (!group) return null if (['address', 'website', 'social'].includes(group)) @@ -155,9 +153,6 @@ export const ProfileRecordInput = forwardRef( placeholder={placeholder} data-testid={`profile-record-input-input-${recordKey}`} validated={validated} - parentStyles={css` - height: ${theme.space['12']}; - `} iconWidth="5.5" disabled={disabled} onFocus={onFocus} diff --git a/src/components/pages/profile/[name]/registration/steps/Transactions.tsx b/src/components/pages/profile/[name]/registration/steps/Transactions.tsx index a02e00894..47b5b7753 100644 --- a/src/components/pages/profile/[name]/registration/steps/Transactions.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Transactions.tsx @@ -5,7 +5,7 @@ import { match, P } from 'ts-pattern' import { useAccount } from 'wagmi' import { makeCommitment } from '@ensdomains/ensjs/utils' -import { Button, CountdownCircle, Dialog, Heading, mq, Spinner } from '@ensdomains/thorin' +import { Button, CountdownCircle, Dialog, Heading, Spinner } from '@ensdomains/thorin' import MobileFullWidth from '@app/components/@atoms/MobileFullWidth' import { StatusDots } from '@app/components/@atoms/StatusDots/StatusDots' @@ -88,10 +88,10 @@ const StyledCard = styled(Card)( gap: ${theme.space['4']}; padding: ${theme.space['4']}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['6']} ${theme.space['18']}; gap: ${theme.space['6']}; - `)} + } `, ) @@ -490,7 +490,11 @@ const Transactions = ({ registrationData, name, callback, onStart }: Props) => { <> {ResetBackButton} - diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/EarnifiDialog.test.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/EarnifiDialog.test.tsx index 859e58275..54bc69ee7 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/EarnifiDialog.test.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/EarnifiDialog.test.tsx @@ -2,9 +2,9 @@ import { render, screen, userEvent, waitFor } from '@app/test-utils' import { beforeEach, describe, expect, it, Mock, vi } from 'vitest' +import { makeMockIntersectionObserver } from '../../../../../../../../test/mock/makeMockIntersectionObserver' import { EarnifiDialog } from './EarnifiDialog' import { useSubscribeToEarnifi } from './useSubscribeToEarnifi' -import { makeMockIntersectionObserver } from '../../../../../../../../test/mock/makeMockIntersectionObserver' vi.mock('./useSubscribeToEarnifi', () => ({ useSubscribeToEarnifi: vi.fn(), diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/components/DateLayout.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/components/DateLayout.tsx index d78ab23e2..1ac5a9338 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/components/DateLayout.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Miscellaneous/components/DateLayout.tsx @@ -10,7 +10,7 @@ export const DateLayout = styled.div( justify-content: center; & > div:first-of-type { - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; margin-bottom: ${theme.space['2']}; font-weight: ${theme.fontWeights.bold}; } @@ -21,7 +21,7 @@ export const DateLayout = styled.div( } & > div:nth-of-type(3) { - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; font-weight: ${theme.fontWeights.normal}; font-size: ${theme.fontSizes.small}; } diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx index cdc89595f..ede638306 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/NameWrapper.tsx @@ -4,7 +4,7 @@ import { match, P } from 'ts-pattern' import { Address } from 'viem' import { GetOwnerReturnType, GetWrapperDataReturnType } from '@ensdomains/ensjs/public' -import { AlertSVG, CheckSVG, LockSVG, mq, Typography } from '@ensdomains/thorin' +import { AlertSVG, CheckSVG, LockSVG, Typography } from '@ensdomains/thorin' import { cacheableComponentStyles } from '@app/components/@atoms/CacheableComponent' import { DisabledButtonWithTooltip } from '@app/components/@molecules/DisabledButtonWithTooltip' @@ -38,9 +38,9 @@ const Container = styled(TabWrapper)( padding: ${theme.space['4']}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['6']}; - `)} + } `, ) @@ -59,6 +59,7 @@ const Record = styled.div( background: ${theme.colors.greenSurface}; border-radius: ${theme.radii.input}; width: ${theme.space.full}; + color: ${theme.colors.text}; font-weight: ${theme.fontWeights.bold}; display: flex; flex-direction: row; @@ -161,19 +162,21 @@ export const NameWrapper = ({ {t('tabs.more.token.status.wrapped')} {status === 'locked' ? ( - + ) : ( - + )} {isPCC ? ( <> - {t('tabs.more.token.pcc.not-controllable')} + {t('tabs.more.token.pcc.not-controllable')}{' '} + ) : ( <> - {t('tabs.more.token.pcc.controllable')} + {t('tabs.more.token.pcc.controllable')}{' '} + )} diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Ownership.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Ownership.tsx index ff1f8c2c0..a82d8d362 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Ownership.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Ownership.tsx @@ -5,7 +5,7 @@ import styled, { css } from 'styled-components' import { useAccount } from 'wagmi' import { GetDnsOwnerReturnType } from '@ensdomains/ensjs/dns' -import { Button, Helper, mq, Tag, Typography } from '@ensdomains/thorin' +import { Button, Helper, Tag, Typography } from '@ensdomains/thorin' import AeroplaneSVG from '@app/assets/Aeroplane.svg' import { BaseLinkWithHistory } from '@app/components/@atoms/BaseLink' @@ -57,9 +57,9 @@ const HeadingContainer = styled.div( font-weight: ${theme.fontWeights.bold}; font-size: ${theme.fontSizes.headingFour}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['6']}; - `)} + } `, ) @@ -87,9 +87,9 @@ const OwnerContainer = styled.div( background-color: ${theme.colors.backgroundSecondary}; } - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['4']} ${theme.space['6']}; - `)} + } `, ) @@ -111,7 +111,7 @@ const TextContainer = styled.div( & > div:last-of-type { font-size: ${theme.fontSizes.small}; - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; } `, ) @@ -166,9 +166,9 @@ const DNSOwnerSectionContainer = styled.div( gap: ${theme.space['4']}; padding: ${theme.space['4']}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['6']}; - `)} + } `, ) @@ -262,7 +262,7 @@ const DNSOwnerSection = ({ return ( - + {t(`tabs.more.ownership.dnsOwnerWarning.${canSend ? 'isManager' : 'isDnsOwner'}`)} @@ -317,7 +317,7 @@ const Ownership = ({ {canSend && (
- + ) } diff --git a/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/components/RoleTag.tsx b/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/components/RoleTag.tsx index e95b41bb1..e0c6425eb 100644 --- a/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/components/RoleTag.tsx +++ b/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/components/RoleTag.tsx @@ -66,7 +66,7 @@ export const RoleTag = ({ - + {t(`tabs.ownership.tooltips.${_role}`, tOptions)} diff --git a/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx b/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx index 804434f7c..aae9f143d 100644 --- a/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx +++ b/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx @@ -4,12 +4,12 @@ import { useTranslation } from 'react-i18next' import { AeroplaneSVG, + AsProp, CounterClockwiseArrowSVG, HorizontalOutwardArrowsSVG, PersonSVG, } from '@ensdomains/thorin' import { DropdownItemObject } from '@ensdomains/thorin/dist/types/components/molecules/Dropdown/Dropdown' -import { ReactNodeNoStrings } from '@ensdomains/thorin/dist/types/types' import { useAbilities } from '@app/hooks/abilities/useAbilities' import { useAccountSafely } from '@app/hooks/account/useAccountSafely' @@ -23,7 +23,7 @@ import { useTransactionFlow } from '@app/transaction-flow/TransactionFlowProvide type Action = Omit & { primary?: boolean - icon: ReactNodeNoStrings + icon: AsProp type: string error?: string onClick?: () => void @@ -72,7 +72,7 @@ export const useRoleActions = ({ name, roles, details }: Props) => { showSendDNS ? { type: 'send-dns', - icon: , + icon: AeroplaneSVG, label: t('action.send'), error: canSendError, onClick: () => showSendNameInput(`send-name-${name}`, { name }), @@ -81,7 +81,7 @@ export const useRoleActions = ({ name, roles, details }: Props) => { canRefreshDNS ? { type: 'refresh-dns', - icon: , + icon: CounterClockwiseArrowSVG, label: t('dns.refresh'), onClick: () => queryClient.resetQueries({ exact: true, queryKey: ['getDNSOwner', name] }), @@ -90,7 +90,7 @@ export const useRoleActions = ({ name, roles, details }: Props) => { showSyncManager ? { type: 'sync-manager', - icon: , + icon: HorizontalOutwardArrowsSVG, label: t('transaction.description.syncManager'), onClick: () => showSyncManagerInput(`sync-manager-${name}`, { @@ -101,7 +101,7 @@ export const useRoleActions = ({ name, roles, details }: Props) => { showSendEth ? { type: 'send-name', - icon: , + icon: AeroplaneSVG, label: t('action.send'), error: canSendError, onClick: () => showSendNameInput(`send-name-${name}`, { name }), @@ -110,7 +110,7 @@ export const useRoleActions = ({ name, roles, details }: Props) => { canEditRoles ? { type: 'edit-roles', - icon: , + icon: PersonSVG, label: t('action.editRoles'), primary: true, onClick: () => showEditRolesInput(`edit-roles-${name}`, { name }), diff --git a/src/components/pages/profile/[name]/tabs/PermissionsTab/Section.tsx b/src/components/pages/profile/[name]/tabs/PermissionsTab/Section.tsx index 6c9d8b71c..ceea8663b 100644 --- a/src/components/pages/profile/[name]/tabs/PermissionsTab/Section.tsx +++ b/src/components/pages/profile/[name]/tabs/PermissionsTab/Section.tsx @@ -110,6 +110,7 @@ const SectionListContainer = styled.div( li { font-size: ${theme.fontSizes.small}; font-weight: ${theme.fontWeights.normal}; + color: ${theme.colors.text}; } li::before { diff --git a/src/components/pages/profile/[name]/tabs/ProfileTab.tsx b/src/components/pages/profile/[name]/tabs/ProfileTab.tsx index 67e98b23f..9090c3b6c 100644 --- a/src/components/pages/profile/[name]/tabs/ProfileTab.tsx +++ b/src/components/pages/profile/[name]/tabs/ProfileTab.tsx @@ -130,7 +130,7 @@ const ProfileTab = ({ nameDetails, name }: Props) => { )} {nameDetails.isNonASCII && ( - + { )} {isWrapped && !normalisedName.endsWith('.eth') && ( - + {t('tabs.profile.warnings.wrappedDNS')} )} diff --git a/src/components/pages/profile/[name]/tabs/RecordsTab.tsx b/src/components/pages/profile/[name]/tabs/RecordsTab.tsx index bc51cfa22..56d1c3071 100644 --- a/src/components/pages/profile/[name]/tabs/RecordsTab.tsx +++ b/src/components/pages/profile/[name]/tabs/RecordsTab.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { useChainId } from 'wagmi' -import { Button, mq, Typography } from '@ensdomains/thorin' +import { Button, Typography } from '@ensdomains/thorin' import { cacheableComponentStyles } from '@app/components/@atoms/CacheableComponent' import { DisabledButtonWithTooltip } from '@app/components/@molecules/DisabledButtonWithTooltip' @@ -37,10 +37,10 @@ const AllRecords = styled.div( justify-content: flex-start; gap: ${theme.space['3']}; padding: ${theme.space['4.5']}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['6']}; gap: ${theme.space['6']}; - `)} + } `, ) @@ -85,7 +85,7 @@ const SectionTitle = styled(Typography)( const SectionSubtitle = styled(Typography)( ({ theme }) => css` - color: ${theme.colors.textTertiary}; + color: ${theme.colors.grey}; `, ) @@ -100,9 +100,9 @@ const Actions = styled.div( border-top: 1px solid ${theme.colors.border}; padding: ${theme.space['4']}; - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { padding: ${theme.space['4']} ${theme.space['6']}; - `)} + } `, ) diff --git a/src/components/pages/profile/[name]/tabs/SubnamesTab.tsx b/src/components/pages/profile/[name]/tabs/SubnamesTab.tsx index 4fd3f918d..054beee48 100644 --- a/src/components/pages/profile/[name]/tabs/SubnamesTab.tsx +++ b/src/components/pages/profile/[name]/tabs/SubnamesTab.tsx @@ -4,7 +4,7 @@ import styled, { css } from 'styled-components' import { useAccount } from 'wagmi' import { GetSubnamesParameters } from '@ensdomains/ensjs/subgraph' -import { Button, mq, PlusSVG, Spinner, Typography } from '@ensdomains/thorin' +import { Button, PlusSVG, Spinner, Typography } from '@ensdomains/thorin' import { DisabledButtonWithTooltip } from '@app/components/@molecules/DisabledButtonWithTooltip' import { @@ -55,6 +55,7 @@ const NoMoreResultsContainer = styled.div( align-items: center; justify-content: center; height: ${theme.space['15']}; + color: ${theme.colors.text}; `, ) @@ -68,14 +69,13 @@ const AddSubnamesCard = styled(Card)( & > button { width: 100%; } - - ${mq.sm.min(css` + @media (min-width: ${theme.breakpoints.sm}px) { flex-direction: row; text-align: left; & > button { width: min-content; } - `)} + } `, ) @@ -217,7 +217,7 @@ export const SubnamesTab = ({ @@ -230,7 +230,7 @@ export const SubnamesTab = ({ buttonText: t('details.tabs.subnames.addSubname.action'), mobileWidth: 200, mobilePlacement: 'top', - prefix: , + prefix: () => , }} /> )} diff --git a/src/components/pages/profile/settings/PrimarySection.tsx b/src/components/pages/profile/settings/PrimarySection.tsx index ff4adc7dd..8288fdfab 100644 --- a/src/components/pages/profile/settings/PrimarySection.tsx +++ b/src/components/pages/profile/settings/PrimarySection.tsx @@ -1,7 +1,7 @@ import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' -import { Button, Card, CrossSVG, mq, PersonPlusSVG, Skeleton, Typography } from '@ensdomains/thorin' +import { Button, Card, CrossSVG, PersonPlusSVG, Skeleton, Typography } from '@ensdomains/thorin' import { AvatarWithLink } from '@app/components/@molecules/AvatarWithLink/AvatarWithLink' import { DisabledButtonWithTooltip } from '@app/components/@molecules/DisabledButtonWithTooltip' @@ -18,8 +18,8 @@ const SkeletonFiller = styled.div( `, ) -const NoNameContainer = styled.div(({ theme }) => [ - css` +const NoNameContainer = styled.div( + ({ theme }) => css` display: grid; grid: 'title title' auto @@ -27,43 +27,44 @@ const NoNameContainer = styled.div(({ theme }) => [ 'button button' auto / 1fr 1fr; grid-row-gap: ${theme.space['4']}; + + @media (min-width: ${theme.breakpoints.sm}px) { + grid: + 'title button' auto + 'description description' auto + / 1fr 1fr; + } `, - mq.sm.min(css` - grid: - 'title button' auto - 'description description' auto - / 1fr 1fr; - `), -]) +) -const NoNameTitle = styled(Typography)(({ theme }) => [ - css` +const NoNameTitle = styled(Typography)( + ({ theme }) => css` grid-area: title; + @media (min-width: ${theme.breakpoints.sm}px) { + line-height: ${theme.space['10']}; + } `, - mq.sm.min(css` - line-height: ${theme.space['10']}; - `), -]) +) -const NoNameButton = styled(Button)(() => [ - css` +const NoNameButton = styled(Button)( + ({ theme }) => css` grid-area: button; + @media (min-width: ${theme.breakpoints.sm}px) { + width: fit-content; + justify-self: end; + } `, - mq.sm.min(css` - width: fit-content; - justify-self: end; - `), -]) +) -const NoNameDisabledButtonContainer = styled.div(() => [ - css` +const NoNameDisabledButtonContainer = styled.div( + ({ theme }) => css` grid-area: button; + @media (min-width: ${theme.breakpoints.sm}px) { + width: fit-content; + justify-self: end; + } `, - mq.sm.min(css` - width: fit-content; - justify-self: end; - `), -]) +) const NoNameDescription = styled(Typography)( () => css` @@ -71,21 +72,21 @@ const NoNameDescription = styled(Typography)( `, ) -const PrimaryNameContainer = styled.div(({ theme }) => [ - css` +const PrimaryNameContainer = styled.div( + ({ theme }) => css` display: flex; flex-direction: column; align-items: center; gap: ${theme.space['4']}; + @media (min-width: ${theme.breakpoints.sm}px) { + flex-direction: row; + gap: ${theme.space['6']}; + } `, - mq.sm.min(css` - flex-direction: row; - gap: ${theme.space['6']}; - `), -]) +) -const PrimaryNameInfo = styled.div(() => [ - css` +const PrimaryNameInfo = styled.div( + ({ theme }) => css` display: flex; width: 100%; position: relative; @@ -97,37 +98,37 @@ const PrimaryNameInfo = styled.div(() => [ width: 100%; text-align: center; } - `, - mq.sm.min(css` - align-items: flex-start; - > div { - text-align: left; + @media (min-width: ${theme.breakpoints.sm}px) { + align-items: flex-start; + > div { + text-align: left; + } } - `), -]) + `, +) -const AvatarContainer = styled.div(({ theme }) => [ - css` +const AvatarContainer = styled.div( + ({ theme }) => css` width: ${theme.space['26']}; height: ${theme.space['26']}; + @media (min-width: ${theme.breakpoints.sm}px) { + order: -1; + } `, - mq.sm.min(css` - order: -1; - `), -]) +) -const ActionsContainer = styled.div(({ theme }) => [ - css` +const ActionsContainer = styled.div( + ({ theme }) => css` width: 100%; display: flex; flex-direction: row; gap: ${theme.space['2']}; + @media (min-width: ${theme.breakpoints.sm}px) { + flex-direction: column-reverse; + width: ${theme.space['40']}; + } `, - mq.sm.min(css` - flex-direction: column-reverse; - width: ${theme.space['40']}; - `), -]) +) export const PrimarySection = () => { const { t } = useTranslation('settings') @@ -185,7 +186,7 @@ export const PrimarySection = () => { buttonId="disabled-reset-primary-name-button" buttonText={t('action.remove', { ns: 'common' })} content={t('errors.networkError.blurb', { ns: 'common' })} - prefix={} + prefix={CrossSVG} size="medium" mobilePlacement="top" loading={hasGraphErrorLoading} @@ -194,7 +195,7 @@ export const PrimarySection = () => { buttonId="disabled-change-primary-name-button" buttonText={t('action.change', { ns: 'common' })} content={t('errors.networkError.blurb', { ns: 'common' })} - prefix={} + prefix={PersonPlusSVG} size="medium" mobilePlacement="top" loading={hasGraphErrorLoading} @@ -204,7 +205,7 @@ export const PrimarySection = () => { <>