@nphuonha/ui-kit 0.0.0-stage → 0.3.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 (113) hide show
  1. package/CONVENTIONS.md +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +114 -2
  4. package/dist/components/ui/_shared/icon-provider.d.ts +18 -0
  5. package/dist/components/ui/_shared/icon-provider.js +26 -0
  6. package/dist/components/ui/alert/alert-variants.d.ts +5 -0
  7. package/dist/components/ui/alert/alert-variants.js +13 -0
  8. package/dist/components/ui/alert/alert.d.ts +9 -0
  9. package/dist/components/ui/alert/alert.js +13 -0
  10. package/dist/components/ui/alert/index.d.ts +2 -0
  11. package/dist/components/ui/alert/index.js +2 -0
  12. package/dist/components/ui/badge/badge-variants.d.ts +5 -0
  13. package/dist/components/ui/badge/badge-variants.js +16 -0
  14. package/dist/components/ui/badge/badge.d.ts +6 -0
  15. package/dist/components/ui/badge/badge.js +6 -0
  16. package/dist/components/ui/badge/index.d.ts +2 -0
  17. package/dist/components/ui/badge/index.js +2 -0
  18. package/dist/components/ui/bottom-nav/bottom-nav.d.ts +20 -0
  19. package/dist/components/ui/bottom-nav/bottom-nav.js +36 -0
  20. package/dist/components/ui/bottom-nav/index.d.ts +1 -0
  21. package/dist/components/ui/bottom-nav/index.js +1 -0
  22. package/dist/components/ui/button/button-variants.d.ts +7 -0
  23. package/dist/components/ui/button/button-variants.js +29 -0
  24. package/dist/components/ui/button/button.d.ts +10 -0
  25. package/dist/components/ui/button/button.js +12 -0
  26. package/dist/components/ui/button/index.d.ts +2 -0
  27. package/dist/components/ui/button/index.js +2 -0
  28. package/dist/components/ui/card/card.d.ts +7 -0
  29. package/dist/components/ui/card/card.js +20 -0
  30. package/dist/components/ui/card/index.d.ts +1 -0
  31. package/dist/components/ui/card/index.js +1 -0
  32. package/dist/components/ui/checkbox/checkbox.d.ts +8 -0
  33. package/dist/components/ui/checkbox/checkbox.js +18 -0
  34. package/dist/components/ui/checkbox/index.d.ts +1 -0
  35. package/dist/components/ui/checkbox/index.js +1 -0
  36. package/dist/components/ui/desktop-nav/desktop-nav.d.ts +18 -0
  37. package/dist/components/ui/desktop-nav/desktop-nav.js +37 -0
  38. package/dist/components/ui/desktop-nav/index.d.ts +1 -0
  39. package/dist/components/ui/desktop-nav/index.js +1 -0
  40. package/dist/components/ui/dialog/dialog.d.ts +15 -0
  41. package/dist/components/ui/dialog/dialog.js +10 -0
  42. package/dist/components/ui/dialog/index.d.ts +1 -0
  43. package/dist/components/ui/dialog/index.js +1 -0
  44. package/dist/components/ui/field/field.d.ts +11 -0
  45. package/dist/components/ui/field/field.js +22 -0
  46. package/dist/components/ui/field/index.d.ts +1 -0
  47. package/dist/components/ui/field/index.js +1 -0
  48. package/dist/components/ui/icon-button/icon-button.d.ts +7 -0
  49. package/dist/components/ui/icon-button/icon-button.js +7 -0
  50. package/dist/components/ui/icon-button/index.d.ts +1 -0
  51. package/dist/components/ui/icon-button/index.js +1 -0
  52. package/dist/components/ui/input/index.d.ts +1 -0
  53. package/dist/components/ui/input/index.js +1 -0
  54. package/dist/components/ui/input/input.d.ts +5 -0
  55. package/dist/components/ui/input/input.js +6 -0
  56. package/dist/components/ui/label/index.d.ts +1 -0
  57. package/dist/components/ui/label/index.js +1 -0
  58. package/dist/components/ui/label/label.d.ts +5 -0
  59. package/dist/components/ui/label/label.js +6 -0
  60. package/dist/components/ui/popover/index.d.ts +1 -0
  61. package/dist/components/ui/popover/index.js +1 -0
  62. package/dist/components/ui/popover/popover.d.ts +14 -0
  63. package/dist/components/ui/popover/popover.js +7 -0
  64. package/dist/components/ui/radio-group/index.d.ts +1 -0
  65. package/dist/components/ui/radio-group/index.js +1 -0
  66. package/dist/components/ui/radio-group/radio-group.d.ts +17 -0
  67. package/dist/components/ui/radio-group/radio-group.js +17 -0
  68. package/dist/components/ui/select/index.d.ts +1 -0
  69. package/dist/components/ui/select/index.js +1 -0
  70. package/dist/components/ui/select/select.d.ts +21 -0
  71. package/dist/components/ui/select/select.js +10 -0
  72. package/dist/components/ui/separator/index.d.ts +1 -0
  73. package/dist/components/ui/separator/index.js +1 -0
  74. package/dist/components/ui/separator/separator.d.ts +6 -0
  75. package/dist/components/ui/separator/separator.js +5 -0
  76. package/dist/components/ui/sheet/index.d.ts +1 -0
  77. package/dist/components/ui/sheet/index.js +1 -0
  78. package/dist/components/ui/sheet/sheet.d.ts +15 -0
  79. package/dist/components/ui/sheet/sheet.js +15 -0
  80. package/dist/components/ui/spinner/index.d.ts +1 -0
  81. package/dist/components/ui/spinner/index.js +1 -0
  82. package/dist/components/ui/spinner/spinner.d.ts +5 -0
  83. package/dist/components/ui/spinner/spinner.js +8 -0
  84. package/dist/components/ui/switch/index.d.ts +1 -0
  85. package/dist/components/ui/switch/index.js +1 -0
  86. package/dist/components/ui/switch/switch.d.ts +7 -0
  87. package/dist/components/ui/switch/switch.js +15 -0
  88. package/dist/components/ui/tabs/index.d.ts +1 -0
  89. package/dist/components/ui/tabs/index.js +1 -0
  90. package/dist/components/ui/tabs/tabs.d.ts +14 -0
  91. package/dist/components/ui/tabs/tabs.js +7 -0
  92. package/dist/components/ui/textarea/index.d.ts +1 -0
  93. package/dist/components/ui/textarea/index.js +1 -0
  94. package/dist/components/ui/textarea/textarea.d.ts +5 -0
  95. package/dist/components/ui/textarea/textarea.js +6 -0
  96. package/dist/components/ui/toast/index.d.ts +1 -0
  97. package/dist/components/ui/toast/index.js +1 -0
  98. package/dist/components/ui/toast/toast.d.ts +19 -0
  99. package/dist/components/ui/toast/toast.js +20 -0
  100. package/dist/components/ui/tooltip/index.d.ts +1 -0
  101. package/dist/components/ui/tooltip/index.js +1 -0
  102. package/dist/components/ui/tooltip/tooltip.d.ts +12 -0
  103. package/dist/components/ui/tooltip/tooltip.js +9 -0
  104. package/dist/index.d.ts +29 -0
  105. package/dist/index.js +31 -0
  106. package/dist/lib/color.d.ts +16 -0
  107. package/dist/lib/color.js +118 -0
  108. package/dist/lib/utils.d.ts +7 -0
  109. package/dist/lib/utils.js +5 -0
  110. package/dist/styles/base.css +212 -0
  111. package/dist/styles/theme.css +121 -0
  112. package/dist/styles.css +5 -0
  113. package/package.json +203 -4
