@codefast/ui 0.14.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +1 -1
  3. package/dist/components/checkbox-cards.js +1 -1
  4. package/dist/components/checkbox-group.js +1 -1
  5. package/dist/components/checkbox.js +1 -1
  6. package/dist/components/input-number.js +1 -1
  7. package/dist/components/input-otp.js +1 -1
  8. package/dist/components/input.js +1 -1
  9. package/dist/components/native-select.js +1 -1
  10. package/dist/components/radio-cards.js +1 -1
  11. package/dist/components/radio-group.js +1 -1
  12. package/dist/components/radio.js +1 -1
  13. package/dist/components/select.js +1 -1
  14. package/dist/components/switch.js +1 -1
  15. package/dist/components/textarea.js +1 -1
  16. package/dist/hooks/use-animated-value.js +5 -5
  17. package/dist/variants/alert.d.ts +2 -2
  18. package/dist/variants/attachment.d.ts +4 -4
  19. package/dist/variants/badge.d.ts +2 -2
  20. package/dist/variants/badge.js +1 -1
  21. package/dist/variants/bubble.d.ts +4 -4
  22. package/dist/variants/bubble.js +1 -1
  23. package/dist/variants/button-group.d.ts +2 -2
  24. package/dist/variants/button.d.ts +2 -2
  25. package/dist/variants/button.js +1 -1
  26. package/dist/variants/empty.d.ts +2 -2
  27. package/dist/variants/field.d.ts +2 -2
  28. package/dist/variants/input-group.d.ts +5 -5
  29. package/dist/variants/input-group.js +1 -1
  30. package/dist/variants/item.d.ts +4 -4
  31. package/dist/variants/marker.d.ts +2 -2
  32. package/dist/variants/navigation-menu.d.ts +1 -1
  33. package/dist/variants/progress-circle.d.ts +1 -1
  34. package/dist/variants/scroll-area.d.ts +2 -2
  35. package/dist/variants/separator.d.ts +2 -2
  36. package/dist/variants/sheet.d.ts +2 -2
  37. package/dist/variants/sidebar.d.ts +2 -2
  38. package/dist/variants/tabs.d.ts +2 -2
  39. package/dist/variants/toggle.d.ts +2 -2
  40. package/package.json +8 -8
  41. package/src/css/foundation/tokens.css +8 -0
  42. package/src/css/themes/amber.css +27 -2
  43. package/src/css/themes/blue.css +27 -2
  44. package/src/css/themes/cyan.css +27 -2
  45. package/src/css/themes/emerald.css +27 -2
  46. package/src/css/themes/fuchsia.css +27 -2
  47. package/src/css/themes/gray.css +27 -2
  48. package/src/css/themes/green.css +27 -2
  49. package/src/css/themes/indigo.css +27 -2
  50. package/src/css/themes/lime.css +27 -2
  51. package/src/css/themes/neutral.css +27 -2
  52. package/src/css/themes/orange.css +27 -2
  53. package/src/css/themes/pink.css +27 -2
  54. package/src/css/themes/purple.css +27 -2
  55. package/src/css/themes/red.css +27 -2
  56. package/src/css/themes/rose.css +27 -2
  57. package/src/css/themes/sky.css +27 -2
  58. package/src/css/themes/slate.css +27 -2
  59. package/src/css/themes/stone.css +27 -2
  60. package/src/css/themes/teal.css +27 -2
  61. package/src/css/themes/violet.css +27 -2
  62. package/src/css/themes/yellow.css +27 -2
  63. package/src/css/themes/zinc.css +27 -2
