@hilum/ui 2.0.0 → 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/index.d.ts +350 -290
- package/dist/index.js +489 -435
- package/dist/index.js.map +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/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",
|
|
@@ -16,35 +16,35 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
|
|
|
16
16
|
months: "flex flex-col sm:flex-row gap-4",
|
|
17
17
|
month: "flex flex-col gap-4",
|
|
18
18
|
month_caption: "flex justify-center pt-1 relative items-center px-10",
|
|
19
|
-
caption_label: "body font-semibold text-
|
|
19
|
+
caption_label: "body font-semibold text-foreground",
|
|
20
20
|
nav: "flex items-center justify-between absolute inset-x-0 top-1",
|
|
21
21
|
button_previous: cn(
|
|
22
22
|
"absolute left-0 h-7 w-7 flex items-center justify-center rounded-md",
|
|
23
|
-
"text-
|
|
23
|
+
"text-muted-foreground hover:bg-muted hover:text-muted-foreground transition-colors",
|
|
24
24
|
),
|
|
25
25
|
button_next: cn(
|
|
26
26
|
"absolute right-0 h-7 w-7 flex items-center justify-center rounded-md",
|
|
27
|
-
"text-
|
|
27
|
+
"text-muted-foreground hover:bg-muted hover:text-muted-foreground transition-colors",
|
|
28
28
|
),
|
|
29
29
|
month_grid: "w-full border-collapse mt-1",
|
|
30
30
|
weekdays: "flex",
|
|
31
|
-
weekday: "w-9 h-9 flex items-center justify-center label text-
|
|
31
|
+
weekday: "w-9 h-9 flex items-center justify-center label text-muted-foreground font-normal",
|
|
32
32
|
week: "flex w-full mt-1",
|
|
33
33
|
day: "relative p-0 text-center",
|
|
34
34
|
day_button: cn(
|
|
35
35
|
"h-9 w-9 flex items-center justify-center rounded-full body font-normal",
|
|
36
|
-
"text-
|
|
36
|
+
"text-foreground hover:bg-muted transition-colors",
|
|
37
37
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
38
38
|
),
|
|
39
39
|
selected:
|
|
40
|
-
"[&>button]:bg-brand-primary [&>button]:text-
|
|
40
|
+
"[&>button]:bg-brand-primary [&>button]:text-background [&>button]:hover:bg-brand-primary/90",
|
|
41
41
|
today: "[&>button]:font-semibold [&>button]:text-brand-primary",
|
|
42
|
-
outside: "opacity-40 [&>button]:text-
|
|
42
|
+
outside: "opacity-40 [&>button]:text-muted-foreground",
|
|
43
43
|
disabled: "opacity-30 [&>button]:cursor-not-allowed",
|
|
44
|
-
range_start: "[&>button]:bg-brand-primary [&>button]:text-
|
|
45
|
-
range_end: "[&>button]:bg-brand-primary [&>button]:text-
|
|
44
|
+
range_start: "[&>button]:bg-brand-primary [&>button]:text-background [&>button]:rounded-full",
|
|
45
|
+
range_end: "[&>button]:bg-brand-primary [&>button]:text-background [&>button]:rounded-full",
|
|
46
46
|
range_middle:
|
|
47
|
-
"[&>button]:bg-brand-primary/15 [&>button]:text-
|
|
47
|
+
"[&>button]:bg-brand-primary/15 [&>button]:text-foreground [&>button]:rounded-none",
|
|
48
48
|
hidden: "invisible",
|
|
49
49
|
...classNames,
|
|
50
50
|
}}
|
|
@@ -21,15 +21,15 @@ function CardHeading({ title, description, actions, children, className }: CardH
|
|
|
21
21
|
return (
|
|
22
22
|
<div
|
|
23
23
|
className={cn(
|
|
24
|
-
"flex items-start justify-between gap-4 border-b border-
|
|
24
|
+
"flex items-start justify-between gap-4 border-b border-border px-5 py-4",
|
|
25
25
|
className,
|
|
26
26
|
)}
|
|
27
27
|
>
|
|
28
28
|
<div className="flex min-w-0 items-center gap-3">
|
|
29
29
|
{children}
|
|
30
30
|
<div className="min-w-0">
|
|
31
|
-
<p className="body font-semibold text-
|
|
32
|
-
{description && <p className="caption text-
|
|
31
|
+
<p className="body font-semibold text-foreground truncate">{title}</p>
|
|
32
|
+
{description && <p className="caption text-muted-foreground mt-0.5">{description}</p>}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
|
package/src/components/card.tsx
CHANGED
|
@@ -9,8 +9,8 @@ import { cn } from "../lib/utils";
|
|
|
9
9
|
const cardVariants = cva("rounded-xl", {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-
|
|
13
|
-
muted: "bg-
|
|
12
|
+
default: "bg-card shadow-natural",
|
|
13
|
+
muted: "bg-muted",
|
|
14
14
|
ghost: "bg-transparent",
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -54,7 +54,7 @@ const CardTitle = React.forwardRef<HTMLHeadingElement, React.ComponentProps<"h3"
|
|
|
54
54
|
<h3
|
|
55
55
|
ref={ref}
|
|
56
56
|
data-slot="card-title"
|
|
57
|
-
className={cn("subheading text-
|
|
57
|
+
className={cn("subheading text-foreground", className)}
|
|
58
58
|
{...props}
|
|
59
59
|
/>
|
|
60
60
|
),
|
|
@@ -66,7 +66,7 @@ const CardDescription = React.forwardRef<HTMLParagraphElement, React.ComponentPr
|
|
|
66
66
|
<p
|
|
67
67
|
ref={ref}
|
|
68
68
|
data-slot="card-description"
|
|
69
|
-
className={cn("caption text-
|
|
69
|
+
className={cn("caption text-muted-foreground", className)}
|
|
70
70
|
{...props}
|
|
71
71
|
/>
|
|
72
72
|
),
|
package/src/components/chart.tsx
CHANGED
|
@@ -6,12 +6,12 @@ import { cn } from "../lib/utils";
|
|
|
6
6
|
import { tokens } from "../tokens/tokens";
|
|
7
7
|
|
|
8
8
|
export const CHART_COLORS = {
|
|
9
|
-
primary: tokens.
|
|
10
|
-
secondary: tokens.semantic.light.success,
|
|
11
|
-
tertiary: tokens.
|
|
12
|
-
muted: tokens.
|
|
13
|
-
subtle: tokens.
|
|
14
|
-
dark: tokens.
|
|
9
|
+
primary: tokens.semantic.light.primary,
|
|
10
|
+
secondary: tokens.semantic.light.success,
|
|
11
|
+
tertiary: tokens.semantic.light.warning,
|
|
12
|
+
muted: tokens.semantic.light.mutedForeground,
|
|
13
|
+
subtle: tokens.semantic.light.border,
|
|
14
|
+
dark: tokens.semantic.light.foreground,
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
interface ChartContainerProps {
|
|
@@ -39,16 +39,16 @@ interface ChartTooltipProps extends Partial<TooltipContentProps<number, string>>
|
|
|
39
39
|
function ChartTooltip({ active, payload, label, labelClassName }: ChartTooltipProps) {
|
|
40
40
|
if (!active || !payload?.length) return null;
|
|
41
41
|
return (
|
|
42
|
-
<div className="rounded-xl border border-
|
|
43
|
-
{label && <p className={cn("mb-1 label text-
|
|
42
|
+
<div className="rounded-xl border border-border bg-card px-3 py-2 shadow-elevated">
|
|
43
|
+
{label && <p className={cn("mb-1 label text-muted-foreground", labelClassName)}>{label}</p>}
|
|
44
44
|
{payload.map((entry, i) => (
|
|
45
45
|
<div key={i} className="flex items-center gap-2">
|
|
46
46
|
<span
|
|
47
47
|
className="inline-block h-2 w-2 rounded-full"
|
|
48
48
|
style={{ backgroundColor: entry.color }}
|
|
49
49
|
/>
|
|
50
|
-
<span className="caption text-
|
|
51
|
-
<span className="caption font-medium text-
|
|
50
|
+
<span className="caption text-muted-foreground">{entry.name}:</span>
|
|
51
|
+
<span className="caption font-medium text-foreground">{entry.value}</span>
|
|
52
52
|
</div>
|
|
53
53
|
))}
|
|
54
54
|
</div>
|
|
@@ -12,7 +12,7 @@ const CheckboxRoot = React.forwardRef<
|
|
|
12
12
|
<Checkbox.Root
|
|
13
13
|
ref={ref}
|
|
14
14
|
className={cn(
|
|
15
|
-
"peer size-4 shrink-0 rounded border border-
|
|
15
|
+
"peer size-4 shrink-0 rounded border border-border bg-card transition-colors",
|
|
16
16
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
17
17
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
18
|
"data-[state=checked]:bg-brand-primary data-[state=checked]:border-brand-primary",
|
|
@@ -21,7 +21,7 @@ const CheckboxRoot = React.forwardRef<
|
|
|
21
21
|
)}
|
|
22
22
|
{...props}
|
|
23
23
|
>
|
|
24
|
-
<Checkbox.Indicator className="flex items-center justify-center text-
|
|
24
|
+
<Checkbox.Indicator className="flex items-center justify-center text-background">
|
|
25
25
|
{props.checked === "indeterminate" ? (
|
|
26
26
|
<Minus size={11} strokeWidth={3} />
|
|
27
27
|
) : (
|