@timbal-ai/timbal-react 0.8.2 → 1.0.0
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/CHANGELOG.md +21 -0
- package/README.md +55 -2
- package/dist/app.cjs +484 -21
- package/dist/app.d.cts +4 -3
- package/dist/app.d.ts +4 -3
- package/dist/app.esm.js +24 -4
- package/dist/{button-ClSgD6OF.d.cts → button-BoyX5pM_.d.cts} +1 -1
- package/dist/{button-ClSgD6OF.d.ts → button-BoyX5pM_.d.ts} +1 -1
- package/dist/{chart-artifact-Bl67kre7.d.ts → chart-artifact-CBo9x8Ch.d.ts} +178 -3
- package/dist/{chart-artifact-BzcvblDe.d.cts → chart-artifact-DOkwSTjQ.d.cts} +178 -3
- package/dist/chat.cjs +23 -1
- package/dist/chat.esm.js +3 -3
- package/dist/{chunk-OISVICYF.esm.js → chunk-AYHOVAMI.esm.js} +1 -1
- package/dist/{chunk-VWHHKAHN.esm.js → chunk-C6IXFM4T.esm.js} +4 -4
- package/dist/{chunk-QVAUCVQA.esm.js → chunk-FOD67Z6G.esm.js} +42 -0
- package/dist/{chunk-6YVKCVEP.esm.js → chunk-GLPOVYEA.esm.js} +447 -27
- package/dist/{chunk-CFU3YDTV.esm.js → chunk-RZ6QC6RG.esm.js} +5 -5
- package/dist/{chunk-5ZKLPWVN.esm.js → chunk-SNLXVG7H.esm.js} +1 -3
- package/dist/chunk-YEFBANNF.esm.js +3485 -0
- package/dist/index.cjs +3745 -49
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.esm.js +407 -9
- package/dist/studio.cjs +23 -1
- package/dist/studio.esm.js +5 -5
- package/dist/styles.css +194 -0
- package/dist/ui.cjs +3354 -89
- package/dist/ui.d.cts +402 -6
- package/dist/ui.d.ts +402 -6
- package/dist/ui.esm.js +384 -6
- package/package.json +3 -1
- package/dist/chunk-P4SN7M67.esm.js +0 -435
package/dist/ui.cjs
CHANGED
|
@@ -30,10 +30,90 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/ui.ts
|
|
31
31
|
var ui_exports = {};
|
|
32
32
|
__export(ui_exports, {
|
|
33
|
+
Accordion: () => Accordion,
|
|
34
|
+
AccordionContent: () => AccordionContent,
|
|
35
|
+
AccordionItem: () => AccordionItem,
|
|
36
|
+
AccordionTrigger: () => AccordionTrigger,
|
|
37
|
+
Alert: () => Alert,
|
|
38
|
+
AlertDescription: () => AlertDescription,
|
|
39
|
+
AlertDialog: () => AlertDialog,
|
|
40
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
41
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
42
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
43
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
44
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
45
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
46
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
47
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
48
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
49
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
50
|
+
AlertTitle: () => AlertTitle,
|
|
51
|
+
AspectRatio: () => AspectRatio,
|
|
33
52
|
Avatar: () => Avatar,
|
|
34
53
|
AvatarFallback: () => AvatarFallback,
|
|
35
54
|
AvatarImage: () => AvatarImage,
|
|
55
|
+
Badge: () => Badge,
|
|
56
|
+
Breadcrumb: () => Breadcrumb,
|
|
57
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
58
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
59
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
60
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
61
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
62
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
36
63
|
Button: () => Button,
|
|
64
|
+
CONTROL_SIZE: () => CONTROL_SIZE,
|
|
65
|
+
Calendar: () => Calendar,
|
|
66
|
+
CalendarDayButton: () => CalendarDayButton,
|
|
67
|
+
Card: () => Card,
|
|
68
|
+
CardContent: () => CardContent,
|
|
69
|
+
CardDescription: () => CardDescription,
|
|
70
|
+
CardFooter: () => CardFooter,
|
|
71
|
+
CardHeader: () => CardHeader,
|
|
72
|
+
CardTitle: () => CardTitle,
|
|
73
|
+
Checkbox: () => Checkbox,
|
|
74
|
+
Collapsible: () => Collapsible,
|
|
75
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
76
|
+
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
77
|
+
Combobox: () => Combobox,
|
|
78
|
+
ComboboxAnchor: () => ComboboxAnchor,
|
|
79
|
+
ComboboxCommand: () => ComboboxCommand,
|
|
80
|
+
ComboboxContent: () => ComboboxContent,
|
|
81
|
+
ComboboxEmpty: () => ComboboxEmpty,
|
|
82
|
+
ComboboxGroup: () => ComboboxGroup,
|
|
83
|
+
ComboboxInput: () => ComboboxInput,
|
|
84
|
+
ComboboxItem: () => ComboboxItem,
|
|
85
|
+
ComboboxList: () => ComboboxList,
|
|
86
|
+
ComboboxSeparator: () => ComboboxSeparator,
|
|
87
|
+
ComboboxShortcut: () => ComboboxShortcut,
|
|
88
|
+
ComboboxTrigger: () => ComboboxTrigger,
|
|
89
|
+
Command: () => Command,
|
|
90
|
+
CommandDialog: () => CommandDialog,
|
|
91
|
+
CommandEmpty: () => CommandEmpty,
|
|
92
|
+
CommandGroup: () => CommandGroup,
|
|
93
|
+
CommandInput: () => CommandInput,
|
|
94
|
+
CommandItem: () => CommandItem,
|
|
95
|
+
CommandList: () => CommandList,
|
|
96
|
+
CommandSeparator: () => CommandSeparator,
|
|
97
|
+
CommandShortcut: () => CommandShortcut,
|
|
98
|
+
ContextMenu: () => ContextMenu,
|
|
99
|
+
ContextMenuCheckboxItem: () => ContextMenuCheckboxItem,
|
|
100
|
+
ContextMenuContent: () => ContextMenuContent,
|
|
101
|
+
ContextMenuGroup: () => ContextMenuGroup,
|
|
102
|
+
ContextMenuItem: () => ContextMenuItem,
|
|
103
|
+
ContextMenuLabel: () => ContextMenuLabel,
|
|
104
|
+
ContextMenuRadioGroup: () => ContextMenuRadioGroup,
|
|
105
|
+
ContextMenuRadioItem: () => ContextMenuRadioItem,
|
|
106
|
+
ContextMenuSeparator: () => ContextMenuSeparator,
|
|
107
|
+
ContextMenuShortcut: () => ContextMenuShortcut,
|
|
108
|
+
ContextMenuSub: () => ContextMenuSub,
|
|
109
|
+
ContextMenuSubContent: () => ContextMenuSubContent,
|
|
110
|
+
ContextMenuSubTrigger: () => ContextMenuSubTrigger,
|
|
111
|
+
ContextMenuTrigger: () => ContextMenuTrigger,
|
|
112
|
+
DatePicker: () => DatePicker,
|
|
113
|
+
DatePickerButton: () => DatePickerButton,
|
|
114
|
+
DatePickerCalendar: () => DatePickerCalendar,
|
|
115
|
+
DatePickerContent: () => DatePickerContent,
|
|
116
|
+
DatePickerTrigger: () => DatePickerTrigger,
|
|
37
117
|
Dialog: () => Dialog,
|
|
38
118
|
DialogClose: () => DialogClose,
|
|
39
119
|
DialogContent: () => DialogContent,
|
|
@@ -58,12 +138,69 @@ __export(ui_exports, {
|
|
|
58
138
|
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
59
139
|
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
60
140
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
141
|
+
Form: () => Form,
|
|
142
|
+
FormControl: () => FormControl,
|
|
143
|
+
FormField: () => FormField,
|
|
144
|
+
FormItem: () => FormItem,
|
|
145
|
+
FormLabel: () => FormLabel,
|
|
146
|
+
FormMessage: () => FormMessage,
|
|
147
|
+
FormSubmit: () => FormSubmit,
|
|
148
|
+
HoverCard: () => HoverCard,
|
|
149
|
+
HoverCardContent: () => HoverCardContent,
|
|
150
|
+
HoverCardTrigger: () => HoverCardTrigger,
|
|
151
|
+
Input: () => Input,
|
|
152
|
+
InputGroup: () => InputGroup,
|
|
153
|
+
InputGroupAddon: () => InputGroupAddon,
|
|
154
|
+
InputGroupInput: () => InputGroupInput,
|
|
155
|
+
InputGroupText: () => InputGroupText,
|
|
156
|
+
InputOTP: () => InputOTP,
|
|
157
|
+
InputOTPGroup: () => InputOTPGroup,
|
|
158
|
+
InputOTPHiddenInput: () => InputOTPHiddenInput,
|
|
159
|
+
InputOTPSeparator: () => InputOTPSeparator,
|
|
160
|
+
InputOTPSlot: () => InputOTPSlot,
|
|
161
|
+
Kbd: () => Kbd,
|
|
162
|
+
KbdGroup: () => KbdGroup,
|
|
163
|
+
Label: () => Label,
|
|
61
164
|
MemoPillSegmentedTabs: () => MemoPillSegmentedTabs,
|
|
165
|
+
Menubar: () => Menubar,
|
|
166
|
+
MenubarCheckboxItem: () => MenubarCheckboxItem,
|
|
167
|
+
MenubarContent: () => MenubarContent,
|
|
168
|
+
MenubarItem: () => MenubarItem,
|
|
169
|
+
MenubarLabel: () => MenubarLabel,
|
|
170
|
+
MenubarMenu: () => MenubarMenu,
|
|
171
|
+
MenubarRadioGroup: () => MenubarRadioGroup,
|
|
172
|
+
MenubarRadioItem: () => MenubarRadioItem,
|
|
173
|
+
MenubarSeparator: () => MenubarSeparator,
|
|
174
|
+
MenubarShortcut: () => MenubarShortcut,
|
|
175
|
+
MenubarSub: () => MenubarSub,
|
|
176
|
+
MenubarSubContent: () => MenubarSubContent,
|
|
177
|
+
MenubarSubTrigger: () => MenubarSubTrigger,
|
|
178
|
+
MenubarTrigger: () => MenubarTrigger,
|
|
179
|
+
NavigationMenu: () => NavigationMenu,
|
|
180
|
+
NavigationMenuContent: () => NavigationMenuContent,
|
|
181
|
+
NavigationMenuIndicator: () => NavigationMenuIndicator,
|
|
182
|
+
NavigationMenuItem: () => NavigationMenuItem,
|
|
183
|
+
NavigationMenuLink: () => NavigationMenuLink,
|
|
184
|
+
NavigationMenuList: () => NavigationMenuList,
|
|
185
|
+
NavigationMenuTrigger: () => NavigationMenuTrigger,
|
|
186
|
+
NavigationMenuViewport: () => NavigationMenuViewport,
|
|
187
|
+
Pagination: () => Pagination,
|
|
188
|
+
PaginationContent: () => PaginationContent,
|
|
189
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
190
|
+
PaginationItem: () => PaginationItem,
|
|
191
|
+
PaginationLink: () => PaginationLink,
|
|
192
|
+
PaginationNext: () => PaginationNext,
|
|
193
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
62
194
|
PillSegmentedTabs: () => PillSegmentedTabs,
|
|
63
195
|
Popover: () => Popover,
|
|
64
196
|
PopoverAnchor: () => PopoverAnchor,
|
|
65
197
|
PopoverContent: () => PopoverContent,
|
|
66
198
|
PopoverTrigger: () => PopoverTrigger,
|
|
199
|
+
Progress: () => Progress,
|
|
200
|
+
RadioGroup: () => RadioGroup,
|
|
201
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
202
|
+
ScrollArea: () => ScrollArea,
|
|
203
|
+
ScrollBar: () => ScrollBar,
|
|
67
204
|
Select: () => Select,
|
|
68
205
|
SelectContent: () => SelectContent,
|
|
69
206
|
SelectGroup: () => SelectGroup,
|
|
@@ -74,12 +211,64 @@ __export(ui_exports, {
|
|
|
74
211
|
SelectSeparator: () => SelectSeparator,
|
|
75
212
|
SelectTrigger: () => SelectTrigger,
|
|
76
213
|
SelectValue: () => SelectValue,
|
|
214
|
+
Separator: () => Separator,
|
|
215
|
+
Sheet: () => Sheet,
|
|
216
|
+
SheetClose: () => SheetClose,
|
|
217
|
+
SheetContent: () => SheetContent,
|
|
218
|
+
SheetDescription: () => SheetDescription,
|
|
219
|
+
SheetFooter: () => SheetFooter,
|
|
220
|
+
SheetHeader: () => SheetHeader,
|
|
221
|
+
SheetTitle: () => SheetTitle,
|
|
222
|
+
SheetTrigger: () => SheetTrigger,
|
|
77
223
|
Shimmer: () => Shimmer,
|
|
224
|
+
Skeleton: () => Skeleton,
|
|
225
|
+
Slider: () => Slider,
|
|
226
|
+
Spinner: () => Spinner,
|
|
227
|
+
Switch: () => Switch,
|
|
228
|
+
Table: () => Table,
|
|
229
|
+
TableBody: () => TableBody,
|
|
230
|
+
TableCaption: () => TableCaption,
|
|
231
|
+
TableCell: () => TableCell,
|
|
232
|
+
TableFooter: () => TableFooter,
|
|
233
|
+
TableHead: () => TableHead,
|
|
234
|
+
TableHeader: () => TableHeader,
|
|
235
|
+
TableRow: () => TableRow,
|
|
236
|
+
Textarea: () => Textarea,
|
|
78
237
|
TimbalV2Button: () => TimbalV2Button,
|
|
238
|
+
Toast: () => Toast,
|
|
239
|
+
ToastAction: () => ToastAction,
|
|
240
|
+
ToastClose: () => ToastClose,
|
|
241
|
+
ToastDescription: () => ToastDescription,
|
|
242
|
+
ToastProvider: () => ToastProvider,
|
|
243
|
+
ToastTitle: () => ToastTitle,
|
|
244
|
+
ToastViewport: () => ToastViewport,
|
|
245
|
+
Toaster: () => Toaster,
|
|
246
|
+
Toggle: () => Toggle,
|
|
247
|
+
ToggleGroup: () => ToggleGroup,
|
|
248
|
+
ToggleGroupItem: () => ToggleGroupItem,
|
|
249
|
+
Toolbar: () => Toolbar,
|
|
250
|
+
ToolbarButton: () => ToolbarButton,
|
|
251
|
+
ToolbarLink: () => ToolbarLink,
|
|
252
|
+
ToolbarSeparator: () => ToolbarSeparator,
|
|
253
|
+
ToolbarToggleGroup: () => ToolbarToggleGroup,
|
|
254
|
+
ToolbarToggleItem: () => ToolbarToggleItem,
|
|
79
255
|
Tooltip: () => Tooltip,
|
|
80
256
|
TooltipContent: () => TooltipContent,
|
|
81
257
|
TooltipProvider: () => TooltipProvider,
|
|
82
|
-
TooltipTrigger: () => TooltipTrigger
|
|
258
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
259
|
+
alertVariants: () => alertVariants,
|
|
260
|
+
badgeVariants: () => badgeVariants,
|
|
261
|
+
controlClass: () => controlClass,
|
|
262
|
+
controlSurfaceClass: () => controlSurfaceClass,
|
|
263
|
+
formatPickerDate: () => formatPickerDate,
|
|
264
|
+
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
265
|
+
overlayAnimationClass: () => overlayAnimationClass,
|
|
266
|
+
overlayItemClass: () => overlayItemClass,
|
|
267
|
+
overlayListPanelClass: () => overlayListPanelClass,
|
|
268
|
+
overlaySurfaceClass: () => overlaySurfaceClass,
|
|
269
|
+
toast: () => toast,
|
|
270
|
+
toggleVariants: () => toggleVariants,
|
|
271
|
+
useToast: () => useToast
|
|
83
272
|
});
|
|
84
273
|
module.exports = __toCommonJS(ui_exports);
|
|
85
274
|
|
|
@@ -626,6 +815,41 @@ function DialogFooter({ className, ...props }) {
|
|
|
626
815
|
// src/ui/dropdown-menu.tsx
|
|
627
816
|
var import_radix_ui5 = require("radix-ui");
|
|
628
817
|
var import_lucide_react2 = require("lucide-react");
|
|
818
|
+
|
|
819
|
+
// src/design/control-surface.ts
|
|
820
|
+
var CONTROL_SIZE = {
|
|
821
|
+
sm: "h-9 px-3",
|
|
822
|
+
default: "h-10 px-3"
|
|
823
|
+
};
|
|
824
|
+
var CONTROL_SHAPE = {
|
|
825
|
+
field: "rounded-lg",
|
|
826
|
+
pill: "rounded-full"
|
|
827
|
+
};
|
|
828
|
+
var controlSurfaceClass = cn(
|
|
829
|
+
TIMBAL_V2_SECONDARY_CHROME,
|
|
830
|
+
"text-sm text-foreground outline-none",
|
|
831
|
+
"placeholder:text-muted-foreground/70",
|
|
832
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
833
|
+
"focus-within:ring-2 focus-within:ring-foreground/10",
|
|
834
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
835
|
+
"data-[placeholder]:text-muted-foreground"
|
|
836
|
+
);
|
|
837
|
+
function controlClass(options = {}, className) {
|
|
838
|
+
const { size = "default", shape = "field" } = options;
|
|
839
|
+
return cn(controlSurfaceClass, CONTROL_SIZE[size], CONTROL_SHAPE[shape], className);
|
|
840
|
+
}
|
|
841
|
+
var overlayAnimationClass = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
842
|
+
var overlaySurfaceClass = cn(
|
|
843
|
+
"z-[80] border border-border bg-popover text-popover-foreground shadow-card",
|
|
844
|
+
overlayAnimationClass
|
|
845
|
+
);
|
|
846
|
+
var overlayListPanelClass = cn(
|
|
847
|
+
overlaySurfaceClass,
|
|
848
|
+
"overflow-hidden rounded-lg p-0 outline-hidden"
|
|
849
|
+
);
|
|
850
|
+
var overlayItemClass = "relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground";
|
|
851
|
+
|
|
852
|
+
// src/ui/dropdown-menu.tsx
|
|
629
853
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
630
854
|
function DropdownMenu({
|
|
631
855
|
...props
|
|
@@ -659,7 +883,8 @@ function DropdownMenuContent({
|
|
|
659
883
|
"data-slot": "dropdown-menu-content",
|
|
660
884
|
sideOffset,
|
|
661
885
|
className: cn(
|
|
662
|
-
|
|
886
|
+
overlayListPanelClass,
|
|
887
|
+
"max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto p-1",
|
|
663
888
|
className
|
|
664
889
|
),
|
|
665
890
|
...props
|
|
@@ -679,7 +904,8 @@ function DropdownMenuItem({
|
|
|
679
904
|
"data-inset": inset,
|
|
680
905
|
"data-variant": variant,
|
|
681
906
|
className: cn(
|
|
682
|
-
|
|
907
|
+
overlayItemClass,
|
|
908
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
683
909
|
className
|
|
684
910
|
),
|
|
685
911
|
...props
|
|
@@ -696,10 +922,7 @@ function DropdownMenuCheckboxItem({
|
|
|
696
922
|
import_radix_ui5.DropdownMenu.CheckboxItem,
|
|
697
923
|
{
|
|
698
924
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
699
|
-
className: cn(
|
|
700
|
-
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
701
|
-
className
|
|
702
|
-
),
|
|
925
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
703
926
|
checked,
|
|
704
927
|
...props,
|
|
705
928
|
children: [
|
|
@@ -729,10 +952,7 @@ function DropdownMenuRadioItem({
|
|
|
729
952
|
import_radix_ui5.DropdownMenu.RadioItem,
|
|
730
953
|
{
|
|
731
954
|
"data-slot": "dropdown-menu-radio-item",
|
|
732
|
-
className: cn(
|
|
733
|
-
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
734
|
-
className
|
|
735
|
-
),
|
|
955
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
736
956
|
...props,
|
|
737
957
|
children: [
|
|
738
958
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_radix_ui5.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
@@ -805,7 +1025,8 @@ function DropdownMenuSubTrigger({
|
|
|
805
1025
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
806
1026
|
"data-inset": inset,
|
|
807
1027
|
className: cn(
|
|
808
|
-
|
|
1028
|
+
overlayItemClass,
|
|
1029
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
809
1030
|
className
|
|
810
1031
|
),
|
|
811
1032
|
...props,
|
|
@@ -825,7 +1046,8 @@ function DropdownMenuSubContent({
|
|
|
825
1046
|
{
|
|
826
1047
|
"data-slot": "dropdown-menu-sub-content",
|
|
827
1048
|
className: cn(
|
|
828
|
-
|
|
1049
|
+
overlayListPanelClass,
|
|
1050
|
+
"min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-hidden p-1",
|
|
829
1051
|
className
|
|
830
1052
|
),
|
|
831
1053
|
...props
|
|
@@ -855,16 +1077,24 @@ function PopoverContent({
|
|
|
855
1077
|
className,
|
|
856
1078
|
align = "center",
|
|
857
1079
|
sideOffset = 4,
|
|
1080
|
+
variant = "default",
|
|
858
1081
|
...props
|
|
859
1082
|
}) {
|
|
860
1083
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui6.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
861
1084
|
import_radix_ui6.Popover.Content,
|
|
862
1085
|
{
|
|
863
1086
|
"data-slot": "popover-content",
|
|
1087
|
+
"data-variant": variant,
|
|
864
1088
|
align,
|
|
865
1089
|
sideOffset,
|
|
866
1090
|
className: cn(
|
|
867
|
-
|
|
1091
|
+
variant === "list" ? cn(
|
|
1092
|
+
overlayListPanelClass,
|
|
1093
|
+
"min-w-[8rem] origin-[var(--radix-popover-content-transform-origin)]"
|
|
1094
|
+
) : cn(
|
|
1095
|
+
overlaySurfaceClass,
|
|
1096
|
+
"w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-xl p-4 outline-hidden"
|
|
1097
|
+
),
|
|
868
1098
|
className
|
|
869
1099
|
),
|
|
870
1100
|
...props
|
|
@@ -903,7 +1133,8 @@ function SelectTrigger({
|
|
|
903
1133
|
"data-slot": "select-trigger",
|
|
904
1134
|
"data-size": size,
|
|
905
1135
|
className: cn(
|
|
906
|
-
|
|
1136
|
+
controlClass({ size }),
|
|
1137
|
+
"flex w-fit items-center justify-between gap-2 whitespace-nowrap *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
907
1138
|
className
|
|
908
1139
|
),
|
|
909
1140
|
...props,
|
|
@@ -925,7 +1156,8 @@ function SelectContent({
|
|
|
925
1156
|
{
|
|
926
1157
|
"data-slot": "select-content",
|
|
927
1158
|
className: cn(
|
|
928
|
-
|
|
1159
|
+
overlayListPanelClass,
|
|
1160
|
+
"relative max-h-[var(--radix-select-content-available-height)] min-w-[8rem] origin-[var(--radix-select-content-transform-origin)] overflow-x-hidden overflow-y-auto",
|
|
929
1161
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
930
1162
|
className
|
|
931
1163
|
),
|
|
@@ -971,7 +1203,8 @@ function SelectItem({
|
|
|
971
1203
|
{
|
|
972
1204
|
"data-slot": "select-item",
|
|
973
1205
|
className: cn(
|
|
974
|
-
|
|
1206
|
+
overlayItemClass,
|
|
1207
|
+
"w-full py-1.5 pr-8 pl-2 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
975
1208
|
className
|
|
976
1209
|
),
|
|
977
1210
|
...props,
|
|
@@ -1024,85 +1257,2928 @@ function SelectScrollDownButton({
|
|
|
1024
1257
|
);
|
|
1025
1258
|
}
|
|
1026
1259
|
|
|
1027
|
-
// src/ui/
|
|
1028
|
-
var import_react = require("motion/react");
|
|
1029
|
-
var import_react2 = require("react");
|
|
1260
|
+
// src/ui/input.tsx
|
|
1030
1261
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1031
|
-
|
|
1032
|
-
children,
|
|
1033
|
-
as: Component = "p",
|
|
1262
|
+
function Input({
|
|
1034
1263
|
className,
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1264
|
+
type,
|
|
1265
|
+
controlSize,
|
|
1266
|
+
...props
|
|
1267
|
+
}) {
|
|
1268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1269
|
+
"input",
|
|
1270
|
+
{
|
|
1271
|
+
type,
|
|
1272
|
+
"data-slot": "input",
|
|
1273
|
+
className: cn(
|
|
1274
|
+
controlClass({ size: controlSize }),
|
|
1275
|
+
"w-full file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
|
|
1276
|
+
className
|
|
1277
|
+
),
|
|
1278
|
+
...props
|
|
1279
|
+
}
|
|
1040
1280
|
);
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
// src/ui/textarea.tsx
|
|
1284
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1285
|
+
function Textarea({ className, ...props }) {
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1287
|
+
"textarea",
|
|
1288
|
+
{
|
|
1289
|
+
"data-slot": "textarea",
|
|
1290
|
+
className: cn(
|
|
1291
|
+
controlSurfaceClass,
|
|
1292
|
+
"min-h-16 w-full resize-y rounded-lg px-3 py-2 leading-relaxed",
|
|
1293
|
+
className
|
|
1294
|
+
),
|
|
1295
|
+
...props
|
|
1296
|
+
}
|
|
1044
1297
|
);
|
|
1045
|
-
|
|
1046
|
-
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
// src/ui/label.tsx
|
|
1301
|
+
var import_radix_ui8 = require("radix-ui");
|
|
1302
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1303
|
+
function Label({
|
|
1304
|
+
className,
|
|
1305
|
+
...props
|
|
1306
|
+
}) {
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1308
|
+
import_radix_ui8.Label.Root,
|
|
1047
1309
|
{
|
|
1048
|
-
|
|
1310
|
+
"data-slot": "label",
|
|
1049
1311
|
className: cn(
|
|
1050
|
-
"
|
|
1051
|
-
"[
|
|
1312
|
+
"flex select-none items-center gap-2 text-sm font-medium text-foreground",
|
|
1313
|
+
"group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
1052
1314
|
className
|
|
1053
1315
|
),
|
|
1054
|
-
|
|
1055
|
-
style: {
|
|
1056
|
-
"--spread": `${dynamicSpread}px`,
|
|
1057
|
-
backgroundImage: "var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"
|
|
1058
|
-
},
|
|
1059
|
-
transition: {
|
|
1060
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
1061
|
-
duration,
|
|
1062
|
-
ease: "linear"
|
|
1063
|
-
},
|
|
1064
|
-
children
|
|
1316
|
+
...props
|
|
1065
1317
|
}
|
|
1066
1318
|
);
|
|
1067
|
-
}
|
|
1068
|
-
var Shimmer = (0, import_react2.memo)(ShimmerComponent);
|
|
1319
|
+
}
|
|
1069
1320
|
|
|
1070
|
-
// src/ui/
|
|
1071
|
-
var
|
|
1072
|
-
var
|
|
1321
|
+
// src/ui/checkbox.tsx
|
|
1322
|
+
var import_radix_ui9 = require("radix-ui");
|
|
1323
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1324
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1325
|
+
function Checkbox({
|
|
1326
|
+
className,
|
|
1327
|
+
...props
|
|
1328
|
+
}) {
|
|
1329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1330
|
+
import_radix_ui9.Checkbox.Root,
|
|
1331
|
+
{
|
|
1332
|
+
"data-slot": "checkbox",
|
|
1333
|
+
className: cn(
|
|
1334
|
+
"peer size-4 shrink-0 rounded-[4px] border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card outline-none transition-[box-shadow,background-color,border-color]",
|
|
1335
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1336
|
+
"data-[state=checked]:border-foreground/15 data-[state=checked]:from-primary-fill-from data-[state=checked]:to-primary-fill-to data-[state=checked]:text-primary-foreground",
|
|
1337
|
+
className
|
|
1338
|
+
),
|
|
1339
|
+
...props,
|
|
1340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1341
|
+
import_radix_ui9.Checkbox.Indicator,
|
|
1342
|
+
{
|
|
1343
|
+
"data-slot": "checkbox-indicator",
|
|
1344
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
1345
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.CheckIcon, { className: "size-3.5" })
|
|
1346
|
+
}
|
|
1347
|
+
)
|
|
1348
|
+
}
|
|
1349
|
+
);
|
|
1350
|
+
}
|
|
1073
1351
|
|
|
1074
|
-
// src/
|
|
1075
|
-
var
|
|
1076
|
-
var
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
)
|
|
1352
|
+
// src/ui/switch.tsx
|
|
1353
|
+
var import_radix_ui10 = require("radix-ui");
|
|
1354
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1355
|
+
function Switch({
|
|
1356
|
+
className,
|
|
1357
|
+
...props
|
|
1358
|
+
}) {
|
|
1359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1360
|
+
import_radix_ui10.Switch.Root,
|
|
1361
|
+
{
|
|
1362
|
+
"data-slot": "switch",
|
|
1363
|
+
className: cn(
|
|
1364
|
+
"peer inline-flex h-5 w-9 shrink-0 items-center rounded-full outline-none transition-[background,box-shadow,border-color] duration-200",
|
|
1365
|
+
TIMBAL_V2_SWITCH_TRACK_OFF,
|
|
1366
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1367
|
+
"data-[state=checked]:border-foreground/15 data-[state=checked]:from-primary-fill-from data-[state=checked]:to-primary-fill-to data-[state=checked]:shadow-card",
|
|
1368
|
+
className
|
|
1369
|
+
),
|
|
1370
|
+
...props,
|
|
1371
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1372
|
+
import_radix_ui10.Switch.Thumb,
|
|
1373
|
+
{
|
|
1374
|
+
"data-slot": "switch-thumb",
|
|
1375
|
+
className: cn(
|
|
1376
|
+
TIMBAL_V2_SWITCH_THUMB,
|
|
1377
|
+
"pointer-events-none block size-4 translate-x-0.5 rounded-full transition-transform data-[state=checked]:translate-x-4"
|
|
1378
|
+
)
|
|
1379
|
+
}
|
|
1380
|
+
)
|
|
1381
|
+
}
|
|
1382
|
+
);
|
|
1383
|
+
}
|
|
1103
1384
|
|
|
1104
|
-
// src/ui/
|
|
1105
|
-
var
|
|
1385
|
+
// src/ui/radio-group.tsx
|
|
1386
|
+
var import_radix_ui11 = require("radix-ui");
|
|
1387
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1388
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1389
|
+
function RadioGroup({
|
|
1390
|
+
className,
|
|
1391
|
+
...props
|
|
1392
|
+
}) {
|
|
1393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1394
|
+
import_radix_ui11.RadioGroup.Root,
|
|
1395
|
+
{
|
|
1396
|
+
"data-slot": "radio-group",
|
|
1397
|
+
className: cn("grid gap-2.5", className),
|
|
1398
|
+
...props
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
function RadioGroupItem({
|
|
1403
|
+
className,
|
|
1404
|
+
...props
|
|
1405
|
+
}) {
|
|
1406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1407
|
+
import_radix_ui11.RadioGroup.Item,
|
|
1408
|
+
{
|
|
1409
|
+
"data-slot": "radio-group-item",
|
|
1410
|
+
className: cn(
|
|
1411
|
+
"aspect-square size-4 shrink-0 rounded-full border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card outline-none transition-[box-shadow,border-color]",
|
|
1412
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1413
|
+
"data-[state=checked]:border-foreground/30",
|
|
1414
|
+
className
|
|
1415
|
+
),
|
|
1416
|
+
...props,
|
|
1417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1418
|
+
import_radix_ui11.RadioGroup.Indicator,
|
|
1419
|
+
{
|
|
1420
|
+
"data-slot": "radio-group-indicator",
|
|
1421
|
+
className: "flex items-center justify-center",
|
|
1422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.CircleIcon, { className: "size-2 fill-foreground text-foreground" })
|
|
1423
|
+
}
|
|
1424
|
+
)
|
|
1425
|
+
}
|
|
1426
|
+
);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
// src/ui/form.tsx
|
|
1430
|
+
var import_radix_ui12 = require("radix-ui");
|
|
1431
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1432
|
+
function Form({ ...props }) {
|
|
1433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui12.Form.Root, { "data-slot": "form", ...props });
|
|
1434
|
+
}
|
|
1435
|
+
function FormField({
|
|
1436
|
+
...props
|
|
1437
|
+
}) {
|
|
1438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui12.Form.Field, { "data-slot": "form-field", ...props });
|
|
1439
|
+
}
|
|
1440
|
+
function FormItem({ className, ...props }) {
|
|
1441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1442
|
+
"div",
|
|
1443
|
+
{
|
|
1444
|
+
"data-slot": "form-item",
|
|
1445
|
+
className: cn("grid gap-1.5", className),
|
|
1446
|
+
...props
|
|
1447
|
+
}
|
|
1448
|
+
);
|
|
1449
|
+
}
|
|
1450
|
+
function FormLabel({
|
|
1451
|
+
className,
|
|
1452
|
+
...props
|
|
1453
|
+
}) {
|
|
1454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui12.Form.Label, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Label, { "data-slot": "form-label", className, ...props }) });
|
|
1455
|
+
}
|
|
1456
|
+
function FormControl({
|
|
1457
|
+
...props
|
|
1458
|
+
}) {
|
|
1459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui12.Form.Control, { "data-slot": "form-control", ...props });
|
|
1460
|
+
}
|
|
1461
|
+
function FormMessage({
|
|
1462
|
+
className,
|
|
1463
|
+
...props
|
|
1464
|
+
}) {
|
|
1465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1466
|
+
import_radix_ui12.Form.Message,
|
|
1467
|
+
{
|
|
1468
|
+
"data-slot": "form-message",
|
|
1469
|
+
className: cn("text-xs text-destructive", className),
|
|
1470
|
+
...props
|
|
1471
|
+
}
|
|
1472
|
+
);
|
|
1473
|
+
}
|
|
1474
|
+
function FormSubmit({
|
|
1475
|
+
className,
|
|
1476
|
+
...props
|
|
1477
|
+
}) {
|
|
1478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1479
|
+
import_radix_ui12.Form.Submit,
|
|
1480
|
+
{
|
|
1481
|
+
"data-slot": "form-submit",
|
|
1482
|
+
className,
|
|
1483
|
+
...props
|
|
1484
|
+
}
|
|
1485
|
+
);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// src/ui/aspect-ratio.tsx
|
|
1489
|
+
var import_radix_ui13 = require("radix-ui");
|
|
1490
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1491
|
+
function AspectRatio({
|
|
1492
|
+
...props
|
|
1493
|
+
}) {
|
|
1494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_radix_ui13.AspectRatio.Root, { "data-slot": "aspect-ratio", ...props });
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
// src/ui/breadcrumb.tsx
|
|
1498
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1499
|
+
var import_radix_ui14 = require("radix-ui");
|
|
1500
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1501
|
+
function Breadcrumb({ ...props }) {
|
|
1502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { "data-slot": "breadcrumb", "aria-label": "Breadcrumb", ...props });
|
|
1503
|
+
}
|
|
1504
|
+
function BreadcrumbList({ className, ...props }) {
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1506
|
+
"ol",
|
|
1507
|
+
{
|
|
1508
|
+
"data-slot": "breadcrumb-list",
|
|
1509
|
+
className: cn(
|
|
1510
|
+
"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground",
|
|
1511
|
+
className
|
|
1512
|
+
),
|
|
1513
|
+
...props
|
|
1514
|
+
}
|
|
1515
|
+
);
|
|
1516
|
+
}
|
|
1517
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1519
|
+
"li",
|
|
1520
|
+
{
|
|
1521
|
+
"data-slot": "breadcrumb-item",
|
|
1522
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
1523
|
+
...props
|
|
1524
|
+
}
|
|
1525
|
+
);
|
|
1526
|
+
}
|
|
1527
|
+
function BreadcrumbLink({
|
|
1528
|
+
className,
|
|
1529
|
+
asChild,
|
|
1530
|
+
...props
|
|
1531
|
+
}) {
|
|
1532
|
+
const Comp = asChild ? import_radix_ui14.Slot.Root : "a";
|
|
1533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1534
|
+
Comp,
|
|
1535
|
+
{
|
|
1536
|
+
"data-slot": "breadcrumb-link",
|
|
1537
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
1538
|
+
...props
|
|
1539
|
+
}
|
|
1540
|
+
);
|
|
1541
|
+
}
|
|
1542
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
1543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1544
|
+
"span",
|
|
1545
|
+
{
|
|
1546
|
+
"data-slot": "breadcrumb-page",
|
|
1547
|
+
role: "link",
|
|
1548
|
+
"aria-disabled": "true",
|
|
1549
|
+
"aria-current": "page",
|
|
1550
|
+
className: cn("font-normal text-foreground", className),
|
|
1551
|
+
...props
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
function BreadcrumbSeparator({
|
|
1556
|
+
children,
|
|
1557
|
+
className,
|
|
1558
|
+
...props
|
|
1559
|
+
}) {
|
|
1560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1561
|
+
"li",
|
|
1562
|
+
{
|
|
1563
|
+
"data-slot": "breadcrumb-separator",
|
|
1564
|
+
role: "presentation",
|
|
1565
|
+
"aria-hidden": "true",
|
|
1566
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
1567
|
+
...props,
|
|
1568
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.ChevronRightIcon, {})
|
|
1569
|
+
}
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
function BreadcrumbEllipsis({
|
|
1573
|
+
className,
|
|
1574
|
+
...props
|
|
1575
|
+
}) {
|
|
1576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1577
|
+
"span",
|
|
1578
|
+
{
|
|
1579
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
1580
|
+
role: "presentation",
|
|
1581
|
+
"aria-hidden": "true",
|
|
1582
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
1583
|
+
...props,
|
|
1584
|
+
children: [
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.MoreHorizontalIcon, { className: "size-4" }),
|
|
1586
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: "More" })
|
|
1587
|
+
]
|
|
1588
|
+
}
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
// src/ui/pagination.tsx
|
|
1593
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1594
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1595
|
+
function Pagination({ className, ...props }) {
|
|
1596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1597
|
+
"nav",
|
|
1598
|
+
{
|
|
1599
|
+
"data-slot": "pagination",
|
|
1600
|
+
role: "navigation",
|
|
1601
|
+
"aria-label": "pagination",
|
|
1602
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
1603
|
+
...props
|
|
1604
|
+
}
|
|
1605
|
+
);
|
|
1606
|
+
}
|
|
1607
|
+
function PaginationContent({ className, ...props }) {
|
|
1608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1609
|
+
"ul",
|
|
1610
|
+
{
|
|
1611
|
+
"data-slot": "pagination-content",
|
|
1612
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
1613
|
+
...props
|
|
1614
|
+
}
|
|
1615
|
+
);
|
|
1616
|
+
}
|
|
1617
|
+
function PaginationItem({ ...props }) {
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
1619
|
+
}
|
|
1620
|
+
function PaginationLink({
|
|
1621
|
+
className,
|
|
1622
|
+
isActive,
|
|
1623
|
+
size = "icon",
|
|
1624
|
+
...props
|
|
1625
|
+
}) {
|
|
1626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { asChild: true, variant: isActive ? "outline" : "ghost", size, className, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1627
|
+
"a",
|
|
1628
|
+
{
|
|
1629
|
+
"data-slot": "pagination-link",
|
|
1630
|
+
"aria-current": isActive ? "page" : void 0,
|
|
1631
|
+
...props
|
|
1632
|
+
}
|
|
1633
|
+
) });
|
|
1634
|
+
}
|
|
1635
|
+
function PaginationPrevious({
|
|
1636
|
+
className,
|
|
1637
|
+
...props
|
|
1638
|
+
}) {
|
|
1639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1640
|
+
PaginationLink,
|
|
1641
|
+
{
|
|
1642
|
+
"aria-label": "Go to previous page",
|
|
1643
|
+
size: "default",
|
|
1644
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
1645
|
+
...props,
|
|
1646
|
+
children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.ChevronLeftIcon, { className: "size-4" }),
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
1649
|
+
]
|
|
1650
|
+
}
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
function PaginationNext({
|
|
1654
|
+
className,
|
|
1655
|
+
...props
|
|
1656
|
+
}) {
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1658
|
+
PaginationLink,
|
|
1659
|
+
{
|
|
1660
|
+
"aria-label": "Go to next page",
|
|
1661
|
+
size: "default",
|
|
1662
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
1663
|
+
...props,
|
|
1664
|
+
children: [
|
|
1665
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
1666
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.ChevronRightIcon, { className: "size-4" })
|
|
1667
|
+
]
|
|
1668
|
+
}
|
|
1669
|
+
);
|
|
1670
|
+
}
|
|
1671
|
+
function PaginationEllipsis({
|
|
1672
|
+
className,
|
|
1673
|
+
...props
|
|
1674
|
+
}) {
|
|
1675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1676
|
+
"span",
|
|
1677
|
+
{
|
|
1678
|
+
"data-slot": "pagination-ellipsis",
|
|
1679
|
+
"aria-hidden": true,
|
|
1680
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
1681
|
+
...props,
|
|
1682
|
+
children: [
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.MoreHorizontalIcon, { className: "size-4" }),
|
|
1684
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
1685
|
+
]
|
|
1686
|
+
}
|
|
1687
|
+
);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// src/ui/toolbar.tsx
|
|
1691
|
+
var import_radix_ui15 = require("radix-ui");
|
|
1692
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1693
|
+
function Toolbar({
|
|
1694
|
+
className,
|
|
1695
|
+
...props
|
|
1696
|
+
}) {
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1698
|
+
import_radix_ui15.Toolbar.Root,
|
|
1699
|
+
{
|
|
1700
|
+
"data-slot": "toolbar",
|
|
1701
|
+
className: cn(
|
|
1702
|
+
"flex items-center gap-1 rounded-lg border border-border bg-gradient-to-b from-elevated-from to-elevated-to p-1 shadow-card",
|
|
1703
|
+
className
|
|
1704
|
+
),
|
|
1705
|
+
...props
|
|
1706
|
+
}
|
|
1707
|
+
);
|
|
1708
|
+
}
|
|
1709
|
+
function ToolbarButton({
|
|
1710
|
+
className,
|
|
1711
|
+
...props
|
|
1712
|
+
}) {
|
|
1713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1714
|
+
import_radix_ui15.Toolbar.Button,
|
|
1715
|
+
{
|
|
1716
|
+
"data-slot": "toolbar-button",
|
|
1717
|
+
className: cn(
|
|
1718
|
+
"inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm font-medium text-foreground outline-none transition-colors",
|
|
1719
|
+
"hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
|
|
1720
|
+
className
|
|
1721
|
+
),
|
|
1722
|
+
...props
|
|
1723
|
+
}
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
function ToolbarSeparator({
|
|
1727
|
+
className,
|
|
1728
|
+
...props
|
|
1729
|
+
}) {
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1731
|
+
import_radix_ui15.Toolbar.Separator,
|
|
1732
|
+
{
|
|
1733
|
+
"data-slot": "toolbar-separator",
|
|
1734
|
+
className: cn("mx-1 h-6 w-px bg-border", className),
|
|
1735
|
+
...props
|
|
1736
|
+
}
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
function ToolbarToggleGroup({
|
|
1740
|
+
className,
|
|
1741
|
+
...props
|
|
1742
|
+
}) {
|
|
1743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1744
|
+
import_radix_ui15.Toolbar.ToggleGroup,
|
|
1745
|
+
{
|
|
1746
|
+
"data-slot": "toolbar-toggle-group",
|
|
1747
|
+
className: cn("flex items-center gap-0.5", className),
|
|
1748
|
+
...props
|
|
1749
|
+
}
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
function ToolbarToggleItem({
|
|
1753
|
+
className,
|
|
1754
|
+
...props
|
|
1755
|
+
}) {
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1757
|
+
import_radix_ui15.Toolbar.ToggleItem,
|
|
1758
|
+
{
|
|
1759
|
+
"data-slot": "toolbar-toggle-item",
|
|
1760
|
+
className: cn(
|
|
1761
|
+
"inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm outline-none transition-colors",
|
|
1762
|
+
"hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
1763
|
+
"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1764
|
+
className
|
|
1765
|
+
),
|
|
1766
|
+
...props
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
function ToolbarLink({
|
|
1771
|
+
className,
|
|
1772
|
+
...props
|
|
1773
|
+
}) {
|
|
1774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1775
|
+
import_radix_ui15.Toolbar.Link,
|
|
1776
|
+
{
|
|
1777
|
+
"data-slot": "toolbar-link",
|
|
1778
|
+
className: cn(
|
|
1779
|
+
"inline-flex h-8 items-center rounded-md px-2 text-sm text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
1780
|
+
className
|
|
1781
|
+
),
|
|
1782
|
+
...props
|
|
1783
|
+
}
|
|
1784
|
+
);
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
// src/ui/menubar.tsx
|
|
1788
|
+
var import_radix_ui16 = require("radix-ui");
|
|
1789
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1790
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1791
|
+
function Menubar({
|
|
1792
|
+
className,
|
|
1793
|
+
...props
|
|
1794
|
+
}) {
|
|
1795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1796
|
+
import_radix_ui16.Menubar.Root,
|
|
1797
|
+
{
|
|
1798
|
+
"data-slot": "menubar",
|
|
1799
|
+
className: cn(
|
|
1800
|
+
"flex h-9 items-center gap-1 rounded-lg border border-border bg-gradient-to-b from-elevated-from to-elevated-to p-1 shadow-card",
|
|
1801
|
+
className
|
|
1802
|
+
),
|
|
1803
|
+
...props
|
|
1804
|
+
}
|
|
1805
|
+
);
|
|
1806
|
+
}
|
|
1807
|
+
function MenubarMenu({
|
|
1808
|
+
...props
|
|
1809
|
+
}) {
|
|
1810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui16.Menubar.Menu, { "data-slot": "menubar-menu", ...props });
|
|
1811
|
+
}
|
|
1812
|
+
function MenubarTrigger({
|
|
1813
|
+
className,
|
|
1814
|
+
...props
|
|
1815
|
+
}) {
|
|
1816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1817
|
+
import_radix_ui16.Menubar.Trigger,
|
|
1818
|
+
{
|
|
1819
|
+
"data-slot": "menubar-trigger",
|
|
1820
|
+
className: cn(
|
|
1821
|
+
"flex cursor-default items-center rounded-md px-2 py-1 text-sm font-medium outline-none select-none",
|
|
1822
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1823
|
+
className
|
|
1824
|
+
),
|
|
1825
|
+
...props
|
|
1826
|
+
}
|
|
1827
|
+
);
|
|
1828
|
+
}
|
|
1829
|
+
function MenubarContent({
|
|
1830
|
+
className,
|
|
1831
|
+
align = "start",
|
|
1832
|
+
alignOffset = -4,
|
|
1833
|
+
sideOffset = 8,
|
|
1834
|
+
...props
|
|
1835
|
+
}) {
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui16.Menubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1837
|
+
import_radix_ui16.Menubar.Content,
|
|
1838
|
+
{
|
|
1839
|
+
"data-slot": "menubar-content",
|
|
1840
|
+
align,
|
|
1841
|
+
alignOffset,
|
|
1842
|
+
sideOffset,
|
|
1843
|
+
className: cn(
|
|
1844
|
+
overlaySurfaceClass,
|
|
1845
|
+
"min-w-[12rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
1846
|
+
className
|
|
1847
|
+
),
|
|
1848
|
+
...props
|
|
1849
|
+
}
|
|
1850
|
+
) });
|
|
1851
|
+
}
|
|
1852
|
+
function MenubarItem({
|
|
1853
|
+
className,
|
|
1854
|
+
inset,
|
|
1855
|
+
variant = "default",
|
|
1856
|
+
...props
|
|
1857
|
+
}) {
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1859
|
+
import_radix_ui16.Menubar.Item,
|
|
1860
|
+
{
|
|
1861
|
+
"data-slot": "menubar-item",
|
|
1862
|
+
"data-inset": inset,
|
|
1863
|
+
"data-variant": variant,
|
|
1864
|
+
className: cn(
|
|
1865
|
+
overlayItemClass,
|
|
1866
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
1867
|
+
className
|
|
1868
|
+
),
|
|
1869
|
+
...props
|
|
1870
|
+
}
|
|
1871
|
+
);
|
|
1872
|
+
}
|
|
1873
|
+
function MenubarCheckboxItem({
|
|
1874
|
+
className,
|
|
1875
|
+
children,
|
|
1876
|
+
checked,
|
|
1877
|
+
...props
|
|
1878
|
+
}) {
|
|
1879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1880
|
+
import_radix_ui16.Menubar.CheckboxItem,
|
|
1881
|
+
{
|
|
1882
|
+
"data-slot": "menubar-checkbox-item",
|
|
1883
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
1884
|
+
checked,
|
|
1885
|
+
...props,
|
|
1886
|
+
children: [
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui16.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CheckIcon, { className: "size-4" }) }) }),
|
|
1888
|
+
children
|
|
1889
|
+
]
|
|
1890
|
+
}
|
|
1891
|
+
);
|
|
1892
|
+
}
|
|
1893
|
+
function MenubarRadioGroup({
|
|
1894
|
+
...props
|
|
1895
|
+
}) {
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui16.Menubar.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
1897
|
+
}
|
|
1898
|
+
function MenubarRadioItem({
|
|
1899
|
+
className,
|
|
1900
|
+
children,
|
|
1901
|
+
...props
|
|
1902
|
+
}) {
|
|
1903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1904
|
+
import_radix_ui16.Menubar.RadioItem,
|
|
1905
|
+
{
|
|
1906
|
+
"data-slot": "menubar-radio-item",
|
|
1907
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
1908
|
+
...props,
|
|
1909
|
+
children: [
|
|
1910
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui16.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
1911
|
+
children
|
|
1912
|
+
]
|
|
1913
|
+
}
|
|
1914
|
+
);
|
|
1915
|
+
}
|
|
1916
|
+
function MenubarLabel({
|
|
1917
|
+
className,
|
|
1918
|
+
inset,
|
|
1919
|
+
...props
|
|
1920
|
+
}) {
|
|
1921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1922
|
+
import_radix_ui16.Menubar.Label,
|
|
1923
|
+
{
|
|
1924
|
+
"data-slot": "menubar-label",
|
|
1925
|
+
"data-inset": inset,
|
|
1926
|
+
className: cn(
|
|
1927
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
1928
|
+
className
|
|
1929
|
+
),
|
|
1930
|
+
...props
|
|
1931
|
+
}
|
|
1932
|
+
);
|
|
1933
|
+
}
|
|
1934
|
+
function MenubarSeparator({
|
|
1935
|
+
className,
|
|
1936
|
+
...props
|
|
1937
|
+
}) {
|
|
1938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1939
|
+
import_radix_ui16.Menubar.Separator,
|
|
1940
|
+
{
|
|
1941
|
+
"data-slot": "menubar-separator",
|
|
1942
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1943
|
+
...props
|
|
1944
|
+
}
|
|
1945
|
+
);
|
|
1946
|
+
}
|
|
1947
|
+
function MenubarShortcut({
|
|
1948
|
+
className,
|
|
1949
|
+
...props
|
|
1950
|
+
}) {
|
|
1951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1952
|
+
"span",
|
|
1953
|
+
{
|
|
1954
|
+
"data-slot": "menubar-shortcut",
|
|
1955
|
+
className: cn(
|
|
1956
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1957
|
+
className
|
|
1958
|
+
),
|
|
1959
|
+
...props
|
|
1960
|
+
}
|
|
1961
|
+
);
|
|
1962
|
+
}
|
|
1963
|
+
function MenubarSub({
|
|
1964
|
+
...props
|
|
1965
|
+
}) {
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui16.Menubar.Sub, { "data-slot": "menubar-sub", ...props });
|
|
1967
|
+
}
|
|
1968
|
+
function MenubarSubTrigger({
|
|
1969
|
+
className,
|
|
1970
|
+
inset,
|
|
1971
|
+
children,
|
|
1972
|
+
...props
|
|
1973
|
+
}) {
|
|
1974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1975
|
+
import_radix_ui16.Menubar.SubTrigger,
|
|
1976
|
+
{
|
|
1977
|
+
"data-slot": "menubar-sub-trigger",
|
|
1978
|
+
"data-inset": inset,
|
|
1979
|
+
className: cn(
|
|
1980
|
+
overlayItemClass,
|
|
1981
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
1982
|
+
className
|
|
1983
|
+
),
|
|
1984
|
+
...props,
|
|
1985
|
+
children: [
|
|
1986
|
+
children,
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
1988
|
+
]
|
|
1989
|
+
}
|
|
1990
|
+
);
|
|
1991
|
+
}
|
|
1992
|
+
function MenubarSubContent({
|
|
1993
|
+
className,
|
|
1994
|
+
...props
|
|
1995
|
+
}) {
|
|
1996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1997
|
+
import_radix_ui16.Menubar.SubContent,
|
|
1998
|
+
{
|
|
1999
|
+
"data-slot": "menubar-sub-content",
|
|
2000
|
+
className: cn(
|
|
2001
|
+
overlaySurfaceClass,
|
|
2002
|
+
"min-w-[8rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
2003
|
+
className
|
|
2004
|
+
),
|
|
2005
|
+
...props
|
|
2006
|
+
}
|
|
2007
|
+
);
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
// src/ui/navigation-menu.tsx
|
|
2011
|
+
var import_radix_ui17 = require("radix-ui");
|
|
2012
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2013
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
2014
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2015
|
+
function NavigationMenu({
|
|
2016
|
+
className,
|
|
2017
|
+
children,
|
|
2018
|
+
viewport = true,
|
|
2019
|
+
...props
|
|
2020
|
+
}) {
|
|
2021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2022
|
+
import_radix_ui17.NavigationMenu.Root,
|
|
2023
|
+
{
|
|
2024
|
+
"data-slot": "navigation-menu",
|
|
2025
|
+
"data-viewport": viewport,
|
|
2026
|
+
className: cn(
|
|
2027
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
2028
|
+
className
|
|
2029
|
+
),
|
|
2030
|
+
...props,
|
|
2031
|
+
children: [
|
|
2032
|
+
children,
|
|
2033
|
+
viewport ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(NavigationMenuViewport, {}) : null
|
|
2034
|
+
]
|
|
2035
|
+
}
|
|
2036
|
+
);
|
|
2037
|
+
}
|
|
2038
|
+
function NavigationMenuList({
|
|
2039
|
+
className,
|
|
2040
|
+
...props
|
|
2041
|
+
}) {
|
|
2042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2043
|
+
import_radix_ui17.NavigationMenu.List,
|
|
2044
|
+
{
|
|
2045
|
+
"data-slot": "navigation-menu-list",
|
|
2046
|
+
className: cn(
|
|
2047
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
2048
|
+
className
|
|
2049
|
+
),
|
|
2050
|
+
...props
|
|
2051
|
+
}
|
|
2052
|
+
);
|
|
2053
|
+
}
|
|
2054
|
+
function NavigationMenuItem({
|
|
2055
|
+
...props
|
|
2056
|
+
}) {
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_radix_ui17.NavigationMenu.Item, { "data-slot": "navigation-menu-item", ...props });
|
|
2058
|
+
}
|
|
2059
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority2.cva)(
|
|
2060
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-lg bg-transparent px-4 py-2 text-sm font-medium transition-colors hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-muted/80 data-[state=open]:text-foreground"
|
|
2061
|
+
);
|
|
2062
|
+
function NavigationMenuTrigger({
|
|
2063
|
+
className,
|
|
2064
|
+
children,
|
|
2065
|
+
...props
|
|
2066
|
+
}) {
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2068
|
+
import_radix_ui17.NavigationMenu.Trigger,
|
|
2069
|
+
{
|
|
2070
|
+
"data-slot": "navigation-menu-trigger",
|
|
2071
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
2072
|
+
...props,
|
|
2073
|
+
children: [
|
|
2074
|
+
children,
|
|
2075
|
+
" ",
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2077
|
+
import_lucide_react9.ChevronDownIcon,
|
|
2078
|
+
{
|
|
2079
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
2080
|
+
"aria-hidden": "true"
|
|
2081
|
+
}
|
|
2082
|
+
)
|
|
2083
|
+
]
|
|
2084
|
+
}
|
|
2085
|
+
);
|
|
2086
|
+
}
|
|
2087
|
+
function NavigationMenuContent({
|
|
2088
|
+
className,
|
|
2089
|
+
...props
|
|
2090
|
+
}) {
|
|
2091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2092
|
+
import_radix_ui17.NavigationMenu.Content,
|
|
2093
|
+
{
|
|
2094
|
+
"data-slot": "navigation-menu-content",
|
|
2095
|
+
className: cn(
|
|
2096
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
2097
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border group-data-[viewport=false]/navigation-menu:shadow-card",
|
|
2098
|
+
className
|
|
2099
|
+
),
|
|
2100
|
+
...props
|
|
2101
|
+
}
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
function NavigationMenuViewport({
|
|
2105
|
+
className,
|
|
2106
|
+
...props
|
|
2107
|
+
}) {
|
|
2108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn("absolute top-full left-0 isolate z-[80] flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2109
|
+
import_radix_ui17.NavigationMenu.Viewport,
|
|
2110
|
+
{
|
|
2111
|
+
"data-slot": "navigation-menu-viewport",
|
|
2112
|
+
className: cn(
|
|
2113
|
+
overlaySurfaceClass,
|
|
2114
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
2115
|
+
className
|
|
2116
|
+
),
|
|
2117
|
+
...props
|
|
2118
|
+
}
|
|
2119
|
+
) });
|
|
2120
|
+
}
|
|
2121
|
+
function NavigationMenuLink({
|
|
2122
|
+
className,
|
|
2123
|
+
...props
|
|
2124
|
+
}) {
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2126
|
+
import_radix_ui17.NavigationMenu.Link,
|
|
2127
|
+
{
|
|
2128
|
+
"data-slot": "navigation-menu-link",
|
|
2129
|
+
className: cn(
|
|
2130
|
+
"flex flex-col gap-1 rounded-md p-2 text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
2131
|
+
className
|
|
2132
|
+
),
|
|
2133
|
+
...props
|
|
2134
|
+
}
|
|
2135
|
+
);
|
|
2136
|
+
}
|
|
2137
|
+
function NavigationMenuIndicator({
|
|
2138
|
+
className,
|
|
2139
|
+
...props
|
|
2140
|
+
}) {
|
|
2141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2142
|
+
import_radix_ui17.NavigationMenu.Indicator,
|
|
2143
|
+
{
|
|
2144
|
+
"data-slot": "navigation-menu-indicator",
|
|
2145
|
+
className: cn(
|
|
2146
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
2147
|
+
className
|
|
2148
|
+
),
|
|
2149
|
+
...props,
|
|
2150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
// src/ui/command.tsx
|
|
2156
|
+
var import_cmdk = require("cmdk");
|
|
2157
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2158
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2159
|
+
function Command({
|
|
2160
|
+
className,
|
|
2161
|
+
...props
|
|
2162
|
+
}) {
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2164
|
+
import_cmdk.Command,
|
|
2165
|
+
{
|
|
2166
|
+
"data-slot": "command",
|
|
2167
|
+
className: cn(
|
|
2168
|
+
"flex h-full w-full flex-col overflow-hidden bg-popover text-popover-foreground",
|
|
2169
|
+
className
|
|
2170
|
+
),
|
|
2171
|
+
...props
|
|
2172
|
+
}
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
function CommandDialog({
|
|
2176
|
+
title = "Command palette",
|
|
2177
|
+
description = "Search for a command to run\u2026",
|
|
2178
|
+
children,
|
|
2179
|
+
className,
|
|
2180
|
+
showCloseButton = true,
|
|
2181
|
+
...props
|
|
2182
|
+
}) {
|
|
2183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Dialog, { ...props, children: [
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DialogHeader, { className: "sr-only", children: [
|
|
2185
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogTitle, { children: title }),
|
|
2186
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogDescription, { children: description })
|
|
2187
|
+
] }),
|
|
2188
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2189
|
+
DialogContent,
|
|
2190
|
+
{
|
|
2191
|
+
className: cn("overflow-hidden p-0", className),
|
|
2192
|
+
showCloseButton,
|
|
2193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-4 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:size-4", children })
|
|
2194
|
+
}
|
|
2195
|
+
)
|
|
2196
|
+
] });
|
|
2197
|
+
}
|
|
2198
|
+
function CommandInput({
|
|
2199
|
+
className,
|
|
2200
|
+
...props
|
|
2201
|
+
}) {
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2203
|
+
"div",
|
|
2204
|
+
{
|
|
2205
|
+
"data-slot": "command-input-wrapper",
|
|
2206
|
+
className: "flex h-10 items-center gap-2 border-b border-border px-3",
|
|
2207
|
+
children: [
|
|
2208
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react10.SearchIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
2209
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2210
|
+
import_cmdk.Command.Input,
|
|
2211
|
+
{
|
|
2212
|
+
"data-slot": "command-input",
|
|
2213
|
+
className: cn(
|
|
2214
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2215
|
+
className
|
|
2216
|
+
),
|
|
2217
|
+
...props
|
|
2218
|
+
}
|
|
2219
|
+
)
|
|
2220
|
+
]
|
|
2221
|
+
}
|
|
2222
|
+
);
|
|
2223
|
+
}
|
|
2224
|
+
function CommandList({
|
|
2225
|
+
className,
|
|
2226
|
+
...props
|
|
2227
|
+
}) {
|
|
2228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2229
|
+
import_cmdk.Command.List,
|
|
2230
|
+
{
|
|
2231
|
+
"data-slot": "command-list",
|
|
2232
|
+
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
2233
|
+
...props
|
|
2234
|
+
}
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
function CommandEmpty({
|
|
2238
|
+
...props
|
|
2239
|
+
}) {
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2241
|
+
import_cmdk.Command.Empty,
|
|
2242
|
+
{
|
|
2243
|
+
"data-slot": "command-empty",
|
|
2244
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
2245
|
+
...props
|
|
2246
|
+
}
|
|
2247
|
+
);
|
|
2248
|
+
}
|
|
2249
|
+
function CommandGroup({
|
|
2250
|
+
className,
|
|
2251
|
+
...props
|
|
2252
|
+
}) {
|
|
2253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2254
|
+
import_cmdk.Command.Group,
|
|
2255
|
+
{
|
|
2256
|
+
"data-slot": "command-group",
|
|
2257
|
+
className: cn(
|
|
2258
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
2259
|
+
className
|
|
2260
|
+
),
|
|
2261
|
+
...props
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
2264
|
+
}
|
|
2265
|
+
function CommandSeparator({
|
|
2266
|
+
className,
|
|
2267
|
+
...props
|
|
2268
|
+
}) {
|
|
2269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2270
|
+
import_cmdk.Command.Separator,
|
|
2271
|
+
{
|
|
2272
|
+
"data-slot": "command-separator",
|
|
2273
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
2274
|
+
...props
|
|
2275
|
+
}
|
|
2276
|
+
);
|
|
2277
|
+
}
|
|
2278
|
+
function CommandItem({
|
|
2279
|
+
className,
|
|
2280
|
+
...props
|
|
2281
|
+
}) {
|
|
2282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2283
|
+
import_cmdk.Command.Item,
|
|
2284
|
+
{
|
|
2285
|
+
"data-slot": "command-item",
|
|
2286
|
+
className: cn(
|
|
2287
|
+
overlayItemClass,
|
|
2288
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",
|
|
2289
|
+
className
|
|
2290
|
+
),
|
|
2291
|
+
...props
|
|
2292
|
+
}
|
|
2293
|
+
);
|
|
2294
|
+
}
|
|
2295
|
+
function CommandShortcut({
|
|
2296
|
+
className,
|
|
2297
|
+
...props
|
|
2298
|
+
}) {
|
|
2299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2300
|
+
"span",
|
|
2301
|
+
{
|
|
2302
|
+
"data-slot": "command-shortcut",
|
|
2303
|
+
className: cn(
|
|
2304
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
2305
|
+
className
|
|
2306
|
+
),
|
|
2307
|
+
...props
|
|
2308
|
+
}
|
|
2309
|
+
);
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
// src/ui/calendar.tsx
|
|
2313
|
+
var React2 = __toESM(require("react"), 1);
|
|
2314
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2315
|
+
var import_react_day_picker = require("react-day-picker");
|
|
2316
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2317
|
+
function Calendar({
|
|
2318
|
+
className,
|
|
2319
|
+
classNames,
|
|
2320
|
+
showOutsideDays = true,
|
|
2321
|
+
...props
|
|
2322
|
+
}) {
|
|
2323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2324
|
+
import_react_day_picker.DayPicker,
|
|
2325
|
+
{
|
|
2326
|
+
showOutsideDays,
|
|
2327
|
+
className: cn("p-3", className),
|
|
2328
|
+
classNames: {
|
|
2329
|
+
months: "flex flex-col gap-4 sm:flex-row sm:gap-4",
|
|
2330
|
+
month: "flex flex-col gap-4",
|
|
2331
|
+
month_caption: "relative flex items-center justify-center pt-1",
|
|
2332
|
+
caption_label: "text-sm font-medium",
|
|
2333
|
+
nav: "flex items-center gap-1",
|
|
2334
|
+
button_previous: cn(
|
|
2335
|
+
buttonVariants({ variant: "outline" }),
|
|
2336
|
+
"absolute left-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
|
|
2337
|
+
),
|
|
2338
|
+
button_next: cn(
|
|
2339
|
+
buttonVariants({ variant: "outline" }),
|
|
2340
|
+
"absolute right-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
|
|
2341
|
+
),
|
|
2342
|
+
month_grid: "w-full border-collapse",
|
|
2343
|
+
weekdays: "flex",
|
|
2344
|
+
weekday: "w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground",
|
|
2345
|
+
week: "mt-2 flex w-full",
|
|
2346
|
+
day: cn(
|
|
2347
|
+
"relative size-9 p-0 text-center text-sm",
|
|
2348
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
2349
|
+
"[&:has([aria-selected].day-outside)]:bg-accent/50",
|
|
2350
|
+
"[&:has([aria-selected])]:bg-accent",
|
|
2351
|
+
"first:[&:has([aria-selected])]:rounded-l-md",
|
|
2352
|
+
"last:[&:has([aria-selected])]:rounded-r-md",
|
|
2353
|
+
"focus-within:relative focus-within:z-10"
|
|
2354
|
+
),
|
|
2355
|
+
day_button: cn(
|
|
2356
|
+
buttonVariants({ variant: "ghost" }),
|
|
2357
|
+
"size-9 p-0 font-normal aria-selected:opacity-100"
|
|
2358
|
+
),
|
|
2359
|
+
range_start: "day-range-start rounded-l-md",
|
|
2360
|
+
range_middle: "day-range-middle aria-selected:bg-accent",
|
|
2361
|
+
range_end: "day-range-end rounded-r-md",
|
|
2362
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
2363
|
+
today: "bg-accent text-accent-foreground",
|
|
2364
|
+
outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
2365
|
+
disabled: "text-muted-foreground opacity-50",
|
|
2366
|
+
hidden: "invisible",
|
|
2367
|
+
...classNames
|
|
2368
|
+
},
|
|
2369
|
+
components: {
|
|
2370
|
+
Chevron: ({ orientation, className: className2, ...chevronProps }) => {
|
|
2371
|
+
const Icon = orientation === "left" ? import_lucide_react11.ChevronLeftIcon : import_lucide_react11.ChevronRightIcon;
|
|
2372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { className: cn("size-4", className2), ...chevronProps });
|
|
2373
|
+
},
|
|
2374
|
+
DayButton: CalendarDayButton
|
|
2375
|
+
},
|
|
2376
|
+
...props
|
|
2377
|
+
}
|
|
2378
|
+
);
|
|
2379
|
+
}
|
|
2380
|
+
function CalendarDayButton({
|
|
2381
|
+
className,
|
|
2382
|
+
day,
|
|
2383
|
+
modifiers,
|
|
2384
|
+
...props
|
|
2385
|
+
}) {
|
|
2386
|
+
const ref = React2.useRef(null);
|
|
2387
|
+
React2.useEffect(() => {
|
|
2388
|
+
if (modifiers.focused) ref.current?.focus();
|
|
2389
|
+
}, [modifiers.focused]);
|
|
2390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2391
|
+
"button",
|
|
2392
|
+
{
|
|
2393
|
+
ref,
|
|
2394
|
+
type: "button",
|
|
2395
|
+
"data-day": day.date.toLocaleDateString(),
|
|
2396
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
2397
|
+
"data-range-start": modifiers.range_start,
|
|
2398
|
+
"data-range-end": modifiers.range_end,
|
|
2399
|
+
"data-range-middle": modifiers.range_middle,
|
|
2400
|
+
className: cn(
|
|
2401
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
|
|
2402
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
2403
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 focus-visible:outline-none",
|
|
2404
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2405
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground",
|
|
2406
|
+
"data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground",
|
|
2407
|
+
"data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground",
|
|
2408
|
+
"data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground",
|
|
2409
|
+
className
|
|
2410
|
+
),
|
|
2411
|
+
...props
|
|
2412
|
+
}
|
|
2413
|
+
);
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
// src/ui/combobox.tsx
|
|
2417
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2418
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2419
|
+
function Combobox({
|
|
2420
|
+
...props
|
|
2421
|
+
}) {
|
|
2422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Popover, { "data-slot": "combobox", ...props });
|
|
2423
|
+
}
|
|
2424
|
+
function ComboboxTrigger({
|
|
2425
|
+
className,
|
|
2426
|
+
size = "default",
|
|
2427
|
+
children,
|
|
2428
|
+
...props
|
|
2429
|
+
}) {
|
|
2430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2431
|
+
PopoverTrigger,
|
|
2432
|
+
{
|
|
2433
|
+
"data-slot": "combobox-trigger",
|
|
2434
|
+
className: cn(
|
|
2435
|
+
controlClass({ size }),
|
|
2436
|
+
"flex w-full items-center justify-between gap-2 whitespace-nowrap font-normal",
|
|
2437
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2438
|
+
className
|
|
2439
|
+
),
|
|
2440
|
+
...props,
|
|
2441
|
+
children: [
|
|
2442
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate", children }),
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.ChevronDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
2444
|
+
]
|
|
2445
|
+
}
|
|
2446
|
+
);
|
|
2447
|
+
}
|
|
2448
|
+
function ComboboxAnchor({
|
|
2449
|
+
...props
|
|
2450
|
+
}) {
|
|
2451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PopoverAnchor, { "data-slot": "combobox-anchor", ...props });
|
|
2452
|
+
}
|
|
2453
|
+
function ComboboxContent({
|
|
2454
|
+
className,
|
|
2455
|
+
align = "start",
|
|
2456
|
+
...props
|
|
2457
|
+
}) {
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2459
|
+
PopoverContent,
|
|
2460
|
+
{
|
|
2461
|
+
"data-slot": "combobox-content",
|
|
2462
|
+
variant: "list",
|
|
2463
|
+
align,
|
|
2464
|
+
className: cn(
|
|
2465
|
+
"w-[var(--radix-popover-trigger-width)] min-w-[8rem] p-0",
|
|
2466
|
+
className
|
|
2467
|
+
),
|
|
2468
|
+
...props
|
|
2469
|
+
}
|
|
2470
|
+
);
|
|
2471
|
+
}
|
|
2472
|
+
function ComboboxCommand({
|
|
2473
|
+
className,
|
|
2474
|
+
...props
|
|
2475
|
+
}) {
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2477
|
+
Command,
|
|
2478
|
+
{
|
|
2479
|
+
"data-slot": "combobox-command",
|
|
2480
|
+
className,
|
|
2481
|
+
...props
|
|
2482
|
+
}
|
|
2483
|
+
);
|
|
2484
|
+
}
|
|
2485
|
+
function ComboboxInput({
|
|
2486
|
+
...props
|
|
2487
|
+
}) {
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandInput, { "data-slot": "combobox-input", ...props });
|
|
2489
|
+
}
|
|
2490
|
+
function ComboboxList({
|
|
2491
|
+
...props
|
|
2492
|
+
}) {
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandList, { "data-slot": "combobox-list", ...props });
|
|
2494
|
+
}
|
|
2495
|
+
function ComboboxEmpty({
|
|
2496
|
+
...props
|
|
2497
|
+
}) {
|
|
2498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandEmpty, { "data-slot": "combobox-empty", ...props });
|
|
2499
|
+
}
|
|
2500
|
+
function ComboboxGroup({
|
|
2501
|
+
...props
|
|
2502
|
+
}) {
|
|
2503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandGroup, { "data-slot": "combobox-group", ...props });
|
|
2504
|
+
}
|
|
2505
|
+
function ComboboxItem({
|
|
2506
|
+
...props
|
|
2507
|
+
}) {
|
|
2508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandItem, { "data-slot": "combobox-item", ...props });
|
|
2509
|
+
}
|
|
2510
|
+
function ComboboxSeparator({
|
|
2511
|
+
...props
|
|
2512
|
+
}) {
|
|
2513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandSeparator, { "data-slot": "combobox-separator", ...props });
|
|
2514
|
+
}
|
|
2515
|
+
function ComboboxShortcut({
|
|
2516
|
+
...props
|
|
2517
|
+
}) {
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommandShortcut, { "data-slot": "combobox-shortcut", ...props });
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
// src/ui/date-picker.tsx
|
|
2522
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2523
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2524
|
+
function DatePicker({
|
|
2525
|
+
...props
|
|
2526
|
+
}) {
|
|
2527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Popover, { "data-slot": "date-picker", ...props });
|
|
2528
|
+
}
|
|
2529
|
+
function DatePickerTrigger({
|
|
2530
|
+
...props
|
|
2531
|
+
}) {
|
|
2532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PopoverTrigger, { "data-slot": "date-picker-trigger", ...props });
|
|
2533
|
+
}
|
|
2534
|
+
function DatePickerContent({
|
|
2535
|
+
className,
|
|
2536
|
+
align = "start",
|
|
2537
|
+
...props
|
|
2538
|
+
}) {
|
|
2539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2540
|
+
PopoverContent,
|
|
2541
|
+
{
|
|
2542
|
+
"data-slot": "date-picker-content",
|
|
2543
|
+
align,
|
|
2544
|
+
className: cn("w-auto p-0", className),
|
|
2545
|
+
...props
|
|
2546
|
+
}
|
|
2547
|
+
);
|
|
2548
|
+
}
|
|
2549
|
+
function DatePickerCalendar({
|
|
2550
|
+
className,
|
|
2551
|
+
...props
|
|
2552
|
+
}) {
|
|
2553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2554
|
+
Calendar,
|
|
2555
|
+
{
|
|
2556
|
+
"data-slot": "date-picker-calendar",
|
|
2557
|
+
className: cn("rounded-lg border-0", className),
|
|
2558
|
+
...props
|
|
2559
|
+
}
|
|
2560
|
+
);
|
|
2561
|
+
}
|
|
2562
|
+
function formatPickerDate(date) {
|
|
2563
|
+
return date.toLocaleDateString(void 0, {
|
|
2564
|
+
month: "short",
|
|
2565
|
+
day: "numeric",
|
|
2566
|
+
year: "numeric"
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
function DatePickerButton({
|
|
2570
|
+
date,
|
|
2571
|
+
placeholder = "Pick a date",
|
|
2572
|
+
className,
|
|
2573
|
+
...props
|
|
2574
|
+
}) {
|
|
2575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2576
|
+
"button",
|
|
2577
|
+
{
|
|
2578
|
+
type: "button",
|
|
2579
|
+
"data-slot": "date-picker-button",
|
|
2580
|
+
className: cn(
|
|
2581
|
+
controlClass(),
|
|
2582
|
+
"flex w-full items-center justify-start gap-2 text-left font-normal",
|
|
2583
|
+
!date && "text-muted-foreground",
|
|
2584
|
+
className
|
|
2585
|
+
),
|
|
2586
|
+
...props,
|
|
2587
|
+
children: [
|
|
2588
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.CalendarIcon, { className: "size-4 shrink-0 opacity-70" }),
|
|
2589
|
+
date ? formatPickerDate(date) : placeholder
|
|
2590
|
+
]
|
|
2591
|
+
}
|
|
2592
|
+
);
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
// src/ui/input-otp.tsx
|
|
2596
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2597
|
+
var import_radix_ui18 = require("radix-ui");
|
|
2598
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2599
|
+
function InputOTP({
|
|
2600
|
+
className,
|
|
2601
|
+
containerClassName,
|
|
2602
|
+
children,
|
|
2603
|
+
...props
|
|
2604
|
+
}) {
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2606
|
+
import_radix_ui18.unstable_OneTimePasswordField.Root,
|
|
2607
|
+
{
|
|
2608
|
+
"data-slot": "input-otp",
|
|
2609
|
+
className: cn(
|
|
2610
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
2611
|
+
containerClassName,
|
|
2612
|
+
className
|
|
2613
|
+
),
|
|
2614
|
+
...props,
|
|
2615
|
+
children
|
|
2616
|
+
}
|
|
2617
|
+
);
|
|
2618
|
+
}
|
|
2619
|
+
function InputOTPGroup({
|
|
2620
|
+
className,
|
|
2621
|
+
...props
|
|
2622
|
+
}) {
|
|
2623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2624
|
+
"div",
|
|
2625
|
+
{
|
|
2626
|
+
"data-slot": "input-otp-group",
|
|
2627
|
+
className: cn("flex items-center", className),
|
|
2628
|
+
...props
|
|
2629
|
+
}
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
function InputOTPSlot({
|
|
2633
|
+
className,
|
|
2634
|
+
...props
|
|
2635
|
+
}) {
|
|
2636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2637
|
+
import_radix_ui18.unstable_OneTimePasswordField.Input,
|
|
2638
|
+
{
|
|
2639
|
+
"data-slot": "input-otp-slot",
|
|
2640
|
+
className: cn(
|
|
2641
|
+
controlSurfaceClass,
|
|
2642
|
+
"relative size-9 rounded-none text-center text-sm tabular-nums",
|
|
2643
|
+
"-ms-px first:ms-0 first:rounded-s-lg last:rounded-e-lg",
|
|
2644
|
+
"focus-visible:z-10",
|
|
2645
|
+
className
|
|
2646
|
+
),
|
|
2647
|
+
...props
|
|
2648
|
+
}
|
|
2649
|
+
);
|
|
2650
|
+
}
|
|
2651
|
+
function InputOTPHiddenInput({
|
|
2652
|
+
...props
|
|
2653
|
+
}) {
|
|
2654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.unstable_OneTimePasswordField.HiddenInput, { "data-slot": "input-otp-hidden-input", ...props });
|
|
2655
|
+
}
|
|
2656
|
+
function InputOTPSeparator({
|
|
2657
|
+
className,
|
|
2658
|
+
...props
|
|
2659
|
+
}) {
|
|
2660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2661
|
+
"div",
|
|
2662
|
+
{
|
|
2663
|
+
role: "separator",
|
|
2664
|
+
"data-slot": "input-otp-separator",
|
|
2665
|
+
"aria-hidden": true,
|
|
2666
|
+
className: cn("text-muted-foreground", className),
|
|
2667
|
+
...props,
|
|
2668
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.MinusIcon, { className: "size-4" })
|
|
2669
|
+
}
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
// src/ui/kbd.tsx
|
|
2674
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2675
|
+
function Kbd({ className, ...props }) {
|
|
2676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2677
|
+
"kbd",
|
|
2678
|
+
{
|
|
2679
|
+
"data-slot": "kbd",
|
|
2680
|
+
className: cn(
|
|
2681
|
+
"pointer-events-none inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[0.625rem] font-medium text-muted-foreground",
|
|
2682
|
+
className
|
|
2683
|
+
),
|
|
2684
|
+
...props
|
|
2685
|
+
}
|
|
2686
|
+
);
|
|
2687
|
+
}
|
|
2688
|
+
function KbdGroup({ className, ...props }) {
|
|
2689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2690
|
+
"div",
|
|
2691
|
+
{
|
|
2692
|
+
"data-slot": "kbd-group",
|
|
2693
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
2694
|
+
...props
|
|
2695
|
+
}
|
|
2696
|
+
);
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
// src/ui/spinner.tsx
|
|
2700
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2701
|
+
function Spinner({
|
|
2702
|
+
className,
|
|
2703
|
+
...props
|
|
2704
|
+
}) {
|
|
2705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2706
|
+
"svg",
|
|
2707
|
+
{
|
|
2708
|
+
"data-slot": "spinner",
|
|
2709
|
+
role: "status",
|
|
2710
|
+
"aria-label": "Loading",
|
|
2711
|
+
viewBox: "0 0 24 24",
|
|
2712
|
+
fill: "none",
|
|
2713
|
+
className: cn("size-4 animate-spin text-muted-foreground", className),
|
|
2714
|
+
...props,
|
|
2715
|
+
children: [
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2717
|
+
"circle",
|
|
2718
|
+
{
|
|
2719
|
+
className: "opacity-25",
|
|
2720
|
+
cx: "12",
|
|
2721
|
+
cy: "12",
|
|
2722
|
+
r: "10",
|
|
2723
|
+
stroke: "currentColor",
|
|
2724
|
+
strokeWidth: "3"
|
|
2725
|
+
}
|
|
2726
|
+
),
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2728
|
+
"path",
|
|
2729
|
+
{
|
|
2730
|
+
className: "opacity-75",
|
|
2731
|
+
fill: "currentColor",
|
|
2732
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
2733
|
+
}
|
|
2734
|
+
)
|
|
2735
|
+
]
|
|
2736
|
+
}
|
|
2737
|
+
);
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
// src/ui/input-group.tsx
|
|
2741
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2742
|
+
function InputGroup({
|
|
2743
|
+
className,
|
|
2744
|
+
...props
|
|
2745
|
+
}) {
|
|
2746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2747
|
+
"div",
|
|
2748
|
+
{
|
|
2749
|
+
"data-slot": "input-group",
|
|
2750
|
+
className: cn(
|
|
2751
|
+
controlClass(),
|
|
2752
|
+
"flex w-full items-stretch overflow-hidden p-0",
|
|
2753
|
+
"has-[[data-slot=input-group-control]:disabled]:opacity-50",
|
|
2754
|
+
className
|
|
2755
|
+
),
|
|
2756
|
+
...props
|
|
2757
|
+
}
|
|
2758
|
+
);
|
|
2759
|
+
}
|
|
2760
|
+
function InputGroupAddon({
|
|
2761
|
+
className,
|
|
2762
|
+
align = "inline-start",
|
|
2763
|
+
...props
|
|
2764
|
+
}) {
|
|
2765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2766
|
+
"div",
|
|
2767
|
+
{
|
|
2768
|
+
"data-slot": "input-group-addon",
|
|
2769
|
+
"data-align": align,
|
|
2770
|
+
className: cn(
|
|
2771
|
+
"flex shrink-0 items-center bg-transparent px-3 text-sm text-muted-foreground",
|
|
2772
|
+
align === "inline-start" && "border-r border-border",
|
|
2773
|
+
align === "inline-end" && "border-l border-border",
|
|
2774
|
+
className
|
|
2775
|
+
),
|
|
2776
|
+
...props
|
|
2777
|
+
}
|
|
2778
|
+
);
|
|
2779
|
+
}
|
|
2780
|
+
function InputGroupInput({
|
|
2781
|
+
className,
|
|
2782
|
+
...props
|
|
2783
|
+
}) {
|
|
2784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2785
|
+
"input",
|
|
2786
|
+
{
|
|
2787
|
+
"data-slot": "input-group-control",
|
|
2788
|
+
className: cn(
|
|
2789
|
+
"min-w-0 flex-1 border-0 bg-transparent px-3 py-2 text-sm text-foreground shadow-none outline-none",
|
|
2790
|
+
"placeholder:text-muted-foreground/70 focus-visible:ring-0",
|
|
2791
|
+
className
|
|
2792
|
+
),
|
|
2793
|
+
...props
|
|
2794
|
+
}
|
|
2795
|
+
);
|
|
2796
|
+
}
|
|
2797
|
+
function InputGroupText({
|
|
2798
|
+
className,
|
|
2799
|
+
...props
|
|
2800
|
+
}) {
|
|
2801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2802
|
+
"span",
|
|
2803
|
+
{
|
|
2804
|
+
"data-slot": "input-group-text",
|
|
2805
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2806
|
+
...props
|
|
2807
|
+
}
|
|
2808
|
+
);
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
// src/ui/accordion.tsx
|
|
2812
|
+
var import_radix_ui19 = require("radix-ui");
|
|
2813
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2814
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2815
|
+
function Accordion({
|
|
2816
|
+
...props
|
|
2817
|
+
}) {
|
|
2818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_radix_ui19.Accordion.Root, { "data-slot": "accordion", ...props });
|
|
2819
|
+
}
|
|
2820
|
+
function AccordionItem({
|
|
2821
|
+
className,
|
|
2822
|
+
...props
|
|
2823
|
+
}) {
|
|
2824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2825
|
+
import_radix_ui19.Accordion.Item,
|
|
2826
|
+
{
|
|
2827
|
+
"data-slot": "accordion-item",
|
|
2828
|
+
className: cn("border-b border-border last:border-b-0", className),
|
|
2829
|
+
...props
|
|
2830
|
+
}
|
|
2831
|
+
);
|
|
2832
|
+
}
|
|
2833
|
+
function AccordionTrigger({
|
|
2834
|
+
className,
|
|
2835
|
+
children,
|
|
2836
|
+
...props
|
|
2837
|
+
}) {
|
|
2838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_radix_ui19.Accordion.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2839
|
+
import_radix_ui19.Accordion.Trigger,
|
|
2840
|
+
{
|
|
2841
|
+
"data-slot": "accordion-trigger",
|
|
2842
|
+
className: cn(
|
|
2843
|
+
"flex flex-1 items-center justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all",
|
|
2844
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
|
|
2845
|
+
"hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
2846
|
+
className
|
|
2847
|
+
),
|
|
2848
|
+
...props,
|
|
2849
|
+
children: [
|
|
2850
|
+
children,
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
2852
|
+
]
|
|
2853
|
+
}
|
|
2854
|
+
) });
|
|
2855
|
+
}
|
|
2856
|
+
function AccordionContent({
|
|
2857
|
+
className,
|
|
2858
|
+
children,
|
|
2859
|
+
...props
|
|
2860
|
+
}) {
|
|
2861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2862
|
+
import_radix_ui19.Accordion.Content,
|
|
2863
|
+
{
|
|
2864
|
+
"data-slot": "accordion-content",
|
|
2865
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
2866
|
+
...props,
|
|
2867
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("pt-0 pb-4", className), children })
|
|
2868
|
+
}
|
|
2869
|
+
);
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
// src/ui/separator.tsx
|
|
2873
|
+
var import_radix_ui20 = require("radix-ui");
|
|
2874
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2875
|
+
function Separator({
|
|
2876
|
+
className,
|
|
2877
|
+
orientation = "horizontal",
|
|
2878
|
+
decorative = true,
|
|
2879
|
+
...props
|
|
2880
|
+
}) {
|
|
2881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2882
|
+
import_radix_ui20.Separator.Root,
|
|
2883
|
+
{
|
|
2884
|
+
"data-slot": "separator",
|
|
2885
|
+
decorative,
|
|
2886
|
+
orientation,
|
|
2887
|
+
className: cn(
|
|
2888
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
2889
|
+
className
|
|
2890
|
+
),
|
|
2891
|
+
...props
|
|
2892
|
+
}
|
|
2893
|
+
);
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
// src/ui/slider.tsx
|
|
2897
|
+
var React3 = __toESM(require("react"), 1);
|
|
2898
|
+
var import_radix_ui21 = require("radix-ui");
|
|
2899
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2900
|
+
function Slider({
|
|
2901
|
+
className,
|
|
2902
|
+
defaultValue,
|
|
2903
|
+
value,
|
|
2904
|
+
min = 0,
|
|
2905
|
+
max = 100,
|
|
2906
|
+
...props
|
|
2907
|
+
}) {
|
|
2908
|
+
const thumbs = React3.useMemo(() => {
|
|
2909
|
+
if (Array.isArray(value)) return value;
|
|
2910
|
+
if (Array.isArray(defaultValue)) return defaultValue;
|
|
2911
|
+
return [min];
|
|
2912
|
+
}, [value, defaultValue, min]);
|
|
2913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2914
|
+
import_radix_ui21.Slider.Root,
|
|
2915
|
+
{
|
|
2916
|
+
"data-slot": "slider",
|
|
2917
|
+
defaultValue,
|
|
2918
|
+
value,
|
|
2919
|
+
min,
|
|
2920
|
+
max,
|
|
2921
|
+
className: cn(
|
|
2922
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",
|
|
2923
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
2924
|
+
className
|
|
2925
|
+
),
|
|
2926
|
+
...props,
|
|
2927
|
+
children: [
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2929
|
+
import_radix_ui21.Slider.Track,
|
|
2930
|
+
{
|
|
2931
|
+
"data-slot": "slider-track",
|
|
2932
|
+
className: "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
|
|
2933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2934
|
+
import_radix_ui21.Slider.Range,
|
|
2935
|
+
{
|
|
2936
|
+
"data-slot": "slider-range",
|
|
2937
|
+
className: "absolute bg-gradient-to-b from-primary-fill-from to-primary-fill-to data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
2938
|
+
}
|
|
2939
|
+
)
|
|
2940
|
+
}
|
|
2941
|
+
),
|
|
2942
|
+
Array.from({ length: thumbs.length }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2943
|
+
import_radix_ui21.Slider.Thumb,
|
|
2944
|
+
{
|
|
2945
|
+
"data-slot": "slider-thumb",
|
|
2946
|
+
className: "block size-4 shrink-0 rounded-full border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card outline-none transition-[box-shadow] focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50"
|
|
2947
|
+
},
|
|
2948
|
+
i
|
|
2949
|
+
))
|
|
2950
|
+
]
|
|
2951
|
+
}
|
|
2952
|
+
);
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
// src/ui/progress.tsx
|
|
2956
|
+
var import_radix_ui22 = require("radix-ui");
|
|
2957
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2958
|
+
function Progress({
|
|
2959
|
+
className,
|
|
2960
|
+
value,
|
|
2961
|
+
...props
|
|
2962
|
+
}) {
|
|
2963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2964
|
+
import_radix_ui22.Progress.Root,
|
|
2965
|
+
{
|
|
2966
|
+
"data-slot": "progress",
|
|
2967
|
+
className: cn(
|
|
2968
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-muted",
|
|
2969
|
+
className
|
|
2970
|
+
),
|
|
2971
|
+
...props,
|
|
2972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2973
|
+
import_radix_ui22.Progress.Indicator,
|
|
2974
|
+
{
|
|
2975
|
+
"data-slot": "progress-indicator",
|
|
2976
|
+
className: "h-full w-full flex-1 bg-gradient-to-b from-primary-fill-from to-primary-fill-to transition-transform",
|
|
2977
|
+
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
2978
|
+
}
|
|
2979
|
+
)
|
|
2980
|
+
}
|
|
2981
|
+
);
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
// src/ui/badge.tsx
|
|
2985
|
+
var import_radix_ui23 = require("radix-ui");
|
|
2986
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
2987
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2988
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
2989
|
+
"inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
2990
|
+
{
|
|
2991
|
+
variants: {
|
|
2992
|
+
variant: {
|
|
2993
|
+
default: "border-transparent bg-gradient-to-b from-primary-fill-from to-primary-fill-to text-primary-foreground",
|
|
2994
|
+
secondary: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
|
|
2995
|
+
destructive: "border-destructive/45 bg-destructive/10 text-destructive",
|
|
2996
|
+
outline: "border-border text-foreground"
|
|
2997
|
+
}
|
|
2998
|
+
},
|
|
2999
|
+
defaultVariants: {
|
|
3000
|
+
variant: "default"
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
);
|
|
3004
|
+
function Badge({
|
|
3005
|
+
className,
|
|
3006
|
+
variant,
|
|
3007
|
+
asChild = false,
|
|
3008
|
+
...props
|
|
3009
|
+
}) {
|
|
3010
|
+
const Comp = asChild ? import_radix_ui23.Slot.Root : "span";
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3012
|
+
Comp,
|
|
3013
|
+
{
|
|
3014
|
+
"data-slot": "badge",
|
|
3015
|
+
className: cn(badgeVariants({ variant }), className),
|
|
3016
|
+
...props
|
|
3017
|
+
}
|
|
3018
|
+
);
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
// src/ui/sheet.tsx
|
|
3022
|
+
var import_lucide_react16 = require("lucide-react");
|
|
3023
|
+
var import_radix_ui24 = require("radix-ui");
|
|
3024
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
3025
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3026
|
+
function Sheet({ ...props }) {
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui24.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
3028
|
+
}
|
|
3029
|
+
function SheetTrigger({
|
|
3030
|
+
...props
|
|
3031
|
+
}) {
|
|
3032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui24.Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
3033
|
+
}
|
|
3034
|
+
function SheetClose({
|
|
3035
|
+
...props
|
|
3036
|
+
}) {
|
|
3037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui24.Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
3038
|
+
}
|
|
3039
|
+
function SheetPortal({
|
|
3040
|
+
...props
|
|
3041
|
+
}) {
|
|
3042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui24.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
3043
|
+
}
|
|
3044
|
+
function SheetOverlay({
|
|
3045
|
+
className,
|
|
3046
|
+
...props
|
|
3047
|
+
}) {
|
|
3048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3049
|
+
import_radix_ui24.Dialog.Overlay,
|
|
3050
|
+
{
|
|
3051
|
+
"data-slot": "sheet-overlay",
|
|
3052
|
+
className: cn(
|
|
3053
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[70] bg-black/50",
|
|
3054
|
+
className
|
|
3055
|
+
),
|
|
3056
|
+
...props
|
|
3057
|
+
}
|
|
3058
|
+
);
|
|
3059
|
+
}
|
|
3060
|
+
var sheetContentVariants = (0, import_class_variance_authority4.cva)(
|
|
3061
|
+
cn(
|
|
3062
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
3063
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-[70] flex flex-col gap-4 shadow-card-elevated transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500"
|
|
3064
|
+
),
|
|
3065
|
+
{
|
|
3066
|
+
variants: {
|
|
3067
|
+
side: {
|
|
3068
|
+
top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b p-6",
|
|
3069
|
+
bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t p-6",
|
|
3070
|
+
left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r p-6 sm:max-w-sm",
|
|
3071
|
+
right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l p-6 sm:max-w-sm"
|
|
3072
|
+
}
|
|
3073
|
+
},
|
|
3074
|
+
defaultVariants: {
|
|
3075
|
+
side: "right"
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
);
|
|
3079
|
+
function SheetContent({
|
|
3080
|
+
className,
|
|
3081
|
+
children,
|
|
3082
|
+
side = "right",
|
|
3083
|
+
showCloseButton = true,
|
|
3084
|
+
...props
|
|
3085
|
+
}) {
|
|
3086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SheetPortal, { children: [
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SheetOverlay, {}),
|
|
3088
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3089
|
+
import_radix_ui24.Dialog.Content,
|
|
3090
|
+
{
|
|
3091
|
+
"data-slot": "sheet-content",
|
|
3092
|
+
className: cn(sheetContentVariants({ side }), className),
|
|
3093
|
+
...props,
|
|
3094
|
+
children: [
|
|
3095
|
+
children,
|
|
3096
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_radix_ui24.Dialog.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 transition-[opacity,background-color] hover:bg-ghost-fill-hover hover:opacity-100 focus:ring-2 focus:ring-foreground/10 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
3097
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.XIcon, { className: "size-4" }),
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "sr-only", children: "Close" })
|
|
3099
|
+
] }) : null
|
|
3100
|
+
]
|
|
3101
|
+
}
|
|
3102
|
+
)
|
|
3103
|
+
] });
|
|
3104
|
+
}
|
|
3105
|
+
function SheetHeader({ className, ...props }) {
|
|
3106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3107
|
+
"div",
|
|
3108
|
+
{
|
|
3109
|
+
"data-slot": "sheet-header",
|
|
3110
|
+
className: cn("flex flex-col gap-1.5 p-0", className),
|
|
3111
|
+
...props
|
|
3112
|
+
}
|
|
3113
|
+
);
|
|
3114
|
+
}
|
|
3115
|
+
function SheetFooter({ className, ...props }) {
|
|
3116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3117
|
+
"div",
|
|
3118
|
+
{
|
|
3119
|
+
"data-slot": "sheet-footer",
|
|
3120
|
+
className: cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end", className),
|
|
3121
|
+
...props
|
|
3122
|
+
}
|
|
3123
|
+
);
|
|
3124
|
+
}
|
|
3125
|
+
function SheetTitle({
|
|
3126
|
+
className,
|
|
3127
|
+
...props
|
|
3128
|
+
}) {
|
|
3129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3130
|
+
import_radix_ui24.Dialog.Title,
|
|
3131
|
+
{
|
|
3132
|
+
"data-slot": "sheet-title",
|
|
3133
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
3134
|
+
...props
|
|
3135
|
+
}
|
|
3136
|
+
);
|
|
3137
|
+
}
|
|
3138
|
+
function SheetDescription({
|
|
3139
|
+
className,
|
|
3140
|
+
...props
|
|
3141
|
+
}) {
|
|
3142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3143
|
+
import_radix_ui24.Dialog.Description,
|
|
3144
|
+
{
|
|
3145
|
+
"data-slot": "sheet-description",
|
|
3146
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3147
|
+
...props
|
|
3148
|
+
}
|
|
3149
|
+
);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
// src/ui/alert-dialog.tsx
|
|
3153
|
+
var import_radix_ui25 = require("radix-ui");
|
|
3154
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3155
|
+
function AlertDialog({
|
|
3156
|
+
...props
|
|
3157
|
+
}) {
|
|
3158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui25.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
3159
|
+
}
|
|
3160
|
+
function AlertDialogTrigger({
|
|
3161
|
+
...props
|
|
3162
|
+
}) {
|
|
3163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui25.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
3164
|
+
}
|
|
3165
|
+
function AlertDialogPortal({
|
|
3166
|
+
...props
|
|
3167
|
+
}) {
|
|
3168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui25.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
3169
|
+
}
|
|
3170
|
+
function AlertDialogOverlay({
|
|
3171
|
+
className,
|
|
3172
|
+
...props
|
|
3173
|
+
}) {
|
|
3174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3175
|
+
import_radix_ui25.AlertDialog.Overlay,
|
|
3176
|
+
{
|
|
3177
|
+
"data-slot": "alert-dialog-overlay",
|
|
3178
|
+
className: cn(
|
|
3179
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[70] bg-black/50",
|
|
3180
|
+
className
|
|
3181
|
+
),
|
|
3182
|
+
...props
|
|
3183
|
+
}
|
|
3184
|
+
);
|
|
3185
|
+
}
|
|
3186
|
+
function AlertDialogContent({
|
|
3187
|
+
className,
|
|
3188
|
+
...props
|
|
3189
|
+
}) {
|
|
3190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(AlertDialogPortal, { children: [
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AlertDialogOverlay, {}),
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3193
|
+
import_radix_ui25.AlertDialog.Content,
|
|
3194
|
+
{
|
|
3195
|
+
"data-slot": "alert-dialog-content",
|
|
3196
|
+
className: cn(
|
|
3197
|
+
TIMBAL_V2_MODAL_SURFACE,
|
|
3198
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl p-6 duration-200 outline-none sm:max-w-lg",
|
|
3199
|
+
className
|
|
3200
|
+
),
|
|
3201
|
+
...props
|
|
3202
|
+
}
|
|
3203
|
+
)
|
|
3204
|
+
] });
|
|
3205
|
+
}
|
|
3206
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
3207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3208
|
+
"div",
|
|
3209
|
+
{
|
|
3210
|
+
"data-slot": "alert-dialog-header",
|
|
3211
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
3212
|
+
...props
|
|
3213
|
+
}
|
|
3214
|
+
);
|
|
3215
|
+
}
|
|
3216
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
3217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3218
|
+
"div",
|
|
3219
|
+
{
|
|
3220
|
+
"data-slot": "alert-dialog-footer",
|
|
3221
|
+
className: cn(
|
|
3222
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
3223
|
+
className
|
|
3224
|
+
),
|
|
3225
|
+
...props
|
|
3226
|
+
}
|
|
3227
|
+
);
|
|
3228
|
+
}
|
|
3229
|
+
function AlertDialogTitle({
|
|
3230
|
+
className,
|
|
3231
|
+
...props
|
|
3232
|
+
}) {
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3234
|
+
import_radix_ui25.AlertDialog.Title,
|
|
3235
|
+
{
|
|
3236
|
+
"data-slot": "alert-dialog-title",
|
|
3237
|
+
className: cn("text-lg font-semibold", className),
|
|
3238
|
+
...props
|
|
3239
|
+
}
|
|
3240
|
+
);
|
|
3241
|
+
}
|
|
3242
|
+
function AlertDialogDescription({
|
|
3243
|
+
className,
|
|
3244
|
+
...props
|
|
3245
|
+
}) {
|
|
3246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3247
|
+
import_radix_ui25.AlertDialog.Description,
|
|
3248
|
+
{
|
|
3249
|
+
"data-slot": "alert-dialog-description",
|
|
3250
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3251
|
+
...props
|
|
3252
|
+
}
|
|
3253
|
+
);
|
|
3254
|
+
}
|
|
3255
|
+
function AlertDialogAction({
|
|
3256
|
+
className,
|
|
3257
|
+
...props
|
|
3258
|
+
}) {
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3260
|
+
import_radix_ui25.AlertDialog.Action,
|
|
3261
|
+
{
|
|
3262
|
+
"data-slot": "alert-dialog-action",
|
|
3263
|
+
className,
|
|
3264
|
+
...props
|
|
3265
|
+
}
|
|
3266
|
+
) });
|
|
3267
|
+
}
|
|
3268
|
+
function AlertDialogCancel({
|
|
3269
|
+
className,
|
|
3270
|
+
...props
|
|
3271
|
+
}) {
|
|
3272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3273
|
+
import_radix_ui25.AlertDialog.Cancel,
|
|
3274
|
+
{
|
|
3275
|
+
"data-slot": "alert-dialog-cancel",
|
|
3276
|
+
className,
|
|
3277
|
+
...props
|
|
3278
|
+
}
|
|
3279
|
+
) });
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
// src/ui/collapsible.tsx
|
|
3283
|
+
var import_radix_ui26 = require("radix-ui");
|
|
3284
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3285
|
+
function Collapsible({
|
|
3286
|
+
...props
|
|
3287
|
+
}) {
|
|
3288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_radix_ui26.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
3289
|
+
}
|
|
3290
|
+
function CollapsibleTrigger({
|
|
3291
|
+
...props
|
|
3292
|
+
}) {
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_radix_ui26.Collapsible.Trigger, { "data-slot": "collapsible-trigger", ...props });
|
|
3294
|
+
}
|
|
3295
|
+
function CollapsibleContent({
|
|
3296
|
+
className,
|
|
3297
|
+
...props
|
|
3298
|
+
}) {
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3300
|
+
import_radix_ui26.Collapsible.Content,
|
|
3301
|
+
{
|
|
3302
|
+
"data-slot": "collapsible-content",
|
|
3303
|
+
className: cn(
|
|
3304
|
+
"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
|
|
3305
|
+
className
|
|
3306
|
+
),
|
|
3307
|
+
...props
|
|
3308
|
+
}
|
|
3309
|
+
);
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
// src/ui/scroll-area.tsx
|
|
3313
|
+
var import_radix_ui27 = require("radix-ui");
|
|
3314
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3315
|
+
function ScrollArea({
|
|
3316
|
+
className,
|
|
3317
|
+
children,
|
|
3318
|
+
...props
|
|
3319
|
+
}) {
|
|
3320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3321
|
+
import_radix_ui27.ScrollArea.Root,
|
|
3322
|
+
{
|
|
3323
|
+
"data-slot": "scroll-area",
|
|
3324
|
+
className: cn("relative overflow-hidden", className),
|
|
3325
|
+
...props,
|
|
3326
|
+
children: [
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3328
|
+
import_radix_ui27.ScrollArea.Viewport,
|
|
3329
|
+
{
|
|
3330
|
+
"data-slot": "scroll-area-viewport",
|
|
3331
|
+
className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-2 focus-visible:ring-foreground/10",
|
|
3332
|
+
children
|
|
3333
|
+
}
|
|
3334
|
+
),
|
|
3335
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ScrollBar, {}),
|
|
3336
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_radix_ui27.ScrollArea.Corner, {})
|
|
3337
|
+
]
|
|
3338
|
+
}
|
|
3339
|
+
);
|
|
3340
|
+
}
|
|
3341
|
+
function ScrollBar({
|
|
3342
|
+
className,
|
|
3343
|
+
orientation = "vertical",
|
|
3344
|
+
...props
|
|
3345
|
+
}) {
|
|
3346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3347
|
+
import_radix_ui27.ScrollArea.ScrollAreaScrollbar,
|
|
3348
|
+
{
|
|
3349
|
+
"data-slot": "scroll-area-scrollbar",
|
|
3350
|
+
orientation,
|
|
3351
|
+
className: cn(
|
|
3352
|
+
"flex touch-none p-px transition-colors select-none",
|
|
3353
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
3354
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
3355
|
+
className
|
|
3356
|
+
),
|
|
3357
|
+
...props,
|
|
3358
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3359
|
+
import_radix_ui27.ScrollArea.ScrollAreaThumb,
|
|
3360
|
+
{
|
|
3361
|
+
"data-slot": "scroll-area-thumb",
|
|
3362
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
3363
|
+
}
|
|
3364
|
+
)
|
|
3365
|
+
}
|
|
3366
|
+
);
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
// src/ui/toggle.tsx
|
|
3370
|
+
var import_radix_ui28 = require("radix-ui");
|
|
3371
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3372
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3373
|
+
var toggleVariants = (0, import_class_variance_authority5.cva)(
|
|
3374
|
+
"inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-none transition-[color,box-shadow,background-color,border-color] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
3375
|
+
{
|
|
3376
|
+
variants: {
|
|
3377
|
+
variant: {
|
|
3378
|
+
default: cn(
|
|
3379
|
+
"border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card",
|
|
3380
|
+
"hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to",
|
|
3381
|
+
"data-[state=on]:border-foreground/15 data-[state=on]:from-primary-fill-from data-[state=on]:to-primary-fill-to data-[state=on]:text-primary-foreground",
|
|
3382
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
3383
|
+
),
|
|
3384
|
+
outline: cn(
|
|
3385
|
+
"border border-border bg-transparent",
|
|
3386
|
+
"hover:bg-muted hover:text-foreground",
|
|
3387
|
+
"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
3388
|
+
"focus-visible:ring-2 focus-visible:ring-foreground/10"
|
|
3389
|
+
)
|
|
3390
|
+
},
|
|
3391
|
+
size: {
|
|
3392
|
+
default: "h-10 px-3 min-w-10",
|
|
3393
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
3394
|
+
lg: "h-11 px-5 min-w-11"
|
|
3395
|
+
}
|
|
3396
|
+
},
|
|
3397
|
+
defaultVariants: {
|
|
3398
|
+
variant: "default",
|
|
3399
|
+
size: "default"
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
);
|
|
3403
|
+
function Toggle({
|
|
3404
|
+
className,
|
|
3405
|
+
variant,
|
|
3406
|
+
size,
|
|
3407
|
+
...props
|
|
3408
|
+
}) {
|
|
3409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3410
|
+
import_radix_ui28.Toggle.Root,
|
|
3411
|
+
{
|
|
3412
|
+
"data-slot": "toggle",
|
|
3413
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
3414
|
+
...props
|
|
3415
|
+
}
|
|
3416
|
+
);
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
// src/ui/toggle-group.tsx
|
|
3420
|
+
var import_radix_ui29 = require("radix-ui");
|
|
3421
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3422
|
+
function ToggleGroup({
|
|
3423
|
+
className,
|
|
3424
|
+
...props
|
|
3425
|
+
}) {
|
|
3426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3427
|
+
import_radix_ui29.ToggleGroup.Root,
|
|
3428
|
+
{
|
|
3429
|
+
"data-slot": "toggle-group",
|
|
3430
|
+
className: cn("flex items-center gap-1", className),
|
|
3431
|
+
...props
|
|
3432
|
+
}
|
|
3433
|
+
);
|
|
3434
|
+
}
|
|
3435
|
+
function ToggleGroupItem({
|
|
3436
|
+
className,
|
|
3437
|
+
...props
|
|
3438
|
+
}) {
|
|
3439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3440
|
+
import_radix_ui29.ToggleGroup.Item,
|
|
3441
|
+
{
|
|
3442
|
+
"data-slot": "toggle-group-item",
|
|
3443
|
+
className: cn(toggleVariants({ variant: "default", size: "default" }), className),
|
|
3444
|
+
...props
|
|
3445
|
+
}
|
|
3446
|
+
);
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
// src/ui/hover-card.tsx
|
|
3450
|
+
var import_radix_ui30 = require("radix-ui");
|
|
3451
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3452
|
+
function HoverCard({
|
|
3453
|
+
...props
|
|
3454
|
+
}) {
|
|
3455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui30.HoverCard.Root, { "data-slot": "hover-card", ...props });
|
|
3456
|
+
}
|
|
3457
|
+
function HoverCardTrigger({
|
|
3458
|
+
...props
|
|
3459
|
+
}) {
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui30.HoverCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
3461
|
+
}
|
|
3462
|
+
function HoverCardContent({
|
|
3463
|
+
className,
|
|
3464
|
+
align = "center",
|
|
3465
|
+
sideOffset = 4,
|
|
3466
|
+
...props
|
|
3467
|
+
}) {
|
|
3468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui30.HoverCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3469
|
+
import_radix_ui30.HoverCard.Content,
|
|
3470
|
+
{
|
|
3471
|
+
"data-slot": "hover-card-content",
|
|
3472
|
+
align,
|
|
3473
|
+
sideOffset,
|
|
3474
|
+
className: cn(
|
|
3475
|
+
overlaySurfaceClass,
|
|
3476
|
+
"w-64 origin-[var(--radix-hover-card-content-transform-origin)] rounded-xl p-4 outline-hidden",
|
|
3477
|
+
className
|
|
3478
|
+
),
|
|
3479
|
+
...props
|
|
3480
|
+
}
|
|
3481
|
+
) });
|
|
3482
|
+
}
|
|
3483
|
+
|
|
3484
|
+
// src/ui/context-menu.tsx
|
|
3485
|
+
var import_radix_ui31 = require("radix-ui");
|
|
3486
|
+
var import_lucide_react17 = require("lucide-react");
|
|
3487
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3488
|
+
function ContextMenu({
|
|
3489
|
+
...props
|
|
3490
|
+
}) {
|
|
3491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
3492
|
+
}
|
|
3493
|
+
function ContextMenuTrigger({
|
|
3494
|
+
...props
|
|
3495
|
+
}) {
|
|
3496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
3497
|
+
}
|
|
3498
|
+
function ContextMenuGroup({
|
|
3499
|
+
...props
|
|
3500
|
+
}) {
|
|
3501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.Group, { "data-slot": "context-menu-group", ...props });
|
|
3502
|
+
}
|
|
3503
|
+
function ContextMenuContent({
|
|
3504
|
+
className,
|
|
3505
|
+
...props
|
|
3506
|
+
}) {
|
|
3507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3508
|
+
import_radix_ui31.ContextMenu.Content,
|
|
3509
|
+
{
|
|
3510
|
+
"data-slot": "context-menu-content",
|
|
3511
|
+
className: cn(
|
|
3512
|
+
overlaySurfaceClass,
|
|
3513
|
+
"max-h-[var(--radix-context-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-lg p-1",
|
|
3514
|
+
className
|
|
3515
|
+
),
|
|
3516
|
+
...props
|
|
3517
|
+
}
|
|
3518
|
+
) });
|
|
3519
|
+
}
|
|
3520
|
+
function ContextMenuItem({
|
|
3521
|
+
className,
|
|
3522
|
+
inset,
|
|
3523
|
+
variant = "default",
|
|
3524
|
+
...props
|
|
3525
|
+
}) {
|
|
3526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3527
|
+
import_radix_ui31.ContextMenu.Item,
|
|
3528
|
+
{
|
|
3529
|
+
"data-slot": "context-menu-item",
|
|
3530
|
+
"data-inset": inset,
|
|
3531
|
+
"data-variant": variant,
|
|
3532
|
+
className: cn(
|
|
3533
|
+
overlayItemClass,
|
|
3534
|
+
"data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
|
|
3535
|
+
className
|
|
3536
|
+
),
|
|
3537
|
+
...props
|
|
3538
|
+
}
|
|
3539
|
+
);
|
|
3540
|
+
}
|
|
3541
|
+
function ContextMenuCheckboxItem({
|
|
3542
|
+
className,
|
|
3543
|
+
children,
|
|
3544
|
+
checked,
|
|
3545
|
+
...props
|
|
3546
|
+
}) {
|
|
3547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3548
|
+
import_radix_ui31.ContextMenu.CheckboxItem,
|
|
3549
|
+
{
|
|
3550
|
+
"data-slot": "context-menu-checkbox-item",
|
|
3551
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
3552
|
+
checked,
|
|
3553
|
+
...props,
|
|
3554
|
+
children: [
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react17.CheckIcon, { className: "size-4" }) }) }),
|
|
3556
|
+
children
|
|
3557
|
+
]
|
|
3558
|
+
}
|
|
3559
|
+
);
|
|
3560
|
+
}
|
|
3561
|
+
function ContextMenuRadioGroup({
|
|
3562
|
+
...props
|
|
3563
|
+
}) {
|
|
3564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3565
|
+
import_radix_ui31.ContextMenu.RadioGroup,
|
|
3566
|
+
{
|
|
3567
|
+
"data-slot": "context-menu-radio-group",
|
|
3568
|
+
...props
|
|
3569
|
+
}
|
|
3570
|
+
);
|
|
3571
|
+
}
|
|
3572
|
+
function ContextMenuRadioItem({
|
|
3573
|
+
className,
|
|
3574
|
+
children,
|
|
3575
|
+
...props
|
|
3576
|
+
}) {
|
|
3577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3578
|
+
import_radix_ui31.ContextMenu.RadioItem,
|
|
3579
|
+
{
|
|
3580
|
+
"data-slot": "context-menu-radio-item",
|
|
3581
|
+
className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
|
|
3582
|
+
...props,
|
|
3583
|
+
children: [
|
|
3584
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react17.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
3585
|
+
children
|
|
3586
|
+
]
|
|
3587
|
+
}
|
|
3588
|
+
);
|
|
3589
|
+
}
|
|
3590
|
+
function ContextMenuLabel({
|
|
3591
|
+
className,
|
|
3592
|
+
inset,
|
|
3593
|
+
...props
|
|
3594
|
+
}) {
|
|
3595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3596
|
+
import_radix_ui31.ContextMenu.Label,
|
|
3597
|
+
{
|
|
3598
|
+
"data-slot": "context-menu-label",
|
|
3599
|
+
"data-inset": inset,
|
|
3600
|
+
className: cn(
|
|
3601
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
|
|
3602
|
+
className
|
|
3603
|
+
),
|
|
3604
|
+
...props
|
|
3605
|
+
}
|
|
3606
|
+
);
|
|
3607
|
+
}
|
|
3608
|
+
function ContextMenuSeparator({
|
|
3609
|
+
className,
|
|
3610
|
+
...props
|
|
3611
|
+
}) {
|
|
3612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3613
|
+
import_radix_ui31.ContextMenu.Separator,
|
|
3614
|
+
{
|
|
3615
|
+
"data-slot": "context-menu-separator",
|
|
3616
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
3617
|
+
...props
|
|
3618
|
+
}
|
|
3619
|
+
);
|
|
3620
|
+
}
|
|
3621
|
+
function ContextMenuShortcut({
|
|
3622
|
+
className,
|
|
3623
|
+
...props
|
|
3624
|
+
}) {
|
|
3625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3626
|
+
"span",
|
|
3627
|
+
{
|
|
3628
|
+
"data-slot": "context-menu-shortcut",
|
|
3629
|
+
className: cn(
|
|
3630
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
3631
|
+
className
|
|
3632
|
+
),
|
|
3633
|
+
...props
|
|
3634
|
+
}
|
|
3635
|
+
);
|
|
3636
|
+
}
|
|
3637
|
+
function ContextMenuSub({
|
|
3638
|
+
...props
|
|
3639
|
+
}) {
|
|
3640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui31.ContextMenu.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
3641
|
+
}
|
|
3642
|
+
function ContextMenuSubTrigger({
|
|
3643
|
+
className,
|
|
3644
|
+
inset,
|
|
3645
|
+
children,
|
|
3646
|
+
...props
|
|
3647
|
+
}) {
|
|
3648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3649
|
+
import_radix_ui31.ContextMenu.SubTrigger,
|
|
3650
|
+
{
|
|
3651
|
+
"data-slot": "context-menu-sub-trigger",
|
|
3652
|
+
"data-inset": inset,
|
|
3653
|
+
className: cn(
|
|
3654
|
+
overlayItemClass,
|
|
3655
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
|
|
3656
|
+
className
|
|
3657
|
+
),
|
|
3658
|
+
...props,
|
|
3659
|
+
children: [
|
|
3660
|
+
children,
|
|
3661
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react17.ChevronRightIcon, { className: "ml-auto size-4" })
|
|
3662
|
+
]
|
|
3663
|
+
}
|
|
3664
|
+
);
|
|
3665
|
+
}
|
|
3666
|
+
function ContextMenuSubContent({
|
|
3667
|
+
className,
|
|
3668
|
+
...props
|
|
3669
|
+
}) {
|
|
3670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3671
|
+
import_radix_ui31.ContextMenu.SubContent,
|
|
3672
|
+
{
|
|
3673
|
+
"data-slot": "context-menu-sub-content",
|
|
3674
|
+
className: cn(
|
|
3675
|
+
overlaySurfaceClass,
|
|
3676
|
+
"min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-lg p-1",
|
|
3677
|
+
className
|
|
3678
|
+
),
|
|
3679
|
+
...props
|
|
3680
|
+
}
|
|
3681
|
+
);
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
// src/ui/alert.tsx
|
|
3685
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3686
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3687
|
+
var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
3688
|
+
"relative grid w-full gap-1 rounded-xl border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:top-3.5 [&>svg]:left-4 [&>svg]:size-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11",
|
|
3689
|
+
{
|
|
3690
|
+
variants: {
|
|
3691
|
+
variant: {
|
|
3692
|
+
default: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
|
|
3693
|
+
destructive: "border-destructive/45 bg-destructive/10 text-destructive [&>svg]:text-destructive"
|
|
3694
|
+
}
|
|
3695
|
+
},
|
|
3696
|
+
defaultVariants: {
|
|
3697
|
+
variant: "default"
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
);
|
|
3701
|
+
function Alert({
|
|
3702
|
+
className,
|
|
3703
|
+
variant,
|
|
3704
|
+
...props
|
|
3705
|
+
}) {
|
|
3706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3707
|
+
"div",
|
|
3708
|
+
{
|
|
3709
|
+
"data-slot": "alert",
|
|
3710
|
+
role: "alert",
|
|
3711
|
+
className: cn(alertVariants({ variant }), className),
|
|
3712
|
+
...props
|
|
3713
|
+
}
|
|
3714
|
+
);
|
|
3715
|
+
}
|
|
3716
|
+
function AlertTitle({ className, ...props }) {
|
|
3717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3718
|
+
"div",
|
|
3719
|
+
{
|
|
3720
|
+
"data-slot": "alert-title",
|
|
3721
|
+
className: cn("font-medium tracking-tight", className),
|
|
3722
|
+
...props
|
|
3723
|
+
}
|
|
3724
|
+
);
|
|
3725
|
+
}
|
|
3726
|
+
function AlertDescription({ className, ...props }) {
|
|
3727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3728
|
+
"div",
|
|
3729
|
+
{
|
|
3730
|
+
"data-slot": "alert-description",
|
|
3731
|
+
className: cn("text-sm text-muted-foreground [&_p]:leading-relaxed", className),
|
|
3732
|
+
...props
|
|
3733
|
+
}
|
|
3734
|
+
);
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
// src/ui/card.tsx
|
|
3738
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3739
|
+
function Card({ className, ...props }) {
|
|
3740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3741
|
+
"div",
|
|
3742
|
+
{
|
|
3743
|
+
"data-slot": "card",
|
|
3744
|
+
className: cn(
|
|
3745
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
3746
|
+
"flex flex-col gap-4 rounded-xl py-4 text-card-foreground",
|
|
3747
|
+
className
|
|
3748
|
+
),
|
|
3749
|
+
...props
|
|
3750
|
+
}
|
|
3751
|
+
);
|
|
3752
|
+
}
|
|
3753
|
+
function CardHeader({ className, ...props }) {
|
|
3754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3755
|
+
"div",
|
|
3756
|
+
{
|
|
3757
|
+
"data-slot": "card-header",
|
|
3758
|
+
className: cn("flex flex-col gap-1.5 px-4", className),
|
|
3759
|
+
...props
|
|
3760
|
+
}
|
|
3761
|
+
);
|
|
3762
|
+
}
|
|
3763
|
+
function CardTitle({ className, ...props }) {
|
|
3764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3765
|
+
"div",
|
|
3766
|
+
{
|
|
3767
|
+
"data-slot": "card-title",
|
|
3768
|
+
className: cn("text-base font-semibold leading-none", className),
|
|
3769
|
+
...props
|
|
3770
|
+
}
|
|
3771
|
+
);
|
|
3772
|
+
}
|
|
3773
|
+
function CardDescription({ className, ...props }) {
|
|
3774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3775
|
+
"div",
|
|
3776
|
+
{
|
|
3777
|
+
"data-slot": "card-description",
|
|
3778
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3779
|
+
...props
|
|
3780
|
+
}
|
|
3781
|
+
);
|
|
3782
|
+
}
|
|
3783
|
+
function CardContent({ className, ...props }) {
|
|
3784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { "data-slot": "card-content", className: cn("px-4", className), ...props });
|
|
3785
|
+
}
|
|
3786
|
+
function CardFooter({ className, ...props }) {
|
|
3787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3788
|
+
"div",
|
|
3789
|
+
{
|
|
3790
|
+
"data-slot": "card-footer",
|
|
3791
|
+
className: cn("flex items-center px-4", className),
|
|
3792
|
+
...props
|
|
3793
|
+
}
|
|
3794
|
+
);
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3797
|
+
// src/ui/skeleton.tsx
|
|
3798
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3799
|
+
function Skeleton({ className, ...props }) {
|
|
3800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3801
|
+
"div",
|
|
3802
|
+
{
|
|
3803
|
+
"data-slot": "skeleton",
|
|
3804
|
+
className: cn("animate-pulse rounded-lg bg-muted", className),
|
|
3805
|
+
...props
|
|
3806
|
+
}
|
|
3807
|
+
);
|
|
3808
|
+
}
|
|
3809
|
+
|
|
3810
|
+
// src/ui/table.tsx
|
|
3811
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3812
|
+
function Table({ className, ...props }) {
|
|
3813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3814
|
+
"table",
|
|
3815
|
+
{
|
|
3816
|
+
"data-slot": "table",
|
|
3817
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
3818
|
+
...props
|
|
3819
|
+
}
|
|
3820
|
+
) });
|
|
3821
|
+
}
|
|
3822
|
+
function TableHeader({ className, ...props }) {
|
|
3823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3824
|
+
"thead",
|
|
3825
|
+
{
|
|
3826
|
+
"data-slot": "table-header",
|
|
3827
|
+
className: cn("[&_tr]:border-b [&_tr]:border-border", className),
|
|
3828
|
+
...props
|
|
3829
|
+
}
|
|
3830
|
+
);
|
|
3831
|
+
}
|
|
3832
|
+
function TableBody({ className, ...props }) {
|
|
3833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3834
|
+
"tbody",
|
|
3835
|
+
{
|
|
3836
|
+
"data-slot": "table-body",
|
|
3837
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
3838
|
+
...props
|
|
3839
|
+
}
|
|
3840
|
+
);
|
|
3841
|
+
}
|
|
3842
|
+
function TableFooter({ className, ...props }) {
|
|
3843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3844
|
+
"tfoot",
|
|
3845
|
+
{
|
|
3846
|
+
"data-slot": "table-footer",
|
|
3847
|
+
className: cn(
|
|
3848
|
+
"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
3849
|
+
className
|
|
3850
|
+
),
|
|
3851
|
+
...props
|
|
3852
|
+
}
|
|
3853
|
+
);
|
|
3854
|
+
}
|
|
3855
|
+
function TableRow({ className, ...props }) {
|
|
3856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3857
|
+
"tr",
|
|
3858
|
+
{
|
|
3859
|
+
"data-slot": "table-row",
|
|
3860
|
+
className: cn(
|
|
3861
|
+
"border-b border-border transition-colors hover:bg-muted/40 data-[state=selected]:bg-muted",
|
|
3862
|
+
className
|
|
3863
|
+
),
|
|
3864
|
+
...props
|
|
3865
|
+
}
|
|
3866
|
+
);
|
|
3867
|
+
}
|
|
3868
|
+
function TableHead({ className, ...props }) {
|
|
3869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3870
|
+
"th",
|
|
3871
|
+
{
|
|
3872
|
+
"data-slot": "table-head",
|
|
3873
|
+
className: cn(
|
|
3874
|
+
"h-10 px-3 text-left align-middle text-xs font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
3875
|
+
className
|
|
3876
|
+
),
|
|
3877
|
+
...props
|
|
3878
|
+
}
|
|
3879
|
+
);
|
|
3880
|
+
}
|
|
3881
|
+
function TableCell({ className, ...props }) {
|
|
3882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3883
|
+
"td",
|
|
3884
|
+
{
|
|
3885
|
+
"data-slot": "table-cell",
|
|
3886
|
+
className: cn(
|
|
3887
|
+
"p-3 align-middle text-sm [&:has([role=checkbox])]:pr-0",
|
|
3888
|
+
className
|
|
3889
|
+
),
|
|
3890
|
+
...props
|
|
3891
|
+
}
|
|
3892
|
+
);
|
|
3893
|
+
}
|
|
3894
|
+
function TableCaption({ className, ...props }) {
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3896
|
+
"caption",
|
|
3897
|
+
{
|
|
3898
|
+
"data-slot": "table-caption",
|
|
3899
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
3900
|
+
...props
|
|
3901
|
+
}
|
|
3902
|
+
);
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3905
|
+
// src/ui/toast.tsx
|
|
3906
|
+
var import_radix_ui32 = require("radix-ui");
|
|
3907
|
+
var import_lucide_react18 = require("lucide-react");
|
|
3908
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3909
|
+
function ToastProvider({
|
|
3910
|
+
...props
|
|
3911
|
+
}) {
|
|
3912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_radix_ui32.Toast.Provider, { "data-slot": "toast-provider", ...props });
|
|
3913
|
+
}
|
|
3914
|
+
function ToastViewport({
|
|
3915
|
+
className,
|
|
3916
|
+
...props
|
|
3917
|
+
}) {
|
|
3918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3919
|
+
import_radix_ui32.Toast.Viewport,
|
|
3920
|
+
{
|
|
3921
|
+
"data-slot": "toast-viewport",
|
|
3922
|
+
className: cn(
|
|
3923
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:max-w-[420px] sm:flex-col",
|
|
3924
|
+
className
|
|
3925
|
+
),
|
|
3926
|
+
...props
|
|
3927
|
+
}
|
|
3928
|
+
);
|
|
3929
|
+
}
|
|
3930
|
+
function Toast({
|
|
3931
|
+
className,
|
|
3932
|
+
variant = "default",
|
|
3933
|
+
...props
|
|
3934
|
+
}) {
|
|
3935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3936
|
+
import_radix_ui32.Toast.Root,
|
|
3937
|
+
{
|
|
3938
|
+
"data-slot": "toast",
|
|
3939
|
+
className: cn(
|
|
3940
|
+
TIMBAL_V2_ELEVATED_SURFACE,
|
|
3941
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-xl p-4 pr-8 shadow-card-elevated transition-all",
|
|
3942
|
+
"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full",
|
|
3943
|
+
variant === "destructive" && "border-destructive/45 bg-destructive/10 text-destructive",
|
|
3944
|
+
className
|
|
3945
|
+
),
|
|
3946
|
+
...props
|
|
3947
|
+
}
|
|
3948
|
+
);
|
|
3949
|
+
}
|
|
3950
|
+
function ToastAction({
|
|
3951
|
+
className,
|
|
3952
|
+
...props
|
|
3953
|
+
}) {
|
|
3954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3955
|
+
import_radix_ui32.Toast.Action,
|
|
3956
|
+
{
|
|
3957
|
+
"data-slot": "toast-action",
|
|
3958
|
+
className: cn(
|
|
3959
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-lg border border-border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-muted focus:ring-2 focus:ring-foreground/10 focus:outline-hidden disabled:pointer-events-none disabled:opacity-50",
|
|
3960
|
+
className
|
|
3961
|
+
),
|
|
3962
|
+
...props
|
|
3963
|
+
}
|
|
3964
|
+
);
|
|
3965
|
+
}
|
|
3966
|
+
function ToastClose({
|
|
3967
|
+
className,
|
|
3968
|
+
...props
|
|
3969
|
+
}) {
|
|
3970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3971
|
+
import_radix_ui32.Toast.Close,
|
|
3972
|
+
{
|
|
3973
|
+
"data-slot": "toast-close",
|
|
3974
|
+
className: cn(
|
|
3975
|
+
"absolute top-3 right-3 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-foreground/10 focus:outline-hidden",
|
|
3976
|
+
className
|
|
3977
|
+
),
|
|
3978
|
+
"toast-close": "",
|
|
3979
|
+
...props,
|
|
3980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react18.XIcon, { className: "size-4" })
|
|
3981
|
+
}
|
|
3982
|
+
);
|
|
3983
|
+
}
|
|
3984
|
+
function ToastTitle({
|
|
3985
|
+
className,
|
|
3986
|
+
...props
|
|
3987
|
+
}) {
|
|
3988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3989
|
+
import_radix_ui32.Toast.Title,
|
|
3990
|
+
{
|
|
3991
|
+
"data-slot": "toast-title",
|
|
3992
|
+
className: cn("text-sm font-medium", className),
|
|
3993
|
+
...props
|
|
3994
|
+
}
|
|
3995
|
+
);
|
|
3996
|
+
}
|
|
3997
|
+
function ToastDescription({
|
|
3998
|
+
className,
|
|
3999
|
+
...props
|
|
4000
|
+
}) {
|
|
4001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4002
|
+
import_radix_ui32.Toast.Description,
|
|
4003
|
+
{
|
|
4004
|
+
"data-slot": "toast-description",
|
|
4005
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
4006
|
+
...props
|
|
4007
|
+
}
|
|
4008
|
+
);
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
// src/ui/use-toast.ts
|
|
4012
|
+
var React4 = __toESM(require("react"), 1);
|
|
4013
|
+
var TOAST_LIMIT = 3;
|
|
4014
|
+
var TOAST_REMOVE_DELAY = 5e3;
|
|
4015
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
4016
|
+
var memoryState = {
|
|
4017
|
+
toasts: [],
|
|
4018
|
+
add: () => "",
|
|
4019
|
+
dismiss: () => {
|
|
4020
|
+
},
|
|
4021
|
+
remove: () => {
|
|
4022
|
+
}
|
|
4023
|
+
};
|
|
4024
|
+
function dispatch(partial) {
|
|
4025
|
+
memoryState = { ...memoryState, ...partial };
|
|
4026
|
+
for (const listener of listeners) listener(memoryState);
|
|
4027
|
+
}
|
|
4028
|
+
function genId() {
|
|
4029
|
+
return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
4030
|
+
}
|
|
4031
|
+
var removeTimeouts = /* @__PURE__ */ new Map();
|
|
4032
|
+
function scheduleRemove(id, delay = TOAST_REMOVE_DELAY) {
|
|
4033
|
+
if (removeTimeouts.has(id)) return;
|
|
4034
|
+
const timeout = setTimeout(() => {
|
|
4035
|
+
removeTimeouts.delete(id);
|
|
4036
|
+
dispatch({
|
|
4037
|
+
toasts: memoryState.toasts.filter((t) => t.id !== id)
|
|
4038
|
+
});
|
|
4039
|
+
}, delay);
|
|
4040
|
+
removeTimeouts.set(id, timeout);
|
|
4041
|
+
}
|
|
4042
|
+
function addToast(toastInput) {
|
|
4043
|
+
const id = genId();
|
|
4044
|
+
dispatch({
|
|
4045
|
+
toasts: [{ ...toastInput, id }, ...memoryState.toasts].slice(0, TOAST_LIMIT)
|
|
4046
|
+
});
|
|
4047
|
+
scheduleRemove(id, toastInput.duration ?? TOAST_REMOVE_DELAY);
|
|
4048
|
+
return id;
|
|
4049
|
+
}
|
|
4050
|
+
function dismissToast(id) {
|
|
4051
|
+
scheduleRemove(id, 300);
|
|
4052
|
+
}
|
|
4053
|
+
memoryState = {
|
|
4054
|
+
toasts: [],
|
|
4055
|
+
add: addToast,
|
|
4056
|
+
dismiss: dismissToast,
|
|
4057
|
+
remove: (id) => {
|
|
4058
|
+
dispatch({ toasts: memoryState.toasts.filter((t) => t.id !== id) });
|
|
4059
|
+
}
|
|
4060
|
+
};
|
|
4061
|
+
function toast(input) {
|
|
4062
|
+
return memoryState.add(input);
|
|
4063
|
+
}
|
|
4064
|
+
function useToast() {
|
|
4065
|
+
const [state, setState] = React4.useState(memoryState);
|
|
4066
|
+
React4.useEffect(() => {
|
|
4067
|
+
listeners.add(setState);
|
|
4068
|
+
return () => {
|
|
4069
|
+
listeners.delete(setState);
|
|
4070
|
+
};
|
|
4071
|
+
}, []);
|
|
4072
|
+
return {
|
|
4073
|
+
toasts: state.toasts,
|
|
4074
|
+
toast,
|
|
4075
|
+
dismiss: state.dismiss
|
|
4076
|
+
};
|
|
4077
|
+
}
|
|
4078
|
+
|
|
4079
|
+
// src/ui/toaster.tsx
|
|
4080
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4081
|
+
function Toaster() {
|
|
4082
|
+
const { toasts, dismiss } = useToast();
|
|
4083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ToastProvider, { children: [
|
|
4084
|
+
toasts.map(({ id, title, description, variant }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4085
|
+
Toast,
|
|
4086
|
+
{
|
|
4087
|
+
variant,
|
|
4088
|
+
onOpenChange: (open) => !open && dismiss(id),
|
|
4089
|
+
children: [
|
|
4090
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "grid gap-1", children: [
|
|
4091
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastTitle, { children: title }) : null,
|
|
4092
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastDescription, { children: description }) : null
|
|
4093
|
+
] }),
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastClose, {})
|
|
4095
|
+
]
|
|
4096
|
+
},
|
|
4097
|
+
id
|
|
4098
|
+
)),
|
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastViewport, {})
|
|
4100
|
+
] });
|
|
4101
|
+
}
|
|
4102
|
+
|
|
4103
|
+
// src/ui/shimmer.tsx
|
|
4104
|
+
var import_react = require("motion/react");
|
|
4105
|
+
var import_react2 = require("react");
|
|
4106
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4107
|
+
var ShimmerComponent = ({
|
|
4108
|
+
children,
|
|
4109
|
+
as: Component = "p",
|
|
4110
|
+
className,
|
|
4111
|
+
duration = 2,
|
|
4112
|
+
spread = 2
|
|
4113
|
+
}) => {
|
|
4114
|
+
const MotionComponent = import_react.motion.create(
|
|
4115
|
+
Component
|
|
4116
|
+
);
|
|
4117
|
+
const dynamicSpread = (0, import_react2.useMemo)(
|
|
4118
|
+
() => (children?.length ?? 0) * spread,
|
|
4119
|
+
[children, spread]
|
|
4120
|
+
);
|
|
4121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4122
|
+
MotionComponent,
|
|
4123
|
+
{
|
|
4124
|
+
animate: { backgroundPosition: "0% center" },
|
|
4125
|
+
className: cn(
|
|
4126
|
+
"relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
|
|
4127
|
+
"[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
|
|
4128
|
+
className
|
|
4129
|
+
),
|
|
4130
|
+
initial: { backgroundPosition: "100% center" },
|
|
4131
|
+
style: {
|
|
4132
|
+
"--spread": `${dynamicSpread}px`,
|
|
4133
|
+
backgroundImage: "var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"
|
|
4134
|
+
},
|
|
4135
|
+
transition: {
|
|
4136
|
+
repeat: Number.POSITIVE_INFINITY,
|
|
4137
|
+
duration,
|
|
4138
|
+
ease: "linear"
|
|
4139
|
+
},
|
|
4140
|
+
children
|
|
4141
|
+
}
|
|
4142
|
+
);
|
|
4143
|
+
};
|
|
4144
|
+
var Shimmer = (0, import_react2.memo)(ShimmerComponent);
|
|
4145
|
+
|
|
4146
|
+
// src/ui/pill-segmented-tabs.tsx
|
|
4147
|
+
var import_react3 = require("react");
|
|
4148
|
+
var import_react4 = require("motion/react");
|
|
4149
|
+
|
|
4150
|
+
// src/design/pill-segmented-classes.ts
|
|
4151
|
+
var pillSegmentedTrackBase = "inline-flex w-fit max-w-max shrink-0 self-start items-center rounded-full";
|
|
4152
|
+
var pillSegmentedTrackSurface = cn(
|
|
4153
|
+
"bg-pill-segmented-track border border-[var(--pill-segmented-track-border)]",
|
|
4154
|
+
"shadow-[var(--pill-segmented-track-shadow)]"
|
|
4155
|
+
);
|
|
4156
|
+
var pillSegmentedTrackClass = cn(
|
|
4157
|
+
pillSegmentedTrackBase,
|
|
4158
|
+
pillSegmentedTrackSurface,
|
|
4159
|
+
"gap-1 p-1"
|
|
4160
|
+
);
|
|
4161
|
+
var pillSegmentedTrackFlushClass = cn(
|
|
4162
|
+
pillSegmentedTrackBase,
|
|
4163
|
+
pillSegmentedTrackSurface,
|
|
4164
|
+
"h-[var(--studio-chrome-pill-height)] items-center gap-0.5 overflow-visible p-0.5"
|
|
4165
|
+
);
|
|
4166
|
+
var pillSegmentedSegmentClass = cn(
|
|
4167
|
+
"relative flex items-center gap-1.5 rounded-full px-4 py-1.5 text-xs font-normal transition-colors"
|
|
4168
|
+
);
|
|
4169
|
+
var pillSegmentedFlushSegmentClass = cn(
|
|
4170
|
+
"relative box-border inline-flex h-9 min-h-9 items-center justify-center gap-1.5 rounded-full px-3.5 py-0",
|
|
4171
|
+
"text-sm font-normal leading-tight transition-colors"
|
|
4172
|
+
);
|
|
4173
|
+
var pillSegmentedActiveIndicatorClass = cn(
|
|
4174
|
+
"absolute inset-0 rounded-full",
|
|
4175
|
+
"border border-[var(--pill-segmented-indicator-border)]",
|
|
4176
|
+
"bg-gradient-to-b from-[var(--pill-segmented-indicator-from)] to-[var(--pill-segmented-indicator-to)]",
|
|
4177
|
+
"shadow-[var(--pill-segmented-indicator-shadow)]"
|
|
4178
|
+
);
|
|
4179
|
+
|
|
4180
|
+
// src/ui/pill-segmented-tabs.tsx
|
|
4181
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1106
4182
|
var PillTab = ({
|
|
1107
4183
|
tabKey,
|
|
1108
4184
|
label,
|
|
@@ -1116,7 +4192,7 @@ var PillTab = ({
|
|
|
1116
4192
|
const handlePress = (0, import_react3.useCallback)(() => {
|
|
1117
4193
|
if (!disabled) onSelect(tabKey);
|
|
1118
4194
|
}, [disabled, onSelect, tabKey]);
|
|
1119
|
-
return /* @__PURE__ */ (0,
|
|
4195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
1120
4196
|
"button",
|
|
1121
4197
|
{
|
|
1122
4198
|
type: "button",
|
|
@@ -1129,15 +4205,15 @@ var PillTab = ({
|
|
|
1129
4205
|
!disabled && (isActive ? "text-foreground" : "text-muted-foreground hover:text-foreground")
|
|
1130
4206
|
),
|
|
1131
4207
|
children: [
|
|
1132
|
-
isActive && animateIndicator ? /* @__PURE__ */ (0,
|
|
4208
|
+
isActive && animateIndicator ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1133
4209
|
import_react4.motion.div,
|
|
1134
4210
|
{
|
|
1135
4211
|
layoutId,
|
|
1136
4212
|
className: pillSegmentedActiveIndicatorClass,
|
|
1137
4213
|
transition: { type: "spring", duration: 0.3, bounce: 0.15 }
|
|
1138
4214
|
}
|
|
1139
|
-
) : isActive ? /* @__PURE__ */ (0,
|
|
1140
|
-
/* @__PURE__ */ (0,
|
|
4215
|
+
) : isActive ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: pillSegmentedActiveIndicatorClass, "aria-hidden": true }) : null,
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "relative z-10 whitespace-nowrap", children: label })
|
|
1141
4217
|
]
|
|
1142
4218
|
}
|
|
1143
4219
|
);
|
|
@@ -1157,7 +4233,7 @@ var PillSegmentedTabs = ({
|
|
|
1157
4233
|
const isFlush = trackVariant === "flush";
|
|
1158
4234
|
const trackClass = isFlush ? pillSegmentedTrackFlushClass : pillSegmentedTrackClass;
|
|
1159
4235
|
const segmentClassName = isFlush ? pillSegmentedFlushSegmentClass : pillSegmentedSegmentClass;
|
|
1160
|
-
return /* @__PURE__ */ (0,
|
|
4236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { role: "group", "aria-label": ariaLabel, className: cn(trackClass, className), children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1161
4237
|
PillTab,
|
|
1162
4238
|
{
|
|
1163
4239
|
tabKey: tab.key,
|
|
@@ -1175,10 +4251,90 @@ var PillSegmentedTabs = ({
|
|
|
1175
4251
|
var MemoPillSegmentedTabs = (0, import_react3.memo)(PillSegmentedTabs);
|
|
1176
4252
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1177
4253
|
0 && (module.exports = {
|
|
4254
|
+
Accordion,
|
|
4255
|
+
AccordionContent,
|
|
4256
|
+
AccordionItem,
|
|
4257
|
+
AccordionTrigger,
|
|
4258
|
+
Alert,
|
|
4259
|
+
AlertDescription,
|
|
4260
|
+
AlertDialog,
|
|
4261
|
+
AlertDialogAction,
|
|
4262
|
+
AlertDialogCancel,
|
|
4263
|
+
AlertDialogContent,
|
|
4264
|
+
AlertDialogDescription,
|
|
4265
|
+
AlertDialogFooter,
|
|
4266
|
+
AlertDialogHeader,
|
|
4267
|
+
AlertDialogOverlay,
|
|
4268
|
+
AlertDialogPortal,
|
|
4269
|
+
AlertDialogTitle,
|
|
4270
|
+
AlertDialogTrigger,
|
|
4271
|
+
AlertTitle,
|
|
4272
|
+
AspectRatio,
|
|
1178
4273
|
Avatar,
|
|
1179
4274
|
AvatarFallback,
|
|
1180
4275
|
AvatarImage,
|
|
4276
|
+
Badge,
|
|
4277
|
+
Breadcrumb,
|
|
4278
|
+
BreadcrumbEllipsis,
|
|
4279
|
+
BreadcrumbItem,
|
|
4280
|
+
BreadcrumbLink,
|
|
4281
|
+
BreadcrumbList,
|
|
4282
|
+
BreadcrumbPage,
|
|
4283
|
+
BreadcrumbSeparator,
|
|
1181
4284
|
Button,
|
|
4285
|
+
CONTROL_SIZE,
|
|
4286
|
+
Calendar,
|
|
4287
|
+
CalendarDayButton,
|
|
4288
|
+
Card,
|
|
4289
|
+
CardContent,
|
|
4290
|
+
CardDescription,
|
|
4291
|
+
CardFooter,
|
|
4292
|
+
CardHeader,
|
|
4293
|
+
CardTitle,
|
|
4294
|
+
Checkbox,
|
|
4295
|
+
Collapsible,
|
|
4296
|
+
CollapsibleContent,
|
|
4297
|
+
CollapsibleTrigger,
|
|
4298
|
+
Combobox,
|
|
4299
|
+
ComboboxAnchor,
|
|
4300
|
+
ComboboxCommand,
|
|
4301
|
+
ComboboxContent,
|
|
4302
|
+
ComboboxEmpty,
|
|
4303
|
+
ComboboxGroup,
|
|
4304
|
+
ComboboxInput,
|
|
4305
|
+
ComboboxItem,
|
|
4306
|
+
ComboboxList,
|
|
4307
|
+
ComboboxSeparator,
|
|
4308
|
+
ComboboxShortcut,
|
|
4309
|
+
ComboboxTrigger,
|
|
4310
|
+
Command,
|
|
4311
|
+
CommandDialog,
|
|
4312
|
+
CommandEmpty,
|
|
4313
|
+
CommandGroup,
|
|
4314
|
+
CommandInput,
|
|
4315
|
+
CommandItem,
|
|
4316
|
+
CommandList,
|
|
4317
|
+
CommandSeparator,
|
|
4318
|
+
CommandShortcut,
|
|
4319
|
+
ContextMenu,
|
|
4320
|
+
ContextMenuCheckboxItem,
|
|
4321
|
+
ContextMenuContent,
|
|
4322
|
+
ContextMenuGroup,
|
|
4323
|
+
ContextMenuItem,
|
|
4324
|
+
ContextMenuLabel,
|
|
4325
|
+
ContextMenuRadioGroup,
|
|
4326
|
+
ContextMenuRadioItem,
|
|
4327
|
+
ContextMenuSeparator,
|
|
4328
|
+
ContextMenuShortcut,
|
|
4329
|
+
ContextMenuSub,
|
|
4330
|
+
ContextMenuSubContent,
|
|
4331
|
+
ContextMenuSubTrigger,
|
|
4332
|
+
ContextMenuTrigger,
|
|
4333
|
+
DatePicker,
|
|
4334
|
+
DatePickerButton,
|
|
4335
|
+
DatePickerCalendar,
|
|
4336
|
+
DatePickerContent,
|
|
4337
|
+
DatePickerTrigger,
|
|
1182
4338
|
Dialog,
|
|
1183
4339
|
DialogClose,
|
|
1184
4340
|
DialogContent,
|
|
@@ -1203,12 +4359,69 @@ var MemoPillSegmentedTabs = (0, import_react3.memo)(PillSegmentedTabs);
|
|
|
1203
4359
|
DropdownMenuSubContent,
|
|
1204
4360
|
DropdownMenuSubTrigger,
|
|
1205
4361
|
DropdownMenuTrigger,
|
|
4362
|
+
Form,
|
|
4363
|
+
FormControl,
|
|
4364
|
+
FormField,
|
|
4365
|
+
FormItem,
|
|
4366
|
+
FormLabel,
|
|
4367
|
+
FormMessage,
|
|
4368
|
+
FormSubmit,
|
|
4369
|
+
HoverCard,
|
|
4370
|
+
HoverCardContent,
|
|
4371
|
+
HoverCardTrigger,
|
|
4372
|
+
Input,
|
|
4373
|
+
InputGroup,
|
|
4374
|
+
InputGroupAddon,
|
|
4375
|
+
InputGroupInput,
|
|
4376
|
+
InputGroupText,
|
|
4377
|
+
InputOTP,
|
|
4378
|
+
InputOTPGroup,
|
|
4379
|
+
InputOTPHiddenInput,
|
|
4380
|
+
InputOTPSeparator,
|
|
4381
|
+
InputOTPSlot,
|
|
4382
|
+
Kbd,
|
|
4383
|
+
KbdGroup,
|
|
4384
|
+
Label,
|
|
1206
4385
|
MemoPillSegmentedTabs,
|
|
4386
|
+
Menubar,
|
|
4387
|
+
MenubarCheckboxItem,
|
|
4388
|
+
MenubarContent,
|
|
4389
|
+
MenubarItem,
|
|
4390
|
+
MenubarLabel,
|
|
4391
|
+
MenubarMenu,
|
|
4392
|
+
MenubarRadioGroup,
|
|
4393
|
+
MenubarRadioItem,
|
|
4394
|
+
MenubarSeparator,
|
|
4395
|
+
MenubarShortcut,
|
|
4396
|
+
MenubarSub,
|
|
4397
|
+
MenubarSubContent,
|
|
4398
|
+
MenubarSubTrigger,
|
|
4399
|
+
MenubarTrigger,
|
|
4400
|
+
NavigationMenu,
|
|
4401
|
+
NavigationMenuContent,
|
|
4402
|
+
NavigationMenuIndicator,
|
|
4403
|
+
NavigationMenuItem,
|
|
4404
|
+
NavigationMenuLink,
|
|
4405
|
+
NavigationMenuList,
|
|
4406
|
+
NavigationMenuTrigger,
|
|
4407
|
+
NavigationMenuViewport,
|
|
4408
|
+
Pagination,
|
|
4409
|
+
PaginationContent,
|
|
4410
|
+
PaginationEllipsis,
|
|
4411
|
+
PaginationItem,
|
|
4412
|
+
PaginationLink,
|
|
4413
|
+
PaginationNext,
|
|
4414
|
+
PaginationPrevious,
|
|
1207
4415
|
PillSegmentedTabs,
|
|
1208
4416
|
Popover,
|
|
1209
4417
|
PopoverAnchor,
|
|
1210
4418
|
PopoverContent,
|
|
1211
4419
|
PopoverTrigger,
|
|
4420
|
+
Progress,
|
|
4421
|
+
RadioGroup,
|
|
4422
|
+
RadioGroupItem,
|
|
4423
|
+
ScrollArea,
|
|
4424
|
+
ScrollBar,
|
|
1212
4425
|
Select,
|
|
1213
4426
|
SelectContent,
|
|
1214
4427
|
SelectGroup,
|
|
@@ -1219,10 +4432,62 @@ var MemoPillSegmentedTabs = (0, import_react3.memo)(PillSegmentedTabs);
|
|
|
1219
4432
|
SelectSeparator,
|
|
1220
4433
|
SelectTrigger,
|
|
1221
4434
|
SelectValue,
|
|
4435
|
+
Separator,
|
|
4436
|
+
Sheet,
|
|
4437
|
+
SheetClose,
|
|
4438
|
+
SheetContent,
|
|
4439
|
+
SheetDescription,
|
|
4440
|
+
SheetFooter,
|
|
4441
|
+
SheetHeader,
|
|
4442
|
+
SheetTitle,
|
|
4443
|
+
SheetTrigger,
|
|
1222
4444
|
Shimmer,
|
|
4445
|
+
Skeleton,
|
|
4446
|
+
Slider,
|
|
4447
|
+
Spinner,
|
|
4448
|
+
Switch,
|
|
4449
|
+
Table,
|
|
4450
|
+
TableBody,
|
|
4451
|
+
TableCaption,
|
|
4452
|
+
TableCell,
|
|
4453
|
+
TableFooter,
|
|
4454
|
+
TableHead,
|
|
4455
|
+
TableHeader,
|
|
4456
|
+
TableRow,
|
|
4457
|
+
Textarea,
|
|
1223
4458
|
TimbalV2Button,
|
|
4459
|
+
Toast,
|
|
4460
|
+
ToastAction,
|
|
4461
|
+
ToastClose,
|
|
4462
|
+
ToastDescription,
|
|
4463
|
+
ToastProvider,
|
|
4464
|
+
ToastTitle,
|
|
4465
|
+
ToastViewport,
|
|
4466
|
+
Toaster,
|
|
4467
|
+
Toggle,
|
|
4468
|
+
ToggleGroup,
|
|
4469
|
+
ToggleGroupItem,
|
|
4470
|
+
Toolbar,
|
|
4471
|
+
ToolbarButton,
|
|
4472
|
+
ToolbarLink,
|
|
4473
|
+
ToolbarSeparator,
|
|
4474
|
+
ToolbarToggleGroup,
|
|
4475
|
+
ToolbarToggleItem,
|
|
1224
4476
|
Tooltip,
|
|
1225
4477
|
TooltipContent,
|
|
1226
4478
|
TooltipProvider,
|
|
1227
|
-
TooltipTrigger
|
|
4479
|
+
TooltipTrigger,
|
|
4480
|
+
alertVariants,
|
|
4481
|
+
badgeVariants,
|
|
4482
|
+
controlClass,
|
|
4483
|
+
controlSurfaceClass,
|
|
4484
|
+
formatPickerDate,
|
|
4485
|
+
navigationMenuTriggerStyle,
|
|
4486
|
+
overlayAnimationClass,
|
|
4487
|
+
overlayItemClass,
|
|
4488
|
+
overlayListPanelClass,
|
|
4489
|
+
overlaySurfaceClass,
|
|
4490
|
+
toast,
|
|
4491
|
+
toggleVariants,
|
|
4492
|
+
useToast
|
|
1228
4493
|
});
|