Skip to content

Commit 35c923e

Browse files
authored
chore: replace all destructive colors by alert (#982)
1 parent 7e87d33 commit 35c923e

File tree

5 files changed

+72
-81
lines changed

5 files changed

+72
-81
lines changed

apps/website/src/routes/docs/headless/pagination/examples/styling.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default component$(() => {
1717
}}
1818
class="border border-foreground p-2"
1919
defaultClass="border border-primary p-4"
20-
selectedClass="border bg-destructive p-4"
20+
selectedClass="border bg-alert p-4"
2121
dividerClass="bg-muted p-4"
2222
/>
2323

@@ -29,7 +29,7 @@ export default component$(() => {
2929
}}
3030
class="border border-foreground p-2"
3131
defaultClass="bg-primary w-8 h-8"
32-
selectedClass="bg-destructive w-8 h-8"
32+
selectedClass="bg-alert w-8 h-8"
3333
dividerClass="bg-muted h-8 px-2"
3434
/>
3535

apps/website/src/routes/docs/styled/input/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const Input = component$<InputProps>(
4848
id={inputId}
4949
/>
5050
{error && (
51-
<div id={`${inputId}-error`} class="text-destructive mt-1 text-sm">
51+
<div id={`${inputId}-error`} class="text-alert mt-1 text-sm">
5252
{error}
5353
</div>
5454
)}

packages/kit-styled/src/components/button/todo.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

packages/kit-styled/src/components/input/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Input = component$<InputProps>(
2626
name={name}
2727
/>
2828
{error && (
29-
<div id={`${inputId}-error`} class="text-destructive mt-1 text-sm">
29+
<div id={`${inputId}-error`} class="mt-1 text-sm text-alert">
3030
{error}
3131
</div>
3232
)}
Lines changed: 68 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,82 @@
11
colors: {
2-
border: 'hsl(var(--color-border) / <alpha-value>)',
3-
input: 'hsl(var(--color-input) / <alpha-value>)',
4-
ring: 'hsl(var(--color-ring) / <alpha-value>)',
5-
background: 'hsl(var(--color-background) / <alpha-value>)',
6-
foreground: 'hsl(var(--color-foreground) / <alpha-value>)',
7-
2+
border: 'hsl(var(--border))',
3+
input: 'hsl(var(--input))',
4+
ring: 'hsl(var(--ring))',
5+
background: 'hsl(var(--background))',
6+
foreground: 'hsl(var(--foreground))',
87
primary: {
9-
DEFAULT: 'hsl(var(--color-primary) / <alpha-value>)',
10-
foreground: 'hsl(var(--color-primary-foreground) / <alpha-value>)',
8+
DEFAULT: 'hsl(var(--primary))',
9+
foreground: 'hsl(var(--primary-foreground))',
1110
},
1211
secondary: {
13-
DEFAULT: 'hsl(var(--color-secondary) / <alpha-value>)',
14-
foreground: 'hsl(var(--color-secondary-foreground) / <alpha-value>)',
12+
DEFAULT: 'hsl(var(--secondary))',
13+
foreground: 'hsl(var(--secondary-foreground))',
1514
},
16-
accent: {
17-
DEFAULT: 'hsl(var(--color-accent) / <alpha-value>)',
18-
foreground: 'hsl(var(--color-accent-foreground) / <alpha-value>)',
15+
alert: {
16+
DEFAULT: 'hsl(var(--alert))',
17+
foreground: 'hsl(var(--alert-foreground))',
1918
},
2019
muted: {
21-
DEFAULT: 'hsl(var(--color-muted) / <alpha-value>)',
22-
foreground: 'hsl(var(--color-muted-foreground) / <alpha-value>)',
23-
},
24-
destructive: {
25-
DEFAULT: 'hsl(var(--color-destructive) / <alpha-value>)',
26-
foreground: 'hsl(var(--color-destructive-foreground) / <alpha-value>)',
20+
DEFAULT: 'hsl(var(--muted))',
21+
foreground: 'hsl(var(--muted-foreground))',
2722
},
28-
popover: {
29-
DEFAULT: 'hsl(var(--color-popover) / <alpha-value>)',
30-
foreground: 'hsl(var(--color-popover-foreground) / <alpha-value>)',
23+
accent: {
24+
DEFAULT: 'hsl(var(--accent))',
25+
foreground: 'hsl(var(--accent-foreground))',
3126
},
3227
card: {
33-
DEFAULT: 'hsl(var(--color-card) / <alpha-value>)',
34-
foreground: 'hsl(var(--color-card-foreground) / <alpha-value>)',
28+
DEFAULT: 'hsl(var(--card))',
29+
foreground: 'hsl(var(--card-foreground))',
30+
},
31+
popover: {
32+
DEFAULT: 'hsl(var(--popover))',
33+
foreground: 'hsl(var(--popover-foreground))',
3534
},
3635
},
3736
borderRadius: {
38-
lg: 'var(--border-radius)',
39-
md: 'calc(var(--border-radius) - 2px)',
40-
sm: 'calc(var(--border-radius) - 4px)',
37+
base: 'var(--border-radius)',
38+
sm: 'calc(var(--border-radius) + 0.125rem)',
39+
DEFAULT: 'calc(var(--border-radius) + 0.25rem)',
40+
md: 'calc(var(--border-radius) + 0.375rem)',
41+
lg: 'calc(var(--border-radius) + 0.5rem)',
42+
xl: 'calc(var(--border-radius) + 0.75rem)',
43+
'2xl': 'calc(var(--border-radius) + 1rem)',
44+
'3xl': 'calc(var(--border-radius) + 1.5rem)',
45+
},
46+
borderWidth: {
47+
base: 'var(--border-width)',
48+
DEFAULT: 'calc(var(--border-width) + 1px)',
49+
2: 'calc(var(--border-width) + 2px)',
50+
4: 'calc(var(--border-width) + 4px)',
51+
8: 'calc(var(--border-width) + 8px)',
52+
},
53+
boxShadow: {
54+
base: 'var(--shadow-base)',
55+
sm: 'var(--shadow-sm)',
56+
DEFAULT: 'var(--shadow)',
57+
md: 'var(--shadow-md)',
58+
lg: 'var(--shadow-lg)',
59+
xl: 'var(--shadow-xl)',
60+
'2xl': 'var(--shadow-2xl)',
61+
inner: 'var(--shadow-inner)',
62+
},
63+
strokeWidth: {
64+
0: '0',
65+
base: 'var(--stroke-width)',
66+
1: 'calc(var(--stroke-width) + 1px)',
67+
2: 'calc(var(--stroke-width) + 2px)',
68+
},
69+
animation: {
70+
'accordion-up': 'collapsible-up 0.2s ease-out 0s 1 normal forwards',
71+
'accordion-down': 'collapsible-down 0.2s ease-out 0s 1 normal forwards',
72+
},
73+
keyframes: {
74+
'collapsible-down': {
75+
from: { height: '0' },
76+
to: { height: 'var(--qwikui-collapsible-content-height)' },
77+
},
78+
'collapsible-up': {
79+
from: { height: 'var(--qwikui-collapsible-content-height)' },
80+
to: { height: '0' },
81+
},
4182
},

0 commit comments

Comments
 (0)