@@ -0,0 +1,16 @@
1
+ export type ThemeMode = "light" | "dark";
2
+ export interface AccentVars {
3
+ "--primary": string;
4
+ "--primary-foreground": string;
5
+ "--primary-hover": string;
6
+ "--primary-active": string;
7
+ "--primary-soft": string;
8
+ "--primary-soft-foreground": string;
9
+ "--ring": string;
10
+ }
11
+ /**
12
+ * Generate accent/primary CSS variables from a single color.
13
+ * Apply the returned vars on `[data-ui="kit"]` (or a wrapper) to change accent.
14
+ */
15
+ export declare function generateAccentVars(accent: string, mode?: ThemeMode): AccentVars;
16
+ export declare function accentStyle(accent: string, mode?: ThemeMode): React.CSSProperties;
@@ -0,0 +1,118 @@
1
+ function clamp(n, min = 0, max = 1) {
2
+ return Math.min(max, Math.max(min, n));
3
+ }
4
+ function hexToRgb(hex) {
5
+ const h = hex.replace("#", "").trim();
6
+ const v = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
7
+ if (!/^[0-9a-fA-F]{6}$/.test(v))
8
+ throw new Error(`Invalid hex color: ${hex}`);
9
+ const n = parseInt(v, 16);
10
+ return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255 };
11
+ }
12
+ function rgbToHex(r, g, b) {
13
+ const to = (x) => Math.round(x).toString(16).padStart(2, "0");
14
+ return `#${to(r)}${to(g)}${to(b)}`;
15
+ }
16
+ function rgbToHsl(r, g, b) {
17
+ r /= 255;
18
+ g /= 255;
19
+ b /= 255;
20
+ const max = Math.max(r, g, b), min = Math.min(r, g, b);
21
+ let h = 0, s = 0;
22
+ const l = (max + min) / 2;
23
+ if (max !== min) {
24
+ const d = max - min;
25
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
26
+ switch (max) {
27
+ case r:
28
+ h = (g - b) / d + (g < b ? 6 : 0);
29
+ break;
30
+ case g:
31
+ h = (b - r) / d + 2;
32
+ break;
33
+ case b:
34
+ h = (r - g) / d + 4;
35
+ break;
36
+ }
37
+ h /= 6;
38
+ }
39
+ return { h: h * 360, s, l };
40
+ }
41
+ function hslToRgb(h, s, l) {
42
+ h = ((h % 360) + 360) % 360;
43
+ h /= 360;
44
+ let r, g, b;
45
+ if (s === 0) {
46
+ r = g = b = l;
47
+ }
48
+ else {
49
+ const hue2rgb = (p, q, t) => {
50
+ if (t < 0)
51
+ t += 1;
52
+ if (t > 1)
53
+ t -= 1;
54
+ if (t < 1 / 6)
55
+ return p + (q - p) * 6 * t;
56
+ if (t < 1 / 2)
57
+ return q;
58
+ if (t < 2 / 3)
59
+ return p + (q - p) * (2 / 3 - t) * 6;
60
+ return p;
61
+ };
62
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
63
+ const p = 2 * l - q;
64
+ r = hue2rgb(p, q, h + 1 / 3);
65
+ g = hue2rgb(p, q, h);
66
+ b = hue2rgb(p, q, h - 1 / 3);
67
+ }
68
+ return { r: Math.round(r * 255), g: Math.round(g * 255), b: Math.round(b * 255) };
69
+ }
70
+ function hslToHex(h, s, l) {
71
+ const { r, g, b } = hslToRgb(h, s, l);
72
+ return rgbToHex(r, g, b);
73
+ }
74
+ function relativeLuminance(hex) {
75
+ const { r, g, b } = hexToRgb(hex);
76
+ const f = (c) => {
77
+ const s = c / 255;
78
+ return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
79
+ };
80
+ return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
81
+ }
82
+ function contrastText(bg) {
83
+ return relativeLuminance(bg) > 0.45 ? "#111827" : "#ffffff";
84
+ }
85
+ /**
86
+ * Generate accent/primary CSS variables from a single color.
87
+ * Apply the returned vars on `[data-ui="kit"]` (or a wrapper) to change accent.
88
+ */
89
+ export function generateAccentVars(accent, mode = "light") {
90
+ const { r, g, b } = hexToRgb(accent);
91
+ const { h, s } = rgbToHsl(r, g, b);
92
+ const sat = clamp(s, 0.35, 1);
93
+ if (mode === "dark") {
94
+ const primary = hslToHex(h, sat, 0.62);
95
+ return {
96
+ "--primary": primary,
97
+ "--primary-foreground": contrastText(primary),
98
+ "--primary-hover": hslToHex(h, sat, 0.68),
99
+ "--primary-active": hslToHex(h, sat, 0.56),
100
+ "--primary-soft": hslToHex(h, clamp(sat - 0.15, 0.2, 1), 0.22),
101
+ "--primary-soft-foreground": hslToHex(h, clamp(sat - 0.05, 0.2, 1), 0.82),
102
+ "--ring": hslToHex(h, sat, 0.62),
103
+ };
104
+ }
105
+ const primary = hslToHex(h, sat, 0.48);
106
+ return {
107
+ "--primary": primary,
108
+ "--primary-foreground": contrastText(primary),
109
+ "--primary-hover": hslToHex(h, sat, 0.42),
110
+ "--primary-active": hslToHex(h, sat, 0.38),
111
+ "--primary-soft": hslToHex(h, clamp(sat - 0.1, 0.15, 1), 0.94),
112
+ "--primary-soft-foreground": hslToHex(h, sat, 0.3),
113
+ "--ring": hslToHex(h, sat, 0.48),
114
+ };
115
+ }
116
+ export function accentStyle(accent, mode = "light") {
117
+ return generateAccentVars(accent, mode);
118
+ }
@@ -0,0 +1,7 @@
1
+ import type * as React from "react";
2
+ import { type ClassValue } from "clsx";
3
+ export declare function cn(...inputs: ClassValue[]): string;
4
+ export type IconComponent = React.ComponentType<{
5
+ size?: number;
6
+ className?: string;
7
+ }>;
@@ -0,0 +1,5 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
@@ -0,0 +1,212 @@
1
+ /*
2
+ * Shared structural layer — solid, clean, flat, modern.
3
+ * Tokens are defined in theme.css.
4
+ */
5
+
6
+ @import "tailwindcss";
7
+ @import "tw-animate-css";
8
+
9
+ @custom-variant dark (&:where(.dark, .dark *));
10
+
11
+ @theme {
12
+ /* Directional light: bright top edge, soft bottom shade. */
13
+ --light-top: color-mix(in srgb, #ffffff 75%, transparent);
14
+ --light-top-soft: color-mix(in srgb, #ffffff 40%, transparent);
15
+ --light-bottom: color-mix(in srgb, #000000 8%, transparent);
16
+ --light-sheen: color-mix(in srgb, #ffffff 55%, transparent);
17
+ --light-sheen-soft: color-mix(in srgb, #ffffff 22%, transparent);
18
+ --light-side: color-mix(in srgb, #ffffff 26%, transparent);
19
+ --light-rim: color-mix(in srgb, #ffffff 60%, transparent);
20
+ }
21
+
22
+ @theme inline {
23
+ --color-background: var(--background);
24
+ --color-foreground: var(--foreground);
25
+ --color-card: var(--card);
26
+ --color-card-foreground: var(--card-foreground);
27
+ --color-popover: var(--popover);
28
+ --color-popover-foreground: var(--popover-foreground);
29
+ --color-primary: var(--primary);
30
+ --color-primary-foreground: var(--primary-foreground);
31
+ --color-primary-hover: var(--primary-hover);
32
+ --color-primary-active: var(--primary-active);
33
+ --color-primary-soft: var(--primary-soft);
34
+ --color-primary-soft-foreground: var(--primary-soft-foreground);
35
+ --color-secondary: var(--secondary);
36
+ --color-secondary-foreground: var(--secondary-foreground);
37
+ --color-muted: var(--muted);
38
+ --color-muted-foreground: var(--muted-foreground);
39
+ --color-accent: var(--accent);
40
+ --color-accent-foreground: var(--accent-foreground);
41
+ --color-destructive: var(--destructive);
42
+ --color-destructive-foreground: var(--destructive-foreground);
43
+ --color-success: var(--success);
44
+ --color-success-foreground: var(--success-foreground);
45
+ --color-warning: var(--warning);
46
+ --color-warning-foreground: var(--warning-foreground);
47
+ --color-info: var(--info);
48
+ --color-info-foreground: var(--info-foreground);
49
+ --color-border: var(--border);
50
+ --color-input: var(--input);
51
+ --color-ring: var(--ring);
52
+ --color-surface: var(--surface);
53
+ --color-surface-hover: var(--surface-hover);
54
+ --color-field: var(--field);
55
+ --color-field-hover: var(--field-hover);
56
+ --color-field-foreground: var(--field-foreground);
57
+ --color-overlay: var(--overlay);
58
+
59
+ --radius-sm: calc(var(--radius-control) - 2px);
60
+ --radius-md: var(--radius-control);
61
+ --radius-lg: var(--radius-card);
62
+ --radius-xl: calc(var(--radius-card) + 4px);
63
+ --radius-control: 0.75rem;
64
+ --radius-card: 1.25rem;
65
+ --radius-overlay: 1.25rem;
66
+ --radius-field: 0.75rem;
67
+ --radius-pill: 9999px;
68
+
69
+ --font-sans: var(--font-body);
70
+ --font-mono: var(--font-mono-family);
71
+
72
+ --ease-out-ui: cubic-bezier(0.2, 0.8, 0.2, 1);
73
+ --duration-ui: 160ms;
74
+ --duration-ui-slow: 220ms;
75
+ }
76
+
77
+ @layer base {
78
+ * {
79
+ @apply border-border;
80
+ }
81
+
82
+ html {
83
+ -webkit-text-size-adjust: 100%;
84
+ }
85
+
86
+ body {
87
+ @apply bg-background text-foreground antialiased;
88
+ margin: 0;
89
+ font-family: var(--font-body);
90
+ font-feature-settings: "cv02", "cv03", "cv04", "cv11";
91
+ }
92
+
93
+ ::selection {
94
+ background: color-mix(in srgb, var(--primary) 24%, transparent);
95
+ color: var(--foreground);
96
+ }
97
+
98
+ a,
99
+ button {
100
+ -webkit-tap-highlight-color: transparent;
101
+ }
102
+
103
+ :focus-visible {
104
+ outline: 2px solid var(--ring);
105
+ outline-offset: 2px;
106
+ }
107
+ }
108
+
109
+ @media (prefers-reduced-motion: reduce) {
110
+ *,
111
+ *::before,
112
+ *::after {
113
+ animation-duration: 0.01ms !important;
114
+ animation-iteration-count: 1 !important;
115
+ transition-duration: 0.01ms !important;
116
+ scroll-behavior: auto !important;
117
+ }
118
+ }
119
+
120
+ @utility scrollbar-none {
121
+ scrollbar-width: none;
122
+ -ms-overflow-style: none;
123
+ &::-webkit-scrollbar {
124
+ display: none;
125
+ }
126
+ }
127
+
128
+ /* Solid surface with a curved, top-lit look.
129
+ * The rim is strongest on the top edge (as if light grazes it), with a faint
130
+ * glass edge all around and a barely-there vertical gradient for convexity.
131
+ * Uses a pseudo-element so it never fights the element's outer shadow. */
132
+ @utility surface-curved {
133
+ background-image:
134
+ linear-gradient(
135
+ to bottom,
136
+ var(--light-sheen-soft) 0%,
137
+ transparent 28%,
138
+ transparent 72%,
139
+ var(--light-bottom) 100%
140
+ );
141
+ &::before {
142
+ content: "";
143
+ position: absolute;
144
+ inset: 0;
145
+ border-radius: inherit;
146
+ pointer-events: none;
147
+ box-shadow:
148
+ inset 0 1px 0 0 var(--light-top),
149
+ inset 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent),
150
+ inset 0 -1px 0 0 color-mix(in srgb, #000000 6%, transparent);
151
+ }
152
+ }
153
+
154
+ /* Softer variant for tonal fills (secondary buttons, tabs, alerts, tracks). */
155
+ @utility surface-curved-soft {
156
+ background-image: linear-gradient(
157
+ to bottom,
158
+ var(--light-sheen-soft) 0%,
159
+ transparent 36%,
160
+ transparent 100%
161
+ );
162
+ &::before {
163
+ content: "";
164
+ position: absolute;
165
+ inset: 0;
166
+ border-radius: inherit;
167
+ pointer-events: none;
168
+ box-shadow:
169
+ inset 0 1px 0 0 var(--light-top-soft),
170
+ inset 0 0 0 1px color-mix(in srgb, #ffffff 5%, transparent),
171
+ inset 0 -1px 0 0 color-mix(in srgb, #000000 4%, transparent);
172
+ }
173
+ }
174
+
175
+ /* Glassy pill edge highlight (switch thumb, segmented pills). */
176
+ @utility surface-curved-pill {
177
+ background-image: linear-gradient(
178
+ to bottom,
179
+ var(--light-sheen) 0%,
180
+ transparent 58%
181
+ );
182
+ &::before {
183
+ content: "";
184
+ position: absolute;
185
+ inset: 0;
186
+ border-radius: inherit;
187
+ pointer-events: none;
188
+ box-shadow:
189
+ inset 0 1px 0 0 var(--light-rim),
190
+ inset 0 0 0 1px color-mix(in srgb, #ffffff 12%, transparent),
191
+ inset 0 -1px 0 0 color-mix(in srgb, #000000 10%, transparent);
192
+ }
193
+ }
194
+
195
+ /* Inset version for native form controls (cannot use ::before). */
196
+ @utility surface-inset {
197
+ background-image: linear-gradient(
198
+ to bottom,
199
+ var(--light-sheen-soft) 0%,
200
+ transparent 38%,
201
+ transparent 100%
202
+ );
203
+ box-shadow:
204
+ inset 0 1px 0 0 var(--light-top-soft),
205
+ inset 0 0 0 1px color-mix(in srgb, #ffffff 5%, transparent),
206
+ inset 0 -1px 0 0 color-mix(in srgb, #000000 4%, transparent);
207
+ }
208
+
209
+ @utility surface-flat {
210
+ background-image: none;
211
+ box-shadow: none;
212
+ }
@@ -0,0 +1,121 @@
1
+ /* Modern, borderless, solid-surface theme.
2
+ * Depth comes from tonal surface steps + soft shadows, not outlined boxes.
3
+ * Accent is customizable: override --primary* / --ring (see generateAccentVars in lib/color).
4
+ */
5
+
6
+ :root,
7
+ [data-ui="kit"] {
8
+ color-scheme: light;
9
+
10
+ /* Tonal surface ladder (solid fills) */
11
+ --background: #f3f4f8;
12
+ --foreground: #16181d;
13
+ --card: #ffffff;
14
+ --card-foreground: #16181d;
15
+ --popover: #ffffff;
16
+ --popover-foreground: #16181d;
17
+ --surface: #eceef4;
18
+ --surface-hover: #e2e5ee;
19
+ --field: #eceef4; /* borderless input/control fill */
20
+ --field-hover: #e5e8f0;
21
+ --field-foreground: #16181d;
22
+ --secondary: #eceef4;
23
+ --secondary-foreground: #16181d;
24
+ --muted: #eceef4;
25
+ --muted-foreground: #63697a;
26
+ --accent: #e8eaf6;
27
+ --accent-foreground: #1e2230;
28
+
29
+ /* Vibrant default accent (indigo). Override via generateAccentVars / --primary*. */
30
+ --primary: #4f46e5;
31
+ --primary-foreground: #ffffff;
32
+ --primary-hover: #4338ca;
33
+ --primary-active: #3730a3;
34
+ --primary-soft: #e8e9ff;
35
+ --primary-soft-foreground: #3730a3;
36
+ --ring: #4f46e5;
37
+
38
+ --destructive: #dc2626;
39
+ --destructive-foreground: #ffffff;
40
+ --success: #16a34a;
41
+ --success-foreground: #ffffff;
42
+ --warning: #d97706;
43
+ --warning-foreground: #ffffff;
44
+ --info: #0284c7;
45
+ --info-foreground: #ffffff;
46
+
47
+ /* Hairline only where a border is still necessary (rare) */
48
+ --border: #171a2110;
49
+ --input: #171a2110;
50
+ --overlay: rgb(12 14 20 / 0.5);
51
+
52
+ --radius-control: 0.75rem; /* 12px */
53
+ --radius-card: 1.25rem; /* 20px */
54
+ --radius-overlay: 1.25rem;
55
+ --radius-field: 0.75rem;
56
+
57
+ --shadow-overlay: 0 16px 48px -12px rgb(16 18 26 / 0.22), 0 4px 14px -4px rgb(16 18 26 / 0.1);
58
+ --shadow-raised: 0 2px 6px -2px rgb(16 18 26 / 0.12), 0 8px 24px -12px rgb(16 18 26 / 0.16);
59
+ --shadow-soft: 0 1px 2px rgb(16 18 26 / 0.04), 0 6px 20px -10px rgb(16 18 26 / 0.14);
60
+
61
+ --font-body: "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
62
+ --font-mono-family: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, monospace;
63
+ }
64
+
65
+ [data-ui="kit"].dark,
66
+ .dark [data-ui="kit"],
67
+ .dark:where([data-ui="kit"]) {
68
+ color-scheme: dark;
69
+
70
+ /* Light behaves differently on dark solids: cool rim, no milky wash. */
71
+ --light-top: color-mix(in srgb, #c7d2fe 26%, transparent);
72
+ --light-top-soft: color-mix(in srgb, #e2e8f0 16%, transparent);
73
+ --light-bottom: color-mix(in srgb, #000000 34%, transparent);
74
+ --light-sheen: color-mix(in srgb, #ffffff 9%, transparent);
75
+ --light-sheen-soft: color-mix(in srgb, #ffffff 4%, transparent);
76
+ --light-side: color-mix(in srgb, #ffffff 8%, transparent);
77
+ --light-rim: color-mix(in srgb, #ffffff 20%, transparent);
78
+
79
+ --background: #0d0f15;
80
+ --foreground: #f1f3f8;
81
+ --card: #171a22;
82
+ --card-foreground: #f1f3f8;
83
+ --popover: #1b1f29;
84
+ --popover-foreground: #f1f3f8;
85
+ --surface: #1c2029;
86
+ --surface-hover: #252a35;
87
+ --field: #1c2029;
88
+ --field-hover: #252a35;
89
+ --field-foreground: #f1f3f8;
90
+ --secondary: #1c2029;
91
+ --secondary-foreground: #f1f3f8;
92
+ --muted: #1c2029;
93
+ --muted-foreground: #9ba3b4;
94
+ --accent: #232840;
95
+ --accent-foreground: #f1f3f8;
96
+
97
+ --primary: #818cf8;
98
+ --primary-foreground: #111322;
99
+ --primary-hover: #a5b4fc;
100
+ --primary-active: #6366f1;
101
+ --primary-soft: #24244a;
102
+ --primary-soft-foreground: #c7d2fe;
103
+ --ring: #818cf8;
104
+
105
+ --destructive: #f87171;
106
+ --destructive-foreground: #160b0b;
107
+ --success: #4ade80;
108
+ --success-foreground: #06140b;
109
+ --warning: #fbbf24;
110
+ --warning-foreground: #171004;
111
+ --info: #38bdf8;
112
+ --info-foreground: #04141d;
113
+
114
+ --border: #ffffff14;
115
+ --input: #ffffff14;
116
+ --overlay: rgb(0 0 0 / 0.64);
117
+
118
+ --shadow-overlay: 0 20px 60px -12px rgb(0 0 0 / 0.6), 0 6px 20px -6px rgb(0 0 0 / 0.4);
119
+ --shadow-raised: 0 2px 8px -2px rgb(0 0 0 / 0.4), 0 10px 30px -12px rgb(0 0 0 / 0.5);
120
+ --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -14px rgb(0 0 0 / 0.5);
121
+ }
@@ -0,0 +1,5 @@
1
+ @import "./styles/base.css";
2
+ @import "./styles/theme.css";
3
+
4
+ /* Scan the kit's own components when the published stylesheet is imported. */
5
+ @source "./components";