@@ -2,7 +2,7 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const progressCircleVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const progressCircleVariants: import("@codefast/tailwind-variants").SlotVariantResolver<{
6
6
  size: {
7
7
  sm: {
8
8
  label: string;
@@ -2,7 +2,7 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants").FlatVariantResolver<{
6
6
  orientation: {
7
7
  horizontal: string;
8
8
  vertical: string;
@@ -13,7 +13,7 @@ declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants")
13
13
  md: string;
14
14
  lg: string;
15
15
  };
16
- }, Record<string, never>>;
16
+ }>;
17
17
  /**
18
18
  * @since 0.3.16-canary.0
19
19
  */
@@ -2,7 +2,7 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const separatorVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const separatorVariants: import("@codefast/tailwind-variants").FlatVariantResolver<{
6
6
  align: {
7
7
  center: string;
8
8
  end: string;
@@ -12,7 +12,7 @@ declare const separatorVariants: import("@codefast/tailwind-variants").VariantRe
12
12
  horizontal: string;
13
13
  vertical: string;
14
14
  };
15
- }, Record<string, never>>;
15
+ }>;
16
16
  /**
17
17
  * @since 0.3.16-canary.0
18
18
  */
@@ -2,14 +2,14 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const sheetContentVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const sheetContentVariants: import("@codefast/tailwind-variants").FlatVariantResolver<{
6
6
  side: {
7
7
  bottom: string;
8
8
  left: string;
9
9
  right: string;
10
10
  top: string;
11
11
  };
12
- }, Record<string, never>>;
12
+ }>;
13
13
  /**
14
14
  * @since 0.3.16-canary.0
15
15
  */
@@ -2,7 +2,7 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const sidebarMenuButtonVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const sidebarMenuButtonVariants: import("@codefast/tailwind-variants").FlatVariantResolver<{
6
6
  size: {
7
7
  default: string;
8
8
  sm: string;
@@ -12,7 +12,7 @@ declare const sidebarMenuButtonVariants: import("@codefast/tailwind-variants").V
12
12
  default: string;
13
13
  outline: string;
14
14
  };
15
- }, Record<string, never>>;
15
+ }>;
16
16
  /**
17
17
  * @since 0.3.16-canary.0
18
18
  */
@@ -2,12 +2,12 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const tabsListVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const tabsListVariants: import("@codefast/tailwind-variants").FlatVariantResolver<{
6
6
  variant: {
7
7
  default: string;
8
8
  line: string;
9
9
  };
10
- }, Record<string, never>>;
10
+ }>;
11
11
  /**
12
12
  * @since 0.3.16-canary.0
13
13
  */
@@ -2,7 +2,7 @@ import type { VariantProps } from "#lib/utils";
2
2
  /**
3
3
  * @since 0.3.16-canary.0
4
4
  */
5
- declare const toggleVariants: import("@codefast/tailwind-variants").VariantResolver<{
5
+ declare const toggleVariants: import("@codefast/tailwind-variants").FlatVariantResolver<{
6
6
  size: {
7
7
  default: string;
8
8
  sm: string;
@@ -12,7 +12,7 @@ declare const toggleVariants: import("@codefast/tailwind-variants").VariantResol
12
12
  default: string;
13
13
  outline: string;
14
14
  };
15
- }, Record<string, never>>;
15
+ }>;
16
16
  /**
17
17
  * @since 0.3.16-canary.0
18
18
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/ui",
3
- "version": "0.14.1",
3
+ "version": "0.16.0",
4
4
  "description": "Core UI components library built with React and Tailwind CSS",
5
5
  "keywords": [
6
6
  "components",
@@ -468,23 +468,23 @@
468
468
  "access": "public"
469
469
  },
470
470
  "dependencies": {
471
- "@codefast/tailwind-variants": "0.10.0",
471
+ "@codefast/tailwind-variants": "0.11.0",
472
472
  "@daypicker/react": "^10.0.2",
473
473
  "cmdk": "^1.1.1",
474
+ "cn": "^0.5.2",
474
475
  "embla-carousel-react": "^8.6.0",
475
476
  "input-otp": "^1.5.0",
476
- "lucide-react": "^1.57.0",
477
+ "lucide-react": "^1.72.0",
477
478
  "radix-ui": "^1.8.1",
478
- "react-hook-form": "^7.90.0",
479
- "react-resizable-panels": "^4.14.5",
479
+ "react-hook-form": "^7.92.0",
480
+ "react-resizable-panels": "^4.21.0",
480
481
  "recharts": "^3.10.1",
481
482
  "sonner": "^2.0.8",
482
- "tailwind-merge": "^3.7.0",
483
483
  "tw-animate-css": "^1.4.0",
484
484
  "vaul": "^1.1.2"
485
485
  },
486
486
  "peerDependencies": {
487
- "@codefast/theme": ">=0.11.0",
487
+ "@codefast/theme": ">=0.12.0",
488
488
  "@types/react": ">=19.0.0",
489
489
  "@types/react-dom": ">=19.0.0",
490
490
  "react": ">=19.0.0",
@@ -499,6 +499,6 @@
499
499
  }
500
500
  },
501
501
  "engines": {
502
- "node": ">=22.22.2"
502
+ "node": ">=24.15.0"
503
503
  }
504
504
  }
@@ -35,6 +35,12 @@
35
35
 
36
36
  --color-destructive: var(--destructive);
37
37
 
38
+ --color-success: var(--success);
39
+ --color-success-foreground: var(--success-foreground);
40
+
41
+ --color-warning: var(--warning);
42
+ --color-warning-foreground: var(--warning-foreground);
43
+
38
44
  --color-muted: var(--muted);
39
45
  --color-muted-foreground: var(--muted-foreground);
40
46
 
@@ -51,6 +57,8 @@
51
57
 
52
58
  --color-border: var(--border);
53
59
  --color-input: var(--input);
60
+ /* A theme without `control` falls back to `input`, so its form controls keep a border. */
61
+ --color-control: var(--control, var(--input));
54
62
  --color-ring: var(--ring);
