@timbal-ai/timbal-react 0.8.2 → 1.1.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +100 -6
  3. package/dist/app.cjs +2538 -1262
  4. package/dist/app.d.cts +11 -6
  5. package/dist/app.d.ts +11 -6
  6. package/dist/app.esm.js +43 -6
  7. package/dist/{button-ClSgD6OF.d.cts → button-BoyX5pM_.d.cts} +1 -1
  8. package/dist/{button-ClSgD6OF.d.ts → button-BoyX5pM_.d.ts} +1 -1
  9. package/dist/{chart-artifact-Bl67kre7.d.ts → chart-artifact-BZp7nmaf.d.ts} +430 -14
  10. package/dist/{chart-artifact-BzcvblDe.d.cts → chart-artifact-CX-rh9nq.d.cts} +430 -14
  11. package/dist/{chat-Bed4FQSl.d.cts → chat-DCms8pJ_.d.cts} +31 -4
  12. package/dist/{chat-Bed4FQSl.d.ts → chat-DCms8pJ_.d.ts} +31 -4
  13. package/dist/chat.cjs +1111 -776
  14. package/dist/chat.d.cts +1 -1
  15. package/dist/chat.d.ts +1 -1
  16. package/dist/chat.esm.js +3 -3
  17. package/dist/{chunk-QVAUCVQA.esm.js → chunk-4AKJ6FKE.esm.js} +277 -4
  18. package/dist/chunk-6HWMJNZT.esm.js +3439 -0
  19. package/dist/{chunk-VWHHKAHN.esm.js → chunk-FRZOEYBO.esm.js} +4 -4
  20. package/dist/chunk-JEAUF54A.esm.js +52 -0
  21. package/dist/{chunk-OISVICYF.esm.js → chunk-P3KDAYX6.esm.js} +1 -1
  22. package/dist/{chunk-6YVKCVEP.esm.js → chunk-TK2AGIME.esm.js} +1106 -298
  23. package/dist/{chunk-CFU3YDTV.esm.js → chunk-XCM3V6RK.esm.js} +5 -5
  24. package/dist/{chunk-5ZKLPWVN.esm.js → chunk-YXZ22OJN.esm.js} +849 -667
  25. package/dist/index.cjs +6070 -1605
  26. package/dist/index.d.cts +8 -6
  27. package/dist/index.d.ts +8 -6
  28. package/dist/index.esm.js +427 -11
  29. package/dist/pill-segmented-tabs-Ba5q0feL.d.cts +500 -0
  30. package/dist/pill-segmented-tabs-Ba5q0feL.d.ts +500 -0
  31. package/dist/studio.cjs +1333 -998
  32. package/dist/studio.d.cts +2 -2
  33. package/dist/studio.d.ts +2 -2
  34. package/dist/studio.esm.js +5 -5
  35. package/dist/styles.css +220 -0
  36. package/dist/ui.cjs +3592 -89
  37. package/dist/ui.d.cts +72 -96
  38. package/dist/ui.d.ts +72 -96
  39. package/dist/ui.esm.js +400 -6
  40. package/dist/{welcome-COOb05a5.d.cts → welcome-CRqOPKMp.d.cts} +1 -1
  41. package/dist/{welcome-DE08m9ca.d.ts → welcome-DlHUa3OL.d.ts} +1 -1
  42. package/package.json +9 -3
  43. package/dist/chunk-P4SN7M67.esm.js +0 -435
