@potenlab/ui 0.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 (71) hide show
  1. package/dist/chunk-2W3RBVMM.js +698 -0
  2. package/dist/chunk-2W3RBVMM.js.map +1 -0
  3. package/dist/chunk-3PDPL453.cjs +42 -0
  4. package/dist/chunk-3PDPL453.cjs.map +1 -0
  5. package/dist/chunk-6GVBJTP3.js +3 -0
  6. package/dist/chunk-6GVBJTP3.js.map +1 -0
  7. package/dist/chunk-7XPQQR3Z.cjs +586 -0
  8. package/dist/chunk-7XPQQR3Z.cjs.map +1 -0
  9. package/dist/chunk-CN4BR5A5.cjs +1442 -0
  10. package/dist/chunk-CN4BR5A5.cjs.map +1 -0
  11. package/dist/chunk-DUACVZEX.js +13 -0
  12. package/dist/chunk-DUACVZEX.js.map +1 -0
  13. package/dist/chunk-EKVWVJD4.cjs +4 -0
  14. package/dist/chunk-EKVWVJD4.cjs.map +1 -0
  15. package/dist/chunk-IIMC6ODV.js +554 -0
  16. package/dist/chunk-IIMC6ODV.js.map +1 -0
  17. package/dist/chunk-M67D4PYJ.cjs +4 -0
  18. package/dist/chunk-M67D4PYJ.cjs.map +1 -0
  19. package/dist/chunk-O4BML5KD.cjs +744 -0
  20. package/dist/chunk-O4BML5KD.cjs.map +1 -0
  21. package/dist/chunk-OF2IE7ZP.cjs +26 -0
  22. package/dist/chunk-OF2IE7ZP.cjs.map +1 -0
  23. package/dist/chunk-T2ZO7QTO.js +3 -0
  24. package/dist/chunk-T2ZO7QTO.js.map +1 -0
  25. package/dist/chunk-T3VMPVU4.js +20 -0
  26. package/dist/chunk-T3VMPVU4.js.map +1 -0
  27. package/dist/chunk-VMWIQIIN.js +1343 -0
  28. package/dist/chunk-VMWIQIIN.js.map +1 -0
  29. package/dist/chunk-YDSVKR35.js +23 -0
  30. package/dist/chunk-YDSVKR35.js.map +1 -0
  31. package/dist/chunk-YSNZIYC2.cjs +16 -0
  32. package/dist/chunk-YSNZIYC2.cjs.map +1 -0
  33. package/dist/components/common/index.cjs +54 -0
  34. package/dist/components/common/index.cjs.map +1 -0
  35. package/dist/components/common/index.d.cts +138 -0
  36. package/dist/components/common/index.d.ts +138 -0
  37. package/dist/components/common/index.js +5 -0
  38. package/dist/components/common/index.js.map +1 -0
  39. package/dist/components/layouts/index.cjs +16 -0
  40. package/dist/components/layouts/index.cjs.map +1 -0
  41. package/dist/components/layouts/index.d.cts +15 -0
  42. package/dist/components/layouts/index.d.ts +15 -0
  43. package/dist/components/layouts/index.js +3 -0
  44. package/dist/components/layouts/index.js.map +1 -0
  45. package/dist/components/ui/index.cjs +503 -0
  46. package/dist/components/ui/index.cjs.map +1 -0
  47. package/dist/components/ui/index.d.cts +217 -0
  48. package/dist/components/ui/index.d.ts +217 -0
  49. package/dist/components/ui/index.js +6 -0
  50. package/dist/components/ui/index.js.map +1 -0
  51. package/dist/hooks/index.cjs +13 -0
  52. package/dist/hooks/index.cjs.map +1 -0
  53. package/dist/hooks/index.d.cts +3 -0
  54. package/dist/hooks/index.d.ts +3 -0
  55. package/dist/hooks/index.js +4 -0
  56. package/dist/hooks/index.js.map +1 -0
  57. package/dist/index.cjs +571 -0
  58. package/dist/index.cjs.map +1 -0
  59. package/dist/index.d.cts +29 -0
  60. package/dist/index.d.ts +29 -0
  61. package/dist/index.js +10 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/lib/index.cjs +17 -0
  64. package/dist/lib/index.cjs.map +1 -0
  65. package/dist/lib/index.d.cts +6 -0
  66. package/dist/lib/index.d.ts +6 -0
  67. package/dist/lib/index.js +4 -0
  68. package/dist/lib/index.js.map +1 -0
  69. package/dist/styles/globals.css +167 -0
  70. package/package.json +137 -0
  71. package/src/styles/globals.css +167 -0