55
63
 
56
64
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
19
19
  --secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
24
30
  --muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
38
44
  --input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
45
+ --control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
39
46
  --ring: oklch(0.56 0.15 49); /* --color-amber-700 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
71
78
  --secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
76
89
  --muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.67 0.16 58); /* --color-amber-600 */
90
104
 
91
105
  --sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.56 0.15 49); /* --color-amber-700 */
104
118
  --chart-5: oklch(0.47 0.12 46); /* --color-amber-800 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
19
19
  --secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
24
30
  --muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
38
44
  --input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
45
+ --control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
39
46
  --ring: oklch(0.623 0.214 259.815); /* --color-blue-500 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
71
78
  --secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
76
89
  --muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.556 0 0); /* default ring (dark) */
90
104
 
91
105
  --sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.488 0.243 264.376); /* --color-blue-700 */
104
118
  --chart-5: oklch(0.424 0.199 265.638); /* --color-blue-800 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
19
19
  --secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
24
30
  --muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
38
44
  --input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
45
+ --control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
39
46
  --ring: oklch(0.61 0.11 222); /* --color-cyan-600 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
71
78
  --secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
76
89
  --muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.61 0.11 222); /* --color-cyan-600 */
90
104
 
91
105
  --sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.61 0.11 222); /* --color-cyan-600 */
104
118
  --chart-5: oklch(0.52 0.09 223); /* --color-cyan-700 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
19
19
  --secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
24
30
  --muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
38
44
  --input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
45
+ --control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
39
46
  --ring: oklch(0.6 0.13 163); /* --color-emerald-600 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
71
78
  --secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
76
89
  --muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.6 0.13 163); /* --color-emerald-600 */
90
104
 
91
105
  --sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.6 0.13 163); /* --color-emerald-600 */
104
118
  --chart-5: oklch(0.51 0.1 166); /* --color-emerald-700 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
19
19
  --secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
24
30
  --muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
38
44
  --input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
45
+ --control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
39
46
  --ring: oklch(0.67 0.26 322); /* --color-fuchsia-500 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
71
78
  --secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
76
89
  --muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.59 0.26 323); /* --color-fuchsia-600 */
90
104
 
91
105
  --sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.59 0.26 323); /* --color-fuchsia-600 */
104
118
  --chart-5: oklch(0.52 0.23 324); /* --color-fuchsia-700 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.97 0 265); /* --color-gray-100 */
19
19
  --secondary-foreground: oklch(0.21 0.03 265); /* --color-gray-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.97 0 265); /* --color-gray-100 */
24
30
  --muted-foreground: oklch(0.45 0.03 257); /* --color-gray-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.93 0.01 265); /* --color-gray-200 */
38
44
  --input: oklch(0.93 0.01 265); /* --color-gray-200 */
