@hilum/ui 3.2.3 → 3.2.5
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/dist/index.d.ts +348 -32
- package/dist/index.js +2511 -676
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/alert-dialog.tsx +19 -6
- package/src/components/callout.tsx +99 -0
- package/src/components/card.tsx +13 -0
- package/src/components/chart.tsx +398 -29
- package/src/components/color-picker.tsx +39 -45
- package/src/components/combobox.tsx +83 -64
- package/src/components/command.tsx +35 -0
- package/src/components/context-menu.tsx +49 -27
- package/src/components/data-transfer-controls.tsx +156 -0
- package/src/components/dialog.tsx +19 -6
- package/src/components/dropdown-menu.tsx +50 -28
- package/src/components/file-dropzone.tsx +171 -0
- package/src/components/help-tooltip.tsx +90 -0
- package/src/components/media-asset-card.tsx +118 -0
- package/src/components/menubar.tsx +52 -30
- package/src/components/popover.tsx +31 -17
- package/src/components/rich-text-editor.tsx +448 -0
- package/src/components/searchable-table.tsx +412 -0
- package/src/components/select.tsx +44 -28
- package/src/components/sidebar.tsx +105 -14
- package/src/components/stat-card.tsx +122 -8
- package/src/components/status-badge.tsx +144 -0
- package/src/components/titled-card.tsx +102 -0
- package/src/components/url-redirect-prompt.tsx +85 -0
- package/src/index.ts +10 -0
- package/src/lib/mobile-popper-sheet.ts +78 -0
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { tokens } from './chunk-MAHPAP65.js';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import * as
|
|
5
|
-
import { DropdownMenu, Avatar as Avatar$1, Accordion, AlertDialog, AspectRatio, Checkbox, Collapsible, Dialog, ContextMenu,
|
|
6
|
-
import { Check, Circle, ChevronRight, ChevronDown, Minus, X, Search,
|
|
7
|
-
import {
|
|
4
|
+
import * as React19 from 'react';
|
|
5
|
+
import { DropdownMenu, Avatar as Avatar$1, Accordion, AlertDialog, AspectRatio, Checkbox, Collapsible, Popover, Dialog, ContextMenu, Select, Label as Label$1, Tooltip, HoverCard, Menubar, NavigationMenu, Progress, RadioGroup, Separator, ScrollArea, Slider, Switch, Tabs, Toggle, ToggleGroup, Slot } from 'radix-ui';
|
|
6
|
+
import { Check, Circle, ChevronRight, ChevronDown, Minus, X, Search, ChevronUp, AlertCircle, MoreHorizontal, ChevronLeft, ArrowLeft, ArrowRight, ChevronsUpDown, CalendarIcon, Upload, File, CircleHelp, Info, AlertTriangle, CheckCircle, GripVertical, Bold, Italic, Underline, Strikethrough, Heading1, Heading2, Heading3, List, ListOrdered, AlignLeft, FileText, Link, Image, Filter, ArrowUp, ArrowDown, PanelLeft, TrendingDown, TrendingUp, Plus, Download, XCircle, Loader2 } from 'lucide-react';
|
|
7
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import { DayPicker } from 'react-day-picker';
|
|
10
10
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
11
|
-
import
|
|
11
|
+
import * as RechartsPrimitive from 'recharts';
|
|
12
12
|
export { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, Legend, Line, LineChart, Pie, PieChart, Tooltip as RechartsTooltip, XAxis, YAxis } from 'recharts';
|
|
13
13
|
import { useReactTable, getPaginationRowModel, getFilteredRowModel, getSortedRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
|
|
14
14
|
export { createColumnHelper } from '@tanstack/react-table';
|
|
@@ -20,31 +20,111 @@ import { Toaster as Toaster$1 } from 'sonner';
|
|
|
20
20
|
function cn(...inputs) {
|
|
21
21
|
return twMerge(clsx(inputs));
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
// src/lib/mobile-popper-sheet.ts
|
|
25
|
+
var mobileDialogSheetContentClassName = [
|
|
26
|
+
"fixed inset-x-0 bottom-0 z-50 max-h-[calc(100dvh-1rem)] w-full overflow-y-auto",
|
|
27
|
+
"rounded-t-2xl border border-border bg-card p-6 shadow-elevated",
|
|
28
|
+
"max-sm:pb-[calc(1.5rem+env(safe-area-inset-bottom))] max-sm:pt-8",
|
|
29
|
+
"max-sm:before:absolute max-sm:before:left-1/2 max-sm:before:top-3 max-sm:before:h-1 max-sm:before:w-9",
|
|
30
|
+
"max-sm:before:-translate-x-1/2 max-sm:before:rounded-full max-sm:before:bg-muted-foreground/35"
|
|
31
|
+
].join(" ");
|
|
32
|
+
var desktopDialogContentClassName = "sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[calc(100dvh-2rem)] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-2xl";
|
|
33
|
+
var dialogSheetMotionClassName = [
|
|
34
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
35
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
36
|
+
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
37
|
+
"sm:data-[state=closed]:zoom-out-95 sm:data-[state=open]:zoom-in-95"
|
|
38
|
+
].join(" ");
|
|
39
|
+
var mobilePopperSheetPositionClassName = [
|
|
40
|
+
"max-sm:!fixed max-sm:!inset-x-3 max-sm:!bottom-3 max-sm:!top-auto max-sm:!left-3 max-sm:!right-3",
|
|
41
|
+
"max-sm:!w-auto max-sm:!min-w-0 max-sm:!max-w-none max-sm:!transform-none"
|
|
42
|
+
].join(" ");
|
|
43
|
+
var mobilePopperSheetSurfaceClassName = "max-sm:max-h-[min(70dvh,28rem)] max-sm:rounded-2xl max-sm:border max-sm:border-border max-sm:shadow-elevated";
|
|
44
|
+
var mobilePopperSheetMotionClassName = [
|
|
45
|
+
"max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=open]:slide-in-from-bottom"
|
|
46
|
+
].join(" ");
|
|
47
|
+
var mobilePopperSheetStyle = `
|
|
48
|
+
@media (max-width: 639px) {
|
|
49
|
+
[data-radix-popper-content-wrapper]:has([data-hilum-mobile-sheet="true"]) {
|
|
50
|
+
position: fixed !important;
|
|
51
|
+
inset: 0 !important;
|
|
52
|
+
min-width: 0 !important;
|
|
53
|
+
transform: none !important;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
z-index: 50 !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-radix-popper-content-wrapper]:has([data-hilum-mobile-sheet="true"][data-state="open"])::before {
|
|
59
|
+
content: "";
|
|
60
|
+
position: fixed;
|
|
61
|
+
inset: 0;
|
|
62
|
+
background: rgb(0 0 0 / 0.3);
|
|
63
|
+
backdrop-filter: blur(4px);
|
|
64
|
+
pointer-events: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[data-hilum-mobile-sheet="true"] {
|
|
68
|
+
position: fixed !important;
|
|
69
|
+
left: 0.75rem !important;
|
|
70
|
+
right: 0.75rem !important;
|
|
71
|
+
bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
|
|
72
|
+
top: auto !important;
|
|
73
|
+
width: calc(100dvw - 1.5rem) !important;
|
|
74
|
+
min-width: 0 !important;
|
|
75
|
+
max-width: none !important;
|
|
76
|
+
transform: none !important;
|
|
77
|
+
pointer-events: auto;
|
|
78
|
+
transform-origin: bottom center !important;
|
|
79
|
+
overscroll-behavior: contain;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[data-hilum-mobile-sheet="true"]::before {
|
|
83
|
+
content: "";
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 0.5rem;
|
|
86
|
+
left: 50%;
|
|
87
|
+
width: 2.25rem;
|
|
88
|
+
height: 0.25rem;
|
|
89
|
+
border-radius: 999px;
|
|
90
|
+
background: hsl(var(--muted-foreground) / 0.35);
|
|
91
|
+
transform: translateX(-50%);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
23
95
|
var DropdownMenuRoot = DropdownMenu.Root;
|
|
24
96
|
var DropdownMenuTrigger = DropdownMenu.Trigger;
|
|
25
97
|
var DropdownMenuGroup = DropdownMenu.Group;
|
|
26
98
|
var DropdownMenuPortal = DropdownMenu.Portal;
|
|
27
99
|
var DropdownMenuSub = DropdownMenu.Sub;
|
|
28
100
|
var DropdownMenuRadioGroup = DropdownMenu.RadioGroup;
|
|
29
|
-
var DropdownMenuContent =
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
101
|
+
var DropdownMenuContent = React19.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
102
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
103
|
+
/* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx(
|
|
104
|
+
DropdownMenu.Content,
|
|
105
|
+
{
|
|
106
|
+
ref,
|
|
107
|
+
"data-hilum-mobile-sheet": "true",
|
|
108
|
+
sideOffset,
|
|
109
|
+
className: cn(
|
|
110
|
+
"z-50 min-w-[8rem] bg-card rounded-xl shadow-natural p-1",
|
|
111
|
+
mobilePopperSheetPositionClassName,
|
|
112
|
+
mobilePopperSheetSurfaceClassName,
|
|
113
|
+
"max-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
114
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
115
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
116
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
117
|
+
mobilePopperSheetMotionClassName,
|
|
118
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
119
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
120
|
+
className
|
|
121
|
+
),
|
|
122
|
+
...props
|
|
123
|
+
}
|
|
124
|
+
) })
|
|
125
|
+
] }));
|
|
46
126
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
47
|
-
var DropdownMenuItem =
|
|
127
|
+
var DropdownMenuItem = React19.forwardRef(({ className, inset, destructive, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48
128
|
DropdownMenu.Item,
|
|
49
129
|
{
|
|
50
130
|
ref,
|
|
@@ -60,7 +140,7 @@ var DropdownMenuItem = React17.forwardRef(({ className, inset, destructive, ...p
|
|
|
60
140
|
}
|
|
61
141
|
));
|
|
62
142
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
63
|
-
var DropdownMenuCheckboxItem =
|
|
143
|
+
var DropdownMenuCheckboxItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
64
144
|
DropdownMenu.CheckboxItem,
|
|
65
145
|
{
|
|
66
146
|
ref,
|
|
@@ -79,7 +159,7 @@ var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...pro
|
|
|
79
159
|
}
|
|
80
160
|
));
|
|
81
161
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
82
|
-
var DropdownMenuRadioItem =
|
|
162
|
+
var DropdownMenuRadioItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
83
163
|
DropdownMenu.RadioItem,
|
|
84
164
|
{
|
|
85
165
|
ref,
|
|
@@ -98,7 +178,7 @@ var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props
|
|
|
98
178
|
}
|
|
99
179
|
));
|
|
100
180
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
101
|
-
var DropdownMenuLabel =
|
|
181
|
+
var DropdownMenuLabel = React19.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
102
182
|
DropdownMenu.Label,
|
|
103
183
|
{
|
|
104
184
|
ref,
|
|
@@ -107,7 +187,7 @@ var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref)
|
|
|
107
187
|
}
|
|
108
188
|
));
|
|
109
189
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
110
|
-
var DropdownMenuSeparator =
|
|
190
|
+
var DropdownMenuSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
111
191
|
DropdownMenu.Separator,
|
|
112
192
|
{
|
|
113
193
|
ref,
|
|
@@ -116,7 +196,7 @@ var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) =>
|
|
|
116
196
|
}
|
|
117
197
|
));
|
|
118
198
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
119
|
-
var DropdownMenuSubTrigger =
|
|
199
|
+
var DropdownMenuSubTrigger = React19.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
120
200
|
DropdownMenu.SubTrigger,
|
|
121
201
|
{
|
|
122
202
|
ref,
|
|
@@ -135,21 +215,29 @@ var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, .
|
|
|
135
215
|
}
|
|
136
216
|
));
|
|
137
217
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
138
|
-
var DropdownMenuSubContent =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"data-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
218
|
+
var DropdownMenuSubContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
219
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
220
|
+
/* @__PURE__ */ jsx(
|
|
221
|
+
DropdownMenu.SubContent,
|
|
222
|
+
{
|
|
223
|
+
ref,
|
|
224
|
+
"data-hilum-mobile-sheet": "true",
|
|
225
|
+
className: cn(
|
|
226
|
+
"z-50 min-w-[8rem] bg-card rounded-xl border border-border shadow-natural p-1",
|
|
227
|
+
mobilePopperSheetPositionClassName,
|
|
228
|
+
mobilePopperSheetSurfaceClassName,
|
|
229
|
+
"max-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
230
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
231
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
232
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
233
|
+
mobilePopperSheetMotionClassName,
|
|
234
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
235
|
+
className
|
|
236
|
+
),
|
|
237
|
+
...props
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
] }));
|
|
153
241
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
154
242
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
155
243
|
return /* @__PURE__ */ jsx("span", { className: cn("ml-auto caption text-muted-foreground", className), ...props });
|
|
@@ -162,7 +250,7 @@ var sizeMap = {
|
|
|
162
250
|
lg: "size-10 body-lg",
|
|
163
251
|
xl: "size-12 subheading"
|
|
164
252
|
};
|
|
165
|
-
var Avatar =
|
|
253
|
+
var Avatar = React19.forwardRef(
|
|
166
254
|
({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
167
255
|
Avatar$1.Root,
|
|
168
256
|
{
|
|
@@ -177,7 +265,7 @@ var Avatar = React17.forwardRef(
|
|
|
177
265
|
)
|
|
178
266
|
);
|
|
179
267
|
Avatar.displayName = "Avatar";
|
|
180
|
-
var AvatarImage =
|
|
268
|
+
var AvatarImage = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
181
269
|
Avatar$1.Image,
|
|
182
270
|
{
|
|
183
271
|
ref,
|
|
@@ -189,7 +277,7 @@ var AvatarImage = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
189
277
|
}
|
|
190
278
|
));
|
|
191
279
|
AvatarImage.displayName = "AvatarImage";
|
|
192
|
-
var AvatarFallback =
|
|
280
|
+
var AvatarFallback = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
193
281
|
Avatar$1.Fallback,
|
|
194
282
|
{
|
|
195
283
|
ref,
|
|
@@ -214,7 +302,7 @@ var statusSizeMap = {
|
|
|
214
302
|
lg: "size-3 ring-2",
|
|
215
303
|
xl: "size-3.5 ring-2"
|
|
216
304
|
};
|
|
217
|
-
var AvatarWithStatus =
|
|
305
|
+
var AvatarWithStatus = React19.forwardRef(({ status, size = "md", className, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "relative inline-flex shrink-0", children: [
|
|
218
306
|
/* @__PURE__ */ jsx(Avatar, { ref, size, className, ...props, children }),
|
|
219
307
|
status && /* @__PURE__ */ jsx(
|
|
220
308
|
"span",
|
|
@@ -228,7 +316,7 @@ var AvatarWithStatus = React17.forwardRef(({ status, size = "md", className, chi
|
|
|
228
316
|
)
|
|
229
317
|
] }));
|
|
230
318
|
AvatarWithStatus.displayName = "AvatarWithStatus";
|
|
231
|
-
var AccountMenuContent =
|
|
319
|
+
var AccountMenuContent = React19.forwardRef(({ className, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
232
320
|
DropdownMenuContent,
|
|
233
321
|
{
|
|
234
322
|
ref,
|
|
@@ -241,7 +329,7 @@ var AccountMenuContent = React17.forwardRef(({ className, sideOffset = 8, ...pro
|
|
|
241
329
|
}
|
|
242
330
|
));
|
|
243
331
|
AccountMenuContent.displayName = "AccountMenuContent";
|
|
244
|
-
var AccountMenuHeader =
|
|
332
|
+
var AccountMenuHeader = React19.forwardRef(
|
|
245
333
|
({ name, email, avatarSrc, avatarAlt, fallback, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
246
334
|
"div",
|
|
247
335
|
{
|
|
@@ -260,11 +348,11 @@ var AccountMenuHeader = React17.forwardRef(
|
|
|
260
348
|
)
|
|
261
349
|
);
|
|
262
350
|
AccountMenuHeader.displayName = "AccountMenuHeader";
|
|
263
|
-
var AccountMenuSection =
|
|
351
|
+
var AccountMenuSection = React19.forwardRef(
|
|
264
352
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-2", className), ...props })
|
|
265
353
|
);
|
|
266
354
|
AccountMenuSection.displayName = "AccountMenuSection";
|
|
267
|
-
var AccountMenuItem =
|
|
355
|
+
var AccountMenuItem = React19.forwardRef(({ icon, trailing, description, destructive, children, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
268
356
|
DropdownMenuItem,
|
|
269
357
|
{
|
|
270
358
|
ref,
|
|
@@ -288,13 +376,13 @@ var AccountMenuItem = React17.forwardRef(({ icon, trailing, description, destruc
|
|
|
288
376
|
}
|
|
289
377
|
));
|
|
290
378
|
AccountMenuItem.displayName = "AccountMenuItem";
|
|
291
|
-
var AccountMenuSeparator =
|
|
379
|
+
var AccountMenuSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuSeparator, { ref, className: cn("m-0 bg-border", className), ...props }));
|
|
292
380
|
AccountMenuSeparator.displayName = "AccountMenuSeparator";
|
|
293
|
-
var AccordionRoot =
|
|
381
|
+
var AccordionRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Accordion.Root, { ref, className: cn("divide-y divide-border", className), ...props }));
|
|
294
382
|
AccordionRoot.displayName = "Accordion";
|
|
295
|
-
var AccordionItem =
|
|
383
|
+
var AccordionItem = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Accordion.Item, { ref, className: cn("", className), ...props }));
|
|
296
384
|
AccordionItem.displayName = "AccordionItem";
|
|
297
|
-
var AccordionTrigger =
|
|
385
|
+
var AccordionTrigger = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
298
386
|
Accordion.Trigger,
|
|
299
387
|
{
|
|
300
388
|
ref,
|
|
@@ -319,7 +407,7 @@ var AccordionTrigger = React17.forwardRef(({ className, children, ...props }, re
|
|
|
319
407
|
}
|
|
320
408
|
) }));
|
|
321
409
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
322
|
-
var AccordionContent =
|
|
410
|
+
var AccordionContent = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
323
411
|
Accordion.Content,
|
|
324
412
|
{
|
|
325
413
|
ref,
|
|
@@ -500,7 +588,7 @@ ActivityFeed.displayName = "ActivityFeed";
|
|
|
500
588
|
var AlertDialogRoot = AlertDialog.Root;
|
|
501
589
|
var AlertDialogTrigger = AlertDialog.Trigger;
|
|
502
590
|
var AlertDialogPortal = AlertDialog.Portal;
|
|
503
|
-
var AlertDialogOverlay =
|
|
591
|
+
var AlertDialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
504
592
|
AlertDialog.Overlay,
|
|
505
593
|
{
|
|
506
594
|
ref,
|
|
@@ -514,18 +602,17 @@ var AlertDialogOverlay = React17.forwardRef(({ className, ...props }, ref) => /*
|
|
|
514
602
|
}
|
|
515
603
|
));
|
|
516
604
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
517
|
-
var AlertDialogContent =
|
|
605
|
+
var AlertDialogContent = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [
|
|
518
606
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
519
607
|
/* @__PURE__ */ jsx(
|
|
520
608
|
AlertDialog.Content,
|
|
521
609
|
{
|
|
522
610
|
ref,
|
|
523
611
|
className: cn(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
"
|
|
527
|
-
|
|
528
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
612
|
+
mobileDialogSheetContentClassName,
|
|
613
|
+
desktopDialogContentClassName,
|
|
614
|
+
"sm:max-w-md",
|
|
615
|
+
dialogSheetMotionClassName,
|
|
529
616
|
className
|
|
530
617
|
),
|
|
531
618
|
...props,
|
|
@@ -539,10 +626,20 @@ function AlertDialogHeader({ className, ...props }) {
|
|
|
539
626
|
}
|
|
540
627
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
541
628
|
function AlertDialogFooter({ className, ...props }) {
|
|
542
|
-
return /* @__PURE__ */ jsx(
|
|
629
|
+
return /* @__PURE__ */ jsx(
|
|
630
|
+
"div",
|
|
631
|
+
{
|
|
632
|
+
className: cn(
|
|
633
|
+
"mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-end",
|
|
634
|
+
"[&>*]:w-full sm:[&>*]:w-auto",
|
|
635
|
+
className
|
|
636
|
+
),
|
|
637
|
+
...props
|
|
638
|
+
}
|
|
639
|
+
);
|
|
543
640
|
}
|
|
544
641
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
545
|
-
var AlertDialogTitle =
|
|
642
|
+
var AlertDialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
546
643
|
AlertDialog.Title,
|
|
547
644
|
{
|
|
548
645
|
ref,
|
|
@@ -551,7 +648,7 @@ var AlertDialogTitle = React17.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
551
648
|
}
|
|
552
649
|
));
|
|
553
650
|
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
554
|
-
var AlertDialogDescription =
|
|
651
|
+
var AlertDialogDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
555
652
|
AlertDialog.Description,
|
|
556
653
|
{
|
|
557
654
|
ref,
|
|
@@ -560,7 +657,7 @@ var AlertDialogDescription = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
560
657
|
}
|
|
561
658
|
));
|
|
562
659
|
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
563
|
-
var AlertDialogAction =
|
|
660
|
+
var AlertDialogAction = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
564
661
|
AlertDialog.Action,
|
|
565
662
|
{
|
|
566
663
|
ref,
|
|
@@ -576,7 +673,7 @@ var AlertDialogAction = React17.forwardRef(({ className, ...props }, ref) => /*
|
|
|
576
673
|
}
|
|
577
674
|
));
|
|
578
675
|
AlertDialogAction.displayName = "AlertDialogAction";
|
|
579
|
-
var AlertDialogCancel =
|
|
676
|
+
var AlertDialogCancel = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
580
677
|
AlertDialog.Cancel,
|
|
581
678
|
{
|
|
582
679
|
ref,
|
|
@@ -607,11 +704,11 @@ var alertVariants = cva(
|
|
|
607
704
|
defaultVariants: { variant: "default" }
|
|
608
705
|
}
|
|
609
706
|
);
|
|
610
|
-
var Alert =
|
|
707
|
+
var Alert = React19.forwardRef(
|
|
611
708
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })
|
|
612
709
|
);
|
|
613
710
|
Alert.displayName = "Alert";
|
|
614
|
-
var AlertTitle =
|
|
711
|
+
var AlertTitle = React19.forwardRef(
|
|
615
712
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
616
713
|
"p",
|
|
617
714
|
{
|
|
@@ -622,11 +719,11 @@ var AlertTitle = React17.forwardRef(
|
|
|
622
719
|
)
|
|
623
720
|
);
|
|
624
721
|
AlertTitle.displayName = "AlertTitle";
|
|
625
|
-
var AlertDescription =
|
|
722
|
+
var AlertDescription = React19.forwardRef(
|
|
626
723
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("body text-pretty opacity-90", className), ...props })
|
|
627
724
|
);
|
|
628
725
|
AlertDescription.displayName = "AlertDescription";
|
|
629
|
-
var AspectRatioRoot =
|
|
726
|
+
var AspectRatioRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
630
727
|
AspectRatio.Root,
|
|
631
728
|
{
|
|
632
729
|
ref,
|
|
@@ -714,9 +811,9 @@ function Badge({ className, variant, ...props }) {
|
|
|
714
811
|
return /* @__PURE__ */ jsx("span", { "data-slot": "badge", className: cn(badgeVariants({ variant, className })), ...props });
|
|
715
812
|
}
|
|
716
813
|
Badge.displayName = "Badge";
|
|
717
|
-
var Breadcrumb =
|
|
814
|
+
var Breadcrumb = React19.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
718
815
|
Breadcrumb.displayName = "Breadcrumb";
|
|
719
|
-
var BreadcrumbList =
|
|
816
|
+
var BreadcrumbList = React19.forwardRef(
|
|
720
817
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
721
818
|
"ol",
|
|
722
819
|
{
|
|
@@ -727,15 +824,15 @@ var BreadcrumbList = React17.forwardRef(
|
|
|
727
824
|
)
|
|
728
825
|
);
|
|
729
826
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
730
|
-
var BreadcrumbItem =
|
|
827
|
+
var BreadcrumbItem = React19.forwardRef(
|
|
731
828
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
732
829
|
);
|
|
733
830
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
734
|
-
var BreadcrumbLink =
|
|
831
|
+
var BreadcrumbLink = React19.forwardRef(
|
|
735
832
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("a", { ref, className: cn("transition-colors hover:text-foreground", className), ...props })
|
|
736
833
|
);
|
|
737
834
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
738
|
-
var BreadcrumbPage =
|
|
835
|
+
var BreadcrumbPage = React19.forwardRef(
|
|
739
836
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
740
837
|
"span",
|
|
741
838
|
{
|
|
@@ -848,6 +945,79 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
848
945
|
);
|
|
849
946
|
}
|
|
850
947
|
Calendar.displayName = "Calendar";
|
|
948
|
+
var calloutVariants = cva(
|
|
949
|
+
"flex w-full min-w-0 gap-3 rounded-xl border px-4 py-3.5 shadow-natural",
|
|
950
|
+
{
|
|
951
|
+
variants: {
|
|
952
|
+
tone: {
|
|
953
|
+
default: "border-border bg-card text-foreground",
|
|
954
|
+
info: "border-brand-secondary/50 bg-brand-secondary/15 text-foreground",
|
|
955
|
+
success: "border-success/25 bg-success/10 text-foreground",
|
|
956
|
+
warning: "border-warning/35 bg-warning/15 text-foreground",
|
|
957
|
+
destructive: "border-destructive/25 bg-destructive/10 text-foreground"
|
|
958
|
+
},
|
|
959
|
+
compact: {
|
|
960
|
+
true: "px-3 py-2.5",
|
|
961
|
+
false: ""
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
defaultVariants: {
|
|
965
|
+
tone: "default",
|
|
966
|
+
compact: false
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
);
|
|
970
|
+
var calloutIconVariants = cva(
|
|
971
|
+
"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg [&_svg]:size-4",
|
|
972
|
+
{
|
|
973
|
+
variants: {
|
|
974
|
+
tone: {
|
|
975
|
+
default: "bg-muted text-muted-foreground",
|
|
976
|
+
info: "bg-brand-secondary/35 text-muted-foreground",
|
|
977
|
+
success: "bg-success/15 text-success",
|
|
978
|
+
warning: "bg-warning/20 text-warning",
|
|
979
|
+
destructive: "bg-destructive/15 text-destructive"
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
defaultVariants: {
|
|
983
|
+
tone: "default"
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
);
|
|
987
|
+
function Callout({
|
|
988
|
+
title,
|
|
989
|
+
description,
|
|
990
|
+
icon,
|
|
991
|
+
actions,
|
|
992
|
+
tone = "default",
|
|
993
|
+
compact = false,
|
|
994
|
+
className,
|
|
995
|
+
children,
|
|
996
|
+
role,
|
|
997
|
+
...props
|
|
998
|
+
}) {
|
|
999
|
+
const resolvedRole = role ?? (tone === "destructive" ? "alert" : "status");
|
|
1000
|
+
return /* @__PURE__ */ jsxs(
|
|
1001
|
+
"div",
|
|
1002
|
+
{
|
|
1003
|
+
role: resolvedRole,
|
|
1004
|
+
className: cn(calloutVariants({ tone, compact }), className),
|
|
1005
|
+
...props,
|
|
1006
|
+
children: [
|
|
1007
|
+
icon && /* @__PURE__ */ jsx("div", { className: cn(calloutIconVariants({ tone })), children: icon }),
|
|
1008
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
1009
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1010
|
+
title && /* @__PURE__ */ jsx("p", { className: "body font-semibold text-balance", children: title }),
|
|
1011
|
+
description && /* @__PURE__ */ jsx("p", { className: cn("body text-pretty text-muted-foreground", title && "mt-1"), children: description }),
|
|
1012
|
+
children && /* @__PURE__ */ jsx("div", { className: cn(title || description ? "mt-2" : ""), children })
|
|
1013
|
+
] }),
|
|
1014
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2 max-sm:w-full max-sm:flex-col max-sm:items-stretch", children: actions })
|
|
1015
|
+
] })
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
Callout.displayName = "Callout";
|
|
851
1021
|
function CardHeading({ title, description, actions, children, className }) {
|
|
852
1022
|
return /* @__PURE__ */ jsxs(
|
|
853
1023
|
"div",
|
|
@@ -892,7 +1062,7 @@ var cardVariants = cva("rounded-xl", {
|
|
|
892
1062
|
variant: "default"
|
|
893
1063
|
}
|
|
894
1064
|
});
|
|
895
|
-
var Card =
|
|
1065
|
+
var Card = React19.forwardRef(
|
|
896
1066
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
897
1067
|
"div",
|
|
898
1068
|
{
|
|
@@ -904,7 +1074,7 @@ var Card = React17.forwardRef(
|
|
|
904
1074
|
)
|
|
905
1075
|
);
|
|
906
1076
|
Card.displayName = "Card";
|
|
907
|
-
var CardHeader =
|
|
1077
|
+
var CardHeader = React19.forwardRef(
|
|
908
1078
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
909
1079
|
"div",
|
|
910
1080
|
{
|
|
@@ -916,7 +1086,7 @@ var CardHeader = React17.forwardRef(
|
|
|
916
1086
|
)
|
|
917
1087
|
);
|
|
918
1088
|
CardHeader.displayName = "CardHeader";
|
|
919
|
-
var CardTitle =
|
|
1089
|
+
var CardTitle = React19.forwardRef(
|
|
920
1090
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
921
1091
|
"h3",
|
|
922
1092
|
{
|
|
@@ -928,7 +1098,7 @@ var CardTitle = React17.forwardRef(
|
|
|
928
1098
|
)
|
|
929
1099
|
);
|
|
930
1100
|
CardTitle.displayName = "CardTitle";
|
|
931
|
-
var CardDescription =
|
|
1101
|
+
var CardDescription = React19.forwardRef(
|
|
932
1102
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
933
1103
|
"p",
|
|
934
1104
|
{
|
|
@@ -940,11 +1110,11 @@ var CardDescription = React17.forwardRef(
|
|
|
940
1110
|
)
|
|
941
1111
|
);
|
|
942
1112
|
CardDescription.displayName = "CardDescription";
|
|
943
|
-
var CardContent =
|
|
1113
|
+
var CardContent = React19.forwardRef(
|
|
944
1114
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, "data-slot": "card-content", className: cn("p-5 pt-0", className), ...props })
|
|
945
1115
|
);
|
|
946
1116
|
CardContent.displayName = "CardContent";
|
|
947
|
-
var CardFooter =
|
|
1117
|
+
var CardFooter = React19.forwardRef(
|
|
948
1118
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
949
1119
|
"div",
|
|
950
1120
|
{
|
|
@@ -956,7 +1126,19 @@ var CardFooter = React17.forwardRef(
|
|
|
956
1126
|
)
|
|
957
1127
|
);
|
|
958
1128
|
CardFooter.displayName = "CardFooter";
|
|
959
|
-
var
|
|
1129
|
+
var CardAction = React19.forwardRef(
|
|
1130
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1131
|
+
"div",
|
|
1132
|
+
{
|
|
1133
|
+
ref,
|
|
1134
|
+
"data-slot": "card-action",
|
|
1135
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
1136
|
+
...props
|
|
1137
|
+
}
|
|
1138
|
+
)
|
|
1139
|
+
);
|
|
1140
|
+
CardAction.displayName = "CardAction";
|
|
1141
|
+
var CardMedia = React19.forwardRef(
|
|
960
1142
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
961
1143
|
"div",
|
|
962
1144
|
{
|
|
@@ -968,9 +1150,9 @@ var CardMedia = React17.forwardRef(
|
|
|
968
1150
|
)
|
|
969
1151
|
);
|
|
970
1152
|
CardMedia.displayName = "CardMedia";
|
|
971
|
-
var CarouselContext =
|
|
1153
|
+
var CarouselContext = React19.createContext(null);
|
|
972
1154
|
function useCarousel() {
|
|
973
|
-
const context =
|
|
1155
|
+
const context = React19.useContext(CarouselContext);
|
|
974
1156
|
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
975
1157
|
return context;
|
|
976
1158
|
}
|
|
@@ -990,20 +1172,20 @@ function Carousel({
|
|
|
990
1172
|
},
|
|
991
1173
|
plugins
|
|
992
1174
|
);
|
|
993
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
994
|
-
const [canScrollNext, setCanScrollNext] =
|
|
995
|
-
const onSelect =
|
|
1175
|
+
const [canScrollPrev, setCanScrollPrev] = React19.useState(false);
|
|
1176
|
+
const [canScrollNext, setCanScrollNext] = React19.useState(false);
|
|
1177
|
+
const onSelect = React19.useCallback((api) => {
|
|
996
1178
|
if (!api) return;
|
|
997
1179
|
setCanScrollPrev(api.canScrollPrev());
|
|
998
1180
|
setCanScrollNext(api.canScrollNext());
|
|
999
1181
|
}, []);
|
|
1000
|
-
const scrollPrev =
|
|
1182
|
+
const scrollPrev = React19.useCallback(() => {
|
|
1001
1183
|
emblaApi?.scrollPrev();
|
|
1002
1184
|
}, [emblaApi]);
|
|
1003
|
-
const scrollNext =
|
|
1185
|
+
const scrollNext = React19.useCallback(() => {
|
|
1004
1186
|
emblaApi?.scrollNext();
|
|
1005
1187
|
}, [emblaApi]);
|
|
1006
|
-
const handleKeyDown =
|
|
1188
|
+
const handleKeyDown = React19.useCallback(
|
|
1007
1189
|
(event) => {
|
|
1008
1190
|
if (event.key === "ArrowLeft") {
|
|
1009
1191
|
event.preventDefault();
|
|
@@ -1015,7 +1197,7 @@ function Carousel({
|
|
|
1015
1197
|
},
|
|
1016
1198
|
[scrollPrev, scrollNext]
|
|
1017
1199
|
);
|
|
1018
|
-
|
|
1200
|
+
React19.useEffect(() => {
|
|
1019
1201
|
if (!emblaApi) return;
|
|
1020
1202
|
onSelect(emblaApi);
|
|
1021
1203
|
emblaApi.on("reInit", onSelect);
|
|
@@ -1025,7 +1207,7 @@ function Carousel({
|
|
|
1025
1207
|
emblaApi.off("select", onSelect);
|
|
1026
1208
|
};
|
|
1027
1209
|
}, [emblaApi, onSelect]);
|
|
1028
|
-
|
|
1210
|
+
React19.useEffect(() => {
|
|
1029
1211
|
if (!emblaApi || !setApi) return;
|
|
1030
1212
|
setApi(emblaApi);
|
|
1031
1213
|
}, [emblaApi, setApi]);
|
|
@@ -1144,32 +1326,268 @@ var CHART_COLORS = {
|
|
|
1144
1326
|
subtle: tokens.semantic.light.border,
|
|
1145
1327
|
dark: tokens.semantic.light.foreground
|
|
1146
1328
|
};
|
|
1147
|
-
|
|
1148
|
-
|
|
1329
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
1330
|
+
var ChartContext = React19.createContext(null);
|
|
1331
|
+
function useChart() {
|
|
1332
|
+
const context = React19.useContext(ChartContext);
|
|
1333
|
+
if (!context) {
|
|
1334
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1335
|
+
}
|
|
1336
|
+
return context;
|
|
1149
1337
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1338
|
+
function ChartContainer({
|
|
1339
|
+
id,
|
|
1340
|
+
className,
|
|
1341
|
+
children,
|
|
1342
|
+
config = {},
|
|
1343
|
+
height,
|
|
1344
|
+
style,
|
|
1345
|
+
...props
|
|
1346
|
+
}) {
|
|
1347
|
+
const uniqueId = React19.useId();
|
|
1348
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
1349
|
+
const resolvedStyle = height === void 0 ? style : { ...style, height };
|
|
1350
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
1351
|
+
"div",
|
|
1352
|
+
{
|
|
1353
|
+
"data-slot": "chart",
|
|
1354
|
+
"data-chart": chartId,
|
|
1355
|
+
className: cn(
|
|
1356
|
+
"flex aspect-video justify-center text-xs",
|
|
1357
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground",
|
|
1358
|
+
"[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50",
|
|
1359
|
+
"[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border",
|
|
1360
|
+
"[&_.recharts-dot[stroke='#fff']]:stroke-transparent",
|
|
1361
|
+
"[&_.recharts-layer]:outline-hidden",
|
|
1362
|
+
"[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border",
|
|
1363
|
+
"[&_.recharts-radial-bar-background-sector]:fill-muted",
|
|
1364
|
+
"[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted",
|
|
1365
|
+
"[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border",
|
|
1366
|
+
"[&_.recharts-sector]:outline-hidden",
|
|
1367
|
+
"[&_.recharts-sector[stroke='#fff']]:stroke-transparent",
|
|
1368
|
+
"[&_.recharts-surface]:outline-hidden",
|
|
1369
|
+
className
|
|
1162
1370
|
),
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1371
|
+
style: resolvedStyle,
|
|
1372
|
+
...props,
|
|
1373
|
+
children: [
|
|
1374
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
1375
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
) });
|
|
1379
|
+
}
|
|
1380
|
+
ChartContainer.displayName = "ChartContainer";
|
|
1381
|
+
var ChartStyle = ({ id, config }) => {
|
|
1382
|
+
const colorConfig = Object.entries(config).filter(
|
|
1383
|
+
([, itemConfig]) => itemConfig.theme || itemConfig.color
|
|
1384
|
+
);
|
|
1385
|
+
if (!colorConfig.length) {
|
|
1386
|
+
return null;
|
|
1387
|
+
}
|
|
1388
|
+
return /* @__PURE__ */ jsx(
|
|
1389
|
+
"style",
|
|
1390
|
+
{
|
|
1391
|
+
dangerouslySetInnerHTML: {
|
|
1392
|
+
__html: Object.entries(THEMES).map(
|
|
1393
|
+
([theme, prefix]) => `
|
|
1394
|
+
${prefix} [data-chart=${id}] {
|
|
1395
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
1396
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
1397
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
1398
|
+
}).join("\n")}
|
|
1399
|
+
}
|
|
1400
|
+
`
|
|
1401
|
+
).join("\n")
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
);
|
|
1405
|
+
};
|
|
1406
|
+
function ChartTooltip(props) {
|
|
1407
|
+
const hasDirectTooltipPayload = "active" in props || "payload" in props;
|
|
1408
|
+
if (hasDirectTooltipPayload) {
|
|
1409
|
+
return /* @__PURE__ */ jsx(ChartTooltipContent, { ...props });
|
|
1410
|
+
}
|
|
1411
|
+
return /* @__PURE__ */ jsx(
|
|
1412
|
+
RechartsPrimitive.Tooltip,
|
|
1413
|
+
{
|
|
1414
|
+
...props
|
|
1415
|
+
}
|
|
1416
|
+
);
|
|
1170
1417
|
}
|
|
1171
1418
|
ChartTooltip.displayName = "ChartTooltip";
|
|
1172
|
-
|
|
1419
|
+
function ChartTooltipContent({
|
|
1420
|
+
active,
|
|
1421
|
+
payload,
|
|
1422
|
+
className,
|
|
1423
|
+
indicator = "dot",
|
|
1424
|
+
hideLabel = false,
|
|
1425
|
+
hideIndicator = false,
|
|
1426
|
+
label,
|
|
1427
|
+
labelFormatter,
|
|
1428
|
+
labelClassName,
|
|
1429
|
+
formatter,
|
|
1430
|
+
color,
|
|
1431
|
+
nameKey,
|
|
1432
|
+
labelKey
|
|
1433
|
+
}) {
|
|
1434
|
+
const chartContext = React19.useContext(ChartContext);
|
|
1435
|
+
const config = chartContext?.config ?? {};
|
|
1436
|
+
const tooltipLabel = React19.useMemo(() => {
|
|
1437
|
+
if (hideLabel || !payload?.length) {
|
|
1438
|
+
return null;
|
|
1439
|
+
}
|
|
1440
|
+
const [item] = payload;
|
|
1441
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
1442
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1443
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
1444
|
+
if (labelFormatter) {
|
|
1445
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
1446
|
+
}
|
|
1447
|
+
if (!value) {
|
|
1448
|
+
return null;
|
|
1449
|
+
}
|
|
1450
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
1451
|
+
}, [
|
|
1452
|
+
label,
|
|
1453
|
+
labelFormatter,
|
|
1454
|
+
payload,
|
|
1455
|
+
hideLabel,
|
|
1456
|
+
labelClassName,
|
|
1457
|
+
config,
|
|
1458
|
+
labelKey
|
|
1459
|
+
]);
|
|
1460
|
+
if (!active || !payload?.length) {
|
|
1461
|
+
return null;
|
|
1462
|
+
}
|
|
1463
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
1464
|
+
return /* @__PURE__ */ jsxs(
|
|
1465
|
+
"div",
|
|
1466
|
+
{
|
|
1467
|
+
className: cn(
|
|
1468
|
+
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
1469
|
+
className
|
|
1470
|
+
),
|
|
1471
|
+
children: [
|
|
1472
|
+
!nestLabel ? tooltipLabel : null,
|
|
1473
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
1474
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
1475
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1476
|
+
const itemPayload = item.payload;
|
|
1477
|
+
const indicatorColor = color || (typeof itemPayload?.fill === "string" ? itemPayload.fill : void 0) || item.color;
|
|
1478
|
+
return /* @__PURE__ */ jsx(
|
|
1479
|
+
"div",
|
|
1480
|
+
{
|
|
1481
|
+
className: cn(
|
|
1482
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
1483
|
+
indicator === "dot" && "items-center"
|
|
1484
|
+
),
|
|
1485
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1486
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
1487
|
+
"div",
|
|
1488
|
+
{
|
|
1489
|
+
className: cn(
|
|
1490
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
1491
|
+
{
|
|
1492
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
1493
|
+
"w-1": indicator === "line",
|
|
1494
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
1495
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
1496
|
+
}
|
|
1497
|
+
),
|
|
1498
|
+
style: {
|
|
1499
|
+
"--color-bg": indicatorColor,
|
|
1500
|
+
"--color-border": indicatorColor
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
),
|
|
1504
|
+
/* @__PURE__ */ jsxs(
|
|
1505
|
+
"div",
|
|
1506
|
+
{
|
|
1507
|
+
className: cn(
|
|
1508
|
+
"flex flex-1 justify-between leading-none",
|
|
1509
|
+
nestLabel ? "items-end" : "items-center"
|
|
1510
|
+
),
|
|
1511
|
+
children: [
|
|
1512
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
1513
|
+
nestLabel ? tooltipLabel : null,
|
|
1514
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
1515
|
+
] }),
|
|
1516
|
+
item.value !== void 0 && item.value !== null && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: typeof item.value === "number" ? item.value.toLocaleString() : item.value })
|
|
1517
|
+
]
|
|
1518
|
+
}
|
|
1519
|
+
)
|
|
1520
|
+
] })
|
|
1521
|
+
},
|
|
1522
|
+
`${item.dataKey || item.name || index}`
|
|
1523
|
+
);
|
|
1524
|
+
}) })
|
|
1525
|
+
]
|
|
1526
|
+
}
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
ChartTooltipContent.displayName = "ChartTooltipContent";
|
|
1530
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
1531
|
+
function ChartLegendContent({
|
|
1532
|
+
className,
|
|
1533
|
+
hideIcon = false,
|
|
1534
|
+
payload,
|
|
1535
|
+
verticalAlign = "bottom",
|
|
1536
|
+
nameKey
|
|
1537
|
+
}) {
|
|
1538
|
+
const { config } = useChart();
|
|
1539
|
+
if (!payload?.length) {
|
|
1540
|
+
return null;
|
|
1541
|
+
}
|
|
1542
|
+
return /* @__PURE__ */ jsx(
|
|
1543
|
+
"div",
|
|
1544
|
+
{
|
|
1545
|
+
className: cn(
|
|
1546
|
+
"flex items-center justify-center gap-4",
|
|
1547
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
1548
|
+
className
|
|
1549
|
+
),
|
|
1550
|
+
children: payload.map((item) => {
|
|
1551
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
1552
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1553
|
+
return /* @__PURE__ */ jsxs(
|
|
1554
|
+
"div",
|
|
1555
|
+
{
|
|
1556
|
+
className: "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
|
|
1557
|
+
children: [
|
|
1558
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
1559
|
+
"div",
|
|
1560
|
+
{
|
|
1561
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
1562
|
+
style: {
|
|
1563
|
+
backgroundColor: item.color
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
),
|
|
1567
|
+
itemConfig?.label
|
|
1568
|
+
]
|
|
1569
|
+
},
|
|
1570
|
+
`${item.value}`
|
|
1571
|
+
);
|
|
1572
|
+
})
|
|
1573
|
+
}
|
|
1574
|
+
);
|
|
1575
|
+
}
|
|
1576
|
+
ChartLegendContent.displayName = "ChartLegendContent";
|
|
1577
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
1578
|
+
if (typeof payload !== "object" || payload === null) {
|
|
1579
|
+
return void 0;
|
|
1580
|
+
}
|
|
1581
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
1582
|
+
let configLabelKey = key;
|
|
1583
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
1584
|
+
configLabelKey = payload[key];
|
|
1585
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
1586
|
+
configLabelKey = payloadPayload[key];
|
|
1587
|
+
}
|
|
1588
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
1589
|
+
}
|
|
1590
|
+
var CheckboxRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1173
1591
|
Checkbox.Root,
|
|
1174
1592
|
{
|
|
1175
1593
|
ref,
|
|
@@ -1190,6 +1608,36 @@ CheckboxRoot.displayName = "Checkbox";
|
|
|
1190
1608
|
var CollapsibleRoot = Collapsible.Root;
|
|
1191
1609
|
var CollapsibleTrigger = Collapsible.Trigger;
|
|
1192
1610
|
var CollapsibleContent = Collapsible.Content;
|
|
1611
|
+
var PopoverRoot = Popover.Root;
|
|
1612
|
+
var PopoverTrigger = Popover.Trigger;
|
|
1613
|
+
var PopoverClose = Popover.Close;
|
|
1614
|
+
var PopoverContent = React19.forwardRef(({ className, align = "center", sideOffset = 6, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1615
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
1616
|
+
/* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(
|
|
1617
|
+
Popover.Content,
|
|
1618
|
+
{
|
|
1619
|
+
ref,
|
|
1620
|
+
"data-hilum-mobile-sheet": "true",
|
|
1621
|
+
align,
|
|
1622
|
+
sideOffset,
|
|
1623
|
+
className: cn(
|
|
1624
|
+
"relative z-50 w-72 rounded-xl bg-card p-4 shadow-natural outline-none",
|
|
1625
|
+
mobilePopperSheetPositionClassName,
|
|
1626
|
+
mobilePopperSheetSurfaceClassName,
|
|
1627
|
+
"max-sm:overflow-y-auto max-sm:px-4 max-sm:pb-4 max-sm:pt-6",
|
|
1628
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1629
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1630
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1631
|
+
mobilePopperSheetMotionClassName,
|
|
1632
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1633
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
1634
|
+
className
|
|
1635
|
+
),
|
|
1636
|
+
...props
|
|
1637
|
+
}
|
|
1638
|
+
) })
|
|
1639
|
+
] }));
|
|
1640
|
+
PopoverContent.displayName = "PopoverContent";
|
|
1193
1641
|
function isValidHex(s) {
|
|
1194
1642
|
return /^#([0-9a-fA-F]{3}){1,2}$/.test(s);
|
|
1195
1643
|
}
|
|
@@ -1201,15 +1649,15 @@ function ColorPicker({
|
|
|
1201
1649
|
presets,
|
|
1202
1650
|
ariaLabel = "Color"
|
|
1203
1651
|
}) {
|
|
1204
|
-
const [hex, setHex] =
|
|
1205
|
-
|
|
1652
|
+
const [hex, setHex] = React19.useState(value);
|
|
1653
|
+
React19.useEffect(() => {
|
|
1206
1654
|
setHex(value);
|
|
1207
1655
|
}, [value]);
|
|
1208
1656
|
const commit = (next) => {
|
|
1209
1657
|
if (isValidHex(next)) onChange(next);
|
|
1210
1658
|
};
|
|
1211
|
-
return /* @__PURE__ */ jsxs(
|
|
1212
|
-
/* @__PURE__ */ jsx(
|
|
1659
|
+
return /* @__PURE__ */ jsxs(PopoverRoot, { children: [
|
|
1660
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1213
1661
|
"button",
|
|
1214
1662
|
{
|
|
1215
1663
|
type: "button",
|
|
@@ -1232,60 +1680,52 @@ function ColorPicker({
|
|
|
1232
1680
|
)
|
|
1233
1681
|
}
|
|
1234
1682
|
) }),
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
type: "text",
|
|
1260
|
-
value: hex,
|
|
1261
|
-
onChange: (e) => setHex(e.target.value),
|
|
1262
|
-
onBlur: (e) => commit(e.target.value),
|
|
1263
|
-
onKeyDown: (e) => {
|
|
1264
|
-
if (e.key === "Enter") commit(e.target.value);
|
|
1265
|
-
},
|
|
1266
|
-
className: "h-10 flex-1 rounded-md border border-border bg-card px-2 caption text-foreground focus:outline-none focus:border-brand-primary"
|
|
1267
|
-
}
|
|
1268
|
-
)
|
|
1269
|
-
] }),
|
|
1270
|
-
presets && presets.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-3 grid grid-cols-4 gap-2", children: presets.map((p) => /* @__PURE__ */ jsx(
|
|
1271
|
-
"button",
|
|
1272
|
-
{
|
|
1273
|
-
type: "button",
|
|
1274
|
-
onClick: () => onChange(p),
|
|
1275
|
-
"aria-label": p,
|
|
1276
|
-
className: "size-10 rounded-md border border-black/10 transition-transform hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
1277
|
-
style: { backgroundColor: p }
|
|
1683
|
+
/* @__PURE__ */ jsxs(PopoverContent, { align: "start", sideOffset: 6, className: "w-56 p-3 max-sm:px-3", children: [
|
|
1684
|
+
/* @__PURE__ */ jsx(
|
|
1685
|
+
"input",
|
|
1686
|
+
{
|
|
1687
|
+
type: "color",
|
|
1688
|
+
value: isValidHex(hex) ? hex : "#000000",
|
|
1689
|
+
onChange: (e) => {
|
|
1690
|
+
setHex(e.target.value);
|
|
1691
|
+
onChange(e.target.value);
|
|
1692
|
+
},
|
|
1693
|
+
className: "h-10 w-full cursor-pointer rounded-md border border-border bg-card p-0.5"
|
|
1694
|
+
}
|
|
1695
|
+
),
|
|
1696
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
1697
|
+
/* @__PURE__ */ jsx("span", { className: "caption text-muted-foreground", children: "Hex" }),
|
|
1698
|
+
/* @__PURE__ */ jsx(
|
|
1699
|
+
"input",
|
|
1700
|
+
{
|
|
1701
|
+
type: "text",
|
|
1702
|
+
value: hex,
|
|
1703
|
+
onChange: (e) => setHex(e.target.value),
|
|
1704
|
+
onBlur: (e) => commit(e.target.value),
|
|
1705
|
+
onKeyDown: (e) => {
|
|
1706
|
+
if (e.key === "Enter") commit(e.target.value);
|
|
1278
1707
|
},
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1708
|
+
className: "h-10 flex-1 rounded-md border border-border bg-card px-2 caption text-foreground focus:outline-none focus:border-brand-primary"
|
|
1709
|
+
}
|
|
1710
|
+
)
|
|
1711
|
+
] }),
|
|
1712
|
+
presets && presets.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-3 grid grid-cols-4 gap-2", children: presets.map((p) => /* @__PURE__ */ jsx(
|
|
1713
|
+
"button",
|
|
1714
|
+
{
|
|
1715
|
+
type: "button",
|
|
1716
|
+
onClick: () => onChange(p),
|
|
1717
|
+
"aria-label": p,
|
|
1718
|
+
className: "size-10 rounded-md border border-black/10 transition-transform hover:scale-105 active:scale-[0.96] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
1719
|
+
style: { backgroundColor: p }
|
|
1720
|
+
},
|
|
1721
|
+
p
|
|
1722
|
+
)) })
|
|
1723
|
+
] })
|
|
1724
|
+
] });
|
|
1725
|
+
}
|
|
1726
|
+
ColorPicker.displayName = "ColorPicker";
|
|
1727
|
+
function ColorInput({
|
|
1728
|
+
value,
|
|
1289
1729
|
onChange,
|
|
1290
1730
|
opacity,
|
|
1291
1731
|
onOpacityChange,
|
|
@@ -1293,8 +1733,8 @@ function ColorInput({
|
|
|
1293
1733
|
disabled,
|
|
1294
1734
|
presets
|
|
1295
1735
|
}) {
|
|
1296
|
-
const [hex, setHex] =
|
|
1297
|
-
|
|
1736
|
+
const [hex, setHex] = React19.useState(value);
|
|
1737
|
+
React19.useEffect(() => {
|
|
1298
1738
|
setHex(value);
|
|
1299
1739
|
}, [value]);
|
|
1300
1740
|
const commitHex = (next) => {
|
|
@@ -1364,20 +1804,20 @@ function Combobox({
|
|
|
1364
1804
|
emptyText = "No results found.",
|
|
1365
1805
|
className
|
|
1366
1806
|
}) {
|
|
1367
|
-
const [open, setOpen] =
|
|
1368
|
-
const [query, setQuery] =
|
|
1369
|
-
const [activeIndex, setActiveIndex] =
|
|
1370
|
-
const containerRef =
|
|
1371
|
-
const inputRef =
|
|
1372
|
-
const listboxId =
|
|
1807
|
+
const [open, setOpen] = React19.useState(false);
|
|
1808
|
+
const [query, setQuery] = React19.useState("");
|
|
1809
|
+
const [activeIndex, setActiveIndex] = React19.useState(-1);
|
|
1810
|
+
const containerRef = React19.useRef(null);
|
|
1811
|
+
const inputRef = React19.useRef(null);
|
|
1812
|
+
const listboxId = React19.useId();
|
|
1373
1813
|
const selectedOption = options.find((o) => o.value === value);
|
|
1374
1814
|
const filtered = query === "" ? options : options.filter(
|
|
1375
1815
|
(o) => o.label.toLowerCase().includes(query.toLowerCase()) || o.description?.toLowerCase().includes(query.toLowerCase())
|
|
1376
1816
|
);
|
|
1377
|
-
|
|
1817
|
+
React19.useEffect(() => {
|
|
1378
1818
|
setActiveIndex(-1);
|
|
1379
1819
|
}, [filtered.length, open]);
|
|
1380
|
-
|
|
1820
|
+
React19.useEffect(() => {
|
|
1381
1821
|
function onMouseDown(e) {
|
|
1382
1822
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
1383
1823
|
setOpen(false);
|
|
@@ -1483,66 +1923,96 @@ function Combobox({
|
|
|
1483
1923
|
}
|
|
1484
1924
|
)
|
|
1485
1925
|
] }),
|
|
1486
|
-
open && /* @__PURE__ */
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1926
|
+
open && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1927
|
+
/* @__PURE__ */ jsx(
|
|
1928
|
+
"button",
|
|
1929
|
+
{
|
|
1930
|
+
type: "button",
|
|
1931
|
+
"aria-label": "Close options",
|
|
1932
|
+
className: "fixed inset-0 z-40 hidden bg-black/30 backdrop-blur-sm max-sm:block",
|
|
1933
|
+
onClick: closeDropdown
|
|
1934
|
+
}
|
|
1935
|
+
),
|
|
1936
|
+
/* @__PURE__ */ jsx(
|
|
1937
|
+
"div",
|
|
1491
1938
|
{
|
|
1492
|
-
id: `${listboxId}-option-${idx}`,
|
|
1493
|
-
role: "option",
|
|
1494
|
-
"aria-selected": isSelected,
|
|
1495
1939
|
className: cn(
|
|
1496
|
-
"
|
|
1497
|
-
|
|
1940
|
+
"absolute z-50 mt-1 w-full overflow-hidden rounded-lg border border-border bg-card shadow-elevated",
|
|
1941
|
+
"max-sm:fixed max-sm:inset-x-3 max-sm:bottom-3 max-sm:[bottom:max(0.75rem,env(safe-area-inset-bottom))] max-sm:top-auto max-sm:mt-0 max-sm:w-auto",
|
|
1942
|
+
"max-sm:max-h-[min(70dvh,28rem)] max-sm:rounded-2xl max-sm:p-2 max-sm:pt-5",
|
|
1943
|
+
"max-sm:before:absolute max-sm:before:left-1/2 max-sm:before:top-2 max-sm:before:h-1 max-sm:before:w-9 max-sm:before:-translate-x-1/2 max-sm:before:rounded-full max-sm:before:bg-muted-foreground/35"
|
|
1498
1944
|
),
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
"
|
|
1505
|
-
{
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1945
|
+
children: /* @__PURE__ */ jsx(
|
|
1946
|
+
"ul",
|
|
1947
|
+
{
|
|
1948
|
+
id: listboxId,
|
|
1949
|
+
role: "listbox",
|
|
1950
|
+
className: "max-h-60 overflow-auto py-1 max-sm:max-h-[calc(min(70dvh,28rem)-3rem)]",
|
|
1951
|
+
children: filtered.length === 0 ? /* @__PURE__ */ jsx("li", { className: "px-3 py-2 body text-muted-foreground", children: emptyText }) : filtered.map((option, idx) => {
|
|
1952
|
+
const isSelected = option.value === value;
|
|
1953
|
+
const isActive = idx === activeIndex;
|
|
1954
|
+
return /* @__PURE__ */ jsxs(
|
|
1955
|
+
"li",
|
|
1956
|
+
{
|
|
1957
|
+
id: `${listboxId}-option-${idx}`,
|
|
1958
|
+
role: "option",
|
|
1959
|
+
"aria-selected": isSelected,
|
|
1960
|
+
className: cn(
|
|
1961
|
+
"flex min-h-10 cursor-pointer select-none items-center gap-2.5 px-3 py-2 body transition-colors",
|
|
1962
|
+
isSelected ? "bg-brand-primary text-background" : isActive ? "bg-muted text-foreground" : "text-foreground hover:bg-muted"
|
|
1963
|
+
),
|
|
1964
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1965
|
+
onMouseEnter: () => setActiveIndex(idx),
|
|
1966
|
+
onClick: () => selectOption(option),
|
|
1967
|
+
children: [
|
|
1968
|
+
option.avatar && /* @__PURE__ */ jsx(
|
|
1969
|
+
"div",
|
|
1970
|
+
{
|
|
1971
|
+
className: cn(
|
|
1972
|
+
"flex size-6 shrink-0 items-center justify-center rounded-full caption-xs font-semibold",
|
|
1973
|
+
isSelected ? "bg-card/20 text-background" : "bg-muted text-muted-foreground"
|
|
1974
|
+
),
|
|
1975
|
+
children: option.avatar
|
|
1976
|
+
}
|
|
1977
|
+
),
|
|
1978
|
+
option.statusColor && !option.avatar && /* @__PURE__ */ jsx(
|
|
1979
|
+
"div",
|
|
1980
|
+
{
|
|
1981
|
+
className: "size-2 shrink-0 rounded-full",
|
|
1982
|
+
style: { backgroundColor: option.statusColor }
|
|
1983
|
+
}
|
|
1984
|
+
),
|
|
1985
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1986
|
+
/* @__PURE__ */ jsx("p", { className: cn("truncate", isSelected && "font-semibold"), children: option.label }),
|
|
1987
|
+
option.description && /* @__PURE__ */ jsx(
|
|
1988
|
+
"p",
|
|
1989
|
+
{
|
|
1990
|
+
className: cn(
|
|
1991
|
+
"caption truncate",
|
|
1992
|
+
isSelected ? "text-background/70" : "text-muted-foreground"
|
|
1993
|
+
),
|
|
1994
|
+
children: option.description
|
|
1995
|
+
}
|
|
1996
|
+
)
|
|
1997
|
+
] }),
|
|
1998
|
+
isSelected && /* @__PURE__ */ jsx(Check, { size: 14, className: "shrink-0" })
|
|
1999
|
+
]
|
|
2000
|
+
},
|
|
2001
|
+
option.value
|
|
2002
|
+
);
|
|
2003
|
+
})
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
}
|
|
2007
|
+
)
|
|
2008
|
+
] })
|
|
1539
2009
|
] });
|
|
1540
2010
|
}
|
|
1541
2011
|
Combobox.displayName = "Combobox";
|
|
1542
2012
|
var DialogRoot = Dialog.Root;
|
|
1543
2013
|
var DialogTrigger = Dialog.Trigger;
|
|
1544
2014
|
var DialogClose = Dialog.Close;
|
|
1545
|
-
var DialogOverlay =
|
|
2015
|
+
var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1546
2016
|
Dialog.Overlay,
|
|
1547
2017
|
{
|
|
1548
2018
|
ref,
|
|
@@ -1556,18 +2026,17 @@ var DialogOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1556
2026
|
}
|
|
1557
2027
|
));
|
|
1558
2028
|
DialogOverlay.displayName = "DialogOverlay";
|
|
1559
|
-
var DialogContent =
|
|
2029
|
+
var DialogContent = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
1560
2030
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1561
2031
|
/* @__PURE__ */ jsxs(
|
|
1562
2032
|
Dialog.Content,
|
|
1563
2033
|
{
|
|
1564
2034
|
ref,
|
|
1565
2035
|
className: cn(
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
"
|
|
1569
|
-
|
|
1570
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2036
|
+
mobileDialogSheetContentClassName,
|
|
2037
|
+
desktopDialogContentClassName,
|
|
2038
|
+
"sm:max-w-lg",
|
|
2039
|
+
dialogSheetMotionClassName,
|
|
1571
2040
|
className
|
|
1572
2041
|
),
|
|
1573
2042
|
...props,
|
|
@@ -1587,10 +2056,20 @@ function DialogHeader({ className, ...props }) {
|
|
|
1587
2056
|
}
|
|
1588
2057
|
DialogHeader.displayName = "DialogHeader";
|
|
1589
2058
|
function DialogFooter({ className, ...props }) {
|
|
1590
|
-
return /* @__PURE__ */ jsx(
|
|
2059
|
+
return /* @__PURE__ */ jsx(
|
|
2060
|
+
"div",
|
|
2061
|
+
{
|
|
2062
|
+
className: cn(
|
|
2063
|
+
"mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-end",
|
|
2064
|
+
"[&>*]:w-full sm:[&>*]:w-auto",
|
|
2065
|
+
className
|
|
2066
|
+
),
|
|
2067
|
+
...props
|
|
2068
|
+
}
|
|
2069
|
+
);
|
|
1591
2070
|
}
|
|
1592
2071
|
DialogFooter.displayName = "DialogFooter";
|
|
1593
|
-
var DialogTitle =
|
|
2072
|
+
var DialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1594
2073
|
Dialog.Title,
|
|
1595
2074
|
{
|
|
1596
2075
|
ref,
|
|
@@ -1599,7 +2078,7 @@ var DialogTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1599
2078
|
}
|
|
1600
2079
|
));
|
|
1601
2080
|
DialogTitle.displayName = "DialogTitle";
|
|
1602
|
-
var DialogDescription =
|
|
2081
|
+
var DialogDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1603
2082
|
Dialog.Description,
|
|
1604
2083
|
{
|
|
1605
2084
|
ref,
|
|
@@ -1615,9 +2094,9 @@ function CommandPalette({
|
|
|
1615
2094
|
placeholder = "Search...",
|
|
1616
2095
|
emptyText = "No results found."
|
|
1617
2096
|
}) {
|
|
1618
|
-
const [query, setQuery] =
|
|
1619
|
-
const inputRef =
|
|
1620
|
-
|
|
2097
|
+
const [query, setQuery] = React19.useState("");
|
|
2098
|
+
const inputRef = React19.useRef(null);
|
|
2099
|
+
React19.useEffect(() => {
|
|
1621
2100
|
if (open) {
|
|
1622
2101
|
setTimeout(() => inputRef.current?.focus(), 50);
|
|
1623
2102
|
setQuery("");
|
|
@@ -1684,19 +2163,19 @@ function CommandPalette({
|
|
|
1684
2163
|
] }) });
|
|
1685
2164
|
}
|
|
1686
2165
|
CommandPalette.displayName = "CommandPalette";
|
|
1687
|
-
var CommandCtx =
|
|
2166
|
+
var CommandCtx = React19.createContext({
|
|
1688
2167
|
query: "",
|
|
1689
2168
|
setQuery: () => {
|
|
1690
2169
|
},
|
|
1691
2170
|
reportVisible: () => {
|
|
1692
2171
|
}
|
|
1693
2172
|
});
|
|
1694
|
-
var CommandVisibleCtx =
|
|
2173
|
+
var CommandVisibleCtx = React19.createContext(0);
|
|
1695
2174
|
function Command({ className, children, onSelect, ...props }) {
|
|
1696
|
-
const [query, setQuery] =
|
|
1697
|
-
const visibleIds =
|
|
1698
|
-
const [visibleCount, setVisibleCount] =
|
|
1699
|
-
const reportVisible =
|
|
2175
|
+
const [query, setQuery] = React19.useState("");
|
|
2176
|
+
const visibleIds = React19.useRef(/* @__PURE__ */ new Set());
|
|
2177
|
+
const [visibleCount, setVisibleCount] = React19.useState(0);
|
|
2178
|
+
const reportVisible = React19.useCallback((id, visible) => {
|
|
1700
2179
|
const had = visibleIds.current.has(id);
|
|
1701
2180
|
if (visible && !had) {
|
|
1702
2181
|
visibleIds.current.add(id);
|
|
@@ -1724,8 +2203,8 @@ function Command({ className, children, onSelect, ...props }) {
|
|
|
1724
2203
|
}
|
|
1725
2204
|
);
|
|
1726
2205
|
}
|
|
1727
|
-
var CommandInput =
|
|
1728
|
-
const { query, setQuery } =
|
|
2206
|
+
var CommandInput = React19.forwardRef(({ className, ...props }, ref) => {
|
|
2207
|
+
const { query, setQuery } = React19.useContext(CommandCtx);
|
|
1729
2208
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-border px-3", children: [
|
|
1730
2209
|
/* @__PURE__ */ jsx(Search, { size: 14, className: "shrink-0 text-muted-foreground" }),
|
|
1731
2210
|
/* @__PURE__ */ jsx(
|
|
@@ -1749,10 +2228,10 @@ var CommandInput = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
1749
2228
|
] });
|
|
1750
2229
|
});
|
|
1751
2230
|
CommandInput.displayName = "CommandInput";
|
|
1752
|
-
var CommandList =
|
|
2231
|
+
var CommandList = React19.forwardRef(
|
|
1753
2232
|
({ className, ...props }, ref) => {
|
|
1754
|
-
const listRef =
|
|
1755
|
-
const combinedRef =
|
|
2233
|
+
const listRef = React19.useRef(null);
|
|
2234
|
+
const combinedRef = React19.useCallback(
|
|
1756
2235
|
(el) => {
|
|
1757
2236
|
listRef.current = el;
|
|
1758
2237
|
if (typeof ref === "function") ref(el);
|
|
@@ -1787,9 +2266,9 @@ var CommandList = React17.forwardRef(
|
|
|
1787
2266
|
}
|
|
1788
2267
|
);
|
|
1789
2268
|
CommandList.displayName = "CommandList";
|
|
1790
|
-
var CommandEmpty =
|
|
2269
|
+
var CommandEmpty = React19.forwardRef(
|
|
1791
2270
|
({ className, children = "No results found.", ...props }, ref) => {
|
|
1792
|
-
const visibleCount =
|
|
2271
|
+
const visibleCount = React19.useContext(CommandVisibleCtx);
|
|
1793
2272
|
if (visibleCount > 0) return null;
|
|
1794
2273
|
return /* @__PURE__ */ jsx(
|
|
1795
2274
|
"div",
|
|
@@ -1803,20 +2282,20 @@ var CommandEmpty = React17.forwardRef(
|
|
|
1803
2282
|
}
|
|
1804
2283
|
);
|
|
1805
2284
|
CommandEmpty.displayName = "CommandEmpty";
|
|
1806
|
-
var CommandGroup =
|
|
2285
|
+
var CommandGroup = React19.forwardRef(
|
|
1807
2286
|
({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, role: "group", className: cn("py-1", className), ...props, children: [
|
|
1808
2287
|
heading && /* @__PURE__ */ jsx("p", { className: "px-3 pb-1 pt-0.5 label text-muted-foreground", children: heading }),
|
|
1809
2288
|
children
|
|
1810
2289
|
] })
|
|
1811
2290
|
);
|
|
1812
2291
|
CommandGroup.displayName = "CommandGroup";
|
|
1813
|
-
var CommandItem =
|
|
2292
|
+
var CommandItem = React19.forwardRef(
|
|
1814
2293
|
({ className, value = "", keywords, disabled, onSelect, children, ...props }, ref) => {
|
|
1815
|
-
const { query, onSelect: ctxOnSelect, reportVisible } =
|
|
1816
|
-
const id =
|
|
2294
|
+
const { query, onSelect: ctxOnSelect, reportVisible } = React19.useContext(CommandCtx);
|
|
2295
|
+
const id = React19.useId();
|
|
1817
2296
|
const searchText = (keywords ?? [value]).join(" ").toLowerCase();
|
|
1818
2297
|
const isVisible = !query || searchText.includes(query.toLowerCase());
|
|
1819
|
-
|
|
2298
|
+
React19.useLayoutEffect(() => {
|
|
1820
2299
|
reportVisible(id, isVisible && !disabled);
|
|
1821
2300
|
return () => reportVisible(id, false);
|
|
1822
2301
|
}, [id, isVisible, disabled, reportVisible]);
|
|
@@ -1857,7 +2336,7 @@ var CommandItem = React17.forwardRef(
|
|
|
1857
2336
|
}
|
|
1858
2337
|
);
|
|
1859
2338
|
CommandItem.displayName = "CommandItem";
|
|
1860
|
-
var CommandSeparator =
|
|
2339
|
+
var CommandSeparator = React19.forwardRef(
|
|
1861
2340
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("my-1 h-px bg-muted", className), ...props })
|
|
1862
2341
|
);
|
|
1863
2342
|
CommandSeparator.displayName = "CommandSeparator";
|
|
@@ -1871,6 +2350,22 @@ function CommandShortcut({ className, ...props }) {
|
|
|
1871
2350
|
);
|
|
1872
2351
|
}
|
|
1873
2352
|
CommandShortcut.displayName = "CommandShortcut";
|
|
2353
|
+
function CommandDialog({
|
|
2354
|
+
title = "Command Palette",
|
|
2355
|
+
description = "Search for a command to run...",
|
|
2356
|
+
children,
|
|
2357
|
+
className,
|
|
2358
|
+
...props
|
|
2359
|
+
}) {
|
|
2360
|
+
return /* @__PURE__ */ jsx(DialogRoot, { ...props, children: /* @__PURE__ */ jsxs(DialogContent, { className: cn("gap-0 overflow-hidden p-0 sm:max-w-xl", className), children: [
|
|
2361
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
2362
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
2363
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
2364
|
+
] }),
|
|
2365
|
+
/* @__PURE__ */ jsx(Command, { className: "rounded-none border-0 shadow-none", children })
|
|
2366
|
+
] }) });
|
|
2367
|
+
}
|
|
2368
|
+
CommandDialog.displayName = "CommandDialog";
|
|
1874
2369
|
Command.displayName = "Command";
|
|
1875
2370
|
var ContextMenuRoot = ContextMenu.Root;
|
|
1876
2371
|
var ContextMenuTrigger = ContextMenu.Trigger;
|
|
@@ -1878,24 +2373,32 @@ var ContextMenuGroup = ContextMenu.Group;
|
|
|
1878
2373
|
var ContextMenuPortal = ContextMenu.Portal;
|
|
1879
2374
|
var ContextMenuSub = ContextMenu.Sub;
|
|
1880
2375
|
var ContextMenuRadioGroup = ContextMenu.RadioGroup;
|
|
1881
|
-
var ContextMenuContent =
|
|
1882
|
-
|
|
1883
|
-
{
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
"data-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
2376
|
+
var ContextMenuContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2377
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
2378
|
+
/* @__PURE__ */ jsx(ContextMenu.Portal, { children: /* @__PURE__ */ jsx(
|
|
2379
|
+
ContextMenu.Content,
|
|
2380
|
+
{
|
|
2381
|
+
ref,
|
|
2382
|
+
"data-hilum-mobile-sheet": "true",
|
|
2383
|
+
className: cn(
|
|
2384
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border bg-card p-1 text-card-foreground shadow-elevated outline-none",
|
|
2385
|
+
mobilePopperSheetPositionClassName,
|
|
2386
|
+
mobilePopperSheetSurfaceClassName,
|
|
2387
|
+
"max-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
2388
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2389
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2390
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2391
|
+
mobilePopperSheetMotionClassName,
|
|
2392
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2393
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
2394
|
+
className
|
|
2395
|
+
),
|
|
2396
|
+
...props
|
|
2397
|
+
}
|
|
2398
|
+
) })
|
|
2399
|
+
] }));
|
|
1897
2400
|
ContextMenuContent.displayName = "ContextMenuContent";
|
|
1898
|
-
var ContextMenuItem =
|
|
2401
|
+
var ContextMenuItem = React19.forwardRef(({ className, inset, destructive, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1899
2402
|
ContextMenu.Item,
|
|
1900
2403
|
{
|
|
1901
2404
|
ref,
|
|
@@ -1911,7 +2414,7 @@ var ContextMenuItem = React17.forwardRef(({ className, inset, destructive, ...pr
|
|
|
1911
2414
|
}
|
|
1912
2415
|
));
|
|
1913
2416
|
ContextMenuItem.displayName = "ContextMenuItem";
|
|
1914
|
-
var ContextMenuCheckboxItem =
|
|
2417
|
+
var ContextMenuCheckboxItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1915
2418
|
ContextMenu.CheckboxItem,
|
|
1916
2419
|
{
|
|
1917
2420
|
ref,
|
|
@@ -1930,7 +2433,7 @@ var ContextMenuCheckboxItem = React17.forwardRef(({ className, children, ...prop
|
|
|
1930
2433
|
}
|
|
1931
2434
|
));
|
|
1932
2435
|
ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
|
|
1933
|
-
var ContextMenuRadioItem =
|
|
2436
|
+
var ContextMenuRadioItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1934
2437
|
ContextMenu.RadioItem,
|
|
1935
2438
|
{
|
|
1936
2439
|
ref,
|
|
@@ -1949,7 +2452,7 @@ var ContextMenuRadioItem = React17.forwardRef(({ className, children, ...props }
|
|
|
1949
2452
|
}
|
|
1950
2453
|
));
|
|
1951
2454
|
ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
|
|
1952
|
-
var ContextMenuLabel =
|
|
2455
|
+
var ContextMenuLabel = React19.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1953
2456
|
ContextMenu.Label,
|
|
1954
2457
|
{
|
|
1955
2458
|
ref,
|
|
@@ -1958,7 +2461,7 @@ var ContextMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1958
2461
|
}
|
|
1959
2462
|
));
|
|
1960
2463
|
ContextMenuLabel.displayName = "ContextMenuLabel";
|
|
1961
|
-
var ContextMenuSeparator =
|
|
2464
|
+
var ContextMenuSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1962
2465
|
ContextMenu.Separator,
|
|
1963
2466
|
{
|
|
1964
2467
|
ref,
|
|
@@ -1967,7 +2470,7 @@ var ContextMenuSeparator = React17.forwardRef(({ className, ...props }, ref) =>
|
|
|
1967
2470
|
}
|
|
1968
2471
|
));
|
|
1969
2472
|
ContextMenuSeparator.displayName = "ContextMenuSeparator";
|
|
1970
|
-
var ContextMenuSubTrigger =
|
|
2473
|
+
var ContextMenuSubTrigger = React19.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1971
2474
|
ContextMenu.SubTrigger,
|
|
1972
2475
|
{
|
|
1973
2476
|
ref,
|
|
@@ -1986,27 +2489,35 @@ var ContextMenuSubTrigger = React17.forwardRef(({ className, inset, children, ..
|
|
|
1986
2489
|
}
|
|
1987
2490
|
));
|
|
1988
2491
|
ContextMenuSubTrigger.displayName = "ContextMenuSubTrigger";
|
|
1989
|
-
var ContextMenuSubContent =
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
"data-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2492
|
+
var ContextMenuSubContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2493
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
2494
|
+
/* @__PURE__ */ jsx(
|
|
2495
|
+
ContextMenu.SubContent,
|
|
2496
|
+
{
|
|
2497
|
+
ref,
|
|
2498
|
+
"data-hilum-mobile-sheet": "true",
|
|
2499
|
+
className: cn(
|
|
2500
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border bg-card p-1 text-card-foreground shadow-elevated outline-none",
|
|
2501
|
+
mobilePopperSheetPositionClassName,
|
|
2502
|
+
mobilePopperSheetSurfaceClassName,
|
|
2503
|
+
"max-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
2504
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2505
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2506
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2507
|
+
mobilePopperSheetMotionClassName,
|
|
2508
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
2509
|
+
className
|
|
2510
|
+
),
|
|
2511
|
+
...props
|
|
2512
|
+
}
|
|
2513
|
+
)
|
|
2514
|
+
] }));
|
|
2004
2515
|
ContextMenuSubContent.displayName = "ContextMenuSubContent";
|
|
2005
2516
|
function ContextMenuShortcut({ className, ...props }) {
|
|
2006
2517
|
return /* @__PURE__ */ jsx("span", { className: cn("ml-auto caption text-muted-foreground", className), ...props });
|
|
2007
2518
|
}
|
|
2008
2519
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
2009
|
-
var Table =
|
|
2520
|
+
var Table = React19.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2010
2521
|
"div",
|
|
2011
2522
|
{
|
|
2012
2523
|
className: cn(
|
|
@@ -2024,13 +2535,13 @@ var Table = React17.forwardRef(({ className, containerClassName, ...props }, ref
|
|
|
2024
2535
|
}
|
|
2025
2536
|
));
|
|
2026
2537
|
Table.displayName = "Table";
|
|
2027
|
-
var TableHeader =
|
|
2538
|
+
var TableHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("bg-muted", className), ...props }));
|
|
2028
2539
|
TableHeader.displayName = "TableHeader";
|
|
2029
|
-
var TableBody =
|
|
2540
|
+
var TableBody = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("divide-y divide-border bg-card", className), ...props }));
|
|
2030
2541
|
TableBody.displayName = "TableBody";
|
|
2031
|
-
var TableFooter =
|
|
2542
|
+
var TableFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn("bg-muted font-medium", className), ...props }));
|
|
2032
2543
|
TableFooter.displayName = "TableFooter";
|
|
2033
|
-
var TableRow =
|
|
2544
|
+
var TableRow = React19.forwardRef(
|
|
2034
2545
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2035
2546
|
"tr",
|
|
2036
2547
|
{
|
|
@@ -2044,7 +2555,7 @@ var TableRow = React17.forwardRef(
|
|
|
2044
2555
|
)
|
|
2045
2556
|
);
|
|
2046
2557
|
TableRow.displayName = "TableRow";
|
|
2047
|
-
var TableHead =
|
|
2558
|
+
var TableHead = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2048
2559
|
"th",
|
|
2049
2560
|
{
|
|
2050
2561
|
ref,
|
|
@@ -2057,7 +2568,7 @@ var TableHead = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2057
2568
|
}
|
|
2058
2569
|
));
|
|
2059
2570
|
TableHead.displayName = "TableHead";
|
|
2060
|
-
var TableCell =
|
|
2571
|
+
var TableCell = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2061
2572
|
"td",
|
|
2062
2573
|
{
|
|
2063
2574
|
ref,
|
|
@@ -2070,7 +2581,7 @@ var TableCell = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2070
2581
|
}
|
|
2071
2582
|
));
|
|
2072
2583
|
TableCell.displayName = "TableCell";
|
|
2073
|
-
var TableCaption =
|
|
2584
|
+
var TableCaption = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn("mt-4 caption text-muted-foreground", className), ...props }));
|
|
2074
2585
|
TableCaption.displayName = "TableCaption";
|
|
2075
2586
|
function Input({ className, type, ...props }) {
|
|
2076
2587
|
return /* @__PURE__ */ jsx(
|
|
@@ -2100,8 +2611,8 @@ function DataTable({
|
|
|
2100
2611
|
pageSize = 10,
|
|
2101
2612
|
showPagination = true
|
|
2102
2613
|
}) {
|
|
2103
|
-
const [sorting, setSorting] =
|
|
2104
|
-
const [columnFilters, setColumnFilters] =
|
|
2614
|
+
const [sorting, setSorting] = React19.useState([]);
|
|
2615
|
+
const [columnFilters, setColumnFilters] = React19.useState([]);
|
|
2105
2616
|
const table = useReactTable({
|
|
2106
2617
|
data,
|
|
2107
2618
|
columns,
|
|
@@ -2192,28 +2703,188 @@ function DataTable({
|
|
|
2192
2703
|
] })
|
|
2193
2704
|
] });
|
|
2194
2705
|
}
|
|
2195
|
-
var
|
|
2196
|
-
var
|
|
2197
|
-
var
|
|
2198
|
-
var
|
|
2199
|
-
|
|
2706
|
+
var SelectRoot = Select.Root;
|
|
2707
|
+
var SelectGroup = Select.Group;
|
|
2708
|
+
var SelectValue = Select.Value;
|
|
2709
|
+
var SelectTrigger = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2710
|
+
Select.Trigger,
|
|
2200
2711
|
{
|
|
2201
2712
|
ref,
|
|
2202
|
-
align,
|
|
2203
|
-
sideOffset,
|
|
2204
2713
|
className: cn(
|
|
2205
|
-
"
|
|
2206
|
-
"
|
|
2207
|
-
"
|
|
2208
|
-
"
|
|
2209
|
-
"data-[
|
|
2210
|
-
"
|
|
2714
|
+
"flex h-10 w-full items-center justify-between rounded-xl bg-card px-3 py-2",
|
|
2715
|
+
"body text-foreground shadow-natural",
|
|
2716
|
+
"focus:outline-none focus:ring-2 focus:ring-ring/20",
|
|
2717
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2718
|
+
"data-[placeholder]:text-muted-foreground",
|
|
2719
|
+
"[&>span]:line-clamp-1",
|
|
2720
|
+
className
|
|
2721
|
+
),
|
|
2722
|
+
...props,
|
|
2723
|
+
children: [
|
|
2724
|
+
children,
|
|
2725
|
+
/* @__PURE__ */ jsx(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { size: 15, className: "text-muted-foreground shrink-0" }) })
|
|
2726
|
+
]
|
|
2727
|
+
}
|
|
2728
|
+
));
|
|
2729
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
2730
|
+
var SelectContent = React19.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2731
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
2732
|
+
/* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2733
|
+
Select.Content,
|
|
2734
|
+
{
|
|
2735
|
+
ref,
|
|
2736
|
+
"data-hilum-mobile-sheet": "true",
|
|
2737
|
+
className: cn(
|
|
2738
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
|
|
2739
|
+
"bg-card rounded-xl shadow-natural p-1",
|
|
2740
|
+
mobilePopperSheetPositionClassName,
|
|
2741
|
+
mobilePopperSheetSurfaceClassName,
|
|
2742
|
+
"max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
2743
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2744
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2745
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2746
|
+
mobilePopperSheetMotionClassName,
|
|
2747
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2748
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
|
|
2749
|
+
className
|
|
2750
|
+
),
|
|
2751
|
+
position,
|
|
2752
|
+
...props,
|
|
2753
|
+
children: [
|
|
2754
|
+
/* @__PURE__ */ jsx(Select.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronUp, { size: 14, className: "text-muted-foreground" }) }),
|
|
2755
|
+
/* @__PURE__ */ jsx(
|
|
2756
|
+
Select.Viewport,
|
|
2757
|
+
{
|
|
2758
|
+
className: cn(
|
|
2759
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
2760
|
+
"max-sm:!h-auto max-sm:max-h-[calc(min(70dvh,28rem)-3rem)] max-sm:!w-full max-sm:!min-w-0"
|
|
2761
|
+
),
|
|
2762
|
+
children
|
|
2763
|
+
}
|
|
2764
|
+
),
|
|
2765
|
+
/* @__PURE__ */ jsx(Select.ScrollDownButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronDown, { size: 14, className: "text-muted-foreground" }) })
|
|
2766
|
+
]
|
|
2767
|
+
}
|
|
2768
|
+
) })
|
|
2769
|
+
] }));
|
|
2770
|
+
SelectContent.displayName = "SelectContent";
|
|
2771
|
+
var SelectItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2772
|
+
Select.Item,
|
|
2773
|
+
{
|
|
2774
|
+
ref,
|
|
2775
|
+
className: cn(
|
|
2776
|
+
"relative flex min-h-10 w-full cursor-default select-none items-center rounded-md px-2.5 py-2",
|
|
2777
|
+
"body text-muted-foreground outline-none",
|
|
2778
|
+
"focus:bg-muted focus:text-foreground",
|
|
2779
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2211
2780
|
className
|
|
2212
2781
|
),
|
|
2782
|
+
...props,
|
|
2783
|
+
children: [
|
|
2784
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { size: 13, className: "text-foreground" }) }) }),
|
|
2785
|
+
/* @__PURE__ */ jsx(Select.ItemText, { children })
|
|
2786
|
+
]
|
|
2787
|
+
}
|
|
2788
|
+
));
|
|
2789
|
+
SelectItem.displayName = "SelectItem";
|
|
2790
|
+
var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2791
|
+
Select.Label,
|
|
2792
|
+
{
|
|
2793
|
+
ref,
|
|
2794
|
+
className: cn("px-2.5 py-1 label text-muted-foreground", className),
|
|
2213
2795
|
...props
|
|
2214
2796
|
}
|
|
2215
|
-
)
|
|
2216
|
-
|
|
2797
|
+
));
|
|
2798
|
+
SelectLabel.displayName = "SelectLabel";
|
|
2799
|
+
var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select.Separator, { ref, className: cn("mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
2800
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
2801
|
+
function normalizeIcon(icon, fallback, loading) {
|
|
2802
|
+
if (loading) return /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" });
|
|
2803
|
+
return icon ?? fallback;
|
|
2804
|
+
}
|
|
2805
|
+
function DataTransferControls({
|
|
2806
|
+
scopeValue,
|
|
2807
|
+
onScopeChange,
|
|
2808
|
+
scopeOptions = [],
|
|
2809
|
+
scopePlaceholder = "Scope",
|
|
2810
|
+
actions,
|
|
2811
|
+
compact = false,
|
|
2812
|
+
compactLabel = "Import and export actions",
|
|
2813
|
+
className,
|
|
2814
|
+
selectClassName,
|
|
2815
|
+
actionGroupClassName
|
|
2816
|
+
}) {
|
|
2817
|
+
const hasScope = scopeOptions.length > 0 && scopeValue !== void 0 && onScopeChange;
|
|
2818
|
+
const renderScopeSelect = () => {
|
|
2819
|
+
if (!hasScope) return null;
|
|
2820
|
+
return /* @__PURE__ */ jsxs(SelectRoot, { value: scopeValue, onValueChange: onScopeChange, children: [
|
|
2821
|
+
/* @__PURE__ */ jsx(
|
|
2822
|
+
SelectTrigger,
|
|
2823
|
+
{
|
|
2824
|
+
"aria-label": scopePlaceholder,
|
|
2825
|
+
className: cn("min-h-10 w-full max-w-full bg-background sm:w-[180px]", selectClassName),
|
|
2826
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: scopePlaceholder })
|
|
2827
|
+
}
|
|
2828
|
+
),
|
|
2829
|
+
/* @__PURE__ */ jsx(SelectContent, { children: scopeOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
2830
|
+
] });
|
|
2831
|
+
};
|
|
2832
|
+
const defaultActionIcon = (index) => index === 0 ? /* @__PURE__ */ jsx(Upload, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Download, { className: "size-4", "aria-hidden": "true" });
|
|
2833
|
+
return /* @__PURE__ */ jsxs(
|
|
2834
|
+
"div",
|
|
2835
|
+
{
|
|
2836
|
+
className: cn(
|
|
2837
|
+
compact ? "grid w-full min-w-0 grid-cols-[minmax(0,1fr)_auto] gap-2" : "grid w-full min-w-0 gap-2 sm:flex sm:w-auto sm:flex-wrap sm:items-center",
|
|
2838
|
+
className
|
|
2839
|
+
),
|
|
2840
|
+
children: [
|
|
2841
|
+
renderScopeSelect(),
|
|
2842
|
+
compact ? /* @__PURE__ */ jsxs(DropdownMenuRoot, { children: [
|
|
2843
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
2844
|
+
Button,
|
|
2845
|
+
{
|
|
2846
|
+
type: "button",
|
|
2847
|
+
variant: "outline",
|
|
2848
|
+
size: "icon",
|
|
2849
|
+
className: "size-9",
|
|
2850
|
+
"aria-label": compactLabel,
|
|
2851
|
+
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4", "aria-hidden": "true" })
|
|
2852
|
+
}
|
|
2853
|
+
) }),
|
|
2854
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "w-56", children: actions.map((action, index) => {
|
|
2855
|
+
const disabled = Boolean(action.disabled || action.loading);
|
|
2856
|
+
return /* @__PURE__ */ jsxs(
|
|
2857
|
+
DropdownMenuItem,
|
|
2858
|
+
{
|
|
2859
|
+
disabled,
|
|
2860
|
+
onClick: action.onSelect,
|
|
2861
|
+
children: [
|
|
2862
|
+
normalizeIcon(action.icon, defaultActionIcon(index), action.loading),
|
|
2863
|
+
action.label
|
|
2864
|
+
]
|
|
2865
|
+
},
|
|
2866
|
+
`${action.label}-${index}`
|
|
2867
|
+
);
|
|
2868
|
+
}) })
|
|
2869
|
+
] }) : /* @__PURE__ */ jsx(ButtonGroup, { className: cn("grid w-full grid-cols-3 sm:inline-flex sm:w-auto", actionGroupClassName), children: actions.map((action, index) => /* @__PURE__ */ jsxs(
|
|
2870
|
+
ButtonGroupItem,
|
|
2871
|
+
{
|
|
2872
|
+
className: "min-h-10 justify-center px-3 disabled:pointer-events-none disabled:opacity-50",
|
|
2873
|
+
onClick: action.onSelect,
|
|
2874
|
+
disabled: action.disabled || action.loading,
|
|
2875
|
+
"aria-label": action.ariaLabel ?? action.label,
|
|
2876
|
+
children: [
|
|
2877
|
+
normalizeIcon(action.icon, defaultActionIcon(index), action.loading),
|
|
2878
|
+
action.shortLabel ?? action.label
|
|
2879
|
+
]
|
|
2880
|
+
},
|
|
2881
|
+
`${action.label}-${index}`
|
|
2882
|
+
)) })
|
|
2883
|
+
]
|
|
2884
|
+
}
|
|
2885
|
+
);
|
|
2886
|
+
}
|
|
2887
|
+
DataTransferControls.displayName = "DataTransferControls";
|
|
2217
2888
|
var formatDate = (date) => date.toLocaleDateString("en-US", {
|
|
2218
2889
|
month: "long",
|
|
2219
2890
|
day: "numeric",
|
|
@@ -2294,7 +2965,7 @@ var DrawerRoot = Drawer.Root;
|
|
|
2294
2965
|
var DrawerTrigger = Drawer.Trigger;
|
|
2295
2966
|
var DrawerPortal = Drawer.Portal;
|
|
2296
2967
|
var DrawerClose = Drawer.Close;
|
|
2297
|
-
var DrawerOverlay =
|
|
2968
|
+
var DrawerOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2298
2969
|
Drawer.Overlay,
|
|
2299
2970
|
{
|
|
2300
2971
|
ref,
|
|
@@ -2303,7 +2974,7 @@ var DrawerOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2303
2974
|
}
|
|
2304
2975
|
));
|
|
2305
2976
|
DrawerOverlay.displayName = "DrawerOverlay";
|
|
2306
|
-
var DrawerContent =
|
|
2977
|
+
var DrawerContent = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
2307
2978
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
2308
2979
|
/* @__PURE__ */ jsxs(
|
|
2309
2980
|
Drawer.Content,
|
|
@@ -2326,7 +2997,7 @@ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { cla
|
|
|
2326
2997
|
DrawerHeader.displayName = "DrawerHeader";
|
|
2327
2998
|
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col gap-2 px-6 pb-6", className), ...props });
|
|
2328
2999
|
DrawerFooter.displayName = "DrawerFooter";
|
|
2329
|
-
var DrawerTitle =
|
|
3000
|
+
var DrawerTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2330
3001
|
Drawer.Title,
|
|
2331
3002
|
{
|
|
2332
3003
|
ref,
|
|
@@ -2335,7 +3006,7 @@ var DrawerTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2335
3006
|
}
|
|
2336
3007
|
));
|
|
2337
3008
|
DrawerTitle.displayName = "DrawerTitle";
|
|
2338
|
-
var DrawerDescription =
|
|
3009
|
+
var DrawerDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2339
3010
|
Drawer.Description,
|
|
2340
3011
|
{
|
|
2341
3012
|
ref,
|
|
@@ -2355,7 +3026,7 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
2355
3026
|
] });
|
|
2356
3027
|
}
|
|
2357
3028
|
EmptyState.displayName = "EmptyState";
|
|
2358
|
-
var Label =
|
|
3029
|
+
var Label = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2359
3030
|
Label$1.Root,
|
|
2360
3031
|
{
|
|
2361
3032
|
ref,
|
|
@@ -2393,39 +3064,198 @@ function Field({
|
|
|
2393
3064
|
] });
|
|
2394
3065
|
}
|
|
2395
3066
|
Field.displayName = "Field";
|
|
2396
|
-
var
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
3067
|
+
var spinnerVariants = cva(
|
|
3068
|
+
"inline-block animate-spin rounded-full border-2 border-current border-t-transparent",
|
|
3069
|
+
{
|
|
3070
|
+
variants: {
|
|
3071
|
+
size: {
|
|
3072
|
+
xs: "size-3",
|
|
3073
|
+
sm: "size-4",
|
|
3074
|
+
default: "size-5",
|
|
3075
|
+
lg: "size-6",
|
|
3076
|
+
xl: "size-8"
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
defaultVariants: {
|
|
3080
|
+
size: "default"
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
);
|
|
3084
|
+
function Spinner({ className, size, ...props }) {
|
|
3085
|
+
return /* @__PURE__ */ jsx(
|
|
3086
|
+
"span",
|
|
3087
|
+
{
|
|
3088
|
+
role: "status",
|
|
3089
|
+
"aria-label": "Loading",
|
|
3090
|
+
className: cn(spinnerVariants({ size }), className),
|
|
3091
|
+
...props
|
|
3092
|
+
}
|
|
3093
|
+
);
|
|
3094
|
+
}
|
|
3095
|
+
function formatFileSize(bytes) {
|
|
3096
|
+
if (!Number.isFinite(bytes) || bytes <= 0) return "0 B";
|
|
3097
|
+
const units = ["B", "KB", "MB", "GB"];
|
|
3098
|
+
const unitIndex = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
|
|
3099
|
+
const value = bytes / Math.pow(1024, unitIndex);
|
|
3100
|
+
return `${value.toFixed(value >= 10 || unitIndex === 0 ? 0 : 1)} ${units[unitIndex]}`;
|
|
3101
|
+
}
|
|
3102
|
+
function getFileSummary(files) {
|
|
3103
|
+
if (files.length === 0) return null;
|
|
3104
|
+
if (files.length === 1) return `${files[0].name} (${formatFileSize(files[0].size)})`;
|
|
3105
|
+
const totalSize = files.reduce((sum, file) => sum + file.size, 0);
|
|
3106
|
+
return `${files.length} files selected (${formatFileSize(totalSize)})`;
|
|
3107
|
+
}
|
|
3108
|
+
function FileDropzone({
|
|
3109
|
+
accept,
|
|
3110
|
+
multiple,
|
|
3111
|
+
disabled,
|
|
3112
|
+
loading,
|
|
3113
|
+
loadingText = "Uploading...",
|
|
3114
|
+
label = "Drag files here or click to upload",
|
|
3115
|
+
activeLabel = "Drop files to upload",
|
|
3116
|
+
description,
|
|
3117
|
+
icon,
|
|
3118
|
+
selectedFiles,
|
|
3119
|
+
inputRef,
|
|
3120
|
+
inputClassName,
|
|
3121
|
+
inputName,
|
|
3122
|
+
onFilesSelected,
|
|
3123
|
+
className,
|
|
3124
|
+
id,
|
|
3125
|
+
tabIndex,
|
|
3126
|
+
onKeyDown,
|
|
3127
|
+
onClick,
|
|
3128
|
+
...props
|
|
3129
|
+
}) {
|
|
3130
|
+
const [isDragging, setIsDragging] = React19.useState(false);
|
|
3131
|
+
const inputId = React19.useId();
|
|
3132
|
+
const resolvedId = id ?? inputId;
|
|
3133
|
+
const fileSummary = getFileSummary(selectedFiles ?? []);
|
|
3134
|
+
const isUnavailable = Boolean(disabled || loading);
|
|
3135
|
+
const emitFiles = React19.useCallback(
|
|
3136
|
+
(fileList) => {
|
|
3137
|
+
if (!fileList || isUnavailable) return;
|
|
3138
|
+
onFilesSelected?.(Array.from(fileList));
|
|
3139
|
+
},
|
|
3140
|
+
[isUnavailable, onFilesSelected]
|
|
3141
|
+
);
|
|
3142
|
+
return /* @__PURE__ */ jsxs(
|
|
3143
|
+
"label",
|
|
3144
|
+
{
|
|
3145
|
+
htmlFor: resolvedId,
|
|
3146
|
+
role: "button",
|
|
3147
|
+
tabIndex: isUnavailable ? -1 : tabIndex ?? 0,
|
|
3148
|
+
"aria-disabled": isUnavailable || void 0,
|
|
3149
|
+
"data-dragging": isDragging ? "true" : "false",
|
|
3150
|
+
className: cn(
|
|
3151
|
+
"group flex min-h-36 cursor-pointer flex-col items-center justify-center rounded-xl border border-dashed border-border bg-card p-6 text-center shadow-natural",
|
|
3152
|
+
"transition-[background-color,border-color,box-shadow,scale] duration-150",
|
|
3153
|
+
"hover:border-brand-primary/50 hover:bg-muted/40 active:scale-[0.96]",
|
|
3154
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
3155
|
+
"data-[dragging=true]:border-brand-primary data-[dragging=true]:bg-brand-secondary/25",
|
|
3156
|
+
isUnavailable && "pointer-events-none cursor-not-allowed opacity-60 active:scale-100",
|
|
3157
|
+
className
|
|
3158
|
+
),
|
|
3159
|
+
onDragOver: (event) => {
|
|
3160
|
+
event.preventDefault();
|
|
3161
|
+
if (!isUnavailable) setIsDragging(true);
|
|
3162
|
+
},
|
|
3163
|
+
onDragLeave: (event) => {
|
|
3164
|
+
event.preventDefault();
|
|
3165
|
+
setIsDragging(false);
|
|
3166
|
+
},
|
|
3167
|
+
onDrop: (event) => {
|
|
3168
|
+
event.preventDefault();
|
|
3169
|
+
setIsDragging(false);
|
|
3170
|
+
emitFiles(event.dataTransfer.files);
|
|
3171
|
+
},
|
|
3172
|
+
onKeyDown: (event) => {
|
|
3173
|
+
onKeyDown?.(event);
|
|
3174
|
+
if (event.defaultPrevented || isUnavailable) return;
|
|
3175
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
3176
|
+
event.preventDefault();
|
|
3177
|
+
document.getElementById(resolvedId)?.click();
|
|
3178
|
+
}
|
|
3179
|
+
},
|
|
3180
|
+
onClick: (event) => {
|
|
3181
|
+
if (isUnavailable) {
|
|
3182
|
+
event.preventDefault();
|
|
3183
|
+
return;
|
|
3184
|
+
}
|
|
3185
|
+
onClick?.(event);
|
|
3186
|
+
},
|
|
3187
|
+
...props,
|
|
3188
|
+
children: [
|
|
3189
|
+
/* @__PURE__ */ jsx(
|
|
3190
|
+
"input",
|
|
3191
|
+
{
|
|
3192
|
+
ref: inputRef,
|
|
3193
|
+
id: resolvedId,
|
|
3194
|
+
name: inputName,
|
|
3195
|
+
type: "file",
|
|
3196
|
+
accept,
|
|
3197
|
+
multiple,
|
|
3198
|
+
disabled: isUnavailable,
|
|
3199
|
+
className: cn("sr-only", inputClassName),
|
|
3200
|
+
onChange: (event) => emitFiles(event.currentTarget.files)
|
|
3201
|
+
}
|
|
3202
|
+
),
|
|
3203
|
+
/* @__PURE__ */ jsx(
|
|
3204
|
+
"span",
|
|
3205
|
+
{
|
|
3206
|
+
className: cn(
|
|
3207
|
+
"mb-3 flex size-12 items-center justify-center rounded-xl bg-muted text-muted-foreground",
|
|
3208
|
+
"transition-[background-color,color,scale] duration-150 group-hover:bg-brand-secondary/35 group-hover:text-foreground",
|
|
3209
|
+
"group-data-[dragging=true]:bg-brand-secondary group-data-[dragging=true]:text-foreground"
|
|
3210
|
+
),
|
|
3211
|
+
"aria-hidden": "true",
|
|
3212
|
+
children: loading ? /* @__PURE__ */ jsx(Spinner, { size: "sm" }) : icon ?? /* @__PURE__ */ jsx(Upload, { className: "size-5" })
|
|
3213
|
+
}
|
|
3214
|
+
),
|
|
3215
|
+
/* @__PURE__ */ jsx("span", { className: "body-sm font-medium text-foreground text-balance", children: loading ? loadingText : isDragging ? activeLabel : fileSummary ? fileSummary : label }),
|
|
3216
|
+
description && /* @__PURE__ */ jsx("span", { className: "caption mt-1 max-w-md text-pretty text-muted-foreground", children: description }),
|
|
3217
|
+
fileSummary && !loading && /* @__PURE__ */ jsxs("span", { className: "caption mt-2 inline-flex min-h-7 max-w-full items-center gap-1 rounded-full bg-muted px-2.5 text-muted-foreground", children: [
|
|
3218
|
+
/* @__PURE__ */ jsx(File, { className: "size-3.5 shrink-0", "aria-hidden": "true" }),
|
|
3219
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: multiple ? "Ready to upload" : "Selected" })
|
|
3220
|
+
] })
|
|
3221
|
+
]
|
|
3222
|
+
}
|
|
3223
|
+
);
|
|
3224
|
+
}
|
|
3225
|
+
FileDropzone.displayName = "FileDropzone";
|
|
3226
|
+
var colMap = {
|
|
3227
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
3228
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
3229
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
3230
|
+
};
|
|
3231
|
+
var gapMap = {
|
|
3232
|
+
sm: "gap-3",
|
|
3233
|
+
md: "gap-4",
|
|
3234
|
+
lg: "gap-6"
|
|
3235
|
+
};
|
|
3236
|
+
function GridList({ children, columns = 3, gap = "md", className }) {
|
|
3237
|
+
return /* @__PURE__ */ jsx("ul", { role: "list", className: cn("grid", colMap[columns], gapMap[gap], className), children });
|
|
3238
|
+
}
|
|
3239
|
+
function GridListCard({
|
|
3240
|
+
title,
|
|
3241
|
+
description,
|
|
3242
|
+
meta,
|
|
3243
|
+
href,
|
|
3244
|
+
accent,
|
|
3245
|
+
trailing,
|
|
3246
|
+
className
|
|
3247
|
+
}) {
|
|
3248
|
+
const inner = /* @__PURE__ */ jsxs(
|
|
3249
|
+
"div",
|
|
3250
|
+
{
|
|
3251
|
+
className: cn(
|
|
3252
|
+
"flex h-full flex-col gap-1 rounded-xl border border-border bg-card p-4 shadow-natural transition-shadow",
|
|
3253
|
+
href && "hover:shadow-elevated",
|
|
3254
|
+
className
|
|
3255
|
+
),
|
|
3256
|
+
children: [
|
|
3257
|
+
accent && /* @__PURE__ */ jsx("div", { className: "mb-2", children: accent }),
|
|
3258
|
+
/* @__PURE__ */ jsx("p", { className: "body font-semibold text-foreground text-balance", children: title }),
|
|
2429
3259
|
description && /* @__PURE__ */ jsx("p", { className: "caption text-muted-foreground text-pretty", children: description }),
|
|
2430
3260
|
(meta || trailing) && /* @__PURE__ */ jsxs("div", { className: "mt-auto flex items-center justify-between pt-3", children: [
|
|
2431
3261
|
meta && /* @__PURE__ */ jsx("span", { className: "caption text-muted-foreground", children: meta }),
|
|
@@ -2493,9 +3323,99 @@ function GridListAccentCard({
|
|
|
2493
3323
|
GridList.displayName = "GridList";
|
|
2494
3324
|
GridListCard.displayName = "GridListCard";
|
|
2495
3325
|
GridListAccentCard.displayName = "GridListAccentCard";
|
|
3326
|
+
function TooltipProvider({
|
|
3327
|
+
children,
|
|
3328
|
+
...props
|
|
3329
|
+
}) {
|
|
3330
|
+
return /* @__PURE__ */ jsx(Tooltip.Provider, { delayDuration: 300, ...props, children });
|
|
3331
|
+
}
|
|
3332
|
+
var TooltipRoot = Tooltip.Root;
|
|
3333
|
+
var TooltipTrigger = Tooltip.Trigger;
|
|
3334
|
+
var TooltipContent = React19.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(
|
|
3335
|
+
Tooltip.Content,
|
|
3336
|
+
{
|
|
3337
|
+
ref,
|
|
3338
|
+
sideOffset,
|
|
3339
|
+
className: cn(
|
|
3340
|
+
"z-50 rounded-lg bg-foreground px-2.5 py-1.5 caption text-background",
|
|
3341
|
+
"animate-in fade-in-0 zoom-in-95",
|
|
3342
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3343
|
+
"data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",
|
|
3344
|
+
"data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",
|
|
3345
|
+
className
|
|
3346
|
+
),
|
|
3347
|
+
...props
|
|
3348
|
+
}
|
|
3349
|
+
) }));
|
|
3350
|
+
TooltipContent.displayName = "TooltipContent";
|
|
3351
|
+
function HelpTooltip({
|
|
3352
|
+
text,
|
|
3353
|
+
learnMoreUrl,
|
|
3354
|
+
learnMoreURL,
|
|
3355
|
+
placement = "top",
|
|
3356
|
+
className,
|
|
3357
|
+
contentClassName
|
|
3358
|
+
}) {
|
|
3359
|
+
const [open, setOpen] = React19.useState(false);
|
|
3360
|
+
const rootRef = React19.useRef(null);
|
|
3361
|
+
const url = learnMoreUrl ?? learnMoreURL;
|
|
3362
|
+
const body = text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
3363
|
+
React19.useEffect(() => {
|
|
3364
|
+
if (!open) return;
|
|
3365
|
+
const onPointerDown = (event) => {
|
|
3366
|
+
if (!rootRef.current?.contains(event.target)) {
|
|
3367
|
+
setOpen(false);
|
|
3368
|
+
}
|
|
3369
|
+
};
|
|
3370
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
3371
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
3372
|
+
}, [open]);
|
|
3373
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsx(TooltipRoot, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs("span", { ref: rootRef, className: cn("inline-flex align-middle", className), children: [
|
|
3374
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
3375
|
+
"button",
|
|
3376
|
+
{
|
|
3377
|
+
type: "button",
|
|
3378
|
+
className: cn(
|
|
3379
|
+
"relative ml-1 inline-flex size-5 items-center justify-center rounded-full text-muted-foreground",
|
|
3380
|
+
"transition-[color,scale] duration-150 hover:text-foreground active:scale-[0.96]",
|
|
3381
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
3382
|
+
"before:absolute before:-inset-2.5 before:content-['']"
|
|
3383
|
+
),
|
|
3384
|
+
"aria-label": "Help",
|
|
3385
|
+
onClick: (event) => {
|
|
3386
|
+
event.preventDefault();
|
|
3387
|
+
setOpen((current) => !current);
|
|
3388
|
+
},
|
|
3389
|
+
children: /* @__PURE__ */ jsx(CircleHelp, { className: "size-4", "aria-hidden": "true" })
|
|
3390
|
+
}
|
|
3391
|
+
) }),
|
|
3392
|
+
/* @__PURE__ */ jsxs(
|
|
3393
|
+
TooltipContent,
|
|
3394
|
+
{
|
|
3395
|
+
side: placement,
|
|
3396
|
+
collisionPadding: 12,
|
|
3397
|
+
className: cn("max-w-xs text-sm", contentClassName),
|
|
3398
|
+
children: [
|
|
3399
|
+
/* @__PURE__ */ jsx("p", { className: "text-pretty", children: body }),
|
|
3400
|
+
url && /* @__PURE__ */ jsx(
|
|
3401
|
+
"a",
|
|
3402
|
+
{
|
|
3403
|
+
href: url,
|
|
3404
|
+
target: "_blank",
|
|
3405
|
+
rel: "noopener noreferrer",
|
|
3406
|
+
className: "mt-1 block text-xs font-medium text-brand-primary underline-offset-4 hover:underline",
|
|
3407
|
+
children: "Learn more"
|
|
3408
|
+
}
|
|
3409
|
+
)
|
|
3410
|
+
]
|
|
3411
|
+
}
|
|
3412
|
+
)
|
|
3413
|
+
] }) }) });
|
|
3414
|
+
}
|
|
3415
|
+
HelpTooltip.displayName = "HelpTooltip";
|
|
2496
3416
|
var HoverCardRoot = HoverCard.Root;
|
|
2497
3417
|
var HoverCardTrigger = HoverCard.Trigger;
|
|
2498
|
-
var HoverCardContent =
|
|
3418
|
+
var HoverCardContent = React19.forwardRef(({ className, align = "center", sideOffset = 6, ...props }, ref) => /* @__PURE__ */ jsx(HoverCard.Portal, { children: /* @__PURE__ */ jsx(
|
|
2499
3419
|
HoverCard.Content,
|
|
2500
3420
|
{
|
|
2501
3421
|
ref,
|
|
@@ -2514,7 +3434,7 @@ var HoverCardContent = React17.forwardRef(({ className, align = "center", sideOf
|
|
|
2514
3434
|
}
|
|
2515
3435
|
) }));
|
|
2516
3436
|
HoverCardContent.displayName = "HoverCardContent";
|
|
2517
|
-
var InputGroup =
|
|
3437
|
+
var InputGroup = React19.forwardRef(
|
|
2518
3438
|
({
|
|
2519
3439
|
leadingAddon,
|
|
2520
3440
|
trailingAddon,
|
|
@@ -2597,7 +3517,7 @@ var InputGroup = React17.forwardRef(
|
|
|
2597
3517
|
}
|
|
2598
3518
|
);
|
|
2599
3519
|
InputGroup.displayName = "InputGroup";
|
|
2600
|
-
var InputNumber =
|
|
3520
|
+
var InputNumber = React19.forwardRef(
|
|
2601
3521
|
({
|
|
2602
3522
|
value,
|
|
2603
3523
|
onChange,
|
|
@@ -2611,11 +3531,11 @@ var InputNumber = React17.forwardRef(
|
|
|
2611
3531
|
disabled,
|
|
2612
3532
|
...rest
|
|
2613
3533
|
}, ref) => {
|
|
2614
|
-
const [text, setText] =
|
|
2615
|
-
|
|
3534
|
+
const [text, setText] = React19.useState(value.toFixed(precision));
|
|
3535
|
+
React19.useEffect(() => {
|
|
2616
3536
|
setText(value.toFixed(precision));
|
|
2617
3537
|
}, [value, precision]);
|
|
2618
|
-
const clamp =
|
|
3538
|
+
const clamp = React19.useCallback((n) => Math.min(max, Math.max(min, n)), [min, max]);
|
|
2619
3539
|
const commit = (raw) => {
|
|
2620
3540
|
const n = parseFloat(raw);
|
|
2621
3541
|
if (Number.isFinite(n)) {
|
|
@@ -2707,7 +3627,7 @@ var InputNumber = React17.forwardRef(
|
|
|
2707
3627
|
}
|
|
2708
3628
|
);
|
|
2709
3629
|
InputNumber.displayName = "InputNumber";
|
|
2710
|
-
var InputOTP =
|
|
3630
|
+
var InputOTP = React19.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2711
3631
|
OTPInput,
|
|
2712
3632
|
{
|
|
2713
3633
|
ref,
|
|
@@ -2717,12 +3637,12 @@ var InputOTP = React17.forwardRef(({ className, containerClassName, ...props },
|
|
|
2717
3637
|
}
|
|
2718
3638
|
));
|
|
2719
3639
|
InputOTP.displayName = "InputOTP";
|
|
2720
|
-
var InputOTPGroup =
|
|
3640
|
+
var InputOTPGroup = React19.forwardRef(
|
|
2721
3641
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props })
|
|
2722
3642
|
);
|
|
2723
3643
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
2724
|
-
var InputOTPSlot =
|
|
2725
|
-
const inputOTPContext =
|
|
3644
|
+
var InputOTPSlot = React19.forwardRef(({ index, className, ...props }, ref) => {
|
|
3645
|
+
const inputOTPContext = React19.useContext(OTPInputContext);
|
|
2726
3646
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
2727
3647
|
return /* @__PURE__ */ jsxs(
|
|
2728
3648
|
"div",
|
|
@@ -2745,11 +3665,11 @@ var InputOTPSlot = React17.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
2745
3665
|
);
|
|
2746
3666
|
});
|
|
2747
3667
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
2748
|
-
var InputOTPSeparator =
|
|
3668
|
+
var InputOTPSeparator = React19.forwardRef(
|
|
2749
3669
|
({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Minus, { size: 14, className: "text-muted-foreground" }) })
|
|
2750
3670
|
);
|
|
2751
3671
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
2752
|
-
var Kbd =
|
|
3672
|
+
var Kbd = React19.forwardRef(
|
|
2753
3673
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2754
3674
|
"kbd",
|
|
2755
3675
|
{
|
|
@@ -2763,6 +3683,95 @@ var Kbd = React17.forwardRef(
|
|
|
2763
3683
|
)
|
|
2764
3684
|
);
|
|
2765
3685
|
Kbd.displayName = "Kbd";
|
|
3686
|
+
function MediaAssetCard({
|
|
3687
|
+
name,
|
|
3688
|
+
src,
|
|
3689
|
+
alt = "",
|
|
3690
|
+
meta,
|
|
3691
|
+
details,
|
|
3692
|
+
actions,
|
|
3693
|
+
selected,
|
|
3694
|
+
mediaType = src ? "image" : "file",
|
|
3695
|
+
orientation = "responsive",
|
|
3696
|
+
onSelect,
|
|
3697
|
+
className,
|
|
3698
|
+
onClick,
|
|
3699
|
+
...props
|
|
3700
|
+
}) {
|
|
3701
|
+
const isInteractive = Boolean(onSelect || onClick);
|
|
3702
|
+
const Wrapper = isInteractive ? "button" : "div";
|
|
3703
|
+
const isList = orientation === "list";
|
|
3704
|
+
const isGrid = orientation === "grid";
|
|
3705
|
+
const showImage = Boolean(src && mediaType === "image");
|
|
3706
|
+
const fallbackIcon = mediaType === "image" ? /* @__PURE__ */ jsx(Image, { className: "size-6 text-muted-foreground", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(File, { className: "size-6 text-muted-foreground", "aria-hidden": "true" });
|
|
3707
|
+
return /* @__PURE__ */ jsxs(
|
|
3708
|
+
"div",
|
|
3709
|
+
{
|
|
3710
|
+
className: cn(
|
|
3711
|
+
"group min-w-0",
|
|
3712
|
+
isGrid && "overflow-hidden rounded-xl border border-border bg-card shadow-natural",
|
|
3713
|
+
isList && "flex gap-3 border-b border-border py-3 last:border-b-0",
|
|
3714
|
+
orientation === "responsive" && "flex gap-3 border-b border-border py-3 last:border-b-0 sm:block sm:overflow-hidden sm:rounded-xl sm:border sm:bg-card sm:py-0 sm:shadow-natural",
|
|
3715
|
+
selected && "ring-2 ring-brand-primary/35",
|
|
3716
|
+
className
|
|
3717
|
+
),
|
|
3718
|
+
"data-slot": "media-asset-card",
|
|
3719
|
+
"data-selected": selected ? "true" : "false",
|
|
3720
|
+
...props,
|
|
3721
|
+
children: [
|
|
3722
|
+
/* @__PURE__ */ jsx(
|
|
3723
|
+
Wrapper,
|
|
3724
|
+
{
|
|
3725
|
+
type: Wrapper === "button" ? "button" : void 0,
|
|
3726
|
+
className: cn(
|
|
3727
|
+
"relative flex shrink-0 items-center justify-center overflow-hidden bg-muted text-left",
|
|
3728
|
+
"transition-[background-color,box-shadow,scale] duration-150",
|
|
3729
|
+
isInteractive && "cursor-pointer active:scale-[0.96] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
3730
|
+
isList && "size-16 rounded-lg",
|
|
3731
|
+
isGrid && "aspect-square w-full",
|
|
3732
|
+
orientation === "responsive" && "size-16 rounded-lg sm:aspect-square sm:size-auto sm:w-full sm:rounded-none"
|
|
3733
|
+
),
|
|
3734
|
+
onClick: (event) => {
|
|
3735
|
+
onClick?.(event);
|
|
3736
|
+
if (!event.defaultPrevented) onSelect?.();
|
|
3737
|
+
},
|
|
3738
|
+
"aria-label": isInteractive && typeof name === "string" ? name : void 0,
|
|
3739
|
+
children: showImage ? /* @__PURE__ */ jsx(
|
|
3740
|
+
"img",
|
|
3741
|
+
{
|
|
3742
|
+
src: src ?? void 0,
|
|
3743
|
+
alt,
|
|
3744
|
+
className: "size-full object-cover shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1)] dark:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.1)]"
|
|
3745
|
+
}
|
|
3746
|
+
) : fallbackIcon
|
|
3747
|
+
}
|
|
3748
|
+
),
|
|
3749
|
+
/* @__PURE__ */ jsxs(
|
|
3750
|
+
"div",
|
|
3751
|
+
{
|
|
3752
|
+
className: cn(
|
|
3753
|
+
"min-w-0 flex-1",
|
|
3754
|
+
isGrid && "p-3",
|
|
3755
|
+
isList && "py-0.5",
|
|
3756
|
+
orientation === "responsive" && "py-0.5 sm:p-3"
|
|
3757
|
+
),
|
|
3758
|
+
children: [
|
|
3759
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start justify-between gap-2", children: [
|
|
3760
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
3761
|
+
/* @__PURE__ */ jsx("p", { className: "line-clamp-2 break-words text-sm font-medium leading-5 text-foreground sm:truncate", children: name }),
|
|
3762
|
+
meta && /* @__PURE__ */ jsx("p", { className: "caption mt-0.5 truncate text-muted-foreground", children: meta })
|
|
3763
|
+
] }),
|
|
3764
|
+
actions && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: actions })
|
|
3765
|
+
] }),
|
|
3766
|
+
details && /* @__PURE__ */ jsx("div", { className: "caption mt-2 text-pretty text-muted-foreground", children: details })
|
|
3767
|
+
]
|
|
3768
|
+
}
|
|
3769
|
+
)
|
|
3770
|
+
]
|
|
3771
|
+
}
|
|
3772
|
+
);
|
|
3773
|
+
}
|
|
3774
|
+
MediaAssetCard.displayName = "MediaAssetCard";
|
|
2766
3775
|
var alignMap = {
|
|
2767
3776
|
top: "items-start",
|
|
2768
3777
|
center: "items-center",
|
|
@@ -2799,7 +3808,7 @@ function MediaObject({
|
|
|
2799
3808
|
);
|
|
2800
3809
|
}
|
|
2801
3810
|
MediaObject.displayName = "MediaObject";
|
|
2802
|
-
var MenubarRoot =
|
|
3811
|
+
var MenubarRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2803
3812
|
Menubar.Root,
|
|
2804
3813
|
{
|
|
2805
3814
|
ref,
|
|
@@ -2815,7 +3824,7 @@ var MenubarMenu = Menubar.Menu;
|
|
|
2815
3824
|
var MenubarGroup = Menubar.Group;
|
|
2816
3825
|
var MenubarSub = Menubar.Sub;
|
|
2817
3826
|
var MenubarRadioGroup = Menubar.RadioGroup;
|
|
2818
|
-
var MenubarTrigger =
|
|
3827
|
+
var MenubarTrigger = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2819
3828
|
Menubar.Trigger,
|
|
2820
3829
|
{
|
|
2821
3830
|
ref,
|
|
@@ -2830,27 +3839,35 @@ var MenubarTrigger = React17.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2830
3839
|
}
|
|
2831
3840
|
));
|
|
2832
3841
|
MenubarTrigger.displayName = "MenubarTrigger";
|
|
2833
|
-
var MenubarContent =
|
|
2834
|
-
|
|
2835
|
-
{
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
3842
|
+
var MenubarContent = React19.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3843
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
3844
|
+
/* @__PURE__ */ jsx(Menubar.Portal, { children: /* @__PURE__ */ jsx(
|
|
3845
|
+
Menubar.Content,
|
|
3846
|
+
{
|
|
3847
|
+
ref,
|
|
3848
|
+
"data-hilum-mobile-sheet": "true",
|
|
3849
|
+
align,
|
|
3850
|
+
alignOffset,
|
|
3851
|
+
sideOffset,
|
|
3852
|
+
className: cn(
|
|
3853
|
+
"z-50 min-w-[12rem] bg-card rounded-xl shadow-natural p-1",
|
|
3854
|
+
mobilePopperSheetPositionClassName,
|
|
3855
|
+
mobilePopperSheetSurfaceClassName,
|
|
3856
|
+
"max-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
3857
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3858
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3859
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3860
|
+
mobilePopperSheetMotionClassName,
|
|
3861
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3862
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
3863
|
+
className
|
|
3864
|
+
),
|
|
3865
|
+
...props
|
|
3866
|
+
}
|
|
3867
|
+
) })
|
|
3868
|
+
] }));
|
|
2852
3869
|
MenubarContent.displayName = "MenubarContent";
|
|
2853
|
-
var MenubarItem =
|
|
3870
|
+
var MenubarItem = React19.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2854
3871
|
Menubar.Item,
|
|
2855
3872
|
{
|
|
2856
3873
|
ref,
|
|
@@ -2866,7 +3883,7 @@ var MenubarItem = React17.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
2866
3883
|
}
|
|
2867
3884
|
));
|
|
2868
3885
|
MenubarItem.displayName = "MenubarItem";
|
|
2869
|
-
var MenubarCheckboxItem =
|
|
3886
|
+
var MenubarCheckboxItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2870
3887
|
Menubar.CheckboxItem,
|
|
2871
3888
|
{
|
|
2872
3889
|
ref,
|
|
@@ -2885,7 +3902,7 @@ var MenubarCheckboxItem = React17.forwardRef(({ className, children, ...props },
|
|
|
2885
3902
|
}
|
|
2886
3903
|
));
|
|
2887
3904
|
MenubarCheckboxItem.displayName = "MenubarCheckboxItem";
|
|
2888
|
-
var MenubarRadioItem =
|
|
3905
|
+
var MenubarRadioItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2889
3906
|
Menubar.RadioItem,
|
|
2890
3907
|
{
|
|
2891
3908
|
ref,
|
|
@@ -2904,7 +3921,7 @@ var MenubarRadioItem = React17.forwardRef(({ className, children, ...props }, re
|
|
|
2904
3921
|
}
|
|
2905
3922
|
));
|
|
2906
3923
|
MenubarRadioItem.displayName = "MenubarRadioItem";
|
|
2907
|
-
var MenubarLabel =
|
|
3924
|
+
var MenubarLabel = React19.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2908
3925
|
Menubar.Label,
|
|
2909
3926
|
{
|
|
2910
3927
|
ref,
|
|
@@ -2913,9 +3930,9 @@ var MenubarLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /
|
|
|
2913
3930
|
}
|
|
2914
3931
|
));
|
|
2915
3932
|
MenubarLabel.displayName = "MenubarLabel";
|
|
2916
|
-
var MenubarSeparator =
|
|
3933
|
+
var MenubarSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Menubar.Separator, { ref, className: cn("mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
2917
3934
|
MenubarSeparator.displayName = "MenubarSeparator";
|
|
2918
|
-
var MenubarSubTrigger =
|
|
3935
|
+
var MenubarSubTrigger = React19.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2919
3936
|
Menubar.SubTrigger,
|
|
2920
3937
|
{
|
|
2921
3938
|
ref,
|
|
@@ -2934,27 +3951,35 @@ var MenubarSubTrigger = React17.forwardRef(({ className, inset, children, ...pro
|
|
|
2934
3951
|
}
|
|
2935
3952
|
));
|
|
2936
3953
|
MenubarSubTrigger.displayName = "MenubarSubTrigger";
|
|
2937
|
-
var MenubarSubContent =
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
"data-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
3954
|
+
var MenubarSubContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3955
|
+
/* @__PURE__ */ jsx("style", { children: mobilePopperSheetStyle }),
|
|
3956
|
+
/* @__PURE__ */ jsx(
|
|
3957
|
+
Menubar.SubContent,
|
|
3958
|
+
{
|
|
3959
|
+
ref,
|
|
3960
|
+
"data-hilum-mobile-sheet": "true",
|
|
3961
|
+
className: cn(
|
|
3962
|
+
"z-50 min-w-[8rem] bg-card rounded-xl border border-border shadow-natural p-1",
|
|
3963
|
+
mobilePopperSheetPositionClassName,
|
|
3964
|
+
mobilePopperSheetSurfaceClassName,
|
|
3965
|
+
"max-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
|
|
3966
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3967
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3968
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3969
|
+
mobilePopperSheetMotionClassName,
|
|
3970
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
3971
|
+
className
|
|
3972
|
+
),
|
|
3973
|
+
...props
|
|
3974
|
+
}
|
|
3975
|
+
)
|
|
3976
|
+
] }));
|
|
2952
3977
|
MenubarSubContent.displayName = "MenubarSubContent";
|
|
2953
3978
|
function MenubarShortcut({ className, ...props }) {
|
|
2954
3979
|
return /* @__PURE__ */ jsx("span", { className: cn("ml-auto caption text-muted-foreground", className), ...props });
|
|
2955
3980
|
}
|
|
2956
3981
|
MenubarShortcut.displayName = "MenubarShortcut";
|
|
2957
|
-
var NativeSelect =
|
|
3982
|
+
var NativeSelect = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2958
3983
|
/* @__PURE__ */ jsx(
|
|
2959
3984
|
"select",
|
|
2960
3985
|
{
|
|
@@ -2980,11 +4005,11 @@ var NativeSelect = React17.forwardRef(({ className, children, ...props }, ref) =
|
|
|
2980
4005
|
)
|
|
2981
4006
|
] }));
|
|
2982
4007
|
NativeSelect.displayName = "NativeSelect";
|
|
2983
|
-
var NativeSelectOption =
|
|
4008
|
+
var NativeSelectOption = React19.forwardRef((props, ref) => /* @__PURE__ */ jsx("option", { ref, ...props }));
|
|
2984
4009
|
NativeSelectOption.displayName = "NativeSelectOption";
|
|
2985
|
-
var NativeSelectOptGroup =
|
|
4010
|
+
var NativeSelectOptGroup = React19.forwardRef((props, ref) => /* @__PURE__ */ jsx("optgroup", { ref, ...props }));
|
|
2986
4011
|
NativeSelectOptGroup.displayName = "NativeSelectOptGroup";
|
|
2987
|
-
var NavigationMenuRoot =
|
|
4012
|
+
var NavigationMenuRoot = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2988
4013
|
NavigationMenu.Root,
|
|
2989
4014
|
{
|
|
2990
4015
|
ref,
|
|
@@ -2994,7 +4019,7 @@ var NavigationMenuRoot = React17.forwardRef(({ className, children, ...props },
|
|
|
2994
4019
|
}
|
|
2995
4020
|
));
|
|
2996
4021
|
NavigationMenuRoot.displayName = "NavigationMenu";
|
|
2997
|
-
var NavigationMenuList =
|
|
4022
|
+
var NavigationMenuList = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2998
4023
|
NavigationMenu.List,
|
|
2999
4024
|
{
|
|
3000
4025
|
ref,
|
|
@@ -3004,7 +4029,7 @@ var NavigationMenuList = React17.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3004
4029
|
));
|
|
3005
4030
|
NavigationMenuList.displayName = "NavigationMenuList";
|
|
3006
4031
|
var NavigationMenuItem = NavigationMenu.Item;
|
|
3007
|
-
var NavigationMenuTrigger =
|
|
4032
|
+
var NavigationMenuTrigger = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3008
4033
|
NavigationMenu.Trigger,
|
|
3009
4034
|
{
|
|
3010
4035
|
ref,
|
|
@@ -3031,7 +4056,7 @@ var NavigationMenuTrigger = React17.forwardRef(({ className, children, ...props
|
|
|
3031
4056
|
}
|
|
3032
4057
|
));
|
|
3033
4058
|
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
3034
|
-
var NavigationMenuContent =
|
|
4059
|
+
var NavigationMenuContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3035
4060
|
NavigationMenu.Content,
|
|
3036
4061
|
{
|
|
3037
4062
|
ref,
|
|
@@ -3048,7 +4073,7 @@ var NavigationMenuContent = React17.forwardRef(({ className, ...props }, ref) =>
|
|
|
3048
4073
|
}
|
|
3049
4074
|
));
|
|
3050
4075
|
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
3051
|
-
var NavigationMenuLink =
|
|
4076
|
+
var NavigationMenuLink = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3052
4077
|
NavigationMenu.Link,
|
|
3053
4078
|
{
|
|
3054
4079
|
ref,
|
|
@@ -3062,7 +4087,7 @@ var NavigationMenuLink = React17.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3062
4087
|
}
|
|
3063
4088
|
));
|
|
3064
4089
|
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
3065
|
-
var NavigationMenuViewport =
|
|
4090
|
+
var NavigationMenuViewport = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "absolute left-0 top-full flex justify-center", children: /* @__PURE__ */ jsx(
|
|
3066
4091
|
NavigationMenu.Viewport,
|
|
3067
4092
|
{
|
|
3068
4093
|
ref,
|
|
@@ -3077,7 +4102,7 @@ var NavigationMenuViewport = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
3077
4102
|
}
|
|
3078
4103
|
) }));
|
|
3079
4104
|
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
3080
|
-
var NavigationMenuIndicator =
|
|
4105
|
+
var NavigationMenuIndicator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3081
4106
|
NavigationMenu.Indicator,
|
|
3082
4107
|
{
|
|
3083
4108
|
ref,
|
|
@@ -3179,7 +4204,7 @@ function PageHeading({
|
|
|
3179
4204
|
className
|
|
3180
4205
|
}) {
|
|
3181
4206
|
return /* @__PURE__ */ jsxs("div", { className: cn("border-b border-border pb-6", className), children: [
|
|
3182
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx("nav", { className: "mb-3 flex items-center gap-1.5", "aria-label": "Breadcrumb", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
4207
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx("nav", { className: "mb-3 flex items-center gap-1.5", "aria-label": "Breadcrumb", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React19.Fragment, { children: [
|
|
3183
4208
|
i > 0 && /* @__PURE__ */ jsx(ChevronRight, { size: 12, className: "text-muted-foreground shrink-0" }),
|
|
3184
4209
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
3185
4210
|
"a",
|
|
@@ -3236,11 +4261,11 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
3236
4261
|
}
|
|
3237
4262
|
);
|
|
3238
4263
|
Pagination.displayName = "Pagination";
|
|
3239
|
-
var PaginationContent =
|
|
4264
|
+
var PaginationContent = React19.forwardRef(
|
|
3240
4265
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", { ref, className: cn("flex flex-row items-center gap-1", className), ...props })
|
|
3241
4266
|
);
|
|
3242
4267
|
PaginationContent.displayName = "PaginationContent";
|
|
3243
|
-
var PaginationItem =
|
|
4268
|
+
var PaginationItem = React19.forwardRef(
|
|
3244
4269
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props })
|
|
3245
4270
|
);
|
|
3246
4271
|
PaginationItem.displayName = "PaginationItem";
|
|
@@ -3296,7 +4321,7 @@ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
3296
4321
|
}
|
|
3297
4322
|
);
|
|
3298
4323
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
3299
|
-
var ProgressRoot =
|
|
4324
|
+
var ProgressRoot = React19.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3300
4325
|
Progress.Root,
|
|
3301
4326
|
{
|
|
3302
4327
|
ref,
|
|
@@ -3425,9 +4450,9 @@ function RadioCards({ options, value, onValueChange, columns = 3, className }) {
|
|
|
3425
4450
|
}) });
|
|
3426
4451
|
}
|
|
3427
4452
|
RadioCards.displayName = "RadioCards";
|
|
3428
|
-
var RadioGroupRoot =
|
|
4453
|
+
var RadioGroupRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroup.Root, { ref, className: cn("grid gap-2", className), ...props }));
|
|
3429
4454
|
RadioGroupRoot.displayName = "RadioGroup";
|
|
3430
|
-
var RadioGroupItem =
|
|
4455
|
+
var RadioGroupItem = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3431
4456
|
RadioGroup.Item,
|
|
3432
4457
|
{
|
|
3433
4458
|
ref,
|
|
@@ -3491,26 +4516,407 @@ function ResizableHandle({ className, withHandle = true, ...props }) {
|
|
|
3491
4516
|
);
|
|
3492
4517
|
}
|
|
3493
4518
|
ResizableHandle.displayName = "ResizableHandle";
|
|
3494
|
-
var
|
|
3495
|
-
|
|
3496
|
-
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "vertical" }),
|
|
3497
|
-
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "horizontal" }),
|
|
3498
|
-
/* @__PURE__ */ jsx(ScrollArea.Corner, {})
|
|
3499
|
-
] }));
|
|
3500
|
-
ScrollAreaRoot.displayName = "ScrollArea";
|
|
3501
|
-
var ScrollAreaScrollbar = React17.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3502
|
-
ScrollArea.Scrollbar,
|
|
4519
|
+
var Separator2 = React19.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4520
|
+
Separator.Root,
|
|
3503
4521
|
{
|
|
3504
4522
|
ref,
|
|
4523
|
+
decorative,
|
|
3505
4524
|
orientation,
|
|
3506
4525
|
className: cn(
|
|
3507
|
-
"
|
|
3508
|
-
orientation === "
|
|
3509
|
-
orientation === "horizontal" && "h-2 flex-col border-t border-t-transparent p-px",
|
|
4526
|
+
"shrink-0 bg-muted",
|
|
4527
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
3510
4528
|
className
|
|
3511
4529
|
),
|
|
3512
|
-
...props
|
|
3513
|
-
|
|
4530
|
+
...props
|
|
4531
|
+
}
|
|
4532
|
+
));
|
|
4533
|
+
Separator2.displayName = "Separator";
|
|
4534
|
+
function wrapSelectionInline(tag, attrs) {
|
|
4535
|
+
const selection = window.getSelection();
|
|
4536
|
+
if (!selection || selection.rangeCount === 0 || selection.isCollapsed) return;
|
|
4537
|
+
const range = selection.getRangeAt(0);
|
|
4538
|
+
const wrapper = document.createElement(tag);
|
|
4539
|
+
Object.entries(attrs ?? {}).forEach(([key, value]) => {
|
|
4540
|
+
wrapper.setAttribute(key, value);
|
|
4541
|
+
});
|
|
4542
|
+
wrapper.appendChild(range.extractContents());
|
|
4543
|
+
range.insertNode(wrapper);
|
|
4544
|
+
selection.removeAllRanges();
|
|
4545
|
+
const nextRange = document.createRange();
|
|
4546
|
+
nextRange.selectNodeContents(wrapper);
|
|
4547
|
+
selection.addRange(nextRange);
|
|
4548
|
+
}
|
|
4549
|
+
function formatBlock(tag) {
|
|
4550
|
+
const selection = window.getSelection();
|
|
4551
|
+
if (!selection || selection.rangeCount === 0) return;
|
|
4552
|
+
const range = selection.getRangeAt(0);
|
|
4553
|
+
let block = range.startContainer;
|
|
4554
|
+
if (block.nodeType === Node.TEXT_NODE) block = block.parentElement;
|
|
4555
|
+
while (block && block.isContentEditable !== true) {
|
|
4556
|
+
const parent = block.parentElement;
|
|
4557
|
+
if (!parent || parent.getAttribute("contenteditable") === "true") break;
|
|
4558
|
+
block = parent;
|
|
4559
|
+
}
|
|
4560
|
+
const nextBlock = document.createElement(tag);
|
|
4561
|
+
if (block && block.getAttribute("contenteditable") !== "true") {
|
|
4562
|
+
nextBlock.innerHTML = block.innerHTML;
|
|
4563
|
+
block.replaceWith(nextBlock);
|
|
4564
|
+
} else {
|
|
4565
|
+
nextBlock.appendChild(range.extractContents());
|
|
4566
|
+
range.insertNode(nextBlock);
|
|
4567
|
+
}
|
|
4568
|
+
selection.removeAllRanges();
|
|
4569
|
+
const nextRange = document.createRange();
|
|
4570
|
+
nextRange.selectNodeContents(nextBlock);
|
|
4571
|
+
selection.addRange(nextRange);
|
|
4572
|
+
}
|
|
4573
|
+
function insertList(ordered) {
|
|
4574
|
+
const selection = window.getSelection();
|
|
4575
|
+
if (!selection || selection.rangeCount === 0) return;
|
|
4576
|
+
const range = selection.getRangeAt(0);
|
|
4577
|
+
const fragment = range.extractContents();
|
|
4578
|
+
const list = document.createElement(ordered ? "ol" : "ul");
|
|
4579
|
+
const children = Array.from(fragment.childNodes);
|
|
4580
|
+
if (children.length === 0) {
|
|
4581
|
+
const item = document.createElement("li");
|
|
4582
|
+
item.innerHTML = "\u200B";
|
|
4583
|
+
list.appendChild(item);
|
|
4584
|
+
} else {
|
|
4585
|
+
children.forEach((child) => {
|
|
4586
|
+
const item = document.createElement("li");
|
|
4587
|
+
item.appendChild(child);
|
|
4588
|
+
list.appendChild(item);
|
|
4589
|
+
});
|
|
4590
|
+
}
|
|
4591
|
+
range.insertNode(list);
|
|
4592
|
+
selection.removeAllRanges();
|
|
4593
|
+
const nextRange = document.createRange();
|
|
4594
|
+
nextRange.selectNodeContents(list);
|
|
4595
|
+
selection.addRange(nextRange);
|
|
4596
|
+
}
|
|
4597
|
+
function insertElement(element) {
|
|
4598
|
+
const selection = window.getSelection();
|
|
4599
|
+
if (!selection || selection.rangeCount === 0) return;
|
|
4600
|
+
const range = selection.getRangeAt(0);
|
|
4601
|
+
range.deleteContents();
|
|
4602
|
+
range.insertNode(element);
|
|
4603
|
+
const nextRange = document.createRange();
|
|
4604
|
+
nextRange.setStartAfter(element);
|
|
4605
|
+
nextRange.collapse(true);
|
|
4606
|
+
selection.removeAllRanges();
|
|
4607
|
+
selection.addRange(nextRange);
|
|
4608
|
+
}
|
|
4609
|
+
function removeFormat() {
|
|
4610
|
+
const selection = window.getSelection();
|
|
4611
|
+
if (!selection || selection.rangeCount === 0 || selection.isCollapsed) return;
|
|
4612
|
+
const range = selection.getRangeAt(0);
|
|
4613
|
+
const fragment = range.extractContents();
|
|
4614
|
+
const cleaned = document.createDocumentFragment();
|
|
4615
|
+
Array.from(fragment.childNodes).forEach((child) => {
|
|
4616
|
+
cleaned.appendChild(document.createTextNode(child.textContent ?? ""));
|
|
4617
|
+
});
|
|
4618
|
+
range.insertNode(cleaned);
|
|
4619
|
+
}
|
|
4620
|
+
function RichTextEditor({
|
|
4621
|
+
value,
|
|
4622
|
+
onChange,
|
|
4623
|
+
placeholder = "Start writing...",
|
|
4624
|
+
minHeight = "200px",
|
|
4625
|
+
id,
|
|
4626
|
+
"aria-label": ariaLabel,
|
|
4627
|
+
className,
|
|
4628
|
+
editorClassName,
|
|
4629
|
+
toolbarClassName,
|
|
4630
|
+
onRequestImageUrl
|
|
4631
|
+
}) {
|
|
4632
|
+
const editorRef = React19.useRef(null);
|
|
4633
|
+
const savedRangeRef = React19.useRef(null);
|
|
4634
|
+
const [showLinkInput, setShowLinkInput] = React19.useState(false);
|
|
4635
|
+
const [linkUrl, setLinkUrl] = React19.useState("");
|
|
4636
|
+
React19.useEffect(() => {
|
|
4637
|
+
const editor = editorRef.current;
|
|
4638
|
+
if (!editor || document.activeElement === editor || editor.innerHTML === value) return;
|
|
4639
|
+
editor.innerHTML = value;
|
|
4640
|
+
}, [value]);
|
|
4641
|
+
const emitChange = React19.useCallback(() => {
|
|
4642
|
+
if (editorRef.current) onChange(editorRef.current.innerHTML);
|
|
4643
|
+
}, [onChange]);
|
|
4644
|
+
const saveSelection = React19.useCallback(() => {
|
|
4645
|
+
const selection = window.getSelection();
|
|
4646
|
+
if (selection && selection.rangeCount > 0) {
|
|
4647
|
+
savedRangeRef.current = selection.getRangeAt(0).cloneRange();
|
|
4648
|
+
}
|
|
4649
|
+
}, []);
|
|
4650
|
+
const restoreSelection = React19.useCallback(() => {
|
|
4651
|
+
const range = savedRangeRef.current;
|
|
4652
|
+
const selection = window.getSelection();
|
|
4653
|
+
if (!range || !selection) return;
|
|
4654
|
+
selection.removeAllRanges();
|
|
4655
|
+
selection.addRange(range);
|
|
4656
|
+
savedRangeRef.current = null;
|
|
4657
|
+
}, []);
|
|
4658
|
+
const runCommand = React19.useCallback(
|
|
4659
|
+
(command, commandValue) => {
|
|
4660
|
+
editorRef.current?.focus();
|
|
4661
|
+
switch (command) {
|
|
4662
|
+
case "bold":
|
|
4663
|
+
wrapSelectionInline("strong");
|
|
4664
|
+
break;
|
|
4665
|
+
case "italic":
|
|
4666
|
+
wrapSelectionInline("em");
|
|
4667
|
+
break;
|
|
4668
|
+
case "underline":
|
|
4669
|
+
wrapSelectionInline("u");
|
|
4670
|
+
break;
|
|
4671
|
+
case "strikeThrough":
|
|
4672
|
+
wrapSelectionInline("s");
|
|
4673
|
+
break;
|
|
4674
|
+
case "formatBlock":
|
|
4675
|
+
if (commandValue) formatBlock(commandValue);
|
|
4676
|
+
break;
|
|
4677
|
+
case "insertUnorderedList":
|
|
4678
|
+
insertList(false);
|
|
4679
|
+
break;
|
|
4680
|
+
case "insertOrderedList":
|
|
4681
|
+
insertList(true);
|
|
4682
|
+
break;
|
|
4683
|
+
case "insertHorizontalRule":
|
|
4684
|
+
insertElement(document.createElement("hr"));
|
|
4685
|
+
break;
|
|
4686
|
+
case "removeFormat":
|
|
4687
|
+
removeFormat();
|
|
4688
|
+
break;
|
|
4689
|
+
}
|
|
4690
|
+
emitChange();
|
|
4691
|
+
},
|
|
4692
|
+
[emitChange]
|
|
4693
|
+
);
|
|
4694
|
+
const insertLink = React19.useCallback(() => {
|
|
4695
|
+
const url = linkUrl.trim();
|
|
4696
|
+
if (!url) return;
|
|
4697
|
+
restoreSelection();
|
|
4698
|
+
wrapSelectionInline("a", { href: url });
|
|
4699
|
+
editorRef.current?.focus();
|
|
4700
|
+
setLinkUrl("");
|
|
4701
|
+
setShowLinkInput(false);
|
|
4702
|
+
emitChange();
|
|
4703
|
+
}, [emitChange, linkUrl, restoreSelection]);
|
|
4704
|
+
const insertImage = React19.useCallback(async () => {
|
|
4705
|
+
const url = await onRequestImageUrl?.() ?? (typeof window !== "undefined" ? window.prompt("Image URL:") : null);
|
|
4706
|
+
if (!url) return;
|
|
4707
|
+
const image = document.createElement("img");
|
|
4708
|
+
image.src = url;
|
|
4709
|
+
image.alt = "";
|
|
4710
|
+
editorRef.current?.focus();
|
|
4711
|
+
insertElement(image);
|
|
4712
|
+
emitChange();
|
|
4713
|
+
}, [emitChange, onRequestImageUrl]);
|
|
4714
|
+
const toolbarGroups = [
|
|
4715
|
+
[
|
|
4716
|
+
{ icon: Bold, command: "bold", title: "Bold (Ctrl+B)" },
|
|
4717
|
+
{ icon: Italic, command: "italic", title: "Italic (Ctrl+I)" },
|
|
4718
|
+
{ icon: Underline, command: "underline", title: "Underline (Ctrl+U)" },
|
|
4719
|
+
{ icon: Strikethrough, command: "strikeThrough", title: "Strikethrough" }
|
|
4720
|
+
],
|
|
4721
|
+
[
|
|
4722
|
+
{ icon: Heading1, command: "formatBlock", title: "Heading 1", value: "h1" },
|
|
4723
|
+
{ icon: Heading2, command: "formatBlock", title: "Heading 2", value: "h2" },
|
|
4724
|
+
{ icon: Heading3, command: "formatBlock", title: "Heading 3", value: "h3" }
|
|
4725
|
+
],
|
|
4726
|
+
[
|
|
4727
|
+
{ icon: List, command: "insertUnorderedList", title: "Bullet list" },
|
|
4728
|
+
{ icon: ListOrdered, command: "insertOrderedList", title: "Numbered list" },
|
|
4729
|
+
{ icon: AlignLeft, command: "formatBlock", title: "Blockquote", value: "blockquote" },
|
|
4730
|
+
{ icon: FileText, command: "formatBlock", title: "Code block", value: "pre" }
|
|
4731
|
+
]
|
|
4732
|
+
];
|
|
4733
|
+
const renderToolbarButton = ({
|
|
4734
|
+
icon: Icon,
|
|
4735
|
+
command,
|
|
4736
|
+
title,
|
|
4737
|
+
value: commandValue
|
|
4738
|
+
}) => /* @__PURE__ */ jsx(
|
|
4739
|
+
Button,
|
|
4740
|
+
{
|
|
4741
|
+
type: "button",
|
|
4742
|
+
variant: "ghost",
|
|
4743
|
+
size: "icon",
|
|
4744
|
+
className: "size-10 text-muted-foreground hover:text-foreground",
|
|
4745
|
+
title,
|
|
4746
|
+
"aria-label": title,
|
|
4747
|
+
onMouseDown: (event) => {
|
|
4748
|
+
event.preventDefault();
|
|
4749
|
+
runCommand(command, commandValue);
|
|
4750
|
+
},
|
|
4751
|
+
children: /* @__PURE__ */ jsx(Icon, { className: "size-4", "aria-hidden": "true" })
|
|
4752
|
+
},
|
|
4753
|
+
`${command}-${title}`
|
|
4754
|
+
);
|
|
4755
|
+
return /* @__PURE__ */ jsxs(
|
|
4756
|
+
"div",
|
|
4757
|
+
{
|
|
4758
|
+
className: cn(
|
|
4759
|
+
"overflow-hidden rounded-xl border border-border bg-card shadow-natural",
|
|
4760
|
+
"focus-within:border-brand-primary/50 focus-within:ring-2 focus-within:ring-brand-primary/25",
|
|
4761
|
+
className
|
|
4762
|
+
),
|
|
4763
|
+
"data-slot": "rich-text-editor",
|
|
4764
|
+
children: [
|
|
4765
|
+
/* @__PURE__ */ jsxs(
|
|
4766
|
+
"div",
|
|
4767
|
+
{
|
|
4768
|
+
className: cn(
|
|
4769
|
+
"flex min-w-0 flex-wrap items-center gap-1 border-b border-border bg-muted/40 p-1.5",
|
|
4770
|
+
toolbarClassName
|
|
4771
|
+
),
|
|
4772
|
+
role: "toolbar",
|
|
4773
|
+
"aria-label": "Text formatting",
|
|
4774
|
+
children: [
|
|
4775
|
+
toolbarGroups.map((group, index) => /* @__PURE__ */ jsxs(React19.Fragment, { children: [
|
|
4776
|
+
index > 0 && /* @__PURE__ */ jsx(Separator2, { orientation: "vertical", className: "mx-1 h-6" }),
|
|
4777
|
+
group.map(renderToolbarButton)
|
|
4778
|
+
] }, `toolbar-group-${index}`)),
|
|
4779
|
+
/* @__PURE__ */ jsx(Separator2, { orientation: "vertical", className: "mx-1 h-6" }),
|
|
4780
|
+
/* @__PURE__ */ jsx(
|
|
4781
|
+
Button,
|
|
4782
|
+
{
|
|
4783
|
+
type: "button",
|
|
4784
|
+
variant: "ghost",
|
|
4785
|
+
size: "icon",
|
|
4786
|
+
className: "size-10 text-muted-foreground hover:text-foreground",
|
|
4787
|
+
title: "Insert link",
|
|
4788
|
+
"aria-label": "Insert link",
|
|
4789
|
+
onMouseDown: (event) => {
|
|
4790
|
+
event.preventDefault();
|
|
4791
|
+
saveSelection();
|
|
4792
|
+
setShowLinkInput((current) => !current);
|
|
4793
|
+
},
|
|
4794
|
+
children: /* @__PURE__ */ jsx(Link, { className: "size-4", "aria-hidden": "true" })
|
|
4795
|
+
}
|
|
4796
|
+
),
|
|
4797
|
+
/* @__PURE__ */ jsx(
|
|
4798
|
+
Button,
|
|
4799
|
+
{
|
|
4800
|
+
type: "button",
|
|
4801
|
+
variant: "ghost",
|
|
4802
|
+
size: "icon",
|
|
4803
|
+
className: "size-10 text-muted-foreground hover:text-foreground",
|
|
4804
|
+
title: "Insert image",
|
|
4805
|
+
"aria-label": "Insert image",
|
|
4806
|
+
onMouseDown: (event) => {
|
|
4807
|
+
event.preventDefault();
|
|
4808
|
+
void insertImage();
|
|
4809
|
+
},
|
|
4810
|
+
children: /* @__PURE__ */ jsx(Image, { className: "size-4", "aria-hidden": "true" })
|
|
4811
|
+
}
|
|
4812
|
+
),
|
|
4813
|
+
renderToolbarButton({
|
|
4814
|
+
icon: Minus,
|
|
4815
|
+
command: "insertHorizontalRule",
|
|
4816
|
+
title: "Horizontal rule"
|
|
4817
|
+
}),
|
|
4818
|
+
renderToolbarButton({
|
|
4819
|
+
icon: XCircle,
|
|
4820
|
+
command: "removeFormat",
|
|
4821
|
+
title: "Clear formatting"
|
|
4822
|
+
})
|
|
4823
|
+
]
|
|
4824
|
+
}
|
|
4825
|
+
),
|
|
4826
|
+
showLinkInput && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-2 border-b border-border bg-muted/60 p-2 sm:flex-row", children: [
|
|
4827
|
+
/* @__PURE__ */ jsx(
|
|
4828
|
+
Input,
|
|
4829
|
+
{
|
|
4830
|
+
type: "url",
|
|
4831
|
+
value: linkUrl,
|
|
4832
|
+
onChange: (event) => setLinkUrl(event.target.value),
|
|
4833
|
+
placeholder: "https://...",
|
|
4834
|
+
className: "h-10 flex-1 bg-background",
|
|
4835
|
+
onKeyDown: (event) => {
|
|
4836
|
+
if (event.key === "Enter") {
|
|
4837
|
+
event.preventDefault();
|
|
4838
|
+
insertLink();
|
|
4839
|
+
}
|
|
4840
|
+
},
|
|
4841
|
+
autoFocus: true,
|
|
4842
|
+
"aria-label": "Link URL"
|
|
4843
|
+
}
|
|
4844
|
+
),
|
|
4845
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2 sm:flex sm:shrink-0", children: [
|
|
4846
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", className: "h-10", onClick: insertLink, children: "Insert" }),
|
|
4847
|
+
/* @__PURE__ */ jsx(
|
|
4848
|
+
Button,
|
|
4849
|
+
{
|
|
4850
|
+
type: "button",
|
|
4851
|
+
variant: "outline",
|
|
4852
|
+
size: "sm",
|
|
4853
|
+
className: "h-10",
|
|
4854
|
+
onClick: () => setShowLinkInput(false),
|
|
4855
|
+
children: "Cancel"
|
|
4856
|
+
}
|
|
4857
|
+
)
|
|
4858
|
+
] })
|
|
4859
|
+
] }),
|
|
4860
|
+
/* @__PURE__ */ jsx(
|
|
4861
|
+
"div",
|
|
4862
|
+
{
|
|
4863
|
+
ref: editorRef,
|
|
4864
|
+
id,
|
|
4865
|
+
contentEditable: true,
|
|
4866
|
+
role: "textbox",
|
|
4867
|
+
"aria-multiline": "true",
|
|
4868
|
+
"aria-label": ariaLabel ?? "Content editor",
|
|
4869
|
+
className: cn(
|
|
4870
|
+
"rich-text-editor-content min-w-0 px-4 py-3 text-sm leading-6 text-foreground outline-none",
|
|
4871
|
+
"empty:before:pointer-events-none empty:before:text-muted-foreground empty:before:content-[attr(data-placeholder)]",
|
|
4872
|
+
editorClassName
|
|
4873
|
+
),
|
|
4874
|
+
style: { minHeight },
|
|
4875
|
+
dangerouslySetInnerHTML: { __html: value },
|
|
4876
|
+
onInput: emitChange,
|
|
4877
|
+
onBlur: emitChange,
|
|
4878
|
+
"data-placeholder": placeholder,
|
|
4879
|
+
suppressContentEditableWarning: true
|
|
4880
|
+
}
|
|
4881
|
+
),
|
|
4882
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
4883
|
+
.rich-text-editor-content h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 0.75rem 0 0.5rem; text-wrap: balance; }
|
|
4884
|
+
.rich-text-editor-content h2 { font-size: 1.25rem; font-weight: 650; line-height: 1.25; margin: 0.75rem 0 0.5rem; text-wrap: balance; }
|
|
4885
|
+
.rich-text-editor-content h3 { font-size: 1.1rem; font-weight: 650; line-height: 1.3; margin: 0.5rem 0 0.25rem; text-wrap: balance; }
|
|
4886
|
+
.rich-text-editor-content blockquote { border-left: 3px solid var(--border); color: var(--muted-foreground); margin: 0.75rem 0; padding-left: 1rem; text-wrap: pretty; }
|
|
4887
|
+
.rich-text-editor-content pre { background: var(--muted); border-radius: 0.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; margin: 0.75rem 0; overflow-x: auto; padding: 0.75rem; }
|
|
4888
|
+
.rich-text-editor-content a { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }
|
|
4889
|
+
.rich-text-editor-content img { border-radius: 0.5rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); height: auto; margin: 0.5rem 0; max-width: 100%; }
|
|
4890
|
+
.dark .rich-text-editor-content img { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
|
|
4891
|
+
.rich-text-editor-content hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
|
|
4892
|
+
.rich-text-editor-content ul, .rich-text-editor-content ol { margin: 0.5rem 0; padding-left: 1.5rem; }
|
|
4893
|
+
.rich-text-editor-content li { margin: 0.25rem 0; }
|
|
4894
|
+
` })
|
|
4895
|
+
]
|
|
4896
|
+
}
|
|
4897
|
+
);
|
|
4898
|
+
}
|
|
4899
|
+
RichTextEditor.displayName = "RichTextEditor";
|
|
4900
|
+
var ScrollAreaRoot = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollArea.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
|
|
4901
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
4902
|
+
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "vertical" }),
|
|
4903
|
+
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "horizontal" }),
|
|
4904
|
+
/* @__PURE__ */ jsx(ScrollArea.Corner, {})
|
|
4905
|
+
] }));
|
|
4906
|
+
ScrollAreaRoot.displayName = "ScrollArea";
|
|
4907
|
+
var ScrollAreaScrollbar = React19.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4908
|
+
ScrollArea.Scrollbar,
|
|
4909
|
+
{
|
|
4910
|
+
ref,
|
|
4911
|
+
orientation,
|
|
4912
|
+
className: cn(
|
|
4913
|
+
"flex touch-none select-none transition-colors",
|
|
4914
|
+
orientation === "vertical" && "h-full w-2 border-l border-l-transparent p-px",
|
|
4915
|
+
orientation === "horizontal" && "h-2 flex-col border-t border-t-transparent p-px",
|
|
4916
|
+
className
|
|
4917
|
+
),
|
|
4918
|
+
...props,
|
|
4919
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-muted hover:bg-muted transition-colors" })
|
|
3514
4920
|
}
|
|
3515
4921
|
));
|
|
3516
4922
|
ScrollAreaScrollbar.displayName = "ScrollAreaScrollbar";
|
|
@@ -3550,111 +4956,264 @@ function SectionHeading({
|
|
|
3550
4956
|
}
|
|
3551
4957
|
);
|
|
3552
4958
|
}
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
"focus:outline-none focus:ring-2 focus:ring-ring/20",
|
|
3564
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3565
|
-
"data-[placeholder]:text-muted-foreground",
|
|
3566
|
-
"[&>span]:line-clamp-1",
|
|
3567
|
-
className
|
|
3568
|
-
),
|
|
3569
|
-
...props,
|
|
3570
|
-
children: [
|
|
3571
|
-
children,
|
|
3572
|
-
/* @__PURE__ */ jsx(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { size: 15, className: "text-muted-foreground shrink-0" }) })
|
|
3573
|
-
]
|
|
3574
|
-
}
|
|
3575
|
-
));
|
|
3576
|
-
SelectTrigger.displayName = "SelectTrigger";
|
|
3577
|
-
var SelectContent = React17.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(
|
|
3578
|
-
Select.Content,
|
|
3579
|
-
{
|
|
3580
|
-
ref,
|
|
3581
|
-
className: cn(
|
|
3582
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
|
|
3583
|
-
"bg-card rounded-xl shadow-natural p-1",
|
|
3584
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3585
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3586
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3587
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3588
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
|
|
3589
|
-
className
|
|
3590
|
-
),
|
|
3591
|
-
position,
|
|
3592
|
-
...props,
|
|
3593
|
-
children: [
|
|
3594
|
-
/* @__PURE__ */ jsx(Select.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronUp, { size: 14, className: "text-muted-foreground" }) }),
|
|
3595
|
-
/* @__PURE__ */ jsx(
|
|
3596
|
-
Select.Viewport,
|
|
3597
|
-
{
|
|
3598
|
-
className: cn(
|
|
3599
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
3600
|
-
),
|
|
3601
|
-
children
|
|
3602
|
-
}
|
|
4959
|
+
function StackedList({ children, divided = true, bordered = true, className }) {
|
|
4960
|
+
return /* @__PURE__ */ jsx(
|
|
4961
|
+
"ul",
|
|
4962
|
+
{
|
|
4963
|
+
role: "list",
|
|
4964
|
+
className: cn(
|
|
4965
|
+
"overflow-hidden rounded-xl bg-card",
|
|
4966
|
+
bordered && "border border-border shadow-natural",
|
|
4967
|
+
divided && "divide-y divide-border",
|
|
4968
|
+
className
|
|
3603
4969
|
),
|
|
3604
|
-
|
|
3605
|
-
|
|
4970
|
+
children
|
|
4971
|
+
}
|
|
4972
|
+
);
|
|
4973
|
+
}
|
|
4974
|
+
function StackedListItem({ children, href, onClick, className }) {
|
|
4975
|
+
const inner = /* @__PURE__ */ jsx("div", { className: cn("px-4 py-3.5", className), children });
|
|
4976
|
+
if (href) {
|
|
4977
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", { href, className: "block hover:bg-muted transition-colors", children: inner }) });
|
|
3606
4978
|
}
|
|
3607
|
-
)
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
3618
|
-
className
|
|
3619
|
-
),
|
|
3620
|
-
...props,
|
|
3621
|
-
children: [
|
|
3622
|
-
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { size: 13, className: "text-foreground" }) }) }),
|
|
3623
|
-
/* @__PURE__ */ jsx(Select.ItemText, { children })
|
|
3624
|
-
]
|
|
4979
|
+
if (onClick) {
|
|
4980
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
4981
|
+
"button",
|
|
4982
|
+
{
|
|
4983
|
+
type: "button",
|
|
4984
|
+
className: "w-full text-left hover:bg-muted transition-colors",
|
|
4985
|
+
onClick,
|
|
4986
|
+
children: inner
|
|
4987
|
+
}
|
|
4988
|
+
) });
|
|
3625
4989
|
}
|
|
3626
|
-
)
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
{
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
...props
|
|
4990
|
+
return /* @__PURE__ */ jsx("li", { children: inner });
|
|
4991
|
+
}
|
|
4992
|
+
function appendSearchableValue(value, parts, depth = 0) {
|
|
4993
|
+
if (value == null || depth > 2) return;
|
|
4994
|
+
if (value instanceof Date) {
|
|
4995
|
+
parts.push(value.toISOString());
|
|
4996
|
+
return;
|
|
3634
4997
|
}
|
|
3635
|
-
))
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
SelectSeparator.displayName = "SelectSeparator";
|
|
3639
|
-
var Separator2 = React17.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3640
|
-
Separator.Root,
|
|
3641
|
-
{
|
|
3642
|
-
ref,
|
|
3643
|
-
decorative,
|
|
3644
|
-
orientation,
|
|
3645
|
-
className: cn(
|
|
3646
|
-
"shrink-0 bg-muted",
|
|
3647
|
-
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
3648
|
-
className
|
|
3649
|
-
),
|
|
3650
|
-
...props
|
|
4998
|
+
if (["string", "number", "boolean"].includes(typeof value)) {
|
|
4999
|
+
parts.push(String(value));
|
|
5000
|
+
return;
|
|
3651
5001
|
}
|
|
3652
|
-
))
|
|
3653
|
-
|
|
5002
|
+
if (Array.isArray(value)) {
|
|
5003
|
+
value.forEach((entry) => appendSearchableValue(entry, parts, depth + 1));
|
|
5004
|
+
return;
|
|
5005
|
+
}
|
|
5006
|
+
if (typeof value === "object") {
|
|
5007
|
+
Object.values(value).forEach(
|
|
5008
|
+
(entry) => appendSearchableValue(entry, parts, depth + 1)
|
|
5009
|
+
);
|
|
5010
|
+
}
|
|
5011
|
+
}
|
|
5012
|
+
function getSearchableText(item) {
|
|
5013
|
+
const parts = [];
|
|
5014
|
+
appendSearchableValue(item, parts);
|
|
5015
|
+
return parts.join(" ").toLowerCase();
|
|
5016
|
+
}
|
|
5017
|
+
function normalizeEmptyStateIcon(icon) {
|
|
5018
|
+
return icon ? /* @__PURE__ */ jsx("span", { className: "flex [&_svg]:size-5", children: icon }) : void 0;
|
|
5019
|
+
}
|
|
5020
|
+
function SearchableTable({
|
|
5021
|
+
data,
|
|
5022
|
+
columns,
|
|
5023
|
+
searchPlaceholder = "Search...",
|
|
5024
|
+
searchTerm,
|
|
5025
|
+
onSearchChange,
|
|
5026
|
+
filters = {},
|
|
5027
|
+
emptyState,
|
|
5028
|
+
actions,
|
|
5029
|
+
mobileCard,
|
|
5030
|
+
tableClassName,
|
|
5031
|
+
pagination
|
|
5032
|
+
}) {
|
|
5033
|
+
const [sort, setSort] = React19.useState(null);
|
|
5034
|
+
const rows = React19.useMemo(() => Array.isArray(data) ? data : [], [data]);
|
|
5035
|
+
const normalizedSearchTerm = searchTerm.trim().toLowerCase();
|
|
5036
|
+
const filteredRows = React19.useMemo(() => {
|
|
5037
|
+
if (!normalizedSearchTerm) return rows;
|
|
5038
|
+
return rows.filter((item) => getSearchableText(item).includes(normalizedSearchTerm));
|
|
5039
|
+
}, [normalizedSearchTerm, rows]);
|
|
5040
|
+
const sortedData = React19.useMemo(() => {
|
|
5041
|
+
if (!sort) return filteredRows;
|
|
5042
|
+
const column = columns.find((candidate) => candidate.key === sort.key);
|
|
5043
|
+
if (!column || !column.sortable && !column.sortAccessor) return filteredRows;
|
|
5044
|
+
const directionMultiplier = sort.direction === "asc" ? 1 : -1;
|
|
5045
|
+
const getSortValue = (item) => column.sortAccessor?.(item) ?? item[column.key];
|
|
5046
|
+
return [...filteredRows].sort((left, right) => {
|
|
5047
|
+
const leftValue = getSortValue(left);
|
|
5048
|
+
const rightValue = getSortValue(right);
|
|
5049
|
+
if (leftValue == null && rightValue == null) return 0;
|
|
5050
|
+
if (leftValue == null) return 1;
|
|
5051
|
+
if (rightValue == null) return -1;
|
|
5052
|
+
const leftComparable = leftValue instanceof Date ? leftValue.getTime() : leftValue;
|
|
5053
|
+
const rightComparable = rightValue instanceof Date ? rightValue.getTime() : rightValue;
|
|
5054
|
+
if (typeof leftComparable === "number" && typeof rightComparable === "number") {
|
|
5055
|
+
return (leftComparable - rightComparable) * directionMultiplier;
|
|
5056
|
+
}
|
|
5057
|
+
return String(leftComparable).localeCompare(String(rightComparable), void 0, {
|
|
5058
|
+
numeric: true,
|
|
5059
|
+
sensitivity: "base"
|
|
5060
|
+
}) * directionMultiplier;
|
|
5061
|
+
});
|
|
5062
|
+
}, [columns, filteredRows, sort]);
|
|
5063
|
+
const pageSize = pagination?.pageSize ?? 10;
|
|
5064
|
+
const currentPage = pagination?.currentPage ?? 1;
|
|
5065
|
+
const totalPages = Math.max(1, Math.ceil(sortedData.length / pageSize));
|
|
5066
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
5067
|
+
const displayData = pagination ? sortedData.slice(startIndex, startIndex + pageSize) : sortedData;
|
|
5068
|
+
const toggleSort = (column) => {
|
|
5069
|
+
if (!column.sortable && !column.sortAccessor) return;
|
|
5070
|
+
setSort(
|
|
5071
|
+
(current) => current?.key === column.key ? { key: column.key, direction: current.direction === "asc" ? "desc" : "asc" } : { key: column.key, direction: "asc" }
|
|
5072
|
+
);
|
|
5073
|
+
};
|
|
5074
|
+
const renderEmptyState = (className) => /* @__PURE__ */ jsx(
|
|
5075
|
+
EmptyState,
|
|
5076
|
+
{
|
|
5077
|
+
title: emptyState?.title ?? "No results found",
|
|
5078
|
+
description: emptyState?.description ?? "Try changing the search or filters.",
|
|
5079
|
+
...className ? { className } : {},
|
|
5080
|
+
...emptyState?.icon ? { icon: normalizeEmptyStateIcon(emptyState.icon) } : {},
|
|
5081
|
+
...emptyState?.action ? { action: emptyState.action } : {}
|
|
5082
|
+
}
|
|
5083
|
+
);
|
|
5084
|
+
const renderPagination = () => {
|
|
5085
|
+
if (!pagination || totalPages <= 1) return null;
|
|
5086
|
+
const pages = [];
|
|
5087
|
+
const showEllipsis = totalPages > 7;
|
|
5088
|
+
if (showEllipsis) {
|
|
5089
|
+
pages.push(1);
|
|
5090
|
+
if (currentPage > 4) pages.push("ellipsis-start");
|
|
5091
|
+
for (let page = Math.max(2, currentPage - 1); page <= Math.min(totalPages - 1, currentPage + 1); page++) {
|
|
5092
|
+
pages.push(page);
|
|
5093
|
+
}
|
|
5094
|
+
if (currentPage < totalPages - 3) pages.push("ellipsis-end");
|
|
5095
|
+
pages.push(totalPages);
|
|
5096
|
+
} else {
|
|
5097
|
+
for (let page = 1; page <= totalPages; page++) pages.push(page);
|
|
5098
|
+
}
|
|
5099
|
+
return /* @__PURE__ */ jsx("div", { className: "mt-6 flex justify-center", children: /* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
|
|
5100
|
+
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
5101
|
+
PaginationPrevious,
|
|
5102
|
+
{
|
|
5103
|
+
onClick: () => pagination.onPageChange(Math.max(1, currentPage - 1)),
|
|
5104
|
+
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
5105
|
+
}
|
|
5106
|
+
) }),
|
|
5107
|
+
pages.map((page, index) => /* @__PURE__ */ jsx(PaginationItem, { children: page === "ellipsis-start" || page === "ellipsis-end" ? /* @__PURE__ */ jsx(PaginationEllipsis, {}) : /* @__PURE__ */ jsx(
|
|
5108
|
+
PaginationLink,
|
|
5109
|
+
{
|
|
5110
|
+
onClick: () => pagination.onPageChange(page),
|
|
5111
|
+
isActive: currentPage === page,
|
|
5112
|
+
className: "cursor-pointer",
|
|
5113
|
+
children: page
|
|
5114
|
+
}
|
|
5115
|
+
) }, `${page}-${index}`)),
|
|
5116
|
+
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
5117
|
+
PaginationNext,
|
|
5118
|
+
{
|
|
5119
|
+
onClick: () => pagination.onPageChange(Math.min(totalPages, currentPage + 1)),
|
|
5120
|
+
className: currentPage === totalPages ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
5121
|
+
}
|
|
5122
|
+
) })
|
|
5123
|
+
] }) }) });
|
|
5124
|
+
};
|
|
5125
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5126
|
+
/* @__PURE__ */ jsx("div", { className: "md:rounded-lg md:border md:border-border md:bg-muted/30 md:p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5 md:flex-row md:flex-wrap md:items-center md:justify-start md:gap-3", children: [
|
|
5127
|
+
/* @__PURE__ */ jsx(
|
|
5128
|
+
InputGroup,
|
|
5129
|
+
{
|
|
5130
|
+
placeholder: searchPlaceholder,
|
|
5131
|
+
value: searchTerm,
|
|
5132
|
+
onChange: (event) => onSearchChange(event.target.value),
|
|
5133
|
+
leadingIcon: /* @__PURE__ */ jsx(Search, { className: "size-4" }),
|
|
5134
|
+
wrapperClassName: "w-full min-w-0 md:min-w-[280px] md:max-w-[520px] md:flex-1 md:basis-[340px]",
|
|
5135
|
+
className: "h-9 bg-background"
|
|
5136
|
+
}
|
|
5137
|
+
),
|
|
5138
|
+
/* @__PURE__ */ jsx("div", { className: "flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap md:w-auto md:justify-end", children: Object.entries(filters).map(([key, filter]) => /* @__PURE__ */ jsxs(SelectRoot, { value: filter.value, onValueChange: filter.onChange, children: [
|
|
5139
|
+
/* @__PURE__ */ jsxs(SelectTrigger, { className: "h-9 w-full bg-background sm:w-[180px]", children: [
|
|
5140
|
+
/* @__PURE__ */ jsx(Filter, { className: "mr-2 size-4" }),
|
|
5141
|
+
/* @__PURE__ */ jsx(SelectValue, { placeholder: filter.placeholder })
|
|
5142
|
+
] }),
|
|
5143
|
+
/* @__PURE__ */ jsx(SelectContent, { children: filter.options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
5144
|
+
] }, key)) })
|
|
5145
|
+
] }) }),
|
|
5146
|
+
/* @__PURE__ */ jsx(StackedList, { bordered: false, className: "rounded-none bg-transparent md:hidden", children: displayData.length === 0 ? renderEmptyState("px-0 py-9") : displayData.map((item) => {
|
|
5147
|
+
if (mobileCard) {
|
|
5148
|
+
return /* @__PURE__ */ jsx(StackedListItem, { className: "px-0 py-0", children: mobileCard(item) }, item.id);
|
|
5149
|
+
}
|
|
5150
|
+
const primaryColumn = columns.find((column) => column.label.trim()) ?? columns[0];
|
|
5151
|
+
const secondaryColumns = columns.filter((column) => column.key !== primaryColumn?.key && column.label).slice(0, 5);
|
|
5152
|
+
return /* @__PURE__ */ jsxs(StackedListItem, { className: "px-0 py-2.5", children: [
|
|
5153
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5154
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: primaryColumn && /* @__PURE__ */ jsx("div", { className: "min-w-0 text-sm font-semibold text-foreground [&_*]:min-w-0", children: primaryColumn.render ? primaryColumn.render(item) : item[primaryColumn.key] }) }),
|
|
5155
|
+
actions && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: actions(item) })
|
|
5156
|
+
] }),
|
|
5157
|
+
secondaryColumns.length > 0 && /* @__PURE__ */ jsx("dl", { className: "mt-2 divide-y divide-border/70 border-y border-border/70 text-xs", children: secondaryColumns.map((column) => /* @__PURE__ */ jsxs(
|
|
5158
|
+
"div",
|
|
5159
|
+
{
|
|
5160
|
+
className: "grid min-w-0 grid-cols-[6.25rem_minmax(0,1fr)] gap-2 py-1.5",
|
|
5161
|
+
children: [
|
|
5162
|
+
/* @__PURE__ */ jsx("dt", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: column.label }),
|
|
5163
|
+
/* @__PURE__ */ jsx("dd", { className: "min-w-0 break-words text-foreground", children: column.render ? column.render(item) : item[column.key] })
|
|
5164
|
+
]
|
|
5165
|
+
},
|
|
5166
|
+
column.key
|
|
5167
|
+
)) })
|
|
5168
|
+
] }, item.id);
|
|
5169
|
+
}) }),
|
|
5170
|
+
displayData.length === 0 ? /* @__PURE__ */ jsx("div", { className: "hidden min-h-[18rem] items-center justify-center border-t border-border/60 md:flex", children: renderEmptyState("px-6 py-12") }) : /* @__PURE__ */ jsxs(Table, { containerClassName: "hidden overflow-x-auto md:block", className: cn("min-w-full", tableClassName), children: [
|
|
5171
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { className: "relative border-b-0 bg-muted/80 transition-colors hover:bg-muted/80", children: [
|
|
5172
|
+
columns.map((column) => {
|
|
5173
|
+
const isSortable = Boolean(column.sortable || column.sortAccessor);
|
|
5174
|
+
const isSorted = sort?.key === column.key;
|
|
5175
|
+
const SortIcon = !isSorted ? ChevronsUpDown : sort.direction === "asc" ? ArrowUp : ArrowDown;
|
|
5176
|
+
return /* @__PURE__ */ jsx(
|
|
5177
|
+
TableHead,
|
|
5178
|
+
{
|
|
5179
|
+
className: cn(
|
|
5180
|
+
"cursor-default select-none whitespace-nowrap px-4 py-3 text-xs font-medium text-muted-foreground transition-colors",
|
|
5181
|
+
column.className
|
|
5182
|
+
),
|
|
5183
|
+
"aria-sort": isSortable ? isSorted ? sort.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
5184
|
+
children: isSortable ? /* @__PURE__ */ jsxs(
|
|
5185
|
+
Button,
|
|
5186
|
+
{
|
|
5187
|
+
type: "button",
|
|
5188
|
+
variant: "ghost",
|
|
5189
|
+
size: "sm",
|
|
5190
|
+
className: "-ml-2 h-auto px-2 py-1 text-xs font-medium",
|
|
5191
|
+
onClick: () => toggleSort(column),
|
|
5192
|
+
"aria-label": `Sort by ${column.label}`,
|
|
5193
|
+
children: [
|
|
5194
|
+
/* @__PURE__ */ jsx("span", { children: column.label }),
|
|
5195
|
+
/* @__PURE__ */ jsx(SortIcon, { className: "size-3.5" })
|
|
5196
|
+
]
|
|
5197
|
+
}
|
|
5198
|
+
) : column.label
|
|
5199
|
+
},
|
|
5200
|
+
column.key
|
|
5201
|
+
);
|
|
5202
|
+
}),
|
|
5203
|
+
actions && /* @__PURE__ */ jsx(TableHead, { className: "w-32 cursor-default select-none whitespace-nowrap px-4 py-3 text-xs font-medium text-muted-foreground", children: "Actions" })
|
|
5204
|
+
] }) }),
|
|
5205
|
+
/* @__PURE__ */ jsx(TableBody, { children: displayData.map((item, index) => /* @__PURE__ */ jsxs(TableRow, { className: cn(index === 0 && "border-t-0"), children: [
|
|
5206
|
+
columns.map((column) => /* @__PURE__ */ jsx(TableCell, { className: cn("py-3", column.className), children: column.render ? column.render(item) : item[column.key] }, column.key)),
|
|
5207
|
+
actions && /* @__PURE__ */ jsx(TableCell, { className: "w-32 whitespace-nowrap py-3", children: actions(item) })
|
|
5208
|
+
] }, item.id)) })
|
|
5209
|
+
] }),
|
|
5210
|
+
renderPagination()
|
|
5211
|
+
] });
|
|
5212
|
+
}
|
|
3654
5213
|
var SheetRoot = Dialog.Root;
|
|
3655
5214
|
var SheetTrigger = Dialog.Trigger;
|
|
3656
5215
|
var SheetClose = Dialog.Close;
|
|
3657
|
-
var SheetOverlay =
|
|
5216
|
+
var SheetOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3658
5217
|
Dialog.Overlay,
|
|
3659
5218
|
{
|
|
3660
5219
|
ref,
|
|
@@ -3688,7 +5247,7 @@ var sheetContentVariants = cva(
|
|
|
3688
5247
|
}
|
|
3689
5248
|
}
|
|
3690
5249
|
);
|
|
3691
|
-
var SheetContent =
|
|
5250
|
+
var SheetContent = React19.forwardRef(
|
|
3692
5251
|
({ className, children, side = "right", ...props }, ref) => /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
3693
5252
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
3694
5253
|
/* @__PURE__ */ jsxs(
|
|
@@ -3717,7 +5276,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
3717
5276
|
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-end gap-2 mt-6", className), ...props });
|
|
3718
5277
|
}
|
|
3719
5278
|
SheetFooter.displayName = "SheetFooter";
|
|
3720
|
-
var SheetTitle =
|
|
5279
|
+
var SheetTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3721
5280
|
Dialog.Title,
|
|
3722
5281
|
{
|
|
3723
5282
|
ref,
|
|
@@ -3726,7 +5285,7 @@ var SheetTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3726
5285
|
}
|
|
3727
5286
|
));
|
|
3728
5287
|
SheetTitle.displayName = "SheetTitle";
|
|
3729
|
-
var SheetDescription =
|
|
5288
|
+
var SheetDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3730
5289
|
Dialog.Description,
|
|
3731
5290
|
{
|
|
3732
5291
|
ref,
|
|
@@ -3735,37 +5294,27 @@ var SheetDescription = React17.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3735
5294
|
}
|
|
3736
5295
|
));
|
|
3737
5296
|
SheetDescription.displayName = "SheetDescription";
|
|
3738
|
-
function TooltipProvider({
|
|
3739
|
-
children,
|
|
3740
|
-
...props
|
|
3741
|
-
}) {
|
|
3742
|
-
return /* @__PURE__ */ jsx(Tooltip.Provider, { delayDuration: 300, ...props, children });
|
|
3743
|
-
}
|
|
3744
|
-
var TooltipRoot = Tooltip.Root;
|
|
3745
|
-
var TooltipTrigger = Tooltip.Trigger;
|
|
3746
|
-
var TooltipContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(
|
|
3747
|
-
Tooltip.Content,
|
|
3748
|
-
{
|
|
3749
|
-
ref,
|
|
3750
|
-
sideOffset,
|
|
3751
|
-
className: cn(
|
|
3752
|
-
"z-50 rounded-lg bg-foreground px-2.5 py-1.5 caption text-background",
|
|
3753
|
-
"animate-in fade-in-0 zoom-in-95",
|
|
3754
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3755
|
-
"data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",
|
|
3756
|
-
"data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",
|
|
3757
|
-
className
|
|
3758
|
-
),
|
|
3759
|
-
...props
|
|
3760
|
-
}
|
|
3761
|
-
) }));
|
|
3762
|
-
TooltipContent.displayName = "TooltipContent";
|
|
3763
5297
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
5298
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3764
5299
|
var SIDEBAR_WIDTH = "16rem";
|
|
5300
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
3765
5301
|
var SIDEBAR_WIDTH_ICON = "3.5rem";
|
|
3766
|
-
var
|
|
5302
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
5303
|
+
var MOBILE_BREAKPOINT = 768;
|
|
5304
|
+
function useIsMobile() {
|
|
5305
|
+
const [isMobile, setIsMobile] = React19.useState(false);
|
|
5306
|
+
React19.useEffect(() => {
|
|
5307
|
+
const mediaQuery = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
5308
|
+
const onChange = () => setIsMobile(mediaQuery.matches);
|
|
5309
|
+
onChange();
|
|
5310
|
+
mediaQuery.addEventListener("change", onChange);
|
|
5311
|
+
return () => mediaQuery.removeEventListener("change", onChange);
|
|
5312
|
+
}, []);
|
|
5313
|
+
return isMobile;
|
|
5314
|
+
}
|
|
5315
|
+
var SidebarContext = React19.createContext(null);
|
|
3767
5316
|
function useSidebar() {
|
|
3768
|
-
const ctx =
|
|
5317
|
+
const ctx = React19.useContext(SidebarContext);
|
|
3769
5318
|
if (!ctx) throw new Error("useSidebar must be used inside SidebarProvider");
|
|
3770
5319
|
return ctx;
|
|
3771
5320
|
}
|
|
@@ -3778,26 +5327,51 @@ function SidebarProvider({
|
|
|
3778
5327
|
children,
|
|
3779
5328
|
...props
|
|
3780
5329
|
}) {
|
|
3781
|
-
const
|
|
5330
|
+
const isMobile = useIsMobile();
|
|
5331
|
+
const [openMobile, setOpenMobile] = React19.useState(false);
|
|
5332
|
+
const [_open, _setOpen] = React19.useState(defaultOpen);
|
|
3782
5333
|
const open = openProp !== void 0 ? openProp : _open;
|
|
3783
|
-
const setOpen =
|
|
5334
|
+
const setOpen = React19.useCallback(
|
|
3784
5335
|
(value) => {
|
|
5336
|
+
const nextOpen = typeof value === "function" ? value(open) : value;
|
|
3785
5337
|
if (onOpenChange) {
|
|
3786
|
-
onOpenChange(
|
|
5338
|
+
onOpenChange(nextOpen);
|
|
3787
5339
|
} else {
|
|
3788
|
-
_setOpen(
|
|
5340
|
+
_setOpen(nextOpen);
|
|
3789
5341
|
}
|
|
3790
|
-
document.cookie = `${SIDEBAR_COOKIE_NAME}=${
|
|
5342
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${nextOpen}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
3791
5343
|
},
|
|
3792
|
-
[onOpenChange]
|
|
5344
|
+
[onOpenChange, open]
|
|
3793
5345
|
);
|
|
3794
|
-
const toggleSidebar =
|
|
3795
|
-
|
|
3796
|
-
|
|
5346
|
+
const toggleSidebar = React19.useCallback(() => {
|
|
5347
|
+
if (isMobile) {
|
|
5348
|
+
setOpenMobile((currentOpen) => !currentOpen);
|
|
5349
|
+
return;
|
|
5350
|
+
}
|
|
5351
|
+
setOpen((currentOpen) => !currentOpen);
|
|
5352
|
+
}, [isMobile, setOpen]);
|
|
5353
|
+
React19.useEffect(() => {
|
|
5354
|
+
function handleKeyDown(event) {
|
|
5355
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
5356
|
+
event.preventDefault();
|
|
5357
|
+
toggleSidebar();
|
|
5358
|
+
}
|
|
5359
|
+
}
|
|
5360
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
5361
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
5362
|
+
}, [toggleSidebar]);
|
|
3797
5363
|
const state = open ? "expanded" : "collapsed";
|
|
3798
|
-
const contextValue =
|
|
3799
|
-
() => ({
|
|
3800
|
-
|
|
5364
|
+
const contextValue = React19.useMemo(
|
|
5365
|
+
() => ({
|
|
5366
|
+
state,
|
|
5367
|
+
open,
|
|
5368
|
+
setOpen,
|
|
5369
|
+
openMobile,
|
|
5370
|
+
setOpenMobile,
|
|
5371
|
+
isMobile,
|
|
5372
|
+
toggleSidebar
|
|
5373
|
+
}),
|
|
5374
|
+
[state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar]
|
|
3801
5375
|
);
|
|
3802
5376
|
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
3803
5377
|
"div",
|
|
@@ -3807,6 +5381,7 @@ function SidebarProvider({
|
|
|
3807
5381
|
className: cn("group/sidebar-wrapper flex min-h-svh w-full", className),
|
|
3808
5382
|
style: {
|
|
3809
5383
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
5384
|
+
"--sidebar-width-mobile": SIDEBAR_WIDTH_MOBILE,
|
|
3810
5385
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
3811
5386
|
...style
|
|
3812
5387
|
},
|
|
@@ -3823,7 +5398,7 @@ function Sidebar({
|
|
|
3823
5398
|
children,
|
|
3824
5399
|
...props
|
|
3825
5400
|
}) {
|
|
3826
|
-
const { state } = useSidebar();
|
|
5401
|
+
const { state, isMobile, openMobile, setOpenMobile } = useSidebar();
|
|
3827
5402
|
if (collapsible === "none") {
|
|
3828
5403
|
return /* @__PURE__ */ jsx(
|
|
3829
5404
|
"aside",
|
|
@@ -3841,6 +5416,27 @@ function Sidebar({
|
|
|
3841
5416
|
}
|
|
3842
5417
|
);
|
|
3843
5418
|
}
|
|
5419
|
+
if (isMobile) {
|
|
5420
|
+
return /* @__PURE__ */ jsx(SheetRoot, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
5421
|
+
SheetContent,
|
|
5422
|
+
{
|
|
5423
|
+
"data-sidebar": "sidebar",
|
|
5424
|
+
"data-mobile": "true",
|
|
5425
|
+
side,
|
|
5426
|
+
className: cn(
|
|
5427
|
+
"w-(--sidebar-width-mobile) max-w-[85dvw] bg-card p-0 text-foreground [&>button]:hidden",
|
|
5428
|
+
className
|
|
5429
|
+
),
|
|
5430
|
+
children: [
|
|
5431
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
5432
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
5433
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
5434
|
+
] }),
|
|
5435
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
5436
|
+
]
|
|
5437
|
+
}
|
|
5438
|
+
) });
|
|
5439
|
+
}
|
|
3844
5440
|
if (collapsible === "offcanvas") {
|
|
3845
5441
|
return /* @__PURE__ */ jsx(
|
|
3846
5442
|
"aside",
|
|
@@ -3930,7 +5526,7 @@ function SidebarInset({ className, ...props }) {
|
|
|
3930
5526
|
"main",
|
|
3931
5527
|
{
|
|
3932
5528
|
"data-sidebar": "inset",
|
|
3933
|
-
className: cn("relative flex min-h-svh flex-1 flex-col
|
|
5529
|
+
className: cn("relative flex min-h-svh flex-1 flex-col overflow-hidden bg-background", className),
|
|
3934
5530
|
...props
|
|
3935
5531
|
}
|
|
3936
5532
|
);
|
|
@@ -3975,6 +5571,16 @@ function SidebarSeparator({ className, ...props }) {
|
|
|
3975
5571
|
}
|
|
3976
5572
|
);
|
|
3977
5573
|
}
|
|
5574
|
+
function SidebarInput({ className, ...props }) {
|
|
5575
|
+
return /* @__PURE__ */ jsx(
|
|
5576
|
+
Input,
|
|
5577
|
+
{
|
|
5578
|
+
"data-sidebar": "input",
|
|
5579
|
+
className: cn("h-8 w-full bg-background shadow-none", className),
|
|
5580
|
+
...props
|
|
5581
|
+
}
|
|
5582
|
+
);
|
|
5583
|
+
}
|
|
3978
5584
|
function SidebarGroup({ className, ...props }) {
|
|
3979
5585
|
return /* @__PURE__ */ jsx(
|
|
3980
5586
|
"div",
|
|
@@ -4154,7 +5760,7 @@ function SidebarMenuSkeleton({
|
|
|
4154
5760
|
showIcon = false,
|
|
4155
5761
|
...props
|
|
4156
5762
|
}) {
|
|
4157
|
-
const width =
|
|
5763
|
+
const width = React19.useMemo(() => {
|
|
4158
5764
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4159
5765
|
}, []);
|
|
4160
5766
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4237,7 +5843,7 @@ function Skeleton({ className, ...props }) {
|
|
|
4237
5843
|
}
|
|
4238
5844
|
);
|
|
4239
5845
|
}
|
|
4240
|
-
var SliderRoot =
|
|
5846
|
+
var SliderRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4241
5847
|
Slider.Root,
|
|
4242
5848
|
{
|
|
4243
5849
|
ref,
|
|
@@ -4272,94 +5878,205 @@ function Toaster({ ...props }) {
|
|
|
4272
5878
|
}
|
|
4273
5879
|
);
|
|
4274
5880
|
}
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
5881
|
+
function StatCard({
|
|
5882
|
+
label,
|
|
5883
|
+
title,
|
|
5884
|
+
value,
|
|
5885
|
+
trend,
|
|
5886
|
+
icon,
|
|
5887
|
+
children,
|
|
5888
|
+
actionButtons,
|
|
5889
|
+
className,
|
|
5890
|
+
containerClassName,
|
|
5891
|
+
titleClassName,
|
|
5892
|
+
valueClassName
|
|
5893
|
+
}) {
|
|
5894
|
+
const displayLabel = title ?? label;
|
|
5895
|
+
const trendColor = {
|
|
5896
|
+
up: "text-muted-foreground bg-brand-secondary/30 rounded-full px-2 py-0.5 w-fit",
|
|
5897
|
+
down: "text-destructive",
|
|
5898
|
+
neutral: "text-muted-foreground"
|
|
5899
|
+
};
|
|
5900
|
+
const TrendIcon = {
|
|
5901
|
+
up: TrendingUp,
|
|
5902
|
+
down: TrendingDown,
|
|
5903
|
+
neutral: Minus
|
|
5904
|
+
};
|
|
5905
|
+
return /* @__PURE__ */ jsxs(
|
|
5906
|
+
"div",
|
|
5907
|
+
{
|
|
5908
|
+
className: cn(
|
|
5909
|
+
"min-w-0 rounded-xl border border-border bg-card p-4 shadow-natural sm:p-5",
|
|
5910
|
+
containerClassName,
|
|
5911
|
+
className
|
|
5912
|
+
),
|
|
5913
|
+
"data-slot": "stat-card",
|
|
5914
|
+
children: [
|
|
5915
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5916
|
+
displayLabel && /* @__PURE__ */ jsx("p", { className: cn("label min-w-0 text-muted-foreground", titleClassName), children: displayLabel }),
|
|
5917
|
+
icon && /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", children: icon }),
|
|
5918
|
+
actionButtons && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: actionButtons })
|
|
5919
|
+
] }),
|
|
5920
|
+
value !== void 0 ? /* @__PURE__ */ jsx("p", { className: cn("heading-xl mt-2 tabular-nums text-foreground", valueClassName), children: value }) : children ? /* @__PURE__ */ jsx("div", { className: "mt-2", children }) : null,
|
|
5921
|
+
trend && (() => {
|
|
5922
|
+
const Icon = TrendIcon[trend.direction];
|
|
5923
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("mt-2 flex items-center gap-1", trendColor[trend.direction]), children: [
|
|
5924
|
+
/* @__PURE__ */ jsx(Icon, { size: 12 }),
|
|
5925
|
+
/* @__PURE__ */ jsx("span", { className: "caption tabular-nums font-medium", children: trend.value })
|
|
5926
|
+
] });
|
|
5927
|
+
})()
|
|
5928
|
+
]
|
|
4289
5929
|
}
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
5930
|
+
);
|
|
5931
|
+
}
|
|
5932
|
+
StatCard.displayName = "StatCard";
|
|
5933
|
+
function StatCardSlot({ onAddCard, className, label = "Add card" }) {
|
|
4293
5934
|
return /* @__PURE__ */ jsx(
|
|
4294
|
-
"
|
|
5935
|
+
"button",
|
|
4295
5936
|
{
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
5937
|
+
type: "button",
|
|
5938
|
+
className: cn(
|
|
5939
|
+
"flex min-h-28 w-full min-w-0 items-center justify-center rounded-xl border border-dashed border-border bg-card p-4 text-muted-foreground shadow-natural",
|
|
5940
|
+
"transition-[background-color,border-color,color,scale] duration-150 hover:border-ground-300 hover:bg-muted hover:text-foreground active:scale-[0.96]",
|
|
5941
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/30",
|
|
5942
|
+
className
|
|
5943
|
+
),
|
|
5944
|
+
onClick: onAddCard,
|
|
5945
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-center gap-1.5", children: [
|
|
5946
|
+
/* @__PURE__ */ jsx(Plus, { className: "size-4", "aria-hidden": "true" }),
|
|
5947
|
+
/* @__PURE__ */ jsx("span", { className: "caption font-medium", children: label })
|
|
5948
|
+
] })
|
|
4300
5949
|
}
|
|
4301
5950
|
);
|
|
4302
5951
|
}
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
5952
|
+
StatCardSlot.displayName = "StatCardSlot";
|
|
5953
|
+
function StatCardGrid({
|
|
5954
|
+
children,
|
|
5955
|
+
maxSlots = 6,
|
|
5956
|
+
onAddCard,
|
|
5957
|
+
className,
|
|
5958
|
+
showEmptySlots = false
|
|
5959
|
+
}) {
|
|
5960
|
+
const childrenArray = React19.Children.toArray(children);
|
|
5961
|
+
const emptySlots = showEmptySlots ? Math.max(0, maxSlots - childrenArray.length) : 0;
|
|
5962
|
+
return /* @__PURE__ */ jsxs(
|
|
5963
|
+
"div",
|
|
4306
5964
|
{
|
|
4307
|
-
role: "list",
|
|
4308
5965
|
className: cn(
|
|
4309
|
-
"
|
|
4310
|
-
bordered && "border border-border shadow-natural",
|
|
4311
|
-
divided && "divide-y divide-border",
|
|
5966
|
+
"grid min-w-0 grid-cols-2 items-stretch gap-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6",
|
|
4312
5967
|
className
|
|
4313
5968
|
),
|
|
4314
|
-
|
|
5969
|
+
"data-slot": "stat-card-grid",
|
|
5970
|
+
children: [
|
|
5971
|
+
childrenArray.map((child, index) => /* @__PURE__ */ jsx("div", { className: "min-w-0", children: child }, `filled-${index}`)),
|
|
5972
|
+
Array.from({ length: emptySlots }, (_, index) => /* @__PURE__ */ jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsx(StatCardSlot, { ...onAddCard ? { onAddCard } : {} }) }, `empty-${index}`))
|
|
5973
|
+
]
|
|
4315
5974
|
}
|
|
4316
5975
|
);
|
|
4317
5976
|
}
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
5977
|
+
StatCardGrid.displayName = "StatCardGrid";
|
|
5978
|
+
var DEFAULT_STATUS_VARIANT = {
|
|
5979
|
+
active: "success",
|
|
5980
|
+
approved: "success",
|
|
5981
|
+
complete: "success",
|
|
5982
|
+
completed: "success",
|
|
5983
|
+
confirmed: "success",
|
|
5984
|
+
delivered: "success",
|
|
5985
|
+
enabled: "success",
|
|
5986
|
+
healthy: "success",
|
|
5987
|
+
optimized: "success",
|
|
5988
|
+
paid: "success",
|
|
5989
|
+
published: "success",
|
|
5990
|
+
resolved: "success",
|
|
5991
|
+
translated: "success",
|
|
5992
|
+
verified: "success",
|
|
5993
|
+
degraded: "warning",
|
|
5994
|
+
flagged: "warning",
|
|
5995
|
+
held_for_review: "warning",
|
|
5996
|
+
pending: "warning",
|
|
5997
|
+
processing: "warning",
|
|
5998
|
+
retrying: "warning",
|
|
5999
|
+
scheduled: "warning",
|
|
6000
|
+
trial: "warning",
|
|
6001
|
+
warning: "warning",
|
|
6002
|
+
archived: "secondary",
|
|
6003
|
+
disabled: "secondary",
|
|
6004
|
+
draft: "secondary",
|
|
6005
|
+
inactive: "secondary",
|
|
6006
|
+
missing: "secondary",
|
|
6007
|
+
neutral: "secondary",
|
|
6008
|
+
skipped: "secondary",
|
|
6009
|
+
blocked: "destructive",
|
|
6010
|
+
cancelled: "destructive",
|
|
6011
|
+
critical: "destructive",
|
|
6012
|
+
dead_letter: "destructive",
|
|
6013
|
+
deleted: "destructive",
|
|
6014
|
+
error: "destructive",
|
|
6015
|
+
failed: "destructive",
|
|
6016
|
+
rejected: "destructive",
|
|
6017
|
+
suspended: "destructive",
|
|
6018
|
+
unpaid: "destructive",
|
|
6019
|
+
outdated: "destructive"
|
|
6020
|
+
};
|
|
6021
|
+
var DEFAULT_DOT_CLASS = {
|
|
6022
|
+
default: "bg-background",
|
|
6023
|
+
secondary: "bg-muted-foreground",
|
|
6024
|
+
outline: "bg-muted-foreground",
|
|
6025
|
+
brand: "bg-background",
|
|
6026
|
+
success: "bg-emerald-500",
|
|
6027
|
+
warning: "bg-amber-500",
|
|
6028
|
+
destructive: "bg-destructive"
|
|
6029
|
+
};
|
|
6030
|
+
function normalizeStatus(status) {
|
|
6031
|
+
return String(status ?? "unknown").trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
4335
6032
|
}
|
|
4336
|
-
function
|
|
4337
|
-
const
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
neutral: "text-muted-foreground"
|
|
4341
|
-
};
|
|
4342
|
-
const TrendIcon = {
|
|
4343
|
-
up: TrendingUp,
|
|
4344
|
-
down: TrendingDown,
|
|
4345
|
-
neutral: Minus
|
|
4346
|
-
};
|
|
4347
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("rounded-xl border border-border bg-card p-5", className), children: [
|
|
4348
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4349
|
-
/* @__PURE__ */ jsx("p", { className: "label text-muted-foreground", children: label }),
|
|
4350
|
-
icon && /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", children: icon })
|
|
4351
|
-
] }),
|
|
4352
|
-
/* @__PURE__ */ jsx("p", { className: "heading-xl mt-2 tabular-nums text-foreground", children: value }),
|
|
4353
|
-
trend && (() => {
|
|
4354
|
-
const Icon = TrendIcon[trend.direction];
|
|
4355
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("mt-2 flex items-center gap-1", trendColor[trend.direction]), children: [
|
|
4356
|
-
/* @__PURE__ */ jsx(Icon, { size: 12 }),
|
|
4357
|
-
/* @__PURE__ */ jsx("span", { className: "caption tabular-nums font-medium", children: trend.value })
|
|
4358
|
-
] });
|
|
4359
|
-
})()
|
|
4360
|
-
] });
|
|
6033
|
+
function statusLabel(status) {
|
|
6034
|
+
const normalized = normalizeStatus(status);
|
|
6035
|
+
if (normalized === "unknown") return "Unknown";
|
|
6036
|
+
return normalized.split("_").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
4361
6037
|
}
|
|
4362
|
-
|
|
6038
|
+
function statusBadgeVariantFor(status, variantMap) {
|
|
6039
|
+
const normalized = normalizeStatus(status);
|
|
6040
|
+
return variantMap?.[normalized] ?? DEFAULT_STATUS_VARIANT[normalized] ?? "outline";
|
|
6041
|
+
}
|
|
6042
|
+
function StatusBadge({
|
|
6043
|
+
status,
|
|
6044
|
+
label,
|
|
6045
|
+
variant,
|
|
6046
|
+
variantMap,
|
|
6047
|
+
labelMap,
|
|
6048
|
+
showDot = false,
|
|
6049
|
+
dotClassName,
|
|
6050
|
+
className,
|
|
6051
|
+
...props
|
|
6052
|
+
}) {
|
|
6053
|
+
const normalized = normalizeStatus(status);
|
|
6054
|
+
const resolvedVariant = variant ?? statusBadgeVariantFor(normalized, variantMap);
|
|
6055
|
+
const resolvedLabel = label ?? labelMap?.[normalized] ?? statusLabel(normalized);
|
|
6056
|
+
return /* @__PURE__ */ jsxs(
|
|
6057
|
+
Badge,
|
|
6058
|
+
{
|
|
6059
|
+
variant: resolvedVariant,
|
|
6060
|
+
className: cn("max-w-full whitespace-nowrap", showDot && "pl-2", className),
|
|
6061
|
+
...props,
|
|
6062
|
+
children: [
|
|
6063
|
+
showDot && /* @__PURE__ */ jsx(
|
|
6064
|
+
"span",
|
|
6065
|
+
{
|
|
6066
|
+
className: cn(
|
|
6067
|
+
"size-1.5 shrink-0 rounded-full",
|
|
6068
|
+
DEFAULT_DOT_CLASS[resolvedVariant],
|
|
6069
|
+
dotClassName
|
|
6070
|
+
),
|
|
6071
|
+
"aria-hidden": "true"
|
|
6072
|
+
}
|
|
6073
|
+
),
|
|
6074
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: resolvedLabel })
|
|
6075
|
+
]
|
|
6076
|
+
}
|
|
6077
|
+
);
|
|
6078
|
+
}
|
|
6079
|
+
StatusBadge.displayName = "StatusBadge";
|
|
4363
6080
|
function CirclesSteps({ steps, className }) {
|
|
4364
6081
|
return /* @__PURE__ */ jsx("nav", { "aria-label": "Progress", className, children: /* @__PURE__ */ jsx("ol", { role: "list", className: "flex items-center", children: steps.map((step, i) => {
|
|
4365
6082
|
const isLast = i === steps.length - 1;
|
|
@@ -4490,7 +6207,7 @@ function Steps({ steps, variant = "circles", className }) {
|
|
|
4490
6207
|
return /* @__PURE__ */ jsx(CirclesSteps, { steps, ...classNameProp });
|
|
4491
6208
|
}
|
|
4492
6209
|
Steps.displayName = "Steps";
|
|
4493
|
-
var SwitchRoot =
|
|
6210
|
+
var SwitchRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4494
6211
|
Switch.Root,
|
|
4495
6212
|
{
|
|
4496
6213
|
ref,
|
|
@@ -4515,9 +6232,9 @@ var SwitchRoot = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4515
6232
|
}
|
|
4516
6233
|
));
|
|
4517
6234
|
SwitchRoot.displayName = "Switch";
|
|
4518
|
-
var TabsRoot =
|
|
6235
|
+
var TabsRoot = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs.Root, { ref, className: cn("w-full", className), ...props }));
|
|
4519
6236
|
TabsRoot.displayName = "Tabs";
|
|
4520
|
-
var TabsList =
|
|
6237
|
+
var TabsList = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4521
6238
|
Tabs.List,
|
|
4522
6239
|
{
|
|
4523
6240
|
ref,
|
|
@@ -4526,7 +6243,7 @@ var TabsList = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4526
6243
|
}
|
|
4527
6244
|
));
|
|
4528
6245
|
TabsList.displayName = "TabsList";
|
|
4529
|
-
var TabsTrigger =
|
|
6246
|
+
var TabsTrigger = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4530
6247
|
Tabs.Trigger,
|
|
4531
6248
|
{
|
|
4532
6249
|
ref,
|
|
@@ -4543,7 +6260,7 @@ var TabsTrigger = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4543
6260
|
}
|
|
4544
6261
|
));
|
|
4545
6262
|
TabsTrigger.displayName = "TabsTrigger";
|
|
4546
|
-
var TabsContent =
|
|
6263
|
+
var TabsContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs.Content, { ref, className: cn("mt-4", className), ...props }));
|
|
4547
6264
|
TabsContent.displayName = "TabsContent";
|
|
4548
6265
|
function Textarea({ className, ...props }) {
|
|
4549
6266
|
return /* @__PURE__ */ jsx(
|
|
@@ -4562,6 +6279,73 @@ function Textarea({ className, ...props }) {
|
|
|
4562
6279
|
}
|
|
4563
6280
|
);
|
|
4564
6281
|
}
|
|
6282
|
+
function TitledCard({
|
|
6283
|
+
title,
|
|
6284
|
+
subtitle,
|
|
6285
|
+
children,
|
|
6286
|
+
actionButtons,
|
|
6287
|
+
icon: Icon,
|
|
6288
|
+
className,
|
|
6289
|
+
contentClassName,
|
|
6290
|
+
containerClassName,
|
|
6291
|
+
titleClassName
|
|
6292
|
+
}) {
|
|
6293
|
+
const hasHeader = Boolean(title || subtitle || actionButtons);
|
|
6294
|
+
const canUseCardHeading = Boolean(title) && !actionButtons && !titleClassName;
|
|
6295
|
+
return /* @__PURE__ */ jsxs(
|
|
6296
|
+
Card,
|
|
6297
|
+
{
|
|
6298
|
+
className: cn(
|
|
6299
|
+
"min-w-0 overflow-hidden border border-border bg-card shadow-natural",
|
|
6300
|
+
"max-sm:rounded-none max-sm:border-0 max-sm:bg-transparent max-sm:shadow-none",
|
|
6301
|
+
containerClassName,
|
|
6302
|
+
className
|
|
6303
|
+
),
|
|
6304
|
+
"data-slot": "titled-card",
|
|
6305
|
+
children: [
|
|
6306
|
+
canUseCardHeading ? /* @__PURE__ */ jsx(
|
|
6307
|
+
CardHeading,
|
|
6308
|
+
{
|
|
6309
|
+
title,
|
|
6310
|
+
...subtitle ? { description: subtitle } : {},
|
|
6311
|
+
className: "max-sm:border-b-0 max-sm:px-0 max-sm:pb-3",
|
|
6312
|
+
children: Icon && /* @__PURE__ */ jsx(Icon, { className: "size-5 shrink-0 text-muted-foreground" })
|
|
6313
|
+
}
|
|
6314
|
+
) : hasHeader ? /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-col gap-3 border-b border-border p-4 max-sm:border-b-0 max-sm:px-0 max-sm:pb-3 sm:flex-row sm:items-start sm:justify-between sm:p-5", children: [
|
|
6315
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6316
|
+
title && /* @__PURE__ */ jsxs(
|
|
6317
|
+
CardTitle,
|
|
6318
|
+
{
|
|
6319
|
+
className: cn(
|
|
6320
|
+
"flex min-w-0 items-center gap-2 text-base leading-tight sm:text-lg",
|
|
6321
|
+
titleClassName
|
|
6322
|
+
),
|
|
6323
|
+
children: [
|
|
6324
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6325
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: title })
|
|
6326
|
+
]
|
|
6327
|
+
}
|
|
6328
|
+
),
|
|
6329
|
+
subtitle && /* @__PURE__ */ jsx(CardDescription, { className: "mt-1 max-w-3xl text-sm leading-5", children: subtitle })
|
|
6330
|
+
] }),
|
|
6331
|
+
actionButtons && /* @__PURE__ */ jsx("div", { className: "flex w-full min-w-0 flex-wrap items-center gap-2 sm:w-auto sm:justify-end", children: actionButtons })
|
|
6332
|
+
] }) : null,
|
|
6333
|
+
children && /* @__PURE__ */ jsx(
|
|
6334
|
+
CardContent,
|
|
6335
|
+
{
|
|
6336
|
+
className: cn(
|
|
6337
|
+
hasHeader ? "p-4 sm:p-5" : "p-0 sm:p-5",
|
|
6338
|
+
"min-w-0 max-sm:px-0",
|
|
6339
|
+
contentClassName
|
|
6340
|
+
),
|
|
6341
|
+
children
|
|
6342
|
+
}
|
|
6343
|
+
)
|
|
6344
|
+
]
|
|
6345
|
+
}
|
|
6346
|
+
);
|
|
6347
|
+
}
|
|
6348
|
+
TitledCard.displayName = "TitledCard";
|
|
4565
6349
|
var toggleVariants = cva(
|
|
4566
6350
|
[
|
|
4567
6351
|
"inline-flex shrink-0 items-center justify-center gap-2",
|
|
@@ -4605,7 +6389,7 @@ var toggleVariants = cva(
|
|
|
4605
6389
|
}
|
|
4606
6390
|
}
|
|
4607
6391
|
);
|
|
4608
|
-
var ToggleRoot =
|
|
6392
|
+
var ToggleRoot = React19.forwardRef(
|
|
4609
6393
|
({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4610
6394
|
Toggle.Root,
|
|
4611
6395
|
{
|
|
@@ -4616,11 +6400,11 @@ var ToggleRoot = React17.forwardRef(
|
|
|
4616
6400
|
)
|
|
4617
6401
|
);
|
|
4618
6402
|
ToggleRoot.displayName = "Toggle";
|
|
4619
|
-
var ToggleGroupContext =
|
|
6403
|
+
var ToggleGroupContext = React19.createContext({
|
|
4620
6404
|
size: "default",
|
|
4621
6405
|
variant: "default"
|
|
4622
6406
|
});
|
|
4623
|
-
var ToggleGroupRoot =
|
|
6407
|
+
var ToggleGroupRoot = React19.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4624
6408
|
ToggleGroup.Root,
|
|
4625
6409
|
{
|
|
4626
6410
|
ref,
|
|
@@ -4630,8 +6414,8 @@ var ToggleGroupRoot = React17.forwardRef(({ className, variant, size, children,
|
|
|
4630
6414
|
}
|
|
4631
6415
|
));
|
|
4632
6416
|
ToggleGroupRoot.displayName = "ToggleGroup";
|
|
4633
|
-
var ToggleGroupItem =
|
|
4634
|
-
const context =
|
|
6417
|
+
var ToggleGroupItem = React19.forwardRef(({ className, variant, size, ...props }, ref) => {
|
|
6418
|
+
const context = React19.useContext(ToggleGroupContext);
|
|
4635
6419
|
return /* @__PURE__ */ jsx(
|
|
4636
6420
|
ToggleGroup.Item,
|
|
4637
6421
|
{
|
|
@@ -4648,7 +6432,58 @@ var ToggleGroupItem = React17.forwardRef(({ className, variant, size, ...props }
|
|
|
4648
6432
|
);
|
|
4649
6433
|
});
|
|
4650
6434
|
ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
6435
|
+
function normalizeUrlHandle(value) {
|
|
6436
|
+
return String(value || "").trim().replace(/^\/+|\/+$/g, "");
|
|
6437
|
+
}
|
|
6438
|
+
function urlResourcePath(prefix, handle) {
|
|
6439
|
+
const cleanPrefix = normalizeUrlHandle(prefix);
|
|
6440
|
+
const cleanHandle = normalizeUrlHandle(handle);
|
|
6441
|
+
if (!cleanPrefix || !cleanHandle) return "";
|
|
6442
|
+
return `/${cleanPrefix}/${cleanHandle}`;
|
|
6443
|
+
}
|
|
6444
|
+
function hasUrlHandleChanged(originalHandle, nextHandle) {
|
|
6445
|
+
const original = normalizeUrlHandle(originalHandle || "");
|
|
6446
|
+
const next = normalizeUrlHandle(nextHandle || "");
|
|
6447
|
+
return Boolean(original && next && original !== next);
|
|
6448
|
+
}
|
|
6449
|
+
function UrlRedirectPrompt({
|
|
6450
|
+
originalHandle,
|
|
6451
|
+
nextHandle,
|
|
6452
|
+
pathPrefix,
|
|
6453
|
+
checked,
|
|
6454
|
+
onCheckedChange,
|
|
6455
|
+
title = "Create URL redirect",
|
|
6456
|
+
description,
|
|
6457
|
+
switchLabel = "Create URL redirect",
|
|
6458
|
+
className
|
|
6459
|
+
}) {
|
|
6460
|
+
if (!hasUrlHandleChanged(originalHandle, nextHandle)) return null;
|
|
6461
|
+
const fromPath = urlResourcePath(pathPrefix, originalHandle || "");
|
|
6462
|
+
const toPath = urlResourcePath(pathPrefix, nextHandle || "");
|
|
6463
|
+
const calloutProps = className ? { className } : {};
|
|
6464
|
+
return /* @__PURE__ */ jsx(
|
|
6465
|
+
Callout,
|
|
6466
|
+
{
|
|
6467
|
+
tone: "warning",
|
|
6468
|
+
compact: true,
|
|
6469
|
+
icon: /* @__PURE__ */ jsx(ArrowRight, { "aria-hidden": "true" }),
|
|
6470
|
+
title,
|
|
6471
|
+
actions: /* @__PURE__ */ jsx(SwitchRoot, { checked, onCheckedChange, "aria-label": switchLabel }),
|
|
6472
|
+
...calloutProps,
|
|
6473
|
+
children: description || /* @__PURE__ */ jsxs("p", { className: "body-sm text-pretty text-muted-foreground", children: [
|
|
6474
|
+
"Preserve search rankings and old links by redirecting",
|
|
6475
|
+
" ",
|
|
6476
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-foreground", children: fromPath }),
|
|
6477
|
+
" to",
|
|
6478
|
+
" ",
|
|
6479
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-foreground", children: toPath }),
|
|
6480
|
+
"."
|
|
6481
|
+
] })
|
|
6482
|
+
}
|
|
6483
|
+
);
|
|
6484
|
+
}
|
|
6485
|
+
UrlRedirectPrompt.displayName = "UrlRedirectPrompt";
|
|
4651
6486
|
|
|
4652
|
-
export { AccordionRoot as Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenuContent, AccountMenuHeader, AccountMenuItem, AccountMenuSection, AccountMenuSeparator, ActionPanel, ActivityFeed, Alert, AlertDescription, AlertDialogRoot as AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatioRoot as AspectRatio, Avatar, AvatarFallback, AvatarImage, AvatarStack, AvatarWithStatus, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupItem, CHART_COLORS, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardMedia, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartTooltip, CheckboxRoot as Checkbox, CollapsibleRoot as Collapsible, CollapsibleContent, CollapsibleTrigger, ColorInput, ColorPicker, Combobox, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandSeparator, CommandShortcut, ContextMenuRoot as ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, DescriptionList, DialogRoot as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DrawerRoot as Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenuRoot as DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, GridList, GridListAccentCard, GridListCard, HoverCardRoot as HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputNumber, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, Label, MediaObject, MenubarRoot as Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenuRoot as NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Notification, PageHeading, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PopoverRoot as Popover, PopoverClose, PopoverContent, PopoverTrigger, ProgressRoot as Progress, PropertyRow, RadioCards, RadioGroupRoot as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollAreaRoot as ScrollArea, SectionHeading, SelectRoot as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, SheetRoot as Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SliderRoot as Slider, Spinner, StackedList, StackedListItem, StatCard, Steps, SwitchRoot as Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TabsRoot as Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToggleRoot as Toggle, ToggleGroupRoot as ToggleGroup, ToggleGroupItem, TooltipRoot as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, formatDate, navigationMenuTriggerStyle, spinnerVariants, toggleVariants, useSidebar };
|
|
6487
|
+
export { AccordionRoot as Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenuContent, AccountMenuHeader, AccountMenuItem, AccountMenuSection, AccountMenuSeparator, ActionPanel, ActivityFeed, Alert, AlertDescription, AlertDialogRoot as AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatioRoot as AspectRatio, Avatar, AvatarFallback, AvatarImage, AvatarStack, AvatarWithStatus, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupItem, CHART_COLORS, Calendar, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardMedia, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, CheckboxRoot as Checkbox, CollapsibleRoot as Collapsible, CollapsibleContent, CollapsibleTrigger, ColorInput, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandSeparator, CommandShortcut, ContextMenuRoot as ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTransferControls, DatePicker, DescriptionList, DialogRoot as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DrawerRoot as Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenuRoot as DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, FileDropzone, GridList, GridListAccentCard, GridListCard, HelpTooltip, HoverCardRoot as HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputNumber, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, Label, MediaAssetCard, MediaObject, MenubarRoot as Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenuRoot as NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Notification, PageHeading, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PopoverRoot as Popover, PopoverClose, PopoverContent, PopoverTrigger, ProgressRoot as Progress, PropertyRow, RadioCards, RadioGroupRoot as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, ScrollAreaRoot as ScrollArea, SearchableTable, SectionHeading, SelectRoot as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, SheetRoot as Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SliderRoot as Slider, Spinner, StackedList, StackedListItem, StatCard, StatCardGrid, StatCardSlot, StatusBadge, Steps, SwitchRoot as Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TabsRoot as Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TitledCard, Toaster, ToggleRoot as Toggle, ToggleGroupRoot as ToggleGroup, ToggleGroupItem, TooltipRoot as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UrlRedirectPrompt, badgeVariants, buttonVariants, cardVariants, cn, formatDate, formatFileSize, hasUrlHandleChanged, navigationMenuTriggerStyle, normalizeUrlHandle, spinnerVariants, statusBadgeVariantFor, statusLabel, toggleVariants, urlResourcePath, useSidebar };
|
|
4653
6488
|
//# sourceMappingURL=index.js.map
|
|
4654
6489
|
//# sourceMappingURL=index.js.map
|