@hilum/ui 1.0.1 → 2.0.1
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.
- package/README.md +2 -2
- package/dist/{chunk-ELL3JM3Z.js → chunk-H6JZQWX3.js} +59 -15
- package/dist/chunk-H6JZQWX3.js.map +1 -0
- package/dist/index.d.ts +350 -290
- package/dist/index.js +490 -436
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +42 -16
- package/dist/tokens.d.ts +33 -8
- package/dist/tokens.js +1 -1
- package/llms.txt +9 -9
- package/package.json +1 -1
- package/src/components/accordion.tsx +5 -5
- package/src/components/action-panel.tsx +8 -6
- package/src/components/activity-feed.tsx +7 -5
- package/src/components/alert-dialog.tsx +5 -5
- package/src/components/alert.tsx +5 -5
- package/src/components/avatar-stack.tsx +3 -3
- package/src/components/avatar.tsx +4 -4
- package/src/components/badge.tsx +7 -7
- package/src/components/breadcrumb.tsx +5 -6
- package/src/components/button-group.tsx +7 -4
- package/src/components/button.tsx +7 -7
- package/src/components/calendar.tsx +10 -10
- package/src/components/card-heading.tsx +3 -3
- package/src/components/card.tsx +4 -4
- package/src/components/chart.tsx +10 -10
- package/src/components/checkbox.tsx +2 -2
- package/src/components/color-input.tsx +7 -5
- package/src/components/color-picker.tsx +8 -6
- package/src/components/combobox.tsx +66 -31
- package/src/components/command-palette.tsx +13 -11
- package/src/components/command.tsx +14 -12
- package/src/components/context-menu.tsx +16 -16
- package/src/components/data-table.tsx +18 -7
- package/src/components/date-picker.tsx +2 -2
- package/src/components/description-list.tsx +10 -8
- package/src/components/dialog.tsx +4 -4
- package/src/components/drawer.tsx +5 -5
- package/src/components/dropdown-menu.tsx +16 -16
- package/src/components/empty-state.tsx +5 -3
- package/src/components/field.tsx +4 -4
- package/src/components/grid-list.tsx +17 -13
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-group.tsx +10 -10
- package/src/components/input-number.tsx +7 -7
- package/src/components/input-otp.tsx +3 -3
- package/src/components/input.tsx +4 -4
- package/src/components/kbd.tsx +1 -1
- package/src/components/label.tsx +1 -1
- package/src/components/media-object.tsx +2 -0
- package/src/components/menubar.tsx +21 -21
- package/src/components/native-select.tsx +5 -5
- package/src/components/navigation-menu.tsx +10 -10
- package/src/components/notification.tsx +13 -11
- package/src/components/page-heading.tsx +8 -8
- package/src/components/pagination.tsx +1 -1
- package/src/components/popover.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/property-row.tsx +3 -1
- package/src/components/radio-card.tsx +10 -8
- package/src/components/radio-group.tsx +4 -4
- package/src/components/resizable.tsx +3 -3
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/section-heading.tsx +3 -3
- package/src/components/select.tsx +13 -13
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +4 -4
- package/src/components/sidebar.tsx +20 -20
- package/src/components/skeleton.tsx +1 -1
- package/src/components/slider.tsx +2 -2
- package/src/components/sonner.tsx +9 -8
- package/src/components/stacked-list.tsx +5 -5
- package/src/components/stat-card.tsx +9 -7
- package/src/components/steps.tsx +16 -14
- package/src/components/switch.tsx +2 -2
- package/src/components/table.tsx +9 -9
- package/src/components/tabs.tsx +2 -2
- package/src/components/textarea.tsx +4 -4
- package/src/components/toggle.tsx +9 -9
- package/src/components/tooltip.tsx +1 -1
- package/src/tokens/tokens.ts +36 -9
- package/dist/chunk-ELL3JM3Z.js.map +0 -1
package/dist/tokens.css
CHANGED
|
@@ -120,21 +120,21 @@
|
|
|
120
120
|
|
|
121
121
|
@media (prefers-color-scheme: dark) {
|
|
122
122
|
:root:not([data-theme="light"]) {
|
|
123
|
-
--background: #
|
|
123
|
+
--background: #171717;
|
|
124
124
|
--foreground: #fafafa;
|
|
125
|
-
--card: #
|
|
125
|
+
--card: #262626;
|
|
126
126
|
--card-foreground: #fafafa;
|
|
127
|
-
--surface: #
|
|
127
|
+
--surface: #1a1a1a;
|
|
128
128
|
--surface-foreground: #f5f5f5;
|
|
129
|
-
--border: #
|
|
129
|
+
--border: #404040;
|
|
130
130
|
--input: #262626;
|
|
131
|
-
--muted: #
|
|
131
|
+
--muted: #262626;
|
|
132
132
|
--muted-foreground: #a3a3a3;
|
|
133
|
-
--accent: #
|
|
134
|
-
--accent-foreground: #
|
|
133
|
+
--accent: #404040;
|
|
134
|
+
--accent-foreground: #fafafa;
|
|
135
135
|
--primary: #c100f1;
|
|
136
136
|
--primary-foreground: #ffffff;
|
|
137
|
-
--secondary: #
|
|
137
|
+
--secondary: #262626;
|
|
138
138
|
--secondary-foreground: #f5f5f5;
|
|
139
139
|
--destructive: #ef4444;
|
|
140
140
|
--destructive-foreground: #ffffff;
|
|
@@ -147,21 +147,21 @@
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
[data-theme="dark"] {
|
|
150
|
-
--background: #
|
|
150
|
+
--background: #171717;
|
|
151
151
|
--foreground: #fafafa;
|
|
152
|
-
--card: #
|
|
152
|
+
--card: #262626;
|
|
153
153
|
--card-foreground: #fafafa;
|
|
154
|
-
--surface: #
|
|
154
|
+
--surface: #1a1a1a;
|
|
155
155
|
--surface-foreground: #f5f5f5;
|
|
156
|
-
--border: #
|
|
156
|
+
--border: #404040;
|
|
157
157
|
--input: #262626;
|
|
158
|
-
--muted: #
|
|
158
|
+
--muted: #262626;
|
|
159
159
|
--muted-foreground: #a3a3a3;
|
|
160
|
-
--accent: #
|
|
161
|
-
--accent-foreground: #
|
|
160
|
+
--accent: #404040;
|
|
161
|
+
--accent-foreground: #fafafa;
|
|
162
162
|
--primary: #c100f1;
|
|
163
163
|
--primary-foreground: #ffffff;
|
|
164
|
-
--secondary: #
|
|
164
|
+
--secondary: #262626;
|
|
165
165
|
--secondary-foreground: #f5f5f5;
|
|
166
166
|
--destructive: #ef4444;
|
|
167
167
|
--destructive-foreground: #ffffff;
|
|
@@ -172,6 +172,32 @@
|
|
|
172
172
|
--ring: #c100f1;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
[data-theme="mid"] {
|
|
176
|
+
--background: #737373;
|
|
177
|
+
--foreground: #fafafa;
|
|
178
|
+
--card: #525252;
|
|
179
|
+
--card-foreground: #fafafa;
|
|
180
|
+
--surface: #525252;
|
|
181
|
+
--surface-foreground: #fafafa;
|
|
182
|
+
--border: #a3a3a3;
|
|
183
|
+
--input: #404040;
|
|
184
|
+
--muted: #525252;
|
|
185
|
+
--muted-foreground: #e5e5e5;
|
|
186
|
+
--accent: #404040;
|
|
187
|
+
--accent-foreground: #fafafa;
|
|
188
|
+
--primary: #c100f1;
|
|
189
|
+
--primary-foreground: #ffffff;
|
|
190
|
+
--secondary: #525252;
|
|
191
|
+
--secondary-foreground: #fafafa;
|
|
192
|
+
--destructive: #ef4444;
|
|
193
|
+
--destructive-foreground: #ffffff;
|
|
194
|
+
--success: #CDEA19;
|
|
195
|
+
--success-foreground: #171717;
|
|
196
|
+
--warning: #fff5bf;
|
|
197
|
+
--warning-foreground: #171717;
|
|
198
|
+
--ring: #c100f1;
|
|
199
|
+
}
|
|
200
|
+
|
|
175
201
|
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *, .dark, .dark *));
|
|
176
202
|
|
|
177
203
|
@utility display-xl {
|
package/dist/tokens.d.ts
CHANGED
|
@@ -69,22 +69,47 @@ declare const tokens: {
|
|
|
69
69
|
readonly warningForeground: "#171717";
|
|
70
70
|
readonly ring: "#c100f1";
|
|
71
71
|
};
|
|
72
|
+
readonly mid: {
|
|
73
|
+
readonly background: "#737373";
|
|
74
|
+
readonly foreground: "#fafafa";
|
|
75
|
+
readonly card: "#525252";
|
|
76
|
+
readonly cardForeground: "#fafafa";
|
|
77
|
+
readonly surface: "#525252";
|
|
78
|
+
readonly surfaceForeground: "#fafafa";
|
|
79
|
+
readonly border: "#a3a3a3";
|
|
80
|
+
readonly input: "#404040";
|
|
81
|
+
readonly muted: "#525252";
|
|
82
|
+
readonly mutedForeground: "#e5e5e5";
|
|
83
|
+
readonly accent: "#404040";
|
|
84
|
+
readonly accentForeground: "#fafafa";
|
|
85
|
+
readonly primary: "#c100f1";
|
|
86
|
+
readonly primaryForeground: "#ffffff";
|
|
87
|
+
readonly secondary: "#525252";
|
|
88
|
+
readonly secondaryForeground: "#fafafa";
|
|
89
|
+
readonly destructive: "#ef4444";
|
|
90
|
+
readonly destructiveForeground: "#ffffff";
|
|
91
|
+
readonly success: "#CDEA19";
|
|
92
|
+
readonly successForeground: "#171717";
|
|
93
|
+
readonly warning: "#fff5bf";
|
|
94
|
+
readonly warningForeground: "#171717";
|
|
95
|
+
readonly ring: "#c100f1";
|
|
96
|
+
};
|
|
72
97
|
readonly dark: {
|
|
73
|
-
readonly background: "#
|
|
98
|
+
readonly background: "#171717";
|
|
74
99
|
readonly foreground: "#fafafa";
|
|
75
|
-
readonly card: "#
|
|
100
|
+
readonly card: "#262626";
|
|
76
101
|
readonly cardForeground: "#fafafa";
|
|
77
|
-
readonly surface: "#
|
|
102
|
+
readonly surface: "#1a1a1a";
|
|
78
103
|
readonly surfaceForeground: "#f5f5f5";
|
|
79
|
-
readonly border: "#
|
|
104
|
+
readonly border: "#404040";
|
|
80
105
|
readonly input: "#262626";
|
|
81
|
-
readonly muted: "#
|
|
106
|
+
readonly muted: "#262626";
|
|
82
107
|
readonly mutedForeground: "#a3a3a3";
|
|
83
|
-
readonly accent: "#
|
|
84
|
-
readonly accentForeground: "#
|
|
108
|
+
readonly accent: "#404040";
|
|
109
|
+
readonly accentForeground: "#fafafa";
|
|
85
110
|
readonly primary: "#c100f1";
|
|
86
111
|
readonly primaryForeground: "#ffffff";
|
|
87
|
-
readonly secondary: "#
|
|
112
|
+
readonly secondary: "#262626";
|
|
88
113
|
readonly secondaryForeground: "#f5f5f5";
|
|
89
114
|
readonly destructive: "#ef4444";
|
|
90
115
|
readonly destructiveForeground: "#ffffff";
|
package/dist/tokens.js
CHANGED
package/llms.txt
CHANGED
|
@@ -19,7 +19,7 @@ Peer dependencies: `react@^19`, `react-dom@^19`, `tailwindcss@^4`
|
|
|
19
19
|
@import "@hilum/ui/tokens.css";
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
That single import registers all design tokens as CSS custom properties and Tailwind v4 utilities (`bg-brand-primary`, `text-
|
|
22
|
+
That single import registers all design tokens as CSS custom properties and Tailwind v4 utilities (`bg-brand-primary`, `text-ground-900`, `shadow-natural`, etc.).
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -84,7 +84,7 @@ export function App() {
|
|
|
84
84
|
|
|
85
85
|
**Purple scale** (`bg-purple-{50..950}`): built from `#C100F1` anchor at 500
|
|
86
86
|
**Butter scale** (`bg-butter-{50..950}`): built from `#FFF5BF` anchor at 200
|
|
87
|
-
**
|
|
87
|
+
**Ground scale** (`bg-ground-{50..950}`): neutral spine for text, borders, structure
|
|
88
88
|
|
|
89
89
|
**Semantic CSS vars** (use in custom CSS, never raw hex):
|
|
90
90
|
- `--background`, `--foreground` — page bg/text
|
|
@@ -194,7 +194,7 @@ Props: `variant`.
|
|
|
194
194
|
|
|
195
195
|
### Input
|
|
196
196
|
|
|
197
|
-
Text input field. Styled with
|
|
197
|
+
Text input field. Styled with the ground palette and brand focus ring.
|
|
198
198
|
|
|
199
199
|
```tsx
|
|
200
200
|
import { Input } from "@hilum/ui"
|
|
@@ -467,7 +467,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }
|
|
|
467
467
|
<CardDescription className="body">Supporting text.</CardDescription>
|
|
468
468
|
</CardHeader>
|
|
469
469
|
<CardContent>
|
|
470
|
-
<p className="body text-
|
|
470
|
+
<p className="body text-ground-500">Content goes here.</p>
|
|
471
471
|
</CardContent>
|
|
472
472
|
<CardFooter>
|
|
473
473
|
<Button>Action</Button>
|
|
@@ -475,7 +475,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }
|
|
|
475
475
|
</Card>
|
|
476
476
|
```
|
|
477
477
|
|
|
478
|
-
Variants: `default` (white with natural shadow), `muted` (
|
|
478
|
+
Variants: `default` (white with natural shadow), `muted` (ground-50).
|
|
479
479
|
|
|
480
480
|
---
|
|
481
481
|
|
|
@@ -924,7 +924,7 @@ const config = {
|
|
|
924
924
|
|
|
925
925
|
<ChartContainer config={config} className="h-64">
|
|
926
926
|
<LineChart data={data}>
|
|
927
|
-
<CartesianGrid strokeDasharray="3 3" stroke="var(--color-
|
|
927
|
+
<CartesianGrid strokeDasharray="3 3" stroke="var(--color-ground-100)" />
|
|
928
928
|
<XAxis dataKey="month" />
|
|
929
929
|
<YAxis />
|
|
930
930
|
<ChartTooltip content={<ChartTooltipContent />} />
|
|
@@ -968,7 +968,7 @@ import { HoverCard, HoverCardTrigger, HoverCardContent } from "@hilum/ui"
|
|
|
968
968
|
</HoverCardTrigger>
|
|
969
969
|
<HoverCardContent>
|
|
970
970
|
<p className="body font-medium">Hilum Labs</p>
|
|
971
|
-
<p className="caption text-
|
|
971
|
+
<p className="caption text-ground-400">Building the future of education.</p>
|
|
972
972
|
</HoverCardContent>
|
|
973
973
|
</HoverCard>
|
|
974
974
|
```
|
|
@@ -1182,7 +1182,7 @@ Maintains a fixed aspect ratio for any child.
|
|
|
1182
1182
|
```tsx
|
|
1183
1183
|
import { AspectRatio } from "@hilum/ui"
|
|
1184
1184
|
|
|
1185
|
-
<AspectRatio ratio={16 / 9} className="bg-
|
|
1185
|
+
<AspectRatio ratio={16 / 9} className="bg-ground-100 rounded-xl overflow-hidden">
|
|
1186
1186
|
<img src="..." className="w-full h-full object-cover" />
|
|
1187
1187
|
</AspectRatio>
|
|
1188
1188
|
```
|
|
@@ -1241,7 +1241,7 @@ Input with leading/trailing addons (icons, buttons, text).
|
|
|
1241
1241
|
import { InputGroup, InputGroupAddon } from "@hilum/ui"
|
|
1242
1242
|
|
|
1243
1243
|
<InputGroup>
|
|
1244
|
-
<InputGroupAddon><Mail size={14} className="text-
|
|
1244
|
+
<InputGroupAddon><Mail size={14} className="text-ground-400" /></InputGroupAddon>
|
|
1245
1245
|
<Input placeholder="Email address" />
|
|
1246
1246
|
</InputGroup>
|
|
1247
1247
|
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ const AccordionRoot = React.forwardRef<
|
|
|
9
9
|
React.ComponentRef<typeof Accordion.Root>,
|
|
10
10
|
React.ComponentPropsWithoutRef<typeof Accordion.Root>
|
|
11
11
|
>(({ className, ...props }, ref) => (
|
|
12
|
-
<Accordion.Root ref={ref} className={cn("divide-y divide-
|
|
12
|
+
<Accordion.Root ref={ref} className={cn("divide-y divide-border", className)} {...props} />
|
|
13
13
|
));
|
|
14
14
|
AccordionRoot.displayName = "Accordion";
|
|
15
15
|
|
|
@@ -30,9 +30,9 @@ const AccordionTrigger = React.forwardRef<
|
|
|
30
30
|
ref={ref}
|
|
31
31
|
className={cn(
|
|
32
32
|
"flex w-full items-center justify-between py-4",
|
|
33
|
-
"body font-medium text-
|
|
33
|
+
"body font-medium text-foreground transition-colors hover:text-muted-foreground",
|
|
34
34
|
"[&[data-state=open]>svg]:rotate-180",
|
|
35
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
35
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/20",
|
|
36
36
|
className,
|
|
37
37
|
)}
|
|
38
38
|
{...props}
|
|
@@ -40,7 +40,7 @@ const AccordionTrigger = React.forwardRef<
|
|
|
40
40
|
{children}
|
|
41
41
|
<ChevronDown
|
|
42
42
|
size={16}
|
|
43
|
-
className="text-
|
|
43
|
+
className="text-muted-foreground transition-transform duration-200 shrink-0"
|
|
44
44
|
/>
|
|
45
45
|
</Accordion.Trigger>
|
|
46
46
|
</Accordion.Header>
|
|
@@ -54,7 +54,7 @@ const AccordionContent = React.forwardRef<
|
|
|
54
54
|
<Accordion.Content
|
|
55
55
|
ref={ref}
|
|
56
56
|
className={cn(
|
|
57
|
-
"overflow-hidden body text-
|
|
57
|
+
"overflow-hidden body text-muted-foreground",
|
|
58
58
|
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
59
59
|
className,
|
|
60
60
|
)}
|
|
@@ -48,7 +48,7 @@ function ActionPanel({
|
|
|
48
48
|
(link.href ? (
|
|
49
49
|
<a
|
|
50
50
|
href={link.href}
|
|
51
|
-
className="body font-medium text-
|
|
51
|
+
className="body font-medium text-muted-foreground hover:text-foreground transition-colors inline-flex items-center gap-1"
|
|
52
52
|
>
|
|
53
53
|
{link.label} <span aria-hidden>→</span>
|
|
54
54
|
</a>
|
|
@@ -56,7 +56,7 @@ function ActionPanel({
|
|
|
56
56
|
<button
|
|
57
57
|
type="button"
|
|
58
58
|
onClick={link.onClick}
|
|
59
|
-
className="body font-medium text-
|
|
59
|
+
className="body font-medium text-muted-foreground hover:text-foreground transition-colors inline-flex items-center gap-1"
|
|
60
60
|
>
|
|
61
61
|
{link.label} <span aria-hidden>→</span>
|
|
62
62
|
</button>
|
|
@@ -81,16 +81,16 @@ function ActionPanel({
|
|
|
81
81
|
className={cn(
|
|
82
82
|
"rounded-xl border px-5 py-5",
|
|
83
83
|
variant === "muted"
|
|
84
|
-
? "border-
|
|
85
|
-
: "border-
|
|
84
|
+
? "border-border bg-muted"
|
|
85
|
+
: "border-border bg-card shadow-natural",
|
|
86
86
|
layout === "inline" && "flex items-center justify-between gap-6",
|
|
87
87
|
className,
|
|
88
88
|
)}
|
|
89
89
|
>
|
|
90
90
|
<div className={cn("min-w-0", layout === "inline" ? "flex-1" : "")}>
|
|
91
|
-
<p className="body font-semibold text-
|
|
91
|
+
<p className="body font-semibold text-foreground">{title}</p>
|
|
92
92
|
{description && (
|
|
93
|
-
<p className={cn("body text-
|
|
93
|
+
<p className={cn("body text-muted-foreground", layout === "stacked" ? "mt-1" : "")}>
|
|
94
94
|
{description}
|
|
95
95
|
</p>
|
|
96
96
|
)}
|
|
@@ -109,4 +109,6 @@ function ActionPanel({
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
ActionPanel.displayName = "ActionPanel";
|
|
113
|
+
|
|
112
114
|
export { ActionPanel };
|
|
@@ -26,7 +26,7 @@ function ActivityFeed({ events, className }: ActivityFeedProps) {
|
|
|
26
26
|
<div className="relative pb-8">
|
|
27
27
|
{!isLast && (
|
|
28
28
|
<span
|
|
29
|
-
className="absolute top-4 left-4 -ml-px h-full w-0.5 bg-
|
|
29
|
+
className="absolute top-4 left-4 -ml-px h-full w-0.5 bg-muted"
|
|
30
30
|
aria-hidden="true"
|
|
31
31
|
/>
|
|
32
32
|
)}
|
|
@@ -35,8 +35,8 @@ function ActivityFeed({ events, className }: ActivityFeedProps) {
|
|
|
35
35
|
<div>
|
|
36
36
|
<span
|
|
37
37
|
className={cn(
|
|
38
|
-
"flex size-8 items-center justify-center rounded-full ring-8 ring-
|
|
39
|
-
event.iconBgClass ?? "bg-
|
|
38
|
+
"flex size-8 items-center justify-center rounded-full ring-8 ring-background",
|
|
39
|
+
event.iconBgClass ?? "bg-muted text-muted-foreground",
|
|
40
40
|
)}
|
|
41
41
|
>
|
|
42
42
|
{event.icon}
|
|
@@ -45,11 +45,11 @@ function ActivityFeed({ events, className }: ActivityFeedProps) {
|
|
|
45
45
|
|
|
46
46
|
{/* Content */}
|
|
47
47
|
<div className="flex min-w-0 flex-1 items-baseline justify-between gap-4 pt-1">
|
|
48
|
-
<div className="body text-
|
|
48
|
+
<div className="body text-muted-foreground">{event.content}</div>
|
|
49
49
|
{event.date && (
|
|
50
50
|
<time
|
|
51
51
|
dateTime={event.datetime ?? event.date}
|
|
52
|
-
className="caption whitespace-nowrap text-
|
|
52
|
+
className="caption whitespace-nowrap text-muted-foreground"
|
|
53
53
|
>
|
|
54
54
|
{event.date}
|
|
55
55
|
</time>
|
|
@@ -65,5 +65,7 @@ function ActivityFeed({ events, className }: ActivityFeedProps) {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
ActivityFeed.displayName = "ActivityFeed";
|
|
69
|
+
|
|
68
70
|
export { ActivityFeed };
|
|
69
71
|
export type { FeedEvent };
|
|
@@ -35,7 +35,7 @@ const AlertDialogContent = React.forwardRef<
|
|
|
35
35
|
ref={ref}
|
|
36
36
|
className={cn(
|
|
37
37
|
"fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]",
|
|
38
|
-
"w-full max-w-md bg-
|
|
38
|
+
"w-full max-w-md bg-card rounded-2xl shadow-elevated p-6",
|
|
39
39
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
40
40
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
41
41
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -65,7 +65,7 @@ const AlertDialogTitle = React.forwardRef<
|
|
|
65
65
|
>(({ className, ...props }, ref) => (
|
|
66
66
|
<AlertDialog.Title
|
|
67
67
|
ref={ref}
|
|
68
|
-
className={cn("body-lg font-semibold text-
|
|
68
|
+
className={cn("body-lg font-semibold text-foreground", className)}
|
|
69
69
|
{...props}
|
|
70
70
|
/>
|
|
71
71
|
));
|
|
@@ -75,7 +75,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
75
75
|
React.ComponentRef<typeof AlertDialog.Description>,
|
|
76
76
|
React.ComponentPropsWithoutRef<typeof AlertDialog.Description>
|
|
77
77
|
>(({ className, ...props }, ref) => (
|
|
78
|
-
<AlertDialog.Description ref={ref} className={cn("body text-
|
|
78
|
+
<AlertDialog.Description ref={ref} className={cn("body text-muted-foreground", className)} {...props} />
|
|
79
79
|
));
|
|
80
80
|
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
81
81
|
|
|
@@ -88,7 +88,7 @@ const AlertDialogAction = React.forwardRef<
|
|
|
88
88
|
className={cn(
|
|
89
89
|
"inline-flex h-9 items-center justify-center rounded-md px-4",
|
|
90
90
|
"body font-medium whitespace-nowrap transition-all duration-150",
|
|
91
|
-
"bg-brand-primary text-
|
|
91
|
+
"bg-brand-primary text-background hover:bg-brand-primary/90 active:bg-brand-primary/80",
|
|
92
92
|
"focus-visible:ring-2 focus-visible:ring-brand-primary/30 focus-visible:ring-offset-1 outline-none",
|
|
93
93
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
94
94
|
className,
|
|
@@ -107,7 +107,7 @@ const AlertDialogCancel = React.forwardRef<
|
|
|
107
107
|
className={cn(
|
|
108
108
|
"inline-flex h-9 items-center justify-center rounded-md px-4",
|
|
109
109
|
"body font-medium whitespace-nowrap transition-all duration-150",
|
|
110
|
-
"bg-
|
|
110
|
+
"bg-card text-muted-foreground shadow-natural hover:bg-muted rounded-xl",
|
|
111
111
|
"focus-visible:ring-2 focus-visible:ring-brand-primary/30 focus-visible:ring-offset-1 outline-none",
|
|
112
112
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
113
113
|
className,
|
package/src/components/alert.tsx
CHANGED
|
@@ -7,11 +7,11 @@ const alertVariants = cva(
|
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-
|
|
11
|
-
info: "bg-brand-secondary/40 text-
|
|
12
|
-
success: "bg-brand-secondary/15 text-
|
|
13
|
-
warning: "bg-brand-secondary/70 text-
|
|
14
|
-
destructive: "bg-
|
|
10
|
+
default: "bg-muted text-muted-foreground [&>svg]:text-muted-foreground",
|
|
11
|
+
info: "bg-brand-secondary/40 text-muted-foreground [&>svg]:text-muted-foreground",
|
|
12
|
+
success: "bg-brand-secondary/15 text-muted-foreground [&>svg]:text-muted-foreground",
|
|
13
|
+
warning: "bg-brand-secondary/70 text-muted-foreground [&>svg]:text-muted-foreground",
|
|
14
|
+
destructive: "bg-destructive/10 text-destructive [&>svg]:text-destructive/70",
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
defaultVariants: { variant: "default" },
|
|
@@ -33,7 +33,7 @@ function AvatarStack({ avatars, max, size = "md", className }: AvatarStackProps)
|
|
|
33
33
|
key={i}
|
|
34
34
|
title={avatar.name}
|
|
35
35
|
className={cn(
|
|
36
|
-
"relative inline-flex shrink-0 overflow-hidden rounded-full ring-
|
|
36
|
+
"relative inline-flex shrink-0 overflow-hidden rounded-full ring-background",
|
|
37
37
|
s.wrapper,
|
|
38
38
|
)}
|
|
39
39
|
>
|
|
@@ -44,7 +44,7 @@ function AvatarStack({ avatars, max, size = "md", className }: AvatarStackProps)
|
|
|
44
44
|
className={cn(
|
|
45
45
|
"flex size-full items-center justify-center font-medium",
|
|
46
46
|
s.text,
|
|
47
|
-
avatar.colorClass ?? "bg-
|
|
47
|
+
avatar.colorClass ?? "bg-muted text-muted-foreground",
|
|
48
48
|
)}
|
|
49
49
|
>
|
|
50
50
|
{avatar.fallback ?? avatar.name.slice(0, 2).toUpperCase()}
|
|
@@ -55,7 +55,7 @@ function AvatarStack({ avatars, max, size = "md", className }: AvatarStackProps)
|
|
|
55
55
|
{overflow > 0 && (
|
|
56
56
|
<span
|
|
57
57
|
className={cn(
|
|
58
|
-
"relative inline-flex shrink-0 items-center justify-center rounded-full ring-
|
|
58
|
+
"relative inline-flex shrink-0 items-center justify-center rounded-full ring-background bg-muted font-medium text-muted-foreground",
|
|
59
59
|
s.wrapper,
|
|
60
60
|
s.text,
|
|
61
61
|
)}
|
|
@@ -52,7 +52,7 @@ const AvatarFallback = React.forwardRef<
|
|
|
52
52
|
<AvatarPrimitive.Fallback
|
|
53
53
|
ref={ref}
|
|
54
54
|
className={cn(
|
|
55
|
-
"flex h-full w-full items-center justify-center rounded-full bg-
|
|
55
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted body font-semibold text-muted-foreground",
|
|
56
56
|
className,
|
|
57
57
|
)}
|
|
58
58
|
{...props}
|
|
@@ -62,8 +62,8 @@ AvatarFallback.displayName = "AvatarFallback";
|
|
|
62
62
|
|
|
63
63
|
const statusColorMap = {
|
|
64
64
|
online: "bg-brand-secondary",
|
|
65
|
-
offline: "bg-
|
|
66
|
-
busy: "bg-
|
|
65
|
+
offline: "bg-muted",
|
|
66
|
+
busy: "bg-destructive",
|
|
67
67
|
away: "bg-brand-secondary",
|
|
68
68
|
};
|
|
69
69
|
|
|
@@ -90,7 +90,7 @@ const AvatarWithStatus = React.forwardRef<
|
|
|
90
90
|
{status && (
|
|
91
91
|
<span
|
|
92
92
|
className={cn(
|
|
93
|
-
"absolute bottom-0 right-0 rounded-full ring-
|
|
93
|
+
"absolute bottom-0 right-0 rounded-full ring-background",
|
|
94
94
|
statusColorMap[status],
|
|
95
95
|
statusSizeMap[size],
|
|
96
96
|
)}
|
package/src/components/badge.tsx
CHANGED
|
@@ -7,13 +7,13 @@ const badgeVariants = cva(
|
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-
|
|
11
|
-
secondary: "bg-
|
|
12
|
-
outline: "border border-
|
|
13
|
-
brand: "bg-brand-primary text-
|
|
14
|
-
success: "bg-brand-secondary/20 text-
|
|
15
|
-
warning: "bg-brand-secondary/70 text-
|
|
16
|
-
destructive: "bg-
|
|
10
|
+
default: "bg-foreground text-background",
|
|
11
|
+
secondary: "bg-muted text-muted-foreground",
|
|
12
|
+
outline: "border border-border text-muted-foreground bg-transparent",
|
|
13
|
+
brand: "bg-brand-primary text-background",
|
|
14
|
+
success: "bg-brand-secondary/20 text-muted-foreground border border-brand-secondary/50",
|
|
15
|
+
warning: "bg-brand-secondary/70 text-muted-foreground border border-brand-secondary",
|
|
16
|
+
destructive: "bg-destructive/10 text-destructive border border-destructive/20",
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
defaultVariants: {
|
|
@@ -12,7 +12,7 @@ const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentProps<"
|
|
|
12
12
|
({ className, ...props }, ref) => (
|
|
13
13
|
<ol
|
|
14
14
|
ref={ref}
|
|
15
|
-
className={cn("flex flex-wrap items-center gap-1.5 body text-
|
|
15
|
+
className={cn("flex flex-wrap items-center gap-1.5 body text-muted-foreground", className)}
|
|
16
16
|
{...props}
|
|
17
17
|
/>
|
|
18
18
|
),
|
|
@@ -28,7 +28,7 @@ BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
|
28
28
|
|
|
29
29
|
const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.ComponentProps<"a">>(
|
|
30
30
|
({ className, ...props }, ref) => (
|
|
31
|
-
<a ref={ref} className={cn("transition-colors hover:text-
|
|
31
|
+
<a ref={ref} className={cn("transition-colors hover:text-foreground", className)} {...props} />
|
|
32
32
|
),
|
|
33
33
|
);
|
|
34
34
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
@@ -37,9 +37,8 @@ const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentProps<"s
|
|
|
37
37
|
({ className, ...props }, ref) => (
|
|
38
38
|
<span
|
|
39
39
|
ref={ref}
|
|
40
|
-
role="link"
|
|
41
40
|
aria-current="page"
|
|
42
|
-
className={cn("body font-medium text-
|
|
41
|
+
className={cn("body font-medium text-foreground", className)}
|
|
43
42
|
{...props}
|
|
44
43
|
/>
|
|
45
44
|
),
|
|
@@ -47,7 +46,7 @@ const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentProps<"s
|
|
|
47
46
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
48
47
|
|
|
49
48
|
const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
|
|
50
|
-
<li role="presentation" aria-hidden="true" className={cn("text-
|
|
49
|
+
<li role="presentation" aria-hidden="true" className={cn("text-muted-foreground", className)} {...props}>
|
|
51
50
|
{children ?? <ChevronRight size={14} />}
|
|
52
51
|
</li>
|
|
53
52
|
);
|
|
@@ -60,7 +59,7 @@ const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<"span"
|
|
|
60
59
|
className={cn("flex size-5 items-center justify-center", className)}
|
|
61
60
|
{...props}
|
|
62
61
|
>
|
|
63
|
-
<MoreHorizontal size={14} className="text-
|
|
62
|
+
<MoreHorizontal size={14} className="text-muted-foreground" />
|
|
64
63
|
</span>
|
|
65
64
|
);
|
|
66
65
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
@@ -10,7 +10,7 @@ function ButtonGroup({ children, className }: ButtonGroupProps) {
|
|
|
10
10
|
return (
|
|
11
11
|
<div
|
|
12
12
|
className={cn(
|
|
13
|
-
"inline-flex divide-x divide-
|
|
13
|
+
"inline-flex divide-x divide-border overflow-hidden rounded-lg border border-border bg-card shadow-natural",
|
|
14
14
|
className,
|
|
15
15
|
)}
|
|
16
16
|
>
|
|
@@ -29,10 +29,10 @@ function ButtonGroupItem({ active, className, children, ...props }: ButtonGroupI
|
|
|
29
29
|
type="button"
|
|
30
30
|
className={cn(
|
|
31
31
|
"relative inline-flex items-center gap-1.5 px-3.5 py-2 body font-medium transition-colors",
|
|
32
|
-
"focus:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
32
|
+
"focus:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:ring-inset",
|
|
33
33
|
active
|
|
34
|
-
? "bg-
|
|
35
|
-
: "text-
|
|
34
|
+
? "bg-foreground text-background"
|
|
35
|
+
: "text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
36
36
|
className,
|
|
37
37
|
)}
|
|
38
38
|
{...props}
|
|
@@ -42,4 +42,7 @@ function ButtonGroupItem({ active, className, children, ...props }: ButtonGroupI
|
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
46
|
+
ButtonGroupItem.displayName = "ButtonGroupItem";
|
|
47
|
+
|
|
45
48
|
export { ButtonGroup, ButtonGroupItem };
|
|
@@ -15,14 +15,14 @@ const buttonVariants = cva(
|
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
variant: {
|
|
18
|
-
default: "bg-brand-primary text-
|
|
19
|
-
destructive: "bg-
|
|
20
|
-
outline: "bg-
|
|
21
|
-
secondary: "bg-
|
|
18
|
+
default: "bg-brand-primary text-background hover:bg-brand-primary/90 active:bg-brand-primary/80",
|
|
19
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80",
|
|
20
|
+
outline: "bg-card text-muted-foreground shadow-natural hover:bg-muted rounded-xl",
|
|
21
|
+
secondary: "bg-muted text-muted-foreground hover:bg-muted",
|
|
22
22
|
brand:
|
|
23
|
-
"bg-brand-secondary text-
|
|
24
|
-
ghost: "text-
|
|
25
|
-
link: "text-
|
|
23
|
+
"bg-brand-secondary text-foreground hover:bg-brand-secondary/90 active:bg-brand-secondary/80",
|
|
24
|
+
ghost: "text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
25
|
+
link: "text-foreground underline-offset-4 hover:underline",
|
|
26
26
|
},
|
|
27
27
|
size: {
|
|
28
28
|
default: "h-9 px-4 py-2 rounded-md",
|