45
+ --control: oklch(0.93 0.01 265); /* --color-gray-200 */
39
46
  --ring: oklch(0.55 0.02 264); /* --color-gray-500 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.28 0.03 257); /* --color-gray-800 */
71
78
  --secondary-foreground: oklch(0.98 0 248); /* --color-gray-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.28 0.03 257); /* --color-gray-800 */
76
89
  --muted-foreground: oklch(0.71 0.02 261); /* --color-gray-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.71 0.02 261); /* --color-gray-400 */
90
104
 
91
105
  --sidebar: oklch(0.21 0.03 265); /* --color-gray-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.627 0.265 303.9); /* --color-purple-500 */
104
118
  --chart-5: oklch(0.645 0.246 16.439); /* --color-rose-500 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.01 265); /* --color-gray-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }
@@ -18,7 +18,13 @@
18
18
  --secondary: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
19
19
  --secondary-foreground: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
20
20
 
21
- --destructive: oklch(0.577 0.245 27.325); /* --color-red-600 */
21
+ --destructive: oklch(0.505 0.213 27.518); /* --color-red-700 */
22
+
23
+ --success: oklch(0.48 0.13 150); /* --color-green-800 */
24
+ --success-foreground: oklch(0.982 0.018 155.826); /* --color-green-50 */
25
+
26
+ --warning: oklch(0.5 0.105 70); /* --color-amber-800 */
27
+ --warning-foreground: oklch(0.987 0.022 95.277); /* --color-amber-50 */
22
28
 
23
29
  --muted: oklch(0.967 0.001 286.375); /* --color-zinc-100 */
24
30
  --muted-foreground: oklch(0.442 0.017 285.786); /* --color-zinc-600 */
@@ -36,6 +42,7 @@
36
42
 
37
43
  --border: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
38
44
  --input: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
45
+ --control: oklch(0.92 0.004 286.32); /* --color-zinc-200 */
39
46
  --ring: oklch(0.532 0.157 131.589); /* --color-lime-700 */
40
47
 
41
48
  /* ── Sidebar ───────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -70,7 +77,13 @@
70
77
  --secondary: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
71
78
  --secondary-foreground: oklch(0.985 0 0); /* --color-zinc-50 */
72
79
 
73
- --destructive: oklch(0.704 0.191 22.216); /* --color-red-400 */
80
+ --destructive: oklch(0.808 0.114 19.571); /* --color-red-300 */
81
+
82
+ --success: oklch(0.8 0.15 150); /* --color-green-400 */
83
+ --success-foreground: oklch(0.266 0.065 152.934); /* --color-green-950 */
84
+
85
+ --warning: oklch(0.82 0.14 80); /* --color-amber-400 */
86
+ --warning-foreground: oklch(0.279 0.077 45.635); /* --color-amber-950 */
74
87
 
75
88
  --muted: oklch(0.274 0.006 286.033); /* --color-zinc-800 */
76
89
  --muted-foreground: oklch(0.705 0.015 286.067); /* --color-zinc-400 */
@@ -86,6 +99,7 @@
86
99
 
87
100
  --border: oklch(1 0 0 / 10%); /* --color-white */
88
101
  --input: oklch(1 0 0 / 15%); /* --color-white */
102
+ --control: oklch(1 0 0 / 15%); /* --color-white */
89
103
  --ring: oklch(0.648 0.2 131.684); /* --color-lime-600 */
90
104
 
91
105
  --sidebar: oklch(0.21 0.006 285.885); /* --color-zinc-900 */
@@ -103,3 +117,14 @@
103
117
  --chart-4: oklch(0.527 0.154 150.069); /* --color-green-700 */
104
118
  --chart-5: oklch(0.448 0.119 151.328); /* --color-green-800 */
105
119
  }
120
+
121
+ /* A viewer who asks for more contrast gets form control borders at 3:1 on every surface. */
122
+ @media (prefers-contrast: more) {
123
+ :root {
124
+ --control: oklch(0.645 0.004 286.32); /* --color-zinc-400 */
125
+ }
126
+
127
+ .dark {
128
+ --control: oklch(1 0 0 / 36%); /* --color-white */
129
+ }
130
+ }