@@ -0,0 +1,1343 @@
1
+ import { Button, Input, Separator } from './chunk-2W3RBVMM.js';
2
+ import { cn } from './chunk-DUACVZEX.js';
3
+ import { useIsMobile } from './chunk-T3VMPVU4.js';
4
+ import { ChevronDownIcon, CheckIcon, XIcon, PanelLeftIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
5
+ import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Dialog as Dialog$1, Tooltip as Tooltip$1, Slot } from 'radix-ui';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import * as React from 'react';
8
+ import { cva } from 'class-variance-authority';
9
+ import { useTheme } from 'next-themes';
10
+ import { Toaster as Toaster$1 } from 'sonner';
11
+
12
+ function Accordion({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(Accordion$1.Root, { "data-slot": "accordion", ...props });
16
+ }
17
+ function AccordionItem({
18
+ className,
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(
22
+ Accordion$1.Item,
23
+ {
24
+ "data-slot": "accordion-item",
25
+ className: cn("border-b last:border-b-0", className),
26
+ ...props
27
+ }
28
+ );
29
+ }
30
+ function AccordionTrigger({
31
+ className,
32
+ children,
33
+ ...props
34
+ }) {
35
+ return /* @__PURE__ */ jsx(Accordion$1.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
36
+ Accordion$1.Trigger,
37
+ {
38
+ "data-slot": "accordion-trigger",
39
+ className: cn(
40
+ "font-pretendard text-[16px] text-muted-fg flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left transition-all outline-none hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
41
+ className
42
+ ),
43
+ ...props,
44
+ children: [
45
+ children,
46
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-300 ease-in-out" })
47
+ ]
48
+ }
49
+ ) });
50
+ }
51
+ function AccordionContent({
52
+ className,
53
+ children,
54
+ ...props
55
+ }) {
56
+ return /* @__PURE__ */ jsx(
57
+ Accordion$1.Content,
58
+ {
59
+ "data-slot": "accordion-content",
60
+ className: "overflow-hidden text-sm transition-all duration-300 ease-in-out data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
61
+ ...props,
62
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
63
+ }
64
+ );
65
+ }
66
+ function AlertDialog({
67
+ ...props
68
+ }) {
69
+ return /* @__PURE__ */ jsx(AlertDialog$1.Root, { "data-slot": "alert-dialog", ...props });
70
+ }
71
+ function AlertDialogTrigger({
72
+ ...props
73
+ }) {
74
+ return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
75
+ }
76
+ function AlertDialogPortal({
77
+ ...props
78
+ }) {
79
+ return /* @__PURE__ */ jsx(AlertDialog$1.Portal, { "data-slot": "alert-dialog-portal", ...props });
80
+ }
81
+ function AlertDialogOverlay({
82
+ className,
83
+ ...props
84
+ }) {
85
+ return /* @__PURE__ */ jsx(
86
+ AlertDialog$1.Overlay,
87
+ {
88
+ "data-slot": "alert-dialog-overlay",
89
+ className: cn(
90
+ "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
91
+ className
92
+ ),
93
+ ...props
94
+ }
95
+ );
96
+ }
97
+ function AlertDialogContent({
98
+ className,
99
+ size = "default",
100
+ ...props
101
+ }) {
102
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
103
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
104
+ /* @__PURE__ */ jsx(
105
+ AlertDialog$1.Content,
106
+ {
107
+ "data-slot": "alert-dialog-content",
108
+ "data-size": size,
109
+ className: cn(
110
+ "group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",
111
+ className
112
+ ),
113
+ ...props
114
+ }
115
+ )
116
+ ] });
117
+ }
118
+ function AlertDialogHeader({
119
+ className,
120
+ ...props
121
+ }) {
122
+ return /* @__PURE__ */ jsx(
123
+ "div",
124
+ {
125
+ "data-slot": "alert-dialog-header",
126
+ className: cn(
127
+ "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
128
+ className
129
+ ),
130
+ ...props
131
+ }
132
+ );
133
+ }
134
+ function AlertDialogFooter({
135
+ className,
136
+ ...props
137
+ }) {
138
+ return /* @__PURE__ */ jsx(
139
+ "div",
140
+ {
141
+ "data-slot": "alert-dialog-footer",
142
+ className: cn(
143
+ "flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
144
+ className
145
+ ),
146
+ ...props
147
+ }
148
+ );
149
+ }
150
+ function AlertDialogTitle({
151
+ className,
152
+ ...props
153
+ }) {
154
+ return /* @__PURE__ */ jsx(
155
+ AlertDialog$1.Title,
156
+ {
157
+ "data-slot": "alert-dialog-title",
158
+ className: cn(
159
+ "text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
160
+ className
161
+ ),
162
+ ...props
163
+ }
164
+ );
165
+ }
166
+ function AlertDialogDescription({
167
+ className,
168
+ ...props
169
+ }) {
170
+ return /* @__PURE__ */ jsx(
171
+ AlertDialog$1.Description,
172
+ {
173
+ "data-slot": "alert-dialog-description",
174
+ className: cn("text-sm text-muted-foreground", className),
175
+ ...props
176
+ }
177
+ );
178
+ }
179
+ function AlertDialogMedia({
180
+ className,
181
+ ...props
182
+ }) {
183
+ return /* @__PURE__ */ jsx(
184
+ "div",
185
+ {
186
+ "data-slot": "alert-dialog-media",
187
+ className: cn(
188
+ "mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
189
+ className
190
+ ),
191
+ ...props
192
+ }
193
+ );
194
+ }
195
+ function AlertDialogAction({
196
+ className,
197
+ variant = "primary",
198
+ size = "default",
199
+ ...props
200
+ }) {
201
+ return /* @__PURE__ */ jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsx(
202
+ AlertDialog$1.Action,
203
+ {
204
+ "data-slot": "alert-dialog-action",
205
+ className: cn(className),
206
+ ...props
207
+ }
208
+ ) });
209
+ }
210
+ function AlertDialogCancel({
211
+ className,
212
+ variant = "outline",
213
+ size = "default",
214
+ ...props
215
+ }) {
216
+ return /* @__PURE__ */ jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsx(
217
+ AlertDialog$1.Cancel,
218
+ {
219
+ "data-slot": "alert-dialog-cancel",
220
+ className: cn(className),
221
+ ...props
222
+ }
223
+ ) });
224
+ }
225
+ function Avatar({
226
+ className,
227
+ size = "default",
228
+ ...props
229
+ }) {
230
+ return /* @__PURE__ */ jsx(
231
+ Avatar$1.Root,
232
+ {
233
+ "data-slot": "avatar",
234
+ "data-size": size,
235
+ className: cn(
236
+ "group/avatar relative flex w-[22px] h-[22px] shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
237
+ className
238
+ ),
239
+ ...props
240
+ }
241
+ );
242
+ }
243
+ function AvatarImage({
244
+ className,
245
+ alt = "",
246
+ ...props
247
+ }) {
248
+ return /* @__PURE__ */ jsx(
249
+ Avatar$1.Image,
250
+ {
251
+ "data-slot": "avatar-image",
252
+ className: cn("aspect-square size-full", className),
253
+ alt,
254
+ ...props
255
+ }
256
+ );
257
+ }
258
+ function AvatarFallback({
259
+ className,
260
+ ...props
261
+ }) {
262
+ return /* @__PURE__ */ jsx(
263
+ Avatar$1.Fallback,
264
+ {
265
+ "data-slot": "avatar-fallback",
266
+ className: cn(
267
+ "flex size-full items-center justify-center rounded-full bg-sidebar-selected text-muted-fg text-[10px] group-data-[size=sm]/avatar:text-xs",
268
+ className
269
+ ),
270
+ ...props
271
+ }
272
+ );
273
+ }
274
+ function AvatarBadge({ className, ...props }) {
275
+ return /* @__PURE__ */ jsx(
276
+ "span",
277
+ {
278
+ "data-slot": "avatar-badge",
279
+ className: cn(
280
+ "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none",
281
+ "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
282
+ "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
283
+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
284
+ className
285
+ ),
286
+ ...props
287
+ }
288
+ );
289
+ }
290
+ function AvatarGroup({ className, ...props }) {
291
+ return /* @__PURE__ */ jsx(
292
+ "div",
293
+ {
294
+ "data-slot": "avatar-group",
295
+ className: cn(
296
+ "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
297
+ className
298
+ ),
299
+ ...props
300
+ }
301
+ );
302
+ }
303
+ function AvatarGroupCount({
304
+ className,
305
+ ...props
306
+ }) {
307
+ return /* @__PURE__ */ jsx(
308
+ "div",
309
+ {
310
+ "data-slot": "avatar-group-count",
311
+ className: cn(
312
+ "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
313
+ className
314
+ ),
315
+ ...props
316
+ }
317
+ );
318
+ }
319
+ function Card({ className, ...props }) {
320
+ return /* @__PURE__ */ jsx(
321
+ "div",
322
+ {
323
+ "data-slot": "card",
324
+ className: cn(
325
+ "flex flex-col bg-white border border-border rounded-lg text-card-foreground shadow-none",
326
+ className
327
+ ),
328
+ ...props
329
+ }
330
+ );
331
+ }
332
+ function CardHeader({ className, ...props }) {
333
+ return /* @__PURE__ */ jsx(
334
+ "div",
335
+ {
336
+ "data-slot": "card-header",
337
+ className: cn(
338
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
339
+ className
340
+ ),
341
+ ...props
342
+ }
343
+ );
344
+ }
345
+ function CardTitle({ className, ...props }) {
346
+ return /* @__PURE__ */ jsx(
347
+ "div",
348
+ {
349
+ "data-slot": "card-title",
350
+ className: cn("leading-none font-semibold", className),
351
+ ...props
352
+ }
353
+ );
354
+ }
355
+ function CardDescription({ className, ...props }) {
356
+ return /* @__PURE__ */ jsx(
357
+ "div",
358
+ {
359
+ "data-slot": "card-description",
360
+ className: cn("text-sm text-muted-foreground", className),
361
+ ...props
362
+ }
363
+ );
364
+ }
365
+ function CardAction({ className, ...props }) {
366
+ return /* @__PURE__ */ jsx(
367
+ "div",
368
+ {
369
+ "data-slot": "card-action",
370
+ className: cn(
371
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
372
+ className
373
+ ),
374
+ ...props
375
+ }
376
+ );
377
+ }
378
+ function CardContent({ className, ...props }) {
379
+ return /* @__PURE__ */ jsx(
380
+ "div",
381
+ {
382
+ "data-slot": "card-content",
383
+ className: cn("px-6", className),
384
+ ...props
385
+ }
386
+ );
387
+ }
388
+ function CardFooter({ className, ...props }) {
389
+ return /* @__PURE__ */ jsx(
390
+ "div",
391
+ {
392
+ "data-slot": "card-footer",
393
+ className: cn("flex items-center px-6 [.border-t]:pt-6", className),
394
+ ...props
395
+ }
396
+ );
397
+ }
398
+ function Checkbox({
399
+ className,
400
+ ...props
401
+ }) {
402
+ return /* @__PURE__ */ jsx(
403
+ Checkbox$1.Root,
404
+ {
405
+ "data-slot": "checkbox",
406
+ className: cn(
407
+ "peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
408
+ className
409
+ ),
410
+ ...props,
411
+ children: /* @__PURE__ */ jsx(
412
+ Checkbox$1.Indicator,
413
+ {
414
+ "data-slot": "checkbox-indicator",
415
+ className: "grid place-content-center text-current transition-none",
416
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
417
+ }
418
+ )
419
+ }
420
+ );
421
+ }
422
+ function Dialog({
423
+ ...props
424
+ }) {
425
+ return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "dialog", ...props });
426
+ }
427
+ function DialogTrigger({
428
+ ...props
429
+ }) {
430
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "dialog-trigger", ...props });
431
+ }
432
+ function DialogPortal({
433
+ ...props
434
+ }) {
435
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "dialog-portal", ...props });
436
+ }
437
+ function DialogClose({
438
+ ...props
439
+ }) {
440
+ return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "dialog-close", ...props });
441
+ }
442
+ function DialogOverlay({
443
+ className,
444
+ ...props
445
+ }) {
446
+ return /* @__PURE__ */ jsx(
447
+ Dialog$1.Overlay,
448
+ {
449
+ "data-slot": "dialog-overlay",
450
+ className: cn(
451
+ "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
452
+ className
453
+ ),
454
+ ...props
455
+ }
456
+ );
457
+ }
458
+ function DialogContent({
459
+ className,
460
+ children,
461
+ showCloseButton = true,
462
+ ...props
463
+ }) {
464
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
465
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
466
+ /* @__PURE__ */ jsxs(
467
+ Dialog$1.Content,
468
+ {
469
+ "data-slot": "dialog-content",
470
+ className: cn(
471
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
472
+ className
473
+ ),
474
+ ...props,
475
+ children: [
476
+ children,
477
+ showCloseButton && /* @__PURE__ */ jsxs(
478
+ Dialog$1.Close,
479
+ {
480
+ "data-slot": "dialog-close",
481
+ className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
482
+ children: [
483
+ /* @__PURE__ */ jsx(XIcon, {}),
484
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
485
+ ]
486
+ }
487
+ )
488
+ ]
489
+ }
490
+ )
491
+ ] });
492
+ }
493
+ function DialogHeader({ className, ...props }) {
494
+ return /* @__PURE__ */ jsx(
495
+ "div",
496
+ {
497
+ "data-slot": "dialog-header",
498
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
499
+ ...props
500
+ }
501
+ );
502
+ }
503
+ function DialogFooter({
504
+ className,
505
+ showCloseButton = false,
506
+ children,
507
+ ...props
508
+ }) {
509
+ return /* @__PURE__ */ jsxs(
510
+ "div",
511
+ {
512
+ "data-slot": "dialog-footer",
513
+ className: cn(
514
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
515
+ className
516
+ ),
517
+ ...props,
518
+ children: [
519
+ children,
520
+ showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Close" }) })
521
+ ]
522
+ }
523
+ );
524
+ }
525
+ function DialogTitle({
526
+ className,
527
+ ...props
528
+ }) {
529
+ return /* @__PURE__ */ jsx(
530
+ Dialog$1.Title,
531
+ {
532
+ "data-slot": "dialog-title",
533
+ className: cn("text-lg leading-none font-semibold", className),
534
+ ...props
535
+ }
536
+ );
537
+ }
538
+ function DialogDescription({
539
+ className,
540
+ ...props
541
+ }) {
542
+ return /* @__PURE__ */ jsx(
543
+ Dialog$1.Description,
544
+ {
545
+ "data-slot": "dialog-description",
546
+ className: cn("text-sm text-muted-foreground", className),
547
+ ...props
548
+ }
549
+ );
550
+ }
551
+ function Sheet({ ...props }) {
552
+ return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "sheet", ...props });
553
+ }
554
+ function SheetTrigger({
555
+ ...props
556
+ }) {
557
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "sheet-trigger", ...props });
558
+ }
559
+ function SheetClose({
560
+ ...props
561
+ }) {
562
+ return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "sheet-close", ...props });
563
+ }
564
+ function SheetPortal({
565
+ ...props
566
+ }) {
567
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "sheet-portal", ...props });
568
+ }
569
+ function SheetOverlay({
570
+ className,
571
+ ...props
572
+ }) {
573
+ return /* @__PURE__ */ jsx(
574
+ Dialog$1.Overlay,
575
+ {
576
+ "data-slot": "sheet-overlay",
577
+ className: cn(
578
+ "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
579
+ className
580
+ ),
581
+ ...props
582
+ }
583
+ );
584
+ }
585
+ function SheetContent({
586
+ className,
587
+ children,
588
+ side = "right",
589
+ showCloseButton = true,
590
+ ...props
591
+ }) {
592
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
593
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
594
+ /* @__PURE__ */ jsxs(
595
+ Dialog$1.Content,
596
+ {
597
+ "data-slot": "sheet-content",
598
+ className: cn(
599
+ "fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",
600
+ side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
601
+ side === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
602
+ side === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
603
+ side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
604
+ className
605
+ ),
606
+ ...props,
607
+ children: [
608
+ children,
609
+ showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
610
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
611
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
612
+ ] })
613
+ ]
614
+ }
615
+ )
616
+ ] });
617
+ }
618
+ function SheetHeader({ className, ...props }) {
619
+ return /* @__PURE__ */ jsx(
620
+ "div",
621
+ {
622
+ "data-slot": "sheet-header",
623
+ className: cn("flex flex-col gap-1.5 p-4", className),
624
+ ...props
625
+ }
626
+ );
627
+ }
628
+ function SheetFooter({ className, ...props }) {
629
+ return /* @__PURE__ */ jsx(
630
+ "div",
631
+ {
632
+ "data-slot": "sheet-footer",
633
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
634
+ ...props
635
+ }
636
+ );
637
+ }
638
+ function SheetTitle({
639
+ className,
640
+ ...props
641
+ }) {
642
+ return /* @__PURE__ */ jsx(
643
+ Dialog$1.Title,
644
+ {
645
+ "data-slot": "sheet-title",
646
+ className: cn("font-semibold text-foreground", className),
647
+ ...props
648
+ }
649
+ );
650
+ }
651
+ function SheetDescription({
652
+ className,
653
+ ...props
654
+ }) {
655
+ return /* @__PURE__ */ jsx(
656
+ Dialog$1.Description,
657
+ {
658
+ "data-slot": "sheet-description",
659
+ className: cn("text-sm text-muted-foreground", className),
660
+ ...props
661
+ }
662
+ );
663
+ }
664
+ function Skeleton({ className, ...props }) {
665
+ return /* @__PURE__ */ jsx(
666
+ "div",
667
+ {
668
+ "data-slot": "skeleton",
669
+ className: cn("animate-pulse rounded-md bg-accent", className),
670
+ ...props
671
+ }
672
+ );
673
+ }
674
+ function TooltipProvider({
675
+ delayDuration = 300,
676
+ ...props
677
+ }) {
678
+ return /* @__PURE__ */ jsx(
679
+ Tooltip$1.Provider,
680
+ {
681
+ "data-slot": "tooltip-provider",
682
+ delayDuration,
683
+ ...props
684
+ }
685
+ );
686
+ }
687
+ function Tooltip({
688
+ ...props
689
+ }) {
690
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props });
691
+ }
692
+ function TooltipTrigger({
693
+ ...props
694
+ }) {
695
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { "data-slot": "tooltip-trigger", ...props });
696
+ }
697
+ function TooltipContent({
698
+ className,
699
+ sideOffset = 0,
700
+ children,
701
+ ...props
702
+ }) {
703
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsxs(
704
+ Tooltip$1.Content,
705
+ {
706
+ "data-slot": "tooltip-content",
707
+ sideOffset,
708
+ className: cn(
709
+ "z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-[#1A202C] px-3 py-2 text-[14px] text-balance text-white fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
710
+ className
711
+ ),
712
+ ...props,
713
+ children: [
714
+ children,
715
+ /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-[#1A202C] fill-[#1A202C]" })
716
+ ]
717
+ }
718
+ ) });
719
+ }
720
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
721
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
722
+ var SIDEBAR_WIDTH = "16rem";
723
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
724
+ var SIDEBAR_WIDTH_ICON = "3rem";
725
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
726
+ var SidebarContext = React.createContext(null);
727
+ function useSidebar() {
728
+ const context = React.useContext(SidebarContext);
729
+ if (!context) {
730
+ throw new Error("useSidebar must be used within a SidebarProvider.");
731
+ }
732
+ return context;
733
+ }
734
+ function SidebarProvider({
735
+ defaultOpen = true,
736
+ open: openProp,
737
+ onOpenChange: setOpenProp,
738
+ className,
739
+ style,
740
+ children,
741
+ ...props
742
+ }) {
743
+ const isMobile = useIsMobile();
744
+ const [openMobile, setOpenMobile] = React.useState(false);
745
+ const [_open, _setOpen] = React.useState(defaultOpen);
746
+ const open = openProp ?? _open;
747
+ const setOpen = React.useCallback(
748
+ (value) => {
749
+ const openState = typeof value === "function" ? value(open) : value;
750
+ if (setOpenProp) {
751
+ setOpenProp(openState);
752
+ } else {
753
+ _setOpen(openState);
754
+ }
755
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
756
+ },
757
+ [setOpenProp, open]
758
+ );
759
+ const toggleSidebar = React.useCallback(() => {
760
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
761
+ }, [isMobile, setOpen, setOpenMobile]);
762
+ React.useEffect(() => {
763
+ const handleKeyDown = (event) => {
764
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
765
+ event.preventDefault();
766
+ toggleSidebar();
767
+ }
768
+ };
769
+ window.addEventListener("keydown", handleKeyDown);
770
+ return () => window.removeEventListener("keydown", handleKeyDown);
771
+ }, [toggleSidebar]);
772
+ const state = open ? "expanded" : "collapsed";
773
+ const contextValue = React.useMemo(
774
+ () => ({
775
+ state,
776
+ open,
777
+ setOpen,
778
+ isMobile,
779
+ openMobile,
780
+ setOpenMobile,
781
+ toggleSidebar
782
+ }),
783
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
784
+ );
785
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
786
+ "div",
787
+ {
788
+ "data-slot": "sidebar-wrapper",
789
+ style: {
790
+ "--sidebar-width": SIDEBAR_WIDTH,
791
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
792
+ ...style
793
+ },
794
+ className: cn(
795
+ "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
796
+ className
797
+ ),
798
+ ...props,
799
+ children
800
+ }
801
+ ) }) });
802
+ }
803
+ function Sidebar({
804
+ side = "left",
805
+ variant = "sidebar",
806
+ collapsible = "offcanvas",
807
+ className,
808
+ children,
809
+ ...props
810
+ }) {
811
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
812
+ if (collapsible === "none") {
813
+ return /* @__PURE__ */ jsx(
814
+ "div",
815
+ {
816
+ "data-slot": "sidebar",
817
+ className: cn(
818
+ "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
819
+ className
820
+ ),
821
+ ...props,
822
+ children
823
+ }
824
+ );
825
+ }
826
+ if (isMobile) {
827
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
828
+ SheetContent,
829
+ {
830
+ "data-sidebar": "sidebar",
831
+ "data-slot": "sidebar",
832
+ "data-mobile": "true",
833
+ className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
834
+ style: {
835
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
836
+ },
837
+ side,
838
+ children: [
839
+ /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
840
+ /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
841
+ /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
842
+ ] }),
843
+ /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
844
+ ]
845
+ }
846
+ ) });
847
+ }
848
+ return /* @__PURE__ */ jsxs(
849
+ "div",
850
+ {
851
+ className: "group peer hidden text-sidebar-foreground md:block",
852
+ "data-state": state,
853
+ "data-collapsible": state === "collapsed" ? collapsible : "",
854
+ "data-variant": variant,
855
+ "data-side": side,
856
+ "data-slot": "sidebar",
857
+ children: [
858
+ /* @__PURE__ */ jsx(
859
+ "div",
860
+ {
861
+ "data-slot": "sidebar-gap",
862
+ className: cn(
863
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
864
+ "group-data-[collapsible=offcanvas]:w-0",
865
+ "group-data-[side=right]:rotate-180",
866
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
867
+ )
868
+ }
869
+ ),
870
+ /* @__PURE__ */ jsx(
871
+ "div",
872
+ {
873
+ "data-slot": "sidebar-container",
874
+ className: cn(
875
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
876
+ side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
877
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
878
+ className
879
+ ),
880
+ ...props,
881
+ children: /* @__PURE__ */ jsx(
882
+ "div",
883
+ {
884
+ "data-sidebar": "sidebar",
885
+ "data-slot": "sidebar-inner",
886
+ className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",
887
+ children
888
+ }
889
+ )
890
+ }
891
+ )
892
+ ]
893
+ }
894
+ );
895
+ }
896
+ function SidebarTrigger({
897
+ className,
898
+ onClick,
899
+ ...props
900
+ }) {
901
+ const { toggleSidebar } = useSidebar();
902
+ return /* @__PURE__ */ jsxs(
903
+ Button,
904
+ {
905
+ "data-sidebar": "trigger",
906
+ "data-slot": "sidebar-trigger",
907
+ variant: "ghost",
908
+ size: "icon",
909
+ className: cn("size-7", className),
910
+ onClick: (event) => {
911
+ onClick?.(event);
912
+ toggleSidebar();
913
+ },
914
+ ...props,
915
+ children: [
916
+ /* @__PURE__ */ jsx(PanelLeftIcon, {}),
917
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
918
+ ]
919
+ }
920
+ );
921
+ }
922
+ function SidebarRail({ className, ...props }) {
923
+ const { toggleSidebar } = useSidebar();
924
+ return /* @__PURE__ */ jsx(
925
+ "button",
926
+ {
927
+ "data-sidebar": "rail",
928
+ "data-slot": "sidebar-rail",
929
+ "aria-label": "Toggle Sidebar",
930
+ tabIndex: -1,
931
+ onClick: toggleSidebar,
932
+ title: "Toggle Sidebar",
933
+ className: cn(
934
+ "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex",
935
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
936
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
937
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
938
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
939
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
940
+ className
941
+ ),
942
+ ...props
943
+ }
944
+ );
945
+ }
946
+ function SidebarInset({ className, ...props }) {
947
+ return /* @__PURE__ */ jsx(
948
+ "main",
949
+ {
950
+ "data-slot": "sidebar-inset",
951
+ className: cn(
952
+ "relative flex w-full flex-1 flex-col bg-background",
953
+ "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
954
+ className
955
+ ),
956
+ ...props
957
+ }
958
+ );
959
+ }
960
+ function SidebarInput({
961
+ className,
962
+ ...props
963
+ }) {
964
+ return /* @__PURE__ */ jsx(
965
+ Input,
966
+ {
967
+ "data-slot": "sidebar-input",
968
+ "data-sidebar": "input",
969
+ className: cn("h-8 w-full bg-background shadow-none", className),
970
+ ...props
971
+ }
972
+ );
973
+ }
974
+ function SidebarHeader({ className, ...props }) {
975
+ return /* @__PURE__ */ jsx(
976
+ "div",
977
+ {
978
+ "data-slot": "sidebar-header",
979
+ "data-sidebar": "header",
980
+ className: cn("flex flex-col gap-2 p-2", className),
981
+ ...props
982
+ }
983
+ );
984
+ }
985
+ function SidebarFooter({ className, ...props }) {
986
+ return /* @__PURE__ */ jsx(
987
+ "div",
988
+ {
989
+ "data-slot": "sidebar-footer",
990
+ "data-sidebar": "footer",
991
+ className: cn("flex flex-col gap-2 p-2", className),
992
+ ...props
993
+ }
994
+ );
995
+ }
996
+ function SidebarSeparator({
997
+ className,
998
+ ...props
999
+ }) {
1000
+ return /* @__PURE__ */ jsx(
1001
+ Separator,
1002
+ {
1003
+ "data-slot": "sidebar-separator",
1004
+ "data-sidebar": "separator",
1005
+ className: cn("mx-2 w-auto bg-sidebar-border", className),
1006
+ ...props
1007
+ }
1008
+ );
1009
+ }
1010
+ function SidebarContent({ className, ...props }) {
1011
+ return /* @__PURE__ */ jsx(
1012
+ "div",
1013
+ {
1014
+ "data-slot": "sidebar-content",
1015
+ "data-sidebar": "content",
1016
+ className: cn(
1017
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
1018
+ className
1019
+ ),
1020
+ ...props
1021
+ }
1022
+ );
1023
+ }
1024
+ function SidebarGroup({ className, ...props }) {
1025
+ return /* @__PURE__ */ jsx(
1026
+ "div",
1027
+ {
1028
+ "data-slot": "sidebar-group",
1029
+ "data-sidebar": "group",
1030
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
1031
+ ...props
1032
+ }
1033
+ );
1034
+ }
1035
+ function SidebarGroupLabel({
1036
+ className,
1037
+ asChild = false,
1038
+ ...props
1039
+ }) {
1040
+ const Comp = asChild ? Slot.Root : "div";
1041
+ return /* @__PURE__ */ jsx(
1042
+ Comp,
1043
+ {
1044
+ "data-slot": "sidebar-group-label",
1045
+ "data-sidebar": "group-label",
1046
+ className: cn(
1047
+ "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
1048
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
1049
+ className
1050
+ ),
1051
+ ...props
1052
+ }
1053
+ );
1054
+ }
1055
+ function SidebarGroupAction({
1056
+ className,
1057
+ asChild = false,
1058
+ ...props
1059
+ }) {
1060
+ const Comp = asChild ? Slot.Root : "button";
1061
+ return /* @__PURE__ */ jsx(
1062
+ Comp,
1063
+ {
1064
+ "data-slot": "sidebar-group-action",
1065
+ "data-sidebar": "group-action",
1066
+ className: cn(
1067
+ "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
1068
+ "after:absolute after:-inset-2 md:after:hidden",
1069
+ "group-data-[collapsible=icon]:hidden",
1070
+ className
1071
+ ),
1072
+ ...props
1073
+ }
1074
+ );
1075
+ }
1076
+ function SidebarGroupContent({
1077
+ className,
1078
+ ...props
1079
+ }) {
1080
+ return /* @__PURE__ */ jsx(
1081
+ "div",
1082
+ {
1083
+ "data-slot": "sidebar-group-content",
1084
+ "data-sidebar": "group-content",
1085
+ className: cn("w-full text-sm", className),
1086
+ ...props
1087
+ }
1088
+ );
1089
+ }
1090
+ function SidebarMenu({ className, ...props }) {
1091
+ return /* @__PURE__ */ jsx(
1092
+ "ul",
1093
+ {
1094
+ "data-slot": "sidebar-menu",
1095
+ "data-sidebar": "menu",
1096
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
1097
+ ...props
1098
+ }
1099
+ );
1100
+ }
1101
+ function SidebarMenuItem({ className, ...props }) {
1102
+ return /* @__PURE__ */ jsx(
1103
+ "li",
1104
+ {
1105
+ "data-slot": "sidebar-menu-item",
1106
+ "data-sidebar": "menu-item",
1107
+ className: cn("group/menu-item relative", className),
1108
+ ...props
1109
+ }
1110
+ );
1111
+ }
1112
+ var sidebarMenuButtonVariants = cva(
1113
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
1114
+ {
1115
+ variants: {
1116
+ variant: {
1117
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
1118
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
1119
+ },
1120
+ size: {
1121
+ default: "h-8 text-sm",
1122
+ sm: "h-7 text-xs",
1123
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
1124
+ }
1125
+ },
1126
+ defaultVariants: {
1127
+ variant: "default",
1128
+ size: "default"
1129
+ }
1130
+ }
1131
+ );
1132
+ function SidebarMenuButton({
1133
+ asChild = false,
1134
+ isActive = false,
1135
+ variant = "default",
1136
+ size = "default",
1137
+ tooltip,
1138
+ className,
1139
+ ...props
1140
+ }) {
1141
+ const Comp = asChild ? Slot.Root : "button";
1142
+ const { isMobile, state } = useSidebar();
1143
+ const button = /* @__PURE__ */ jsx(
1144
+ Comp,
1145
+ {
1146
+ "data-slot": "sidebar-menu-button",
1147
+ "data-sidebar": "menu-button",
1148
+ "data-size": size,
1149
+ "data-active": isActive,
1150
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
1151
+ ...props
1152
+ }
1153
+ );
1154
+ if (!tooltip) {
1155
+ return button;
1156
+ }
1157
+ if (typeof tooltip === "string") {
1158
+ tooltip = {
1159
+ children: tooltip
1160
+ };
1161
+ }
1162
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
1163
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
1164
+ /* @__PURE__ */ jsx(
1165
+ TooltipContent,
1166
+ {
1167
+ side: "right",
1168
+ align: "center",
1169
+ hidden: state !== "collapsed" || isMobile,
1170
+ ...tooltip
1171
+ }
1172
+ )
1173
+ ] });
1174
+ }
1175
+ function SidebarMenuAction({
1176
+ className,
1177
+ asChild = false,
1178
+ showOnHover = false,
1179
+ ...props
1180
+ }) {
1181
+ const Comp = asChild ? Slot.Root : "button";
1182
+ return /* @__PURE__ */ jsx(
1183
+ Comp,
1184
+ {
1185
+ "data-slot": "sidebar-menu-action",
1186
+ "data-sidebar": "menu-action",
1187
+ className: cn(
1188
+ "absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
1189
+ "after:absolute after:-inset-2 md:after:hidden",
1190
+ "peer-data-[size=sm]/menu-button:top-1",
1191
+ "peer-data-[size=default]/menu-button:top-1.5",
1192
+ "peer-data-[size=lg]/menu-button:top-2.5",
1193
+ "group-data-[collapsible=icon]:hidden",
1194
+ showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:opacity-0",
1195
+ className
1196
+ ),
1197
+ ...props
1198
+ }
1199
+ );
1200
+ }
1201
+ function SidebarMenuBadge({
1202
+ className,
1203
+ ...props
1204
+ }) {
1205
+ return /* @__PURE__ */ jsx(
1206
+ "div",
1207
+ {
1208
+ "data-slot": "sidebar-menu-badge",
1209
+ "data-sidebar": "menu-badge",
1210
+ className: cn(
1211
+ "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none",
1212
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
1213
+ "peer-data-[size=sm]/menu-button:top-1",
1214
+ "peer-data-[size=default]/menu-button:top-1.5",
1215
+ "peer-data-[size=lg]/menu-button:top-2.5",
1216
+ "group-data-[collapsible=icon]:hidden",
1217
+ className
1218
+ ),
1219
+ ...props
1220
+ }
1221
+ );
1222
+ }
1223
+ function SidebarMenuSkeleton({
1224
+ className,
1225
+ showIcon = false,
1226
+ ...props
1227
+ }) {
1228
+ const width = React.useMemo(() => {
1229
+ return `${Math.floor(Math.random() * 40) + 50}%`;
1230
+ }, []);
1231
+ return /* @__PURE__ */ jsxs(
1232
+ "div",
1233
+ {
1234
+ "data-slot": "sidebar-menu-skeleton",
1235
+ "data-sidebar": "menu-skeleton",
1236
+ className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
1237
+ ...props,
1238
+ children: [
1239
+ showIcon && /* @__PURE__ */ jsx(
1240
+ Skeleton,
1241
+ {
1242
+ className: "size-4 rounded-md",
1243
+ "data-sidebar": "menu-skeleton-icon"
1244
+ }
1245
+ ),
1246
+ /* @__PURE__ */ jsx(
1247
+ Skeleton,
1248
+ {
1249
+ className: "h-4 max-w-(--skeleton-width) flex-1",
1250
+ "data-sidebar": "menu-skeleton-text",
1251
+ style: {
1252
+ "--skeleton-width": width
1253
+ }
1254
+ }
1255
+ )
1256
+ ]
1257
+ }
1258
+ );
1259
+ }
1260
+ function SidebarMenuSub({ className, ...props }) {
1261
+ return /* @__PURE__ */ jsx(
1262
+ "ul",
1263
+ {
1264
+ "data-slot": "sidebar-menu-sub",
1265
+ "data-sidebar": "menu-sub",
1266
+ className: cn(
1267
+ "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
1268
+ "group-data-[collapsible=icon]:hidden",
1269
+ className
1270
+ ),
1271
+ ...props
1272
+ }
1273
+ );
1274
+ }
1275
+ function SidebarMenuSubItem({
1276
+ className,
1277
+ ...props
1278
+ }) {
1279
+ return /* @__PURE__ */ jsx(
1280
+ "li",
1281
+ {
1282
+ "data-slot": "sidebar-menu-sub-item",
1283
+ "data-sidebar": "menu-sub-item",
1284
+ className: cn("group/menu-sub-item relative", className),
1285
+ ...props
1286
+ }
1287
+ );
1288
+ }
1289
+ function SidebarMenuSubButton({
1290
+ asChild = false,
1291
+ size = "md",
1292
+ isActive = false,
1293
+ className,
1294
+ ...props
1295
+ }) {
1296
+ const Comp = asChild ? Slot.Root : "a";
1297
+ return /* @__PURE__ */ jsx(
1298
+ Comp,
1299
+ {
1300
+ "data-slot": "sidebar-menu-sub-button",
1301
+ "data-sidebar": "menu-sub-button",
1302
+ "data-size": size,
1303
+ "data-active": isActive,
1304
+ className: cn(
1305
+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
1306
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
1307
+ size === "sm" && "text-xs",
1308
+ size === "md" && "text-sm",
1309
+ "group-data-[collapsible=icon]:hidden",
1310
+ className
1311
+ ),
1312
+ ...props
1313
+ }
1314
+ );
1315
+ }
1316
+ var Toaster = ({ ...props }) => {
1317
+ const { theme = "system" } = useTheme();
1318
+ return /* @__PURE__ */ jsx(
1319
+ Toaster$1,
1320
+ {
1321
+ theme,
1322
+ className: "toaster group",
1323
+ icons: {
1324
+ success: /* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4" }),
1325
+ info: /* @__PURE__ */ jsx(InfoIcon, { className: "size-4" }),
1326
+ warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" }),
1327
+ error: /* @__PURE__ */ jsx(OctagonXIcon, { className: "size-4" }),
1328
+ loading: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" })
1329
+ },
1330
+ style: {
1331
+ "--normal-bg": "var(--popover)",
1332
+ "--normal-text": "var(--popover-foreground)",
1333
+ "--normal-border": "var(--border)",
1334
+ "--border-radius": "var(--radius)"
1335
+ },
1336
+ ...props
1337
+ }
1338
+ );
1339
+ };
1340
+
1341
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, useSidebar };
1342
+ //# sourceMappingURL=chunk-VMWIQIIN.js.map
1343
+ //# sourceMappingURL=chunk-VMWIQIIN.js.map