@blips/ui 0.0.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1347 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +185 -6
- package/dist/index.d.ts +185 -6
- package/dist/index.js +1295 -148
- package/dist/index.js.map +1 -1
- package/package.json +25 -13
- package/src/components/accordion.tsx +12 -12
- package/src/components/alert-dialog.tsx +25 -24
- package/src/components/alert.tsx +11 -11
- package/src/components/aspect-ratio.tsx +3 -3
- package/src/components/avatar.tsx +11 -11
- package/src/components/badge.tsx +6 -6
- package/src/components/breadcrumb.tsx +23 -23
- package/src/components/button-group.tsx +83 -0
- package/src/components/button.tsx +11 -11
- package/src/components/calendar.tsx +21 -24
- package/src/components/card.tsx +15 -22
- package/src/components/carousel.tsx +72 -71
- package/src/components/chart.tsx +368 -0
- package/src/components/checkbox.tsx +7 -7
- package/src/components/collapsible.tsx +6 -6
- package/src/components/command.tsx +27 -26
- package/src/components/context-menu.tsx +33 -33
- package/src/components/dialog.tsx +22 -22
- package/src/components/drawer.tsx +21 -21
- package/src/components/dropdown-menu.tsx +34 -34
- package/src/components/form.tsx +178 -0
- package/src/components/hover-card.tsx +8 -8
- package/src/components/input-group.tsx +175 -0
- package/src/components/input-otp.tsx +16 -16
- package/src/components/input.tsx +6 -6
- package/src/components/kbd.tsx +28 -0
- package/src/components/label.tsx +9 -9
- package/src/components/menubar.tsx +36 -36
- package/src/components/navigation-menu.tsx +21 -21
- package/src/components/pagination.tsx +22 -21
- package/src/components/popover.tsx +8 -8
- package/src/components/progress.tsx +7 -7
- package/src/components/radio-group.tsx +11 -11
- package/src/components/resizable.tsx +14 -14
- package/src/components/scroll-area.tsx +8 -8
- package/src/components/select.tsx +23 -23
- package/src/components/separator.tsx +6 -6
- package/src/components/sheet.tsx +24 -24
- package/src/components/sidebar.tsx +774 -0
- package/src/components/skeleton.tsx +3 -3
- package/src/components/slider.tsx +6 -6
- package/src/components/sonner.tsx +9 -9
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.tsx +6 -6
- package/src/components/table.tsx +19 -19
- package/src/components/tabs.tsx +11 -11
- package/src/components/textarea.tsx +6 -6
- package/src/components/toggle-group.tsx +15 -14
- package/src/components/toggle.tsx +8 -8
- package/src/components/tooltip.tsx +10 -10
- package/src/globals.css +45 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/index.ts +78 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import * as React41 from 'react';
|
|
1
2
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import { ChevronDown, ArrowLeft, ArrowRight, Check, X, Search, ChevronRight, Circle, Dot, ChevronUp, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, ChevronLeft, GripVertical, LoaderCircle, OctagonX, TriangleAlert, Info, CircleCheck } from 'lucide-react';
|
|
3
|
-
import * as React9 from 'react';
|
|
3
|
+
import { ChevronDown, ArrowLeft, ArrowRight, Check, X, Search, ChevronRight, Circle, Dot, ChevronUp, PanelLeft, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, ChevronLeft, GripVertical, LoaderCircle, OctagonX, TriangleAlert, Info, CircleCheck, Loader2Icon } from 'lucide-react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -26,7 +26,7 @@ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
|
26
26
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
27
27
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
28
28
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
29
|
-
import
|
|
29
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
30
30
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
31
31
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
32
32
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
@@ -38,13 +38,15 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
|
38
38
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
39
39
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
40
40
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
41
|
+
import * as RechartsPrimitive from 'recharts';
|
|
42
|
+
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
41
43
|
|
|
42
44
|
// src/components/accordion.tsx
|
|
43
45
|
function cn(...inputs) {
|
|
44
46
|
return twMerge(clsx(inputs));
|
|
45
47
|
}
|
|
46
48
|
var Accordion = AccordionPrimitive.Root;
|
|
47
|
-
var AccordionItem =
|
|
49
|
+
var AccordionItem = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48
50
|
AccordionPrimitive.Item,
|
|
49
51
|
{
|
|
50
52
|
ref,
|
|
@@ -53,7 +55,7 @@ var AccordionItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
53
55
|
}
|
|
54
56
|
));
|
|
55
57
|
AccordionItem.displayName = "AccordionItem";
|
|
56
|
-
var AccordionTrigger =
|
|
58
|
+
var AccordionTrigger = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
57
59
|
AccordionPrimitive.Trigger,
|
|
58
60
|
{
|
|
59
61
|
ref,
|
|
@@ -69,7 +71,7 @@ var AccordionTrigger = React9.forwardRef(({ className, children, ...props }, ref
|
|
|
69
71
|
}
|
|
70
72
|
) }));
|
|
71
73
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
72
|
-
var AccordionContent =
|
|
74
|
+
var AccordionContent = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
73
75
|
AccordionPrimitive.Content,
|
|
74
76
|
{
|
|
75
77
|
ref,
|
|
@@ -93,7 +95,7 @@ var alertVariants = cva(
|
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
);
|
|
96
|
-
var Alert =
|
|
98
|
+
var Alert = React41.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
97
99
|
"div",
|
|
98
100
|
{
|
|
99
101
|
ref,
|
|
@@ -103,7 +105,7 @@ var Alert = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__P
|
|
|
103
105
|
}
|
|
104
106
|
));
|
|
105
107
|
Alert.displayName = "Alert";
|
|
106
|
-
var AlertTitle =
|
|
108
|
+
var AlertTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
107
109
|
"h5",
|
|
108
110
|
{
|
|
109
111
|
ref,
|
|
@@ -112,7 +114,7 @@ var AlertTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
112
114
|
}
|
|
113
115
|
));
|
|
114
116
|
AlertTitle.displayName = "AlertTitle";
|
|
115
|
-
var AlertDescription =
|
|
117
|
+
var AlertDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
116
118
|
"div",
|
|
117
119
|
{
|
|
118
120
|
ref,
|
|
@@ -146,7 +148,7 @@ var buttonVariants = cva(
|
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
);
|
|
149
|
-
var Button =
|
|
151
|
+
var Button = React41.forwardRef(
|
|
150
152
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
151
153
|
const Comp = asChild ? Slot : "button";
|
|
152
154
|
return /* @__PURE__ */ jsx(
|
|
@@ -163,7 +165,7 @@ Button.displayName = "Button";
|
|
|
163
165
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
164
166
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
165
167
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
166
|
-
var AlertDialogOverlay =
|
|
168
|
+
var AlertDialogOverlay = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
167
169
|
AlertDialogPrimitive.Overlay,
|
|
168
170
|
{
|
|
169
171
|
className: cn(
|
|
@@ -175,7 +177,7 @@ var AlertDialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /*
|
|
|
175
177
|
}
|
|
176
178
|
));
|
|
177
179
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
178
|
-
var AlertDialogContent =
|
|
180
|
+
var AlertDialogContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
179
181
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
180
182
|
/* @__PURE__ */ jsx(
|
|
181
183
|
AlertDialogPrimitive.Content,
|
|
@@ -218,7 +220,7 @@ var AlertDialogFooter = ({
|
|
|
218
220
|
}
|
|
219
221
|
);
|
|
220
222
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
221
|
-
var AlertDialogTitle =
|
|
223
|
+
var AlertDialogTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
222
224
|
AlertDialogPrimitive.Title,
|
|
223
225
|
{
|
|
224
226
|
ref,
|
|
@@ -227,7 +229,7 @@ var AlertDialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
227
229
|
}
|
|
228
230
|
));
|
|
229
231
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
230
|
-
var AlertDialogDescription =
|
|
232
|
+
var AlertDialogDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
231
233
|
AlertDialogPrimitive.Description,
|
|
232
234
|
{
|
|
233
235
|
ref,
|
|
@@ -236,7 +238,7 @@ var AlertDialogDescription = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
236
238
|
}
|
|
237
239
|
));
|
|
238
240
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
239
|
-
var AlertDialogAction =
|
|
241
|
+
var AlertDialogAction = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
240
242
|
AlertDialogPrimitive.Action,
|
|
241
243
|
{
|
|
242
244
|
ref,
|
|
@@ -245,7 +247,7 @@ var AlertDialogAction = React9.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
245
247
|
}
|
|
246
248
|
));
|
|
247
249
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
248
|
-
var AlertDialogCancel =
|
|
250
|
+
var AlertDialogCancel = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
249
251
|
AlertDialogPrimitive.Cancel,
|
|
250
252
|
{
|
|
251
253
|
ref,
|
|
@@ -259,7 +261,7 @@ var AlertDialogCancel = React9.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
259
261
|
));
|
|
260
262
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
261
263
|
var AspectRatio = AspectRatioPrimitive.Root;
|
|
262
|
-
var Avatar =
|
|
264
|
+
var Avatar = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
263
265
|
AvatarPrimitive.Root,
|
|
264
266
|
{
|
|
265
267
|
ref,
|
|
@@ -271,7 +273,7 @@ var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
271
273
|
}
|
|
272
274
|
));
|
|
273
275
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
274
|
-
var AvatarImage =
|
|
276
|
+
var AvatarImage = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
275
277
|
AvatarPrimitive.Image,
|
|
276
278
|
{
|
|
277
279
|
ref,
|
|
@@ -280,7 +282,7 @@ var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
280
282
|
}
|
|
281
283
|
));
|
|
282
284
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
283
|
-
var AvatarFallback =
|
|
285
|
+
var AvatarFallback = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
284
286
|
AvatarPrimitive.Fallback,
|
|
285
287
|
{
|
|
286
288
|
ref,
|
|
@@ -311,9 +313,9 @@ var badgeVariants = cva(
|
|
|
311
313
|
function Badge({ className, variant, ...props }) {
|
|
312
314
|
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
313
315
|
}
|
|
314
|
-
var Breadcrumb =
|
|
316
|
+
var Breadcrumb = React41.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
315
317
|
Breadcrumb.displayName = "Breadcrumb";
|
|
316
|
-
var BreadcrumbList =
|
|
318
|
+
var BreadcrumbList = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
317
319
|
"ol",
|
|
318
320
|
{
|
|
319
321
|
ref,
|
|
@@ -325,7 +327,7 @@ var BreadcrumbList = React9.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
325
327
|
}
|
|
326
328
|
));
|
|
327
329
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
328
|
-
var BreadcrumbItem =
|
|
330
|
+
var BreadcrumbItem = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
329
331
|
"li",
|
|
330
332
|
{
|
|
331
333
|
ref,
|
|
@@ -334,7 +336,7 @@ var BreadcrumbItem = React9.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
334
336
|
}
|
|
335
337
|
));
|
|
336
338
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
337
|
-
var BreadcrumbLink =
|
|
339
|
+
var BreadcrumbLink = React41.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
338
340
|
const Comp = asChild ? Slot : "a";
|
|
339
341
|
return /* @__PURE__ */ jsx(
|
|
340
342
|
Comp,
|
|
@@ -346,7 +348,7 @@ var BreadcrumbLink = React9.forwardRef(({ asChild, className, ...props }, ref) =
|
|
|
346
348
|
);
|
|
347
349
|
});
|
|
348
350
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
349
|
-
var BreadcrumbPage =
|
|
351
|
+
var BreadcrumbPage = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
350
352
|
"span",
|
|
351
353
|
{
|
|
352
354
|
ref,
|
|
@@ -542,8 +544,8 @@ function CalendarDayButton({
|
|
|
542
544
|
...props
|
|
543
545
|
}) {
|
|
544
546
|
const defaultClassNames = getDefaultClassNames();
|
|
545
|
-
const ref =
|
|
546
|
-
|
|
547
|
+
const ref = React41.useRef(null);
|
|
548
|
+
React41.useEffect(() => {
|
|
547
549
|
if (modifiers.focused) ref.current?.focus();
|
|
548
550
|
}, [modifiers.focused]);
|
|
549
551
|
return /* @__PURE__ */ jsx(
|
|
@@ -566,7 +568,7 @@ function CalendarDayButton({
|
|
|
566
568
|
}
|
|
567
569
|
);
|
|
568
570
|
}
|
|
569
|
-
var Card =
|
|
571
|
+
var Card = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
570
572
|
"div",
|
|
571
573
|
{
|
|
572
574
|
ref,
|
|
@@ -578,7 +580,7 @@ var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
578
580
|
}
|
|
579
581
|
));
|
|
580
582
|
Card.displayName = "Card";
|
|
581
|
-
var CardHeader =
|
|
583
|
+
var CardHeader = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
582
584
|
"div",
|
|
583
585
|
{
|
|
584
586
|
ref,
|
|
@@ -587,7 +589,7 @@ var CardHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
587
589
|
}
|
|
588
590
|
));
|
|
589
591
|
CardHeader.displayName = "CardHeader";
|
|
590
|
-
var CardTitle =
|
|
592
|
+
var CardTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
591
593
|
"div",
|
|
592
594
|
{
|
|
593
595
|
ref,
|
|
@@ -599,7 +601,7 @@ var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
599
601
|
}
|
|
600
602
|
));
|
|
601
603
|
CardTitle.displayName = "CardTitle";
|
|
602
|
-
var CardDescription =
|
|
604
|
+
var CardDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
603
605
|
"div",
|
|
604
606
|
{
|
|
605
607
|
ref,
|
|
@@ -608,9 +610,9 @@ var CardDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
608
610
|
}
|
|
609
611
|
));
|
|
610
612
|
CardDescription.displayName = "CardDescription";
|
|
611
|
-
var CardContent =
|
|
613
|
+
var CardContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
612
614
|
CardContent.displayName = "CardContent";
|
|
613
|
-
var CardFooter =
|
|
615
|
+
var CardFooter = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
614
616
|
"div",
|
|
615
617
|
{
|
|
616
618
|
ref,
|
|
@@ -619,15 +621,15 @@ var CardFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
619
621
|
}
|
|
620
622
|
));
|
|
621
623
|
CardFooter.displayName = "CardFooter";
|
|
622
|
-
var CarouselContext =
|
|
624
|
+
var CarouselContext = React41.createContext(null);
|
|
623
625
|
function useCarousel() {
|
|
624
|
-
const context =
|
|
626
|
+
const context = React41.useContext(CarouselContext);
|
|
625
627
|
if (!context) {
|
|
626
628
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
627
629
|
}
|
|
628
630
|
return context;
|
|
629
631
|
}
|
|
630
|
-
var Carousel =
|
|
632
|
+
var Carousel = React41.forwardRef(
|
|
631
633
|
({
|
|
632
634
|
orientation = "horizontal",
|
|
633
635
|
opts,
|
|
@@ -644,22 +646,22 @@ var Carousel = React9.forwardRef(
|
|
|
644
646
|
},
|
|
645
647
|
plugins
|
|
646
648
|
);
|
|
647
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
648
|
-
const [canScrollNext, setCanScrollNext] =
|
|
649
|
-
const onSelect =
|
|
649
|
+
const [canScrollPrev, setCanScrollPrev] = React41.useState(false);
|
|
650
|
+
const [canScrollNext, setCanScrollNext] = React41.useState(false);
|
|
651
|
+
const onSelect = React41.useCallback((api2) => {
|
|
650
652
|
if (!api2) {
|
|
651
653
|
return;
|
|
652
654
|
}
|
|
653
655
|
setCanScrollPrev(api2.canScrollPrev());
|
|
654
656
|
setCanScrollNext(api2.canScrollNext());
|
|
655
657
|
}, []);
|
|
656
|
-
const scrollPrev =
|
|
658
|
+
const scrollPrev = React41.useCallback(() => {
|
|
657
659
|
api?.scrollPrev();
|
|
658
660
|
}, [api]);
|
|
659
|
-
const scrollNext =
|
|
661
|
+
const scrollNext = React41.useCallback(() => {
|
|
660
662
|
api?.scrollNext();
|
|
661
663
|
}, [api]);
|
|
662
|
-
const handleKeyDown =
|
|
664
|
+
const handleKeyDown = React41.useCallback(
|
|
663
665
|
(event) => {
|
|
664
666
|
if (event.key === "ArrowLeft") {
|
|
665
667
|
event.preventDefault();
|
|
@@ -671,13 +673,13 @@ var Carousel = React9.forwardRef(
|
|
|
671
673
|
},
|
|
672
674
|
[scrollPrev, scrollNext]
|
|
673
675
|
);
|
|
674
|
-
|
|
676
|
+
React41.useEffect(() => {
|
|
675
677
|
if (!api || !setApi) {
|
|
676
678
|
return;
|
|
677
679
|
}
|
|
678
680
|
setApi(api);
|
|
679
681
|
}, [api, setApi]);
|
|
680
|
-
|
|
682
|
+
React41.useEffect(() => {
|
|
681
683
|
if (!api) {
|
|
682
684
|
return;
|
|
683
685
|
}
|
|
@@ -718,7 +720,7 @@ var Carousel = React9.forwardRef(
|
|
|
718
720
|
}
|
|
719
721
|
);
|
|
720
722
|
Carousel.displayName = "Carousel";
|
|
721
|
-
var CarouselContent =
|
|
723
|
+
var CarouselContent = React41.forwardRef(({ className, ...props }, ref) => {
|
|
722
724
|
const { carouselRef, orientation } = useCarousel();
|
|
723
725
|
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
724
726
|
"div",
|
|
@@ -734,7 +736,7 @@ var CarouselContent = React9.forwardRef(({ className, ...props }, ref) => {
|
|
|
734
736
|
) });
|
|
735
737
|
});
|
|
736
738
|
CarouselContent.displayName = "CarouselContent";
|
|
737
|
-
var CarouselItem =
|
|
739
|
+
var CarouselItem = React41.forwardRef(({ className, ...props }, ref) => {
|
|
738
740
|
const { orientation } = useCarousel();
|
|
739
741
|
return /* @__PURE__ */ jsx(
|
|
740
742
|
"div",
|
|
@@ -752,7 +754,7 @@ var CarouselItem = React9.forwardRef(({ className, ...props }, ref) => {
|
|
|
752
754
|
);
|
|
753
755
|
});
|
|
754
756
|
CarouselItem.displayName = "CarouselItem";
|
|
755
|
-
var CarouselPrevious =
|
|
757
|
+
var CarouselPrevious = React41.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
756
758
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
757
759
|
return /* @__PURE__ */ jsxs(
|
|
758
760
|
Button,
|
|
@@ -776,7 +778,7 @@ var CarouselPrevious = React9.forwardRef(({ className, variant = "outline", size
|
|
|
776
778
|
);
|
|
777
779
|
});
|
|
778
780
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
779
|
-
var CarouselNext =
|
|
781
|
+
var CarouselNext = React41.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
780
782
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
781
783
|
return /* @__PURE__ */ jsxs(
|
|
782
784
|
Button,
|
|
@@ -800,7 +802,7 @@ var CarouselNext = React9.forwardRef(({ className, variant = "outline", size = "
|
|
|
800
802
|
);
|
|
801
803
|
});
|
|
802
804
|
CarouselNext.displayName = "CarouselNext";
|
|
803
|
-
var Checkbox =
|
|
805
|
+
var Checkbox = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
804
806
|
CheckboxPrimitive.Root,
|
|
805
807
|
{
|
|
806
808
|
ref,
|
|
@@ -826,7 +828,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
826
828
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
827
829
|
var DialogPortal = DialogPrimitive.Portal;
|
|
828
830
|
var DialogClose = DialogPrimitive.Close;
|
|
829
|
-
var DialogOverlay =
|
|
831
|
+
var DialogOverlay = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
830
832
|
DialogPrimitive.Overlay,
|
|
831
833
|
{
|
|
832
834
|
ref,
|
|
@@ -838,7 +840,7 @@ var DialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
838
840
|
}
|
|
839
841
|
));
|
|
840
842
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
841
|
-
var DialogContent =
|
|
843
|
+
var DialogContent = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
842
844
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
843
845
|
/* @__PURE__ */ jsxs(
|
|
844
846
|
DialogPrimitive.Content,
|
|
@@ -888,7 +890,7 @@ var DialogFooter = ({
|
|
|
888
890
|
}
|
|
889
891
|
);
|
|
890
892
|
DialogFooter.displayName = "DialogFooter";
|
|
891
|
-
var DialogTitle =
|
|
893
|
+
var DialogTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
892
894
|
DialogPrimitive.Title,
|
|
893
895
|
{
|
|
894
896
|
ref,
|
|
@@ -900,7 +902,7 @@ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
900
902
|
}
|
|
901
903
|
));
|
|
902
904
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
903
|
-
var DialogDescription =
|
|
905
|
+
var DialogDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
904
906
|
DialogPrimitive.Description,
|
|
905
907
|
{
|
|
906
908
|
ref,
|
|
@@ -909,7 +911,7 @@ var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
909
911
|
}
|
|
910
912
|
));
|
|
911
913
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
912
|
-
var Command =
|
|
914
|
+
var Command = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
913
915
|
Command$1,
|
|
914
916
|
{
|
|
915
917
|
ref,
|
|
@@ -924,7 +926,7 @@ Command.displayName = Command$1.displayName;
|
|
|
924
926
|
var CommandDialog = ({ children, ...props }) => {
|
|
925
927
|
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
926
928
|
};
|
|
927
|
-
var CommandInput =
|
|
929
|
+
var CommandInput = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
928
930
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
929
931
|
/* @__PURE__ */ jsx(
|
|
930
932
|
Command$1.Input,
|
|
@@ -939,7 +941,7 @@ var CommandInput = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
939
941
|
)
|
|
940
942
|
] }));
|
|
941
943
|
CommandInput.displayName = Command$1.Input.displayName;
|
|
942
|
-
var CommandList =
|
|
944
|
+
var CommandList = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
943
945
|
Command$1.List,
|
|
944
946
|
{
|
|
945
947
|
ref,
|
|
@@ -948,7 +950,7 @@ var CommandList = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
948
950
|
}
|
|
949
951
|
));
|
|
950
952
|
CommandList.displayName = Command$1.List.displayName;
|
|
951
|
-
var CommandEmpty =
|
|
953
|
+
var CommandEmpty = React41.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
952
954
|
Command$1.Empty,
|
|
953
955
|
{
|
|
954
956
|
ref,
|
|
@@ -957,7 +959,7 @@ var CommandEmpty = React9.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
957
959
|
}
|
|
958
960
|
));
|
|
959
961
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
960
|
-
var CommandGroup =
|
|
962
|
+
var CommandGroup = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
961
963
|
Command$1.Group,
|
|
962
964
|
{
|
|
963
965
|
ref,
|
|
@@ -969,7 +971,7 @@ var CommandGroup = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
969
971
|
}
|
|
970
972
|
));
|
|
971
973
|
CommandGroup.displayName = Command$1.Group.displayName;
|
|
972
|
-
var CommandSeparator =
|
|
974
|
+
var CommandSeparator = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
973
975
|
Command$1.Separator,
|
|
974
976
|
{
|
|
975
977
|
ref,
|
|
@@ -978,7 +980,7 @@ var CommandSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
978
980
|
}
|
|
979
981
|
));
|
|
980
982
|
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
981
|
-
var CommandItem =
|
|
983
|
+
var CommandItem = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
982
984
|
Command$1.Item,
|
|
983
985
|
{
|
|
984
986
|
ref,
|
|
@@ -1012,7 +1014,7 @@ var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
|
1012
1014
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
1013
1015
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1014
1016
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1015
|
-
var ContextMenuSubTrigger =
|
|
1017
|
+
var ContextMenuSubTrigger = React41.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1016
1018
|
ContextMenuPrimitive.SubTrigger,
|
|
1017
1019
|
{
|
|
1018
1020
|
ref,
|
|
@@ -1029,7 +1031,7 @@ var ContextMenuSubTrigger = React9.forwardRef(({ className, inset, children, ...
|
|
|
1029
1031
|
}
|
|
1030
1032
|
));
|
|
1031
1033
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1032
|
-
var ContextMenuSubContent =
|
|
1034
|
+
var ContextMenuSubContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1033
1035
|
ContextMenuPrimitive.SubContent,
|
|
1034
1036
|
{
|
|
1035
1037
|
ref,
|
|
@@ -1041,7 +1043,7 @@ var ContextMenuSubContent = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
1041
1043
|
}
|
|
1042
1044
|
));
|
|
1043
1045
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1044
|
-
var ContextMenuContent =
|
|
1046
|
+
var ContextMenuContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1045
1047
|
ContextMenuPrimitive.Content,
|
|
1046
1048
|
{
|
|
1047
1049
|
ref,
|
|
@@ -1053,7 +1055,7 @@ var ContextMenuContent = React9.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1053
1055
|
}
|
|
1054
1056
|
) }));
|
|
1055
1057
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1056
|
-
var ContextMenuItem =
|
|
1058
|
+
var ContextMenuItem = React41.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1057
1059
|
ContextMenuPrimitive.Item,
|
|
1058
1060
|
{
|
|
1059
1061
|
ref,
|
|
@@ -1066,7 +1068,7 @@ var ContextMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) =>
|
|
|
1066
1068
|
}
|
|
1067
1069
|
));
|
|
1068
1070
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1069
|
-
var ContextMenuCheckboxItem =
|
|
1071
|
+
var ContextMenuCheckboxItem = React41.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1070
1072
|
ContextMenuPrimitive.CheckboxItem,
|
|
1071
1073
|
{
|
|
1072
1074
|
ref,
|
|
@@ -1083,7 +1085,7 @@ var ContextMenuCheckboxItem = React9.forwardRef(({ className, children, checked,
|
|
|
1083
1085
|
}
|
|
1084
1086
|
));
|
|
1085
1087
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1086
|
-
var ContextMenuRadioItem =
|
|
1088
|
+
var ContextMenuRadioItem = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1087
1089
|
ContextMenuPrimitive.RadioItem,
|
|
1088
1090
|
{
|
|
1089
1091
|
ref,
|
|
@@ -1099,7 +1101,7 @@ var ContextMenuRadioItem = React9.forwardRef(({ className, children, ...props },
|
|
|
1099
1101
|
}
|
|
1100
1102
|
));
|
|
1101
1103
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1102
|
-
var ContextMenuLabel =
|
|
1104
|
+
var ContextMenuLabel = React41.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1103
1105
|
ContextMenuPrimitive.Label,
|
|
1104
1106
|
{
|
|
1105
1107
|
ref,
|
|
@@ -1112,7 +1114,7 @@ var ContextMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1112
1114
|
}
|
|
1113
1115
|
));
|
|
1114
1116
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1115
|
-
var ContextMenuSeparator =
|
|
1117
|
+
var ContextMenuSeparator = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1116
1118
|
ContextMenuPrimitive.Separator,
|
|
1117
1119
|
{
|
|
1118
1120
|
ref,
|
|
@@ -1151,7 +1153,7 @@ Drawer.displayName = "Drawer";
|
|
|
1151
1153
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
1152
1154
|
var DrawerPortal = Drawer$1.Portal;
|
|
1153
1155
|
var DrawerClose = Drawer$1.Close;
|
|
1154
|
-
var DrawerOverlay =
|
|
1156
|
+
var DrawerOverlay = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1155
1157
|
Drawer$1.Overlay,
|
|
1156
1158
|
{
|
|
1157
1159
|
ref,
|
|
@@ -1160,7 +1162,7 @@ var DrawerOverlay = React9.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1160
1162
|
}
|
|
1161
1163
|
));
|
|
1162
1164
|
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
1163
|
-
var DrawerContent =
|
|
1165
|
+
var DrawerContent = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
1164
1166
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1165
1167
|
/* @__PURE__ */ jsxs(
|
|
1166
1168
|
Drawer$1.Content,
|
|
@@ -1201,7 +1203,7 @@ var DrawerFooter = ({
|
|
|
1201
1203
|
}
|
|
1202
1204
|
);
|
|
1203
1205
|
DrawerFooter.displayName = "DrawerFooter";
|
|
1204
|
-
var DrawerTitle =
|
|
1206
|
+
var DrawerTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1205
1207
|
Drawer$1.Title,
|
|
1206
1208
|
{
|
|
1207
1209
|
ref,
|
|
@@ -1213,7 +1215,7 @@ var DrawerTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1213
1215
|
}
|
|
1214
1216
|
));
|
|
1215
1217
|
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
1216
|
-
var DrawerDescription =
|
|
1218
|
+
var DrawerDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1217
1219
|
Drawer$1.Description,
|
|
1218
1220
|
{
|
|
1219
1221
|
ref,
|
|
@@ -1228,7 +1230,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
1228
1230
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1229
1231
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1230
1232
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1231
|
-
var DropdownMenuSubTrigger =
|
|
1233
|
+
var DropdownMenuSubTrigger = React41.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1232
1234
|
DropdownMenuPrimitive.SubTrigger,
|
|
1233
1235
|
{
|
|
1234
1236
|
ref,
|
|
@@ -1245,7 +1247,7 @@ var DropdownMenuSubTrigger = React9.forwardRef(({ className, inset, children, ..
|
|
|
1245
1247
|
}
|
|
1246
1248
|
));
|
|
1247
1249
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1248
|
-
var DropdownMenuSubContent =
|
|
1250
|
+
var DropdownMenuSubContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1249
1251
|
DropdownMenuPrimitive.SubContent,
|
|
1250
1252
|
{
|
|
1251
1253
|
ref,
|
|
@@ -1257,7 +1259,7 @@ var DropdownMenuSubContent = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
1257
1259
|
}
|
|
1258
1260
|
));
|
|
1259
1261
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1260
|
-
var DropdownMenuContent =
|
|
1262
|
+
var DropdownMenuContent = React41.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1261
1263
|
DropdownMenuPrimitive.Content,
|
|
1262
1264
|
{
|
|
1263
1265
|
ref,
|
|
@@ -1270,7 +1272,7 @@ var DropdownMenuContent = React9.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
1270
1272
|
}
|
|
1271
1273
|
) }));
|
|
1272
1274
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1273
|
-
var DropdownMenuItem =
|
|
1275
|
+
var DropdownMenuItem = React41.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1274
1276
|
DropdownMenuPrimitive.Item,
|
|
1275
1277
|
{
|
|
1276
1278
|
ref,
|
|
@@ -1283,7 +1285,7 @@ var DropdownMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1283
1285
|
}
|
|
1284
1286
|
));
|
|
1285
1287
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1286
|
-
var DropdownMenuCheckboxItem =
|
|
1288
|
+
var DropdownMenuCheckboxItem = React41.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1287
1289
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1288
1290
|
{
|
|
1289
1291
|
ref,
|
|
@@ -1300,7 +1302,7 @@ var DropdownMenuCheckboxItem = React9.forwardRef(({ className, children, checked
|
|
|
1300
1302
|
}
|
|
1301
1303
|
));
|
|
1302
1304
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1303
|
-
var DropdownMenuRadioItem =
|
|
1305
|
+
var DropdownMenuRadioItem = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1304
1306
|
DropdownMenuPrimitive.RadioItem,
|
|
1305
1307
|
{
|
|
1306
1308
|
ref,
|
|
@@ -1316,7 +1318,7 @@ var DropdownMenuRadioItem = React9.forwardRef(({ className, children, ...props }
|
|
|
1316
1318
|
}
|
|
1317
1319
|
));
|
|
1318
1320
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1319
|
-
var DropdownMenuLabel =
|
|
1321
|
+
var DropdownMenuLabel = React41.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1320
1322
|
DropdownMenuPrimitive.Label,
|
|
1321
1323
|
{
|
|
1322
1324
|
ref,
|
|
@@ -1329,7 +1331,7 @@ var DropdownMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1329
1331
|
}
|
|
1330
1332
|
));
|
|
1331
1333
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1332
|
-
var DropdownMenuSeparator =
|
|
1334
|
+
var DropdownMenuSeparator = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1333
1335
|
DropdownMenuPrimitive.Separator,
|
|
1334
1336
|
{
|
|
1335
1337
|
ref,
|
|
@@ -1353,7 +1355,7 @@ var DropdownMenuShortcut = ({
|
|
|
1353
1355
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1354
1356
|
var HoverCard = HoverCardPrimitive.Root;
|
|
1355
1357
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
1356
|
-
var HoverCardContent =
|
|
1358
|
+
var HoverCardContent = React41.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1357
1359
|
HoverCardPrimitive.Content,
|
|
1358
1360
|
{
|
|
1359
1361
|
ref,
|
|
@@ -1367,7 +1369,7 @@ var HoverCardContent = React9.forwardRef(({ className, align = "center", sideOff
|
|
|
1367
1369
|
}
|
|
1368
1370
|
));
|
|
1369
1371
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
1370
|
-
var Input =
|
|
1372
|
+
var Input = React41.forwardRef(
|
|
1371
1373
|
({ className, type, ...props }, ref) => {
|
|
1372
1374
|
return /* @__PURE__ */ jsx(
|
|
1373
1375
|
"input",
|
|
@@ -1384,7 +1386,7 @@ var Input = React9.forwardRef(
|
|
|
1384
1386
|
}
|
|
1385
1387
|
);
|
|
1386
1388
|
Input.displayName = "Input";
|
|
1387
|
-
var InputOTP =
|
|
1389
|
+
var InputOTP = React41.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1388
1390
|
OTPInput,
|
|
1389
1391
|
{
|
|
1390
1392
|
ref,
|
|
@@ -1397,10 +1399,10 @@ var InputOTP = React9.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
1397
1399
|
}
|
|
1398
1400
|
));
|
|
1399
1401
|
InputOTP.displayName = "InputOTP";
|
|
1400
|
-
var InputOTPGroup =
|
|
1402
|
+
var InputOTPGroup = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1401
1403
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1402
|
-
var InputOTPSlot =
|
|
1403
|
-
const inputOTPContext =
|
|
1404
|
+
var InputOTPSlot = React41.forwardRef(({ index, className, ...props }, ref) => {
|
|
1405
|
+
const inputOTPContext = React41.useContext(OTPInputContext);
|
|
1404
1406
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1405
1407
|
return /* @__PURE__ */ jsxs(
|
|
1406
1408
|
"div",
|
|
@@ -1420,12 +1422,12 @@ var InputOTPSlot = React9.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1420
1422
|
);
|
|
1421
1423
|
});
|
|
1422
1424
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1423
|
-
var InputOTPSeparator =
|
|
1425
|
+
var InputOTPSeparator = React41.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Dot, {}) }));
|
|
1424
1426
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1425
1427
|
var labelVariants = cva(
|
|
1426
1428
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1427
1429
|
);
|
|
1428
|
-
var Label3 =
|
|
1430
|
+
var Label3 = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1429
1431
|
LabelPrimitive.Root,
|
|
1430
1432
|
{
|
|
1431
1433
|
ref,
|
|
@@ -1459,7 +1461,7 @@ function MenubarSub({
|
|
|
1459
1461
|
}) {
|
|
1460
1462
|
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
1461
1463
|
}
|
|
1462
|
-
var Menubar =
|
|
1464
|
+
var Menubar = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1463
1465
|
MenubarPrimitive.Root,
|
|
1464
1466
|
{
|
|
1465
1467
|
ref,
|
|
@@ -1471,7 +1473,7 @@ var Menubar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
1471
1473
|
}
|
|
1472
1474
|
));
|
|
1473
1475
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
1474
|
-
var MenubarTrigger =
|
|
1476
|
+
var MenubarTrigger = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1475
1477
|
MenubarPrimitive.Trigger,
|
|
1476
1478
|
{
|
|
1477
1479
|
ref,
|
|
@@ -1483,7 +1485,7 @@ var MenubarTrigger = React9.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1483
1485
|
}
|
|
1484
1486
|
));
|
|
1485
1487
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
1486
|
-
var MenubarSubTrigger =
|
|
1488
|
+
var MenubarSubTrigger = React41.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1487
1489
|
MenubarPrimitive.SubTrigger,
|
|
1488
1490
|
{
|
|
1489
1491
|
ref,
|
|
@@ -1500,7 +1502,7 @@ var MenubarSubTrigger = React9.forwardRef(({ className, inset, children, ...prop
|
|
|
1500
1502
|
}
|
|
1501
1503
|
));
|
|
1502
1504
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
1503
|
-
var MenubarSubContent =
|
|
1505
|
+
var MenubarSubContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1504
1506
|
MenubarPrimitive.SubContent,
|
|
1505
1507
|
{
|
|
1506
1508
|
ref,
|
|
@@ -1512,7 +1514,7 @@ var MenubarSubContent = React9.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1512
1514
|
}
|
|
1513
1515
|
));
|
|
1514
1516
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
1515
|
-
var MenubarContent =
|
|
1517
|
+
var MenubarContent = React41.forwardRef(
|
|
1516
1518
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1517
1519
|
MenubarPrimitive.Content,
|
|
1518
1520
|
{
|
|
@@ -1529,7 +1531,7 @@ var MenubarContent = React9.forwardRef(
|
|
|
1529
1531
|
) })
|
|
1530
1532
|
);
|
|
1531
1533
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
1532
|
-
var MenubarItem =
|
|
1534
|
+
var MenubarItem = React41.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1533
1535
|
MenubarPrimitive.Item,
|
|
1534
1536
|
{
|
|
1535
1537
|
ref,
|
|
@@ -1542,7 +1544,7 @@ var MenubarItem = React9.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
1542
1544
|
}
|
|
1543
1545
|
));
|
|
1544
1546
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
1545
|
-
var MenubarCheckboxItem =
|
|
1547
|
+
var MenubarCheckboxItem = React41.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1546
1548
|
MenubarPrimitive.CheckboxItem,
|
|
1547
1549
|
{
|
|
1548
1550
|
ref,
|
|
@@ -1559,7 +1561,7 @@ var MenubarCheckboxItem = React9.forwardRef(({ className, children, checked, ...
|
|
|
1559
1561
|
}
|
|
1560
1562
|
));
|
|
1561
1563
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
1562
|
-
var MenubarRadioItem =
|
|
1564
|
+
var MenubarRadioItem = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1563
1565
|
MenubarPrimitive.RadioItem,
|
|
1564
1566
|
{
|
|
1565
1567
|
ref,
|
|
@@ -1575,7 +1577,7 @@ var MenubarRadioItem = React9.forwardRef(({ className, children, ...props }, ref
|
|
|
1575
1577
|
}
|
|
1576
1578
|
));
|
|
1577
1579
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
1578
|
-
var MenubarLabel =
|
|
1580
|
+
var MenubarLabel = React41.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1579
1581
|
MenubarPrimitive.Label,
|
|
1580
1582
|
{
|
|
1581
1583
|
ref,
|
|
@@ -1588,7 +1590,7 @@ var MenubarLabel = React9.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
1588
1590
|
}
|
|
1589
1591
|
));
|
|
1590
1592
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
1591
|
-
var MenubarSeparator =
|
|
1593
|
+
var MenubarSeparator = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1592
1594
|
MenubarPrimitive.Separator,
|
|
1593
1595
|
{
|
|
1594
1596
|
ref,
|
|
@@ -1613,7 +1615,7 @@ var MenubarShortcut = ({
|
|
|
1613
1615
|
);
|
|
1614
1616
|
};
|
|
1615
1617
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
1616
|
-
var NavigationMenu =
|
|
1618
|
+
var NavigationMenu = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1617
1619
|
NavigationMenuPrimitive.Root,
|
|
1618
1620
|
{
|
|
1619
1621
|
ref,
|
|
@@ -1629,7 +1631,7 @@ var NavigationMenu = React9.forwardRef(({ className, children, ...props }, ref)
|
|
|
1629
1631
|
}
|
|
1630
1632
|
));
|
|
1631
1633
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
1632
|
-
var NavigationMenuList =
|
|
1634
|
+
var NavigationMenuList = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1633
1635
|
NavigationMenuPrimitive.List,
|
|
1634
1636
|
{
|
|
1635
1637
|
ref,
|
|
@@ -1645,7 +1647,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
1645
1647
|
var navigationMenuTriggerStyle = cva(
|
|
1646
1648
|
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
|
|
1647
1649
|
);
|
|
1648
|
-
var NavigationMenuTrigger =
|
|
1650
|
+
var NavigationMenuTrigger = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1649
1651
|
NavigationMenuPrimitive.Trigger,
|
|
1650
1652
|
{
|
|
1651
1653
|
ref,
|
|
@@ -1665,7 +1667,7 @@ var NavigationMenuTrigger = React9.forwardRef(({ className, children, ...props }
|
|
|
1665
1667
|
}
|
|
1666
1668
|
));
|
|
1667
1669
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
1668
|
-
var NavigationMenuContent =
|
|
1670
|
+
var NavigationMenuContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1669
1671
|
NavigationMenuPrimitive.Content,
|
|
1670
1672
|
{
|
|
1671
1673
|
ref,
|
|
@@ -1678,7 +1680,7 @@ var NavigationMenuContent = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
1678
1680
|
));
|
|
1679
1681
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
1680
1682
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
1681
|
-
var NavigationMenuViewport =
|
|
1683
|
+
var NavigationMenuViewport = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
|
|
1682
1684
|
NavigationMenuPrimitive.Viewport,
|
|
1683
1685
|
{
|
|
1684
1686
|
className: cn(
|
|
@@ -1690,7 +1692,7 @@ var NavigationMenuViewport = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
1690
1692
|
}
|
|
1691
1693
|
) }));
|
|
1692
1694
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
1693
|
-
var NavigationMenuIndicator =
|
|
1695
|
+
var NavigationMenuIndicator = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1694
1696
|
NavigationMenuPrimitive.Indicator,
|
|
1695
1697
|
{
|
|
1696
1698
|
ref,
|
|
@@ -1713,7 +1715,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
1713
1715
|
}
|
|
1714
1716
|
);
|
|
1715
1717
|
Pagination.displayName = "Pagination";
|
|
1716
|
-
var PaginationContent =
|
|
1718
|
+
var PaginationContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1717
1719
|
"ul",
|
|
1718
1720
|
{
|
|
1719
1721
|
ref,
|
|
@@ -1722,7 +1724,7 @@ var PaginationContent = React9.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1722
1724
|
}
|
|
1723
1725
|
));
|
|
1724
1726
|
PaginationContent.displayName = "PaginationContent";
|
|
1725
|
-
var PaginationItem =
|
|
1727
|
+
var PaginationItem = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
|
|
1726
1728
|
PaginationItem.displayName = "PaginationItem";
|
|
1727
1729
|
var PaginationLink = ({
|
|
1728
1730
|
className,
|
|
@@ -1796,7 +1798,7 @@ var PaginationEllipsis = ({
|
|
|
1796
1798
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
1797
1799
|
var Popover = PopoverPrimitive.Root;
|
|
1798
1800
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1799
|
-
var PopoverContent =
|
|
1801
|
+
var PopoverContent = React41.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1800
1802
|
PopoverPrimitive.Content,
|
|
1801
1803
|
{
|
|
1802
1804
|
ref,
|
|
@@ -1810,7 +1812,7 @@ var PopoverContent = React9.forwardRef(({ className, align = "center", sideOffse
|
|
|
1810
1812
|
}
|
|
1811
1813
|
) }));
|
|
1812
1814
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1813
|
-
var Progress =
|
|
1815
|
+
var Progress = React41.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1814
1816
|
ProgressPrimitive.Root,
|
|
1815
1817
|
{
|
|
1816
1818
|
ref,
|
|
@@ -1829,7 +1831,7 @@ var Progress = React9.forwardRef(({ className, value, ...props }, ref) => /* @__
|
|
|
1829
1831
|
}
|
|
1830
1832
|
));
|
|
1831
1833
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1832
|
-
var RadioGroup4 =
|
|
1834
|
+
var RadioGroup4 = React41.forwardRef(({ className, ...props }, ref) => {
|
|
1833
1835
|
return /* @__PURE__ */ jsx(
|
|
1834
1836
|
RadioGroupPrimitive.Root,
|
|
1835
1837
|
{
|
|
@@ -1840,7 +1842,7 @@ var RadioGroup4 = React9.forwardRef(({ className, ...props }, ref) => {
|
|
|
1840
1842
|
);
|
|
1841
1843
|
});
|
|
1842
1844
|
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1843
|
-
var RadioGroupItem =
|
|
1845
|
+
var RadioGroupItem = React41.forwardRef(({ className, ...props }, ref) => {
|
|
1844
1846
|
return /* @__PURE__ */ jsx(
|
|
1845
1847
|
RadioGroupPrimitive.Item,
|
|
1846
1848
|
{
|
|
@@ -1859,7 +1861,7 @@ var ResizablePanelGroup = ({
|
|
|
1859
1861
|
className,
|
|
1860
1862
|
...props
|
|
1861
1863
|
}) => /* @__PURE__ */ jsx(
|
|
1862
|
-
Group,
|
|
1864
|
+
ResizablePrimitive.Group,
|
|
1863
1865
|
{
|
|
1864
1866
|
className: cn(
|
|
1865
1867
|
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
@@ -1868,13 +1870,13 @@ var ResizablePanelGroup = ({
|
|
|
1868
1870
|
...props
|
|
1869
1871
|
}
|
|
1870
1872
|
);
|
|
1871
|
-
var ResizablePanel = Panel;
|
|
1873
|
+
var ResizablePanel = ResizablePrimitive.Panel;
|
|
1872
1874
|
var ResizableHandle = ({
|
|
1873
1875
|
withHandle,
|
|
1874
1876
|
className,
|
|
1875
1877
|
...props
|
|
1876
1878
|
}) => /* @__PURE__ */ jsx(
|
|
1877
|
-
Separator,
|
|
1879
|
+
ResizablePrimitive.Separator,
|
|
1878
1880
|
{
|
|
1879
1881
|
className: cn(
|
|
1880
1882
|
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
@@ -1884,7 +1886,7 @@ var ResizableHandle = ({
|
|
|
1884
1886
|
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
1885
1887
|
}
|
|
1886
1888
|
);
|
|
1887
|
-
var ScrollArea =
|
|
1889
|
+
var ScrollArea = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1888
1890
|
ScrollAreaPrimitive.Root,
|
|
1889
1891
|
{
|
|
1890
1892
|
ref,
|
|
@@ -1898,7 +1900,7 @@ var ScrollArea = React9.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
1898
1900
|
}
|
|
1899
1901
|
));
|
|
1900
1902
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1901
|
-
var ScrollBar =
|
|
1903
|
+
var ScrollBar = React41.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1902
1904
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1903
1905
|
{
|
|
1904
1906
|
ref,
|
|
@@ -1917,7 +1919,7 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
|
1917
1919
|
var Select = SelectPrimitive.Root;
|
|
1918
1920
|
var SelectGroup = SelectPrimitive.Group;
|
|
1919
1921
|
var SelectValue = SelectPrimitive.Value;
|
|
1920
|
-
var SelectTrigger =
|
|
1922
|
+
var SelectTrigger = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1921
1923
|
SelectPrimitive.Trigger,
|
|
1922
1924
|
{
|
|
1923
1925
|
ref,
|
|
@@ -1933,7 +1935,7 @@ var SelectTrigger = React9.forwardRef(({ className, children, ...props }, ref) =
|
|
|
1933
1935
|
}
|
|
1934
1936
|
));
|
|
1935
1937
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1936
|
-
var SelectScrollUpButton =
|
|
1938
|
+
var SelectScrollUpButton = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1937
1939
|
SelectPrimitive.ScrollUpButton,
|
|
1938
1940
|
{
|
|
1939
1941
|
ref,
|
|
@@ -1946,7 +1948,7 @@ var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /
|
|
|
1946
1948
|
}
|
|
1947
1949
|
));
|
|
1948
1950
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1949
|
-
var SelectScrollDownButton =
|
|
1951
|
+
var SelectScrollDownButton = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1950
1952
|
SelectPrimitive.ScrollDownButton,
|
|
1951
1953
|
{
|
|
1952
1954
|
ref,
|
|
@@ -1959,7 +1961,7 @@ var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
1959
1961
|
}
|
|
1960
1962
|
));
|
|
1961
1963
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1962
|
-
var SelectContent =
|
|
1964
|
+
var SelectContent = React41.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1963
1965
|
SelectPrimitive.Content,
|
|
1964
1966
|
{
|
|
1965
1967
|
ref,
|
|
@@ -1987,7 +1989,7 @@ var SelectContent = React9.forwardRef(({ className, children, position = "popper
|
|
|
1987
1989
|
}
|
|
1988
1990
|
) }));
|
|
1989
1991
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1990
|
-
var SelectLabel =
|
|
1992
|
+
var SelectLabel = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1991
1993
|
SelectPrimitive.Label,
|
|
1992
1994
|
{
|
|
1993
1995
|
ref,
|
|
@@ -1996,7 +1998,7 @@ var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1996
1998
|
}
|
|
1997
1999
|
));
|
|
1998
2000
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1999
|
-
var SelectItem =
|
|
2001
|
+
var SelectItem = React41.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2000
2002
|
SelectPrimitive.Item,
|
|
2001
2003
|
{
|
|
2002
2004
|
ref,
|
|
@@ -2012,7 +2014,7 @@ var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
2012
2014
|
}
|
|
2013
2015
|
));
|
|
2014
2016
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2015
|
-
var SelectSeparator =
|
|
2017
|
+
var SelectSeparator = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2016
2018
|
SelectPrimitive.Separator,
|
|
2017
2019
|
{
|
|
2018
2020
|
ref,
|
|
@@ -2021,7 +2023,7 @@ var SelectSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2021
2023
|
}
|
|
2022
2024
|
));
|
|
2023
2025
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2024
|
-
var Separator6 =
|
|
2026
|
+
var Separator6 = React41.forwardRef(
|
|
2025
2027
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2026
2028
|
SeparatorPrimitive.Root,
|
|
2027
2029
|
{
|
|
@@ -2042,7 +2044,7 @@ var Sheet = DialogPrimitive.Root;
|
|
|
2042
2044
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
2043
2045
|
var SheetClose = DialogPrimitive.Close;
|
|
2044
2046
|
var SheetPortal = DialogPrimitive.Portal;
|
|
2045
|
-
var SheetOverlay =
|
|
2047
|
+
var SheetOverlay = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2046
2048
|
DialogPrimitive.Overlay,
|
|
2047
2049
|
{
|
|
2048
2050
|
className: cn(
|
|
@@ -2070,7 +2072,7 @@ var sheetVariants = cva(
|
|
|
2070
2072
|
}
|
|
2071
2073
|
}
|
|
2072
2074
|
);
|
|
2073
|
-
var SheetContent =
|
|
2075
|
+
var SheetContent = React41.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
2074
2076
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
2075
2077
|
/* @__PURE__ */ jsxs(
|
|
2076
2078
|
DialogPrimitive.Content,
|
|
@@ -2117,7 +2119,7 @@ var SheetFooter = ({
|
|
|
2117
2119
|
}
|
|
2118
2120
|
);
|
|
2119
2121
|
SheetFooter.displayName = "SheetFooter";
|
|
2120
|
-
var SheetTitle =
|
|
2122
|
+
var SheetTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2121
2123
|
DialogPrimitive.Title,
|
|
2122
2124
|
{
|
|
2123
2125
|
ref,
|
|
@@ -2126,7 +2128,7 @@ var SheetTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2126
2128
|
}
|
|
2127
2129
|
));
|
|
2128
2130
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2129
|
-
var SheetDescription =
|
|
2131
|
+
var SheetDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2130
2132
|
DialogPrimitive.Description,
|
|
2131
2133
|
{
|
|
2132
2134
|
ref,
|
|
@@ -2147,7 +2149,7 @@ function Skeleton({
|
|
|
2147
2149
|
}
|
|
2148
2150
|
);
|
|
2149
2151
|
}
|
|
2150
|
-
var Slider =
|
|
2152
|
+
var Slider = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2151
2153
|
SliderPrimitive.Root,
|
|
2152
2154
|
{
|
|
2153
2155
|
ref,
|
|
@@ -2189,7 +2191,7 @@ var Toaster = ({ ...props }) => {
|
|
|
2189
2191
|
}
|
|
2190
2192
|
);
|
|
2191
2193
|
};
|
|
2192
|
-
var Switch =
|
|
2194
|
+
var Switch = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2193
2195
|
SwitchPrimitives.Root,
|
|
2194
2196
|
{
|
|
2195
2197
|
className: cn(
|
|
@@ -2209,7 +2211,7 @@ var Switch = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2209
2211
|
}
|
|
2210
2212
|
));
|
|
2211
2213
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
2212
|
-
var Table =
|
|
2214
|
+
var Table = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
2213
2215
|
"table",
|
|
2214
2216
|
{
|
|
2215
2217
|
ref,
|
|
@@ -2218,9 +2220,9 @@ var Table = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2218
2220
|
}
|
|
2219
2221
|
) }));
|
|
2220
2222
|
Table.displayName = "Table";
|
|
2221
|
-
var TableHeader =
|
|
2223
|
+
var TableHeader = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2222
2224
|
TableHeader.displayName = "TableHeader";
|
|
2223
|
-
var TableBody =
|
|
2225
|
+
var TableBody = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2224
2226
|
"tbody",
|
|
2225
2227
|
{
|
|
2226
2228
|
ref,
|
|
@@ -2229,7 +2231,7 @@ var TableBody = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2229
2231
|
}
|
|
2230
2232
|
));
|
|
2231
2233
|
TableBody.displayName = "TableBody";
|
|
2232
|
-
var TableFooter =
|
|
2234
|
+
var TableFooter = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2233
2235
|
"tfoot",
|
|
2234
2236
|
{
|
|
2235
2237
|
ref,
|
|
@@ -2241,7 +2243,7 @@ var TableFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2241
2243
|
}
|
|
2242
2244
|
));
|
|
2243
2245
|
TableFooter.displayName = "TableFooter";
|
|
2244
|
-
var TableRow =
|
|
2246
|
+
var TableRow = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2245
2247
|
"tr",
|
|
2246
2248
|
{
|
|
2247
2249
|
ref,
|
|
@@ -2253,7 +2255,7 @@ var TableRow = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2253
2255
|
}
|
|
2254
2256
|
));
|
|
2255
2257
|
TableRow.displayName = "TableRow";
|
|
2256
|
-
var TableHead =
|
|
2258
|
+
var TableHead = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2257
2259
|
"th",
|
|
2258
2260
|
{
|
|
2259
2261
|
ref,
|
|
@@ -2265,7 +2267,7 @@ var TableHead = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2265
2267
|
}
|
|
2266
2268
|
));
|
|
2267
2269
|
TableHead.displayName = "TableHead";
|
|
2268
|
-
var TableCell =
|
|
2270
|
+
var TableCell = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2269
2271
|
"td",
|
|
2270
2272
|
{
|
|
2271
2273
|
ref,
|
|
@@ -2274,7 +2276,7 @@ var TableCell = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2274
2276
|
}
|
|
2275
2277
|
));
|
|
2276
2278
|
TableCell.displayName = "TableCell";
|
|
2277
|
-
var TableCaption =
|
|
2279
|
+
var TableCaption = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2278
2280
|
"caption",
|
|
2279
2281
|
{
|
|
2280
2282
|
ref,
|
|
@@ -2284,7 +2286,7 @@ var TableCaption = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2284
2286
|
));
|
|
2285
2287
|
TableCaption.displayName = "TableCaption";
|
|
2286
2288
|
var Tabs = TabsPrimitive.Root;
|
|
2287
|
-
var TabsList =
|
|
2289
|
+
var TabsList = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2288
2290
|
TabsPrimitive.List,
|
|
2289
2291
|
{
|
|
2290
2292
|
ref,
|
|
@@ -2296,7 +2298,7 @@ var TabsList = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2296
2298
|
}
|
|
2297
2299
|
));
|
|
2298
2300
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2299
|
-
var TabsTrigger =
|
|
2301
|
+
var TabsTrigger = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2300
2302
|
TabsPrimitive.Trigger,
|
|
2301
2303
|
{
|
|
2302
2304
|
ref,
|
|
@@ -2308,7 +2310,7 @@ var TabsTrigger = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2308
2310
|
}
|
|
2309
2311
|
));
|
|
2310
2312
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2311
|
-
var TabsContent =
|
|
2313
|
+
var TabsContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2312
2314
|
TabsPrimitive.Content,
|
|
2313
2315
|
{
|
|
2314
2316
|
ref,
|
|
@@ -2320,7 +2322,7 @@ var TabsContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2320
2322
|
}
|
|
2321
2323
|
));
|
|
2322
2324
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2323
|
-
var Textarea =
|
|
2325
|
+
var Textarea = React41.forwardRef(({ className, ...props }, ref) => {
|
|
2324
2326
|
return /* @__PURE__ */ jsx(
|
|
2325
2327
|
"textarea",
|
|
2326
2328
|
{
|
|
@@ -2354,7 +2356,7 @@ var toggleVariants = cva(
|
|
|
2354
2356
|
}
|
|
2355
2357
|
}
|
|
2356
2358
|
);
|
|
2357
|
-
var Toggle =
|
|
2359
|
+
var Toggle = React41.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2358
2360
|
TogglePrimitive.Root,
|
|
2359
2361
|
{
|
|
2360
2362
|
ref,
|
|
@@ -2363,11 +2365,11 @@ var Toggle = React9.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
2363
2365
|
}
|
|
2364
2366
|
));
|
|
2365
2367
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
2366
|
-
var ToggleGroupContext =
|
|
2368
|
+
var ToggleGroupContext = React41.createContext({
|
|
2367
2369
|
size: "default",
|
|
2368
2370
|
variant: "default"
|
|
2369
2371
|
});
|
|
2370
|
-
var ToggleGroup =
|
|
2372
|
+
var ToggleGroup = React41.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2371
2373
|
ToggleGroupPrimitive.Root,
|
|
2372
2374
|
{
|
|
2373
2375
|
ref,
|
|
@@ -2377,8 +2379,8 @@ var ToggleGroup = React9.forwardRef(({ className, variant, size, children, ...pr
|
|
|
2377
2379
|
}
|
|
2378
2380
|
));
|
|
2379
2381
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
2380
|
-
var ToggleGroupItem =
|
|
2381
|
-
const context =
|
|
2382
|
+
var ToggleGroupItem = React41.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
2383
|
+
const context = React41.useContext(ToggleGroupContext);
|
|
2382
2384
|
return /* @__PURE__ */ jsx(
|
|
2383
2385
|
ToggleGroupPrimitive.Item,
|
|
2384
2386
|
{
|
|
@@ -2399,7 +2401,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
2399
2401
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2400
2402
|
var Tooltip = TooltipPrimitive.Root;
|
|
2401
2403
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2402
|
-
var TooltipContent =
|
|
2404
|
+
var TooltipContent = React41.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2403
2405
|
TooltipPrimitive.Content,
|
|
2404
2406
|
{
|
|
2405
2407
|
ref,
|
|
@@ -2412,7 +2414,1152 @@ var TooltipContent = React9.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
2412
2414
|
}
|
|
2413
2415
|
));
|
|
2414
2416
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2417
|
+
var buttonGroupVariants = cva(
|
|
2418
|
+
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
2419
|
+
{
|
|
2420
|
+
variants: {
|
|
2421
|
+
orientation: {
|
|
2422
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
2423
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
2424
|
+
}
|
|
2425
|
+
},
|
|
2426
|
+
defaultVariants: {
|
|
2427
|
+
orientation: "horizontal"
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
);
|
|
2431
|
+
function ButtonGroup({
|
|
2432
|
+
className,
|
|
2433
|
+
orientation,
|
|
2434
|
+
...props
|
|
2435
|
+
}) {
|
|
2436
|
+
return /* @__PURE__ */ jsx(
|
|
2437
|
+
"div",
|
|
2438
|
+
{
|
|
2439
|
+
role: "group",
|
|
2440
|
+
"data-slot": "button-group",
|
|
2441
|
+
"data-orientation": orientation,
|
|
2442
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
2443
|
+
...props
|
|
2444
|
+
}
|
|
2445
|
+
);
|
|
2446
|
+
}
|
|
2447
|
+
function ButtonGroupText({
|
|
2448
|
+
className,
|
|
2449
|
+
asChild = false,
|
|
2450
|
+
...props
|
|
2451
|
+
}) {
|
|
2452
|
+
const Comp = asChild ? Slot : "div";
|
|
2453
|
+
return /* @__PURE__ */ jsx(
|
|
2454
|
+
Comp,
|
|
2455
|
+
{
|
|
2456
|
+
className: cn(
|
|
2457
|
+
"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
2458
|
+
className
|
|
2459
|
+
),
|
|
2460
|
+
...props
|
|
2461
|
+
}
|
|
2462
|
+
);
|
|
2463
|
+
}
|
|
2464
|
+
function ButtonGroupSeparator({
|
|
2465
|
+
className,
|
|
2466
|
+
orientation = "vertical",
|
|
2467
|
+
...props
|
|
2468
|
+
}) {
|
|
2469
|
+
return /* @__PURE__ */ jsx(
|
|
2470
|
+
Separator6,
|
|
2471
|
+
{
|
|
2472
|
+
"data-slot": "button-group-separator",
|
|
2473
|
+
orientation,
|
|
2474
|
+
className: cn(
|
|
2475
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
2476
|
+
className
|
|
2477
|
+
),
|
|
2478
|
+
...props
|
|
2479
|
+
}
|
|
2480
|
+
);
|
|
2481
|
+
}
|
|
2482
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
2483
|
+
var ChartContext = React41.createContext(null);
|
|
2484
|
+
function useChart() {
|
|
2485
|
+
const context = React41.useContext(ChartContext);
|
|
2486
|
+
if (!context) {
|
|
2487
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
2488
|
+
}
|
|
2489
|
+
return context;
|
|
2490
|
+
}
|
|
2491
|
+
var ChartContainer = React41.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
2492
|
+
const uniqueId = React41.useId();
|
|
2493
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
2494
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
2495
|
+
"div",
|
|
2496
|
+
{
|
|
2497
|
+
"data-chart": chartId,
|
|
2498
|
+
ref,
|
|
2499
|
+
className: cn(
|
|
2500
|
+
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
|
|
2501
|
+
className
|
|
2502
|
+
),
|
|
2503
|
+
...props,
|
|
2504
|
+
children: [
|
|
2505
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
2506
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
2507
|
+
]
|
|
2508
|
+
}
|
|
2509
|
+
) });
|
|
2510
|
+
});
|
|
2511
|
+
ChartContainer.displayName = "Chart";
|
|
2512
|
+
var ChartStyle = ({ id, config }) => {
|
|
2513
|
+
const colorConfig = Object.entries(config).filter(
|
|
2514
|
+
([, config2]) => config2.theme || config2.color
|
|
2515
|
+
);
|
|
2516
|
+
if (!colorConfig.length) {
|
|
2517
|
+
return null;
|
|
2518
|
+
}
|
|
2519
|
+
return /* @__PURE__ */ jsx(
|
|
2520
|
+
"style",
|
|
2521
|
+
{
|
|
2522
|
+
dangerouslySetInnerHTML: {
|
|
2523
|
+
__html: Object.entries(THEMES).map(
|
|
2524
|
+
([theme, prefix]) => `
|
|
2525
|
+
${prefix} [data-chart=${id}] {
|
|
2526
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
2527
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
2528
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
2529
|
+
}).join("\n")}
|
|
2530
|
+
}
|
|
2531
|
+
`
|
|
2532
|
+
).join("\n")
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
);
|
|
2536
|
+
};
|
|
2537
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
2538
|
+
var ChartTooltipContent = React41.forwardRef(
|
|
2539
|
+
({
|
|
2540
|
+
active,
|
|
2541
|
+
payload,
|
|
2542
|
+
className,
|
|
2543
|
+
indicator = "dot",
|
|
2544
|
+
hideLabel = false,
|
|
2545
|
+
hideIndicator = false,
|
|
2546
|
+
label,
|
|
2547
|
+
labelFormatter,
|
|
2548
|
+
labelClassName,
|
|
2549
|
+
formatter,
|
|
2550
|
+
color,
|
|
2551
|
+
nameKey,
|
|
2552
|
+
labelKey
|
|
2553
|
+
}, ref) => {
|
|
2554
|
+
const { config } = useChart();
|
|
2555
|
+
const tooltipLabel = React41.useMemo(() => {
|
|
2556
|
+
if (hideLabel || !payload?.length) {
|
|
2557
|
+
return null;
|
|
2558
|
+
}
|
|
2559
|
+
const [item] = payload;
|
|
2560
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
2561
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2562
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
2563
|
+
if (labelFormatter) {
|
|
2564
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
2565
|
+
}
|
|
2566
|
+
if (!value) {
|
|
2567
|
+
return null;
|
|
2568
|
+
}
|
|
2569
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
2570
|
+
}, [
|
|
2571
|
+
label,
|
|
2572
|
+
labelFormatter,
|
|
2573
|
+
payload,
|
|
2574
|
+
hideLabel,
|
|
2575
|
+
labelClassName,
|
|
2576
|
+
config,
|
|
2577
|
+
labelKey
|
|
2578
|
+
]);
|
|
2579
|
+
if (!active || !payload?.length) {
|
|
2580
|
+
return null;
|
|
2581
|
+
}
|
|
2582
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
2583
|
+
return /* @__PURE__ */ jsxs(
|
|
2584
|
+
"div",
|
|
2585
|
+
{
|
|
2586
|
+
ref,
|
|
2587
|
+
className: cn(
|
|
2588
|
+
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
2589
|
+
className
|
|
2590
|
+
),
|
|
2591
|
+
children: [
|
|
2592
|
+
!nestLabel ? tooltipLabel : null,
|
|
2593
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
2594
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
2595
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2596
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
2597
|
+
return /* @__PURE__ */ jsx(
|
|
2598
|
+
"div",
|
|
2599
|
+
{
|
|
2600
|
+
className: cn(
|
|
2601
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
2602
|
+
indicator === "dot" && "items-center"
|
|
2603
|
+
),
|
|
2604
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2605
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
2606
|
+
"div",
|
|
2607
|
+
{
|
|
2608
|
+
className: cn(
|
|
2609
|
+
"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
|
|
2610
|
+
{
|
|
2611
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
2612
|
+
"w-1": indicator === "line",
|
|
2613
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
2614
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
2615
|
+
}
|
|
2616
|
+
),
|
|
2617
|
+
style: {
|
|
2618
|
+
"--color-bg": indicatorColor,
|
|
2619
|
+
"--color-border": indicatorColor
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
),
|
|
2623
|
+
/* @__PURE__ */ jsxs(
|
|
2624
|
+
"div",
|
|
2625
|
+
{
|
|
2626
|
+
className: cn(
|
|
2627
|
+
"flex flex-1 justify-between leading-none",
|
|
2628
|
+
nestLabel ? "items-end" : "items-center"
|
|
2629
|
+
),
|
|
2630
|
+
children: [
|
|
2631
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
2632
|
+
nestLabel ? tooltipLabel : null,
|
|
2633
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
2634
|
+
] }),
|
|
2635
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
2636
|
+
]
|
|
2637
|
+
}
|
|
2638
|
+
)
|
|
2639
|
+
] })
|
|
2640
|
+
},
|
|
2641
|
+
item.dataKey
|
|
2642
|
+
);
|
|
2643
|
+
}) })
|
|
2644
|
+
]
|
|
2645
|
+
}
|
|
2646
|
+
);
|
|
2647
|
+
}
|
|
2648
|
+
);
|
|
2649
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
2650
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
2651
|
+
var ChartLegendContent = React41.forwardRef(
|
|
2652
|
+
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
2653
|
+
const { config } = useChart();
|
|
2654
|
+
if (!payload?.length) {
|
|
2655
|
+
return null;
|
|
2656
|
+
}
|
|
2657
|
+
return /* @__PURE__ */ jsx(
|
|
2658
|
+
"div",
|
|
2659
|
+
{
|
|
2660
|
+
ref,
|
|
2661
|
+
className: cn(
|
|
2662
|
+
"flex items-center justify-center gap-4",
|
|
2663
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
2664
|
+
className
|
|
2665
|
+
),
|
|
2666
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
2667
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
2668
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2669
|
+
return /* @__PURE__ */ jsxs(
|
|
2670
|
+
"div",
|
|
2671
|
+
{
|
|
2672
|
+
className: cn(
|
|
2673
|
+
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
2674
|
+
),
|
|
2675
|
+
children: [
|
|
2676
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
2677
|
+
"div",
|
|
2678
|
+
{
|
|
2679
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
2680
|
+
style: {
|
|
2681
|
+
backgroundColor: item.color
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
),
|
|
2685
|
+
itemConfig?.label
|
|
2686
|
+
]
|
|
2687
|
+
},
|
|
2688
|
+
item.value
|
|
2689
|
+
);
|
|
2690
|
+
})
|
|
2691
|
+
}
|
|
2692
|
+
);
|
|
2693
|
+
}
|
|
2694
|
+
);
|
|
2695
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
2696
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
2697
|
+
if (typeof payload !== "object" || payload === null) {
|
|
2698
|
+
return void 0;
|
|
2699
|
+
}
|
|
2700
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
2701
|
+
let configLabelKey = key;
|
|
2702
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
2703
|
+
configLabelKey = payload[key];
|
|
2704
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
2705
|
+
configLabelKey = payloadPayload[key];
|
|
2706
|
+
}
|
|
2707
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
2708
|
+
}
|
|
2709
|
+
var Form = FormProvider;
|
|
2710
|
+
var FormFieldContext = React41.createContext(null);
|
|
2711
|
+
var FormField = ({
|
|
2712
|
+
...props
|
|
2713
|
+
}) => {
|
|
2714
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
2715
|
+
};
|
|
2716
|
+
var useFormField = () => {
|
|
2717
|
+
const fieldContext = React41.useContext(FormFieldContext);
|
|
2718
|
+
const itemContext = React41.useContext(FormItemContext);
|
|
2719
|
+
const { getFieldState, formState } = useFormContext();
|
|
2720
|
+
if (!fieldContext) {
|
|
2721
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
2722
|
+
}
|
|
2723
|
+
if (!itemContext) {
|
|
2724
|
+
throw new Error("useFormField should be used within <FormItem>");
|
|
2725
|
+
}
|
|
2726
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2727
|
+
const { id } = itemContext;
|
|
2728
|
+
return {
|
|
2729
|
+
id,
|
|
2730
|
+
name: fieldContext.name,
|
|
2731
|
+
formItemId: `${id}-form-item`,
|
|
2732
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
2733
|
+
formMessageId: `${id}-form-item-message`,
|
|
2734
|
+
...fieldState
|
|
2735
|
+
};
|
|
2736
|
+
};
|
|
2737
|
+
var FormItemContext = React41.createContext(null);
|
|
2738
|
+
var FormItem = React41.forwardRef(({ className, ...props }, ref) => {
|
|
2739
|
+
const id = React41.useId();
|
|
2740
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
2741
|
+
});
|
|
2742
|
+
FormItem.displayName = "FormItem";
|
|
2743
|
+
var FormLabel = React41.forwardRef(({ className, ...props }, ref) => {
|
|
2744
|
+
const { error, formItemId } = useFormField();
|
|
2745
|
+
return /* @__PURE__ */ jsx(
|
|
2746
|
+
Label3,
|
|
2747
|
+
{
|
|
2748
|
+
ref,
|
|
2749
|
+
className: cn(error && "text-destructive", className),
|
|
2750
|
+
htmlFor: formItemId,
|
|
2751
|
+
...props
|
|
2752
|
+
}
|
|
2753
|
+
);
|
|
2754
|
+
});
|
|
2755
|
+
FormLabel.displayName = "FormLabel";
|
|
2756
|
+
var FormControl = React41.forwardRef(({ ...props }, ref) => {
|
|
2757
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2758
|
+
return /* @__PURE__ */ jsx(
|
|
2759
|
+
Slot,
|
|
2760
|
+
{
|
|
2761
|
+
ref,
|
|
2762
|
+
id: formItemId,
|
|
2763
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
2764
|
+
"aria-invalid": !!error,
|
|
2765
|
+
...props
|
|
2766
|
+
}
|
|
2767
|
+
);
|
|
2768
|
+
});
|
|
2769
|
+
FormControl.displayName = "FormControl";
|
|
2770
|
+
var FormDescription = React41.forwardRef(({ className, ...props }, ref) => {
|
|
2771
|
+
const { formDescriptionId } = useFormField();
|
|
2772
|
+
return /* @__PURE__ */ jsx(
|
|
2773
|
+
"p",
|
|
2774
|
+
{
|
|
2775
|
+
ref,
|
|
2776
|
+
id: formDescriptionId,
|
|
2777
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2778
|
+
...props
|
|
2779
|
+
}
|
|
2780
|
+
);
|
|
2781
|
+
});
|
|
2782
|
+
FormDescription.displayName = "FormDescription";
|
|
2783
|
+
var FormMessage = React41.forwardRef(({ className, children, ...props }, ref) => {
|
|
2784
|
+
const { error, formMessageId } = useFormField();
|
|
2785
|
+
const body = error ? String(error?.message ?? "") : children;
|
|
2786
|
+
if (!body) {
|
|
2787
|
+
return null;
|
|
2788
|
+
}
|
|
2789
|
+
return /* @__PURE__ */ jsx(
|
|
2790
|
+
"p",
|
|
2791
|
+
{
|
|
2792
|
+
ref,
|
|
2793
|
+
id: formMessageId,
|
|
2794
|
+
className: cn("text-sm font-medium text-destructive", className),
|
|
2795
|
+
...props,
|
|
2796
|
+
children: body
|
|
2797
|
+
}
|
|
2798
|
+
);
|
|
2799
|
+
});
|
|
2800
|
+
FormMessage.displayName = "FormMessage";
|
|
2801
|
+
function InputGroup({ className, ...props }) {
|
|
2802
|
+
return /* @__PURE__ */ jsx(
|
|
2803
|
+
"div",
|
|
2804
|
+
{
|
|
2805
|
+
"data-slot": "input-group",
|
|
2806
|
+
role: "group",
|
|
2807
|
+
className: cn(
|
|
2808
|
+
"group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]",
|
|
2809
|
+
"h-9 has-[>textarea]:h-auto",
|
|
2810
|
+
// Variants based on alignment.
|
|
2811
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
2812
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
2813
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
2814
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
2815
|
+
// Focus state.
|
|
2816
|
+
"has-[[data-slot=input-group-control]:focus-visible]:ring-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1",
|
|
2817
|
+
// Error state.
|
|
2818
|
+
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
2819
|
+
className
|
|
2820
|
+
),
|
|
2821
|
+
...props
|
|
2822
|
+
}
|
|
2823
|
+
);
|
|
2824
|
+
}
|
|
2825
|
+
var inputGroupAddonVariants = cva(
|
|
2826
|
+
"text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
2827
|
+
{
|
|
2828
|
+
variants: {
|
|
2829
|
+
align: {
|
|
2830
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
2831
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
|
|
2832
|
+
"block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
|
|
2833
|
+
"block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5"
|
|
2834
|
+
}
|
|
2835
|
+
},
|
|
2836
|
+
defaultVariants: {
|
|
2837
|
+
align: "inline-start"
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
);
|
|
2841
|
+
function InputGroupAddon({
|
|
2842
|
+
className,
|
|
2843
|
+
align = "inline-start",
|
|
2844
|
+
...props
|
|
2845
|
+
}) {
|
|
2846
|
+
const focusInput = (e) => {
|
|
2847
|
+
if (e.target.closest("button")) {
|
|
2848
|
+
return;
|
|
2849
|
+
}
|
|
2850
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
2851
|
+
};
|
|
2852
|
+
return /* @__PURE__ */ jsx(
|
|
2853
|
+
"div",
|
|
2854
|
+
{
|
|
2855
|
+
role: "group",
|
|
2856
|
+
"data-slot": "input-group-addon",
|
|
2857
|
+
"data-align": align,
|
|
2858
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
2859
|
+
onClick: focusInput,
|
|
2860
|
+
onKeyDown: (e) => {
|
|
2861
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2862
|
+
focusInput(e);
|
|
2863
|
+
}
|
|
2864
|
+
},
|
|
2865
|
+
...props
|
|
2866
|
+
}
|
|
2867
|
+
);
|
|
2868
|
+
}
|
|
2869
|
+
var inputGroupButtonVariants = cva(
|
|
2870
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
2871
|
+
{
|
|
2872
|
+
variants: {
|
|
2873
|
+
size: {
|
|
2874
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
2875
|
+
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
2876
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
2877
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
2878
|
+
}
|
|
2879
|
+
},
|
|
2880
|
+
defaultVariants: {
|
|
2881
|
+
size: "xs"
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
);
|
|
2885
|
+
function InputGroupButton({
|
|
2886
|
+
className,
|
|
2887
|
+
type = "button",
|
|
2888
|
+
variant = "ghost",
|
|
2889
|
+
size = "xs",
|
|
2890
|
+
...props
|
|
2891
|
+
}) {
|
|
2892
|
+
return /* @__PURE__ */ jsx(
|
|
2893
|
+
Button,
|
|
2894
|
+
{
|
|
2895
|
+
type,
|
|
2896
|
+
"data-size": size,
|
|
2897
|
+
variant,
|
|
2898
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
2899
|
+
...props
|
|
2900
|
+
}
|
|
2901
|
+
);
|
|
2902
|
+
}
|
|
2903
|
+
function InputGroupText({ className, ...props }) {
|
|
2904
|
+
return /* @__PURE__ */ jsx(
|
|
2905
|
+
"span",
|
|
2906
|
+
{
|
|
2907
|
+
className: cn(
|
|
2908
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
2909
|
+
className
|
|
2910
|
+
),
|
|
2911
|
+
...props
|
|
2912
|
+
}
|
|
2913
|
+
);
|
|
2914
|
+
}
|
|
2915
|
+
function InputGroupInput({
|
|
2916
|
+
className,
|
|
2917
|
+
...props
|
|
2918
|
+
}) {
|
|
2919
|
+
return /* @__PURE__ */ jsx(
|
|
2920
|
+
Input,
|
|
2921
|
+
{
|
|
2922
|
+
"data-slot": "input-group-control",
|
|
2923
|
+
className: cn(
|
|
2924
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
2925
|
+
className
|
|
2926
|
+
),
|
|
2927
|
+
...props
|
|
2928
|
+
}
|
|
2929
|
+
);
|
|
2930
|
+
}
|
|
2931
|
+
function InputGroupTextarea({
|
|
2932
|
+
className,
|
|
2933
|
+
...props
|
|
2934
|
+
}) {
|
|
2935
|
+
return /* @__PURE__ */ jsx(
|
|
2936
|
+
Textarea,
|
|
2937
|
+
{
|
|
2938
|
+
"data-slot": "input-group-control",
|
|
2939
|
+
className: cn(
|
|
2940
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
2941
|
+
className
|
|
2942
|
+
),
|
|
2943
|
+
...props
|
|
2944
|
+
}
|
|
2945
|
+
);
|
|
2946
|
+
}
|
|
2947
|
+
function Kbd({ className, ...props }) {
|
|
2948
|
+
return /* @__PURE__ */ jsx(
|
|
2949
|
+
"kbd",
|
|
2950
|
+
{
|
|
2951
|
+
"data-slot": "kbd",
|
|
2952
|
+
className: cn(
|
|
2953
|
+
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium",
|
|
2954
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
2955
|
+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
2956
|
+
className
|
|
2957
|
+
),
|
|
2958
|
+
...props
|
|
2959
|
+
}
|
|
2960
|
+
);
|
|
2961
|
+
}
|
|
2962
|
+
function KbdGroup({ className, ...props }) {
|
|
2963
|
+
return /* @__PURE__ */ jsx(
|
|
2964
|
+
"kbd",
|
|
2965
|
+
{
|
|
2966
|
+
"data-slot": "kbd-group",
|
|
2967
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
2968
|
+
...props
|
|
2969
|
+
}
|
|
2970
|
+
);
|
|
2971
|
+
}
|
|
2972
|
+
var MOBILE_BREAKPOINT = 768;
|
|
2973
|
+
function useIsMobile() {
|
|
2974
|
+
const [isMobile, setIsMobile] = React41.useState(void 0);
|
|
2975
|
+
React41.useEffect(() => {
|
|
2976
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
2977
|
+
const onChange = () => {
|
|
2978
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
2979
|
+
};
|
|
2980
|
+
mql.addEventListener("change", onChange);
|
|
2981
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
2982
|
+
return () => mql.removeEventListener("change", onChange);
|
|
2983
|
+
}, []);
|
|
2984
|
+
return !!isMobile;
|
|
2985
|
+
}
|
|
2986
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
2987
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2988
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
2989
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2990
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
2991
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
2992
|
+
var SidebarContext = React41.createContext(null);
|
|
2993
|
+
function useSidebar() {
|
|
2994
|
+
const context = React41.useContext(SidebarContext);
|
|
2995
|
+
if (!context) {
|
|
2996
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2997
|
+
}
|
|
2998
|
+
return context;
|
|
2999
|
+
}
|
|
3000
|
+
var SidebarProvider = React41.forwardRef(
|
|
3001
|
+
({
|
|
3002
|
+
defaultOpen = true,
|
|
3003
|
+
open: openProp,
|
|
3004
|
+
onOpenChange: setOpenProp,
|
|
3005
|
+
className,
|
|
3006
|
+
style,
|
|
3007
|
+
children,
|
|
3008
|
+
...props
|
|
3009
|
+
}, ref) => {
|
|
3010
|
+
const isMobile = useIsMobile();
|
|
3011
|
+
const [openMobile, setOpenMobile] = React41.useState(false);
|
|
3012
|
+
const [_open, _setOpen] = React41.useState(defaultOpen);
|
|
3013
|
+
const open = openProp ?? _open;
|
|
3014
|
+
const setOpen = React41.useCallback(
|
|
3015
|
+
(value) => {
|
|
3016
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
3017
|
+
if (setOpenProp) {
|
|
3018
|
+
setOpenProp(openState);
|
|
3019
|
+
} else {
|
|
3020
|
+
_setOpen(openState);
|
|
3021
|
+
}
|
|
3022
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
3023
|
+
},
|
|
3024
|
+
[setOpenProp, open]
|
|
3025
|
+
);
|
|
3026
|
+
const toggleSidebar = React41.useCallback(() => {
|
|
3027
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
3028
|
+
}, [isMobile, setOpen]);
|
|
3029
|
+
React41.useEffect(() => {
|
|
3030
|
+
const handleKeyDown = (event) => {
|
|
3031
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
3032
|
+
event.preventDefault();
|
|
3033
|
+
toggleSidebar();
|
|
3034
|
+
}
|
|
3035
|
+
};
|
|
3036
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
3037
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
3038
|
+
}, [toggleSidebar]);
|
|
3039
|
+
const state = open ? "expanded" : "collapsed";
|
|
3040
|
+
const contextValue = React41.useMemo(
|
|
3041
|
+
() => ({
|
|
3042
|
+
state,
|
|
3043
|
+
open,
|
|
3044
|
+
setOpen,
|
|
3045
|
+
isMobile,
|
|
3046
|
+
openMobile,
|
|
3047
|
+
setOpenMobile,
|
|
3048
|
+
toggleSidebar
|
|
3049
|
+
}),
|
|
3050
|
+
[state, open, setOpen, isMobile, openMobile, toggleSidebar]
|
|
3051
|
+
);
|
|
3052
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
3053
|
+
"div",
|
|
3054
|
+
{
|
|
3055
|
+
style: {
|
|
3056
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
3057
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
3058
|
+
...style
|
|
3059
|
+
},
|
|
3060
|
+
className: cn(
|
|
3061
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
3062
|
+
className
|
|
3063
|
+
),
|
|
3064
|
+
ref,
|
|
3065
|
+
...props,
|
|
3066
|
+
children
|
|
3067
|
+
}
|
|
3068
|
+
) }) });
|
|
3069
|
+
}
|
|
3070
|
+
);
|
|
3071
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
3072
|
+
var Sidebar = React41.forwardRef(
|
|
3073
|
+
({
|
|
3074
|
+
side = "left",
|
|
3075
|
+
variant = "sidebar",
|
|
3076
|
+
collapsible = "offcanvas",
|
|
3077
|
+
className,
|
|
3078
|
+
children,
|
|
3079
|
+
...props
|
|
3080
|
+
}, ref) => {
|
|
3081
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
3082
|
+
if (collapsible === "none") {
|
|
3083
|
+
return /* @__PURE__ */ jsx(
|
|
3084
|
+
"div",
|
|
3085
|
+
{
|
|
3086
|
+
className: cn(
|
|
3087
|
+
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
3088
|
+
className
|
|
3089
|
+
),
|
|
3090
|
+
ref,
|
|
3091
|
+
...props,
|
|
3092
|
+
children
|
|
3093
|
+
}
|
|
3094
|
+
);
|
|
3095
|
+
}
|
|
3096
|
+
if (isMobile) {
|
|
3097
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
3098
|
+
SheetContent,
|
|
3099
|
+
{
|
|
3100
|
+
"data-sidebar": "sidebar",
|
|
3101
|
+
"data-mobile": "true",
|
|
3102
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
3103
|
+
style: {
|
|
3104
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
3105
|
+
},
|
|
3106
|
+
side,
|
|
3107
|
+
children: [
|
|
3108
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
3109
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
3110
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
3111
|
+
] }),
|
|
3112
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
3113
|
+
]
|
|
3114
|
+
}
|
|
3115
|
+
) });
|
|
3116
|
+
}
|
|
3117
|
+
return /* @__PURE__ */ jsxs(
|
|
3118
|
+
"div",
|
|
3119
|
+
{
|
|
3120
|
+
ref,
|
|
3121
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
3122
|
+
"data-state": state,
|
|
3123
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
3124
|
+
"data-variant": variant,
|
|
3125
|
+
"data-side": side,
|
|
3126
|
+
children: [
|
|
3127
|
+
/* @__PURE__ */ jsx(
|
|
3128
|
+
"div",
|
|
3129
|
+
{
|
|
3130
|
+
className: cn(
|
|
3131
|
+
"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
3132
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
3133
|
+
"group-data-[side=right]:rotate-180",
|
|
3134
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
3135
|
+
)
|
|
3136
|
+
}
|
|
3137
|
+
),
|
|
3138
|
+
/* @__PURE__ */ jsx(
|
|
3139
|
+
"div",
|
|
3140
|
+
{
|
|
3141
|
+
className: cn(
|
|
3142
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
3143
|
+
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)]",
|
|
3144
|
+
// Adjust the padding for floating and inset variants.
|
|
3145
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
3146
|
+
className
|
|
3147
|
+
),
|
|
3148
|
+
...props,
|
|
3149
|
+
children: /* @__PURE__ */ jsx(
|
|
3150
|
+
"div",
|
|
3151
|
+
{
|
|
3152
|
+
"data-sidebar": "sidebar",
|
|
3153
|
+
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",
|
|
3154
|
+
children
|
|
3155
|
+
}
|
|
3156
|
+
)
|
|
3157
|
+
}
|
|
3158
|
+
)
|
|
3159
|
+
]
|
|
3160
|
+
}
|
|
3161
|
+
);
|
|
3162
|
+
}
|
|
3163
|
+
);
|
|
3164
|
+
Sidebar.displayName = "Sidebar";
|
|
3165
|
+
var SidebarTrigger = React41.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
3166
|
+
const { toggleSidebar } = useSidebar();
|
|
3167
|
+
return /* @__PURE__ */ jsxs(
|
|
3168
|
+
Button,
|
|
3169
|
+
{
|
|
3170
|
+
ref,
|
|
3171
|
+
"data-sidebar": "trigger",
|
|
3172
|
+
variant: "ghost",
|
|
3173
|
+
size: "icon",
|
|
3174
|
+
className: cn("h-7 w-7", className),
|
|
3175
|
+
onClick: (event) => {
|
|
3176
|
+
onClick?.(event);
|
|
3177
|
+
toggleSidebar();
|
|
3178
|
+
},
|
|
3179
|
+
...props,
|
|
3180
|
+
children: [
|
|
3181
|
+
/* @__PURE__ */ jsx(PanelLeft, {}),
|
|
3182
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
3183
|
+
]
|
|
3184
|
+
}
|
|
3185
|
+
);
|
|
3186
|
+
});
|
|
3187
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
3188
|
+
var SidebarRail = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3189
|
+
const { toggleSidebar } = useSidebar();
|
|
3190
|
+
return /* @__PURE__ */ jsx(
|
|
3191
|
+
"button",
|
|
3192
|
+
{
|
|
3193
|
+
ref,
|
|
3194
|
+
"data-sidebar": "rail",
|
|
3195
|
+
"aria-label": "Toggle Sidebar",
|
|
3196
|
+
tabIndex: -1,
|
|
3197
|
+
onClick: toggleSidebar,
|
|
3198
|
+
title: "Toggle Sidebar",
|
|
3199
|
+
className: cn(
|
|
3200
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
3201
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
3202
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
3203
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
3204
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
3205
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
3206
|
+
className
|
|
3207
|
+
),
|
|
3208
|
+
...props
|
|
3209
|
+
}
|
|
3210
|
+
);
|
|
3211
|
+
});
|
|
3212
|
+
SidebarRail.displayName = "SidebarRail";
|
|
3213
|
+
var SidebarInset = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3214
|
+
return /* @__PURE__ */ jsx(
|
|
3215
|
+
"main",
|
|
3216
|
+
{
|
|
3217
|
+
ref,
|
|
3218
|
+
className: cn(
|
|
3219
|
+
"relative flex w-full flex-1 flex-col bg-background",
|
|
3220
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
3221
|
+
className
|
|
3222
|
+
),
|
|
3223
|
+
...props
|
|
3224
|
+
}
|
|
3225
|
+
);
|
|
3226
|
+
});
|
|
3227
|
+
SidebarInset.displayName = "SidebarInset";
|
|
3228
|
+
var SidebarInput = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3229
|
+
return /* @__PURE__ */ jsx(
|
|
3230
|
+
Input,
|
|
3231
|
+
{
|
|
3232
|
+
ref,
|
|
3233
|
+
"data-sidebar": "input",
|
|
3234
|
+
className: cn(
|
|
3235
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
3236
|
+
className
|
|
3237
|
+
),
|
|
3238
|
+
...props
|
|
3239
|
+
}
|
|
3240
|
+
);
|
|
3241
|
+
});
|
|
3242
|
+
SidebarInput.displayName = "SidebarInput";
|
|
3243
|
+
var SidebarHeader = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3244
|
+
return /* @__PURE__ */ jsx(
|
|
3245
|
+
"div",
|
|
3246
|
+
{
|
|
3247
|
+
ref,
|
|
3248
|
+
"data-sidebar": "header",
|
|
3249
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
3250
|
+
...props
|
|
3251
|
+
}
|
|
3252
|
+
);
|
|
3253
|
+
});
|
|
3254
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
3255
|
+
var SidebarFooter = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3256
|
+
return /* @__PURE__ */ jsx(
|
|
3257
|
+
"div",
|
|
3258
|
+
{
|
|
3259
|
+
ref,
|
|
3260
|
+
"data-sidebar": "footer",
|
|
3261
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
3262
|
+
...props
|
|
3263
|
+
}
|
|
3264
|
+
);
|
|
3265
|
+
});
|
|
3266
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
3267
|
+
var SidebarSeparator = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3268
|
+
return /* @__PURE__ */ jsx(
|
|
3269
|
+
Separator6,
|
|
3270
|
+
{
|
|
3271
|
+
ref,
|
|
3272
|
+
"data-sidebar": "separator",
|
|
3273
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
3274
|
+
...props
|
|
3275
|
+
}
|
|
3276
|
+
);
|
|
3277
|
+
});
|
|
3278
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
3279
|
+
var SidebarContent = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3280
|
+
return /* @__PURE__ */ jsx(
|
|
3281
|
+
"div",
|
|
3282
|
+
{
|
|
3283
|
+
ref,
|
|
3284
|
+
"data-sidebar": "content",
|
|
3285
|
+
className: cn(
|
|
3286
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
3287
|
+
className
|
|
3288
|
+
),
|
|
3289
|
+
...props
|
|
3290
|
+
}
|
|
3291
|
+
);
|
|
3292
|
+
});
|
|
3293
|
+
SidebarContent.displayName = "SidebarContent";
|
|
3294
|
+
var SidebarGroup = React41.forwardRef(({ className, ...props }, ref) => {
|
|
3295
|
+
return /* @__PURE__ */ jsx(
|
|
3296
|
+
"div",
|
|
3297
|
+
{
|
|
3298
|
+
ref,
|
|
3299
|
+
"data-sidebar": "group",
|
|
3300
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
3301
|
+
...props
|
|
3302
|
+
}
|
|
3303
|
+
);
|
|
3304
|
+
});
|
|
3305
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
3306
|
+
var SidebarGroupLabel = React41.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3307
|
+
const Comp = asChild ? Slot : "div";
|
|
3308
|
+
return /* @__PURE__ */ jsx(
|
|
3309
|
+
Comp,
|
|
3310
|
+
{
|
|
3311
|
+
ref,
|
|
3312
|
+
"data-sidebar": "group-label",
|
|
3313
|
+
className: cn(
|
|
3314
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3315
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
3316
|
+
className
|
|
3317
|
+
),
|
|
3318
|
+
...props
|
|
3319
|
+
}
|
|
3320
|
+
);
|
|
3321
|
+
});
|
|
3322
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
3323
|
+
var SidebarGroupAction = React41.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3324
|
+
const Comp = asChild ? Slot : "button";
|
|
3325
|
+
return /* @__PURE__ */ jsx(
|
|
3326
|
+
Comp,
|
|
3327
|
+
{
|
|
3328
|
+
ref,
|
|
3329
|
+
"data-sidebar": "group-action",
|
|
3330
|
+
className: cn(
|
|
3331
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3332
|
+
// Increases the hit area of the button on mobile.
|
|
3333
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3334
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3335
|
+
className
|
|
3336
|
+
),
|
|
3337
|
+
...props
|
|
3338
|
+
}
|
|
3339
|
+
);
|
|
3340
|
+
});
|
|
3341
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
3342
|
+
var SidebarGroupContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3343
|
+
"div",
|
|
3344
|
+
{
|
|
3345
|
+
ref,
|
|
3346
|
+
"data-sidebar": "group-content",
|
|
3347
|
+
className: cn("w-full text-sm", className),
|
|
3348
|
+
...props
|
|
3349
|
+
}
|
|
3350
|
+
));
|
|
3351
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
3352
|
+
var SidebarMenu = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3353
|
+
"ul",
|
|
3354
|
+
{
|
|
3355
|
+
ref,
|
|
3356
|
+
"data-sidebar": "menu",
|
|
3357
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
3358
|
+
...props
|
|
3359
|
+
}
|
|
3360
|
+
));
|
|
3361
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
3362
|
+
var SidebarMenuItem = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3363
|
+
"li",
|
|
3364
|
+
{
|
|
3365
|
+
ref,
|
|
3366
|
+
"data-sidebar": "menu-item",
|
|
3367
|
+
className: cn("group/menu-item relative", className),
|
|
3368
|
+
...props
|
|
3369
|
+
}
|
|
3370
|
+
));
|
|
3371
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
3372
|
+
var sidebarMenuButtonVariants = cva(
|
|
3373
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] 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 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 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 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3374
|
+
{
|
|
3375
|
+
variants: {
|
|
3376
|
+
variant: {
|
|
3377
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
3378
|
+
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))]"
|
|
3379
|
+
},
|
|
3380
|
+
size: {
|
|
3381
|
+
default: "h-8 text-sm",
|
|
3382
|
+
sm: "h-7 text-xs",
|
|
3383
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
3384
|
+
}
|
|
3385
|
+
},
|
|
3386
|
+
defaultVariants: {
|
|
3387
|
+
variant: "default",
|
|
3388
|
+
size: "default"
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3391
|
+
);
|
|
3392
|
+
var SidebarMenuButton = React41.forwardRef(
|
|
3393
|
+
({
|
|
3394
|
+
asChild = false,
|
|
3395
|
+
isActive = false,
|
|
3396
|
+
variant = "default",
|
|
3397
|
+
size = "default",
|
|
3398
|
+
tooltip,
|
|
3399
|
+
className,
|
|
3400
|
+
...props
|
|
3401
|
+
}, ref) => {
|
|
3402
|
+
const Comp = asChild ? Slot : "button";
|
|
3403
|
+
const { isMobile, state } = useSidebar();
|
|
3404
|
+
const button = /* @__PURE__ */ jsx(
|
|
3405
|
+
Comp,
|
|
3406
|
+
{
|
|
3407
|
+
ref,
|
|
3408
|
+
"data-sidebar": "menu-button",
|
|
3409
|
+
"data-size": size,
|
|
3410
|
+
"data-active": isActive,
|
|
3411
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
3412
|
+
...props
|
|
3413
|
+
}
|
|
3414
|
+
);
|
|
3415
|
+
if (!tooltip) {
|
|
3416
|
+
return button;
|
|
3417
|
+
}
|
|
3418
|
+
if (typeof tooltip === "string") {
|
|
3419
|
+
tooltip = {
|
|
3420
|
+
children: tooltip
|
|
3421
|
+
};
|
|
3422
|
+
}
|
|
3423
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
3424
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
3425
|
+
/* @__PURE__ */ jsx(
|
|
3426
|
+
TooltipContent,
|
|
3427
|
+
{
|
|
3428
|
+
side: "right",
|
|
3429
|
+
align: "center",
|
|
3430
|
+
hidden: state !== "collapsed" || isMobile,
|
|
3431
|
+
...tooltip
|
|
3432
|
+
}
|
|
3433
|
+
)
|
|
3434
|
+
] });
|
|
3435
|
+
}
|
|
3436
|
+
);
|
|
3437
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
3438
|
+
var SidebarMenuAction = React41.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
3439
|
+
const Comp = asChild ? Slot : "button";
|
|
3440
|
+
return /* @__PURE__ */ jsx(
|
|
3441
|
+
Comp,
|
|
3442
|
+
{
|
|
3443
|
+
ref,
|
|
3444
|
+
"data-sidebar": "menu-action",
|
|
3445
|
+
className: cn(
|
|
3446
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3447
|
+
// Increases the hit area of the button on mobile.
|
|
3448
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3449
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3450
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3451
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3452
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3453
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
3454
|
+
className
|
|
3455
|
+
),
|
|
3456
|
+
...props
|
|
3457
|
+
}
|
|
3458
|
+
);
|
|
3459
|
+
});
|
|
3460
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
3461
|
+
var SidebarMenuBadge = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3462
|
+
"div",
|
|
3463
|
+
{
|
|
3464
|
+
ref,
|
|
3465
|
+
"data-sidebar": "menu-badge",
|
|
3466
|
+
className: cn(
|
|
3467
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
3468
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
3469
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3470
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3471
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3472
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3473
|
+
className
|
|
3474
|
+
),
|
|
3475
|
+
...props
|
|
3476
|
+
}
|
|
3477
|
+
));
|
|
3478
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
3479
|
+
var SidebarMenuSkeleton = React41.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
3480
|
+
const width = React41.useMemo(() => {
|
|
3481
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3482
|
+
}, []);
|
|
3483
|
+
return /* @__PURE__ */ jsxs(
|
|
3484
|
+
"div",
|
|
3485
|
+
{
|
|
3486
|
+
ref,
|
|
3487
|
+
"data-sidebar": "menu-skeleton",
|
|
3488
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
3489
|
+
...props,
|
|
3490
|
+
children: [
|
|
3491
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
3492
|
+
Skeleton,
|
|
3493
|
+
{
|
|
3494
|
+
className: "size-4 rounded-md",
|
|
3495
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
3496
|
+
}
|
|
3497
|
+
),
|
|
3498
|
+
/* @__PURE__ */ jsx(
|
|
3499
|
+
Skeleton,
|
|
3500
|
+
{
|
|
3501
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
3502
|
+
"data-sidebar": "menu-skeleton-text",
|
|
3503
|
+
style: {
|
|
3504
|
+
"--skeleton-width": width
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
)
|
|
3508
|
+
]
|
|
3509
|
+
}
|
|
3510
|
+
);
|
|
3511
|
+
});
|
|
3512
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
3513
|
+
var SidebarMenuSub = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3514
|
+
"ul",
|
|
3515
|
+
{
|
|
3516
|
+
ref,
|
|
3517
|
+
"data-sidebar": "menu-sub",
|
|
3518
|
+
className: cn(
|
|
3519
|
+
"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",
|
|
3520
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3521
|
+
className
|
|
3522
|
+
),
|
|
3523
|
+
...props
|
|
3524
|
+
}
|
|
3525
|
+
));
|
|
3526
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
3527
|
+
var SidebarMenuSubItem = React41.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
|
|
3528
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
3529
|
+
var SidebarMenuSubButton = React41.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
3530
|
+
const Comp = asChild ? Slot : "a";
|
|
3531
|
+
return /* @__PURE__ */ jsx(
|
|
3532
|
+
Comp,
|
|
3533
|
+
{
|
|
3534
|
+
ref,
|
|
3535
|
+
"data-sidebar": "menu-sub-button",
|
|
3536
|
+
"data-size": size,
|
|
3537
|
+
"data-active": isActive,
|
|
3538
|
+
className: cn(
|
|
3539
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring 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",
|
|
3540
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
3541
|
+
size === "sm" && "text-xs",
|
|
3542
|
+
size === "md" && "text-sm",
|
|
3543
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3544
|
+
className
|
|
3545
|
+
),
|
|
3546
|
+
...props
|
|
3547
|
+
}
|
|
3548
|
+
);
|
|
3549
|
+
});
|
|
3550
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
3551
|
+
function Spinner({ className, ...props }) {
|
|
3552
|
+
return /* @__PURE__ */ jsx(
|
|
3553
|
+
Loader2Icon,
|
|
3554
|
+
{
|
|
3555
|
+
role: "status",
|
|
3556
|
+
"aria-label": "Loading",
|
|
3557
|
+
className: cn("size-4 animate-spin", className),
|
|
3558
|
+
...props
|
|
3559
|
+
}
|
|
3560
|
+
);
|
|
3561
|
+
}
|
|
2415
3562
|
|
|
2416
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator6 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants };
|
|
3563
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, KbdGroup, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator6 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useSidebar };
|
|
2417
3564
|
//# sourceMappingURL=index.js.map
|
|
2418
3565
|
//# sourceMappingURL=index.js.map
|