@hilum/ui 0.1.1 → 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 +11 -7
- 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
- package/src/components/__tests__/data.test.tsx +0 -180
- package/src/components/__tests__/disclosure.test.tsx +0 -198
- package/src/components/__tests__/display.test.tsx +0 -262
- package/src/components/__tests__/feedback.test.tsx +0 -138
- package/src/components/__tests__/form.test.tsx +0 -297
- package/src/components/__tests__/layout.test.tsx +0 -388
- package/src/components/__tests__/overlay.test.tsx +0 -90
- package/src/components/__tests__/primitives.test.tsx +0 -248
package/src/components/field.tsx
CHANGED
|
@@ -11,6 +11,7 @@ interface FieldProps {
|
|
|
11
11
|
cornerHint?: string;
|
|
12
12
|
className?: string;
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
function Field({
|
|
@@ -22,24 +23,30 @@ function Field({
|
|
|
22
23
|
cornerHint,
|
|
23
24
|
className,
|
|
24
25
|
children,
|
|
26
|
+
ref,
|
|
25
27
|
}: FieldProps) {
|
|
28
|
+
// Predictable ID for the description/error paragraph so consumers can wire
|
|
29
|
+
// aria-describedby on the child input: aria-describedby={`${id}-description`}
|
|
30
|
+
const descriptionId = htmlFor ? `${htmlFor}-description` : undefined;
|
|
31
|
+
|
|
26
32
|
return (
|
|
27
|
-
<div className={cn("flex flex-col gap-1.5", className)}>
|
|
33
|
+
<div ref={ref} className={cn("flex flex-col gap-1.5", className)}>
|
|
28
34
|
<div className="flex items-center justify-between gap-2">
|
|
29
|
-
<Label htmlFor={htmlFor}>
|
|
35
|
+
<Label htmlFor={htmlFor} aria-required={required}>
|
|
30
36
|
{label}
|
|
31
|
-
{required && <span className="ml-0.5 text-red-600">*</span>}
|
|
37
|
+
{required && <span className="ml-0.5 text-red-600" aria-hidden="true">*</span>}
|
|
32
38
|
</Label>
|
|
33
|
-
{cornerHint && <span className="caption text-
|
|
39
|
+
{cornerHint && <span className="caption text-ground-400">{cornerHint}</span>}
|
|
34
40
|
</div>
|
|
35
41
|
{children}
|
|
36
42
|
{error ? (
|
|
37
|
-
<p className="caption text-red-600">{error}</p>
|
|
43
|
+
<p id={descriptionId} role="alert" className="caption text-red-600">{error}</p>
|
|
38
44
|
) : hint ? (
|
|
39
|
-
<p className="caption text-
|
|
45
|
+
<p id={descriptionId} className="caption text-ground-400">{hint}</p>
|
|
40
46
|
) : null}
|
|
41
47
|
</div>
|
|
42
48
|
);
|
|
43
49
|
}
|
|
50
|
+
Field.displayName = "Field";
|
|
44
51
|
|
|
45
52
|
export { Field };
|
|
@@ -58,18 +58,18 @@ function GridListCard({
|
|
|
58
58
|
const inner = (
|
|
59
59
|
<div
|
|
60
60
|
className={cn(
|
|
61
|
-
"flex h-full flex-col gap-1 rounded-xl border border-
|
|
61
|
+
"flex h-full flex-col gap-1 rounded-xl border border-ground-100 bg-white p-4 shadow-natural transition-shadow",
|
|
62
62
|
href && "hover:shadow-elevated",
|
|
63
63
|
className,
|
|
64
64
|
)}
|
|
65
65
|
>
|
|
66
66
|
{accent && <div className="mb-2">{accent}</div>}
|
|
67
|
-
<p className="body font-semibold text-
|
|
68
|
-
{description && <p className="caption text-
|
|
67
|
+
<p className="body font-semibold text-ground-900">{title}</p>
|
|
68
|
+
{description && <p className="caption text-ground-400">{description}</p>}
|
|
69
69
|
{(meta || trailing) && (
|
|
70
70
|
<div className="mt-auto flex items-center justify-between pt-3">
|
|
71
|
-
{meta && <span className="caption text-
|
|
72
|
-
{trailing && <span className="caption text-
|
|
71
|
+
{meta && <span className="caption text-ground-400">{meta}</span>}
|
|
72
|
+
{trailing && <span className="caption text-ground-400">{trailing}</span>}
|
|
73
73
|
</div>
|
|
74
74
|
)}
|
|
75
75
|
</div>
|
|
@@ -80,7 +80,7 @@ function GridListCard({
|
|
|
80
80
|
{href ? (
|
|
81
81
|
<a
|
|
82
82
|
href={href}
|
|
83
|
-
className="block h-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
83
|
+
className="block h-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ground-400/40 rounded-xl"
|
|
84
84
|
>
|
|
85
85
|
{inner}
|
|
86
86
|
</a>
|
|
@@ -109,7 +109,7 @@ function GridListAccentCard({
|
|
|
109
109
|
title,
|
|
110
110
|
meta,
|
|
111
111
|
href,
|
|
112
|
-
accentClass = "bg-
|
|
112
|
+
accentClass = "bg-ground-900",
|
|
113
113
|
initials,
|
|
114
114
|
trailing,
|
|
115
115
|
className,
|
|
@@ -117,7 +117,7 @@ function GridListAccentCard({
|
|
|
117
117
|
const inner = (
|
|
118
118
|
<div
|
|
119
119
|
className={cn(
|
|
120
|
-
"flex overflow-hidden rounded-xl border border-
|
|
120
|
+
"flex overflow-hidden rounded-xl border border-ground-100 bg-white shadow-natural transition-shadow",
|
|
121
121
|
href && "hover:shadow-elevated",
|
|
122
122
|
className,
|
|
123
123
|
)}
|
|
@@ -130,10 +130,10 @@ function GridListAccentCard({
|
|
|
130
130
|
>
|
|
131
131
|
{initials}
|
|
132
132
|
</div>
|
|
133
|
-
<div className="flex flex-1 items-center justify-between truncate border-l border-
|
|
133
|
+
<div className="flex flex-1 items-center justify-between truncate border-l border-ground-100 px-4 py-3">
|
|
134
134
|
<div className="min-w-0">
|
|
135
|
-
<p className="body font-semibold text-
|
|
136
|
-
{meta && <p className="caption text-
|
|
135
|
+
<p className="body font-semibold text-ground-900 truncate">{title}</p>
|
|
136
|
+
{meta && <p className="caption text-ground-400">{meta}</p>}
|
|
137
137
|
</div>
|
|
138
138
|
{trailing && <div className="shrink-0 pl-2">{trailing}</div>}
|
|
139
139
|
</div>
|
|
@@ -145,7 +145,7 @@ function GridListAccentCard({
|
|
|
145
145
|
{href ? (
|
|
146
146
|
<a
|
|
147
147
|
href={href}
|
|
148
|
-
className="block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
148
|
+
className="block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ground-400/40 rounded-xl"
|
|
149
149
|
>
|
|
150
150
|
{inner}
|
|
151
151
|
</a>
|
|
@@ -17,7 +17,7 @@ const HoverCardContent = React.forwardRef<
|
|
|
17
17
|
align={align}
|
|
18
18
|
sideOffset={sideOffset}
|
|
19
19
|
className={cn(
|
|
20
|
-
"z-50 w-64 rounded-xl border border-
|
|
20
|
+
"z-50 w-64 rounded-xl border border-ground-100 bg-white p-4 shadow-elevated outline-none",
|
|
21
21
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
22
22
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
23
23
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -34,11 +34,11 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
34
34
|
const hasTrailing = trailingAddon || trailingIcon || trailingButton || error;
|
|
35
35
|
|
|
36
36
|
const baseInput = cn(
|
|
37
|
-
"flex h-9 w-full border bg-white body text-
|
|
37
|
+
"flex h-9 w-full border bg-white body text-ground-900 placeholder:text-ground-400",
|
|
38
38
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:disabled:cursor-not-allowed disabled:opacity-50",
|
|
39
39
|
error
|
|
40
40
|
? "border-red-400 focus-visible:ring-red-200 focus-visible:border-red-500"
|
|
41
|
-
: "border-
|
|
41
|
+
: "border-ground-200 focus-visible:ring-brand-primary/20 focus-visible:border-brand-primary",
|
|
42
42
|
);
|
|
43
43
|
|
|
44
44
|
if (!hasLeading && !hasTrailing) {
|
|
@@ -51,8 +51,8 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
51
51
|
{leadingAddon && (
|
|
52
52
|
<span
|
|
53
53
|
className={cn(
|
|
54
|
-
"inline-flex items-center border border-r-0 bg-
|
|
55
|
-
error ? "border-red-400" : "border-
|
|
54
|
+
"inline-flex items-center border border-r-0 bg-ground-50 px-3 body text-ground-500 select-none",
|
|
55
|
+
error ? "border-red-400" : "border-ground-200",
|
|
56
56
|
pill ? "rounded-l-full" : "rounded-l-lg",
|
|
57
57
|
)}
|
|
58
58
|
>
|
|
@@ -63,7 +63,7 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
63
63
|
{/* Relative wrapper for icon-only inputs */}
|
|
64
64
|
<div className="relative flex-1">
|
|
65
65
|
{leadingIcon && (
|
|
66
|
-
<div className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-
|
|
66
|
+
<div className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-ground-400">
|
|
67
67
|
{leadingIcon}
|
|
68
68
|
</div>
|
|
69
69
|
)}
|
|
@@ -104,7 +104,7 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
104
104
|
{error ? (
|
|
105
105
|
<AlertCircle size={15} className="text-red-500" />
|
|
106
106
|
) : (
|
|
107
|
-
<span className="text-
|
|
107
|
+
<span className="text-ground-400">{trailingIcon}</span>
|
|
108
108
|
)}
|
|
109
109
|
</div>
|
|
110
110
|
)}
|
|
@@ -114,8 +114,8 @@ const InputGroup = React.forwardRef<HTMLInputElement, InputGroupProps>(
|
|
|
114
114
|
{trailingAddon && (
|
|
115
115
|
<span
|
|
116
116
|
className={cn(
|
|
117
|
-
"inline-flex items-center border border-l-0 bg-
|
|
118
|
-
error ? "border-red-400" : "border-
|
|
117
|
+
"inline-flex items-center border border-l-0 bg-ground-50 px-3 body text-ground-500 select-none",
|
|
118
|
+
error ? "border-red-400" : "border-ground-200",
|
|
119
119
|
pill ? "rounded-r-full" : "rounded-r-lg",
|
|
120
120
|
)}
|
|
121
121
|
>
|
|
@@ -81,7 +81,7 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
|
|
|
81
81
|
return (
|
|
82
82
|
<div
|
|
83
83
|
className={cn(
|
|
84
|
-
"inline-flex h-8 items-stretch rounded-md border border-
|
|
84
|
+
"inline-flex h-8 items-stretch rounded-md border border-ground-200 bg-white overflow-hidden",
|
|
85
85
|
"focus-within:ring-2 focus-within:ring-brand-primary/20 focus-within:border-brand-primary",
|
|
86
86
|
disabled && "opacity-50 pointer-events-none",
|
|
87
87
|
className,
|
|
@@ -97,34 +97,34 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>(
|
|
|
97
97
|
onBlur={(e) => commit(e.target.value)}
|
|
98
98
|
onKeyDown={onKeyDown}
|
|
99
99
|
disabled={disabled}
|
|
100
|
-
className="w-full caption text-
|
|
100
|
+
className="w-full caption text-ground-900 px-2 bg-transparent focus:outline-none [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none text-right"
|
|
101
101
|
{...rest}
|
|
102
102
|
/>
|
|
103
103
|
{unit && (
|
|
104
|
-
<span aria-hidden className="caption-xs text-
|
|
104
|
+
<span aria-hidden className="caption-xs text-ground-400 self-center pr-1.5 select-none">
|
|
105
105
|
{unit}
|
|
106
106
|
</span>
|
|
107
107
|
)}
|
|
108
108
|
{!hideSteppers && (
|
|
109
|
-
<div className="flex flex-col border-l border-
|
|
109
|
+
<div className="flex flex-col border-l border-ground-100">
|
|
110
110
|
<button
|
|
111
111
|
type="button"
|
|
112
112
|
tabIndex={-1}
|
|
113
113
|
onClick={() => bump(step)}
|
|
114
114
|
aria-label="Increment"
|
|
115
|
-
className="flex-1 px-1 hover:bg-
|
|
115
|
+
className="flex-1 px-1 hover:bg-ground-50 active:bg-ground-100 transition-colors text-ground-500"
|
|
116
116
|
>
|
|
117
117
|
<svg viewBox="0 0 8 5" width="8" height="5" fill="currentColor">
|
|
118
118
|
<path d="M0 5 L4 0 L8 5 Z" />
|
|
119
119
|
</svg>
|
|
120
120
|
</button>
|
|
121
|
-
<div className="border-t border-
|
|
121
|
+
<div className="border-t border-ground-100" />
|
|
122
122
|
<button
|
|
123
123
|
type="button"
|
|
124
124
|
tabIndex={-1}
|
|
125
125
|
onClick={() => bump(-step)}
|
|
126
126
|
aria-label="Decrement"
|
|
127
|
-
className="flex-1 px-1 hover:bg-
|
|
127
|
+
className="flex-1 px-1 hover:bg-ground-50 active:bg-ground-100 transition-colors text-ground-500"
|
|
128
128
|
>
|
|
129
129
|
<svg viewBox="0 0 8 5" width="8" height="5" fill="currentColor">
|
|
130
130
|
<path d="M0 0 L4 5 L8 0 Z" />
|
|
@@ -37,7 +37,7 @@ const InputOTPSlot = React.forwardRef<
|
|
|
37
37
|
ref={ref}
|
|
38
38
|
className={cn(
|
|
39
39
|
"relative flex h-12 w-11 items-center justify-center",
|
|
40
|
-
"border-y border-r border-
|
|
40
|
+
"border-y border-r border-ground-200 body font-medium text-ground-900",
|
|
41
41
|
"first:rounded-l-xl first:border-l last:rounded-r-xl",
|
|
42
42
|
"transition-all",
|
|
43
43
|
isActive && "z-10 ring-2 ring-brand-primary/40 border-brand-primary",
|
|
@@ -48,7 +48,7 @@ const InputOTPSlot = React.forwardRef<
|
|
|
48
48
|
{char}
|
|
49
49
|
{hasFakeCaret && (
|
|
50
50
|
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
51
|
-
<div className="h-5 w-px animate-caret-blink bg-
|
|
51
|
+
<div className="h-5 w-px animate-caret-blink bg-ground-900 duration-1000" />
|
|
52
52
|
</div>
|
|
53
53
|
)}
|
|
54
54
|
</div>
|
|
@@ -59,7 +59,7 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
59
59
|
const InputOTPSeparator = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
60
60
|
({ ...props }, ref) => (
|
|
61
61
|
<div ref={ref} role="separator" {...props}>
|
|
62
|
-
<Minus size={14} className="text-
|
|
62
|
+
<Minus size={14} className="text-ground-300" />
|
|
63
63
|
</div>
|
|
64
64
|
),
|
|
65
65
|
);
|
package/src/components/input.tsx
CHANGED
|
@@ -7,17 +7,18 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
7
7
|
type={type}
|
|
8
8
|
data-slot="input"
|
|
9
9
|
className={cn(
|
|
10
|
-
"flex h-9 w-full rounded-md border border-
|
|
11
|
-
"body text-
|
|
10
|
+
"flex h-9 w-full rounded-md border border-ground-200 bg-white px-3 py-1",
|
|
11
|
+
"body text-ground-900 placeholder:text-ground-400",
|
|
12
12
|
"transition-colors duration-150",
|
|
13
13
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/20 focus-visible:border-brand-primary",
|
|
14
|
-
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-
|
|
15
|
-
"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-
|
|
14
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-ground-50",
|
|
15
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-ground-900",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
19
19
|
/>
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
+
Input.displayName = "Input";
|
|
22
23
|
|
|
23
24
|
export { Input };
|
package/src/components/kbd.tsx
CHANGED
|
@@ -6,7 +6,7 @@ const Kbd = React.forwardRef<HTMLElement, React.ComponentProps<"kbd">>(
|
|
|
6
6
|
<kbd
|
|
7
7
|
ref={ref}
|
|
8
8
|
className={cn(
|
|
9
|
-
"inline-flex h-5 min-w-5 items-center justify-center rounded border border-
|
|
9
|
+
"inline-flex h-5 min-w-5 items-center justify-center rounded border border-ground-200 bg-ground-50 px-1.5 font-mono caption-xs font-medium text-ground-500",
|
|
10
10
|
className,
|
|
11
11
|
)}
|
|
12
12
|
{...props}
|
package/src/components/label.tsx
CHANGED
|
@@ -11,7 +11,7 @@ const Label = React.forwardRef<
|
|
|
11
11
|
<LabelPrimitive.Root
|
|
12
12
|
ref={ref}
|
|
13
13
|
className={cn(
|
|
14
|
-
"body font-medium leading-none text-
|
|
14
|
+
"body font-medium leading-none text-ground-700",
|
|
15
15
|
"peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
@@ -12,7 +12,7 @@ const MenubarRoot = React.forwardRef<
|
|
|
12
12
|
<Menubar.Root
|
|
13
13
|
ref={ref}
|
|
14
14
|
className={cn(
|
|
15
|
-
"flex h-9 items-center gap-0.5 rounded-lg border border-
|
|
15
|
+
"flex h-9 items-center gap-0.5 rounded-lg border border-ground-100 bg-white px-1",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -35,10 +35,10 @@ const MenubarTrigger = React.forwardRef<
|
|
|
35
35
|
<Menubar.Trigger
|
|
36
36
|
ref={ref}
|
|
37
37
|
className={cn(
|
|
38
|
-
"flex cursor-default items-center rounded-md px-3 py-1 body font-medium text-
|
|
39
|
-
"hover:bg-
|
|
40
|
-
"data-[state=open]:bg-
|
|
41
|
-
"focus:bg-
|
|
38
|
+
"flex cursor-default items-center rounded-md px-3 py-1 body font-medium text-ground-700 select-none outline-none",
|
|
39
|
+
"hover:bg-ground-50",
|
|
40
|
+
"data-[state=open]:bg-ground-100 data-[state=open]:text-ground-900",
|
|
41
|
+
"focus:bg-ground-50",
|
|
42
42
|
className,
|
|
43
43
|
)}
|
|
44
44
|
{...props}
|
|
@@ -81,8 +81,8 @@ const MenubarItem = React.forwardRef<
|
|
|
81
81
|
ref={ref}
|
|
82
82
|
className={cn(
|
|
83
83
|
"relative flex cursor-default select-none items-center gap-2 rounded-md px-2.5 py-1.5",
|
|
84
|
-
"body text-
|
|
85
|
-
"focus:bg-
|
|
84
|
+
"body text-ground-700 outline-none transition-colors",
|
|
85
|
+
"focus:bg-ground-50 focus:text-ground-900",
|
|
86
86
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
87
87
|
inset && "pl-8",
|
|
88
88
|
className,
|
|
@@ -95,22 +95,21 @@ MenubarItem.displayName = "MenubarItem";
|
|
|
95
95
|
const MenubarCheckboxItem = React.forwardRef<
|
|
96
96
|
React.ComponentRef<typeof Menubar.CheckboxItem>,
|
|
97
97
|
React.ComponentPropsWithoutRef<typeof Menubar.CheckboxItem>
|
|
98
|
-
>(({ className, children,
|
|
98
|
+
>(({ className, children, ...props }, ref) => (
|
|
99
99
|
<Menubar.CheckboxItem
|
|
100
100
|
ref={ref}
|
|
101
101
|
className={cn(
|
|
102
102
|
"relative flex cursor-default select-none items-center gap-2 rounded-md pl-8 pr-2.5 py-1.5",
|
|
103
|
-
"body text-
|
|
104
|
-
"focus:bg-
|
|
103
|
+
"body text-ground-700 outline-none transition-colors",
|
|
104
|
+
"focus:bg-ground-50 focus:text-ground-900",
|
|
105
105
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
106
106
|
className,
|
|
107
107
|
)}
|
|
108
|
-
checked={checked}
|
|
109
108
|
{...props}
|
|
110
109
|
>
|
|
111
110
|
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
|
112
111
|
<Menubar.ItemIndicator>
|
|
113
|
-
<Check size={13} className="text-
|
|
112
|
+
<Check size={13} className="text-ground-900" />
|
|
114
113
|
</Menubar.ItemIndicator>
|
|
115
114
|
</span>
|
|
116
115
|
{children}
|
|
@@ -126,8 +125,8 @@ const MenubarRadioItem = React.forwardRef<
|
|
|
126
125
|
ref={ref}
|
|
127
126
|
className={cn(
|
|
128
127
|
"relative flex cursor-default select-none items-center gap-2 rounded-md pl-8 pr-2.5 py-1.5",
|
|
129
|
-
"body text-
|
|
130
|
-
"focus:bg-
|
|
128
|
+
"body text-ground-700 outline-none transition-colors",
|
|
129
|
+
"focus:bg-ground-50 focus:text-ground-900",
|
|
131
130
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
132
131
|
className,
|
|
133
132
|
)}
|
|
@@ -135,7 +134,7 @@ const MenubarRadioItem = React.forwardRef<
|
|
|
135
134
|
>
|
|
136
135
|
<span className="absolute left-2 flex size-3.5 items-center justify-center">
|
|
137
136
|
<Menubar.ItemIndicator>
|
|
138
|
-
<Circle size={8} className="fill-
|
|
137
|
+
<Circle size={8} className="fill-ground-900 text-ground-900" />
|
|
139
138
|
</Menubar.ItemIndicator>
|
|
140
139
|
</span>
|
|
141
140
|
{children}
|
|
@@ -151,7 +150,7 @@ const MenubarLabel = React.forwardRef<
|
|
|
151
150
|
>(({ className, inset, ...props }, ref) => (
|
|
152
151
|
<Menubar.Label
|
|
153
152
|
ref={ref}
|
|
154
|
-
className={cn("px-2.5 py-1 label text-
|
|
153
|
+
className={cn("px-2.5 py-1 label text-ground-400", inset && "pl-8", className)}
|
|
155
154
|
{...props}
|
|
156
155
|
/>
|
|
157
156
|
));
|
|
@@ -163,7 +162,7 @@ const MenubarSeparator = React.forwardRef<
|
|
|
163
162
|
>(({ className, ...props }, ref) => (
|
|
164
163
|
<Menubar.Separator
|
|
165
164
|
ref={ref}
|
|
166
|
-
className={cn("mx-1 my-1 h-px bg-
|
|
165
|
+
className={cn("mx-1 my-1 h-px bg-ground-100", className)}
|
|
167
166
|
{...props}
|
|
168
167
|
/>
|
|
169
168
|
));
|
|
@@ -179,15 +178,15 @@ const MenubarSubTrigger = React.forwardRef<
|
|
|
179
178
|
ref={ref}
|
|
180
179
|
className={cn(
|
|
181
180
|
"relative flex cursor-default select-none items-center gap-2 rounded-md px-2.5 py-1.5",
|
|
182
|
-
"body text-
|
|
183
|
-
"focus:bg-
|
|
181
|
+
"body text-ground-700 outline-none transition-colors",
|
|
182
|
+
"focus:bg-ground-50 focus:text-ground-900 data-[state=open]:bg-ground-50",
|
|
184
183
|
inset && "pl-8",
|
|
185
184
|
className,
|
|
186
185
|
)}
|
|
187
186
|
{...props}
|
|
188
187
|
>
|
|
189
188
|
{children}
|
|
190
|
-
<ChevronRight size={14} className="ml-auto text-
|
|
189
|
+
<ChevronRight size={14} className="ml-auto text-ground-400" />
|
|
191
190
|
</Menubar.SubTrigger>
|
|
192
191
|
));
|
|
193
192
|
MenubarSubTrigger.displayName = "MenubarSubTrigger";
|
|
@@ -199,7 +198,7 @@ const MenubarSubContent = React.forwardRef<
|
|
|
199
198
|
<Menubar.SubContent
|
|
200
199
|
ref={ref}
|
|
201
200
|
className={cn(
|
|
202
|
-
"z-50 min-w-[8rem] bg-white rounded-xl border border-
|
|
201
|
+
"z-50 min-w-[8rem] bg-white rounded-xl border border-ground-100 shadow-natural p-1",
|
|
203
202
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
204
203
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
205
204
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -212,7 +211,7 @@ const MenubarSubContent = React.forwardRef<
|
|
|
212
211
|
MenubarSubContent.displayName = "MenubarSubContent";
|
|
213
212
|
|
|
214
213
|
function MenubarShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {
|
|
215
|
-
return <span className={cn("ml-auto caption text-
|
|
214
|
+
return <span className={cn("ml-auto caption text-ground-400", className)} {...props} />;
|
|
216
215
|
}
|
|
217
216
|
MenubarShortcut.displayName = "MenubarShortcut";
|
|
218
217
|
|
|
@@ -10,9 +10,9 @@ const NativeSelect = React.forwardRef<
|
|
|
10
10
|
<select
|
|
11
11
|
ref={ref}
|
|
12
12
|
className={cn(
|
|
13
|
-
"peer h-9 w-full appearance-none rounded-lg border border-
|
|
14
|
-
"body text-
|
|
15
|
-
"focus:outline-none focus:ring-2 focus:ring-
|
|
13
|
+
"peer h-9 w-full appearance-none rounded-lg border border-ground-200 bg-white pl-3 pr-8",
|
|
14
|
+
"body text-ground-900",
|
|
15
|
+
"focus:outline-none focus:ring-2 focus:ring-ground-400/30 focus:border-ground-400",
|
|
16
16
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
17
|
"aria-[invalid=true]:border-red-500 aria-[invalid=true]:focus:ring-red-500/20",
|
|
18
18
|
className,
|
|
@@ -23,7 +23,7 @@ const NativeSelect = React.forwardRef<
|
|
|
23
23
|
</select>
|
|
24
24
|
<ChevronDown
|
|
25
25
|
size={14}
|
|
26
|
-
className="pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-
|
|
26
|
+
className="pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-ground-400 peer-disabled:opacity-50"
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
));
|
|
@@ -41,9 +41,9 @@ const NavigationMenuTrigger = React.forwardRef<
|
|
|
41
41
|
ref={ref}
|
|
42
42
|
className={cn(
|
|
43
43
|
"group inline-flex h-9 w-max items-center justify-center gap-1 rounded-md px-3 py-2",
|
|
44
|
-
"body font-medium text-
|
|
45
|
-
"hover:bg-
|
|
46
|
-
"data-[active]:bg-
|
|
44
|
+
"body font-medium text-ground-700",
|
|
45
|
+
"hover:bg-ground-100 hover:text-ground-900",
|
|
46
|
+
"data-[active]:bg-ground-100 data-[state=open]:bg-ground-100",
|
|
47
47
|
"outline-none transition-colors",
|
|
48
48
|
className,
|
|
49
49
|
)}
|
|
@@ -86,8 +86,8 @@ const NavigationMenuLink = React.forwardRef<
|
|
|
86
86
|
<NavigationMenu.Link
|
|
87
87
|
ref={ref}
|
|
88
88
|
className={cn(
|
|
89
|
-
"block select-none rounded-md px-3 py-2 body text-
|
|
90
|
-
"hover:bg-
|
|
89
|
+
"block select-none rounded-md px-3 py-2 body text-ground-700",
|
|
90
|
+
"hover:bg-ground-50 hover:text-ground-900",
|
|
91
91
|
"outline-none transition-colors",
|
|
92
92
|
className,
|
|
93
93
|
)}
|
|
@@ -104,7 +104,7 @@ const NavigationMenuViewport = React.forwardRef<
|
|
|
104
104
|
<NavigationMenu.Viewport
|
|
105
105
|
ref={ref}
|
|
106
106
|
className={cn(
|
|
107
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-xl border border-
|
|
107
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-xl border border-ground-100 bg-white shadow-elevated",
|
|
108
108
|
"md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
109
109
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
110
110
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90",
|
|
@@ -130,7 +130,7 @@ const NavigationMenuIndicator = React.forwardRef<
|
|
|
130
130
|
)}
|
|
131
131
|
{...props}
|
|
132
132
|
>
|
|
133
|
-
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-
|
|
133
|
+
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-ground-100 shadow-elevated" />
|
|
134
134
|
</NavigationMenu.Indicator>
|
|
135
135
|
));
|
|
136
136
|
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
@@ -138,9 +138,9 @@ NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
|
138
138
|
function navigationMenuTriggerStyle() {
|
|
139
139
|
return cn(
|
|
140
140
|
"group inline-flex h-9 w-max items-center justify-center gap-1 rounded-md px-3 py-2",
|
|
141
|
-
"body font-medium text-
|
|
142
|
-
"hover:bg-
|
|
143
|
-
"data-[active]:bg-
|
|
141
|
+
"body font-medium text-ground-700",
|
|
142
|
+
"hover:bg-ground-100 hover:text-ground-900",
|
|
143
|
+
"data-[active]:bg-ground-100 data-[state=open]:bg-ground-100",
|
|
144
144
|
"outline-none transition-colors",
|
|
145
145
|
);
|
|
146
146
|
}
|
|
@@ -19,17 +19,17 @@ interface NotificationProps {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const variantConfig = {
|
|
22
|
-
default: { icon: null, iconClass: "text-
|
|
22
|
+
default: { icon: null, iconClass: "text-ground-400" },
|
|
23
23
|
success: {
|
|
24
24
|
icon: CheckCircle,
|
|
25
|
-
iconClass: "bg-brand-secondary/25 text-
|
|
25
|
+
iconClass: "bg-brand-secondary/25 text-ground-700 rounded-full p-1",
|
|
26
26
|
},
|
|
27
27
|
error: { icon: AlertCircle, iconClass: "text-red-500" },
|
|
28
28
|
warning: {
|
|
29
29
|
icon: AlertTriangle,
|
|
30
|
-
iconClass: "bg-brand-secondary/80 text-
|
|
30
|
+
iconClass: "bg-brand-secondary/80 text-ground-700 rounded-full p-1",
|
|
31
31
|
},
|
|
32
|
-
info: { icon: Info, iconClass: "text-
|
|
32
|
+
info: { icon: Info, iconClass: "text-ground-400" },
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
function Notification({
|
|
@@ -49,7 +49,7 @@ function Notification({
|
|
|
49
49
|
return (
|
|
50
50
|
<div
|
|
51
51
|
className={cn(
|
|
52
|
-
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-xl border border-
|
|
52
|
+
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-xl border border-ground-100 bg-white shadow-elevated",
|
|
53
53
|
className,
|
|
54
54
|
)}
|
|
55
55
|
>
|
|
@@ -62,8 +62,8 @@ function Notification({
|
|
|
62
62
|
|
|
63
63
|
{/* Body */}
|
|
64
64
|
<div className="min-w-0 flex-1">
|
|
65
|
-
<p className="body font-semibold text-
|
|
66
|
-
{description && <p className="mt-0.5 body text-
|
|
65
|
+
<p className="body font-semibold text-ground-900">{title}</p>
|
|
66
|
+
{description && <p className="mt-0.5 body text-ground-500">{description}</p>}
|
|
67
67
|
|
|
68
68
|
{/* Actions */}
|
|
69
69
|
{actions && actions.length > 0 && (
|
|
@@ -76,8 +76,8 @@ function Notification({
|
|
|
76
76
|
className={cn(
|
|
77
77
|
"body font-semibold transition-colors",
|
|
78
78
|
action.variant === "ghost"
|
|
79
|
-
? "text-
|
|
80
|
-
: "text-
|
|
79
|
+
? "text-ground-400 hover:text-ground-700"
|
|
80
|
+
: "text-ground-900 hover:text-ground-600",
|
|
81
81
|
)}
|
|
82
82
|
>
|
|
83
83
|
{action.label}
|
|
@@ -93,7 +93,7 @@ function Notification({
|
|
|
93
93
|
<button
|
|
94
94
|
type="button"
|
|
95
95
|
onClick={onClose}
|
|
96
|
-
className="rounded-md text-
|
|
96
|
+
className="rounded-md text-ground-400 hover:text-ground-600 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ground-400/40"
|
|
97
97
|
>
|
|
98
98
|
<span className="sr-only">Close</span>
|
|
99
99
|
<X size={16} />
|
|
@@ -42,22 +42,22 @@ function PageHeading({
|
|
|
42
42
|
className,
|
|
43
43
|
}: PageHeadingProps) {
|
|
44
44
|
return (
|
|
45
|
-
<div className={cn("border-b border-
|
|
45
|
+
<div className={cn("border-b border-ground-100 pb-6", className)}>
|
|
46
46
|
{/* Breadcrumbs */}
|
|
47
47
|
{breadcrumbs && breadcrumbs.length > 0 && (
|
|
48
48
|
<nav className="mb-3 flex items-center gap-1.5" aria-label="Breadcrumb">
|
|
49
49
|
{breadcrumbs.map((crumb, i) => (
|
|
50
50
|
<React.Fragment key={i}>
|
|
51
|
-
{i > 0 && <ChevronRight size={12} className="text-
|
|
51
|
+
{i > 0 && <ChevronRight size={12} className="text-ground-300 shrink-0" />}
|
|
52
52
|
{crumb.href ? (
|
|
53
53
|
<a
|
|
54
54
|
href={crumb.href}
|
|
55
|
-
className="caption text-
|
|
55
|
+
className="caption text-ground-400 hover:text-ground-700 transition-colors"
|
|
56
56
|
>
|
|
57
57
|
{crumb.label}
|
|
58
58
|
</a>
|
|
59
59
|
) : (
|
|
60
|
-
<span className="caption font-semibold text-
|
|
60
|
+
<span className="caption font-semibold text-ground-700">{crumb.label}</span>
|
|
61
61
|
)}
|
|
62
62
|
</React.Fragment>
|
|
63
63
|
))}
|
|
@@ -68,7 +68,7 @@ function PageHeading({
|
|
|
68
68
|
<div className="flex flex-wrap items-start justify-between gap-4">
|
|
69
69
|
<div className="min-w-0 flex-1">
|
|
70
70
|
<div className="flex items-center gap-3">
|
|
71
|
-
<h1 className="display text-
|
|
71
|
+
<h1 className="display text-ground-900 truncate">{title}</h1>
|
|
72
72
|
{badge &&
|
|
73
73
|
(typeof badge === "string" ? (
|
|
74
74
|
<Badge variant="secondary">{badge}</Badge>
|
|
@@ -76,14 +76,14 @@ function PageHeading({
|
|
|
76
76
|
<Badge variant={badge.variant ?? "secondary"}>{badge.label}</Badge>
|
|
77
77
|
))}
|
|
78
78
|
</div>
|
|
79
|
-
{description && <p className="mt-1.5 body text-
|
|
79
|
+
{description && <p className="mt-1.5 body text-ground-400 max-w-2xl">{description}</p>}
|
|
80
80
|
|
|
81
81
|
{/* Meta */}
|
|
82
82
|
{meta && meta.length > 0 && (
|
|
83
83
|
<div className="mt-3 flex flex-wrap items-center gap-4">
|
|
84
84
|
{meta.map((m, i) => (
|
|
85
|
-
<div key={i} className="flex items-center gap-1.5 caption text-
|
|
86
|
-
{m.icon && <span className="text-
|
|
85
|
+
<div key={i} className="flex items-center gap-1.5 caption text-ground-400">
|
|
86
|
+
{m.icon && <span className="text-ground-400">{m.icon}</span>}
|
|
87
87
|
<span>{m.text}</span>
|
|
88
88
|
</div>
|
|
89
89
|
))}
|
|
@@ -70,7 +70,7 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
70
70
|
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
|
|
71
71
|
<span
|
|
72
72
|
aria-hidden
|
|
73
|
-
className={cn("flex size-8 items-center justify-center text-
|
|
73
|
+
className={cn("flex size-8 items-center justify-center text-ground-400", className)}
|
|
74
74
|
{...props}
|
|
75
75
|
>
|
|
76
76
|
<MoreHorizontal size={14} />
|