@hilum/ui 0.1.2 → 0.1.3
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 +23 -4
- package/dist/chunk-J2QQDUF4.js +204 -0
- package/dist/chunk-J2QQDUF4.js.map +1 -0
- package/dist/create-theme.d.ts +27 -0
- package/dist/create-theme.js +172 -0
- package/dist/create-theme.js.map +1 -0
- package/dist/index.d.ts +21 -8
- package/dist/index.js +393 -381
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +59 -50
- package/dist/tokens.d.ts +46 -38
- package/dist/tokens.js +1 -191
- package/dist/tokens.js.map +1 -1
- package/llms.txt +1514 -0
- package/package.json +8 -3
- package/src/components/accordion.tsx +5 -5
- package/src/components/action-panel.tsx +6 -6
- package/src/components/activity-feed.tsx +4 -4
- package/src/components/alert-dialog.tsx +3 -3
- package/src/components/alert.tsx +4 -4
- package/src/components/avatar-stack.tsx +2 -2
- package/src/components/avatar.tsx +2 -2
- package/src/components/badge.tsx +6 -5
- package/src/components/breadcrumb.tsx +5 -5
- package/src/components/button-group.tsx +4 -4
- package/src/components/button.tsx +6 -5
- package/src/components/calendar.tsx +7 -7
- package/src/components/card-heading.tsx +3 -3
- package/src/components/card.tsx +3 -3
- package/src/components/chart.tsx +11 -11
- package/src/components/checkbox.tsx +1 -1
- package/src/components/color-input.tsx +7 -7
- package/src/components/color-picker.tsx +5 -5
- package/src/components/combobox.tsx +10 -10
- package/src/components/command-palette.tsx +11 -11
- package/src/components/command.tsx +13 -13
- package/src/components/context-menu.tsx +15 -16
- package/src/components/data-table.tsx +6 -6
- package/src/components/date-picker.tsx +9 -4
- package/src/components/description-list.tsx +8 -8
- package/src/components/dialog.tsx +3 -3
- package/src/components/drawer.tsx +5 -5
- package/src/components/dropdown-menu.tsx +15 -16
- package/src/components/empty-state.tsx +3 -3
- package/src/components/field.tsx +13 -6
- package/src/components/grid-list.tsx +12 -12
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-group.tsx +8 -8
- package/src/components/input-number.tsx +7 -7
- package/src/components/input-otp.tsx +3 -3
- package/src/components/input.tsx +5 -4
- package/src/components/kbd.tsx +1 -1
- package/src/components/label.tsx +1 -1
- package/src/components/menubar.tsx +21 -22
- package/src/components/native-select.tsx +4 -4
- package/src/components/navigation-menu.tsx +10 -10
- package/src/components/notification.tsx +10 -10
- package/src/components/page-heading.tsx +8 -8
- package/src/components/pagination.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/property-row.tsx +1 -1
- package/src/components/radio-card.tsx +6 -6
- package/src/components/radio-group.tsx +3 -3
- 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 +11 -11
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +3 -3
- package/src/components/sidebar.tsx +19 -19
- package/src/components/skeleton.tsx +1 -1
- package/src/components/slider.tsx +1 -1
- package/src/components/sonner.tsx +5 -5
- package/src/components/stacked-list.tsx +4 -4
- package/src/components/stat-card.tsx +6 -6
- package/src/components/steps.tsx +13 -12
- package/src/components/switch.tsx +1 -1
- 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 +8 -8
- package/src/components/tooltip.tsx +1 -1
- package/src/index.ts +3 -2
- package/src/tokens/tokens.ts +54 -40
|
@@ -47,7 +47,7 @@ function RadioCards({ options, value, onValueChange, columns = 3, className }: R
|
|
|
47
47
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
48
48
|
isSelected
|
|
49
49
|
? "border-brand-primary bg-white shadow-natural"
|
|
50
|
-
: "border-
|
|
50
|
+
: "border-ground-200 bg-white hover:border-ground-400",
|
|
51
51
|
)}
|
|
52
52
|
>
|
|
53
53
|
{/* Selected ring overlay */}
|
|
@@ -60,17 +60,17 @@ function RadioCards({ options, value, onValueChange, columns = 3, className }: R
|
|
|
60
60
|
|
|
61
61
|
<div className="flex items-start justify-between gap-2">
|
|
62
62
|
<div className="min-w-0 flex-1">
|
|
63
|
-
{option.icon && <div className="mb-2 text-
|
|
63
|
+
{option.icon && <div className="mb-2 text-ground-500">{option.icon}</div>}
|
|
64
64
|
<p
|
|
65
65
|
className={cn(
|
|
66
66
|
"body font-semibold",
|
|
67
|
-
isSelected ? "text-
|
|
67
|
+
isSelected ? "text-ground-900" : "text-ground-800",
|
|
68
68
|
)}
|
|
69
69
|
>
|
|
70
70
|
{option.label}
|
|
71
71
|
</p>
|
|
72
72
|
{option.description && (
|
|
73
|
-
<p className="mt-0.5 caption text-
|
|
73
|
+
<p className="mt-0.5 caption text-ground-400">{option.description}</p>
|
|
74
74
|
)}
|
|
75
75
|
</div>
|
|
76
76
|
<div
|
|
@@ -78,7 +78,7 @@ function RadioCards({ options, value, onValueChange, columns = 3, className }: R
|
|
|
78
78
|
"flex size-5 shrink-0 items-center justify-center rounded-full border-2 transition-colors",
|
|
79
79
|
isSelected
|
|
80
80
|
? "border-brand-primary bg-brand-primary"
|
|
81
|
-
: "border-
|
|
81
|
+
: "border-ground-300 bg-white",
|
|
82
82
|
)}
|
|
83
83
|
>
|
|
84
84
|
{isSelected && <Check size={10} className="text-white" strokeWidth={3} />}
|
|
@@ -89,7 +89,7 @@ function RadioCards({ options, value, onValueChange, columns = 3, className }: R
|
|
|
89
89
|
<p
|
|
90
90
|
className={cn(
|
|
91
91
|
"caption font-semibold mt-2",
|
|
92
|
-
isSelected ? "text-
|
|
92
|
+
isSelected ? "text-ground-900" : "text-ground-400",
|
|
93
93
|
)}
|
|
94
94
|
>
|
|
95
95
|
{option.meta}
|
|
@@ -19,11 +19,11 @@ const RadioGroupItem = React.forwardRef<
|
|
|
19
19
|
<RadioGroup.Item
|
|
20
20
|
ref={ref}
|
|
21
21
|
className={cn(
|
|
22
|
-
"aspect-square size-4 rounded-full border border-
|
|
22
|
+
"aspect-square size-4 rounded-full border border-ground-300 text-ground-900",
|
|
23
23
|
"shadow-none transition-colors",
|
|
24
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
24
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ground-900/20",
|
|
25
25
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
26
|
-
"data-[state=checked]:bg-
|
|
26
|
+
"data-[state=checked]:bg-ground-900 data-[state=checked]:border-ground-900",
|
|
27
27
|
className,
|
|
28
28
|
)}
|
|
29
29
|
{...props}
|
|
@@ -46,7 +46,7 @@ function ResizableHandle({ className, withHandle = true, ...props }: ResizableHa
|
|
|
46
46
|
return (
|
|
47
47
|
<Separator
|
|
48
48
|
className={cn(
|
|
49
|
-
"relative flex shrink-0 items-center justify-center bg-
|
|
49
|
+
"relative flex shrink-0 items-center justify-center bg-ground-100",
|
|
50
50
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-brand-primary/50",
|
|
51
51
|
// Horizontal (default): vertical bar
|
|
52
52
|
"[&:not([aria-orientation=vertical])]:h-full [&:not([aria-orientation=vertical])]:w-px",
|
|
@@ -62,8 +62,8 @@ function ResizableHandle({ className, withHandle = true, ...props }: ResizableHa
|
|
|
62
62
|
{...props}
|
|
63
63
|
>
|
|
64
64
|
{withHandle && (
|
|
65
|
-
<div className="z-10 flex h-5 w-3 items-center justify-center rounded-sm border border-
|
|
66
|
-
<GripVertical size={10} className="text-
|
|
65
|
+
<div className="z-10 flex h-5 w-3 items-center justify-center rounded-sm border border-ground-100 bg-white shadow-natural">
|
|
66
|
+
<GripVertical size={10} className="text-ground-400" />
|
|
67
67
|
</div>
|
|
68
68
|
)}
|
|
69
69
|
</Separator>
|
|
@@ -34,7 +34,7 @@ const ScrollAreaScrollbar = React.forwardRef<
|
|
|
34
34
|
)}
|
|
35
35
|
{...props}
|
|
36
36
|
>
|
|
37
|
-
<ScrollArea.Thumb className="relative flex-1 rounded-full bg-
|
|
37
|
+
<ScrollArea.Thumb className="relative flex-1 rounded-full bg-ground-200 hover:bg-ground-300 transition-colors" />
|
|
38
38
|
</ScrollArea.Scrollbar>
|
|
39
39
|
));
|
|
40
40
|
ScrollAreaScrollbar.displayName = "ScrollAreaScrollbar";
|
|
@@ -28,13 +28,13 @@ function SectionHeading({
|
|
|
28
28
|
<div
|
|
29
29
|
className={cn(
|
|
30
30
|
"flex flex-col gap-1 pb-4 sm:flex-row sm:items-start sm:justify-between",
|
|
31
|
-
border && "border-b border-
|
|
31
|
+
border && "border-b border-ground-100",
|
|
32
32
|
className,
|
|
33
33
|
)}
|
|
34
34
|
>
|
|
35
35
|
<div className="min-w-0 flex-1">
|
|
36
|
-
<h2 className="heading text-
|
|
37
|
-
{description && <p className="mt-1 body text-
|
|
36
|
+
<h2 className="heading text-ground-900 truncate">{title}</h2>
|
|
37
|
+
{description && <p className="mt-1 body text-ground-400">{description}</p>}
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
40
|
{actions && actions.length > 0 && (
|
|
@@ -17,10 +17,10 @@ const SelectTrigger = React.forwardRef<
|
|
|
17
17
|
ref={ref}
|
|
18
18
|
className={cn(
|
|
19
19
|
"flex h-9 w-full items-center justify-between rounded-xl bg-white px-3 py-2",
|
|
20
|
-
"body text-
|
|
21
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
20
|
+
"body text-ground-900 shadow-natural",
|
|
21
|
+
"focus:outline-none focus:ring-2 focus:ring-ground-900/15",
|
|
22
22
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
23
|
-
"data-[placeholder]:text-
|
|
23
|
+
"data-[placeholder]:text-ground-400",
|
|
24
24
|
"[&>span]:line-clamp-1",
|
|
25
25
|
className,
|
|
26
26
|
)}
|
|
@@ -28,7 +28,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
28
28
|
>
|
|
29
29
|
{children}
|
|
30
30
|
<Select.Icon asChild>
|
|
31
|
-
<ChevronDown size={15} className="text-
|
|
31
|
+
<ChevronDown size={15} className="text-ground-400 shrink-0" />
|
|
32
32
|
</Select.Icon>
|
|
33
33
|
</Select.Trigger>
|
|
34
34
|
));
|
|
@@ -55,7 +55,7 @@ const SelectContent = React.forwardRef<
|
|
|
55
55
|
{...props}
|
|
56
56
|
>
|
|
57
57
|
<Select.ScrollUpButton className="flex cursor-default items-center justify-center py-1">
|
|
58
|
-
<ChevronUp size={14} className="text-
|
|
58
|
+
<ChevronUp size={14} className="text-ground-400" />
|
|
59
59
|
</Select.ScrollUpButton>
|
|
60
60
|
<Select.Viewport
|
|
61
61
|
className={cn(
|
|
@@ -66,7 +66,7 @@ const SelectContent = React.forwardRef<
|
|
|
66
66
|
{children}
|
|
67
67
|
</Select.Viewport>
|
|
68
68
|
<Select.ScrollDownButton className="flex cursor-default items-center justify-center py-1">
|
|
69
|
-
<ChevronDown size={14} className="text-
|
|
69
|
+
<ChevronDown size={14} className="text-ground-400" />
|
|
70
70
|
</Select.ScrollDownButton>
|
|
71
71
|
</Select.Content>
|
|
72
72
|
</Select.Portal>
|
|
@@ -81,8 +81,8 @@ const SelectItem = React.forwardRef<
|
|
|
81
81
|
ref={ref}
|
|
82
82
|
className={cn(
|
|
83
83
|
"relative flex w-full cursor-default select-none items-center rounded-md px-2.5 py-1.5",
|
|
84
|
-
"body text-
|
|
85
|
-
"focus:bg-
|
|
84
|
+
"body text-ground-700 outline-none",
|
|
85
|
+
"focus:bg-ground-50 focus:text-ground-900",
|
|
86
86
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
87
87
|
className,
|
|
88
88
|
)}
|
|
@@ -90,7 +90,7 @@ const SelectItem = React.forwardRef<
|
|
|
90
90
|
>
|
|
91
91
|
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
92
92
|
<Select.ItemIndicator>
|
|
93
|
-
<Check size={13} className="text-
|
|
93
|
+
<Check size={13} className="text-ground-900" />
|
|
94
94
|
</Select.ItemIndicator>
|
|
95
95
|
</span>
|
|
96
96
|
<Select.ItemText>{children}</Select.ItemText>
|
|
@@ -104,7 +104,7 @@ const SelectLabel = React.forwardRef<
|
|
|
104
104
|
>(({ className, ...props }, ref) => (
|
|
105
105
|
<Select.Label
|
|
106
106
|
ref={ref}
|
|
107
|
-
className={cn("px-2.5 py-1 label text-
|
|
107
|
+
className={cn("px-2.5 py-1 label text-ground-400", className)}
|
|
108
108
|
{...props}
|
|
109
109
|
/>
|
|
110
110
|
));
|
|
@@ -114,7 +114,7 @@ const SelectSeparator = React.forwardRef<
|
|
|
114
114
|
React.ComponentRef<typeof Select.Separator>,
|
|
115
115
|
React.ComponentPropsWithoutRef<typeof Select.Separator>
|
|
116
116
|
>(({ className, ...props }, ref) => (
|
|
117
|
-
<Select.Separator ref={ref} className={cn("mx-1 my-1 h-px bg-
|
|
117
|
+
<Select.Separator ref={ref} className={cn("mx-1 my-1 h-px bg-ground-100", className)} {...props} />
|
|
118
118
|
));
|
|
119
119
|
SelectSeparator.displayName = "SelectSeparator";
|
|
120
120
|
|
package/src/components/sheet.tsx
CHANGED
|
@@ -65,7 +65,7 @@ const SheetContent = React.forwardRef<React.ComponentRef<typeof Dialog.Content>,
|
|
|
65
65
|
{...props}
|
|
66
66
|
>
|
|
67
67
|
{children}
|
|
68
|
-
<Dialog.Close className="absolute right-4 top-4 rounded-md p-1 text-
|
|
68
|
+
<Dialog.Close className="absolute right-4 top-4 rounded-md p-1 text-ground-400 opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ground-900/20">
|
|
69
69
|
<X size={16} />
|
|
70
70
|
<span className="sr-only">Close</span>
|
|
71
71
|
</Dialog.Close>
|
|
@@ -91,7 +91,7 @@ const SheetTitle = React.forwardRef<
|
|
|
91
91
|
>(({ className, ...props }, ref) => (
|
|
92
92
|
<Dialog.Title
|
|
93
93
|
ref={ref}
|
|
94
|
-
className={cn("body-lg font-semibold text-
|
|
94
|
+
className={cn("body-lg font-semibold text-ground-900", className)}
|
|
95
95
|
{...props}
|
|
96
96
|
/>
|
|
97
97
|
));
|
|
@@ -101,7 +101,7 @@ const SheetDescription = React.forwardRef<
|
|
|
101
101
|
React.ComponentRef<typeof Dialog.Description>,
|
|
102
102
|
React.ComponentPropsWithoutRef<typeof Dialog.Description>
|
|
103
103
|
>(({ className, ...props }, ref) => (
|
|
104
|
-
<Dialog.Description ref={ref} className={cn("body text-
|
|
104
|
+
<Dialog.Description ref={ref} className={cn("body text-ground-500", className)} {...props} />
|
|
105
105
|
));
|
|
106
106
|
SheetDescription.displayName = "SheetDescription";
|
|
107
107
|
|
|
@@ -132,7 +132,7 @@ function Sidebar({
|
|
|
132
132
|
data-variant={variant}
|
|
133
133
|
data-collapsible="none"
|
|
134
134
|
className={cn(
|
|
135
|
-
"flex flex-col h-svh bg-white border-r border-
|
|
135
|
+
"flex flex-col h-svh bg-white border-r border-ground-100 w-[--sidebar-width]",
|
|
136
136
|
side === "right" && "border-r-0 border-l",
|
|
137
137
|
className,
|
|
138
138
|
)}
|
|
@@ -151,7 +151,7 @@ function Sidebar({
|
|
|
151
151
|
data-variant={variant}
|
|
152
152
|
data-collapsible="offcanvas"
|
|
153
153
|
className={cn(
|
|
154
|
-
"group peer flex flex-col h-svh bg-white border-r border-
|
|
154
|
+
"group peer flex flex-col h-svh bg-white border-r border-ground-100",
|
|
155
155
|
"transition-[width,transform] duration-200 ease-linear",
|
|
156
156
|
"data-[state=expanded]:w-[--sidebar-width] data-[state=collapsed]:w-0 data-[state=collapsed]:-translate-x-full",
|
|
157
157
|
side === "right" && "border-r-0 border-l data-[state=collapsed]:translate-x-full",
|
|
@@ -172,7 +172,7 @@ function Sidebar({
|
|
|
172
172
|
data-variant={variant}
|
|
173
173
|
data-collapsible="icon"
|
|
174
174
|
className={cn(
|
|
175
|
-
"group peer hidden md:flex flex-col h-svh bg-white border-r border-
|
|
175
|
+
"group peer hidden md:flex flex-col h-svh bg-white border-r border-ground-100",
|
|
176
176
|
"transition-[width] duration-200 ease-linear overflow-hidden",
|
|
177
177
|
"data-[state=expanded]:w-[--sidebar-width] data-[state=collapsed]:w-[--sidebar-width-icon]",
|
|
178
178
|
side === "right" && "border-r-0 border-l",
|
|
@@ -261,7 +261,7 @@ function SidebarHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
261
261
|
return (
|
|
262
262
|
<div
|
|
263
263
|
data-sidebar="header"
|
|
264
|
-
className={cn("flex flex-col gap-2 p-3 border-b border-
|
|
264
|
+
className={cn("flex flex-col gap-2 p-3 border-b border-ground-100", className)}
|
|
265
265
|
{...props}
|
|
266
266
|
/>
|
|
267
267
|
);
|
|
@@ -281,7 +281,7 @@ function SidebarFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
281
281
|
return (
|
|
282
282
|
<div
|
|
283
283
|
data-sidebar="footer"
|
|
284
|
-
className={cn("flex flex-col gap-2 p-3 border-t border-
|
|
284
|
+
className={cn("flex flex-col gap-2 p-3 border-t border-ground-100", className)}
|
|
285
285
|
{...props}
|
|
286
286
|
/>
|
|
287
287
|
);
|
|
@@ -291,7 +291,7 @@ function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof S
|
|
|
291
291
|
return (
|
|
292
292
|
<Separator
|
|
293
293
|
data-sidebar="separator"
|
|
294
|
-
className={cn("mx-2 my-1 bg-
|
|
294
|
+
className={cn("mx-2 my-1 bg-ground-100", className)}
|
|
295
295
|
{...props}
|
|
296
296
|
/>
|
|
297
297
|
);
|
|
@@ -322,8 +322,8 @@ function SidebarGroupLabel({
|
|
|
322
322
|
<Comp
|
|
323
323
|
data-sidebar="group-label"
|
|
324
324
|
className={cn(
|
|
325
|
-
"flex h-8 shrink-0 items-center rounded-md px-2 label text-
|
|
326
|
-
"outline-none ring-
|
|
325
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 label text-ground-400",
|
|
326
|
+
"outline-none ring-ground-900 transition-[margin,opacity] duration-200 ease-linear",
|
|
327
327
|
"group-data-[state=collapsed]/sidebar-wrapper:opacity-0",
|
|
328
328
|
"group-data-[state=collapsed]/sidebar-wrapper:h-0",
|
|
329
329
|
"group-data-[state=collapsed]/sidebar-wrapper:m-0",
|
|
@@ -354,7 +354,7 @@ function SidebarGroupAction({
|
|
|
354
354
|
data-sidebar="group-action"
|
|
355
355
|
className={cn(
|
|
356
356
|
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center",
|
|
357
|
-
"rounded-md text-
|
|
357
|
+
"rounded-md text-ground-400 hover:bg-ground-100 hover:text-ground-900",
|
|
358
358
|
"outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
359
359
|
className,
|
|
360
360
|
)}
|
|
@@ -413,11 +413,11 @@ function SidebarMenuButton({
|
|
|
413
413
|
className={cn(
|
|
414
414
|
// Base
|
|
415
415
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 body text-left",
|
|
416
|
-
"outline-none ring-
|
|
416
|
+
"outline-none ring-ground-900",
|
|
417
417
|
"transition-[width,height,padding] duration-150",
|
|
418
|
-
"hover:bg-
|
|
418
|
+
"hover:bg-ground-100 hover:text-ground-900",
|
|
419
419
|
"focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
420
|
-
"active:bg-
|
|
420
|
+
"active:bg-ground-100",
|
|
421
421
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
422
422
|
"[&>svg]:size-4 [&>svg]:shrink-0",
|
|
423
423
|
// Size variants
|
|
@@ -482,7 +482,7 @@ function SidebarMenuAction({
|
|
|
482
482
|
data-sidebar="menu-action"
|
|
483
483
|
className={cn(
|
|
484
484
|
"absolute right-1 top-1/2 -translate-y-1/2 flex aspect-square w-5 items-center justify-center",
|
|
485
|
-
"rounded-md text-
|
|
485
|
+
"rounded-md text-ground-400 hover:bg-ground-100 hover:text-ground-900",
|
|
486
486
|
"outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
487
487
|
showOnHover && [
|
|
488
488
|
"opacity-0 transition-opacity",
|
|
@@ -507,7 +507,7 @@ function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">)
|
|
|
507
507
|
data-sidebar="menu-badge"
|
|
508
508
|
className={cn(
|
|
509
509
|
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-full",
|
|
510
|
-
"caption font-medium bg-
|
|
510
|
+
"caption font-medium bg-ground-100 text-ground-700 px-1",
|
|
511
511
|
"group-data-[state=collapsed]/sidebar-wrapper:hidden",
|
|
512
512
|
className,
|
|
513
513
|
)}
|
|
@@ -535,9 +535,9 @@ function SidebarMenuSkeleton({
|
|
|
535
535
|
className={cn("flex h-8 items-center gap-2 rounded-md px-2", className)}
|
|
536
536
|
{...props}
|
|
537
537
|
>
|
|
538
|
-
{showIcon && <div className="size-4 shrink-0 rounded-md bg-
|
|
538
|
+
{showIcon && <div className="size-4 shrink-0 rounded-md bg-ground-200 animate-pulse" />}
|
|
539
539
|
<div
|
|
540
|
-
className="h-4 max-w-[--skeleton-width] flex-1 rounded-md bg-
|
|
540
|
+
className="h-4 max-w-[--skeleton-width] flex-1 rounded-md bg-ground-200 animate-pulse"
|
|
541
541
|
style={{ "--skeleton-width": width } as React.CSSProperties}
|
|
542
542
|
/>
|
|
543
543
|
</div>
|
|
@@ -553,7 +553,7 @@ function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">) {
|
|
|
553
553
|
<ul
|
|
554
554
|
data-sidebar="menu-sub"
|
|
555
555
|
className={cn(
|
|
556
|
-
"mx-3.5 flex min-w-0 flex-col gap-1 border-l border-
|
|
556
|
+
"mx-3.5 flex min-w-0 flex-col gap-1 border-l border-ground-100 pl-3",
|
|
557
557
|
"group-data-[state=collapsed]/sidebar-wrapper:hidden",
|
|
558
558
|
className,
|
|
559
559
|
)}
|
|
@@ -591,9 +591,9 @@ function SidebarMenuSubButton({
|
|
|
591
591
|
data-active={isActive}
|
|
592
592
|
className={cn(
|
|
593
593
|
"flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2",
|
|
594
|
-
"body text-
|
|
594
|
+
"body text-ground-500 outline-none",
|
|
595
595
|
"transition-colors duration-150",
|
|
596
|
-
"hover:text-
|
|
596
|
+
"hover:text-ground-900 hover:bg-ground-100",
|
|
597
597
|
"focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
598
598
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
599
599
|
"[&>svg]:size-3.5 [&>svg]:shrink-0",
|
|
@@ -5,7 +5,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
5
5
|
return (
|
|
6
6
|
<div
|
|
7
7
|
data-slot="skeleton"
|
|
8
|
-
className={cn("animate-pulse rounded-md bg-
|
|
8
|
+
className={cn("animate-pulse rounded-md bg-ground-100", className)}
|
|
9
9
|
{...props}
|
|
10
10
|
/>
|
|
11
11
|
);
|
|
@@ -13,7 +13,7 @@ const SliderRoot = React.forwardRef<
|
|
|
13
13
|
className={cn("relative flex w-full touch-none select-none items-center", className)}
|
|
14
14
|
{...props}
|
|
15
15
|
>
|
|
16
|
-
<Slider.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-
|
|
16
|
+
<Slider.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-ground-100">
|
|
17
17
|
<Slider.Range className="absolute h-full bg-brand-primary" />
|
|
18
18
|
</Slider.Track>
|
|
19
19
|
<Slider.Thumb className="block size-4 rounded-full border-2 border-brand-primary bg-white shadow-natural transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30 disabled:pointer-events-none disabled:opacity-50" />
|
|
@@ -12,18 +12,18 @@ function Toaster({ ...props }: ToasterProps) {
|
|
|
12
12
|
toastOptions={{
|
|
13
13
|
classNames: {
|
|
14
14
|
toast:
|
|
15
|
-
"group toast font-sans text-sm group-[.toaster]:bg-white group-[.toaster]:text-
|
|
16
|
-
description: "group-[.toast]:text-
|
|
15
|
+
"group toast font-sans text-sm group-[.toaster]:bg-white group-[.toaster]:text-ground-900 group-[.toaster]:border group-[.toaster]:border-ground-100 group-[.toaster]:shadow-elevated group-[.toaster]:rounded-xl",
|
|
16
|
+
description: "group-[.toast]:text-ground-500 group-[.toast]:text-xs",
|
|
17
17
|
actionButton:
|
|
18
18
|
"group-[.toast]:bg-brand-primary group-[.toast]:text-white group-[.toast]:rounded-md group-[.toast]:text-xs group-[.toast]:font-medium",
|
|
19
19
|
cancelButton:
|
|
20
|
-
"group-[.toast]:bg-
|
|
21
|
-
success: "group-[.toaster]:border-brand-secondary/40 group-[.toaster]:text-
|
|
20
|
+
"group-[.toast]:bg-ground-100 group-[.toast]:text-ground-600 group-[.toast]:rounded-md group-[.toast]:text-xs group-[.toast]:font-medium",
|
|
21
|
+
success: "group-[.toaster]:border-brand-secondary/40 group-[.toaster]:text-ground-900",
|
|
22
22
|
error:
|
|
23
23
|
"group-[.toaster]:bg-red-50 group-[.toaster]:text-red-700 group-[.toaster]:border-red-200",
|
|
24
24
|
warning:
|
|
25
25
|
"group-[.toaster]:bg-yellow-50 group-[.toaster]:text-yellow-800 group-[.toaster]:border-yellow-200",
|
|
26
|
-
info: "group-[.toaster]:border-
|
|
26
|
+
info: "group-[.toaster]:border-ground-200",
|
|
27
27
|
},
|
|
28
28
|
}}
|
|
29
29
|
{...props}
|
|
@@ -14,8 +14,8 @@ function StackedList({ children, divided = true, bordered = true, className }: S
|
|
|
14
14
|
role="list"
|
|
15
15
|
className={cn(
|
|
16
16
|
"overflow-hidden rounded-xl bg-white",
|
|
17
|
-
bordered && "border border-
|
|
18
|
-
divided && "divide-y divide-
|
|
17
|
+
bordered && "border border-ground-100 shadow-natural",
|
|
18
|
+
divided && "divide-y divide-ground-100",
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
>
|
|
@@ -37,7 +37,7 @@ function StackedListItem({ children, href, onClick, className }: StackedListItem
|
|
|
37
37
|
if (href) {
|
|
38
38
|
return (
|
|
39
39
|
<li>
|
|
40
|
-
<a href={href} className="block hover:bg-
|
|
40
|
+
<a href={href} className="block hover:bg-ground-50 transition-colors">
|
|
41
41
|
{inner}
|
|
42
42
|
</a>
|
|
43
43
|
</li>
|
|
@@ -49,7 +49,7 @@ function StackedListItem({ children, href, onClick, className }: StackedListItem
|
|
|
49
49
|
<li>
|
|
50
50
|
<button
|
|
51
51
|
type="button"
|
|
52
|
-
className="w-full text-left hover:bg-
|
|
52
|
+
className="w-full text-left hover:bg-ground-50 transition-colors"
|
|
53
53
|
onClick={onClick}
|
|
54
54
|
>
|
|
55
55
|
{inner}
|
|
@@ -15,9 +15,9 @@ interface StatCardProps {
|
|
|
15
15
|
|
|
16
16
|
function StatCard({ label, value, trend, icon, className }: StatCardProps) {
|
|
17
17
|
const trendColor = {
|
|
18
|
-
up: "text-
|
|
18
|
+
up: "text-ground-800 bg-brand-secondary/30 rounded-full px-2 py-0.5 w-fit",
|
|
19
19
|
down: "text-red-600",
|
|
20
|
-
neutral: "text-
|
|
20
|
+
neutral: "text-ground-400",
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const TrendIcon = {
|
|
@@ -27,16 +27,16 @@ function StatCard({ label, value, trend, icon, className }: StatCardProps) {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<div className={cn("rounded-xl border border-
|
|
30
|
+
<div className={cn("rounded-xl border border-ground-100 bg-white p-5", className)}>
|
|
31
31
|
<div className="flex items-start justify-between gap-3">
|
|
32
|
-
<p className="label text-
|
|
32
|
+
<p className="label text-ground-400">{label}</p>
|
|
33
33
|
{icon && (
|
|
34
|
-
<div className="flex size-8 shrink-0 items-center justify-center rounded-lg bg-
|
|
34
|
+
<div className="flex size-8 shrink-0 items-center justify-center rounded-lg bg-ground-50 text-ground-400">
|
|
35
35
|
{icon}
|
|
36
36
|
</div>
|
|
37
37
|
)}
|
|
38
38
|
</div>
|
|
39
|
-
<p className="heading-xl mt-2 text-
|
|
39
|
+
<p className="heading-xl mt-2 text-ground-900">{value}</p>
|
|
40
40
|
{trend &&
|
|
41
41
|
(() => {
|
|
42
42
|
const Icon = TrendIcon[trend.direction];
|
package/src/components/steps.tsx
CHANGED
|
@@ -33,7 +33,7 @@ function CirclesSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
33
33
|
<div
|
|
34
34
|
className={cn(
|
|
35
35
|
"h-full",
|
|
36
|
-
step.status === "complete" ? "bg-brand-primary" : "bg-
|
|
36
|
+
step.status === "complete" ? "bg-brand-primary" : "bg-ground-200",
|
|
37
37
|
)}
|
|
38
38
|
/>
|
|
39
39
|
</div>
|
|
@@ -52,7 +52,7 @@ function CirclesSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
52
52
|
"bg-brand-primary group-hover:bg-brand-primary/80",
|
|
53
53
|
step.status === "current" && "border-2 border-brand-primary bg-white",
|
|
54
54
|
step.status === "upcoming" &&
|
|
55
|
-
"border-2 border-
|
|
55
|
+
"border-2 border-ground-300 bg-white group-hover:border-ground-400",
|
|
56
56
|
)}
|
|
57
57
|
>
|
|
58
58
|
{step.status === "complete" ? (
|
|
@@ -60,7 +60,7 @@ function CirclesSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
60
60
|
) : step.status === "current" ? (
|
|
61
61
|
<span className="size-2.5 rounded-full bg-brand-primary" />
|
|
62
62
|
) : (
|
|
63
|
-
<span className="size-2.5 rounded-full bg-transparent group-hover:bg-
|
|
63
|
+
<span className="size-2.5 rounded-full bg-transparent group-hover:bg-ground-300" />
|
|
64
64
|
)}
|
|
65
65
|
</span>
|
|
66
66
|
|
|
@@ -69,13 +69,13 @@ function CirclesSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
69
69
|
<span
|
|
70
70
|
className={cn(
|
|
71
71
|
"caption font-semibold",
|
|
72
|
-
step.status === "upcoming" ? "text-
|
|
72
|
+
step.status === "upcoming" ? "text-ground-400" : "text-ground-900",
|
|
73
73
|
)}
|
|
74
74
|
>
|
|
75
75
|
{step.name}
|
|
76
76
|
</span>
|
|
77
77
|
{step.description && (
|
|
78
|
-
<span className="caption text-
|
|
78
|
+
<span className="caption text-ground-400">{step.description}</span>
|
|
79
79
|
)}
|
|
80
80
|
</span>
|
|
81
81
|
</a>
|
|
@@ -93,7 +93,7 @@ function BulletsSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
93
93
|
|
|
94
94
|
return (
|
|
95
95
|
<nav className={cn("flex items-center gap-4", className)} aria-label="Progress">
|
|
96
|
-
<p className="body font-medium text-
|
|
96
|
+
<p className="body font-medium text-ground-700">
|
|
97
97
|
Step {currentIdx + 1} of {steps.length}
|
|
98
98
|
</p>
|
|
99
99
|
<ol role="list" className="flex items-center gap-2">
|
|
@@ -120,7 +120,7 @@ function BulletsSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
120
120
|
</span>
|
|
121
121
|
) : (
|
|
122
122
|
<span
|
|
123
|
-
className="block size-2.5 rounded-full bg-
|
|
123
|
+
className="block size-2.5 rounded-full bg-ground-200 hover:bg-ground-300 transition-colors"
|
|
124
124
|
title={step.name}
|
|
125
125
|
/>
|
|
126
126
|
)}
|
|
@@ -141,7 +141,7 @@ function ProgressSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
141
141
|
return (
|
|
142
142
|
<div className={cn("w-full", className)}>
|
|
143
143
|
{/* Bar */}
|
|
144
|
-
<div className="h-1.5 w-full overflow-hidden rounded-full bg-
|
|
144
|
+
<div className="h-1.5 w-full overflow-hidden rounded-full bg-ground-100">
|
|
145
145
|
<div
|
|
146
146
|
className="h-full rounded-full bg-brand-primary transition-all duration-500"
|
|
147
147
|
style={{ width: `${progress}%` }}
|
|
@@ -157,7 +157,7 @@ function ProgressSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
157
157
|
className={cn(
|
|
158
158
|
"caption font-medium",
|
|
159
159
|
i === 0 ? "text-left" : isLast ? "text-right" : "text-center",
|
|
160
|
-
step.status === "upcoming" ? "text-
|
|
160
|
+
step.status === "upcoming" ? "text-ground-400" : "text-ground-900",
|
|
161
161
|
)}
|
|
162
162
|
>
|
|
163
163
|
{step.name}
|
|
@@ -171,9 +171,10 @@ function ProgressSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
171
171
|
|
|
172
172
|
/* ---------- Main component ---------- */
|
|
173
173
|
function Steps({ steps, variant = "circles", className }: StepsProps) {
|
|
174
|
-
|
|
175
|
-
if (variant === "
|
|
176
|
-
return <
|
|
174
|
+
const classNameProp = className !== undefined ? { className } : {};
|
|
175
|
+
if (variant === "bullets") return <BulletsSteps steps={steps} {...classNameProp} />;
|
|
176
|
+
if (variant === "progress") return <ProgressSteps steps={steps} {...classNameProp} />;
|
|
177
|
+
return <CirclesSteps steps={steps} {...classNameProp} />;
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
export { Steps };
|
|
@@ -15,7 +15,7 @@ const SwitchRoot = React.forwardRef<
|
|
|
15
15
|
"border-2 border-transparent 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
|
-
"data-[state=unchecked]:bg-
|
|
18
|
+
"data-[state=unchecked]:bg-ground-200 data-[state=checked]:bg-brand-primary",
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|