From 5267f05089bf543fcebe1a930e4563e82480862f Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Wed, 3 Jun 2026 22:21:58 +0200 Subject: [PATCH] fix(web): restore shadcn theme tokens in index.css; tidy deps + eslint rule Co-Authored-By: Claude Sonnet 4.6 --- web/eslint.config.js | 5 ++- web/package.json | 2 +- web/pnpm-lock.yaml | 6 ++-- web/src/index.css | 81 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 5 deletions(-) diff --git a/web/eslint.config.js b/web/eslint.config.js index 605b004..ecbceb4 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -11,6 +11,9 @@ export default tseslint.config( files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2022, globals: globals.browser }, plugins: { "react-hooks": reactHooks, "react-refresh": reactRefresh }, - rules: { ...reactHooks.configs.recommended.rules }, + rules: { + ...reactHooks.configs.recommended.rules, + "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], + }, }, ); diff --git a/web/package.json b/web/package.json index 8d9d577..828b494 100644 --- a/web/package.json +++ b/web/package.json @@ -21,7 +21,6 @@ "lucide-react": "^1.17.0", "react": "^19.1.0", "react-dom": "^19.1.0", - "shadcn": "^4.10.0", "tailwind-merge": "^3.6.0", "tw-animate-css": "^1.4.0" }, @@ -35,6 +34,7 @@ "@types/react": "^19.1.5", "@types/react-dom": "^19.1.3", "@vitejs/plugin-react": "^4.5.2", + "shadcn": "^4.10.0", "eslint": "^10.4.1", "eslint-plugin-react-hooks": "^7.1.1", "eslint-plugin-react-refresh": "^0.5.2", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index b87b2b5..889b16e 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -29,9 +29,6 @@ importers: react-dom: specifier: ^19.1.0 version: 19.2.7(react@19.2.7) - shadcn: - specifier: ^4.10.0 - version: 4.10.0(@types/node@25.9.1)(typescript@5.8.3) tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -81,6 +78,9 @@ importers: jsdom: specifier: ^26.1.0 version: 26.1.0 + shadcn: + specifier: ^4.10.0 + version: 4.10.0(@types/node@25.9.1)(typescript@5.8.3) tailwindcss: specifier: ^4.3.0 version: 4.3.0 diff --git a/web/src/index.css b/web/src/index.css index f1d8c73..2f5c0c9 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -1 +1,82 @@ @import "tailwindcss"; +@import "tw-animate-css"; +@import "@fontsource-variable/geist"; + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif; +} + +:root { + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --radius: 0.625rem; +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.205 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.205 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.985 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(1 0 0 / 10%); + --input: oklch(1 0 0 / 15%); + --ring: oklch(0.556 0 0); +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + + body { + @apply bg-background text-foreground font-sans; + } +}