From a59414c04e16359501720b6871d17d0330963ef5 Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Mon, 6 Nov 2023 13:07:20 -0500 Subject: [PATCH 1/2] update destructive color to align with og --- apps/www/src/lib/registry/colors.ts | 2 +- apps/www/src/lib/registry/themes.ts | 24 ++++++++++++------------ apps/www/src/styles/globals.css | 2 +- packages/cli/src/utils/templates.ts | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/www/src/lib/registry/colors.ts b/apps/www/src/lib/registry/colors.ts index e43b5969a..d45048612 100644 --- a/apps/www/src/lib/registry/colors.ts +++ b/apps/www/src/lib/registry/colors.ts @@ -1526,7 +1526,7 @@ export const colorMapping = { "muted-foreground": "{{base}}-500", accent: "{{base}}-100", "accent-foreground": "{{base}}-900", - destructive: "red-500", + destructive: "red-600", "destructive-foreground": "{{base}}-50", border: "{{base}}-200", input: "{{base}}-200", diff --git a/apps/www/src/lib/registry/themes.ts b/apps/www/src/lib/registry/themes.ts index 548c142c1..d64a93fd5 100644 --- a/apps/www/src/lib/registry/themes.ts +++ b/apps/www/src/lib/registry/themes.ts @@ -22,7 +22,7 @@ export const themes = [ "muted-foreground": "240 3.8% 46.1%", accent: "240 4.8% 95.9%", "accent-foreground": "240 5.9% 10%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "0 0% 98%", border: "240 5.9% 90%", input: "240 5.9% 90%", @@ -75,7 +75,7 @@ export const themes = [ "muted-foreground": "215.4 16.3% 46.9%", accent: "210 40% 96.1%", "accent-foreground": "222.2 47.4% 11.2%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "210 40% 98%", border: "214.3 31.8% 91.4%", input: "214.3 31.8% 91.4%", @@ -128,7 +128,7 @@ export const themes = [ "muted-foreground": "25 5.3% 44.7%", accent: "60 4.8% 95.9%", "accent-foreground": "24 9.8% 10%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "60 9.1% 97.8%", border: "20 5.9% 90%", input: "20 5.9% 90%", @@ -181,7 +181,7 @@ export const themes = [ "muted-foreground": "220 8.9% 46.1%", accent: "220 14.3% 95.9%", "accent-foreground": "220.9 39.3% 11%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "210 20% 98%", border: "220 13% 91%", input: "220 13% 91%", @@ -234,7 +234,7 @@ export const themes = [ "muted-foreground": "0 0% 45.1%", accent: "0 0% 96.1%", "accent-foreground": "0 0% 9%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "0 0% 98%", border: "0 0% 89.8%", input: "0 0% 89.8%", @@ -286,7 +286,7 @@ export const themes = [ "muted-foreground": "0 0% 45.1%", accent: "0 0% 96.1%", "accent-foreground": "0 0% 9%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "0 0% 98%", border: "0 0% 89.8%", input: "0 0% 89.8%", @@ -339,7 +339,7 @@ export const themes = [ "muted-foreground": "240 3.8% 46.1%", accent: "240 4.8% 95.9%", "accent-foreground": "240 5.9% 10%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "0 0% 98%", border: "240 5.9% 90%", input: "240 5.9% 90%", @@ -392,7 +392,7 @@ export const themes = [ "muted-foreground": "25 5.3% 44.7%", accent: "60 4.8% 95.9%", "accent-foreground": "24 9.8% 10%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "60 9.1% 97.8%", border: "20 5.9% 90%", input: "20 5.9% 90%", @@ -445,7 +445,7 @@ export const themes = [ "muted-foreground": "240 3.8% 46.1%", accent: "240 4.8% 95.9%", "accent-foreground": "240 5.9% 10%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "0 0% 98%", border: "240 5.9% 90%", input: "240 5.9% 90%", @@ -497,7 +497,7 @@ export const themes = [ "muted-foreground": "215.4 16.3% 46.9%", accent: "210 40% 96.1%", "accent-foreground": "222.2 47.4% 11.2%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "210 40% 98%", border: "214.3 31.8% 91.4%", input: "214.3 31.8% 91.4%", @@ -549,7 +549,7 @@ export const themes = [ "muted-foreground": "25 5.3% 44.7%", accent: "60 4.8% 95.9%", "accent-foreground": "24 9.8% 10%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "60 9.1% 97.8%", border: "20 5.9% 90%", input: "20 5.9% 90%", @@ -602,7 +602,7 @@ export const themes = [ "muted-foreground": "220 8.9% 46.1%", accent: "220 14.3% 95.9%", "accent-foreground": "220.9 39.3% 11%", - destructive: "0 84.2% 60.2%", + destructive: "0 72.22% 50.59%", "destructive-foreground": "210 20% 98%", border: "220 13% 91%", input: "220 13% 91%", diff --git a/apps/www/src/styles/globals.css b/apps/www/src/styles/globals.css index fbc3c2ce3..ade14f97e 100644 --- a/apps/www/src/styles/globals.css +++ b/apps/www/src/styles/globals.css @@ -29,7 +29,7 @@ --accent: 240 4.8% 95.9%; --accent-foreground: 240 5.9% 10%; - --destructive: 0 84.2% 60.2%; + --destructive: 0 72.22% 50.59%; --destructive-foreground: 0 0% 98%; --ring: 240 5% 64.9%; diff --git a/packages/cli/src/utils/templates.ts b/packages/cli/src/utils/templates.ts index 217670b52..bec4c6ec9 100644 --- a/packages/cli/src/utils/templates.ts +++ b/packages/cli/src/utils/templates.ts @@ -28,7 +28,7 @@ export const STYLES = `@tailwind base; --accent: 210 40% 96.1%; --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 92% 38%; + --destructive: 0 72.22% 50.59%; --destructive-foreground: 210 40% 98%; --ring: 215 20.2% 65.1%; From e39a5e02876a9233d16deaee2c7b97c07de2032c Mon Sep 17 00:00:00 2001 From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:09:02 -0500 Subject: [PATCH 2/2] add changeset --- .changeset/healthy-melons-fold.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/healthy-melons-fold.md diff --git a/.changeset/healthy-melons-fold.md b/.changeset/healthy-melons-fold.md new file mode 100644 index 000000000..5069a6efb --- /dev/null +++ b/.changeset/healthy-melons-fold.md @@ -0,0 +1,5 @@ +--- +"shadcn-svelte": patch +--- + +Fix: destructive a11y contrast issues