@@ -0,0 +1,3439 @@
1
+ import {
2
+ Button,
3
+ Dialog,
4
+ DialogContent,
5
+ DialogDescription,
6
+ DialogHeader,
7
+ DialogTitle,
8
+ TIMBAL_V2_ELEVATED_SURFACE,
9
+ TIMBAL_V2_MODAL_SURFACE,
10
+ TIMBAL_V2_SWITCH_THUMB,
11
+ TIMBAL_V2_SWITCH_TRACK_OFF,
12
+ buttonVariants,
13
+ cn,
14
+ controlClass,
15
+ controlSurfaceClass,
16
+ overlayItemClass,
17
+ overlayListPanelClass,
18
+ overlaySurfaceClass
19
+ } from "./chunk-4AKJ6FKE.esm.js";
20
+
21
+ // src/ui/dropdown-menu.tsx
22
+ import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
23
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
24
+ import { jsx, jsxs } from "react/jsx-runtime";
25
+ function DropdownMenu({
26
+ ...props
27
+ }) {
28
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
29
+ }
30
+ function DropdownMenuTrigger({
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */ jsx(
34
+ DropdownMenuPrimitive.Trigger,
35
+ {
36
+ "data-slot": "dropdown-menu-trigger",
37
+ ...props
38
+ }
39
+ );
40
+ }
41
+ function DropdownMenuGroup({
42
+ ...props
43
+ }) {
44
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
45
+ }
46
+ function DropdownMenuContent({
47
+ className,
48
+ sideOffset = 4,
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
52
+ DropdownMenuPrimitive.Content,
53
+ {
54
+ "data-slot": "dropdown-menu-content",
55
+ sideOffset,
56
+ className: cn(
57
+ overlayListPanelClass,
58
+ "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",
59
+ className
60
+ ),
61
+ ...props
62
+ }
63
+ ) });
64
+ }
65
+ function DropdownMenuItem({
66
+ className,
67
+ inset,
68
+ variant = "default",
69
+ ...props
70
+ }) {
71
+ return /* @__PURE__ */ jsx(
72
+ DropdownMenuPrimitive.Item,
73
+ {
74
+ "data-slot": "dropdown-menu-item",
75
+ "data-inset": inset,
76
+ "data-variant": variant,
77
+ className: cn(
78
+ overlayItemClass,
79
+ "data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
80
+ className
81
+ ),
82
+ ...props
83
+ }
84
+ );
85
+ }
86
+ function DropdownMenuCheckboxItem({
87
+ className,
88
+ children,
89
+ checked,
90
+ ...props
91
+ }) {
92
+ return /* @__PURE__ */ jsxs(
93
+ DropdownMenuPrimitive.CheckboxItem,
94
+ {
95
+ "data-slot": "dropdown-menu-checkbox-item",
96
+ className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
97
+ checked,
98
+ ...props,
99
+ children: [
100
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
101
+ children
102
+ ]
103
+ }
104
+ );
105
+ }
106
+ function DropdownMenuRadioGroup({
107
+ ...props
108
+ }) {
109
+ return /* @__PURE__ */ jsx(
110
+ DropdownMenuPrimitive.RadioGroup,
111
+ {
112
+ "data-slot": "dropdown-menu-radio-group",
113
+ ...props
114
+ }
115
+ );
116
+ }
117
+ function DropdownMenuRadioItem({
118
+ className,
119
+ children,
120
+ ...props
121
+ }) {
122
+ return /* @__PURE__ */ jsxs(
123
+ DropdownMenuPrimitive.RadioItem,
124
+ {
125
+ "data-slot": "dropdown-menu-radio-item",
126
+ className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
127
+ ...props,
128
+ children: [
129
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
130
+ children
131
+ ]
132
+ }
133
+ );
134
+ }
135
+ function DropdownMenuLabel({
136
+ className,
137
+ inset,
138
+ ...props
139
+ }) {
140
+ return /* @__PURE__ */ jsx(
141
+ DropdownMenuPrimitive.Label,
142
+ {
143
+ "data-slot": "dropdown-menu-label",
144
+ "data-inset": inset,
145
+ className: cn(
146
+ "px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
147
+ className
148
+ ),
149
+ ...props
150
+ }
151
+ );
152
+ }
153
+ function DropdownMenuSeparator({
154
+ className,
155
+ ...props
156
+ }) {
157
+ return /* @__PURE__ */ jsx(
158
+ DropdownMenuPrimitive.Separator,
159
+ {
160
+ "data-slot": "dropdown-menu-separator",
161
+ className: cn("-mx-1 my-1 h-px bg-border", className),
162
+ ...props
163
+ }
164
+ );
165
+ }
166
+ function DropdownMenuShortcut({
167
+ className,
168
+ ...props
169
+ }) {
170
+ return /* @__PURE__ */ jsx(
171
+ "span",
172
+ {
173
+ "data-slot": "dropdown-menu-shortcut",
174
+ className: cn(
175
+ "ml-auto text-xs tracking-widest text-muted-foreground",
176
+ className
177
+ ),
178
+ ...props
179
+ }
180
+ );
181
+ }
182
+ function DropdownMenuSub({
183
+ ...props
184
+ }) {
185
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
186
+ }
187
+ function DropdownMenuSubTrigger({
188
+ className,
189
+ inset,
190
+ children,
191
+ ...props
192
+ }) {
193
+ return /* @__PURE__ */ jsxs(
194
+ DropdownMenuPrimitive.SubTrigger,
195
+ {
196
+ "data-slot": "dropdown-menu-sub-trigger",
197
+ "data-inset": inset,
198
+ className: cn(
199
+ overlayItemClass,
200
+ "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
201
+ className
202
+ ),
203
+ ...props,
204
+ children: [
205
+ children,
206
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
207
+ ]
208
+ }
209
+ );
210
+ }
211
+ function DropdownMenuSubContent({
212
+ className,
213
+ ...props
214
+ }) {
215
+ return /* @__PURE__ */ jsx(
216
+ DropdownMenuPrimitive.SubContent,
217
+ {
218
+ "data-slot": "dropdown-menu-sub-content",
219
+ className: cn(
220
+ overlayListPanelClass,
221
+ "min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-hidden p-1",
222
+ className
223
+ ),
224
+ ...props
225
+ }
226
+ );
227
+ }
228
+
229
+ // src/ui/popover.tsx
230
+ import { Popover as PopoverPrimitive } from "radix-ui";
231
+ import { jsx as jsx2 } from "react/jsx-runtime";
232
+ function Popover({
233
+ ...props
234
+ }) {
235
+ return /* @__PURE__ */ jsx2(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
236
+ }
237
+ function PopoverTrigger({
238
+ ...props
239
+ }) {
240
+ return /* @__PURE__ */ jsx2(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
241
+ }
242
+ function PopoverAnchor({
243
+ ...props
244
+ }) {
245
+ return /* @__PURE__ */ jsx2(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
246
+ }
247
+ function PopoverContent({
248
+ className,
249
+ align = "center",
250
+ sideOffset = 4,
251
+ variant = "default",
252
+ ...props
253
+ }) {
254
+ return /* @__PURE__ */ jsx2(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
255
+ PopoverPrimitive.Content,
256
+ {
257
+ "data-slot": "popover-content",
258
+ "data-variant": variant,
259
+ align,
260
+ sideOffset,
261
+ className: cn(
262
+ variant === "list" ? cn(
263
+ overlayListPanelClass,
264
+ "min-w-[8rem] origin-[var(--radix-popover-content-transform-origin)]"
265
+ ) : cn(
266
+ overlaySurfaceClass,
267
+ "w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-xl p-4 outline-hidden"
268
+ ),
269
+ className
270
+ ),
271
+ ...props
272
+ }
273
+ ) });
274
+ }
275
+
276
+ // src/ui/select.tsx
277
+ import { Select as SelectPrimitive } from "radix-ui";
278
+ import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
279
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
280
+ function Select({
281
+ ...props
282
+ }) {
283
+ return /* @__PURE__ */ jsx3(SelectPrimitive.Root, { "data-slot": "select", ...props });
284
+ }
285
+ function SelectGroup({
286
+ ...props
287
+ }) {
288
+ return /* @__PURE__ */ jsx3(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
289
+ }
290
+ function SelectValue({
291
+ ...props
292
+ }) {
293
+ return /* @__PURE__ */ jsx3(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
294
+ }
295
+ function SelectTrigger({
296
+ className,
297
+ size = "default",
298
+ children,
299
+ ...props
300
+ }) {
301
+ return /* @__PURE__ */ jsxs2(
302
+ SelectPrimitive.Trigger,
303
+ {
304
+ "data-slot": "select-trigger",
305
+ "data-size": size,
306
+ className: cn(
307
+ controlClass({ size }),
308
+ "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",
309
+ className
310
+ ),
311
+ ...props,
312
+ children: [
313
+ children,
314
+ /* @__PURE__ */ jsx3(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx3(ChevronDownIcon, { className: "size-4 opacity-50" }) })
315
+ ]
316
+ }
317
+ );
318
+ }
319
+ function SelectContent({
320
+ className,
321
+ children,
322
+ position = "popper",
323
+ ...props
324
+ }) {
325
+ return /* @__PURE__ */ jsx3(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs2(
326
+ SelectPrimitive.Content,
327
+ {
328
+ "data-slot": "select-content",
329
+ className: cn(
330
+ overlayListPanelClass,
331
+ "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",
332
+ 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",
333
+ className
334
+ ),
335
+ position,
336
+ ...props,
337
+ children: [
338
+ /* @__PURE__ */ jsx3(SelectScrollUpButton, {}),
339
+ /* @__PURE__ */ jsx3(
340
+ SelectPrimitive.Viewport,
341
+ {
342
+ className: cn(
343
+ "p-1",
344
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
345
+ ),
346
+ children
347
+ }
348
+ ),
349
+ /* @__PURE__ */ jsx3(SelectScrollDownButton, {})
350
+ ]
351
+ }
352
+ ) });
353
+ }
354
+ function SelectLabel({
355
+ className,
356
+ ...props
357
+ }) {
358
+ return /* @__PURE__ */ jsx3(
359
+ SelectPrimitive.Label,
360
+ {
361
+ "data-slot": "select-label",
362
+ className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground", className),
363
+ ...props
364
+ }
365
+ );
366
+ }
367
+ function SelectItem({
368
+ className,
369
+ children,
370
+ ...props
371
+ }) {
372
+ return /* @__PURE__ */ jsxs2(
373
+ SelectPrimitive.Item,
374
+ {
375
+ "data-slot": "select-item",
376
+ className: cn(
377
+ overlayItemClass,
378
+ "w-full py-1.5 pr-8 pl-2 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
379
+ className
380
+ ),
381
+ ...props,
382
+ children: [
383
+ /* @__PURE__ */ jsx3("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx3(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx3(CheckIcon2, { className: "size-4" }) }) }),
384
+ /* @__PURE__ */ jsx3(SelectPrimitive.ItemText, { children })
385
+ ]
386
+ }
387
+ );
388
+ }
389
+ function SelectSeparator({
390
+ className,
391
+ ...props
392
+ }) {
393
+ return /* @__PURE__ */ jsx3(
394
+ SelectPrimitive.Separator,
395
+ {
396
+ "data-slot": "select-separator",
397
+ className: cn("-mx-1 my-1 h-px bg-border", className),
398
+ ...props
399
+ }
400
+ );
401
+ }
402
+ function SelectScrollUpButton({
403
+ className,
404
+ ...props
405
+ }) {
406
+ return /* @__PURE__ */ jsx3(
407
+ SelectPrimitive.ScrollUpButton,
408
+ {
409
+ "data-slot": "select-scroll-up-button",
410
+ className: cn("flex cursor-default items-center justify-center py-1", className),
411
+ ...props,
412
+ children: /* @__PURE__ */ jsx3(ChevronUpIcon, { className: "size-4" })
413
+ }
414
+ );
415
+ }
416
+ function SelectScrollDownButton({
417
+ className,
418
+ ...props
419
+ }) {
420
+ return /* @__PURE__ */ jsx3(
421
+ SelectPrimitive.ScrollDownButton,
422
+ {
423
+ "data-slot": "select-scroll-down-button",
424
+ className: cn("flex cursor-default items-center justify-center py-1", className),
425
+ ...props,
426
+ children: /* @__PURE__ */ jsx3(ChevronDownIcon, { className: "size-4" })
427
+ }
428
+ );
429
+ }
430
+
431
+ // src/ui/input.tsx
432
+ import { jsx as jsx4 } from "react/jsx-runtime";
433
+ function Input({
434
+ className,
435
+ type,
436
+ controlSize,
437
+ ...props
438
+ }) {
439
+ return /* @__PURE__ */ jsx4(
440
+ "input",
441
+ {
442
+ type,
443
+ "data-slot": "input",
444
+ className: cn(
445
+ controlClass({ size: controlSize }),
446
+ "w-full file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
447
+ className
448
+ ),
449
+ ...props
450
+ }
451
+ );
452
+ }
453
+
454
+ // src/ui/textarea.tsx
455
+ import { jsx as jsx5 } from "react/jsx-runtime";
456
+ function Textarea({ className, ...props }) {
457
+ return /* @__PURE__ */ jsx5(
458
+ "textarea",
459
+ {
460
+ "data-slot": "textarea",
461
+ className: cn(
462
+ controlSurfaceClass,
463
+ "min-h-16 w-full resize-y rounded-lg px-3 py-2 leading-relaxed",
464
+ className
465
+ ),
466
+ ...props
467
+ }
468
+ );
469
+ }
470
+
471
+ // src/ui/label.tsx
472
+ import { Label as LabelPrimitive } from "radix-ui";
473
+ import { jsx as jsx6 } from "react/jsx-runtime";
474
+ function Label({
475
+ className,
476
+ ...props
477
+ }) {
478
+ return /* @__PURE__ */ jsx6(
479
+ LabelPrimitive.Root,
480
+ {
481
+ "data-slot": "label",
482
+ className: cn(
483
+ "flex select-none items-center gap-2 text-sm font-medium text-foreground",
484
+ "group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
485
+ className
486
+ ),
487
+ ...props
488
+ }
489
+ );
490
+ }
491
+
492
+ // src/ui/switch.tsx
493
+ import { Switch as SwitchPrimitive } from "radix-ui";
494
+ import { jsx as jsx7 } from "react/jsx-runtime";
495
+ function Switch({
496
+ className,
497
+ ...props
498
+ }) {
499
+ return /* @__PURE__ */ jsx7(
500
+ SwitchPrimitive.Root,
501
+ {
502
+ "data-slot": "switch",
503
+ className: cn(
504
+ "peer inline-flex h-5 w-9 shrink-0 items-center rounded-full outline-none transition-[background,box-shadow,border-color] duration-200",
505
+ TIMBAL_V2_SWITCH_TRACK_OFF,
506
+ "focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
507
+ "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",
508
+ className
509
+ ),
510
+ ...props,
511
+ children: /* @__PURE__ */ jsx7(
512
+ SwitchPrimitive.Thumb,
513
+ {
514
+ "data-slot": "switch-thumb",
515
+ className: cn(
516
+ TIMBAL_V2_SWITCH_THUMB,
517
+ "pointer-events-none block size-4 translate-x-0.5 rounded-full transition-transform data-[state=checked]:translate-x-4"
518
+ )
519
+ }
520
+ )
521
+ }
522
+ );
523
+ }
524
+
525
+ // src/ui/radio-group.tsx
526
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
527
+ import { CircleIcon as CircleIcon2 } from "lucide-react";
528
+ import { jsx as jsx8 } from "react/jsx-runtime";
529
+ function RadioGroup({
530
+ className,
531
+ ...props
532
+ }) {
533
+ return /* @__PURE__ */ jsx8(
534
+ RadioGroupPrimitive.Root,
535
+ {
536
+ "data-slot": "radio-group",
537
+ className: cn("grid gap-2.5", className),
538
+ ...props
539
+ }
540
+ );
541
+ }
542
+ function RadioGroupItem({
543
+ className,
544
+ ...props
545
+ }) {
546
+ return /* @__PURE__ */ jsx8(
547
+ RadioGroupPrimitive.Item,
548
+ {
549
+ "data-slot": "radio-group-item",
550
+ className: cn(
551
+ "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]",
552
+ "focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:cursor-not-allowed disabled:opacity-50",
553
+ "data-[state=checked]:border-foreground/30",
554
+ className
555
+ ),
556
+ ...props,
557
+ children: /* @__PURE__ */ jsx8(
558
+ RadioGroupPrimitive.Indicator,
559
+ {
560
+ "data-slot": "radio-group-indicator",
561
+ className: "flex items-center justify-center",
562
+ children: /* @__PURE__ */ jsx8(CircleIcon2, { className: "size-2 fill-foreground text-foreground" })
563
+ }
564
+ )
565
+ }
566
+ );
567
+ }
568
+
569
+ // src/ui/form.tsx
570
+ import { Form as FormPrimitive } from "radix-ui";
571
+ import { jsx as jsx9 } from "react/jsx-runtime";
572
+ function Form({ ...props }) {
573
+ return /* @__PURE__ */ jsx9(FormPrimitive.Root, { "data-slot": "form", ...props });
574
+ }
575
+ function FormField({
576
+ ...props
577
+ }) {
578
+ return /* @__PURE__ */ jsx9(FormPrimitive.Field, { "data-slot": "form-field", ...props });
579
+ }
580
+ function FormItem({ className, ...props }) {
581
+ return /* @__PURE__ */ jsx9(
582
+ "div",
583
+ {
584
+ "data-slot": "form-item",
585
+ className: cn("grid gap-1.5", className),
586
+ ...props
587
+ }
588
+ );
589
+ }
590
+ function FormLabel({
591
+ className,
592
+ ...props
593
+ }) {
594
+ return /* @__PURE__ */ jsx9(FormPrimitive.Label, { asChild: true, children: /* @__PURE__ */ jsx9(Label, { "data-slot": "form-label", className, ...props }) });
595
+ }
596
+ function FormControl({
597
+ ...props
598
+ }) {
599
+ return /* @__PURE__ */ jsx9(FormPrimitive.Control, { "data-slot": "form-control", ...props });
600
+ }
601
+ function FormMessage({
602
+ className,
603
+ ...props
604
+ }) {
605
+ return /* @__PURE__ */ jsx9(
606
+ FormPrimitive.Message,
607
+ {
608
+ "data-slot": "form-message",
609
+ className: cn("text-xs text-destructive", className),
610
+ ...props
611
+ }
612
+ );
613
+ }
614
+ function FormSubmit({
615
+ className,
616
+ ...props
617
+ }) {
618
+ return /* @__PURE__ */ jsx9(
619
+ FormPrimitive.Submit,
620
+ {
621
+ "data-slot": "form-submit",
622
+ className,
623
+ ...props
624
+ }
625
+ );
626
+ }
627
+
628
+ // src/ui/aspect-ratio.tsx
629
+ import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
630
+ import { jsx as jsx10 } from "react/jsx-runtime";
631
+ function AspectRatio({
632
+ ...props
633
+ }) {
634
+ return /* @__PURE__ */ jsx10(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
635
+ }
636
+
637
+ // src/ui/breadcrumb.tsx
638
+ import { ChevronRightIcon as ChevronRightIcon2, MoreHorizontalIcon } from "lucide-react";
639
+ import { Slot } from "radix-ui";
640
+ import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
641
+ function Breadcrumb({ ...props }) {
642
+ return /* @__PURE__ */ jsx11("nav", { "data-slot": "breadcrumb", "aria-label": "Breadcrumb", ...props });
643
+ }
644
+ function BreadcrumbList({ className, ...props }) {
645
+ return /* @__PURE__ */ jsx11(
646
+ "ol",
647
+ {
648
+ "data-slot": "breadcrumb-list",
649
+ className: cn(
650
+ "flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground",
651
+ className
652
+ ),
653
+ ...props
654
+ }
655
+ );
656
+ }
657
+ function BreadcrumbItem({ className, ...props }) {
658
+ return /* @__PURE__ */ jsx11(
659
+ "li",
660
+ {
661
+ "data-slot": "breadcrumb-item",
662
+ className: cn("inline-flex items-center gap-1.5", className),
663
+ ...props
664
+ }
665
+ );
666
+ }
667
+ function BreadcrumbLink({
668
+ className,
669
+ asChild,
670
+ ...props
671
+ }) {
672
+ const Comp = asChild ? Slot.Root : "a";
673
+ return /* @__PURE__ */ jsx11(
674
+ Comp,
675
+ {
676
+ "data-slot": "breadcrumb-link",
677
+ className: cn("transition-colors hover:text-foreground", className),
678
+ ...props
679
+ }
680
+ );
681
+ }
682
+ function BreadcrumbPage({ className, ...props }) {
683
+ return /* @__PURE__ */ jsx11(
684
+ "span",
685
+ {
686
+ "data-slot": "breadcrumb-page",
687
+ role: "link",
688
+ "aria-disabled": "true",
689
+ "aria-current": "page",
690
+ className: cn("font-normal text-foreground", className),
691
+ ...props
692
+ }
693
+ );
694
+ }
695
+ function BreadcrumbSeparator({
696
+ children,
697
+ className,
698
+ ...props
699
+ }) {
700
+ return /* @__PURE__ */ jsx11(
701
+ "li",
702
+ {
703
+ "data-slot": "breadcrumb-separator",
704
+ role: "presentation",
705
+ "aria-hidden": "true",
706
+ className: cn("[&>svg]:size-3.5", className),
707
+ ...props,
708
+ children: children ?? /* @__PURE__ */ jsx11(ChevronRightIcon2, {})
709
+ }
710
+ );
711
+ }
712
+ function BreadcrumbEllipsis({
713
+ className,
714
+ ...props
715
+ }) {
716
+ return /* @__PURE__ */ jsxs3(
717
+ "span",
718
+ {
719
+ "data-slot": "breadcrumb-ellipsis",
720
+ role: "presentation",
721
+ "aria-hidden": "true",
722
+ className: cn("flex size-9 items-center justify-center", className),
723
+ ...props,
724
+ children: [
725
+ /* @__PURE__ */ jsx11(MoreHorizontalIcon, { className: "size-4" }),
726
+ /* @__PURE__ */ jsx11("span", { className: "sr-only", children: "More" })
727
+ ]
728
+ }
729
+ );
730
+ }
731
+
732
+ // src/ui/pagination.tsx
733
+ import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon3, MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
734
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
735
+ function Pagination({ className, ...props }) {
736
+ return /* @__PURE__ */ jsx12(
737
+ "nav",
738
+ {
739
+ "data-slot": "pagination",
740
+ role: "navigation",
741
+ "aria-label": "pagination",
742
+ className: cn("mx-auto flex w-full justify-center", className),
743
+ ...props
744
+ }
745
+ );
746
+ }
747
+ function PaginationContent({ className, ...props }) {
748
+ return /* @__PURE__ */ jsx12(
749
+ "ul",
750
+ {
751
+ "data-slot": "pagination-content",
752
+ className: cn("flex flex-row items-center gap-1", className),
753
+ ...props
754
+ }
755
+ );
756
+ }
757
+ function PaginationItem({ ...props }) {
758
+ return /* @__PURE__ */ jsx12("li", { "data-slot": "pagination-item", ...props });
759
+ }
760
+ function PaginationLink({
761
+ className,
762
+ isActive,
763
+ size = "icon",
764
+ ...props
765
+ }) {
766
+ return /* @__PURE__ */ jsx12(Button, { asChild: true, variant: isActive ? "outline" : "ghost", size, className, children: /* @__PURE__ */ jsx12(
767
+ "a",
768
+ {
769
+ "data-slot": "pagination-link",
770
+ "aria-current": isActive ? "page" : void 0,
771
+ ...props
772
+ }
773
+ ) });
774
+ }
775
+ function PaginationPrevious({
776
+ className,
777
+ ...props
778
+ }) {
779
+ return /* @__PURE__ */ jsxs4(
780
+ PaginationLink,
781
+ {
782
+ "aria-label": "Go to previous page",
783
+ size: "default",
784
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className),
785
+ ...props,
786
+ children: [
787
+ /* @__PURE__ */ jsx12(ChevronLeftIcon, { className: "size-4" }),
788
+ /* @__PURE__ */ jsx12("span", { className: "hidden sm:block", children: "Previous" })
789
+ ]
790
+ }
791
+ );
792
+ }
793
+ function PaginationNext({
794
+ className,
795
+ ...props
796
+ }) {
797
+ return /* @__PURE__ */ jsxs4(
798
+ PaginationLink,
799
+ {
800
+ "aria-label": "Go to next page",
801
+ size: "default",
802
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className),
803
+ ...props,
804
+ children: [
805
+ /* @__PURE__ */ jsx12("span", { className: "hidden sm:block", children: "Next" }),
806
+ /* @__PURE__ */ jsx12(ChevronRightIcon3, { className: "size-4" })
807
+ ]
808
+ }
809
+ );
810
+ }
811
+ function PaginationEllipsis({
812
+ className,
813
+ ...props
814
+ }) {
815
+ return /* @__PURE__ */ jsxs4(
816
+ "span",
817
+ {
818
+ "data-slot": "pagination-ellipsis",
819
+ "aria-hidden": true,
820
+ className: cn("flex size-9 items-center justify-center", className),
821
+ ...props,
822
+ children: [
823
+ /* @__PURE__ */ jsx12(MoreHorizontalIcon2, { className: "size-4" }),
824
+ /* @__PURE__ */ jsx12("span", { className: "sr-only", children: "More pages" })
825
+ ]
826
+ }
827
+ );
828
+ }
829
+
830
+ // src/ui/toolbar.tsx
831
+ import { Toolbar as ToolbarPrimitive } from "radix-ui";
832
+ import { jsx as jsx13 } from "react/jsx-runtime";
833
+ function Toolbar({
834
+ className,
835
+ ...props
836
+ }) {
837
+ return /* @__PURE__ */ jsx13(
838
+ ToolbarPrimitive.Root,
839
+ {
840
+ "data-slot": "toolbar",
841
+ className: cn(
842
+ "flex items-center gap-1 rounded-lg border border-border bg-gradient-to-b from-elevated-from to-elevated-to p-1 shadow-card",
843
+ className
844
+ ),
845
+ ...props
846
+ }
847
+ );
848
+ }
849
+ function ToolbarButton({
850
+ className,
851
+ ...props
852
+ }) {
853
+ return /* @__PURE__ */ jsx13(
854
+ ToolbarPrimitive.Button,
855
+ {
856
+ "data-slot": "toolbar-button",
857
+ className: cn(
858
+ "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",
859
+ "hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
860
+ className
861
+ ),
862
+ ...props
863
+ }
864
+ );
865
+ }
866
+ function ToolbarSeparator({
867
+ className,
868
+ ...props
869
+ }) {
870
+ return /* @__PURE__ */ jsx13(
871
+ ToolbarPrimitive.Separator,
872
+ {
873
+ "data-slot": "toolbar-separator",
874
+ className: cn("mx-1 h-6 w-px bg-border", className),
875
+ ...props
876
+ }
877
+ );
878
+ }
879
+ function ToolbarToggleGroup({
880
+ className,
881
+ ...props
882
+ }) {
883
+ return /* @__PURE__ */ jsx13(
884
+ ToolbarPrimitive.ToggleGroup,
885
+ {
886
+ "data-slot": "toolbar-toggle-group",
887
+ className: cn("flex items-center gap-0.5", className),
888
+ ...props
889
+ }
890
+ );
891
+ }
892
+ function ToolbarToggleItem({
893
+ className,
894
+ ...props
895
+ }) {
896
+ return /* @__PURE__ */ jsx13(
897
+ ToolbarPrimitive.ToggleItem,
898
+ {
899
+ "data-slot": "toolbar-toggle-item",
900
+ className: cn(
901
+ "inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm outline-none transition-colors",
902
+ "hover:bg-muted focus-visible:ring-2 focus-visible:ring-foreground/10",
903
+ "data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
904
+ className
905
+ ),
906
+ ...props
907
+ }
908
+ );
909
+ }
910
+ function ToolbarLink({
911
+ className,
912
+ ...props
913
+ }) {
914
+ return /* @__PURE__ */ jsx13(
915
+ ToolbarPrimitive.Link,
916
+ {
917
+ "data-slot": "toolbar-link",
918
+ className: cn(
919
+ "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",
920
+ className
921
+ ),
922
+ ...props
923
+ }
924
+ );
925
+ }
926
+
927
+ // src/ui/menubar.tsx
928
+ import { Menubar as MenubarPrimitive } from "radix-ui";
929
+ import { CheckIcon as CheckIcon3, ChevronRightIcon as ChevronRightIcon4, CircleIcon as CircleIcon3 } from "lucide-react";
930
+ import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
931
+ function Menubar({
932
+ className,
933
+ ...props
934
+ }) {
935
+ return /* @__PURE__ */ jsx14(
936
+ MenubarPrimitive.Root,
937
+ {
938
+ "data-slot": "menubar",
939
+ className: cn(
940
+ "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",
941
+ className
942
+ ),
943
+ ...props
944
+ }
945
+ );
946
+ }
947
+ function MenubarMenu({
948
+ ...props
949
+ }) {
950
+ return /* @__PURE__ */ jsx14(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
951
+ }
952
+ function MenubarTrigger({
953
+ className,
954
+ ...props
955
+ }) {
956
+ return /* @__PURE__ */ jsx14(
957
+ MenubarPrimitive.Trigger,
958
+ {
959
+ "data-slot": "menubar-trigger",
960
+ className: cn(
961
+ "flex cursor-default items-center rounded-md px-2 py-1 text-sm font-medium outline-none select-none",
962
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
963
+ className
964
+ ),
965
+ ...props
966
+ }
967
+ );
968
+ }
969
+ function MenubarContent({
970
+ className,
971
+ align = "start",
972
+ alignOffset = -4,
973
+ sideOffset = 8,
974
+ ...props
975
+ }) {
976
+ return /* @__PURE__ */ jsx14(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx14(
977
+ MenubarPrimitive.Content,
978
+ {
979
+ "data-slot": "menubar-content",
980
+ align,
981
+ alignOffset,
982
+ sideOffset,
983
+ className: cn(
984
+ overlaySurfaceClass,
985
+ "min-w-[12rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
986
+ className
987
+ ),
988
+ ...props
989
+ }
990
+ ) });
991
+ }
992
+ function MenubarItem({
993
+ className,
994
+ inset,
995
+ variant = "default",
996
+ ...props
997
+ }) {
998
+ return /* @__PURE__ */ jsx14(
999
+ MenubarPrimitive.Item,
1000
+ {
1001
+ "data-slot": "menubar-item",
1002
+ "data-inset": inset,
1003
+ "data-variant": variant,
1004
+ className: cn(
1005
+ overlayItemClass,
1006
+ "data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
1007
+ className
1008
+ ),
1009
+ ...props
1010
+ }
1011
+ );
1012
+ }
1013
+ function MenubarCheckboxItem({
1014
+ className,
1015
+ children,
1016
+ checked,
1017
+ ...props
1018
+ }) {
1019
+ return /* @__PURE__ */ jsxs5(
1020
+ MenubarPrimitive.CheckboxItem,
1021
+ {
1022
+ "data-slot": "menubar-checkbox-item",
1023
+ className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
1024
+ checked,
1025
+ ...props,
1026
+ children: [
1027
+ /* @__PURE__ */ jsx14("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14(CheckIcon3, { className: "size-4" }) }) }),
1028
+ children
1029
+ ]
1030
+ }
1031
+ );
1032
+ }
1033
+ function MenubarRadioGroup({
1034
+ ...props
1035
+ }) {
1036
+ return /* @__PURE__ */ jsx14(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
1037
+ }
1038
+ function MenubarRadioItem({
1039
+ className,
1040
+ children,
1041
+ ...props
1042
+ }) {
1043
+ return /* @__PURE__ */ jsxs5(
1044
+ MenubarPrimitive.RadioItem,
1045
+ {
1046
+ "data-slot": "menubar-radio-item",
1047
+ className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
1048
+ ...props,
1049
+ children: [
1050
+ /* @__PURE__ */ jsx14("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14(CircleIcon3, { className: "size-2 fill-current" }) }) }),
1051
+ children
1052
+ ]
1053
+ }
1054
+ );
1055
+ }
1056
+ function MenubarLabel({
1057
+ className,
1058
+ inset,
1059
+ ...props
1060
+ }) {
1061
+ return /* @__PURE__ */ jsx14(
1062
+ MenubarPrimitive.Label,
1063
+ {
1064
+ "data-slot": "menubar-label",
1065
+ "data-inset": inset,
1066
+ className: cn(
1067
+ "px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
1068
+ className
1069
+ ),
1070
+ ...props
1071
+ }
1072
+ );
1073
+ }
1074
+ function MenubarSeparator({
1075
+ className,
1076
+ ...props
1077
+ }) {
1078
+ return /* @__PURE__ */ jsx14(
1079
+ MenubarPrimitive.Separator,
1080
+ {
1081
+ "data-slot": "menubar-separator",
1082
+ className: cn("-mx-1 my-1 h-px bg-border", className),
1083
+ ...props
1084
+ }
1085
+ );
1086
+ }
1087
+ function MenubarShortcut({
1088
+ className,
1089
+ ...props
1090
+ }) {
1091
+ return /* @__PURE__ */ jsx14(
1092
+ "span",
1093
+ {
1094
+ "data-slot": "menubar-shortcut",
1095
+ className: cn(
1096
+ "ml-auto text-xs tracking-widest text-muted-foreground",
1097
+ className
1098
+ ),
1099
+ ...props
1100
+ }
1101
+ );
1102
+ }
1103
+ function MenubarSub({
1104
+ ...props
1105
+ }) {
1106
+ return /* @__PURE__ */ jsx14(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
1107
+ }
1108
+ function MenubarSubTrigger({
1109
+ className,
1110
+ inset,
1111
+ children,
1112
+ ...props
1113
+ }) {
1114
+ return /* @__PURE__ */ jsxs5(
1115
+ MenubarPrimitive.SubTrigger,
1116
+ {
1117
+ "data-slot": "menubar-sub-trigger",
1118
+ "data-inset": inset,
1119
+ className: cn(
1120
+ overlayItemClass,
1121
+ "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
1122
+ className
1123
+ ),
1124
+ ...props,
1125
+ children: [
1126
+ children,
1127
+ /* @__PURE__ */ jsx14(ChevronRightIcon4, { className: "ml-auto size-4" })
1128
+ ]
1129
+ }
1130
+ );
1131
+ }
1132
+ function MenubarSubContent({
1133
+ className,
1134
+ ...props
1135
+ }) {
1136
+ return /* @__PURE__ */ jsx14(
1137
+ MenubarPrimitive.SubContent,
1138
+ {
1139
+ "data-slot": "menubar-sub-content",
1140
+ className: cn(
1141
+ overlaySurfaceClass,
1142
+ "min-w-[8rem] origin-[var(--radix-menubar-content-transform-origin)] overflow-hidden rounded-lg p-1",
1143
+ className
1144
+ ),
1145
+ ...props
1146
+ }
1147
+ );
1148
+ }
1149
+
1150
+ // src/ui/navigation-menu.tsx
1151
+ import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
1152
+ import { ChevronDownIcon as ChevronDownIcon2 } from "lucide-react";
1153
+ import { cva } from "class-variance-authority";
1154
+ import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
1155
+ function NavigationMenu({
1156
+ className,
1157
+ children,
1158
+ viewport = true,
1159
+ ...props
1160
+ }) {
1161
+ return /* @__PURE__ */ jsxs6(
1162
+ NavigationMenuPrimitive.Root,
1163
+ {
1164
+ "data-slot": "navigation-menu",
1165
+ "data-viewport": viewport,
1166
+ className: cn(
1167
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
1168
+ className
1169
+ ),
1170
+ ...props,
1171
+ children: [
1172
+ children,
1173
+ viewport ? /* @__PURE__ */ jsx15(NavigationMenuViewport, {}) : null
1174
+ ]
1175
+ }
1176
+ );
1177
+ }
1178
+ function NavigationMenuList({
1179
+ className,
1180
+ ...props
1181
+ }) {
1182
+ return /* @__PURE__ */ jsx15(
1183
+ NavigationMenuPrimitive.List,
1184
+ {
1185
+ "data-slot": "navigation-menu-list",
1186
+ className: cn(
1187
+ "group flex flex-1 list-none items-center justify-center gap-1",
1188
+ className
1189
+ ),
1190
+ ...props
1191
+ }
1192
+ );
1193
+ }
1194
+ function NavigationMenuItem({
1195
+ ...props
1196
+ }) {
1197
+ return /* @__PURE__ */ jsx15(NavigationMenuPrimitive.Item, { "data-slot": "navigation-menu-item", ...props });
1198
+ }
1199
+ var navigationMenuTriggerStyle = cva(
1200
+ "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"
1201
+ );
1202
+ function NavigationMenuTrigger({
1203
+ className,
1204
+ children,
1205
+ ...props
1206
+ }) {
1207
+ return /* @__PURE__ */ jsxs6(
1208
+ NavigationMenuPrimitive.Trigger,
1209
+ {
1210
+ "data-slot": "navigation-menu-trigger",
1211
+ className: cn(navigationMenuTriggerStyle(), "group", className),
1212
+ ...props,
1213
+ children: [
1214
+ children,
1215
+ " ",
1216
+ /* @__PURE__ */ jsx15(
1217
+ ChevronDownIcon2,
1218
+ {
1219
+ className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
1220
+ "aria-hidden": "true"
1221
+ }
1222
+ )
1223
+ ]
1224
+ }
1225
+ );
1226
+ }
1227
+ function NavigationMenuContent({
1228
+ className,
1229
+ ...props
1230
+ }) {
1231
+ return /* @__PURE__ */ jsx15(
1232
+ NavigationMenuPrimitive.Content,
1233
+ {
1234
+ "data-slot": "navigation-menu-content",
1235
+ className: cn(
1236
+ "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",
1237
+ "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",
1238
+ className
1239
+ ),
1240
+ ...props
1241
+ }
1242
+ );
1243
+ }
1244
+ function NavigationMenuViewport({
1245
+ className,
1246
+ ...props
1247
+ }) {
1248
+ return /* @__PURE__ */ jsx15("div", { className: cn("absolute top-full left-0 isolate z-[80] flex justify-center"), children: /* @__PURE__ */ jsx15(
1249
+ NavigationMenuPrimitive.Viewport,
1250
+ {
1251
+ "data-slot": "navigation-menu-viewport",
1252
+ className: cn(
1253
+ overlaySurfaceClass,
1254
+ "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)]",
1255
+ className
1256
+ ),
1257
+ ...props
1258
+ }
1259
+ ) });
1260
+ }
1261
+ function NavigationMenuLink({
1262
+ className,
1263
+ ...props
1264
+ }) {
1265
+ return /* @__PURE__ */ jsx15(
1266
+ NavigationMenuPrimitive.Link,
1267
+ {
1268
+ "data-slot": "navigation-menu-link",
1269
+ className: cn(
1270
+ "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",
1271
+ className
1272
+ ),
1273
+ ...props
1274
+ }
1275
+ );
1276
+ }
1277
+ function NavigationMenuIndicator({
1278
+ className,
1279
+ ...props
1280
+ }) {
1281
+ return /* @__PURE__ */ jsx15(
1282
+ NavigationMenuPrimitive.Indicator,
1283
+ {
1284
+ "data-slot": "navigation-menu-indicator",
1285
+ className: cn(
1286
+ "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",
1287
+ className
1288
+ ),
1289
+ ...props,
1290
+ children: /* @__PURE__ */ jsx15("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
1291
+ }
1292
+ );
1293
+ }
1294
+
1295
+ // src/ui/command.tsx
1296
+ import { Command as CommandPrimitive } from "cmdk";
1297
+ import { SearchIcon } from "lucide-react";
1298
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
1299
+ function Command({
1300
+ className,
1301
+ ...props
1302
+ }) {
1303
+ return /* @__PURE__ */ jsx16(
1304
+ CommandPrimitive,
1305
+ {
1306
+ "data-slot": "command",
1307
+ className: cn(
1308
+ "flex h-full w-full flex-col overflow-hidden bg-popover text-popover-foreground",
1309
+ className
1310
+ ),
1311
+ ...props
1312
+ }
1313
+ );
1314
+ }
1315
+ function CommandDialog({
1316
+ title = "Command palette",
1317
+ description = "Search for a command to run\u2026",
1318
+ children,
1319
+ className,
1320
+ showCloseButton = true,
1321
+ ...props
1322
+ }) {
1323
+ return /* @__PURE__ */ jsxs7(Dialog, { ...props, children: [
1324
+ /* @__PURE__ */ jsxs7(DialogHeader, { className: "sr-only", children: [
1325
+ /* @__PURE__ */ jsx16(DialogTitle, { children: title }),
1326
+ /* @__PURE__ */ jsx16(DialogDescription, { children: description })
1327
+ ] }),
1328
+ /* @__PURE__ */ jsx16(
1329
+ DialogContent,
1330
+ {
1331
+ className: cn("overflow-hidden p-0", className),
1332
+ showCloseButton,
1333
+ children: /* @__PURE__ */ jsx16(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 })
1334
+ }
1335
+ )
1336
+ ] });
1337
+ }
1338
+ function CommandInput({
1339
+ className,
1340
+ ...props
1341
+ }) {
1342
+ return /* @__PURE__ */ jsxs7(
1343
+ "div",
1344
+ {
1345
+ "data-slot": "command-input-wrapper",
1346
+ className: "flex h-10 items-center gap-2 border-b border-border px-3",
1347
+ children: [
1348
+ /* @__PURE__ */ jsx16(SearchIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1349
+ /* @__PURE__ */ jsx16(
1350
+ CommandPrimitive.Input,
1351
+ {
1352
+ "data-slot": "command-input",
1353
+ className: cn(
1354
+ "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",
1355
+ className
1356
+ ),
1357
+ ...props
1358
+ }
1359
+ )
1360
+ ]
1361
+ }
1362
+ );
1363
+ }
1364
+ function CommandList({
1365
+ className,
1366
+ ...props
1367
+ }) {
1368
+ return /* @__PURE__ */ jsx16(
1369
+ CommandPrimitive.List,
1370
+ {
1371
+ "data-slot": "command-list",
1372
+ className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
1373
+ ...props
1374
+ }
1375
+ );
1376
+ }
1377
+ function CommandEmpty({
1378
+ ...props
1379
+ }) {
1380
+ return /* @__PURE__ */ jsx16(
1381
+ CommandPrimitive.Empty,
1382
+ {
1383
+ "data-slot": "command-empty",
1384
+ className: "py-6 text-center text-sm text-muted-foreground",
1385
+ ...props
1386
+ }
1387
+ );
1388
+ }
1389
+ function CommandGroup({
1390
+ className,
1391
+ ...props
1392
+ }) {
1393
+ return /* @__PURE__ */ jsx16(
1394
+ CommandPrimitive.Group,
1395
+ {
1396
+ "data-slot": "command-group",
1397
+ className: cn(
1398
+ "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",
1399
+ className
1400
+ ),
1401
+ ...props
1402
+ }
1403
+ );
1404
+ }
1405
+ function CommandSeparator({
1406
+ className,
1407
+ ...props
1408
+ }) {
1409
+ return /* @__PURE__ */ jsx16(
1410
+ CommandPrimitive.Separator,
1411
+ {
1412
+ "data-slot": "command-separator",
1413
+ className: cn("-mx-1 h-px bg-border", className),
1414
+ ...props
1415
+ }
1416
+ );
1417
+ }
1418
+ function CommandItem({
1419
+ className,
1420
+ ...props
1421
+ }) {
1422
+ return /* @__PURE__ */ jsx16(
1423
+ CommandPrimitive.Item,
1424
+ {
1425
+ "data-slot": "command-item",
1426
+ className: cn(
1427
+ overlayItemClass,
1428
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",
1429
+ className
1430
+ ),
1431
+ ...props
1432
+ }
1433
+ );
1434
+ }
1435
+ function CommandShortcut({
1436
+ className,
1437
+ ...props
1438
+ }) {
1439
+ return /* @__PURE__ */ jsx16(
1440
+ "span",
1441
+ {
1442
+ "data-slot": "command-shortcut",
1443
+ className: cn(
1444
+ "ml-auto text-xs tracking-widest text-muted-foreground",
1445
+ className
1446
+ ),
1447
+ ...props
1448
+ }
1449
+ );
1450
+ }
1451
+
1452
+ // src/ui/calendar.tsx
1453
+ import * as React from "react";
1454
+ import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
1455
+ import { DayPicker } from "react-day-picker";
1456
+ import { jsx as jsx17 } from "react/jsx-runtime";
1457
+ function Calendar({
1458
+ className,
1459
+ classNames,
1460
+ showOutsideDays = true,
1461
+ ...props
1462
+ }) {
1463
+ return /* @__PURE__ */ jsx17(
1464
+ DayPicker,
1465
+ {
1466
+ showOutsideDays,
1467
+ className: cn("p-3", className),
1468
+ classNames: {
1469
+ months: "flex flex-col gap-4 sm:flex-row sm:gap-4",
1470
+ month: "flex flex-col gap-4",
1471
+ month_caption: "relative flex items-center justify-center pt-1",
1472
+ caption_label: "text-sm font-medium",
1473
+ nav: "flex items-center gap-1",
1474
+ button_previous: cn(
1475
+ buttonVariants({ variant: "outline" }),
1476
+ "absolute left-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
1477
+ ),
1478
+ button_next: cn(
1479
+ buttonVariants({ variant: "outline" }),
1480
+ "absolute right-1 size-7 bg-transparent p-0 opacity-70 hover:opacity-100"
1481
+ ),
1482
+ month_grid: "w-full border-collapse",
1483
+ weekdays: "flex",
1484
+ weekday: "w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground",
1485
+ week: "mt-2 flex w-full",
1486
+ day: cn(
1487
+ "relative size-9 p-0 text-center text-sm",
1488
+ "[&:has([aria-selected].day-range-end)]:rounded-r-md",
1489
+ "[&:has([aria-selected].day-outside)]:bg-accent/50",
1490
+ "[&:has([aria-selected])]:bg-accent",
1491
+ "first:[&:has([aria-selected])]:rounded-l-md",
1492
+ "last:[&:has([aria-selected])]:rounded-r-md",
1493
+ "focus-within:relative focus-within:z-10"
1494
+ ),
1495
+ day_button: cn(
1496
+ buttonVariants({ variant: "ghost" }),
1497
+ "size-9 p-0 font-normal aria-selected:opacity-100"
1498
+ ),
1499
+ range_start: "day-range-start rounded-l-md",
1500
+ range_middle: "day-range-middle aria-selected:bg-accent",
1501
+ range_end: "day-range-end rounded-r-md",
1502
+ selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
1503
+ today: "bg-accent text-accent-foreground",
1504
+ outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
1505
+ disabled: "text-muted-foreground opacity-50",
1506
+ hidden: "invisible",
1507
+ ...classNames
1508
+ },
1509
+ components: {
1510
+ Chevron: ({ orientation, className: className2, ...chevronProps }) => {
1511
+ const Icon = orientation === "left" ? ChevronLeftIcon2 : ChevronRightIcon5;
1512
+ return /* @__PURE__ */ jsx17(Icon, { className: cn("size-4", className2), ...chevronProps });
1513
+ },
1514
+ DayButton: CalendarDayButton
1515
+ },
1516
+ ...props
1517
+ }
1518
+ );
1519
+ }
1520
+ function CalendarDayButton({
1521
+ className,
1522
+ day,
1523
+ modifiers,
1524
+ ...props
1525
+ }) {
1526
+ const ref = React.useRef(null);
1527
+ React.useEffect(() => {
1528
+ if (modifiers.focused) ref.current?.focus();
1529
+ }, [modifiers.focused]);
1530
+ return /* @__PURE__ */ jsx17(
1531
+ "button",
1532
+ {
1533
+ ref,
1534
+ type: "button",
1535
+ "data-day": day.date.toLocaleDateString(),
1536
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1537
+ "data-range-start": modifiers.range_start,
1538
+ "data-range-end": modifiers.range_end,
1539
+ "data-range-middle": modifiers.range_middle,
1540
+ className: cn(
1541
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
1542
+ "hover:bg-accent hover:text-accent-foreground",
1543
+ "focus-visible:ring-2 focus-visible:ring-foreground/10 focus-visible:outline-none",
1544
+ "disabled:pointer-events-none disabled:opacity-50",
1545
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground",
1546
+ "data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground",
1547
+ "data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground",
1548
+ "data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground",
1549
+ className
1550
+ ),
1551
+ ...props
1552
+ }
1553
+ );
1554
+ }
1555
+
1556
+ // src/ui/combobox.tsx
1557
+ import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
1558
+ import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
1559
+ function Combobox({
1560
+ ...props
1561
+ }) {
1562
+ return /* @__PURE__ */ jsx18(Popover, { "data-slot": "combobox", ...props });
1563
+ }
1564
+ function ComboboxTrigger({
1565
+ className,
1566
+ size = "default",
1567
+ children,
1568
+ ...props
1569
+ }) {
1570
+ return /* @__PURE__ */ jsxs8(
1571
+ PopoverTrigger,
1572
+ {
1573
+ "data-slot": "combobox-trigger",
1574
+ className: cn(
1575
+ controlClass({ size }),
1576
+ "flex w-full items-center justify-between gap-2 whitespace-nowrap font-normal",
1577
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
1578
+ className
1579
+ ),
1580
+ ...props,
1581
+ children: [
1582
+ /* @__PURE__ */ jsx18("span", { className: "truncate", children }),
1583
+ /* @__PURE__ */ jsx18(ChevronDownIcon3, { className: "size-4 shrink-0 opacity-50" })
1584
+ ]
1585
+ }
1586
+ );
1587
+ }
1588
+ function ComboboxAnchor({
1589
+ ...props
1590
+ }) {
1591
+ return /* @__PURE__ */ jsx18(PopoverAnchor, { "data-slot": "combobox-anchor", ...props });
1592
+ }
1593
+ function ComboboxContent({
1594
+ className,
1595
+ align = "start",
1596
+ ...props
1597
+ }) {
1598
+ return /* @__PURE__ */ jsx18(
1599
+ PopoverContent,
1600
+ {
1601
+ "data-slot": "combobox-content",
1602
+ variant: "list",
1603
+ align,
1604
+ className: cn(
1605
+ "w-[var(--radix-popover-trigger-width)] min-w-[8rem] p-0",
1606
+ className
1607
+ ),
1608
+ ...props
1609
+ }
1610
+ );
1611
+ }
1612
+ function ComboboxCommand({
1613
+ className,
1614
+ ...props
1615
+ }) {
1616
+ return /* @__PURE__ */ jsx18(
1617
+ Command,
1618
+ {
1619
+ "data-slot": "combobox-command",
1620
+ className,
1621
+ ...props
1622
+ }
1623
+ );
1624
+ }
1625
+ function ComboboxInput({
1626
+ ...props
1627
+ }) {
1628
+ return /* @__PURE__ */ jsx18(CommandInput, { "data-slot": "combobox-input", ...props });
1629
+ }
1630
+ function ComboboxList({
1631
+ ...props
1632
+ }) {
1633
+ return /* @__PURE__ */ jsx18(CommandList, { "data-slot": "combobox-list", ...props });
1634
+ }
1635
+ function ComboboxEmpty({
1636
+ ...props
1637
+ }) {
1638
+ return /* @__PURE__ */ jsx18(CommandEmpty, { "data-slot": "combobox-empty", ...props });
1639
+ }
1640
+ function ComboboxGroup({
1641
+ ...props
1642
+ }) {
1643
+ return /* @__PURE__ */ jsx18(CommandGroup, { "data-slot": "combobox-group", ...props });
1644
+ }
1645
+ function ComboboxItem({
1646
+ ...props
1647
+ }) {
1648
+ return /* @__PURE__ */ jsx18(CommandItem, { "data-slot": "combobox-item", ...props });
1649
+ }
1650
+ function ComboboxSeparator({
1651
+ ...props
1652
+ }) {
1653
+ return /* @__PURE__ */ jsx18(CommandSeparator, { "data-slot": "combobox-separator", ...props });
1654
+ }
1655
+ function ComboboxShortcut({
1656
+ ...props
1657
+ }) {
1658
+ return /* @__PURE__ */ jsx18(CommandShortcut, { "data-slot": "combobox-shortcut", ...props });
1659
+ }
1660
+
1661
+ // src/ui/date-picker.tsx
1662
+ import { CalendarIcon } from "lucide-react";
1663
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
1664
+ function DatePicker({
1665
+ ...props
1666
+ }) {
1667
+ return /* @__PURE__ */ jsx19(Popover, { "data-slot": "date-picker", ...props });
1668
+ }
1669
+ function DatePickerTrigger({
1670
+ ...props
1671
+ }) {
1672
+ return /* @__PURE__ */ jsx19(PopoverTrigger, { "data-slot": "date-picker-trigger", ...props });
1673
+ }
1674
+ function DatePickerContent({
1675
+ className,
1676
+ align = "start",
1677
+ ...props
1678
+ }) {
1679
+ return /* @__PURE__ */ jsx19(
1680
+ PopoverContent,
1681
+ {
1682
+ "data-slot": "date-picker-content",
1683
+ align,
1684
+ className: cn("w-auto p-0", className),
1685
+ ...props
1686
+ }
1687
+ );
1688
+ }
1689
+ function DatePickerCalendar({
1690
+ className,
1691
+ ...props
1692
+ }) {
1693
+ return /* @__PURE__ */ jsx19(
1694
+ Calendar,
1695
+ {
1696
+ "data-slot": "date-picker-calendar",
1697
+ className: cn("rounded-lg border-0", className),
1698
+ ...props
1699
+ }
1700
+ );
1701
+ }
1702
+ function formatPickerDate(date) {
1703
+ return date.toLocaleDateString(void 0, {
1704
+ month: "short",
1705
+ day: "numeric",
1706
+ year: "numeric"
1707
+ });
1708
+ }
1709
+ function DatePickerButton({
1710
+ date,
1711
+ placeholder = "Pick a date",
1712
+ className,
1713
+ ...props
1714
+ }) {
1715
+ return /* @__PURE__ */ jsxs9(
1716
+ "button",
1717
+ {
1718
+ type: "button",
1719
+ "data-slot": "date-picker-button",
1720
+ className: cn(
1721
+ controlClass(),
1722
+ "flex w-full items-center justify-start gap-2 text-left font-normal",
1723
+ !date && "text-muted-foreground",
1724
+ className
1725
+ ),
1726
+ ...props,
1727
+ children: [
1728
+ /* @__PURE__ */ jsx19(CalendarIcon, { className: "size-4 shrink-0 opacity-70" }),
1729
+ date ? formatPickerDate(date) : placeholder
1730
+ ]
1731
+ }
1732
+ );
1733
+ }
1734
+
1735
+ // src/ui/input-otp.tsx
1736
+ import { MinusIcon } from "lucide-react";
1737
+ import { unstable_OneTimePasswordField as OTPField } from "radix-ui";
1738
+ import { jsx as jsx20 } from "react/jsx-runtime";
1739
+ function InputOTP({
1740
+ className,
1741
+ containerClassName,
1742
+ children,
1743
+ ...props
1744
+ }) {
1745
+ return /* @__PURE__ */ jsx20(
1746
+ OTPField.Root,
1747
+ {
1748
+ "data-slot": "input-otp",
1749
+ className: cn(
1750
+ "flex items-center gap-2 has-disabled:opacity-50",
1751
+ containerClassName,
1752
+ className
1753
+ ),
1754
+ ...props,
1755
+ children
1756
+ }
1757
+ );
1758
+ }
1759
+ function InputOTPGroup({
1760
+ className,
1761
+ ...props
1762
+ }) {
1763
+ return /* @__PURE__ */ jsx20(
1764
+ "div",
1765
+ {
1766
+ "data-slot": "input-otp-group",
1767
+ className: cn("flex items-center", className),
1768
+ ...props
1769
+ }
1770
+ );
1771
+ }
1772
+ function InputOTPSlot({
1773
+ className,
1774
+ ...props
1775
+ }) {
1776
+ return /* @__PURE__ */ jsx20(
1777
+ OTPField.Input,
1778
+ {
1779
+ "data-slot": "input-otp-slot",
1780
+ className: cn(
1781
+ controlSurfaceClass,
1782
+ "relative size-9 rounded-none text-center text-sm tabular-nums",
1783
+ "-ms-px first:ms-0 first:rounded-s-lg last:rounded-e-lg",
1784
+ "focus-visible:z-10",
1785
+ className
1786
+ ),
1787
+ ...props
1788
+ }
1789
+ );
1790
+ }
1791
+ function InputOTPHiddenInput({
1792
+ ...props
1793
+ }) {
1794
+ return /* @__PURE__ */ jsx20(OTPField.HiddenInput, { "data-slot": "input-otp-hidden-input", ...props });
1795
+ }
1796
+ function InputOTPSeparator({
1797
+ className,
1798
+ ...props
1799
+ }) {
1800
+ return /* @__PURE__ */ jsx20(
1801
+ "div",
1802
+ {
1803
+ role: "separator",
1804
+ "data-slot": "input-otp-separator",
1805
+ "aria-hidden": true,
1806
+ className: cn("text-muted-foreground", className),
1807
+ ...props,
1808
+ children: /* @__PURE__ */ jsx20(MinusIcon, { className: "size-4" })
1809
+ }
1810
+ );
1811
+ }
1812
+
1813
+ // src/ui/kbd.tsx
1814
+ import { jsx as jsx21 } from "react/jsx-runtime";
1815
+ function Kbd({ className, ...props }) {
1816
+ return /* @__PURE__ */ jsx21(
1817
+ "kbd",
1818
+ {
1819
+ "data-slot": "kbd",
1820
+ className: cn(
1821
+ "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",
1822
+ className
1823
+ ),
1824
+ ...props
1825
+ }
1826
+ );
1827
+ }
1828
+ function KbdGroup({ className, ...props }) {
1829
+ return /* @__PURE__ */ jsx21(
1830
+ "div",
1831
+ {
1832
+ "data-slot": "kbd-group",
1833
+ className: cn("inline-flex items-center gap-1", className),
1834
+ ...props
1835
+ }
1836
+ );
1837
+ }
1838
+
1839
+ // src/ui/spinner.tsx
1840
+ import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1841
+ function Spinner({
1842
+ className,
1843
+ ...props
1844
+ }) {
1845
+ return /* @__PURE__ */ jsxs10(
1846
+ "svg",
1847
+ {
1848
+ "data-slot": "spinner",
1849
+ role: "status",
1850
+ "aria-label": "Loading",
1851
+ viewBox: "0 0 24 24",
1852
+ fill: "none",
1853
+ className: cn("size-4 animate-spin text-muted-foreground", className),
1854
+ ...props,
1855
+ children: [
1856
+ /* @__PURE__ */ jsx22(
1857
+ "circle",
1858
+ {
1859
+ className: "opacity-25",
1860
+ cx: "12",
1861
+ cy: "12",
1862
+ r: "10",
1863
+ stroke: "currentColor",
1864
+ strokeWidth: "3"
1865
+ }
1866
+ ),
1867
+ /* @__PURE__ */ jsx22(
1868
+ "path",
1869
+ {
1870
+ className: "opacity-75",
1871
+ fill: "currentColor",
1872
+ 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"
1873
+ }
1874
+ )
1875
+ ]
1876
+ }
1877
+ );
1878
+ }
1879
+
1880
+ // src/ui/input-group.tsx
1881
+ import { jsx as jsx23 } from "react/jsx-runtime";
1882
+ function InputGroup({
1883
+ className,
1884
+ ...props
1885
+ }) {
1886
+ return /* @__PURE__ */ jsx23(
1887
+ "div",
1888
+ {
1889
+ "data-slot": "input-group",
1890
+ className: cn(
1891
+ controlClass(),
1892
+ "flex w-full items-stretch overflow-hidden p-0",
1893
+ "has-[[data-slot=input-group-control]:disabled]:opacity-50",
1894
+ className
1895
+ ),
1896
+ ...props
1897
+ }
1898
+ );
1899
+ }
1900
+ function InputGroupAddon({
1901
+ className,
1902
+ align = "inline-start",
1903
+ ...props
1904
+ }) {
1905
+ return /* @__PURE__ */ jsx23(
1906
+ "div",
1907
+ {
1908
+ "data-slot": "input-group-addon",
1909
+ "data-align": align,
1910
+ className: cn(
1911
+ "flex shrink-0 items-center bg-transparent px-3 text-sm text-muted-foreground",
1912
+ align === "inline-start" && "border-r border-border",
1913
+ align === "inline-end" && "border-l border-border",
1914
+ className
1915
+ ),
1916
+ ...props
1917
+ }
1918
+ );
1919
+ }
1920
+ function InputGroupInput({
1921
+ className,
1922
+ ...props
1923
+ }) {
1924
+ return /* @__PURE__ */ jsx23(
1925
+ "input",
1926
+ {
1927
+ "data-slot": "input-group-control",
1928
+ className: cn(
1929
+ "min-w-0 flex-1 border-0 bg-transparent px-3 py-2 text-sm text-foreground shadow-none outline-none",
1930
+ "placeholder:text-muted-foreground/70 focus-visible:ring-0",
1931
+ className
1932
+ ),
1933
+ ...props
1934
+ }
1935
+ );
1936
+ }
1937
+ function InputGroupText({
1938
+ className,
1939
+ ...props
1940
+ }) {
1941
+ return /* @__PURE__ */ jsx23(
1942
+ "span",
1943
+ {
1944
+ "data-slot": "input-group-text",
1945
+ className: cn("text-sm text-muted-foreground", className),
1946
+ ...props
1947
+ }
1948
+ );
1949
+ }
1950
+
1951
+ // src/ui/accordion.tsx
1952
+ import { Accordion as AccordionPrimitive } from "radix-ui";
1953
+ import { ChevronDownIcon as ChevronDownIcon4 } from "lucide-react";
1954
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
1955
+ function Accordion({
1956
+ ...props
1957
+ }) {
1958
+ return /* @__PURE__ */ jsx24(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
1959
+ }
1960
+ function AccordionItem({
1961
+ className,
1962
+ ...props
1963
+ }) {
1964
+ return /* @__PURE__ */ jsx24(
1965
+ AccordionPrimitive.Item,
1966
+ {
1967
+ "data-slot": "accordion-item",
1968
+ className: cn("border-b border-border last:border-b-0", className),
1969
+ ...props
1970
+ }
1971
+ );
1972
+ }
1973
+ function AccordionTrigger({
1974
+ className,
1975
+ children,
1976
+ ...props
1977
+ }) {
1978
+ return /* @__PURE__ */ jsx24(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs11(
1979
+ AccordionPrimitive.Trigger,
1980
+ {
1981
+ "data-slot": "accordion-trigger",
1982
+ className: cn(
1983
+ "flex flex-1 items-center justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all",
1984
+ "focus-visible:ring-2 focus-visible:ring-foreground/10 disabled:pointer-events-none disabled:opacity-50",
1985
+ "hover:underline [&[data-state=open]>svg]:rotate-180",
1986
+ className
1987
+ ),
1988
+ ...props,
1989
+ children: [
1990
+ children,
1991
+ /* @__PURE__ */ jsx24(ChevronDownIcon4, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
1992
+ ]
1993
+ }
1994
+ ) });
1995
+ }
1996
+ function AccordionContent({
1997
+ className,
1998
+ children,
1999
+ ...props
2000
+ }) {
2001
+ return /* @__PURE__ */ jsx24(
2002
+ AccordionPrimitive.Content,
2003
+ {
2004
+ "data-slot": "accordion-content",
2005
+ className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
2006
+ ...props,
2007
+ children: /* @__PURE__ */ jsx24("div", { className: cn("pt-0 pb-4", className), children })
2008
+ }
2009
+ );
2010
+ }
2011
+
2012
+ // src/ui/separator.tsx
2013
+ import { Separator as SeparatorPrimitive } from "radix-ui";
2014
+ import { jsx as jsx25 } from "react/jsx-runtime";
2015
+ function Separator({
2016
+ className,
2017
+ orientation = "horizontal",
2018
+ decorative = true,
2019
+ ...props
2020
+ }) {
2021
+ return /* @__PURE__ */ jsx25(
2022
+ SeparatorPrimitive.Root,
2023
+ {
2024
+ "data-slot": "separator",
2025
+ decorative,
2026
+ orientation,
2027
+ className: cn(
2028
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
2029
+ className
2030
+ ),
2031
+ ...props
2032
+ }
2033
+ );
2034
+ }
2035
+
2036
+ // src/ui/slider.tsx
2037
+ import * as React2 from "react";
2038
+ import { Slider as SliderPrimitive } from "radix-ui";
2039
+ import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
2040
+ function Slider({
2041
+ className,
2042
+ defaultValue,
2043
+ value,
2044
+ min = 0,
2045
+ max = 100,
2046
+ ...props
2047
+ }) {
2048
+ const thumbs = React2.useMemo(() => {
2049
+ if (Array.isArray(value)) return value;
2050
+ if (Array.isArray(defaultValue)) return defaultValue;
2051
+ return [min];
2052
+ }, [value, defaultValue, min]);
2053
+ return /* @__PURE__ */ jsxs12(
2054
+ SliderPrimitive.Root,
2055
+ {
2056
+ "data-slot": "slider",
2057
+ defaultValue,
2058
+ value,
2059
+ min,
2060
+ max,
2061
+ className: cn(
2062
+ "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",
2063
+ "data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
2064
+ className
2065
+ ),
2066
+ ...props,
2067
+ children: [
2068
+ /* @__PURE__ */ jsx26(
2069
+ SliderPrimitive.Track,
2070
+ {
2071
+ "data-slot": "slider-track",
2072
+ 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",
2073
+ children: /* @__PURE__ */ jsx26(
2074
+ SliderPrimitive.Range,
2075
+ {
2076
+ "data-slot": "slider-range",
2077
+ className: "absolute bg-gradient-to-b from-primary-fill-from to-primary-fill-to data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
2078
+ }
2079
+ )
2080
+ }
2081
+ ),
2082
+ Array.from({ length: thumbs.length }, (_, i) => /* @__PURE__ */ jsx26(
2083
+ SliderPrimitive.Thumb,
2084
+ {
2085
+ "data-slot": "slider-thumb",
2086
+ 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"
2087
+ },
2088
+ i
2089
+ ))
2090
+ ]
2091
+ }
2092
+ );
2093
+ }
2094
+
2095
+ // src/ui/progress.tsx
2096
+ import { Progress as ProgressPrimitive } from "radix-ui";
2097
+ import { jsx as jsx27 } from "react/jsx-runtime";
2098
+ function Progress({
2099
+ className,
2100
+ value,
2101
+ ...props
2102
+ }) {
2103
+ return /* @__PURE__ */ jsx27(
2104
+ ProgressPrimitive.Root,
2105
+ {
2106
+ "data-slot": "progress",
2107
+ className: cn(
2108
+ "relative h-2 w-full overflow-hidden rounded-full bg-muted",
2109
+ className
2110
+ ),
2111
+ ...props,
2112
+ children: /* @__PURE__ */ jsx27(
2113
+ ProgressPrimitive.Indicator,
2114
+ {
2115
+ "data-slot": "progress-indicator",
2116
+ className: "h-full w-full flex-1 bg-gradient-to-b from-primary-fill-from to-primary-fill-to transition-transform",
2117
+ style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
2118
+ }
2119
+ )
2120
+ }
2121
+ );
2122
+ }
2123
+
2124
+ // src/ui/badge.tsx
2125
+ import { Slot as Slot2 } from "radix-ui";
2126
+ import { cva as cva2 } from "class-variance-authority";
2127
+ import { jsx as jsx28 } from "react/jsx-runtime";
2128
+ var badgeVariants = cva2(
2129
+ "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",
2130
+ {
2131
+ variants: {
2132
+ variant: {
2133
+ default: "border-transparent bg-gradient-to-b from-primary-fill-from to-primary-fill-to text-primary-foreground",
2134
+ secondary: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
2135
+ destructive: "border-destructive/45 bg-destructive/10 text-destructive",
2136
+ outline: "border-border text-foreground"
2137
+ }
2138
+ },
2139
+ defaultVariants: {
2140
+ variant: "default"
2141
+ }
2142
+ }
2143
+ );
2144
+ function Badge({
2145
+ className,
2146
+ variant,
2147
+ asChild = false,
2148
+ ...props
2149
+ }) {
2150
+ const Comp = asChild ? Slot2.Root : "span";
2151
+ return /* @__PURE__ */ jsx28(
2152
+ Comp,
2153
+ {
2154
+ "data-slot": "badge",
2155
+ className: cn(badgeVariants({ variant }), className),
2156
+ ...props
2157
+ }
2158
+ );
2159
+ }
2160
+
2161
+ // src/ui/sheet.tsx
2162
+ import { XIcon } from "lucide-react";
2163
+ import { Dialog as SheetPrimitive } from "radix-ui";
2164
+ import { cva as cva3 } from "class-variance-authority";
2165
+ import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
2166
+ function Sheet({ ...props }) {
2167
+ return /* @__PURE__ */ jsx29(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
2168
+ }
2169
+ function SheetTrigger({
2170
+ ...props
2171
+ }) {
2172
+ return /* @__PURE__ */ jsx29(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
2173
+ }
2174
+ function SheetClose({
2175
+ ...props
2176
+ }) {
2177
+ return /* @__PURE__ */ jsx29(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
2178
+ }
2179
+ function SheetPortal({
2180
+ ...props
2181
+ }) {
2182
+ return /* @__PURE__ */ jsx29(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
2183
+ }
2184
+ function SheetOverlay({
2185
+ className,
2186
+ ...props
2187
+ }) {
2188
+ return /* @__PURE__ */ jsx29(
2189
+ SheetPrimitive.Overlay,
2190
+ {
2191
+ "data-slot": "sheet-overlay",
2192
+ className: cn(
2193
+ "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",
2194
+ className
2195
+ ),
2196
+ ...props
2197
+ }
2198
+ );
2199
+ }
2200
+ var sheetContentVariants = cva3(
2201
+ cn(
2202
+ TIMBAL_V2_MODAL_SURFACE,
2203
+ "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"
2204
+ ),
2205
+ {
2206
+ variants: {
2207
+ side: {
2208
+ top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b p-6",
2209
+ bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t p-6",
2210
+ 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",
2211
+ 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"
2212
+ }
2213
+ },
2214
+ defaultVariants: {
2215
+ side: "right"
2216
+ }
2217
+ }
2218
+ );
2219
+ function SheetContent({
2220
+ className,
2221
+ children,
2222
+ side = "right",
2223
+ showCloseButton = true,
2224
+ ...props
2225
+ }) {
2226
+ return /* @__PURE__ */ jsxs13(SheetPortal, { children: [
2227
+ /* @__PURE__ */ jsx29(SheetOverlay, {}),
2228
+ /* @__PURE__ */ jsxs13(
2229
+ SheetPrimitive.Content,
2230
+ {
2231
+ "data-slot": "sheet-content",
2232
+ className: cn(sheetContentVariants({ side }), className),
2233
+ ...props,
2234
+ children: [
2235
+ children,
2236
+ showCloseButton ? /* @__PURE__ */ jsxs13(SheetPrimitive.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: [
2237
+ /* @__PURE__ */ jsx29(XIcon, { className: "size-4" }),
2238
+ /* @__PURE__ */ jsx29("span", { className: "sr-only", children: "Close" })
2239
+ ] }) : null
2240
+ ]
2241
+ }
2242
+ )
2243
+ ] });
2244
+ }
2245
+ function SheetHeader({ className, ...props }) {
2246
+ return /* @__PURE__ */ jsx29(
2247
+ "div",
2248
+ {
2249
+ "data-slot": "sheet-header",
2250
+ className: cn("flex flex-col gap-1.5 p-0", className),
2251
+ ...props
2252
+ }
2253
+ );
2254
+ }
2255
+ function SheetFooter({ className, ...props }) {
2256
+ return /* @__PURE__ */ jsx29(
2257
+ "div",
2258
+ {
2259
+ "data-slot": "sheet-footer",
2260
+ className: cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end", className),
2261
+ ...props
2262
+ }
2263
+ );
2264
+ }
2265
+ function SheetTitle({
2266
+ className,
2267
+ ...props
2268
+ }) {
2269
+ return /* @__PURE__ */ jsx29(
2270
+ SheetPrimitive.Title,
2271
+ {
2272
+ "data-slot": "sheet-title",
2273
+ className: cn("text-lg font-semibold text-foreground", className),
2274
+ ...props
2275
+ }
2276
+ );
2277
+ }
2278
+ function SheetDescription({
2279
+ className,
2280
+ ...props
2281
+ }) {
2282
+ return /* @__PURE__ */ jsx29(
2283
+ SheetPrimitive.Description,
2284
+ {
2285
+ "data-slot": "sheet-description",
2286
+ className: cn("text-sm text-muted-foreground", className),
2287
+ ...props
2288
+ }
2289
+ );
2290
+ }
2291
+
2292
+ // src/ui/alert-dialog.tsx
2293
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
2294
+ import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
2295
+ function AlertDialog({
2296
+ ...props
2297
+ }) {
2298
+ return /* @__PURE__ */ jsx30(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
2299
+ }
2300
+ function AlertDialogTrigger({
2301
+ ...props
2302
+ }) {
2303
+ return /* @__PURE__ */ jsx30(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
2304
+ }
2305
+ function AlertDialogPortal({
2306
+ ...props
2307
+ }) {
2308
+ return /* @__PURE__ */ jsx30(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
2309
+ }
2310
+ function AlertDialogOverlay({
2311
+ className,
2312
+ ...props
2313
+ }) {
2314
+ return /* @__PURE__ */ jsx30(
2315
+ AlertDialogPrimitive.Overlay,
2316
+ {
2317
+ "data-slot": "alert-dialog-overlay",
2318
+ className: cn(
2319
+ "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",
2320
+ className
2321
+ ),
2322
+ ...props
2323
+ }
2324
+ );
2325
+ }
2326
+ function AlertDialogContent({
2327
+ className,
2328
+ ...props
2329
+ }) {
2330
+ return /* @__PURE__ */ jsxs14(AlertDialogPortal, { children: [
2331
+ /* @__PURE__ */ jsx30(AlertDialogOverlay, {}),
2332
+ /* @__PURE__ */ jsx30(
2333
+ AlertDialogPrimitive.Content,
2334
+ {
2335
+ "data-slot": "alert-dialog-content",
2336
+ className: cn(
2337
+ TIMBAL_V2_MODAL_SURFACE,
2338
+ "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",
2339
+ className
2340
+ ),
2341
+ ...props
2342
+ }
2343
+ )
2344
+ ] });
2345
+ }
2346
+ function AlertDialogHeader({ className, ...props }) {
2347
+ return /* @__PURE__ */ jsx30(
2348
+ "div",
2349
+ {
2350
+ "data-slot": "alert-dialog-header",
2351
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
2352
+ ...props
2353
+ }
2354
+ );
2355
+ }
2356
+ function AlertDialogFooter({ className, ...props }) {
2357
+ return /* @__PURE__ */ jsx30(
2358
+ "div",
2359
+ {
2360
+ "data-slot": "alert-dialog-footer",
2361
+ className: cn(
2362
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
2363
+ className
2364
+ ),
2365
+ ...props
2366
+ }
2367
+ );
2368
+ }
2369
+ function AlertDialogTitle({
2370
+ className,
2371
+ ...props
2372
+ }) {
2373
+ return /* @__PURE__ */ jsx30(
2374
+ AlertDialogPrimitive.Title,
2375
+ {
2376
+ "data-slot": "alert-dialog-title",
2377
+ className: cn("text-lg font-semibold", className),
2378
+ ...props
2379
+ }
2380
+ );
2381
+ }
2382
+ function AlertDialogDescription({
2383
+ className,
2384
+ ...props
2385
+ }) {
2386
+ return /* @__PURE__ */ jsx30(
2387
+ AlertDialogPrimitive.Description,
2388
+ {
2389
+ "data-slot": "alert-dialog-description",
2390
+ className: cn("text-sm text-muted-foreground", className),
2391
+ ...props
2392
+ }
2393
+ );
2394
+ }
2395
+ function AlertDialogAction({
2396
+ className,
2397
+ ...props
2398
+ }) {
2399
+ return /* @__PURE__ */ jsx30(Button, { asChild: true, children: /* @__PURE__ */ jsx30(
2400
+ AlertDialogPrimitive.Action,
2401
+ {
2402
+ "data-slot": "alert-dialog-action",
2403
+ className,
2404
+ ...props
2405
+ }
2406
+ ) });
2407
+ }
2408
+ function AlertDialogCancel({
2409
+ className,
2410
+ ...props
2411
+ }) {
2412
+ return /* @__PURE__ */ jsx30(Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ jsx30(
2413
+ AlertDialogPrimitive.Cancel,
2414
+ {
2415
+ "data-slot": "alert-dialog-cancel",
2416
+ className,
2417
+ ...props
2418
+ }
2419
+ ) });
2420
+ }
2421
+
2422
+ // src/ui/collapsible.tsx
2423
+ import { Collapsible as CollapsiblePrimitive } from "radix-ui";
2424
+ import { jsx as jsx31 } from "react/jsx-runtime";
2425
+ function Collapsible({
2426
+ ...props
2427
+ }) {
2428
+ return /* @__PURE__ */ jsx31(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
2429
+ }
2430
+ function CollapsibleTrigger({
2431
+ ...props
2432
+ }) {
2433
+ return /* @__PURE__ */ jsx31(CollapsiblePrimitive.Trigger, { "data-slot": "collapsible-trigger", ...props });
2434
+ }
2435
+ function CollapsibleContent({
2436
+ className,
2437
+ ...props
2438
+ }) {
2439
+ return /* @__PURE__ */ jsx31(
2440
+ CollapsiblePrimitive.Content,
2441
+ {
2442
+ "data-slot": "collapsible-content",
2443
+ className: cn(
2444
+ "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
2445
+ className
2446
+ ),
2447
+ ...props
2448
+ }
2449
+ );
2450
+ }
2451
+
2452
+ // src/ui/scroll-area.tsx
2453
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
2454
+ import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
2455
+ function ScrollArea({
2456
+ className,
2457
+ children,
2458
+ ...props
2459
+ }) {
2460
+ return /* @__PURE__ */ jsxs15(
2461
+ ScrollAreaPrimitive.Root,
2462
+ {
2463
+ "data-slot": "scroll-area",
2464
+ className: cn("relative overflow-hidden", className),
2465
+ ...props,
2466
+ children: [
2467
+ /* @__PURE__ */ jsx32(
2468
+ ScrollAreaPrimitive.Viewport,
2469
+ {
2470
+ "data-slot": "scroll-area-viewport",
2471
+ className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-2 focus-visible:ring-foreground/10",
2472
+ children
2473
+ }
2474
+ ),
2475
+ /* @__PURE__ */ jsx32(ScrollBar, {}),
2476
+ /* @__PURE__ */ jsx32(ScrollAreaPrimitive.Corner, {})
2477
+ ]
2478
+ }
2479
+ );
2480
+ }
2481
+ function ScrollBar({
2482
+ className,
2483
+ orientation = "vertical",
2484
+ ...props
2485
+ }) {
2486
+ return /* @__PURE__ */ jsx32(
2487
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
2488
+ {
2489
+ "data-slot": "scroll-area-scrollbar",
2490
+ orientation,
2491
+ className: cn(
2492
+ "flex touch-none p-px transition-colors select-none",
2493
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
2494
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
2495
+ className
2496
+ ),
2497
+ ...props,
2498
+ children: /* @__PURE__ */ jsx32(
2499
+ ScrollAreaPrimitive.ScrollAreaThumb,
2500
+ {
2501
+ "data-slot": "scroll-area-thumb",
2502
+ className: "relative flex-1 rounded-full bg-border"
2503
+ }
2504
+ )
2505
+ }
2506
+ );
2507
+ }
2508
+
2509
+ // src/ui/toggle.tsx
2510
+ import { Toggle as TogglePrimitive } from "radix-ui";
2511
+ import { cva as cva4 } from "class-variance-authority";
2512
+ import { jsx as jsx33 } from "react/jsx-runtime";
2513
+ var toggleVariants = cva4(
2514
+ "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",
2515
+ {
2516
+ variants: {
2517
+ variant: {
2518
+ default: cn(
2519
+ "border border-border bg-gradient-to-b from-elevated-from to-elevated-to shadow-card",
2520
+ "hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to",
2521
+ "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",
2522
+ "focus-visible:ring-2 focus-visible:ring-foreground/10"
2523
+ ),
2524
+ outline: cn(
2525
+ "border border-border bg-transparent",
2526
+ "hover:bg-muted hover:text-foreground",
2527
+ "data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
2528
+ "focus-visible:ring-2 focus-visible:ring-foreground/10"
2529
+ )
2530
+ },
2531
+ size: {
2532
+ default: "h-10 px-3 min-w-10",
2533
+ sm: "h-9 px-2.5 min-w-9",
2534
+ lg: "h-11 px-5 min-w-11"
2535
+ }
2536
+ },
2537
+ defaultVariants: {
2538
+ variant: "default",
2539
+ size: "default"
2540
+ }
2541
+ }
2542
+ );
2543
+ function Toggle({
2544
+ className,
2545
+ variant,
2546
+ size,
2547
+ ...props
2548
+ }) {
2549
+ return /* @__PURE__ */ jsx33(
2550
+ TogglePrimitive.Root,
2551
+ {
2552
+ "data-slot": "toggle",
2553
+ className: cn(toggleVariants({ variant, size, className })),
2554
+ ...props
2555
+ }
2556
+ );
2557
+ }
2558
+
2559
+ // src/ui/toggle-group.tsx
2560
+ import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
2561
+ import { jsx as jsx34 } from "react/jsx-runtime";
2562
+ function ToggleGroup({
2563
+ className,
2564
+ ...props
2565
+ }) {
2566
+ return /* @__PURE__ */ jsx34(
2567
+ ToggleGroupPrimitive.Root,
2568
+ {
2569
+ "data-slot": "toggle-group",
2570
+ className: cn("flex items-center gap-1", className),
2571
+ ...props
2572
+ }
2573
+ );
2574
+ }
2575
+ function ToggleGroupItem({
2576
+ className,
2577
+ ...props
2578
+ }) {
2579
+ return /* @__PURE__ */ jsx34(
2580
+ ToggleGroupPrimitive.Item,
2581
+ {
2582
+ "data-slot": "toggle-group-item",
2583
+ className: cn(toggleVariants({ variant: "default", size: "default" }), className),
2584
+ ...props
2585
+ }
2586
+ );
2587
+ }
2588
+
2589
+ // src/ui/hover-card.tsx
2590
+ import { HoverCard as HoverCardPrimitive } from "radix-ui";
2591
+ import { jsx as jsx35 } from "react/jsx-runtime";
2592
+ function HoverCard({
2593
+ ...props
2594
+ }) {
2595
+ return /* @__PURE__ */ jsx35(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
2596
+ }
2597
+ function HoverCardTrigger({
2598
+ ...props
2599
+ }) {
2600
+ return /* @__PURE__ */ jsx35(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
2601
+ }
2602
+ function HoverCardContent({
2603
+ className,
2604
+ align = "center",
2605
+ sideOffset = 4,
2606
+ ...props
2607
+ }) {
2608
+ return /* @__PURE__ */ jsx35(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx35(
2609
+ HoverCardPrimitive.Content,
2610
+ {
2611
+ "data-slot": "hover-card-content",
2612
+ align,
2613
+ sideOffset,
2614
+ className: cn(
2615
+ overlaySurfaceClass,
2616
+ "w-64 origin-[var(--radix-hover-card-content-transform-origin)] rounded-xl p-4 outline-hidden",
2617
+ className
2618
+ ),
2619
+ ...props
2620
+ }
2621
+ ) });
2622
+ }
2623
+
2624
+ // src/ui/context-menu.tsx
2625
+ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
2626
+ import { CheckIcon as CheckIcon4, ChevronRightIcon as ChevronRightIcon6, CircleIcon as CircleIcon4 } from "lucide-react";
2627
+ import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
2628
+ function ContextMenu({
2629
+ ...props
2630
+ }) {
2631
+ return /* @__PURE__ */ jsx36(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
2632
+ }
2633
+ function ContextMenuTrigger({
2634
+ ...props
2635
+ }) {
2636
+ return /* @__PURE__ */ jsx36(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
2637
+ }
2638
+ function ContextMenuGroup({
2639
+ ...props
2640
+ }) {
2641
+ return /* @__PURE__ */ jsx36(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
2642
+ }
2643
+ function ContextMenuContent({
2644
+ className,
2645
+ ...props
2646
+ }) {
2647
+ return /* @__PURE__ */ jsx36(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx36(
2648
+ ContextMenuPrimitive.Content,
2649
+ {
2650
+ "data-slot": "context-menu-content",
2651
+ className: cn(
2652
+ overlaySurfaceClass,
2653
+ "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",
2654
+ className
2655
+ ),
2656
+ ...props
2657
+ }
2658
+ ) });
2659
+ }
2660
+ function ContextMenuItem({
2661
+ className,
2662
+ inset,
2663
+ variant = "default",
2664
+ ...props
2665
+ }) {
2666
+ return /* @__PURE__ */ jsx36(
2667
+ ContextMenuPrimitive.Item,
2668
+ {
2669
+ "data-slot": "context-menu-item",
2670
+ "data-inset": inset,
2671
+ "data-variant": variant,
2672
+ className: cn(
2673
+ overlayItemClass,
2674
+ "data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10",
2675
+ className
2676
+ ),
2677
+ ...props
2678
+ }
2679
+ );
2680
+ }
2681
+ function ContextMenuCheckboxItem({
2682
+ className,
2683
+ children,
2684
+ checked,
2685
+ ...props
2686
+ }) {
2687
+ return /* @__PURE__ */ jsxs16(
2688
+ ContextMenuPrimitive.CheckboxItem,
2689
+ {
2690
+ "data-slot": "context-menu-checkbox-item",
2691
+ className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
2692
+ checked,
2693
+ ...props,
2694
+ children: [
2695
+ /* @__PURE__ */ jsx36("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx36(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx36(CheckIcon4, { className: "size-4" }) }) }),
2696
+ children
2697
+ ]
2698
+ }
2699
+ );
2700
+ }
2701
+ function ContextMenuRadioGroup({
2702
+ ...props
2703
+ }) {
2704
+ return /* @__PURE__ */ jsx36(
2705
+ ContextMenuPrimitive.RadioGroup,
2706
+ {
2707
+ "data-slot": "context-menu-radio-group",
2708
+ ...props
2709
+ }
2710
+ );
2711
+ }
2712
+ function ContextMenuRadioItem({
2713
+ className,
2714
+ children,
2715
+ ...props
2716
+ }) {
2717
+ return /* @__PURE__ */ jsxs16(
2718
+ ContextMenuPrimitive.RadioItem,
2719
+ {
2720
+ "data-slot": "context-menu-radio-item",
2721
+ className: cn(overlayItemClass, "py-1.5 pr-2 pl-8", className),
2722
+ ...props,
2723
+ children: [
2724
+ /* @__PURE__ */ jsx36("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx36(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx36(CircleIcon4, { className: "size-2 fill-current" }) }) }),
2725
+ children
2726
+ ]
2727
+ }
2728
+ );
2729
+ }
2730
+ function ContextMenuLabel({
2731
+ className,
2732
+ inset,
2733
+ ...props
2734
+ }) {
2735
+ return /* @__PURE__ */ jsx36(
2736
+ ContextMenuPrimitive.Label,
2737
+ {
2738
+ "data-slot": "context-menu-label",
2739
+ "data-inset": inset,
2740
+ className: cn(
2741
+ "px-2 py-1.5 text-xs font-medium text-muted-foreground data-[inset]:pl-8",
2742
+ className
2743
+ ),
2744
+ ...props
2745
+ }
2746
+ );
2747
+ }
2748
+ function ContextMenuSeparator({
2749
+ className,
2750
+ ...props
2751
+ }) {
2752
+ return /* @__PURE__ */ jsx36(
2753
+ ContextMenuPrimitive.Separator,
2754
+ {
2755
+ "data-slot": "context-menu-separator",
2756
+ className: cn("-mx-1 my-1 h-px bg-border", className),
2757
+ ...props
2758
+ }
2759
+ );
2760
+ }
2761
+ function ContextMenuShortcut({
2762
+ className,
2763
+ ...props
2764
+ }) {
2765
+ return /* @__PURE__ */ jsx36(
2766
+ "span",
2767
+ {
2768
+ "data-slot": "context-menu-shortcut",
2769
+ className: cn(
2770
+ "ml-auto text-xs tracking-widest text-muted-foreground",
2771
+ className
2772
+ ),
2773
+ ...props
2774
+ }
2775
+ );
2776
+ }
2777
+ function ContextMenuSub({
2778
+ ...props
2779
+ }) {
2780
+ return /* @__PURE__ */ jsx36(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
2781
+ }
2782
+ function ContextMenuSubTrigger({
2783
+ className,
2784
+ inset,
2785
+ children,
2786
+ ...props
2787
+ }) {
2788
+ return /* @__PURE__ */ jsxs16(
2789
+ ContextMenuPrimitive.SubTrigger,
2790
+ {
2791
+ "data-slot": "context-menu-sub-trigger",
2792
+ "data-inset": inset,
2793
+ className: cn(
2794
+ overlayItemClass,
2795
+ "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[inset]:pl-8",
2796
+ className
2797
+ ),
2798
+ ...props,
2799
+ children: [
2800
+ children,
2801
+ /* @__PURE__ */ jsx36(ChevronRightIcon6, { className: "ml-auto size-4" })
2802
+ ]
2803
+ }
2804
+ );
2805
+ }
2806
+ function ContextMenuSubContent({
2807
+ className,
2808
+ ...props
2809
+ }) {
2810
+ return /* @__PURE__ */ jsx36(
2811
+ ContextMenuPrimitive.SubContent,
2812
+ {
2813
+ "data-slot": "context-menu-sub-content",
2814
+ className: cn(
2815
+ overlaySurfaceClass,
2816
+ "min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-lg p-1",
2817
+ className
2818
+ ),
2819
+ ...props
2820
+ }
2821
+ );
2822
+ }
2823
+
2824
+ // src/ui/alert.tsx
2825
+ import { cva as cva5 } from "class-variance-authority";
2826
+ import { jsx as jsx37 } from "react/jsx-runtime";
2827
+ var alertVariants = cva5(
2828
+ "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",
2829
+ {
2830
+ variants: {
2831
+ variant: {
2832
+ default: "border-border bg-gradient-to-b from-elevated-from to-elevated-to text-foreground shadow-card",
2833
+ destructive: "border-destructive/45 bg-destructive/10 text-destructive [&>svg]:text-destructive"
2834
+ }
2835
+ },
2836
+ defaultVariants: {
2837
+ variant: "default"
2838
+ }
2839
+ }
2840
+ );
2841
+ function Alert({
2842
+ className,
2843
+ variant,
2844
+ ...props
2845
+ }) {
2846
+ return /* @__PURE__ */ jsx37(
2847
+ "div",
2848
+ {
2849
+ "data-slot": "alert",
2850
+ role: "alert",
2851
+ className: cn(alertVariants({ variant }), className),
2852
+ ...props
2853
+ }
2854
+ );
2855
+ }
2856
+ function AlertTitle({ className, ...props }) {
2857
+ return /* @__PURE__ */ jsx37(
2858
+ "div",
2859
+ {
2860
+ "data-slot": "alert-title",
2861
+ className: cn("font-medium tracking-tight", className),
2862
+ ...props
2863
+ }
2864
+ );
2865
+ }
2866
+ function AlertDescription({ className, ...props }) {
2867
+ return /* @__PURE__ */ jsx37(
2868
+ "div",
2869
+ {
2870
+ "data-slot": "alert-description",
2871
+ className: cn("text-sm text-muted-foreground [&_p]:leading-relaxed", className),
2872
+ ...props
2873
+ }
2874
+ );
2875
+ }
2876
+
2877
+ // src/ui/card.tsx
2878
+ import { jsx as jsx38 } from "react/jsx-runtime";
2879
+ function Card({ className, ...props }) {
2880
+ return /* @__PURE__ */ jsx38(
2881
+ "div",
2882
+ {
2883
+ "data-slot": "card",
2884
+ className: cn(
2885
+ TIMBAL_V2_ELEVATED_SURFACE,
2886
+ "flex flex-col gap-4 rounded-xl py-4 text-card-foreground",
2887
+ className
2888
+ ),
2889
+ ...props
2890
+ }
2891
+ );
2892
+ }
2893
+ function CardHeader({ className, ...props }) {
2894
+ return /* @__PURE__ */ jsx38(
2895
+ "div",
2896
+ {
2897
+ "data-slot": "card-header",
2898
+ className: cn("flex flex-col gap-1.5 px-4", className),
2899
+ ...props
2900
+ }
2901
+ );
2902
+ }
2903
+ function CardTitle({ className, ...props }) {
2904
+ return /* @__PURE__ */ jsx38(
2905
+ "div",
2906
+ {
2907
+ "data-slot": "card-title",
2908
+ className: cn("text-base font-semibold leading-none", className),
2909
+ ...props
2910
+ }
2911
+ );
2912
+ }
2913
+ function CardDescription({ className, ...props }) {
2914
+ return /* @__PURE__ */ jsx38(
2915
+ "div",
2916
+ {
2917
+ "data-slot": "card-description",
2918
+ className: cn("text-sm text-muted-foreground", className),
2919
+ ...props
2920
+ }
2921
+ );
2922
+ }
2923
+ function CardContent({ className, ...props }) {
2924
+ return /* @__PURE__ */ jsx38("div", { "data-slot": "card-content", className: cn("px-4", className), ...props });
2925
+ }
2926
+ function CardFooter({ className, ...props }) {
2927
+ return /* @__PURE__ */ jsx38(
2928
+ "div",
2929
+ {
2930
+ "data-slot": "card-footer",
2931
+ className: cn("flex items-center px-4", className),
2932
+ ...props
2933
+ }
2934
+ );
2935
+ }
2936
+
2937
+ // src/ui/table.tsx
2938
+ import { jsx as jsx39 } from "react/jsx-runtime";
2939
+ function Table({ className, ...props }) {
2940
+ return /* @__PURE__ */ jsx39("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx39(
2941
+ "table",
2942
+ {
2943
+ "data-slot": "table",
2944
+ className: cn("w-full caption-bottom text-sm", className),
2945
+ ...props
2946
+ }
2947
+ ) });
2948
+ }
2949
+ function TableHeader({ className, ...props }) {
2950
+ return /* @__PURE__ */ jsx39(
2951
+ "thead",
2952
+ {
2953
+ "data-slot": "table-header",
2954
+ className: cn("[&_tr]:border-b [&_tr]:border-border", className),
2955
+ ...props
2956
+ }
2957
+ );
2958
+ }
2959
+ function TableBody({ className, ...props }) {
2960
+ return /* @__PURE__ */ jsx39(
2961
+ "tbody",
2962
+ {
2963
+ "data-slot": "table-body",
2964
+ className: cn("[&_tr:last-child]:border-0", className),
2965
+ ...props
2966
+ }
2967
+ );
2968
+ }
2969
+ function TableFooter({ className, ...props }) {
2970
+ return /* @__PURE__ */ jsx39(
2971
+ "tfoot",
2972
+ {
2973
+ "data-slot": "table-footer",
2974
+ className: cn(
2975
+ "border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
2976
+ className
2977
+ ),
2978
+ ...props
2979
+ }
2980
+ );
2981
+ }
2982
+ function TableRow({ className, ...props }) {
2983
+ return /* @__PURE__ */ jsx39(
2984
+ "tr",
2985
+ {
2986
+ "data-slot": "table-row",
2987
+ className: cn(
2988
+ "border-b border-border transition-colors hover:bg-muted/40 data-[state=selected]:bg-muted",
2989
+ className
2990
+ ),
2991
+ ...props
2992
+ }
2993
+ );
2994
+ }
2995
+ function TableHead({ className, ...props }) {
2996
+ return /* @__PURE__ */ jsx39(
2997
+ "th",
2998
+ {
2999
+ "data-slot": "table-head",
3000
+ className: cn(
3001
+ "h-10 px-3 text-left align-middle text-xs font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
3002
+ className
3003
+ ),
3004
+ ...props
3005
+ }
3006
+ );
3007
+ }
3008
+ function TableCell({ className, ...props }) {
3009
+ return /* @__PURE__ */ jsx39(
3010
+ "td",
3011
+ {
3012
+ "data-slot": "table-cell",
3013
+ className: cn(
3014
+ "p-3 align-middle text-sm [&:has([role=checkbox])]:pr-0",
3015
+ className
3016
+ ),
3017
+ ...props
3018
+ }
3019
+ );
3020
+ }
3021
+ function TableCaption({ className, ...props }) {
3022
+ return /* @__PURE__ */ jsx39(
3023
+ "caption",
3024
+ {
3025
+ "data-slot": "table-caption",
3026
+ className: cn("mt-4 text-sm text-muted-foreground", className),
3027
+ ...props
3028
+ }
3029
+ );
3030
+ }
3031
+
3032
+ // src/ui/toast.tsx
3033
+ import { Toast as ToastPrimitive } from "radix-ui";
3034
+ import { XIcon as XIcon2 } from "lucide-react";
3035
+ import { jsx as jsx40 } from "react/jsx-runtime";
3036
+ function ToastProvider({
3037
+ ...props
3038
+ }) {
3039
+ return /* @__PURE__ */ jsx40(ToastPrimitive.Provider, { "data-slot": "toast-provider", ...props });
3040
+ }
3041
+ function ToastViewport({
3042
+ className,
3043
+ ...props
3044
+ }) {
3045
+ return /* @__PURE__ */ jsx40(
3046
+ ToastPrimitive.Viewport,
3047
+ {
3048
+ "data-slot": "toast-viewport",
3049
+ className: cn(
3050
+ "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",
3051
+ className
3052
+ ),
3053
+ ...props
3054
+ }
3055
+ );
3056
+ }
3057
+ function Toast({
3058
+ className,
3059
+ variant = "default",
3060
+ ...props
3061
+ }) {
3062
+ return /* @__PURE__ */ jsx40(
3063
+ ToastPrimitive.Root,
3064
+ {
3065
+ "data-slot": "toast",
3066
+ className: cn(
3067
+ TIMBAL_V2_ELEVATED_SURFACE,
3068
+ "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",
3069
+ "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",
3070
+ variant === "destructive" && "border-destructive/45 bg-destructive/10 text-destructive",
3071
+ className
3072
+ ),
3073
+ ...props
3074
+ }
3075
+ );
3076
+ }
3077
+ function ToastAction({
3078
+ className,
3079
+ ...props
3080
+ }) {
3081
+ return /* @__PURE__ */ jsx40(
3082
+ ToastPrimitive.Action,
3083
+ {
3084
+ "data-slot": "toast-action",
3085
+ className: cn(
3086
+ "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",
3087
+ className
3088
+ ),
3089
+ ...props
3090
+ }
3091
+ );
3092
+ }
3093
+ function ToastClose({
3094
+ className,
3095
+ ...props
3096
+ }) {
3097
+ return /* @__PURE__ */ jsx40(
3098
+ ToastPrimitive.Close,
3099
+ {
3100
+ "data-slot": "toast-close",
3101
+ className: cn(
3102
+ "absolute top-3 right-3 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-foreground/10 focus:outline-hidden",
3103
+ className
3104
+ ),
3105
+ "toast-close": "",
3106
+ ...props,
3107
+ children: /* @__PURE__ */ jsx40(XIcon2, { className: "size-4" })
3108
+ }
3109
+ );
3110
+ }
3111
+ function ToastTitle({
3112
+ className,
3113
+ ...props
3114
+ }) {
3115
+ return /* @__PURE__ */ jsx40(
3116
+ ToastPrimitive.Title,
3117
+ {
3118
+ "data-slot": "toast-title",
3119
+ className: cn("text-sm font-medium", className),
3120
+ ...props
3121
+ }
3122
+ );
3123
+ }
3124
+ function ToastDescription({
3125
+ className,
3126
+ ...props
3127
+ }) {
3128
+ return /* @__PURE__ */ jsx40(
3129
+ ToastPrimitive.Description,
3130
+ {
3131
+ "data-slot": "toast-description",
3132
+ className: cn("text-sm text-muted-foreground", className),
3133
+ ...props
3134
+ }
3135
+ );
3136
+ }
3137
+
3138
+ // src/ui/use-toast.ts
3139
+ import * as React3 from "react";
3140
+ var TOAST_LIMIT = 3;
3141
+ var TOAST_REMOVE_DELAY = 5e3;
3142
+ var listeners = /* @__PURE__ */ new Set();
3143
+ var memoryState = {
3144
+ toasts: [],
3145
+ add: () => "",
3146
+ dismiss: () => {
3147
+ },
3148
+ remove: () => {
3149
+ }
3150
+ };
3151
+ function dispatch(partial) {
3152
+ memoryState = { ...memoryState, ...partial };
3153
+ for (const listener of listeners) listener(memoryState);
3154
+ }
3155
+ function genId() {
3156
+ return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
3157
+ }
3158
+ var removeTimeouts = /* @__PURE__ */ new Map();
3159
+ function scheduleRemove(id, delay = TOAST_REMOVE_DELAY) {
3160
+ if (removeTimeouts.has(id)) return;
3161
+ const timeout = setTimeout(() => {
3162
+ removeTimeouts.delete(id);
3163
+ dispatch({
3164
+ toasts: memoryState.toasts.filter((t) => t.id !== id)
3165
+ });
3166
+ }, delay);
3167
+ removeTimeouts.set(id, timeout);
3168
+ }
3169
+ function addToast(toastInput) {
3170
+ const id = genId();
3171
+ dispatch({
3172
+ toasts: [{ ...toastInput, id }, ...memoryState.toasts].slice(0, TOAST_LIMIT)
3173
+ });
3174
+ scheduleRemove(id, toastInput.duration ?? TOAST_REMOVE_DELAY);
3175
+ return id;
3176
+ }
3177
+ function dismissToast(id) {
3178
+ scheduleRemove(id, 300);
3179
+ }
3180
+ memoryState = {
3181
+ toasts: [],
3182
+ add: addToast,
3183
+ dismiss: dismissToast,
3184
+ remove: (id) => {
3185
+ dispatch({ toasts: memoryState.toasts.filter((t) => t.id !== id) });
3186
+ }
3187
+ };
3188
+ function toast(input) {
3189
+ return memoryState.add(input);
3190
+ }
3191
+ function useToast() {
3192
+ const [state, setState] = React3.useState(memoryState);
3193
+ React3.useEffect(() => {
3194
+ listeners.add(setState);
3195
+ return () => {
3196
+ listeners.delete(setState);
3197
+ };
3198
+ }, []);
3199
+ return {
3200
+ toasts: state.toasts,
3201
+ toast,
3202
+ dismiss: state.dismiss
3203
+ };
3204
+ }
3205
+
3206
+ // src/ui/toaster.tsx
3207
+ import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
3208
+ function Toaster() {
3209
+ const { toasts, dismiss } = useToast();
3210
+ return /* @__PURE__ */ jsxs17(ToastProvider, { children: [
3211
+ toasts.map(({ id, title, description, variant }) => /* @__PURE__ */ jsxs17(
3212
+ Toast,
3213
+ {
3214
+ variant,
3215
+ onOpenChange: (open) => !open && dismiss(id),
3216
+ children: [
3217
+ /* @__PURE__ */ jsxs17("div", { className: "grid gap-1", children: [
3218
+ title ? /* @__PURE__ */ jsx41(ToastTitle, { children: title }) : null,
3219
+ description ? /* @__PURE__ */ jsx41(ToastDescription, { children: description }) : null
3220
+ ] }),
3221
+ /* @__PURE__ */ jsx41(ToastClose, {})
3222
+ ]
3223
+ },
3224
+ id
3225
+ )),
3226
+ /* @__PURE__ */ jsx41(ToastViewport, {})
3227
+ ] });
3228
+ }
3229
+
3230
+ export {
3231
+ DropdownMenu,
3232
+ DropdownMenuTrigger,
3233
+ DropdownMenuGroup,
3234
+ DropdownMenuContent,
3235
+ DropdownMenuItem,
3236
+ DropdownMenuCheckboxItem,
3237
+ DropdownMenuRadioGroup,
3238
+ DropdownMenuRadioItem,
3239
+ DropdownMenuLabel,
3240
+ DropdownMenuSeparator,
3241
+ DropdownMenuShortcut,
3242
+ DropdownMenuSub,
3243
+ DropdownMenuSubTrigger,
3244
+ DropdownMenuSubContent,
3245
+ Popover,
3246
+ PopoverTrigger,
3247
+ PopoverAnchor,
3248
+ PopoverContent,
3249
+ Select,
3250
+ SelectGroup,
3251
+ SelectValue,
3252
+ SelectTrigger,
3253
+ SelectContent,
3254
+ SelectLabel,
3255
+ SelectItem,
3256
+ SelectSeparator,
3257
+ SelectScrollUpButton,
3258
+ SelectScrollDownButton,
3259
+ Input,
3260
+ Textarea,
3261
+ Label,
3262
+ Switch,
3263
+ RadioGroup,
3264
+ RadioGroupItem,
3265
+ Form,
3266
+ FormField,
3267
+ FormItem,
3268
+ FormLabel,
3269
+ FormControl,
3270
+ FormMessage,
3271
+ FormSubmit,
3272
+ AspectRatio,
3273
+ Breadcrumb,
3274
+ BreadcrumbList,
3275
+ BreadcrumbItem,
3276
+ BreadcrumbLink,
3277
+ BreadcrumbPage,
3278
+ BreadcrumbSeparator,
3279
+ BreadcrumbEllipsis,
3280
+ Pagination,
3281
+ PaginationContent,
3282
+ PaginationItem,
3283
+ PaginationLink,
3284
+ PaginationPrevious,
3285
+ PaginationNext,
3286
+ PaginationEllipsis,
3287
+ Toolbar,
3288
+ ToolbarButton,
3289
+ ToolbarSeparator,
3290
+ ToolbarToggleGroup,
3291
+ ToolbarToggleItem,
3292
+ ToolbarLink,
3293
+ Menubar,
3294
+ MenubarMenu,
3295
+ MenubarTrigger,
3296
+ MenubarContent,
3297
+ MenubarItem,
3298
+ MenubarCheckboxItem,
3299
+ MenubarRadioGroup,
3300
+ MenubarRadioItem,
3301
+ MenubarLabel,
3302
+ MenubarSeparator,
3303
+ MenubarShortcut,
3304
+ MenubarSub,
3305
+ MenubarSubTrigger,
3306
+ MenubarSubContent,
3307
+ NavigationMenu,
3308
+ NavigationMenuList,
3309
+ NavigationMenuItem,
3310
+ navigationMenuTriggerStyle,
3311
+ NavigationMenuTrigger,
3312
+ NavigationMenuContent,
3313
+ NavigationMenuViewport,
3314
+ NavigationMenuLink,
3315
+ NavigationMenuIndicator,
3316
+ Command,
3317
+ CommandDialog,
3318
+ CommandInput,
3319
+ CommandList,
3320
+ CommandEmpty,
3321
+ CommandGroup,
3322
+ CommandSeparator,
3323
+ CommandItem,
3324
+ CommandShortcut,
3325
+ Calendar,
3326
+ CalendarDayButton,
3327
+ Combobox,
3328
+ ComboboxTrigger,
3329
+ ComboboxAnchor,
3330
+ ComboboxContent,
3331
+ ComboboxCommand,
3332
+ ComboboxInput,
3333
+ ComboboxList,
3334
+ ComboboxEmpty,
3335
+ ComboboxGroup,
3336
+ ComboboxItem,
3337
+ ComboboxSeparator,
3338
+ ComboboxShortcut,
3339
+ DatePicker,
3340
+ DatePickerTrigger,
3341
+ DatePickerContent,
3342
+ DatePickerCalendar,
3343
+ formatPickerDate,
3344
+ DatePickerButton,
3345
+ InputOTP,
3346
+ InputOTPGroup,
3347
+ InputOTPSlot,
3348
+ InputOTPHiddenInput,
3349
+ InputOTPSeparator,
3350
+ Kbd,
3351
+ KbdGroup,
3352
+ Spinner,
3353
+ InputGroup,
3354
+ InputGroupAddon,
3355
+ InputGroupInput,
3356
+ InputGroupText,
3357
+ Accordion,
3358
+ AccordionItem,
3359
+ AccordionTrigger,
3360
+ AccordionContent,
3361
+ Separator,
3362
+ Slider,
3363
+ Progress,
3364
+ badgeVariants,
3365
+ Badge,
3366
+ Sheet,
3367
+ SheetTrigger,
3368
+ SheetClose,
3369
+ SheetContent,
3370
+ SheetHeader,
3371
+ SheetFooter,
3372
+ SheetTitle,
3373
+ SheetDescription,
3374
+ AlertDialog,
3375
+ AlertDialogTrigger,
3376
+ AlertDialogPortal,
3377
+ AlertDialogOverlay,
3378
+ AlertDialogContent,
3379
+ AlertDialogHeader,
3380
+ AlertDialogFooter,
3381
+ AlertDialogTitle,
3382
+ AlertDialogDescription,
3383
+ AlertDialogAction,
3384
+ AlertDialogCancel,
3385
+ Collapsible,
3386
+ CollapsibleTrigger,
3387
+ CollapsibleContent,
3388
+ ScrollArea,
3389
+ ScrollBar,
3390
+ toggleVariants,
3391
+ Toggle,
3392
+ ToggleGroup,
3393
+ ToggleGroupItem,
3394
+ HoverCard,
3395
+ HoverCardTrigger,
3396
+ HoverCardContent,
3397
+ ContextMenu,
3398
+ ContextMenuTrigger,
3399
+ ContextMenuGroup,
3400
+ ContextMenuContent,
3401
+ ContextMenuItem,
3402
+ ContextMenuCheckboxItem,
3403
+ ContextMenuRadioGroup,
3404
+ ContextMenuRadioItem,
3405
+ ContextMenuLabel,
3406
+ ContextMenuSeparator,
3407
+ ContextMenuShortcut,
3408
+ ContextMenuSub,
3409
+ ContextMenuSubTrigger,
3410
+ ContextMenuSubContent,
3411
+ alertVariants,
3412
+ Alert,
3413
+ AlertTitle,
3414
+ AlertDescription,
3415
+ Card,
3416
+ CardHeader,
3417
+ CardTitle,
3418
+ CardDescription,
3419
+ CardContent,
3420
+ CardFooter,
3421
+ Table,
3422
+ TableHeader,
3423
+ TableBody,
3424
+ TableFooter,
3425
+ TableRow,
3426
+ TableHead,
3427
+ TableCell,
3428
+ TableCaption,
3429
+ ToastProvider,
3430
+ ToastViewport,
3431
+ Toast,
3432
+ ToastAction,
3433
+ ToastClose,
3434
+ ToastTitle,
3435
+ ToastDescription,
3436
+ toast,
3437
+ useToast,
3438
+ Toaster
3439
+ };