@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/src/components/sheet.tsx
CHANGED
|
@@ -29,7 +29,7 @@ SheetOverlay.displayName = "SheetOverlay";
|
|
|
29
29
|
|
|
30
30
|
const sheetContentVariants = cva(
|
|
31
31
|
[
|
|
32
|
-
"fixed z-50 bg-
|
|
32
|
+
"fixed z-50 bg-card shadow-elevated p-6",
|
|
33
33
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
34
34
|
"transition ease-in-out duration-300",
|
|
35
35
|
],
|
|
@@ -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-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring/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-foreground", 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-muted-foreground", 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-
|
|
135
|
+
"flex flex-col h-svh bg-card border-r border-border 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-
|
|
154
|
+
"group peer flex flex-col h-svh bg-card border-r border-border",
|
|
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-
|
|
175
|
+
"group peer hidden md:flex flex-col h-svh bg-card border-r border-border",
|
|
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",
|
|
@@ -247,7 +247,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
|
|
|
247
247
|
return (
|
|
248
248
|
<main
|
|
249
249
|
data-sidebar="inset"
|
|
250
|
-
className={cn("relative flex min-h-svh flex-1 flex-col bg-
|
|
250
|
+
className={cn("relative flex min-h-svh flex-1 flex-col bg-card overflow-hidden", className)}
|
|
251
251
|
{...props}
|
|
252
252
|
/>
|
|
253
253
|
);
|
|
@@ -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-border", 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-border", 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-muted", 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-muted-foreground",
|
|
326
|
+
"outline-none ring-ring 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-muted-foreground hover:bg-muted hover:text-foreground",
|
|
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-sm text-left",
|
|
416
|
-
"outline-none ring-
|
|
416
|
+
"outline-none ring-ring",
|
|
417
417
|
"transition-[width,height,padding] duration-150",
|
|
418
|
-
"hover:bg-
|
|
418
|
+
"hover:bg-muted hover:text-foreground",
|
|
419
419
|
"focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
420
|
-
"active:bg-
|
|
420
|
+
"active:bg-muted",
|
|
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-muted-foreground hover:bg-muted hover:text-foreground",
|
|
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-muted text-muted-foreground 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-muted 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-muted 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-border 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-muted-foreground outline-none",
|
|
595
595
|
"transition-colors duration-150",
|
|
596
|
-
"hover:text-
|
|
596
|
+
"hover:text-foreground hover:bg-muted",
|
|
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-muted", className)}
|
|
9
9
|
{...props}
|
|
10
10
|
/>
|
|
11
11
|
);
|
|
@@ -13,10 +13,10 @@ 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-muted">
|
|
17
17
|
<Slider.Range className="absolute h-full bg-brand-primary" />
|
|
18
18
|
</Slider.Track>
|
|
19
|
-
<Slider.Thumb className="block size-4 rounded-full border-2 border-brand-primary bg-
|
|
19
|
+
<Slider.Thumb className="block size-4 rounded-full border-2 border-brand-primary bg-card 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" />
|
|
20
20
|
</Slider.Root>
|
|
21
21
|
));
|
|
22
22
|
SliderRoot.displayName = "Slider";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { Toaster as SonnerToaster } from "sonner";
|
|
4
5
|
|
|
5
6
|
type ToasterProps = React.ComponentProps<typeof SonnerToaster>;
|
|
@@ -12,18 +13,18 @@ function Toaster({ ...props }: ToasterProps) {
|
|
|
12
13
|
toastOptions={{
|
|
13
14
|
classNames: {
|
|
14
15
|
toast:
|
|
15
|
-
"group toast font-sans text-sm group-[.toaster]:bg-
|
|
16
|
-
description: "group-[.toast]:text-
|
|
16
|
+
"group toast font-sans text-sm group-[.toaster]:bg-card group-[.toaster]:text-foreground group-[.toaster]:border group-[.toaster]:border-border group-[.toaster]:shadow-elevated group-[.toaster]:rounded-xl",
|
|
17
|
+
description: "group-[.toast]:text-muted-foreground group-[.toast]:text-xs",
|
|
17
18
|
actionButton:
|
|
18
|
-
"group-[.toast]:bg-brand-primary group-[.toast]:text-
|
|
19
|
+
"group-[.toast]:bg-brand-primary group-[.toast]:text-background group-[.toast]:rounded-md group-[.toast]:text-xs group-[.toast]:font-medium",
|
|
19
20
|
cancelButton:
|
|
20
|
-
"group-[.toast]:bg-
|
|
21
|
-
success: "group-[.toaster]:border-brand-secondary/40 group-[.toaster]:text-
|
|
21
|
+
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground group-[.toast]:rounded-md group-[.toast]:text-xs group-[.toast]:font-medium",
|
|
22
|
+
success: "group-[.toaster]:border-brand-secondary/40 group-[.toaster]:text-foreground",
|
|
22
23
|
error:
|
|
23
|
-
"group-[.toaster]:bg-
|
|
24
|
+
"group-[.toaster]:bg-destructive/10 group-[.toaster]:text-destructive group-[.toaster]:border-destructive/20",
|
|
24
25
|
warning:
|
|
25
|
-
"group-[.toaster]:bg-
|
|
26
|
-
info: "group-[.toaster]:border-
|
|
26
|
+
"group-[.toaster]:bg-warning group-[.toaster]:text-warning-foreground group-[.toaster]:border-warning/40",
|
|
27
|
+
info: "group-[.toaster]:border-border",
|
|
27
28
|
},
|
|
28
29
|
}}
|
|
29
30
|
{...props}
|
|
@@ -13,9 +13,9 @@ function StackedList({ children, divided = true, bordered = true, className }: S
|
|
|
13
13
|
<ul
|
|
14
14
|
role="list"
|
|
15
15
|
className={cn(
|
|
16
|
-
"overflow-hidden rounded-xl bg-
|
|
17
|
-
bordered && "border border-
|
|
18
|
-
divided && "divide-y divide-
|
|
16
|
+
"overflow-hidden rounded-xl bg-card",
|
|
17
|
+
bordered && "border border-border shadow-natural",
|
|
18
|
+
divided && "divide-y divide-border",
|
|
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-muted 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-muted 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-
|
|
19
|
-
down: "text-
|
|
20
|
-
neutral: "text-
|
|
18
|
+
up: "text-muted-foreground bg-brand-secondary/30 rounded-full px-2 py-0.5 w-fit",
|
|
19
|
+
down: "text-destructive",
|
|
20
|
+
neutral: "text-muted-foreground",
|
|
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-border bg-card p-5", className)}>
|
|
31
31
|
<div className="flex items-start justify-between gap-3">
|
|
32
|
-
<p className="label text-
|
|
32
|
+
<p className="label text-muted-foreground">{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-muted text-muted-foreground">
|
|
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-foreground">{value}</p>
|
|
40
40
|
{trend &&
|
|
41
41
|
(() => {
|
|
42
42
|
const Icon = TrendIcon[trend.direction];
|
|
@@ -51,4 +51,6 @@ function StatCard({ label, value, trend, icon, className }: StatCardProps) {
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
StatCard.displayName = "StatCard";
|
|
55
|
+
|
|
54
56
|
export { StatCard };
|
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-muted",
|
|
37
37
|
)}
|
|
38
38
|
/>
|
|
39
39
|
</div>
|
|
@@ -50,17 +50,17 @@ function CirclesSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
50
50
|
"relative z-10 flex size-8 items-center justify-center rounded-full transition-colors",
|
|
51
51
|
step.status === "complete" &&
|
|
52
52
|
"bg-brand-primary group-hover:bg-brand-primary/80",
|
|
53
|
-
step.status === "current" && "border-2 border-brand-primary bg-
|
|
53
|
+
step.status === "current" && "border-2 border-brand-primary bg-card",
|
|
54
54
|
step.status === "upcoming" &&
|
|
55
|
-
"border-2 border-
|
|
55
|
+
"border-2 border-border bg-card group-hover:border-border",
|
|
56
56
|
)}
|
|
57
57
|
>
|
|
58
58
|
{step.status === "complete" ? (
|
|
59
|
-
<Check size={14} className="text-
|
|
59
|
+
<Check size={14} className="text-background" strokeWidth={2.5} />
|
|
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-muted" />
|
|
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-muted-foreground" : "text-foreground",
|
|
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-muted-foreground">{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-muted-foreground">
|
|
97
97
|
Step {currentIdx + 1} of {steps.length}
|
|
98
98
|
</p>
|
|
99
99
|
<ol role="list" className="flex items-center gap-2">
|
|
@@ -107,21 +107,21 @@ function BulletsSteps({ steps, className }: { steps: Step[]; className?: string
|
|
|
107
107
|
{step.status === "complete" ? (
|
|
108
108
|
<span
|
|
109
109
|
className="block size-2.5 rounded-full bg-brand-primary hover:bg-brand-primary/80 transition-colors"
|
|
110
|
-
|
|
110
|
+
aria-label={`${step.name}: completed`}
|
|
111
111
|
/>
|
|
112
112
|
) : step.status === "current" ? (
|
|
113
113
|
<span
|
|
114
114
|
className="relative flex size-4 items-center justify-center"
|
|
115
115
|
aria-current="step"
|
|
116
|
+
aria-label={`${step.name}: current step`}
|
|
116
117
|
>
|
|
117
118
|
<span className="absolute size-4 rounded-full bg-brand-primary/20" />
|
|
118
119
|
<span className="relative size-2.5 rounded-full bg-brand-primary" />
|
|
119
|
-
<span className="sr-only">{step.name}</span>
|
|
120
120
|
</span>
|
|
121
121
|
) : (
|
|
122
122
|
<span
|
|
123
|
-
className="block size-2.5 rounded-full bg-
|
|
124
|
-
|
|
123
|
+
className="block size-2.5 rounded-full bg-muted hover:bg-muted transition-colors"
|
|
124
|
+
aria-label={`${step.name}: upcoming`}
|
|
125
125
|
/>
|
|
126
126
|
)}
|
|
127
127
|
</a>
|
|
@@ -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-muted">
|
|
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-muted-foreground" : "text-foreground",
|
|
161
161
|
)}
|
|
162
162
|
>
|
|
163
163
|
{step.name}
|
|
@@ -177,4 +177,6 @@ function Steps({ steps, variant = "circles", className }: StepsProps) {
|
|
|
177
177
|
return <CirclesSteps steps={steps} {...classNameProp} />;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
Steps.displayName = "Steps";
|
|
181
|
+
|
|
180
182
|
export { Steps };
|
|
@@ -15,14 +15,14 @@ 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-muted data-[state=checked]:bg-brand-primary",
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
22
22
|
>
|
|
23
23
|
<Switch.Thumb
|
|
24
24
|
className={cn(
|
|
25
|
-
"pointer-events-none block size-4 rounded-full bg-
|
|
25
|
+
"pointer-events-none block size-4 rounded-full bg-card shadow-natural",
|
|
26
26
|
"transition-transform data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4",
|
|
27
27
|
)}
|
|
28
28
|
/>
|
package/src/components/table.tsx
CHANGED
|
@@ -7,13 +7,13 @@ const Table = React.forwardRef<
|
|
|
7
7
|
>(({ className, containerClassName, ...props }, ref) => (
|
|
8
8
|
<div
|
|
9
9
|
className={cn(
|
|
10
|
-
"w-full overflow-hidden rounded-xl border border-
|
|
10
|
+
"w-full overflow-hidden rounded-xl border border-border bg-card",
|
|
11
11
|
containerClassName,
|
|
12
12
|
)}
|
|
13
13
|
>
|
|
14
14
|
<table
|
|
15
15
|
ref={ref}
|
|
16
|
-
className={cn("min-w-full caption-bottom divide-y divide-
|
|
16
|
+
className={cn("min-w-full caption-bottom divide-y divide-border", className)}
|
|
17
17
|
{...props}
|
|
18
18
|
/>
|
|
19
19
|
</div>
|
|
@@ -24,7 +24,7 @@ const TableHeader = React.forwardRef<
|
|
|
24
24
|
HTMLTableSectionElement,
|
|
25
25
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
26
26
|
>(({ className, ...props }, ref) => (
|
|
27
|
-
<thead ref={ref} className={cn("bg-
|
|
27
|
+
<thead ref={ref} className={cn("bg-muted", className)} {...props} />
|
|
28
28
|
));
|
|
29
29
|
TableHeader.displayName = "TableHeader";
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ const TableBody = React.forwardRef<
|
|
|
32
32
|
HTMLTableSectionElement,
|
|
33
33
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
34
34
|
>(({ className, ...props }, ref) => (
|
|
35
|
-
<tbody ref={ref} className={cn("divide-y divide-
|
|
35
|
+
<tbody ref={ref} className={cn("divide-y divide-border bg-card", className)} {...props} />
|
|
36
36
|
));
|
|
37
37
|
TableBody.displayName = "TableBody";
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ const TableFooter = React.forwardRef<
|
|
|
40
40
|
HTMLTableSectionElement,
|
|
41
41
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
42
42
|
>(({ className, ...props }, ref) => (
|
|
43
|
-
<tfoot ref={ref} className={cn("bg-
|
|
43
|
+
<tfoot ref={ref} className={cn("bg-muted font-medium", className)} {...props} />
|
|
44
44
|
));
|
|
45
45
|
TableFooter.displayName = "TableFooter";
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTML
|
|
|
49
49
|
<tr
|
|
50
50
|
ref={ref}
|
|
51
51
|
className={cn(
|
|
52
|
-
"transition-colors hover:bg-
|
|
52
|
+
"transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
53
53
|
className,
|
|
54
54
|
)}
|
|
55
55
|
{...props}
|
|
@@ -65,7 +65,7 @@ const TableHead = React.forwardRef<
|
|
|
65
65
|
<th
|
|
66
66
|
ref={ref}
|
|
67
67
|
className={cn(
|
|
68
|
-
"px-6 py-3 text-left align-middle label text-
|
|
68
|
+
"px-6 py-3 text-left align-middle label text-muted-foreground",
|
|
69
69
|
"[&:has([role=checkbox])]:pr-0",
|
|
70
70
|
className,
|
|
71
71
|
)}
|
|
@@ -81,7 +81,7 @@ const TableCell = React.forwardRef<
|
|
|
81
81
|
<td
|
|
82
82
|
ref={ref}
|
|
83
83
|
className={cn(
|
|
84
|
-
"px-6 py-4 align-middle body text-
|
|
84
|
+
"px-6 py-4 align-middle body text-muted-foreground",
|
|
85
85
|
"[&:has([role=checkbox])]:pr-0",
|
|
86
86
|
className,
|
|
87
87
|
)}
|
|
@@ -94,7 +94,7 @@ const TableCaption = React.forwardRef<
|
|
|
94
94
|
HTMLTableCaptionElement,
|
|
95
95
|
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
96
96
|
>(({ className, ...props }, ref) => (
|
|
97
|
-
<caption ref={ref} className={cn("mt-4 caption text-
|
|
97
|
+
<caption ref={ref} className={cn("mt-4 caption text-muted-foreground", className)} {...props} />
|
|
98
98
|
));
|
|
99
99
|
TableCaption.displayName = "TableCaption";
|
|
100
100
|
|
package/src/components/tabs.tsx
CHANGED
|
@@ -18,7 +18,7 @@ const TabsList = React.forwardRef<
|
|
|
18
18
|
>(({ className, ...props }, ref) => (
|
|
19
19
|
<Tabs.List
|
|
20
20
|
ref={ref}
|
|
21
|
-
className={cn("inline-flex items-center gap-1 border-b border-
|
|
21
|
+
className={cn("inline-flex items-center gap-1 border-b border-border w-full", className)}
|
|
22
22
|
{...props}
|
|
23
23
|
/>
|
|
24
24
|
));
|
|
@@ -31,7 +31,7 @@ const TabsTrigger = React.forwardRef<
|
|
|
31
31
|
<Tabs.Trigger
|
|
32
32
|
ref={ref}
|
|
33
33
|
className={cn(
|
|
34
|
-
"px-0 pb-2.5 body font-medium text-
|
|
34
|
+
"px-0 pb-2.5 body font-medium text-muted-foreground",
|
|
35
35
|
"border-b-2 border-transparent -mb-px",
|
|
36
36
|
"transition-colors cursor-pointer",
|
|
37
37
|
"data-[state=active]:text-brand-primary data-[state=active]:border-brand-primary",
|
|
@@ -6,11 +6,11 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
|
6
6
|
<textarea
|
|
7
7
|
data-slot="textarea"
|
|
8
8
|
className={cn(
|
|
9
|
-
"flex min-h-[80px] w-full rounded-md border border-
|
|
10
|
-
"body text-
|
|
9
|
+
"flex min-h-[80px] w-full rounded-md border border-border bg-card px-3 py-2",
|
|
10
|
+
"body text-foreground placeholder:text-muted-foreground",
|
|
11
11
|
"resize-none transition-colors duration-150",
|
|
12
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
13
|
-
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-
|
|
12
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/20 focus-visible:border-border",
|
|
13
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted",
|
|
14
14
|
className,
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
@@ -18,19 +18,19 @@ const toggleVariants = cva(
|
|
|
18
18
|
variants: {
|
|
19
19
|
variant: {
|
|
20
20
|
default: [
|
|
21
|
-
"bg-transparent text-
|
|
22
|
-
"hover:bg-
|
|
23
|
-
"data-[state=on]:bg-
|
|
21
|
+
"bg-transparent text-muted-foreground",
|
|
22
|
+
"hover:bg-muted hover:text-foreground",
|
|
23
|
+
"data-[state=on]:bg-muted data-[state=on]:text-foreground",
|
|
24
24
|
],
|
|
25
25
|
outline: [
|
|
26
|
-
"border border-
|
|
27
|
-
"hover:bg-
|
|
28
|
-
"data-[state=on]:bg-
|
|
26
|
+
"border border-border bg-card text-muted-foreground shadow-natural",
|
|
27
|
+
"hover:bg-muted hover:text-foreground",
|
|
28
|
+
"data-[state=on]:bg-muted data-[state=on]:text-foreground data-[state=on]:border-border",
|
|
29
29
|
],
|
|
30
30
|
brand: [
|
|
31
|
-
"bg-transparent text-
|
|
32
|
-
"hover:bg-
|
|
33
|
-
"data-[state=on]:bg-brand-primary data-[state=on]:text-
|
|
31
|
+
"bg-transparent text-muted-foreground",
|
|
32
|
+
"hover:bg-muted hover:text-foreground",
|
|
33
|
+
"data-[state=on]:bg-brand-primary data-[state=on]:text-background",
|
|
34
34
|
],
|
|
35
35
|
},
|
|
36
36
|
size: {
|
|
@@ -27,7 +27,7 @@ const TooltipContent = React.forwardRef<
|
|
|
27
27
|
ref={ref}
|
|
28
28
|
sideOffset={sideOffset}
|
|
29
29
|
className={cn(
|
|
30
|
-
"z-50 rounded-lg bg-
|
|
30
|
+
"z-50 rounded-lg bg-foreground px-2.5 py-1.5 caption text-background",
|
|
31
31
|
"animate-in fade-in-0 zoom-in-95",
|
|
32
32
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
33
33
|
"data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",
|