@tradalab/lyra 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,911 @@
1
+ import { useMobile } from './chunk-QYA2HGKW.js';
2
+ import { Button } from './chunk-KFQOYZ64.js';
3
+ import { cn } from './chunk-XH55BHUU.js';
4
+ import * as React6 from 'react';
5
+ import { Slot, Separator as Separator$1, Dialog, Tooltip as Tooltip$1 } from 'radix-ui';
6
+ import { ChevronRightIcon, MoreHorizontalIcon, XIcon, PanelLeftIcon } from 'lucide-react';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import { cva } from 'class-variance-authority';
9
+
10
+ function Breadcrumb({ className, ...props }) {
11
+ return /* @__PURE__ */ jsx(
12
+ "nav",
13
+ {
14
+ "aria-label": "breadcrumb",
15
+ "data-slot": "breadcrumb",
16
+ className: cn(className),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function BreadcrumbList({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx(
23
+ "ol",
24
+ {
25
+ "data-slot": "breadcrumb-list",
26
+ className: cn(
27
+ "flex flex-wrap items-center gap-1.5 text-xs wrap-break-word text-muted-foreground",
28
+ className
29
+ ),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function BreadcrumbItem({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(
36
+ "li",
37
+ {
38
+ "data-slot": "breadcrumb-item",
39
+ className: cn("inline-flex items-center gap-1", className),
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ function BreadcrumbLink({
45
+ asChild,
46
+ className,
47
+ ...props
48
+ }) {
49
+ const Comp = asChild ? Slot.Root : "a";
50
+ return /* @__PURE__ */ jsx(
51
+ Comp,
52
+ {
53
+ "data-slot": "breadcrumb-link",
54
+ className: cn("transition-colors hover:text-foreground", className),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ function BreadcrumbPage({ className, ...props }) {
60
+ return /* @__PURE__ */ jsx(
61
+ "span",
62
+ {
63
+ "data-slot": "breadcrumb-page",
64
+ role: "link",
65
+ "aria-disabled": "true",
66
+ "aria-current": "page",
67
+ className: cn("font-normal text-foreground", className),
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ function BreadcrumbSeparator({
73
+ children,
74
+ className,
75
+ ...props
76
+ }) {
77
+ return /* @__PURE__ */ jsx(
78
+ "li",
79
+ {
80
+ "data-slot": "breadcrumb-separator",
81
+ role: "presentation",
82
+ "aria-hidden": "true",
83
+ className: cn("[&>svg]:size-3.5", className),
84
+ ...props,
85
+ children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {})
86
+ }
87
+ );
88
+ }
89
+ function BreadcrumbEllipsis({
90
+ className,
91
+ ...props
92
+ }) {
93
+ return /* @__PURE__ */ jsxs(
94
+ "span",
95
+ {
96
+ "data-slot": "breadcrumb-ellipsis",
97
+ role: "presentation",
98
+ "aria-hidden": "true",
99
+ className: cn(
100
+ "flex size-5 items-center justify-center [&>svg]:size-4",
101
+ className
102
+ ),
103
+ ...props,
104
+ children: [
105
+ /* @__PURE__ */ jsx(
106
+ MoreHorizontalIcon,
107
+ {}
108
+ ),
109
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
110
+ ]
111
+ }
112
+ );
113
+ }
114
+ function Separator({
115
+ className,
116
+ orientation = "horizontal",
117
+ decorative = true,
118
+ ...props
119
+ }) {
120
+ return /* @__PURE__ */ jsx(
121
+ Separator$1.Root,
122
+ {
123
+ "data-slot": "separator",
124
+ decorative,
125
+ orientation,
126
+ className: cn(
127
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
128
+ className
129
+ ),
130
+ ...props
131
+ }
132
+ );
133
+ }
134
+ function Input({ className, type, ...props }) {
135
+ return /* @__PURE__ */ jsx(
136
+ "input",
137
+ {
138
+ type,
139
+ "data-slot": "input",
140
+ className: cn(
141
+ "h-8 w-full min-w-0 rounded-none border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
142
+ className
143
+ ),
144
+ ...props
145
+ }
146
+ );
147
+ }
148
+ function Sheet({ ...props }) {
149
+ return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "sheet", ...props });
150
+ }
151
+ function SheetTrigger({
152
+ ...props
153
+ }) {
154
+ return /* @__PURE__ */ jsx(Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
155
+ }
156
+ function SheetClose({
157
+ ...props
158
+ }) {
159
+ return /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "sheet-close", ...props });
160
+ }
161
+ function SheetPortal({
162
+ ...props
163
+ }) {
164
+ return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "sheet-portal", ...props });
165
+ }
166
+ function SheetOverlay({
167
+ className,
168
+ ...props
169
+ }) {
170
+ return /* @__PURE__ */ jsx(
171
+ Dialog.Overlay,
172
+ {
173
+ "data-slot": "sheet-overlay",
174
+ className: cn(
175
+ "fixed inset-0 z-50 bg-black/10 text-xs/relaxed duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
176
+ className
177
+ ),
178
+ ...props
179
+ }
180
+ );
181
+ }
182
+ function SheetContent({
183
+ className,
184
+ children,
185
+ side = "right",
186
+ showCloseButton = true,
187
+ ...props
188
+ }) {
189
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
190
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
191
+ /* @__PURE__ */ jsxs(
192
+ Dialog.Content,
193
+ {
194
+ "data-slot": "sheet-content",
195
+ "data-side": side,
196
+ className: cn(
197
+ "fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
198
+ className
199
+ ),
200
+ ...props,
201
+ children: [
202
+ children,
203
+ showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs(
204
+ Button,
205
+ {
206
+ variant: "ghost",
207
+ className: "absolute top-3 right-3",
208
+ size: "icon-sm",
209
+ children: [
210
+ /* @__PURE__ */ jsx(
211
+ XIcon,
212
+ {}
213
+ ),
214
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
215
+ ]
216
+ }
217
+ ) })
218
+ ]
219
+ }
220
+ )
221
+ ] });
222
+ }
223
+ function SheetHeader({ className, ...props }) {
224
+ return /* @__PURE__ */ jsx(
225
+ "div",
226
+ {
227
+ "data-slot": "sheet-header",
228
+ className: cn("flex flex-col gap-0.5 p-4", className),
229
+ ...props
230
+ }
231
+ );
232
+ }
233
+ function SheetFooter({ className, ...props }) {
234
+ return /* @__PURE__ */ jsx(
235
+ "div",
236
+ {
237
+ "data-slot": "sheet-footer",
238
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
239
+ ...props
240
+ }
241
+ );
242
+ }
243
+ function SheetTitle({
244
+ className,
245
+ ...props
246
+ }) {
247
+ return /* @__PURE__ */ jsx(
248
+ Dialog.Title,
249
+ {
250
+ "data-slot": "sheet-title",
251
+ className: cn(
252
+ "font-heading text-sm font-medium text-foreground",
253
+ className
254
+ ),
255
+ ...props
256
+ }
257
+ );
258
+ }
259
+ function SheetDescription({
260
+ className,
261
+ ...props
262
+ }) {
263
+ return /* @__PURE__ */ jsx(
264
+ Dialog.Description,
265
+ {
266
+ "data-slot": "sheet-description",
267
+ className: cn("text-xs/relaxed text-muted-foreground", className),
268
+ ...props
269
+ }
270
+ );
271
+ }
272
+ function Skeleton({ className, ...props }) {
273
+ return /* @__PURE__ */ jsx(
274
+ "div",
275
+ {
276
+ "data-slot": "skeleton",
277
+ className: cn("animate-pulse rounded-none bg-muted", className),
278
+ ...props
279
+ }
280
+ );
281
+ }
282
+ function TooltipProvider({
283
+ delayDuration = 0,
284
+ ...props
285
+ }) {
286
+ return /* @__PURE__ */ jsx(
287
+ Tooltip$1.Provider,
288
+ {
289
+ "data-slot": "tooltip-provider",
290
+ delayDuration,
291
+ ...props
292
+ }
293
+ );
294
+ }
295
+ function Tooltip({
296
+ ...props
297
+ }) {
298
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props });
299
+ }
300
+ function TooltipTrigger({
301
+ ...props
302
+ }) {
303
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { "data-slot": "tooltip-trigger", ...props });
304
+ }
305
+ function TooltipContent({
306
+ className,
307
+ sideOffset = 0,
308
+ children,
309
+ ...props
310
+ }) {
311
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsxs(
312
+ Tooltip$1.Content,
313
+ {
314
+ "data-slot": "tooltip-content",
315
+ sideOffset,
316
+ className: cn(
317
+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-none bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-none data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
318
+ className
319
+ ),
320
+ ...props,
321
+ children: [
322
+ children,
323
+ /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
324
+ ]
325
+ }
326
+ ) });
327
+ }
328
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
329
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
330
+ var SIDEBAR_WIDTH = "16rem";
331
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
332
+ var SIDEBAR_WIDTH_ICON = "3rem";
333
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
334
+ var SidebarContext = React6.createContext(null);
335
+ function useSidebar() {
336
+ const context = React6.useContext(SidebarContext);
337
+ if (!context) {
338
+ throw new Error("useSidebar must be used within a SidebarProvider.");
339
+ }
340
+ return context;
341
+ }
342
+ function SidebarProvider({
343
+ defaultOpen = true,
344
+ open: openProp,
345
+ onOpenChange: setOpenProp,
346
+ className,
347
+ style,
348
+ children,
349
+ ...props
350
+ }) {
351
+ const isMobile = useMobile();
352
+ const [openMobile, setOpenMobile] = React6.useState(false);
353
+ const [_open, _setOpen] = React6.useState(defaultOpen);
354
+ const open = openProp ?? _open;
355
+ const setOpen = React6.useCallback(
356
+ (value) => {
357
+ const openState = typeof value === "function" ? value(open) : value;
358
+ if (setOpenProp) {
359
+ setOpenProp(openState);
360
+ } else {
361
+ _setOpen(openState);
362
+ }
363
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
364
+ },
365
+ [setOpenProp, open]
366
+ );
367
+ const toggleSidebar = React6.useCallback(() => {
368
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
369
+ }, [isMobile, setOpen, setOpenMobile]);
370
+ React6.useEffect(() => {
371
+ const handleKeyDown = (event) => {
372
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
373
+ event.preventDefault();
374
+ toggleSidebar();
375
+ }
376
+ };
377
+ window.addEventListener("keydown", handleKeyDown);
378
+ return () => window.removeEventListener("keydown", handleKeyDown);
379
+ }, [toggleSidebar]);
380
+ const state = open ? "expanded" : "collapsed";
381
+ const contextValue = React6.useMemo(
382
+ () => ({
383
+ state,
384
+ open,
385
+ setOpen,
386
+ isMobile,
387
+ openMobile,
388
+ setOpenMobile,
389
+ toggleSidebar
390
+ }),
391
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
392
+ );
393
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
394
+ "div",
395
+ {
396
+ "data-slot": "sidebar-wrapper",
397
+ style: {
398
+ "--sidebar-width": SIDEBAR_WIDTH,
399
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
400
+ ...style
401
+ },
402
+ className: cn(
403
+ "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
404
+ className
405
+ ),
406
+ ...props,
407
+ children
408
+ }
409
+ ) });
410
+ }
411
+ function Sidebar({
412
+ side = "left",
413
+ variant = "sidebar",
414
+ collapsible = "offcanvas",
415
+ className,
416
+ children,
417
+ dir,
418
+ ...props
419
+ }) {
420
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
421
+ if (collapsible === "none") {
422
+ return /* @__PURE__ */ jsx(
423
+ "div",
424
+ {
425
+ "data-slot": "sidebar",
426
+ className: cn(
427
+ "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
428
+ className
429
+ ),
430
+ ...props,
431
+ children
432
+ }
433
+ );
434
+ }
435
+ if (isMobile) {
436
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
437
+ SheetContent,
438
+ {
439
+ dir,
440
+ "data-sidebar": "sidebar",
441
+ "data-slot": "sidebar",
442
+ "data-mobile": "true",
443
+ className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
444
+ style: {
445
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
446
+ },
447
+ side,
448
+ children: [
449
+ /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
450
+ /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
451
+ /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
452
+ ] }),
453
+ /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
454
+ ]
455
+ }
456
+ ) });
457
+ }
458
+ return /* @__PURE__ */ jsxs(
459
+ "div",
460
+ {
461
+ className: "group peer hidden text-sidebar-foreground md:block",
462
+ "data-state": state,
463
+ "data-collapsible": state === "collapsed" ? collapsible : "",
464
+ "data-variant": variant,
465
+ "data-side": side,
466
+ "data-slot": "sidebar",
467
+ children: [
468
+ /* @__PURE__ */ jsx(
469
+ "div",
470
+ {
471
+ "data-slot": "sidebar-gap",
472
+ className: cn(
473
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
474
+ "group-data-[collapsible=offcanvas]:w-0",
475
+ "group-data-[side=right]:rotate-180",
476
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
477
+ )
478
+ }
479
+ ),
480
+ /* @__PURE__ */ jsx(
481
+ "div",
482
+ {
483
+ "data-slot": "sidebar-container",
484
+ "data-side": side,
485
+ className: cn(
486
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
487
+ // Adjust the padding for floating and inset variants.
488
+ 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",
489
+ className
490
+ ),
491
+ ...props,
492
+ children: /* @__PURE__ */ jsx(
493
+ "div",
494
+ {
495
+ "data-sidebar": "sidebar",
496
+ "data-slot": "sidebar-inner",
497
+ className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
498
+ children
499
+ }
500
+ )
501
+ }
502
+ )
503
+ ]
504
+ }
505
+ );
506
+ }
507
+ function SidebarTrigger({
508
+ className,
509
+ onClick,
510
+ ...props
511
+ }) {
512
+ const { toggleSidebar } = useSidebar();
513
+ return /* @__PURE__ */ jsxs(
514
+ Button,
515
+ {
516
+ "data-sidebar": "trigger",
517
+ "data-slot": "sidebar-trigger",
518
+ variant: "ghost",
519
+ size: "icon-sm",
520
+ className: cn(className),
521
+ onClick: (event) => {
522
+ onClick?.(event);
523
+ toggleSidebar();
524
+ },
525
+ ...props,
526
+ children: [
527
+ /* @__PURE__ */ jsx(PanelLeftIcon, {}),
528
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
529
+ ]
530
+ }
531
+ );
532
+ }
533
+ function SidebarRail({ className, ...props }) {
534
+ const { toggleSidebar } = useSidebar();
535
+ return /* @__PURE__ */ jsx(
536
+ "button",
537
+ {
538
+ "data-sidebar": "rail",
539
+ "data-slot": "sidebar-rail",
540
+ "aria-label": "Toggle Sidebar",
541
+ tabIndex: -1,
542
+ onClick: toggleSidebar,
543
+ title: "Toggle Sidebar",
544
+ className: cn(
545
+ "absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
546
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
547
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
548
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
549
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
550
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
551
+ className
552
+ ),
553
+ ...props
554
+ }
555
+ );
556
+ }
557
+ function SidebarInset({ className, ...props }) {
558
+ return /* @__PURE__ */ jsx(
559
+ "main",
560
+ {
561
+ "data-slot": "sidebar-inset",
562
+ className: cn(
563
+ "relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
564
+ className
565
+ ),
566
+ ...props
567
+ }
568
+ );
569
+ }
570
+ function SidebarInput({
571
+ className,
572
+ ...props
573
+ }) {
574
+ return /* @__PURE__ */ jsx(
575
+ Input,
576
+ {
577
+ "data-slot": "sidebar-input",
578
+ "data-sidebar": "input",
579
+ className: cn("h-8 w-full bg-background shadow-none", className),
580
+ ...props
581
+ }
582
+ );
583
+ }
584
+ function SidebarHeader({ className, ...props }) {
585
+ return /* @__PURE__ */ jsx(
586
+ "div",
587
+ {
588
+ "data-slot": "sidebar-header",
589
+ "data-sidebar": "header",
590
+ className: cn("flex flex-col gap-2 p-2", className),
591
+ ...props
592
+ }
593
+ );
594
+ }
595
+ function SidebarFooter({ className, ...props }) {
596
+ return /* @__PURE__ */ jsx(
597
+ "div",
598
+ {
599
+ "data-slot": "sidebar-footer",
600
+ "data-sidebar": "footer",
601
+ className: cn("flex flex-col gap-2 p-2", className),
602
+ ...props
603
+ }
604
+ );
605
+ }
606
+ function SidebarSeparator({
607
+ className,
608
+ ...props
609
+ }) {
610
+ return /* @__PURE__ */ jsx(
611
+ Separator,
612
+ {
613
+ "data-slot": "sidebar-separator",
614
+ "data-sidebar": "separator",
615
+ className: cn("mx-2 w-auto bg-sidebar-border", className),
616
+ ...props
617
+ }
618
+ );
619
+ }
620
+ function SidebarContent({ className, ...props }) {
621
+ return /* @__PURE__ */ jsx(
622
+ "div",
623
+ {
624
+ "data-slot": "sidebar-content",
625
+ "data-sidebar": "content",
626
+ className: cn(
627
+ "no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
628
+ className
629
+ ),
630
+ ...props
631
+ }
632
+ );
633
+ }
634
+ function SidebarGroup({ className, ...props }) {
635
+ return /* @__PURE__ */ jsx(
636
+ "div",
637
+ {
638
+ "data-slot": "sidebar-group",
639
+ "data-sidebar": "group",
640
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
641
+ ...props
642
+ }
643
+ );
644
+ }
645
+ function SidebarGroupLabel({
646
+ className,
647
+ asChild = false,
648
+ ...props
649
+ }) {
650
+ const Comp = asChild ? Slot.Root : "div";
651
+ return /* @__PURE__ */ jsx(
652
+ Comp,
653
+ {
654
+ "data-slot": "sidebar-group-label",
655
+ "data-sidebar": "group-label",
656
+ className: cn(
657
+ "flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
658
+ className
659
+ ),
660
+ ...props
661
+ }
662
+ );
663
+ }
664
+ function SidebarGroupAction({
665
+ className,
666
+ asChild = false,
667
+ ...props
668
+ }) {
669
+ const Comp = asChild ? Slot.Root : "button";
670
+ return /* @__PURE__ */ jsx(
671
+ Comp,
672
+ {
673
+ "data-slot": "sidebar-group-action",
674
+ "data-sidebar": "group-action",
675
+ className: cn(
676
+ "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-none p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
677
+ className
678
+ ),
679
+ ...props
680
+ }
681
+ );
682
+ }
683
+ function SidebarGroupContent({
684
+ className,
685
+ ...props
686
+ }) {
687
+ return /* @__PURE__ */ jsx(
688
+ "div",
689
+ {
690
+ "data-slot": "sidebar-group-content",
691
+ "data-sidebar": "group-content",
692
+ className: cn("w-full text-xs", className),
693
+ ...props
694
+ }
695
+ );
696
+ }
697
+ function SidebarMenu({ className, ...props }) {
698
+ return /* @__PURE__ */ jsx(
699
+ "ul",
700
+ {
701
+ "data-slot": "sidebar-menu",
702
+ "data-sidebar": "menu",
703
+ className: cn("flex w-full min-w-0 flex-col gap-0", className),
704
+ ...props
705
+ }
706
+ );
707
+ }
708
+ function SidebarMenuItem({ className, ...props }) {
709
+ return /* @__PURE__ */ jsx(
710
+ "li",
711
+ {
712
+ "data-slot": "sidebar-menu-item",
713
+ "data-sidebar": "menu-item",
714
+ className: cn("group/menu-item relative", className),
715
+ ...props
716
+ }
717
+ );
718
+ }
719
+ var sidebarMenuButtonVariants = cva(
720
+ "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-left text-xs 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-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",
721
+ {
722
+ variants: {
723
+ variant: {
724
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
725
+ outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
726
+ },
727
+ size: {
728
+ default: "h-8 text-xs",
729
+ sm: "h-7 text-xs",
730
+ lg: "h-12 text-xs group-data-[collapsible=icon]:p-0!"
731
+ }
732
+ },
733
+ defaultVariants: {
734
+ variant: "default",
735
+ size: "default"
736
+ }
737
+ }
738
+ );
739
+ function SidebarMenuButton({
740
+ asChild = false,
741
+ isActive = false,
742
+ variant = "default",
743
+ size = "default",
744
+ tooltip,
745
+ className,
746
+ ...props
747
+ }) {
748
+ const Comp = asChild ? Slot.Root : "button";
749
+ const { isMobile, state } = useSidebar();
750
+ const button = /* @__PURE__ */ jsx(
751
+ Comp,
752
+ {
753
+ "data-slot": "sidebar-menu-button",
754
+ "data-sidebar": "menu-button",
755
+ "data-size": size,
756
+ "data-active": isActive,
757
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
758
+ ...props
759
+ }
760
+ );
761
+ if (!tooltip) {
762
+ return button;
763
+ }
764
+ if (typeof tooltip === "string") {
765
+ tooltip = {
766
+ children: tooltip
767
+ };
768
+ }
769
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
770
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
771
+ /* @__PURE__ */ jsx(
772
+ TooltipContent,
773
+ {
774
+ side: "right",
775
+ align: "center",
776
+ hidden: state !== "collapsed" || isMobile,
777
+ ...tooltip
778
+ }
779
+ )
780
+ ] });
781
+ }
782
+ function SidebarMenuAction({
783
+ className,
784
+ asChild = false,
785
+ showOnHover = false,
786
+ ...props
787
+ }) {
788
+ const Comp = asChild ? Slot.Root : "button";
789
+ return /* @__PURE__ */ jsx(
790
+ Comp,
791
+ {
792
+ "data-slot": "sidebar-menu-action",
793
+ "data-sidebar": "menu-action",
794
+ className: cn(
795
+ "absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-none p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
796
+ showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",
797
+ className
798
+ ),
799
+ ...props
800
+ }
801
+ );
802
+ }
803
+ function SidebarMenuBadge({
804
+ className,
805
+ ...props
806
+ }) {
807
+ return /* @__PURE__ */ jsx(
808
+ "div",
809
+ {
810
+ "data-slot": "sidebar-menu-badge",
811
+ "data-sidebar": "menu-badge",
812
+ className: cn(
813
+ "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-none px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
814
+ className
815
+ ),
816
+ ...props
817
+ }
818
+ );
819
+ }
820
+ function SidebarMenuSkeleton({
821
+ className,
822
+ showIcon = false,
823
+ ...props
824
+ }) {
825
+ const [width] = React6.useState(() => {
826
+ return `${Math.floor(Math.random() * 40) + 50}%`;
827
+ });
828
+ return /* @__PURE__ */ jsxs(
829
+ "div",
830
+ {
831
+ "data-slot": "sidebar-menu-skeleton",
832
+ "data-sidebar": "menu-skeleton",
833
+ className: cn("flex h-8 items-center gap-2 rounded-none px-2", className),
834
+ ...props,
835
+ children: [
836
+ showIcon && /* @__PURE__ */ jsx(
837
+ Skeleton,
838
+ {
839
+ className: "size-4 rounded-none",
840
+ "data-sidebar": "menu-skeleton-icon"
841
+ }
842
+ ),
843
+ /* @__PURE__ */ jsx(
844
+ Skeleton,
845
+ {
846
+ className: "h-4 max-w-(--skeleton-width) flex-1",
847
+ "data-sidebar": "menu-skeleton-text",
848
+ style: {
849
+ "--skeleton-width": width
850
+ }
851
+ }
852
+ )
853
+ ]
854
+ }
855
+ );
856
+ }
857
+ function SidebarMenuSub({ className, ...props }) {
858
+ return /* @__PURE__ */ jsx(
859
+ "ul",
860
+ {
861
+ "data-slot": "sidebar-menu-sub",
862
+ "data-sidebar": "menu-sub",
863
+ className: cn(
864
+ "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 group-data-[collapsible=icon]:hidden",
865
+ className
866
+ ),
867
+ ...props
868
+ }
869
+ );
870
+ }
871
+ function SidebarMenuSubItem({
872
+ className,
873
+ ...props
874
+ }) {
875
+ return /* @__PURE__ */ jsx(
876
+ "li",
877
+ {
878
+ "data-slot": "sidebar-menu-sub-item",
879
+ "data-sidebar": "menu-sub-item",
880
+ className: cn("group/menu-sub-item relative", className),
881
+ ...props
882
+ }
883
+ );
884
+ }
885
+ function SidebarMenuSubButton({
886
+ asChild = false,
887
+ size = "md",
888
+ isActive = false,
889
+ className,
890
+ ...props
891
+ }) {
892
+ const Comp = asChild ? Slot.Root : "a";
893
+ return /* @__PURE__ */ jsx(
894
+ Comp,
895
+ {
896
+ "data-slot": "sidebar-menu-sub-button",
897
+ "data-sidebar": "menu-sub-button",
898
+ "data-size": size,
899
+ "data-active": isActive,
900
+ className: cn(
901
+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-none px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]: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 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
902
+ className
903
+ ),
904
+ ...props
905
+ }
906
+ );
907
+ }
908
+
909
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Input, Separator, 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, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, useSidebar };
910
+ //# sourceMappingURL=chunk-E2QCV5QI.js.map
911
+ //# sourceMappingURL=chunk-E2QCV5QI.js.map