@nuvia/components 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -0
- package/dist/hooks/use-mobile.cjs +44 -0
- package/dist/hooks/use-mobile.cjs.map +1 -0
- package/dist/hooks/use-mobile.js +22 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.cjs +146 -0
- package/dist/hooks/use-toast.cjs.map +1 -0
- package/dist/hooks/use-toast.js +122 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.cjs +4117 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +3800 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/fonts.cjs +15 -0
- package/dist/lib/fonts.cjs.map +1 -0
- package/dist/lib/fonts.js +13 -0
- package/dist/lib/fonts.js.map +1 -0
- package/dist/lib/utils.cjs +18 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.js +14 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/providers/theme.cjs +24 -0
- package/dist/providers/theme.cjs.map +1 -0
- package/dist/providers/theme.js +22 -0
- package/dist/providers/theme.js.map +1 -0
- package/dist/ui/accordion.cjs +75 -0
- package/dist/ui/accordion.cjs.map +1 -0
- package/dist/ui/accordion.js +49 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.cjs +189 -0
- package/dist/ui/alert-dialog.cjs.map +1 -0
- package/dist/ui/alert-dialog.js +156 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.cjs +81 -0
- package/dist/ui/alert.cjs.map +1 -0
- package/dist/ui/alert.js +57 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.cjs +29 -0
- package/dist/ui/aspect-ratio.cjs.map +1 -0
- package/dist/ui/aspect-ratio.js +7 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/auto-complete.cjs +284 -0
- package/dist/ui/auto-complete.cjs.map +1 -0
- package/dist/ui/auto-complete.js +262 -0
- package/dist/ui/auto-complete.js.map +1 -0
- package/dist/ui/avatar.cjs +70 -0
- package/dist/ui/avatar.cjs.map +1 -0
- package/dist/ui/avatar.js +45 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.cjs +34 -0
- package/dist/ui/badge.cjs.map +1 -0
- package/dist/ui/badge.js +31 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.cjs +120 -0
- package/dist/ui/breadcrumb.cjs.map +1 -0
- package/dist/ui/breadcrumb.js +92 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.cjs +80 -0
- package/dist/ui/button.cjs.map +1 -0
- package/dist/ui/button.js +57 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.cjs +135 -0
- package/dist/ui/calendar.cjs.map +1 -0
- package/dist/ui/calendar.js +113 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.cjs +89 -0
- package/dist/ui/card.cjs.map +1 -0
- package/dist/ui/card.js +62 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.cjs +269 -0
- package/dist/ui/carousel.cjs.map +1 -0
- package/dist/ui/carousel.js +240 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/chart.cjs +267 -0
- package/dist/ui/chart.cjs.map +1 -0
- package/dist/ui/chart.js +239 -0
- package/dist/ui/chart.js.map +1 -0
- package/dist/ui/checkbox.cjs +55 -0
- package/dist/ui/checkbox.cjs.map +1 -0
- package/dist/ui/checkbox.js +32 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/chip.cjs +79 -0
- package/dist/ui/chip.cjs.map +1 -0
- package/dist/ui/chip.js +55 -0
- package/dist/ui/chip.js.map +1 -0
- package/dist/ui/collapsible.cjs +33 -0
- package/dist/ui/collapsible.cjs.map +1 -0
- package/dist/ui/collapsible.js +9 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/combobox.cjs +254 -0
- package/dist/ui/combobox.cjs.map +1 -0
- package/dist/ui/combobox.js +232 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/command.cjs +199 -0
- package/dist/ui/command.cjs.map +1 -0
- package/dist/ui/command.js +168 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/context-menu.cjs +181 -0
- package/dist/ui/context-menu.cjs.map +1 -0
- package/dist/ui/context-menu.js +144 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/dialog.cjs +132 -0
- package/dist/ui/dialog.cjs.map +1 -0
- package/dist/ui/dialog.js +100 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/drawer.cjs +128 -0
- package/dist/ui/drawer.cjs.map +1 -0
- package/dist/ui/drawer.js +97 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.cjs +194 -0
- package/dist/ui/dropdown-menu.cjs.map +1 -0
- package/dist/ui/dropdown-menu.js +157 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/form.cjs +179 -0
- package/dist/ui/form.cjs.map +1 -0
- package/dist/ui/form.js +149 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.cjs +53 -0
- package/dist/ui/hover-card.cjs.map +1 -0
- package/dist/ui/hover-card.js +28 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/input-otp.cjs +76 -0
- package/dist/ui/input-otp.cjs.map +1 -0
- package/dist/ui/input-otp.js +51 -0
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.cjs +51 -0
- package/dist/ui/input.cjs.map +1 -0
- package/dist/ui/input.js +29 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.cjs +55 -0
- package/dist/ui/label.cjs.map +1 -0
- package/dist/ui/label.js +32 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/lottie-animation.cjs +85 -0
- package/dist/ui/lottie-animation.cjs.map +1 -0
- package/dist/ui/lottie-animation.js +79 -0
- package/dist/ui/lottie-animation.js.map +1 -0
- package/dist/ui/menubar.cjs +210 -0
- package/dist/ui/menubar.cjs.map +1 -0
- package/dist/ui/menubar.js +172 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/multi-combobox.cjs +319 -0
- package/dist/ui/multi-combobox.cjs.map +1 -0
- package/dist/ui/multi-combobox.js +297 -0
- package/dist/ui/multi-combobox.js.map +1 -0
- package/dist/ui/navigation-menu.cjs +136 -0
- package/dist/ui/navigation-menu.cjs.map +1 -0
- package/dist/ui/navigation-menu.js +105 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/pagination.cjs +172 -0
- package/dist/ui/pagination.cjs.map +1 -0
- package/dist/ui/pagination.js +144 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.cjs +55 -0
- package/dist/ui/popover.cjs.map +1 -0
- package/dist/ui/popover.js +29 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.cjs +54 -0
- package/dist/ui/progress.cjs.map +1 -0
- package/dist/ui/progress.js +31 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.cjs +62 -0
- package/dist/ui/radio-group.cjs.map +1 -0
- package/dist/ui/radio-group.js +38 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.cjs +65 -0
- package/dist/ui/resizable.cjs.map +1 -0
- package/dist/ui/resizable.js +41 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.cjs +66 -0
- package/dist/ui/scroll-area.cjs.map +1 -0
- package/dist/ui/scroll-area.js +42 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.cjs +152 -0
- package/dist/ui/select.cjs.map +1 -0
- package/dist/ui/select.js +120 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.cjs +52 -0
- package/dist/ui/separator.cjs.map +1 -0
- package/dist/ui/separator.js +29 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.cjs +143 -0
- package/dist/ui/sheet.cjs.map +1 -0
- package/dist/ui/sheet.js +111 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.cjs +816 -0
- package/dist/ui/sidebar.cjs.map +1 -0
- package/dist/ui/sidebar.js +768 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.cjs +25 -0
- package/dist/ui/skeleton.cjs.map +1 -0
- package/dist/ui/skeleton.js +23 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.cjs +51 -0
- package/dist/ui/slider.cjs.map +1 -0
- package/dist/ui/slider.js +28 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.cjs +46 -0
- package/dist/ui/sonner.cjs.map +1 -0
- package/dist/ui/sonner.js +41 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.cjs +83 -0
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.js +81 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.cjs +67 -0
- package/dist/ui/switch.cjs.map +1 -0
- package/dist/ui/switch.js +44 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.cjs +118 -0
- package/dist/ui/table.cjs.map +1 -0
- package/dist/ui/table.js +89 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.cjs +79 -0
- package/dist/ui/tabs.cjs.map +1 -0
- package/dist/ui/tabs.js +53 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.cjs +48 -0
- package/dist/ui/textarea.cjs.map +1 -0
- package/dist/ui/textarea.js +26 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast.cjs +125 -0
- package/dist/ui/toast.cjs.map +1 -0
- package/dist/ui/toast.js +96 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.cjs +251 -0
- package/dist/ui/toaster.cjs.map +1 -0
- package/dist/ui/toaster.js +228 -0
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.cjs +101 -0
- package/dist/ui/toggle-group.cjs.map +1 -0
- package/dist/ui/toggle-group.js +76 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.cjs +66 -0
- package/dist/ui/toggle.cjs.map +1 -0
- package/dist/ui/toggle.js +42 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.cjs +54 -0
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.js +28 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/package.json +116 -0
- package/src/styles/globals.css +529 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3800 @@
|
|
|
1
|
+
import * as React36 from 'react';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
+
import { ChevronDownIcon, ArrowLeftIcon, ArrowRightIcon, CheckIcon, Cross2Icon, MagnifyingGlassIcon, ChevronRightIcon, DotFilledIcon, MinusIcon, PlusIcon, ChevronUpIcon, ViewVerticalIcon, DotsHorizontalIcon, CaretRightIcon, CaretLeftIcon, ChevronLeftIcon, DragHandleDots2Icon } from '@radix-ui/react-icons';
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
|
+
import { toast, Toaster as Toaster$1 } from 'sonner';
|
|
7
|
+
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
import { cva } from 'class-variance-authority';
|
|
10
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
11
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
12
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
13
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
14
|
+
import { DayPicker } from 'react-day-picker';
|
|
15
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
16
|
+
import * as RechartsPrimitive from 'recharts';
|
|
17
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
18
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
19
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
|
+
import { Popover as Popover$1, PopoverTrigger as PopoverTrigger$1 } from '@radix-ui/react-popover';
|
|
21
|
+
import { Command as Command$1 } from 'cmdk';
|
|
22
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
23
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
24
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
25
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
26
|
+
import { WarningCircle } from '@phosphor-icons/react/dist/ssr';
|
|
27
|
+
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
28
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
29
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
30
|
+
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
31
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
32
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
33
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
34
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
35
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
36
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
37
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
38
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
39
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
40
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
41
|
+
import { CheckCircle, WarningCircle as WarningCircle$1, XCircle } from '@phosphor-icons/react';
|
|
42
|
+
import { useTheme, ThemeProvider as ThemeProvider$1 } from 'next-themes';
|
|
43
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
44
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
45
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
46
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
47
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
48
|
+
|
|
49
|
+
// src/ui/accordion.tsx
|
|
50
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
51
|
+
var capitalize = (str) => str?.charAt(0)?.toUpperCase() + str?.slice(1);
|
|
52
|
+
var handleError = (error) => {
|
|
53
|
+
toast.error(error.message);
|
|
54
|
+
};
|
|
55
|
+
var Accordion = AccordionPrimitive.Root;
|
|
56
|
+
var AccordionItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
57
|
+
AccordionPrimitive.Item,
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
className: cn("border-b px-3", className),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
));
|
|
64
|
+
AccordionItem.displayName = "AccordionItem";
|
|
65
|
+
var AccordionTrigger = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
66
|
+
AccordionPrimitive.Trigger,
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
className: cn(
|
|
70
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all text-left [&[data-state=open]>svg]:rotate-180",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props,
|
|
74
|
+
children: [
|
|
75
|
+
children,
|
|
76
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-foreground transition-transform duration-200" })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
) }));
|
|
80
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
81
|
+
var AccordionContent = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
82
|
+
AccordionPrimitive.Content,
|
|
83
|
+
{
|
|
84
|
+
ref,
|
|
85
|
+
className: "data-[state=closed]:overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
86
|
+
...props,
|
|
87
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
91
|
+
var alertVariants = cva(
|
|
92
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
93
|
+
{
|
|
94
|
+
variants: {
|
|
95
|
+
variant: {
|
|
96
|
+
default: "bg-background text-foreground",
|
|
97
|
+
primary: "bg-primary text-text-brand-primary border-primary-medium bg-background-primary-light",
|
|
98
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
99
|
+
warning: "border-warning-border border bg-warning [&>svg]:text-warning-content [&>h5]:text-warning-foreground"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
defaultVariants: {
|
|
103
|
+
variant: "default"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
var Alert = React36.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref,
|
|
111
|
+
role: "alert",
|
|
112
|
+
className: cn(alertVariants({ variant }), className),
|
|
113
|
+
...props
|
|
114
|
+
}
|
|
115
|
+
));
|
|
116
|
+
Alert.displayName = "Alert";
|
|
117
|
+
var AlertTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
118
|
+
"h5",
|
|
119
|
+
{
|
|
120
|
+
ref,
|
|
121
|
+
className: cn("mb-1 font-semibold leading-none tracking-tight", className),
|
|
122
|
+
...props
|
|
123
|
+
}
|
|
124
|
+
));
|
|
125
|
+
AlertTitle.displayName = "AlertTitle";
|
|
126
|
+
var AlertDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
ref,
|
|
130
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
131
|
+
...props
|
|
132
|
+
}
|
|
133
|
+
));
|
|
134
|
+
AlertDescription.displayName = "AlertDescription";
|
|
135
|
+
var buttonVariants = cva(
|
|
136
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#5A6FC0] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
137
|
+
{
|
|
138
|
+
variants: {
|
|
139
|
+
variant: {
|
|
140
|
+
default: "bg-foreground-primary-medium text-white shadow hover:bg-primary/90",
|
|
141
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
142
|
+
outline: "border border-input bg-background hover:bg-secondary hover:text-accent-foreground text-foreground-secondary-heavy",
|
|
143
|
+
secondary: "bg-background-secondary-light hover:background-secondary-light/40 text-foreground-secondary-heavy",
|
|
144
|
+
ghost: "text-foreground-secondary-heavy hover:bg-background-secondary-light",
|
|
145
|
+
link: "text-text-links hover:bg-background-secondary-light",
|
|
146
|
+
accent: "bg-accent nuvia-gradient-1 text-white"
|
|
147
|
+
},
|
|
148
|
+
size: {
|
|
149
|
+
default: "h-10 px-4 py-2",
|
|
150
|
+
xs: "h-[30px] px-3 rounded-xl text-xs",
|
|
151
|
+
sm: "h-9 rounded-xl px-3 text-xs",
|
|
152
|
+
lg: "h-12 rounded-xl px-8",
|
|
153
|
+
icon: "h-10 w-10 min-w-10",
|
|
154
|
+
"icon-xs": "h-[30px] w-[30px] min-w-[30px]",
|
|
155
|
+
"icon-sm": "h-9 w-9 min-w-9",
|
|
156
|
+
bullet: "h-8 w-8 min-w-8"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
defaultVariants: {
|
|
160
|
+
variant: "default",
|
|
161
|
+
size: "default"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
var Button = React36.forwardRef(
|
|
166
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
167
|
+
const Comp = asChild ? Slot : "button";
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
Comp,
|
|
170
|
+
{
|
|
171
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
172
|
+
ref,
|
|
173
|
+
...props
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
Button.displayName = "Button";
|
|
179
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
180
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
181
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
182
|
+
var AlertDialogOverlay = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
183
|
+
AlertDialogPrimitive.Overlay,
|
|
184
|
+
{
|
|
185
|
+
className: cn(
|
|
186
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
187
|
+
className
|
|
188
|
+
),
|
|
189
|
+
...props,
|
|
190
|
+
ref
|
|
191
|
+
}
|
|
192
|
+
));
|
|
193
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
194
|
+
var AlertDialogContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
195
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
196
|
+
/* @__PURE__ */ jsx(
|
|
197
|
+
AlertDialogPrimitive.Content,
|
|
198
|
+
{
|
|
199
|
+
ref,
|
|
200
|
+
className: cn(
|
|
201
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
202
|
+
className
|
|
203
|
+
),
|
|
204
|
+
...props
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
] }));
|
|
208
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
209
|
+
var AlertDialogHeader = ({
|
|
210
|
+
className,
|
|
211
|
+
...props
|
|
212
|
+
}) => /* @__PURE__ */ jsx(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
className: cn(
|
|
216
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
217
|
+
className
|
|
218
|
+
),
|
|
219
|
+
...props
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
223
|
+
var AlertDialogFooter = ({
|
|
224
|
+
className,
|
|
225
|
+
...props
|
|
226
|
+
}) => /* @__PURE__ */ jsx(
|
|
227
|
+
"div",
|
|
228
|
+
{
|
|
229
|
+
className: cn(
|
|
230
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
231
|
+
className
|
|
232
|
+
),
|
|
233
|
+
...props
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
237
|
+
var AlertDialogTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
238
|
+
AlertDialogPrimitive.Title,
|
|
239
|
+
{
|
|
240
|
+
ref,
|
|
241
|
+
className: cn("text-lg font-semibold", className),
|
|
242
|
+
...props
|
|
243
|
+
}
|
|
244
|
+
));
|
|
245
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
246
|
+
var AlertDialogDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
247
|
+
AlertDialogPrimitive.Description,
|
|
248
|
+
{
|
|
249
|
+
ref,
|
|
250
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
251
|
+
...props
|
|
252
|
+
}
|
|
253
|
+
));
|
|
254
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
255
|
+
var AlertDialogAction = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
256
|
+
AlertDialogPrimitive.Action,
|
|
257
|
+
{
|
|
258
|
+
ref,
|
|
259
|
+
className: cn(buttonVariants(), className),
|
|
260
|
+
...props
|
|
261
|
+
}
|
|
262
|
+
));
|
|
263
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
264
|
+
var AlertDialogCancel = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
265
|
+
AlertDialogPrimitive.Cancel,
|
|
266
|
+
{
|
|
267
|
+
ref,
|
|
268
|
+
className: cn(
|
|
269
|
+
buttonVariants({ variant: "outline" }),
|
|
270
|
+
"mt-2 sm:mt-0",
|
|
271
|
+
className
|
|
272
|
+
),
|
|
273
|
+
...props
|
|
274
|
+
}
|
|
275
|
+
));
|
|
276
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
277
|
+
var AspectRatio = AspectRatioPrimitive.Root;
|
|
278
|
+
var Avatar = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
279
|
+
AvatarPrimitive.Root,
|
|
280
|
+
{
|
|
281
|
+
ref,
|
|
282
|
+
className: cn(
|
|
283
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
284
|
+
className
|
|
285
|
+
),
|
|
286
|
+
...props
|
|
287
|
+
}
|
|
288
|
+
));
|
|
289
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
290
|
+
var AvatarImage = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
291
|
+
AvatarPrimitive.Image,
|
|
292
|
+
{
|
|
293
|
+
ref,
|
|
294
|
+
className: cn("aspect-square h-full w-full", className),
|
|
295
|
+
...props
|
|
296
|
+
}
|
|
297
|
+
));
|
|
298
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
299
|
+
var AvatarFallback = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
300
|
+
AvatarPrimitive.Fallback,
|
|
301
|
+
{
|
|
302
|
+
ref,
|
|
303
|
+
className: cn(
|
|
304
|
+
"flex h-full w-full items-center justify-center rounded-full bg-secondary dark:bg-secondary/20",
|
|
305
|
+
className
|
|
306
|
+
),
|
|
307
|
+
...props
|
|
308
|
+
}
|
|
309
|
+
));
|
|
310
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
311
|
+
var badgeVariants = cva(
|
|
312
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
313
|
+
{
|
|
314
|
+
variants: {
|
|
315
|
+
variant: {
|
|
316
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
317
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
318
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
319
|
+
outline: "text-foreground"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
defaultVariants: {
|
|
323
|
+
variant: "default"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
);
|
|
327
|
+
function Badge({ className, variant, ...props }) {
|
|
328
|
+
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
329
|
+
}
|
|
330
|
+
var Breadcrumb = React36.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
331
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
332
|
+
var BreadcrumbList = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
333
|
+
"ol",
|
|
334
|
+
{
|
|
335
|
+
ref,
|
|
336
|
+
className: cn(
|
|
337
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
338
|
+
className
|
|
339
|
+
),
|
|
340
|
+
...props
|
|
341
|
+
}
|
|
342
|
+
));
|
|
343
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
344
|
+
var BreadcrumbItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
345
|
+
"li",
|
|
346
|
+
{
|
|
347
|
+
ref,
|
|
348
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
349
|
+
...props
|
|
350
|
+
}
|
|
351
|
+
));
|
|
352
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
353
|
+
var BreadcrumbLink = React36.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
354
|
+
const Comp = asChild ? Slot : "a";
|
|
355
|
+
return /* @__PURE__ */ jsx(
|
|
356
|
+
Comp,
|
|
357
|
+
{
|
|
358
|
+
ref,
|
|
359
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
360
|
+
...props
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
});
|
|
364
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
365
|
+
var BreadcrumbPage = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
366
|
+
"span",
|
|
367
|
+
{
|
|
368
|
+
ref,
|
|
369
|
+
"aria-disabled": "true",
|
|
370
|
+
"aria-current": "page",
|
|
371
|
+
className: cn("font-normal text-foreground", className),
|
|
372
|
+
...props
|
|
373
|
+
}
|
|
374
|
+
));
|
|
375
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
376
|
+
var BreadcrumbSeparator = ({
|
|
377
|
+
children,
|
|
378
|
+
className,
|
|
379
|
+
...props
|
|
380
|
+
}) => /* @__PURE__ */ jsx(
|
|
381
|
+
"li",
|
|
382
|
+
{
|
|
383
|
+
role: "presentation",
|
|
384
|
+
"aria-hidden": "true",
|
|
385
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
|
|
386
|
+
...props,
|
|
387
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
391
|
+
var BreadcrumbEllipsis = ({
|
|
392
|
+
className,
|
|
393
|
+
...props
|
|
394
|
+
}) => /* @__PURE__ */ jsxs(
|
|
395
|
+
"span",
|
|
396
|
+
{
|
|
397
|
+
role: "presentation",
|
|
398
|
+
"aria-hidden": "true",
|
|
399
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
400
|
+
...props,
|
|
401
|
+
children: [
|
|
402
|
+
/* @__PURE__ */ jsx(DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
403
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
);
|
|
407
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
408
|
+
function Calendar({
|
|
409
|
+
className,
|
|
410
|
+
classNames,
|
|
411
|
+
showOutsideDays = true,
|
|
412
|
+
...props
|
|
413
|
+
}) {
|
|
414
|
+
return /* @__PURE__ */ jsx(
|
|
415
|
+
DayPicker,
|
|
416
|
+
{
|
|
417
|
+
showOutsideDays,
|
|
418
|
+
className: cn("p-3", className),
|
|
419
|
+
classNames: {
|
|
420
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
421
|
+
month: "space-y-4",
|
|
422
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
423
|
+
caption_label: "text-sm font-medium",
|
|
424
|
+
nav: "space-x-1 flex items-center",
|
|
425
|
+
nav_button: cn(
|
|
426
|
+
buttonVariants({ variant: "outline" }),
|
|
427
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
428
|
+
),
|
|
429
|
+
nav_button_previous: "absolute left-1",
|
|
430
|
+
nav_button_next: "absolute right-1",
|
|
431
|
+
table: "w-full border-collapse space-y-1",
|
|
432
|
+
head_row: "flex",
|
|
433
|
+
head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
|
|
434
|
+
row: "flex w-full mt-2",
|
|
435
|
+
cell: cn(
|
|
436
|
+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
437
|
+
props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
|
|
438
|
+
),
|
|
439
|
+
day: cn(
|
|
440
|
+
buttonVariants({ variant: "ghost" }),
|
|
441
|
+
"h-8 w-8 p-0 font-normal aria-selected:opacity-100"
|
|
442
|
+
),
|
|
443
|
+
day_range_start: "day-range-start",
|
|
444
|
+
day_range_end: "day-range-end",
|
|
445
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
446
|
+
day_today: "bg-accent text-accent-foreground",
|
|
447
|
+
day_outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
448
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
449
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
450
|
+
day_hidden: "invisible",
|
|
451
|
+
...classNames
|
|
452
|
+
},
|
|
453
|
+
components: {
|
|
454
|
+
IconLeft: () => /* @__PURE__ */ jsx(CaretLeftIcon, { className: "h-4 w-4" }),
|
|
455
|
+
IconRight: () => /* @__PURE__ */ jsx(CaretRightIcon, { className: "h-4 w-4" })
|
|
456
|
+
},
|
|
457
|
+
...props
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
Calendar.displayName = "Calendar";
|
|
462
|
+
var Card = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
ref,
|
|
466
|
+
className: cn("rounded-xl border bg-card text-card-foreground", className),
|
|
467
|
+
...props
|
|
468
|
+
}
|
|
469
|
+
));
|
|
470
|
+
Card.displayName = "Card";
|
|
471
|
+
var CardHeader = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
472
|
+
"div",
|
|
473
|
+
{
|
|
474
|
+
ref,
|
|
475
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
476
|
+
...props
|
|
477
|
+
}
|
|
478
|
+
));
|
|
479
|
+
CardHeader.displayName = "CardHeader";
|
|
480
|
+
var CardTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
481
|
+
"div",
|
|
482
|
+
{
|
|
483
|
+
ref,
|
|
484
|
+
className: cn(
|
|
485
|
+
"font-semibold text-lg text-text-brand-primary leading-none tracking-tight",
|
|
486
|
+
className
|
|
487
|
+
),
|
|
488
|
+
...props
|
|
489
|
+
}
|
|
490
|
+
));
|
|
491
|
+
CardTitle.displayName = "CardTitle";
|
|
492
|
+
var CardDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
493
|
+
"div",
|
|
494
|
+
{
|
|
495
|
+
ref,
|
|
496
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
497
|
+
...props
|
|
498
|
+
}
|
|
499
|
+
));
|
|
500
|
+
CardDescription.displayName = "CardDescription";
|
|
501
|
+
var CardContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
502
|
+
CardContent.displayName = "CardContent";
|
|
503
|
+
var CardFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
504
|
+
"div",
|
|
505
|
+
{
|
|
506
|
+
ref,
|
|
507
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
508
|
+
...props
|
|
509
|
+
}
|
|
510
|
+
));
|
|
511
|
+
CardFooter.displayName = "CardFooter";
|
|
512
|
+
var CarouselContext = React36.createContext(null);
|
|
513
|
+
function useCarousel() {
|
|
514
|
+
const context = React36.useContext(CarouselContext);
|
|
515
|
+
if (!context) {
|
|
516
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
517
|
+
}
|
|
518
|
+
return context;
|
|
519
|
+
}
|
|
520
|
+
var Carousel = React36.forwardRef(
|
|
521
|
+
({
|
|
522
|
+
orientation = "horizontal",
|
|
523
|
+
opts,
|
|
524
|
+
setApi,
|
|
525
|
+
plugins,
|
|
526
|
+
className,
|
|
527
|
+
children,
|
|
528
|
+
...props
|
|
529
|
+
}, ref) => {
|
|
530
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
531
|
+
{
|
|
532
|
+
...opts,
|
|
533
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
534
|
+
},
|
|
535
|
+
plugins
|
|
536
|
+
);
|
|
537
|
+
const [canScrollPrev, setCanScrollPrev] = React36.useState(false);
|
|
538
|
+
const [canScrollNext, setCanScrollNext] = React36.useState(false);
|
|
539
|
+
const onSelect = React36.useCallback((api2) => {
|
|
540
|
+
if (!api2) {
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
544
|
+
setCanScrollNext(api2.canScrollNext());
|
|
545
|
+
}, []);
|
|
546
|
+
const scrollPrev = React36.useCallback(() => {
|
|
547
|
+
api?.scrollPrev();
|
|
548
|
+
}, [api]);
|
|
549
|
+
const scrollNext = React36.useCallback(() => {
|
|
550
|
+
api?.scrollNext();
|
|
551
|
+
}, [api]);
|
|
552
|
+
const handleKeyDown = React36.useCallback(
|
|
553
|
+
(event) => {
|
|
554
|
+
if (event.key === "ArrowLeft") {
|
|
555
|
+
event.preventDefault();
|
|
556
|
+
scrollPrev();
|
|
557
|
+
} else if (event.key === "ArrowRight") {
|
|
558
|
+
event.preventDefault();
|
|
559
|
+
scrollNext();
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
[scrollPrev, scrollNext]
|
|
563
|
+
);
|
|
564
|
+
React36.useEffect(() => {
|
|
565
|
+
if (!api || !setApi) {
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
setApi(api);
|
|
569
|
+
}, [api, setApi]);
|
|
570
|
+
React36.useEffect(() => {
|
|
571
|
+
if (!api) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
onSelect(api);
|
|
575
|
+
api.on("reInit", onSelect);
|
|
576
|
+
api.on("select", onSelect);
|
|
577
|
+
return () => {
|
|
578
|
+
api?.off("select", onSelect);
|
|
579
|
+
};
|
|
580
|
+
}, [api, onSelect]);
|
|
581
|
+
return /* @__PURE__ */ jsx(
|
|
582
|
+
CarouselContext.Provider,
|
|
583
|
+
{
|
|
584
|
+
value: {
|
|
585
|
+
carouselRef,
|
|
586
|
+
api,
|
|
587
|
+
opts,
|
|
588
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
589
|
+
scrollPrev,
|
|
590
|
+
scrollNext,
|
|
591
|
+
canScrollPrev,
|
|
592
|
+
canScrollNext
|
|
593
|
+
},
|
|
594
|
+
children: /* @__PURE__ */ jsx(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
ref,
|
|
598
|
+
onKeyDownCapture: handleKeyDown,
|
|
599
|
+
className: cn("relative", className),
|
|
600
|
+
role: "region",
|
|
601
|
+
"aria-roledescription": "carousel",
|
|
602
|
+
...props,
|
|
603
|
+
children
|
|
604
|
+
}
|
|
605
|
+
)
|
|
606
|
+
}
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
);
|
|
610
|
+
Carousel.displayName = "Carousel";
|
|
611
|
+
var CarouselContent = React36.forwardRef(({ className, ...props }, ref) => {
|
|
612
|
+
const { carouselRef, orientation } = useCarousel();
|
|
613
|
+
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
614
|
+
"div",
|
|
615
|
+
{
|
|
616
|
+
ref,
|
|
617
|
+
className: cn(
|
|
618
|
+
"flex",
|
|
619
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
620
|
+
className
|
|
621
|
+
),
|
|
622
|
+
...props
|
|
623
|
+
}
|
|
624
|
+
) });
|
|
625
|
+
});
|
|
626
|
+
CarouselContent.displayName = "CarouselContent";
|
|
627
|
+
var CarouselItem = React36.forwardRef(({ className, ...props }, ref) => {
|
|
628
|
+
const { orientation } = useCarousel();
|
|
629
|
+
return /* @__PURE__ */ jsx(
|
|
630
|
+
"div",
|
|
631
|
+
{
|
|
632
|
+
ref,
|
|
633
|
+
role: "group",
|
|
634
|
+
"aria-roledescription": "slide",
|
|
635
|
+
className: cn(
|
|
636
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
637
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
638
|
+
className
|
|
639
|
+
),
|
|
640
|
+
...props
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
});
|
|
644
|
+
CarouselItem.displayName = "CarouselItem";
|
|
645
|
+
var CarouselPrevious = React36.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
646
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
647
|
+
return /* @__PURE__ */ jsxs(
|
|
648
|
+
Button,
|
|
649
|
+
{
|
|
650
|
+
ref,
|
|
651
|
+
variant,
|
|
652
|
+
size,
|
|
653
|
+
className: cn(
|
|
654
|
+
"absolute h-8 w-8 rounded-full",
|
|
655
|
+
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
656
|
+
className
|
|
657
|
+
),
|
|
658
|
+
disabled: !canScrollPrev,
|
|
659
|
+
onClick: scrollPrev,
|
|
660
|
+
...props,
|
|
661
|
+
children: [
|
|
662
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "h-4 w-4" }),
|
|
663
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
664
|
+
]
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
});
|
|
668
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
669
|
+
var CarouselNext = React36.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
670
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
671
|
+
return /* @__PURE__ */ jsxs(
|
|
672
|
+
Button,
|
|
673
|
+
{
|
|
674
|
+
ref,
|
|
675
|
+
variant,
|
|
676
|
+
size,
|
|
677
|
+
className: cn(
|
|
678
|
+
"absolute h-8 w-8 rounded-full",
|
|
679
|
+
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
680
|
+
className
|
|
681
|
+
),
|
|
682
|
+
disabled: !canScrollNext,
|
|
683
|
+
onClick: scrollNext,
|
|
684
|
+
...props,
|
|
685
|
+
children: [
|
|
686
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { className: "h-4 w-4" }),
|
|
687
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
});
|
|
692
|
+
CarouselNext.displayName = "CarouselNext";
|
|
693
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
694
|
+
var ChartContext = React36.createContext(null);
|
|
695
|
+
function useChart() {
|
|
696
|
+
const context = React36.useContext(ChartContext);
|
|
697
|
+
if (!context) {
|
|
698
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
699
|
+
}
|
|
700
|
+
return context;
|
|
701
|
+
}
|
|
702
|
+
var ChartContainer = React36.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
703
|
+
const uniqueId = React36.useId();
|
|
704
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
705
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
706
|
+
"div",
|
|
707
|
+
{
|
|
708
|
+
"data-chart": chartId,
|
|
709
|
+
ref,
|
|
710
|
+
className: cn(
|
|
711
|
+
"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",
|
|
712
|
+
className
|
|
713
|
+
),
|
|
714
|
+
...props,
|
|
715
|
+
children: [
|
|
716
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
717
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
718
|
+
]
|
|
719
|
+
}
|
|
720
|
+
) });
|
|
721
|
+
});
|
|
722
|
+
ChartContainer.displayName = "Chart";
|
|
723
|
+
var ChartStyle = ({ id, config }) => {
|
|
724
|
+
const colorConfig = Object.entries(config).filter(
|
|
725
|
+
([, config2]) => config2.theme || config2.color
|
|
726
|
+
);
|
|
727
|
+
if (!colorConfig.length) {
|
|
728
|
+
return null;
|
|
729
|
+
}
|
|
730
|
+
return /* @__PURE__ */ jsx(
|
|
731
|
+
"style",
|
|
732
|
+
{
|
|
733
|
+
dangerouslySetInnerHTML: {
|
|
734
|
+
__html: Object.entries(THEMES).map(
|
|
735
|
+
([theme, prefix]) => `
|
|
736
|
+
${prefix} [data-chart=${id}] {
|
|
737
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
738
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
739
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
740
|
+
}).join("\n")}
|
|
741
|
+
}
|
|
742
|
+
`
|
|
743
|
+
).join("\n")
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
);
|
|
747
|
+
};
|
|
748
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
749
|
+
var ChartTooltipContent = React36.forwardRef(
|
|
750
|
+
({
|
|
751
|
+
active,
|
|
752
|
+
payload,
|
|
753
|
+
className,
|
|
754
|
+
indicator = "dot",
|
|
755
|
+
hideLabel = false,
|
|
756
|
+
hideIndicator = false,
|
|
757
|
+
label,
|
|
758
|
+
labelFormatter,
|
|
759
|
+
labelClassName,
|
|
760
|
+
formatter,
|
|
761
|
+
color,
|
|
762
|
+
nameKey,
|
|
763
|
+
labelKey
|
|
764
|
+
}, ref) => {
|
|
765
|
+
const { config } = useChart();
|
|
766
|
+
const tooltipLabel = React36.useMemo(() => {
|
|
767
|
+
if (hideLabel || !payload?.length) {
|
|
768
|
+
return null;
|
|
769
|
+
}
|
|
770
|
+
const [item] = payload;
|
|
771
|
+
const key = `${labelKey || item.dataKey || item.name || "value"}`;
|
|
772
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
773
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
774
|
+
if (labelFormatter) {
|
|
775
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
776
|
+
}
|
|
777
|
+
if (!value) {
|
|
778
|
+
return null;
|
|
779
|
+
}
|
|
780
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
781
|
+
}, [
|
|
782
|
+
label,
|
|
783
|
+
labelFormatter,
|
|
784
|
+
payload,
|
|
785
|
+
hideLabel,
|
|
786
|
+
labelClassName,
|
|
787
|
+
config,
|
|
788
|
+
labelKey
|
|
789
|
+
]);
|
|
790
|
+
if (!active || !payload?.length) {
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
793
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
794
|
+
return /* @__PURE__ */ jsxs(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
ref,
|
|
798
|
+
className: cn(
|
|
799
|
+
"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",
|
|
800
|
+
className
|
|
801
|
+
),
|
|
802
|
+
children: [
|
|
803
|
+
!nestLabel ? tooltipLabel : null,
|
|
804
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
805
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
806
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
807
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
808
|
+
return /* @__PURE__ */ jsx(
|
|
809
|
+
"div",
|
|
810
|
+
{
|
|
811
|
+
className: cn(
|
|
812
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
813
|
+
indicator === "dot" && "items-center"
|
|
814
|
+
),
|
|
815
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
816
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
817
|
+
"div",
|
|
818
|
+
{
|
|
819
|
+
className: cn(
|
|
820
|
+
"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
|
|
821
|
+
{
|
|
822
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
823
|
+
"w-1": indicator === "line",
|
|
824
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
825
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
826
|
+
}
|
|
827
|
+
),
|
|
828
|
+
style: {
|
|
829
|
+
"--color-bg": indicatorColor,
|
|
830
|
+
"--color-border": indicatorColor
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
),
|
|
834
|
+
/* @__PURE__ */ jsxs(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: cn(
|
|
838
|
+
"flex flex-1 justify-between leading-none",
|
|
839
|
+
nestLabel ? "items-end" : "items-center"
|
|
840
|
+
),
|
|
841
|
+
children: [
|
|
842
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
843
|
+
nestLabel ? tooltipLabel : null,
|
|
844
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
845
|
+
] }),
|
|
846
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
847
|
+
]
|
|
848
|
+
}
|
|
849
|
+
)
|
|
850
|
+
] })
|
|
851
|
+
},
|
|
852
|
+
item.dataKey
|
|
853
|
+
);
|
|
854
|
+
}) })
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
);
|
|
858
|
+
}
|
|
859
|
+
);
|
|
860
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
861
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
862
|
+
var ChartLegendContent = React36.forwardRef(
|
|
863
|
+
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
864
|
+
const { config } = useChart();
|
|
865
|
+
if (!payload?.length) {
|
|
866
|
+
return null;
|
|
867
|
+
}
|
|
868
|
+
return /* @__PURE__ */ jsx(
|
|
869
|
+
"div",
|
|
870
|
+
{
|
|
871
|
+
ref,
|
|
872
|
+
className: cn(
|
|
873
|
+
"flex items-center justify-center gap-4",
|
|
874
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
875
|
+
className
|
|
876
|
+
),
|
|
877
|
+
children: payload.map((item) => {
|
|
878
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
879
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
880
|
+
return /* @__PURE__ */ jsxs(
|
|
881
|
+
"div",
|
|
882
|
+
{
|
|
883
|
+
className: cn(
|
|
884
|
+
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
885
|
+
),
|
|
886
|
+
children: [
|
|
887
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
888
|
+
"div",
|
|
889
|
+
{
|
|
890
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
891
|
+
style: {
|
|
892
|
+
backgroundColor: item.color
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
itemConfig?.label
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
item.value
|
|
900
|
+
);
|
|
901
|
+
})
|
|
902
|
+
}
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
);
|
|
906
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
907
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
908
|
+
if (typeof payload !== "object" || payload === null) {
|
|
909
|
+
return void 0;
|
|
910
|
+
}
|
|
911
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
912
|
+
let configLabelKey = key;
|
|
913
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
914
|
+
configLabelKey = payload[key];
|
|
915
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
916
|
+
configLabelKey = payloadPayload[key];
|
|
917
|
+
}
|
|
918
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
919
|
+
}
|
|
920
|
+
var Checkbox = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
921
|
+
CheckboxPrimitive.Root,
|
|
922
|
+
{
|
|
923
|
+
ref,
|
|
924
|
+
className: cn(
|
|
925
|
+
"peer flex h-4 w-4 shrink-0 rounded-[4px] border border-border-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
|
|
926
|
+
className
|
|
927
|
+
),
|
|
928
|
+
...props,
|
|
929
|
+
children: /* @__PURE__ */ jsx(
|
|
930
|
+
CheckboxPrimitive.Indicator,
|
|
931
|
+
{
|
|
932
|
+
className: cn("flex items-center justify-center text-current"),
|
|
933
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" })
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
}
|
|
937
|
+
));
|
|
938
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
939
|
+
var chipVariants = cva(
|
|
940
|
+
"inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-full text-xs h-6 px-2 font-bold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
941
|
+
{
|
|
942
|
+
variants: {
|
|
943
|
+
variant: {
|
|
944
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
945
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
946
|
+
outline: "border border-input bg-secondary/40 hover:bg-accent hover:bg-secondary/90",
|
|
947
|
+
secondary: "bg-secondary/50 hover:bg-secondary dark:bg-secondary/25 text-secondary-foreground dark:hover:bg-secondary/40",
|
|
948
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
949
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
defaultVariants: {
|
|
953
|
+
variant: "default"
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
var Chip = React36.forwardRef(
|
|
958
|
+
({ className, variant, asChild = false, children, ...props }, ref) => {
|
|
959
|
+
const Comp = asChild ? Slot : "span";
|
|
960
|
+
return /* @__PURE__ */ jsx(
|
|
961
|
+
Comp,
|
|
962
|
+
{
|
|
963
|
+
className: cn(chipVariants({ variant, className })),
|
|
964
|
+
ref,
|
|
965
|
+
...props,
|
|
966
|
+
children
|
|
967
|
+
}
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
Chip.displayName = "Chip";
|
|
972
|
+
var ChipGroup = ({ chips, variant }) => {
|
|
973
|
+
return /* @__PURE__ */ jsx("div", { className: "flex gap-1 flex-wrap py-2 ", children: chips.map(({ value, onClick, LeftIcon, RightIcon }, index) => /* @__PURE__ */ jsxs(Chip, { className: "cursor-pointer", onClick, variant, children: [
|
|
974
|
+
LeftIcon && /* @__PURE__ */ jsx(LeftIcon, {}),
|
|
975
|
+
/* @__PURE__ */ jsx("span", { className: "truncate max-w-full", children: value }),
|
|
976
|
+
RightIcon && /* @__PURE__ */ jsx(RightIcon, {})
|
|
977
|
+
] }, index)) });
|
|
978
|
+
};
|
|
979
|
+
Chip.displayName = "ChipGroup";
|
|
980
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
|
981
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
982
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
983
|
+
var Dialog = DialogPrimitive.Root;
|
|
984
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
985
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
986
|
+
var DialogClose = DialogPrimitive.Close;
|
|
987
|
+
var DialogOverlay = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
988
|
+
DialogPrimitive.Overlay,
|
|
989
|
+
{
|
|
990
|
+
ref,
|
|
991
|
+
className: cn(
|
|
992
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
993
|
+
className
|
|
994
|
+
),
|
|
995
|
+
...props
|
|
996
|
+
}
|
|
997
|
+
));
|
|
998
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
999
|
+
var DialogContent = React36.forwardRef(({ className, children, showClose = true, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1000
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1001
|
+
/* @__PURE__ */ jsxs(
|
|
1002
|
+
DialogPrimitive.Content,
|
|
1003
|
+
{
|
|
1004
|
+
ref,
|
|
1005
|
+
className: cn(
|
|
1006
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",
|
|
1007
|
+
className
|
|
1008
|
+
),
|
|
1009
|
+
...props,
|
|
1010
|
+
children: [
|
|
1011
|
+
children,
|
|
1012
|
+
showClose ? /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1013
|
+
/* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" }),
|
|
1014
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1015
|
+
] }) : null
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
)
|
|
1019
|
+
] }));
|
|
1020
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
1021
|
+
var DialogHeader = ({
|
|
1022
|
+
className,
|
|
1023
|
+
...props
|
|
1024
|
+
}) => /* @__PURE__ */ jsx(
|
|
1025
|
+
"div",
|
|
1026
|
+
{
|
|
1027
|
+
className: cn(
|
|
1028
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
1029
|
+
className
|
|
1030
|
+
),
|
|
1031
|
+
...props
|
|
1032
|
+
}
|
|
1033
|
+
);
|
|
1034
|
+
DialogHeader.displayName = "DialogHeader";
|
|
1035
|
+
var DialogFooter = ({
|
|
1036
|
+
className,
|
|
1037
|
+
...props
|
|
1038
|
+
}) => /* @__PURE__ */ jsx(
|
|
1039
|
+
"div",
|
|
1040
|
+
{
|
|
1041
|
+
className: cn(
|
|
1042
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1043
|
+
className
|
|
1044
|
+
),
|
|
1045
|
+
...props
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
DialogFooter.displayName = "DialogFooter";
|
|
1049
|
+
var DialogTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1050
|
+
DialogPrimitive.Title,
|
|
1051
|
+
{
|
|
1052
|
+
ref,
|
|
1053
|
+
className: cn(
|
|
1054
|
+
"text-lg font-semibold leading-none tracking-tight text-text-brand-primary",
|
|
1055
|
+
className
|
|
1056
|
+
),
|
|
1057
|
+
...props
|
|
1058
|
+
}
|
|
1059
|
+
));
|
|
1060
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1061
|
+
var DialogDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1062
|
+
DialogPrimitive.Description,
|
|
1063
|
+
{
|
|
1064
|
+
ref,
|
|
1065
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1066
|
+
...props
|
|
1067
|
+
}
|
|
1068
|
+
));
|
|
1069
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1070
|
+
var Command = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1071
|
+
Command$1,
|
|
1072
|
+
{
|
|
1073
|
+
ref,
|
|
1074
|
+
className: cn(
|
|
1075
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
1076
|
+
className
|
|
1077
|
+
),
|
|
1078
|
+
...props
|
|
1079
|
+
}
|
|
1080
|
+
));
|
|
1081
|
+
Command.displayName = Command$1.displayName;
|
|
1082
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
1083
|
+
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", 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 }) }) });
|
|
1084
|
+
};
|
|
1085
|
+
var CommandInput = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1086
|
+
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1087
|
+
/* @__PURE__ */ jsx(
|
|
1088
|
+
Command$1.Input,
|
|
1089
|
+
{
|
|
1090
|
+
ref,
|
|
1091
|
+
className: cn(
|
|
1092
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1093
|
+
className
|
|
1094
|
+
),
|
|
1095
|
+
...props
|
|
1096
|
+
}
|
|
1097
|
+
)
|
|
1098
|
+
] }));
|
|
1099
|
+
CommandInput.displayName = Command$1.Input.displayName;
|
|
1100
|
+
var CommandList = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1101
|
+
Command$1.List,
|
|
1102
|
+
{
|
|
1103
|
+
ref,
|
|
1104
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
1105
|
+
...props
|
|
1106
|
+
}
|
|
1107
|
+
));
|
|
1108
|
+
CommandList.displayName = Command$1.List.displayName;
|
|
1109
|
+
var CommandEmpty = React36.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
1110
|
+
Command$1.Empty,
|
|
1111
|
+
{
|
|
1112
|
+
ref,
|
|
1113
|
+
className: "py-6 text-center text-sm",
|
|
1114
|
+
...props
|
|
1115
|
+
}
|
|
1116
|
+
));
|
|
1117
|
+
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
1118
|
+
var CommandGroup = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1119
|
+
Command$1.Group,
|
|
1120
|
+
{
|
|
1121
|
+
ref,
|
|
1122
|
+
className: cn(
|
|
1123
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
1124
|
+
className
|
|
1125
|
+
),
|
|
1126
|
+
...props
|
|
1127
|
+
}
|
|
1128
|
+
));
|
|
1129
|
+
CommandGroup.displayName = Command$1.Group.displayName;
|
|
1130
|
+
var CommandSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1131
|
+
Command$1.Separator,
|
|
1132
|
+
{
|
|
1133
|
+
ref,
|
|
1134
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
1135
|
+
...props
|
|
1136
|
+
}
|
|
1137
|
+
));
|
|
1138
|
+
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
1139
|
+
var CommandItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1140
|
+
Command$1.Item,
|
|
1141
|
+
{
|
|
1142
|
+
ref,
|
|
1143
|
+
className: cn(
|
|
1144
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none dark:data-[selected=true]:bg-secondary/25 data-[selected=true]:bg-secondary/50 data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1145
|
+
className
|
|
1146
|
+
),
|
|
1147
|
+
...props
|
|
1148
|
+
}
|
|
1149
|
+
));
|
|
1150
|
+
CommandItem.displayName = Command$1.Item.displayName;
|
|
1151
|
+
var CommandShortcut = ({
|
|
1152
|
+
className,
|
|
1153
|
+
...props
|
|
1154
|
+
}) => {
|
|
1155
|
+
return /* @__PURE__ */ jsx(
|
|
1156
|
+
"span",
|
|
1157
|
+
{
|
|
1158
|
+
className: cn(
|
|
1159
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1160
|
+
className
|
|
1161
|
+
),
|
|
1162
|
+
...props
|
|
1163
|
+
}
|
|
1164
|
+
);
|
|
1165
|
+
};
|
|
1166
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
1167
|
+
var Popover = PopoverPrimitive.Root;
|
|
1168
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1169
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1170
|
+
var PopoverContent = React36.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1171
|
+
PopoverPrimitive.Content,
|
|
1172
|
+
{
|
|
1173
|
+
ref,
|
|
1174
|
+
align,
|
|
1175
|
+
sideOffset,
|
|
1176
|
+
className: cn(
|
|
1177
|
+
"z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1178
|
+
className
|
|
1179
|
+
),
|
|
1180
|
+
...props
|
|
1181
|
+
}
|
|
1182
|
+
) }));
|
|
1183
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1184
|
+
var Combobox = React36.forwardRef(({
|
|
1185
|
+
options,
|
|
1186
|
+
placeholder = "Select option...",
|
|
1187
|
+
searchPlaceholder = "Search...",
|
|
1188
|
+
emptyMessage = "No option found.",
|
|
1189
|
+
className,
|
|
1190
|
+
value: controlledValue,
|
|
1191
|
+
onValueChange,
|
|
1192
|
+
onSelect,
|
|
1193
|
+
asChild,
|
|
1194
|
+
children
|
|
1195
|
+
}, ref) => {
|
|
1196
|
+
const [open, setOpen] = React36.useState(false);
|
|
1197
|
+
const [value, setValue] = React36.useState(controlledValue || (Array.isArray(controlledValue) ? [] : ""));
|
|
1198
|
+
const [search, setSearch] = React36.useState("");
|
|
1199
|
+
React36.useEffect(() => {
|
|
1200
|
+
if (controlledValue !== void 0) {
|
|
1201
|
+
setValue(controlledValue);
|
|
1202
|
+
}
|
|
1203
|
+
}, [controlledValue]);
|
|
1204
|
+
const handleSelect = React36.useCallback((currentValue) => {
|
|
1205
|
+
let newValue;
|
|
1206
|
+
if (Array.isArray(value)) {
|
|
1207
|
+
newValue = value.includes(currentValue) ? value.filter((v) => v !== currentValue) : [...value, currentValue];
|
|
1208
|
+
} else {
|
|
1209
|
+
newValue = currentValue === value ? "" : currentValue;
|
|
1210
|
+
}
|
|
1211
|
+
setValue(newValue);
|
|
1212
|
+
onValueChange?.(newValue);
|
|
1213
|
+
onSelect?.(newValue);
|
|
1214
|
+
setOpen(false);
|
|
1215
|
+
}, [value, onValueChange, onSelect]);
|
|
1216
|
+
return /* @__PURE__ */ jsxs(Popover$1, { open, onOpenChange: setOpen, children: [
|
|
1217
|
+
/* @__PURE__ */ jsx(PopoverTrigger$1, { asChild: true, children: asChild ? children : /* @__PURE__ */ jsxs(
|
|
1218
|
+
Button,
|
|
1219
|
+
{
|
|
1220
|
+
variant: "outline",
|
|
1221
|
+
role: "combobox",
|
|
1222
|
+
"aria-expanded": open,
|
|
1223
|
+
className: cn("w-full justify-between", className),
|
|
1224
|
+
children: [
|
|
1225
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-normal", children: Array.isArray(value) ? value.map((val) => options.find((option) => option.value === val)?.label).join(", ") : options.find((option) => option.value === value)?.label || placeholder }),
|
|
1226
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "opacity-50" })
|
|
1227
|
+
]
|
|
1228
|
+
}
|
|
1229
|
+
) }),
|
|
1230
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: cn("w-full p-0 !rounded-xl border-none", className), children: /* @__PURE__ */ jsxs(Command, { className: "rounded-xl border", children: [
|
|
1231
|
+
/* @__PURE__ */ jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: searchPlaceholder, className: "h-9 w-full" }),
|
|
1232
|
+
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
1233
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }),
|
|
1234
|
+
/* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
|
|
1235
|
+
CommandItem,
|
|
1236
|
+
{
|
|
1237
|
+
keywords: [option.label],
|
|
1238
|
+
className: "rounded-lg",
|
|
1239
|
+
value: option.value,
|
|
1240
|
+
onSelect: () => handleSelect(option.value),
|
|
1241
|
+
onKeyUp: (e) => e.key === "Enter" && handleSelect(option.value),
|
|
1242
|
+
onKeyDown: (e) => e.key === "Enter" && handleSelect(option.value),
|
|
1243
|
+
children: [
|
|
1244
|
+
option.label,
|
|
1245
|
+
/* @__PURE__ */ jsx(
|
|
1246
|
+
CheckIcon,
|
|
1247
|
+
{
|
|
1248
|
+
className: cn(
|
|
1249
|
+
"ml-auto",
|
|
1250
|
+
Array.isArray(value) ? value.includes(option.value) ? "opacity-100" : "opacity-0" : value === option.value ? "opacity-100" : "opacity-0"
|
|
1251
|
+
)
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
]
|
|
1255
|
+
},
|
|
1256
|
+
option.value
|
|
1257
|
+
)) })
|
|
1258
|
+
] })
|
|
1259
|
+
] }) })
|
|
1260
|
+
] });
|
|
1261
|
+
});
|
|
1262
|
+
Combobox.displayName = "Combobox";
|
|
1263
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
|
1264
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
1265
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
1266
|
+
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
1267
|
+
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1268
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1269
|
+
var ContextMenuSubTrigger = React36.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1270
|
+
ContextMenuPrimitive.SubTrigger,
|
|
1271
|
+
{
|
|
1272
|
+
ref,
|
|
1273
|
+
className: cn(
|
|
1274
|
+
"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1275
|
+
inset && "pl-8",
|
|
1276
|
+
className
|
|
1277
|
+
),
|
|
1278
|
+
...props,
|
|
1279
|
+
children: [
|
|
1280
|
+
children,
|
|
1281
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
));
|
|
1285
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1286
|
+
var ContextMenuSubContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1287
|
+
ContextMenuPrimitive.SubContent,
|
|
1288
|
+
{
|
|
1289
|
+
ref,
|
|
1290
|
+
className: cn(
|
|
1291
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1292
|
+
className
|
|
1293
|
+
),
|
|
1294
|
+
...props
|
|
1295
|
+
}
|
|
1296
|
+
));
|
|
1297
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1298
|
+
var ContextMenuContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1299
|
+
ContextMenuPrimitive.Content,
|
|
1300
|
+
{
|
|
1301
|
+
ref,
|
|
1302
|
+
className: cn(
|
|
1303
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1304
|
+
className
|
|
1305
|
+
),
|
|
1306
|
+
...props
|
|
1307
|
+
}
|
|
1308
|
+
) }));
|
|
1309
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1310
|
+
var ContextMenuItem = React36.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1311
|
+
ContextMenuPrimitive.Item,
|
|
1312
|
+
{
|
|
1313
|
+
ref,
|
|
1314
|
+
className: cn(
|
|
1315
|
+
"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1316
|
+
inset && "pl-8",
|
|
1317
|
+
className
|
|
1318
|
+
),
|
|
1319
|
+
...props
|
|
1320
|
+
}
|
|
1321
|
+
));
|
|
1322
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1323
|
+
var ContextMenuCheckboxItem = React36.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1324
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
1325
|
+
{
|
|
1326
|
+
ref,
|
|
1327
|
+
className: cn(
|
|
1328
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1329
|
+
className
|
|
1330
|
+
),
|
|
1331
|
+
checked,
|
|
1332
|
+
...props,
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1335
|
+
children
|
|
1336
|
+
]
|
|
1337
|
+
}
|
|
1338
|
+
));
|
|
1339
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1340
|
+
var ContextMenuRadioItem = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1341
|
+
ContextMenuPrimitive.RadioItem,
|
|
1342
|
+
{
|
|
1343
|
+
ref,
|
|
1344
|
+
className: cn(
|
|
1345
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1346
|
+
className
|
|
1347
|
+
),
|
|
1348
|
+
...props,
|
|
1349
|
+
children: [
|
|
1350
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1351
|
+
children
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
));
|
|
1355
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1356
|
+
var ContextMenuLabel = React36.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1357
|
+
ContextMenuPrimitive.Label,
|
|
1358
|
+
{
|
|
1359
|
+
ref,
|
|
1360
|
+
className: cn(
|
|
1361
|
+
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
1362
|
+
inset && "pl-8",
|
|
1363
|
+
className
|
|
1364
|
+
),
|
|
1365
|
+
...props
|
|
1366
|
+
}
|
|
1367
|
+
));
|
|
1368
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1369
|
+
var ContextMenuSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1370
|
+
ContextMenuPrimitive.Separator,
|
|
1371
|
+
{
|
|
1372
|
+
ref,
|
|
1373
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1374
|
+
...props
|
|
1375
|
+
}
|
|
1376
|
+
));
|
|
1377
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
1378
|
+
var ContextMenuShortcut = ({
|
|
1379
|
+
className,
|
|
1380
|
+
...props
|
|
1381
|
+
}) => {
|
|
1382
|
+
return /* @__PURE__ */ jsx(
|
|
1383
|
+
"span",
|
|
1384
|
+
{
|
|
1385
|
+
className: cn(
|
|
1386
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1387
|
+
className
|
|
1388
|
+
),
|
|
1389
|
+
...props
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1392
|
+
};
|
|
1393
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
1394
|
+
var Drawer = ({
|
|
1395
|
+
shouldScaleBackground = true,
|
|
1396
|
+
...props
|
|
1397
|
+
}) => /* @__PURE__ */ jsx(
|
|
1398
|
+
Drawer$1.Root,
|
|
1399
|
+
{
|
|
1400
|
+
shouldScaleBackground,
|
|
1401
|
+
...props
|
|
1402
|
+
}
|
|
1403
|
+
);
|
|
1404
|
+
Drawer.displayName = "Drawer";
|
|
1405
|
+
var DrawerTrigger = Drawer$1.Trigger;
|
|
1406
|
+
var DrawerPortal = Drawer$1.Portal;
|
|
1407
|
+
var DrawerClose = Drawer$1.Close;
|
|
1408
|
+
var DrawerOverlay = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1409
|
+
Drawer$1.Overlay,
|
|
1410
|
+
{
|
|
1411
|
+
ref,
|
|
1412
|
+
className: cn("fixed inset-0 z-50 bg-black/80", className),
|
|
1413
|
+
...props
|
|
1414
|
+
}
|
|
1415
|
+
));
|
|
1416
|
+
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
1417
|
+
var DrawerContent = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
1418
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1419
|
+
/* @__PURE__ */ jsxs(
|
|
1420
|
+
Drawer$1.Content,
|
|
1421
|
+
{
|
|
1422
|
+
ref,
|
|
1423
|
+
className: cn(
|
|
1424
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
1425
|
+
className
|
|
1426
|
+
),
|
|
1427
|
+
...props,
|
|
1428
|
+
children: [
|
|
1429
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
1430
|
+
children
|
|
1431
|
+
]
|
|
1432
|
+
}
|
|
1433
|
+
)
|
|
1434
|
+
] }));
|
|
1435
|
+
DrawerContent.displayName = "DrawerContent";
|
|
1436
|
+
var DrawerHeader = ({
|
|
1437
|
+
className,
|
|
1438
|
+
...props
|
|
1439
|
+
}) => /* @__PURE__ */ jsx(
|
|
1440
|
+
"div",
|
|
1441
|
+
{
|
|
1442
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
1443
|
+
...props
|
|
1444
|
+
}
|
|
1445
|
+
);
|
|
1446
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
1447
|
+
var DrawerFooter = ({
|
|
1448
|
+
className,
|
|
1449
|
+
...props
|
|
1450
|
+
}) => /* @__PURE__ */ jsx(
|
|
1451
|
+
"div",
|
|
1452
|
+
{
|
|
1453
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1454
|
+
...props
|
|
1455
|
+
}
|
|
1456
|
+
);
|
|
1457
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
1458
|
+
var DrawerTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1459
|
+
Drawer$1.Title,
|
|
1460
|
+
{
|
|
1461
|
+
ref,
|
|
1462
|
+
className: cn(
|
|
1463
|
+
"text-lg font-semibold leading-none tracking-tight text-text-brand-primary",
|
|
1464
|
+
className
|
|
1465
|
+
),
|
|
1466
|
+
...props
|
|
1467
|
+
}
|
|
1468
|
+
));
|
|
1469
|
+
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
1470
|
+
var DrawerDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1471
|
+
Drawer$1.Description,
|
|
1472
|
+
{
|
|
1473
|
+
ref,
|
|
1474
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1475
|
+
...props
|
|
1476
|
+
}
|
|
1477
|
+
));
|
|
1478
|
+
DrawerDescription.displayName = Drawer$1.Description.displayName;
|
|
1479
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1480
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1481
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1482
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1483
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1484
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1485
|
+
var DropdownMenuSubTrigger = React36.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1486
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1487
|
+
{
|
|
1488
|
+
ref,
|
|
1489
|
+
className: cn(
|
|
1490
|
+
"flex cursor-default gap-2 select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1491
|
+
inset && "pl-8",
|
|
1492
|
+
className
|
|
1493
|
+
),
|
|
1494
|
+
...props,
|
|
1495
|
+
children: [
|
|
1496
|
+
children,
|
|
1497
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
1498
|
+
]
|
|
1499
|
+
}
|
|
1500
|
+
));
|
|
1501
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1502
|
+
var DropdownMenuSubContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1503
|
+
DropdownMenuPrimitive.SubContent,
|
|
1504
|
+
{
|
|
1505
|
+
ref,
|
|
1506
|
+
className: cn(
|
|
1507
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1508
|
+
className
|
|
1509
|
+
),
|
|
1510
|
+
...props
|
|
1511
|
+
}
|
|
1512
|
+
));
|
|
1513
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1514
|
+
var DropdownMenuContent = React36.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1515
|
+
DropdownMenuPrimitive.Content,
|
|
1516
|
+
{
|
|
1517
|
+
ref,
|
|
1518
|
+
sideOffset,
|
|
1519
|
+
className: cn(
|
|
1520
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1521
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1522
|
+
className
|
|
1523
|
+
),
|
|
1524
|
+
...props
|
|
1525
|
+
}
|
|
1526
|
+
) }));
|
|
1527
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1528
|
+
var DropdownMenuItem = React36.forwardRef(
|
|
1529
|
+
({ className, inset, noInteractive, ...props }, ref) => noInteractive ? /* @__PURE__ */ jsx(
|
|
1530
|
+
"div",
|
|
1531
|
+
{
|
|
1532
|
+
ref,
|
|
1533
|
+
className: cn(
|
|
1534
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-secondary/50 dark:focus:bg-secondary/25 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 hover:bg-secondary/50",
|
|
1535
|
+
inset && "pl-8",
|
|
1536
|
+
className
|
|
1537
|
+
),
|
|
1538
|
+
onClick: props.onClick,
|
|
1539
|
+
children: props.children
|
|
1540
|
+
}
|
|
1541
|
+
) : /* @__PURE__ */ jsx(
|
|
1542
|
+
DropdownMenuPrimitive.Item,
|
|
1543
|
+
{
|
|
1544
|
+
ref,
|
|
1545
|
+
className: cn(
|
|
1546
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-secondary/50 dark:focus:bg-secondary/25 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1547
|
+
inset && "pl-8",
|
|
1548
|
+
className
|
|
1549
|
+
),
|
|
1550
|
+
...props
|
|
1551
|
+
}
|
|
1552
|
+
)
|
|
1553
|
+
);
|
|
1554
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1555
|
+
var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1556
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1557
|
+
{
|
|
1558
|
+
ref,
|
|
1559
|
+
className: cn(
|
|
1560
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1561
|
+
className
|
|
1562
|
+
),
|
|
1563
|
+
checked,
|
|
1564
|
+
...props,
|
|
1565
|
+
children: [
|
|
1566
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1567
|
+
children
|
|
1568
|
+
]
|
|
1569
|
+
}
|
|
1570
|
+
));
|
|
1571
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1572
|
+
var DropdownMenuRadioItem = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1573
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1574
|
+
{
|
|
1575
|
+
ref,
|
|
1576
|
+
className: cn(
|
|
1577
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1578
|
+
className
|
|
1579
|
+
),
|
|
1580
|
+
...props,
|
|
1581
|
+
children: [
|
|
1582
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotFilledIcon, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1583
|
+
children
|
|
1584
|
+
]
|
|
1585
|
+
}
|
|
1586
|
+
));
|
|
1587
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1588
|
+
var DropdownMenuLabel = React36.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1589
|
+
DropdownMenuPrimitive.Label,
|
|
1590
|
+
{
|
|
1591
|
+
ref,
|
|
1592
|
+
className: cn(
|
|
1593
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1594
|
+
inset && "pl-8",
|
|
1595
|
+
className
|
|
1596
|
+
),
|
|
1597
|
+
...props
|
|
1598
|
+
}
|
|
1599
|
+
));
|
|
1600
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1601
|
+
var DropdownMenuSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1602
|
+
DropdownMenuPrimitive.Separator,
|
|
1603
|
+
{
|
|
1604
|
+
ref,
|
|
1605
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1606
|
+
...props
|
|
1607
|
+
}
|
|
1608
|
+
));
|
|
1609
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1610
|
+
var DropdownMenuShortcut = ({
|
|
1611
|
+
className,
|
|
1612
|
+
...props
|
|
1613
|
+
}) => {
|
|
1614
|
+
return /* @__PURE__ */ jsx(
|
|
1615
|
+
"span",
|
|
1616
|
+
{
|
|
1617
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
1618
|
+
...props
|
|
1619
|
+
}
|
|
1620
|
+
);
|
|
1621
|
+
};
|
|
1622
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1623
|
+
var labelVariants = cva(
|
|
1624
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1625
|
+
{
|
|
1626
|
+
variants: {
|
|
1627
|
+
required: {
|
|
1628
|
+
true: "after:content-['*'] after:text-destructive after:ml-1"
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
);
|
|
1633
|
+
var Label3 = React36.forwardRef(({ className, required, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1634
|
+
LabelPrimitive.Root,
|
|
1635
|
+
{
|
|
1636
|
+
ref,
|
|
1637
|
+
className: cn(labelVariants({ required }), className),
|
|
1638
|
+
...props
|
|
1639
|
+
}
|
|
1640
|
+
));
|
|
1641
|
+
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
1642
|
+
var Form = FormProvider;
|
|
1643
|
+
var FormFieldContext = React36.createContext(
|
|
1644
|
+
{}
|
|
1645
|
+
);
|
|
1646
|
+
var FormField = ({
|
|
1647
|
+
...props
|
|
1648
|
+
}) => {
|
|
1649
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
1650
|
+
};
|
|
1651
|
+
var useFormField = () => {
|
|
1652
|
+
const fieldContext = React36.useContext(FormFieldContext);
|
|
1653
|
+
const itemContext = React36.useContext(FormItemContext);
|
|
1654
|
+
const { getFieldState, formState } = useFormContext();
|
|
1655
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1656
|
+
if (!fieldContext) {
|
|
1657
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
1658
|
+
}
|
|
1659
|
+
const { id } = itemContext;
|
|
1660
|
+
return {
|
|
1661
|
+
id,
|
|
1662
|
+
name: fieldContext.name,
|
|
1663
|
+
formItemId: `${id}-form-item`,
|
|
1664
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
1665
|
+
formMessageId: `${id}-form-item-message`,
|
|
1666
|
+
...fieldState
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
var FormItemContext = React36.createContext(
|
|
1670
|
+
{}
|
|
1671
|
+
);
|
|
1672
|
+
var FormItem = React36.forwardRef(({ className, ...props }, ref) => {
|
|
1673
|
+
const id = React36.useId();
|
|
1674
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("relative", className), ...props }) });
|
|
1675
|
+
});
|
|
1676
|
+
FormItem.displayName = "FormItem";
|
|
1677
|
+
var FormLabel = React36.forwardRef(({ className, ...props }, ref) => {
|
|
1678
|
+
const { error, formItemId } = useFormField();
|
|
1679
|
+
return /* @__PURE__ */ jsx(
|
|
1680
|
+
Label3,
|
|
1681
|
+
{
|
|
1682
|
+
ref,
|
|
1683
|
+
className: cn(error && "text-danger-foreground", className),
|
|
1684
|
+
htmlFor: formItemId,
|
|
1685
|
+
...props
|
|
1686
|
+
}
|
|
1687
|
+
);
|
|
1688
|
+
});
|
|
1689
|
+
FormLabel.displayName = "FormLabel";
|
|
1690
|
+
var FormControl = React36.forwardRef(({ className, ...props }, ref) => {
|
|
1691
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1692
|
+
return /* @__PURE__ */ jsx(
|
|
1693
|
+
Slot,
|
|
1694
|
+
{
|
|
1695
|
+
ref,
|
|
1696
|
+
id: formItemId,
|
|
1697
|
+
"aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : `${formDescriptionId}`,
|
|
1698
|
+
"aria-invalid": !!error,
|
|
1699
|
+
className: cn(
|
|
1700
|
+
"peer group ",
|
|
1701
|
+
className
|
|
1702
|
+
),
|
|
1703
|
+
...props
|
|
1704
|
+
}
|
|
1705
|
+
);
|
|
1706
|
+
});
|
|
1707
|
+
FormControl.displayName = "FormControl";
|
|
1708
|
+
var FormDescription = React36.forwardRef(({ className, ...props }, ref) => {
|
|
1709
|
+
const { formDescriptionId } = useFormField();
|
|
1710
|
+
return /* @__PURE__ */ jsx(
|
|
1711
|
+
"p",
|
|
1712
|
+
{
|
|
1713
|
+
ref,
|
|
1714
|
+
id: formDescriptionId,
|
|
1715
|
+
className: cn(
|
|
1716
|
+
"token-font-extra-small text-muted-foreground leading-4 peer-aria-[invalid=true]:text-danger-foreground",
|
|
1717
|
+
className
|
|
1718
|
+
),
|
|
1719
|
+
...props
|
|
1720
|
+
}
|
|
1721
|
+
);
|
|
1722
|
+
});
|
|
1723
|
+
FormDescription.displayName = "FormDescription";
|
|
1724
|
+
var FormMessage = React36.forwardRef(({ t, iconClassName, className, children, ...props }, ref) => {
|
|
1725
|
+
const { error, formMessageId } = useFormField();
|
|
1726
|
+
const body = error ? String(error?.message) : "";
|
|
1727
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1728
|
+
/* @__PURE__ */ jsx(
|
|
1729
|
+
WarningCircle,
|
|
1730
|
+
{
|
|
1731
|
+
className: cn(
|
|
1732
|
+
"opacity-0 absolute right-3 translate-y-[24px] bottom-[34px] text-danger-foreground transition-all",
|
|
1733
|
+
body ? "opacity-100 translate-y-0" : "",
|
|
1734
|
+
iconClassName
|
|
1735
|
+
),
|
|
1736
|
+
size: 20
|
|
1737
|
+
}
|
|
1738
|
+
),
|
|
1739
|
+
/* @__PURE__ */ jsx(
|
|
1740
|
+
"p",
|
|
1741
|
+
{
|
|
1742
|
+
ref,
|
|
1743
|
+
id: formMessageId,
|
|
1744
|
+
className: cn(
|
|
1745
|
+
"token-font-extra-small flex h-0 items-center overflow-hidden text-danger-foreground transition-all",
|
|
1746
|
+
body ? "h-6" : "",
|
|
1747
|
+
className
|
|
1748
|
+
),
|
|
1749
|
+
...props,
|
|
1750
|
+
children: body ? t(body) : ""
|
|
1751
|
+
}
|
|
1752
|
+
)
|
|
1753
|
+
] });
|
|
1754
|
+
});
|
|
1755
|
+
FormMessage.displayName = "FormMessage";
|
|
1756
|
+
var HoverCard = HoverCardPrimitive.Root;
|
|
1757
|
+
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
1758
|
+
var HoverCardContent = React36.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1759
|
+
HoverCardPrimitive.Content,
|
|
1760
|
+
{
|
|
1761
|
+
ref,
|
|
1762
|
+
align,
|
|
1763
|
+
sideOffset,
|
|
1764
|
+
className: cn(
|
|
1765
|
+
"z-50 w-64 rounded-xl border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1766
|
+
className
|
|
1767
|
+
),
|
|
1768
|
+
...props
|
|
1769
|
+
}
|
|
1770
|
+
));
|
|
1771
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
1772
|
+
var Input = React36.forwardRef(
|
|
1773
|
+
({ className, type, ...props }, ref) => {
|
|
1774
|
+
return /* @__PURE__ */ jsx(
|
|
1775
|
+
"input",
|
|
1776
|
+
{
|
|
1777
|
+
type,
|
|
1778
|
+
className: cn(
|
|
1779
|
+
"flex h-10 w-full rounded-xl border border-border bg-transparent px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm group-aria-[invalid=true]:border-danger-foreground aria-[invalid=true]:border-danger-foreground",
|
|
1780
|
+
className
|
|
1781
|
+
),
|
|
1782
|
+
ref,
|
|
1783
|
+
...props
|
|
1784
|
+
}
|
|
1785
|
+
);
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
Input.displayName = "Input";
|
|
1789
|
+
var InputOTP = React36.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1790
|
+
OTPInput,
|
|
1791
|
+
{
|
|
1792
|
+
ref,
|
|
1793
|
+
containerClassName: cn(
|
|
1794
|
+
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
1795
|
+
containerClassName
|
|
1796
|
+
),
|
|
1797
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
1798
|
+
...props
|
|
1799
|
+
}
|
|
1800
|
+
));
|
|
1801
|
+
InputOTP.displayName = "InputOTP";
|
|
1802
|
+
var InputOTPGroup = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1803
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1804
|
+
var InputOTPSlot = React36.forwardRef(({ index, className, ...props }, ref) => {
|
|
1805
|
+
const inputOTPContext = React36.useContext(OTPInputContext);
|
|
1806
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1807
|
+
return /* @__PURE__ */ jsxs(
|
|
1808
|
+
"div",
|
|
1809
|
+
{
|
|
1810
|
+
ref,
|
|
1811
|
+
className: cn(
|
|
1812
|
+
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-xl first:border-l last:rounded-r-xl",
|
|
1813
|
+
isActive && "z-10 ring-1 ring-ring",
|
|
1814
|
+
className
|
|
1815
|
+
),
|
|
1816
|
+
...props,
|
|
1817
|
+
children: [
|
|
1818
|
+
char,
|
|
1819
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
1820
|
+
]
|
|
1821
|
+
}
|
|
1822
|
+
);
|
|
1823
|
+
});
|
|
1824
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1825
|
+
var InputOTPSeparator = React36.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) }));
|
|
1826
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1827
|
+
var MenubarMenu = MenubarPrimitive.Menu;
|
|
1828
|
+
var MenubarGroup = MenubarPrimitive.Group;
|
|
1829
|
+
var MenubarPortal = MenubarPrimitive.Portal;
|
|
1830
|
+
var MenubarSub = MenubarPrimitive.Sub;
|
|
1831
|
+
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
1832
|
+
var Menubar = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1833
|
+
MenubarPrimitive.Root,
|
|
1834
|
+
{
|
|
1835
|
+
ref,
|
|
1836
|
+
className: cn(
|
|
1837
|
+
"flex h-9 items-center space-x-1 rounded-xl border bg-background p-1 shadow-sm",
|
|
1838
|
+
className
|
|
1839
|
+
),
|
|
1840
|
+
...props
|
|
1841
|
+
}
|
|
1842
|
+
));
|
|
1843
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
1844
|
+
var MenubarTrigger = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1845
|
+
MenubarPrimitive.Trigger,
|
|
1846
|
+
{
|
|
1847
|
+
ref,
|
|
1848
|
+
className: cn(
|
|
1849
|
+
"flex cursor-default select-none items-center rounded-lg px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1850
|
+
className
|
|
1851
|
+
),
|
|
1852
|
+
...props
|
|
1853
|
+
}
|
|
1854
|
+
));
|
|
1855
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
1856
|
+
var MenubarSubTrigger = React36.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1857
|
+
MenubarPrimitive.SubTrigger,
|
|
1858
|
+
{
|
|
1859
|
+
ref,
|
|
1860
|
+
className: cn(
|
|
1861
|
+
"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1862
|
+
inset && "pl-8",
|
|
1863
|
+
className
|
|
1864
|
+
),
|
|
1865
|
+
...props,
|
|
1866
|
+
children: [
|
|
1867
|
+
children,
|
|
1868
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1869
|
+
]
|
|
1870
|
+
}
|
|
1871
|
+
));
|
|
1872
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
1873
|
+
var MenubarSubContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1874
|
+
MenubarPrimitive.SubContent,
|
|
1875
|
+
{
|
|
1876
|
+
ref,
|
|
1877
|
+
className: cn(
|
|
1878
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1879
|
+
className
|
|
1880
|
+
),
|
|
1881
|
+
...props
|
|
1882
|
+
}
|
|
1883
|
+
));
|
|
1884
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
1885
|
+
var MenubarContent = React36.forwardRef(
|
|
1886
|
+
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1887
|
+
MenubarPrimitive.Content,
|
|
1888
|
+
{
|
|
1889
|
+
ref,
|
|
1890
|
+
align,
|
|
1891
|
+
alignOffset,
|
|
1892
|
+
sideOffset,
|
|
1893
|
+
className: cn(
|
|
1894
|
+
"z-50 min-w-[12rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1895
|
+
className
|
|
1896
|
+
),
|
|
1897
|
+
...props
|
|
1898
|
+
}
|
|
1899
|
+
) })
|
|
1900
|
+
);
|
|
1901
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
1902
|
+
var MenubarItem = React36.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1903
|
+
MenubarPrimitive.Item,
|
|
1904
|
+
{
|
|
1905
|
+
ref,
|
|
1906
|
+
className: cn(
|
|
1907
|
+
"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1908
|
+
inset && "pl-8",
|
|
1909
|
+
className
|
|
1910
|
+
),
|
|
1911
|
+
...props
|
|
1912
|
+
}
|
|
1913
|
+
));
|
|
1914
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
1915
|
+
var MenubarCheckboxItem = React36.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1916
|
+
MenubarPrimitive.CheckboxItem,
|
|
1917
|
+
{
|
|
1918
|
+
ref,
|
|
1919
|
+
className: cn(
|
|
1920
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1921
|
+
className
|
|
1922
|
+
),
|
|
1923
|
+
checked,
|
|
1924
|
+
...props,
|
|
1925
|
+
children: [
|
|
1926
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1927
|
+
children
|
|
1928
|
+
]
|
|
1929
|
+
}
|
|
1930
|
+
));
|
|
1931
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
1932
|
+
var MenubarRadioItem = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1933
|
+
MenubarPrimitive.RadioItem,
|
|
1934
|
+
{
|
|
1935
|
+
ref,
|
|
1936
|
+
className: cn(
|
|
1937
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1938
|
+
className
|
|
1939
|
+
),
|
|
1940
|
+
...props,
|
|
1941
|
+
children: [
|
|
1942
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1943
|
+
children
|
|
1944
|
+
]
|
|
1945
|
+
}
|
|
1946
|
+
));
|
|
1947
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
1948
|
+
var MenubarLabel = React36.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1949
|
+
MenubarPrimitive.Label,
|
|
1950
|
+
{
|
|
1951
|
+
ref,
|
|
1952
|
+
className: cn(
|
|
1953
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1954
|
+
inset && "pl-8",
|
|
1955
|
+
className
|
|
1956
|
+
),
|
|
1957
|
+
...props
|
|
1958
|
+
}
|
|
1959
|
+
));
|
|
1960
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
1961
|
+
var MenubarSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1962
|
+
MenubarPrimitive.Separator,
|
|
1963
|
+
{
|
|
1964
|
+
ref,
|
|
1965
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1966
|
+
...props
|
|
1967
|
+
}
|
|
1968
|
+
));
|
|
1969
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
1970
|
+
var MenubarShortcut = ({
|
|
1971
|
+
className,
|
|
1972
|
+
...props
|
|
1973
|
+
}) => {
|
|
1974
|
+
return /* @__PURE__ */ jsx(
|
|
1975
|
+
"span",
|
|
1976
|
+
{
|
|
1977
|
+
className: cn(
|
|
1978
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1979
|
+
className
|
|
1980
|
+
),
|
|
1981
|
+
...props
|
|
1982
|
+
}
|
|
1983
|
+
);
|
|
1984
|
+
};
|
|
1985
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
1986
|
+
var MultiCombobox = React36.forwardRef(({
|
|
1987
|
+
options,
|
|
1988
|
+
placeholder = "Select options...",
|
|
1989
|
+
searchPlaceholder = "Search...",
|
|
1990
|
+
emptyMessage = "No options found.",
|
|
1991
|
+
className,
|
|
1992
|
+
contentClassName,
|
|
1993
|
+
value: controlledValue,
|
|
1994
|
+
onValueChange,
|
|
1995
|
+
onSelect,
|
|
1996
|
+
onCreate,
|
|
1997
|
+
maxDisplayedItems = 3,
|
|
1998
|
+
asChild,
|
|
1999
|
+
children
|
|
2000
|
+
}, ref) => {
|
|
2001
|
+
const [open, setOpen] = React36.useState(false);
|
|
2002
|
+
const [value, setValue] = React36.useState(controlledValue || []);
|
|
2003
|
+
const [search, setSearch] = React36.useState("");
|
|
2004
|
+
React36.useEffect(() => {
|
|
2005
|
+
if (controlledValue !== void 0) {
|
|
2006
|
+
setValue(controlledValue);
|
|
2007
|
+
}
|
|
2008
|
+
}, [controlledValue]);
|
|
2009
|
+
const handleSelect = React36.useCallback((currentValue) => {
|
|
2010
|
+
const newValue = value.includes(currentValue) ? value.filter((v) => v !== currentValue) : [...value, currentValue];
|
|
2011
|
+
setValue(newValue);
|
|
2012
|
+
onValueChange?.(newValue);
|
|
2013
|
+
onSelect?.(newValue);
|
|
2014
|
+
}, [value, onValueChange, onSelect]);
|
|
2015
|
+
const handleRemove = React36.useCallback((valueToRemove) => {
|
|
2016
|
+
const newValue = value.filter((v) => v !== valueToRemove);
|
|
2017
|
+
setValue(newValue);
|
|
2018
|
+
onValueChange?.(newValue);
|
|
2019
|
+
onSelect?.(newValue);
|
|
2020
|
+
}, [value, onValueChange, onSelect]);
|
|
2021
|
+
const selectedLabels = React36.useMemo(() => {
|
|
2022
|
+
return value.map((v) => options.find((opt) => opt.value === v)?.label).filter(Boolean);
|
|
2023
|
+
}, [value, options]);
|
|
2024
|
+
return /* @__PURE__ */ jsxs(Popover$1, { open, onOpenChange: setOpen, children: [
|
|
2025
|
+
/* @__PURE__ */ jsx(PopoverTrigger$1, { asChild: true, children: asChild ? children : /* @__PURE__ */ jsxs(
|
|
2026
|
+
Button,
|
|
2027
|
+
{
|
|
2028
|
+
variant: "outline",
|
|
2029
|
+
role: "combobox",
|
|
2030
|
+
"aria-expanded": open,
|
|
2031
|
+
className: cn("w-full justify-between", className),
|
|
2032
|
+
children: [
|
|
2033
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1 items-center", children: [
|
|
2034
|
+
value.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1", children: [
|
|
2035
|
+
selectedLabels.slice(0, maxDisplayedItems).map((label, index) => /* @__PURE__ */ jsxs(
|
|
2036
|
+
"div",
|
|
2037
|
+
{
|
|
2038
|
+
className: "flex items-center gap-1 bg-secondary px-2 py-0.5 rounded-md text-sm",
|
|
2039
|
+
children: [
|
|
2040
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
2041
|
+
/* @__PURE__ */ jsx(
|
|
2042
|
+
"div",
|
|
2043
|
+
{
|
|
2044
|
+
onClick: (e) => {
|
|
2045
|
+
e.stopPropagation();
|
|
2046
|
+
handleRemove(value[index]);
|
|
2047
|
+
},
|
|
2048
|
+
className: "hover:bg-secondary-foreground/20 rounded-sm",
|
|
2049
|
+
children: /* @__PURE__ */ jsx(Cross2Icon, { className: "h-3 w-3" })
|
|
2050
|
+
}
|
|
2051
|
+
)
|
|
2052
|
+
]
|
|
2053
|
+
},
|
|
2054
|
+
index
|
|
2055
|
+
)),
|
|
2056
|
+
selectedLabels.length > maxDisplayedItems && /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
2057
|
+
"+",
|
|
2058
|
+
selectedLabels.length - maxDisplayedItems,
|
|
2059
|
+
" more"
|
|
2060
|
+
] })
|
|
2061
|
+
] }),
|
|
2062
|
+
value.length === 0 && /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-normal", children: placeholder })
|
|
2063
|
+
] }),
|
|
2064
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "opacity-50" })
|
|
2065
|
+
]
|
|
2066
|
+
}
|
|
2067
|
+
) }),
|
|
2068
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: cn("w-full p-0 !rounded-xl border-none", contentClassName), children: /* @__PURE__ */ jsxs(Command, { className: "rounded-xl border", children: [
|
|
2069
|
+
/* @__PURE__ */ jsx(
|
|
2070
|
+
CommandInput,
|
|
2071
|
+
{
|
|
2072
|
+
placeholder: searchPlaceholder,
|
|
2073
|
+
className: "h-9 w-full",
|
|
2074
|
+
value: search,
|
|
2075
|
+
onValueChange: setSearch
|
|
2076
|
+
}
|
|
2077
|
+
),
|
|
2078
|
+
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
2079
|
+
/* @__PURE__ */ jsxs(CommandEmpty, { className: "flex flex-col gap-3 px-4 py-5", children: [
|
|
2080
|
+
!!onCreate && search && /* @__PURE__ */ jsxs(
|
|
2081
|
+
Button,
|
|
2082
|
+
{
|
|
2083
|
+
variant: "outline",
|
|
2084
|
+
size: "sm",
|
|
2085
|
+
onClick: () => {
|
|
2086
|
+
setOpen(false);
|
|
2087
|
+
onCreate(search);
|
|
2088
|
+
},
|
|
2089
|
+
children: [
|
|
2090
|
+
/* @__PURE__ */ jsx(PlusIcon, { className: "h-4 w-4" }),
|
|
2091
|
+
/* @__PURE__ */ jsxs("span", { className: "truncate", children: [
|
|
2092
|
+
'Create "',
|
|
2093
|
+
search,
|
|
2094
|
+
'"'
|
|
2095
|
+
] })
|
|
2096
|
+
]
|
|
2097
|
+
}
|
|
2098
|
+
),
|
|
2099
|
+
/* @__PURE__ */ jsx("span", { className: "text-center text-muted-foreground text-xs", children: "No results found" })
|
|
2100
|
+
] }),
|
|
2101
|
+
/* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
|
|
2102
|
+
CommandItem,
|
|
2103
|
+
{
|
|
2104
|
+
className: "rounded-lg",
|
|
2105
|
+
keywords: [option.label],
|
|
2106
|
+
value: option.value,
|
|
2107
|
+
onSelect: () => handleSelect(option.value),
|
|
2108
|
+
onKeyUp: (e) => e.key === "Enter" && handleSelect(option.value),
|
|
2109
|
+
onKeyDown: (e) => e.key === "Enter" && handleSelect(option.value),
|
|
2110
|
+
children: [
|
|
2111
|
+
option.label,
|
|
2112
|
+
/* @__PURE__ */ jsx(
|
|
2113
|
+
CheckIcon,
|
|
2114
|
+
{
|
|
2115
|
+
className: cn(
|
|
2116
|
+
"ml-auto",
|
|
2117
|
+
value.includes(option.value) ? "opacity-100" : "opacity-0"
|
|
2118
|
+
)
|
|
2119
|
+
}
|
|
2120
|
+
)
|
|
2121
|
+
]
|
|
2122
|
+
},
|
|
2123
|
+
option.value
|
|
2124
|
+
)) })
|
|
2125
|
+
] })
|
|
2126
|
+
] }) })
|
|
2127
|
+
] });
|
|
2128
|
+
});
|
|
2129
|
+
MultiCombobox.displayName = "MultiCombobox";
|
|
2130
|
+
var NavigationMenu = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2131
|
+
NavigationMenuPrimitive.Root,
|
|
2132
|
+
{
|
|
2133
|
+
ref,
|
|
2134
|
+
className: cn(
|
|
2135
|
+
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
2136
|
+
className
|
|
2137
|
+
),
|
|
2138
|
+
...props,
|
|
2139
|
+
children: [
|
|
2140
|
+
children,
|
|
2141
|
+
/* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
2142
|
+
]
|
|
2143
|
+
}
|
|
2144
|
+
));
|
|
2145
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
2146
|
+
var NavigationMenuList = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2147
|
+
NavigationMenuPrimitive.List,
|
|
2148
|
+
{
|
|
2149
|
+
ref,
|
|
2150
|
+
className: cn(
|
|
2151
|
+
"group flex flex-1 list-none items-center justify-center space-x-1",
|
|
2152
|
+
className
|
|
2153
|
+
),
|
|
2154
|
+
...props
|
|
2155
|
+
}
|
|
2156
|
+
));
|
|
2157
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
2158
|
+
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
2159
|
+
var navigationMenuTriggerStyle = cva(
|
|
2160
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-xl 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-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
|
|
2161
|
+
);
|
|
2162
|
+
var NavigationMenuTrigger = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2163
|
+
NavigationMenuPrimitive.Trigger,
|
|
2164
|
+
{
|
|
2165
|
+
ref,
|
|
2166
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
2167
|
+
...props,
|
|
2168
|
+
children: [
|
|
2169
|
+
children,
|
|
2170
|
+
" ",
|
|
2171
|
+
/* @__PURE__ */ jsx(
|
|
2172
|
+
ChevronDownIcon,
|
|
2173
|
+
{
|
|
2174
|
+
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
2175
|
+
"aria-hidden": "true"
|
|
2176
|
+
}
|
|
2177
|
+
)
|
|
2178
|
+
]
|
|
2179
|
+
}
|
|
2180
|
+
));
|
|
2181
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
2182
|
+
var NavigationMenuContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2183
|
+
NavigationMenuPrimitive.Content,
|
|
2184
|
+
{
|
|
2185
|
+
ref,
|
|
2186
|
+
className: cn(
|
|
2187
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
2188
|
+
className
|
|
2189
|
+
),
|
|
2190
|
+
...props
|
|
2191
|
+
}
|
|
2192
|
+
));
|
|
2193
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
2194
|
+
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
2195
|
+
var NavigationMenuViewport = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
|
|
2196
|
+
NavigationMenuPrimitive.Viewport,
|
|
2197
|
+
{
|
|
2198
|
+
className: cn(
|
|
2199
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
2200
|
+
className
|
|
2201
|
+
),
|
|
2202
|
+
ref,
|
|
2203
|
+
...props
|
|
2204
|
+
}
|
|
2205
|
+
) }));
|
|
2206
|
+
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
2207
|
+
var NavigationMenuIndicator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2208
|
+
NavigationMenuPrimitive.Indicator,
|
|
2209
|
+
{
|
|
2210
|
+
ref,
|
|
2211
|
+
className: cn(
|
|
2212
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
2213
|
+
className
|
|
2214
|
+
),
|
|
2215
|
+
...props,
|
|
2216
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
2217
|
+
}
|
|
2218
|
+
));
|
|
2219
|
+
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
2220
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
2221
|
+
"nav",
|
|
2222
|
+
{
|
|
2223
|
+
role: "navigation",
|
|
2224
|
+
"aria-label": "pagination",
|
|
2225
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
2226
|
+
...props
|
|
2227
|
+
}
|
|
2228
|
+
);
|
|
2229
|
+
Pagination.displayName = "Pagination";
|
|
2230
|
+
var PaginationContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2231
|
+
"ul",
|
|
2232
|
+
{
|
|
2233
|
+
ref,
|
|
2234
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
2235
|
+
...props
|
|
2236
|
+
}
|
|
2237
|
+
));
|
|
2238
|
+
PaginationContent.displayName = "PaginationContent";
|
|
2239
|
+
var PaginationItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("cursor-pointer", className), ...props }));
|
|
2240
|
+
PaginationItem.displayName = "PaginationItem";
|
|
2241
|
+
var PaginationLink = ({
|
|
2242
|
+
className,
|
|
2243
|
+
isActive,
|
|
2244
|
+
size = "icon",
|
|
2245
|
+
...props
|
|
2246
|
+
}) => /* @__PURE__ */ jsx(
|
|
2247
|
+
"a",
|
|
2248
|
+
{
|
|
2249
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2250
|
+
className: cn(
|
|
2251
|
+
buttonVariants({
|
|
2252
|
+
variant: isActive ? "outline" : "ghost",
|
|
2253
|
+
size
|
|
2254
|
+
}),
|
|
2255
|
+
className
|
|
2256
|
+
),
|
|
2257
|
+
...props
|
|
2258
|
+
}
|
|
2259
|
+
);
|
|
2260
|
+
PaginationLink.displayName = "PaginationLink";
|
|
2261
|
+
var PaginationPrevious = ({
|
|
2262
|
+
className,
|
|
2263
|
+
...props
|
|
2264
|
+
}) => /* @__PURE__ */ jsx(
|
|
2265
|
+
PaginationLink,
|
|
2266
|
+
{
|
|
2267
|
+
"aria-label": "Go to previous page",
|
|
2268
|
+
size: "default",
|
|
2269
|
+
className: cn("gap-1 cursor-pointer", className),
|
|
2270
|
+
...props,
|
|
2271
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "h-4 w-4" })
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2274
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
2275
|
+
var PaginationNext = ({
|
|
2276
|
+
className,
|
|
2277
|
+
...props
|
|
2278
|
+
}) => /* @__PURE__ */ jsx(
|
|
2279
|
+
PaginationLink,
|
|
2280
|
+
{
|
|
2281
|
+
"aria-label": "Go to next page",
|
|
2282
|
+
size: "default",
|
|
2283
|
+
className: cn("gap-1 cursor-pointer", className),
|
|
2284
|
+
...props,
|
|
2285
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-4 w-4" })
|
|
2286
|
+
}
|
|
2287
|
+
);
|
|
2288
|
+
PaginationNext.displayName = "PaginationNext";
|
|
2289
|
+
var PaginationEllipsis = ({
|
|
2290
|
+
className,
|
|
2291
|
+
...props
|
|
2292
|
+
}) => /* @__PURE__ */ jsxs(
|
|
2293
|
+
"span",
|
|
2294
|
+
{
|
|
2295
|
+
"aria-hidden": true,
|
|
2296
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
2297
|
+
...props,
|
|
2298
|
+
children: [
|
|
2299
|
+
/* @__PURE__ */ jsx(DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
2300
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
2301
|
+
]
|
|
2302
|
+
}
|
|
2303
|
+
);
|
|
2304
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
2305
|
+
var Progress = React36.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2306
|
+
ProgressPrimitive.Root,
|
|
2307
|
+
{
|
|
2308
|
+
ref,
|
|
2309
|
+
className: cn(
|
|
2310
|
+
"relative h-4 w-full overflow-hidden rounded-full bg-primary/20",
|
|
2311
|
+
className
|
|
2312
|
+
),
|
|
2313
|
+
...props,
|
|
2314
|
+
children: /* @__PURE__ */ jsx(
|
|
2315
|
+
ProgressPrimitive.Indicator,
|
|
2316
|
+
{
|
|
2317
|
+
className: "h-full w-full rounded-full flex-1 bg-primary transition-all",
|
|
2318
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2319
|
+
}
|
|
2320
|
+
)
|
|
2321
|
+
}
|
|
2322
|
+
));
|
|
2323
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2324
|
+
var RadioGroup4 = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2325
|
+
return /* @__PURE__ */ jsx(
|
|
2326
|
+
RadioGroupPrimitive.Root,
|
|
2327
|
+
{
|
|
2328
|
+
className: cn("grid gap-2", className),
|
|
2329
|
+
...props,
|
|
2330
|
+
ref
|
|
2331
|
+
}
|
|
2332
|
+
);
|
|
2333
|
+
});
|
|
2334
|
+
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2335
|
+
var RadioGroupItem = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2336
|
+
return /* @__PURE__ */ jsx(
|
|
2337
|
+
RadioGroupPrimitive.Item,
|
|
2338
|
+
{
|
|
2339
|
+
ref,
|
|
2340
|
+
className: cn(
|
|
2341
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
2342
|
+
className
|
|
2343
|
+
),
|
|
2344
|
+
...props,
|
|
2345
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-2.5 w-2.5 rounded-full bg-primary" }) })
|
|
2346
|
+
}
|
|
2347
|
+
);
|
|
2348
|
+
});
|
|
2349
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2350
|
+
var ResizablePanelGroup = ({
|
|
2351
|
+
className,
|
|
2352
|
+
...props
|
|
2353
|
+
}) => /* @__PURE__ */ jsx(
|
|
2354
|
+
ResizablePrimitive.PanelGroup,
|
|
2355
|
+
{
|
|
2356
|
+
className: cn(
|
|
2357
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
2358
|
+
className
|
|
2359
|
+
),
|
|
2360
|
+
...props
|
|
2361
|
+
}
|
|
2362
|
+
);
|
|
2363
|
+
var ResizablePanel = ResizablePrimitive.Panel;
|
|
2364
|
+
var ResizableHandle = ({
|
|
2365
|
+
withHandle,
|
|
2366
|
+
className,
|
|
2367
|
+
...props
|
|
2368
|
+
}) => /* @__PURE__ */ jsx(
|
|
2369
|
+
ResizablePrimitive.PanelResizeHandle,
|
|
2370
|
+
{
|
|
2371
|
+
className: cn(
|
|
2372
|
+
"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",
|
|
2373
|
+
className
|
|
2374
|
+
),
|
|
2375
|
+
...props,
|
|
2376
|
+
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(DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
|
|
2377
|
+
}
|
|
2378
|
+
);
|
|
2379
|
+
var ScrollArea = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2380
|
+
ScrollAreaPrimitive.Root,
|
|
2381
|
+
{
|
|
2382
|
+
ref,
|
|
2383
|
+
className: cn("relative overflow-hidden", className),
|
|
2384
|
+
...props,
|
|
2385
|
+
children: [
|
|
2386
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
2387
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
2388
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
2389
|
+
]
|
|
2390
|
+
}
|
|
2391
|
+
));
|
|
2392
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2393
|
+
var ScrollBar = React36.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2394
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2395
|
+
{
|
|
2396
|
+
ref,
|
|
2397
|
+
orientation,
|
|
2398
|
+
className: cn(
|
|
2399
|
+
"flex touch-none select-none transition-colors",
|
|
2400
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
2401
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
2402
|
+
className
|
|
2403
|
+
),
|
|
2404
|
+
...props,
|
|
2405
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
2406
|
+
}
|
|
2407
|
+
));
|
|
2408
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2409
|
+
var Select = SelectPrimitive.Root;
|
|
2410
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
2411
|
+
var SelectValue = SelectPrimitive.Value;
|
|
2412
|
+
var SelectTrigger = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2413
|
+
SelectPrimitive.Trigger,
|
|
2414
|
+
{
|
|
2415
|
+
ref,
|
|
2416
|
+
className: cn(
|
|
2417
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-border bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2418
|
+
className
|
|
2419
|
+
),
|
|
2420
|
+
...props,
|
|
2421
|
+
children: [
|
|
2422
|
+
children,
|
|
2423
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
2424
|
+
]
|
|
2425
|
+
}
|
|
2426
|
+
));
|
|
2427
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2428
|
+
var SelectScrollUpButton = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2429
|
+
SelectPrimitive.ScrollUpButton,
|
|
2430
|
+
{
|
|
2431
|
+
ref,
|
|
2432
|
+
className: cn(
|
|
2433
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2434
|
+
className
|
|
2435
|
+
),
|
|
2436
|
+
...props,
|
|
2437
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "h-4 w-4" })
|
|
2438
|
+
}
|
|
2439
|
+
));
|
|
2440
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2441
|
+
var SelectScrollDownButton = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2442
|
+
SelectPrimitive.ScrollDownButton,
|
|
2443
|
+
{
|
|
2444
|
+
ref,
|
|
2445
|
+
className: cn(
|
|
2446
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2447
|
+
className
|
|
2448
|
+
),
|
|
2449
|
+
...props,
|
|
2450
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4" })
|
|
2451
|
+
}
|
|
2452
|
+
));
|
|
2453
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2454
|
+
var SelectContent = React36.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2455
|
+
SelectPrimitive.Content,
|
|
2456
|
+
{
|
|
2457
|
+
ref,
|
|
2458
|
+
className: cn(
|
|
2459
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2460
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2461
|
+
className
|
|
2462
|
+
),
|
|
2463
|
+
position,
|
|
2464
|
+
...props,
|
|
2465
|
+
children: [
|
|
2466
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
2467
|
+
/* @__PURE__ */ jsx(
|
|
2468
|
+
SelectPrimitive.Viewport,
|
|
2469
|
+
{
|
|
2470
|
+
className: cn(
|
|
2471
|
+
"p-1",
|
|
2472
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
2473
|
+
),
|
|
2474
|
+
children
|
|
2475
|
+
}
|
|
2476
|
+
),
|
|
2477
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
2478
|
+
]
|
|
2479
|
+
}
|
|
2480
|
+
) }));
|
|
2481
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2482
|
+
var SelectLabel = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2483
|
+
SelectPrimitive.Label,
|
|
2484
|
+
{
|
|
2485
|
+
ref,
|
|
2486
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
2487
|
+
...props
|
|
2488
|
+
}
|
|
2489
|
+
));
|
|
2490
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2491
|
+
var SelectItem = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2492
|
+
SelectPrimitive.Item,
|
|
2493
|
+
{
|
|
2494
|
+
ref,
|
|
2495
|
+
className: cn(
|
|
2496
|
+
"relative flex w-full cursor-default select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-secondary/50 dark:focus:bg-secondary/25 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2497
|
+
className
|
|
2498
|
+
),
|
|
2499
|
+
...props,
|
|
2500
|
+
children: [
|
|
2501
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
2502
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
2503
|
+
]
|
|
2504
|
+
}
|
|
2505
|
+
));
|
|
2506
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2507
|
+
var SelectSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2508
|
+
SelectPrimitive.Separator,
|
|
2509
|
+
{
|
|
2510
|
+
ref,
|
|
2511
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2512
|
+
...props
|
|
2513
|
+
}
|
|
2514
|
+
));
|
|
2515
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2516
|
+
var Separator5 = React36.forwardRef(
|
|
2517
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2518
|
+
SeparatorPrimitive.Root,
|
|
2519
|
+
{
|
|
2520
|
+
ref,
|
|
2521
|
+
decorative,
|
|
2522
|
+
orientation,
|
|
2523
|
+
className: cn(
|
|
2524
|
+
"shrink-0 bg-border",
|
|
2525
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
2526
|
+
className
|
|
2527
|
+
),
|
|
2528
|
+
...props
|
|
2529
|
+
}
|
|
2530
|
+
)
|
|
2531
|
+
);
|
|
2532
|
+
Separator5.displayName = SeparatorPrimitive.Root.displayName;
|
|
2533
|
+
var Sheet = DialogPrimitive.Root;
|
|
2534
|
+
var SheetTrigger = DialogPrimitive.Trigger;
|
|
2535
|
+
var SheetClose = DialogPrimitive.Close;
|
|
2536
|
+
var SheetPortal = DialogPrimitive.Portal;
|
|
2537
|
+
var SheetOverlay = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2538
|
+
DialogPrimitive.Overlay,
|
|
2539
|
+
{
|
|
2540
|
+
className: cn(
|
|
2541
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2542
|
+
className
|
|
2543
|
+
),
|
|
2544
|
+
...props,
|
|
2545
|
+
ref
|
|
2546
|
+
}
|
|
2547
|
+
));
|
|
2548
|
+
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2549
|
+
var sheetVariants = cva(
|
|
2550
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2551
|
+
{
|
|
2552
|
+
variants: {
|
|
2553
|
+
side: {
|
|
2554
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
2555
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
2556
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
2557
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
defaultVariants: {
|
|
2561
|
+
side: "right"
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
);
|
|
2565
|
+
var SheetContent = React36.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
2566
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
2567
|
+
/* @__PURE__ */ jsxs(
|
|
2568
|
+
DialogPrimitive.Content,
|
|
2569
|
+
{
|
|
2570
|
+
ref,
|
|
2571
|
+
className: cn(sheetVariants({ side }), className),
|
|
2572
|
+
...props,
|
|
2573
|
+
children: [
|
|
2574
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "group-[.no-close]:hidden absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
2575
|
+
/* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" }),
|
|
2576
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
2577
|
+
] }),
|
|
2578
|
+
children
|
|
2579
|
+
]
|
|
2580
|
+
}
|
|
2581
|
+
)
|
|
2582
|
+
] }));
|
|
2583
|
+
SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
2584
|
+
var SheetHeader = ({
|
|
2585
|
+
className,
|
|
2586
|
+
...props
|
|
2587
|
+
}) => /* @__PURE__ */ jsx(
|
|
2588
|
+
"div",
|
|
2589
|
+
{
|
|
2590
|
+
className: cn(
|
|
2591
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
2592
|
+
className
|
|
2593
|
+
),
|
|
2594
|
+
...props
|
|
2595
|
+
}
|
|
2596
|
+
);
|
|
2597
|
+
SheetHeader.displayName = "SheetHeader";
|
|
2598
|
+
var SheetFooter = ({
|
|
2599
|
+
className,
|
|
2600
|
+
...props
|
|
2601
|
+
}) => /* @__PURE__ */ jsx(
|
|
2602
|
+
"div",
|
|
2603
|
+
{
|
|
2604
|
+
className: cn(
|
|
2605
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
2606
|
+
className
|
|
2607
|
+
),
|
|
2608
|
+
...props
|
|
2609
|
+
}
|
|
2610
|
+
);
|
|
2611
|
+
SheetFooter.displayName = "SheetFooter";
|
|
2612
|
+
var SheetTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2613
|
+
DialogPrimitive.Title,
|
|
2614
|
+
{
|
|
2615
|
+
ref,
|
|
2616
|
+
className: cn("text-lg font-semibold text-text-brand-primary", className),
|
|
2617
|
+
...props
|
|
2618
|
+
}
|
|
2619
|
+
));
|
|
2620
|
+
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2621
|
+
var SheetDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2622
|
+
DialogPrimitive.Description,
|
|
2623
|
+
{
|
|
2624
|
+
ref,
|
|
2625
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2626
|
+
...props
|
|
2627
|
+
}
|
|
2628
|
+
));
|
|
2629
|
+
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2630
|
+
var MOBILE_BREAKPOINT = 768;
|
|
2631
|
+
function useIsMobile() {
|
|
2632
|
+
const [isMobile, setIsMobile] = React36.useState(
|
|
2633
|
+
void 0
|
|
2634
|
+
);
|
|
2635
|
+
React36.useEffect(() => {
|
|
2636
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
2637
|
+
const onChange = () => {
|
|
2638
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
2639
|
+
};
|
|
2640
|
+
mql.addEventListener("change", onChange);
|
|
2641
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
2642
|
+
return () => mql.removeEventListener("change", onChange);
|
|
2643
|
+
}, []);
|
|
2644
|
+
return !!isMobile;
|
|
2645
|
+
}
|
|
2646
|
+
function Skeleton({
|
|
2647
|
+
className,
|
|
2648
|
+
...props
|
|
2649
|
+
}) {
|
|
2650
|
+
return /* @__PURE__ */ jsx(
|
|
2651
|
+
"div",
|
|
2652
|
+
{
|
|
2653
|
+
className: cn("animate-pulse rounded-md bg-secondary dark:bg-secondary/25", className),
|
|
2654
|
+
...props
|
|
2655
|
+
}
|
|
2656
|
+
);
|
|
2657
|
+
}
|
|
2658
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2659
|
+
var Tooltip2 = TooltipPrimitive.Root;
|
|
2660
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2661
|
+
var TooltipContent = React36.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
2662
|
+
TooltipPrimitive.Content,
|
|
2663
|
+
{
|
|
2664
|
+
ref,
|
|
2665
|
+
sideOffset,
|
|
2666
|
+
className: cn(
|
|
2667
|
+
"z-50 overflow-hidden rounded-xl shadow-md bg-background border border-border px-3 py-1.5 text-xs text-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2668
|
+
className
|
|
2669
|
+
),
|
|
2670
|
+
...props
|
|
2671
|
+
}
|
|
2672
|
+
) }));
|
|
2673
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2674
|
+
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
2675
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2676
|
+
var SIDEBAR_WIDTH = "240px";
|
|
2677
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2678
|
+
var SIDEBAR_WIDTH_ICON = "90px";
|
|
2679
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
2680
|
+
var SidebarContext = React36.createContext(null);
|
|
2681
|
+
function useSidebar() {
|
|
2682
|
+
const context = React36.useContext(SidebarContext);
|
|
2683
|
+
if (!context) {
|
|
2684
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2685
|
+
}
|
|
2686
|
+
return context;
|
|
2687
|
+
}
|
|
2688
|
+
var SidebarProvider = React36.forwardRef(
|
|
2689
|
+
({
|
|
2690
|
+
defaultOpen = false,
|
|
2691
|
+
open: openProp,
|
|
2692
|
+
onOpenChange: setOpenProp,
|
|
2693
|
+
className,
|
|
2694
|
+
style,
|
|
2695
|
+
children,
|
|
2696
|
+
...props
|
|
2697
|
+
}, ref) => {
|
|
2698
|
+
const isMobile = useIsMobile();
|
|
2699
|
+
const [openMobile, setOpenMobile] = React36.useState(false);
|
|
2700
|
+
const [_open, _setOpen] = React36.useState(defaultOpen);
|
|
2701
|
+
const open = openProp ?? _open;
|
|
2702
|
+
const setOpen = React36.useCallback(
|
|
2703
|
+
(value) => {
|
|
2704
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
2705
|
+
if (setOpenProp) {
|
|
2706
|
+
setOpenProp(openState);
|
|
2707
|
+
} else {
|
|
2708
|
+
_setOpen(openState);
|
|
2709
|
+
}
|
|
2710
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
2711
|
+
},
|
|
2712
|
+
[setOpenProp, open]
|
|
2713
|
+
);
|
|
2714
|
+
const toggleSidebar = React36.useCallback(() => {
|
|
2715
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
2716
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
2717
|
+
React36.useEffect(() => {
|
|
2718
|
+
const handleKeyDown = (event) => {
|
|
2719
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
2720
|
+
event.preventDefault();
|
|
2721
|
+
toggleSidebar();
|
|
2722
|
+
}
|
|
2723
|
+
};
|
|
2724
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
2725
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2726
|
+
}, [toggleSidebar]);
|
|
2727
|
+
const state = open ? "expanded" : "collapsed";
|
|
2728
|
+
const contextValue = React36.useMemo(
|
|
2729
|
+
() => ({
|
|
2730
|
+
state,
|
|
2731
|
+
open,
|
|
2732
|
+
setOpen,
|
|
2733
|
+
isMobile,
|
|
2734
|
+
openMobile,
|
|
2735
|
+
setOpenMobile,
|
|
2736
|
+
toggleSidebar
|
|
2737
|
+
}),
|
|
2738
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
2739
|
+
);
|
|
2740
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
2741
|
+
"div",
|
|
2742
|
+
{
|
|
2743
|
+
style: {
|
|
2744
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2745
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2746
|
+
...style
|
|
2747
|
+
},
|
|
2748
|
+
className: cn(
|
|
2749
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
2750
|
+
className
|
|
2751
|
+
),
|
|
2752
|
+
ref,
|
|
2753
|
+
...props,
|
|
2754
|
+
children
|
|
2755
|
+
}
|
|
2756
|
+
) }) });
|
|
2757
|
+
}
|
|
2758
|
+
);
|
|
2759
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
2760
|
+
var Sidebar = React36.forwardRef(
|
|
2761
|
+
({
|
|
2762
|
+
side = "left",
|
|
2763
|
+
variant = "sidebar",
|
|
2764
|
+
collapsible = "offcanvas",
|
|
2765
|
+
className,
|
|
2766
|
+
children,
|
|
2767
|
+
...props
|
|
2768
|
+
}, ref) => {
|
|
2769
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
2770
|
+
if (collapsible === "none") {
|
|
2771
|
+
return /* @__PURE__ */ jsx(
|
|
2772
|
+
"div",
|
|
2773
|
+
{
|
|
2774
|
+
className: cn(
|
|
2775
|
+
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
2776
|
+
className
|
|
2777
|
+
),
|
|
2778
|
+
ref,
|
|
2779
|
+
...props,
|
|
2780
|
+
children
|
|
2781
|
+
}
|
|
2782
|
+
);
|
|
2783
|
+
}
|
|
2784
|
+
if (isMobile) {
|
|
2785
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
2786
|
+
SheetContent,
|
|
2787
|
+
{
|
|
2788
|
+
"data-sidebar": "sidebar",
|
|
2789
|
+
"data-mobile": "true",
|
|
2790
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
2791
|
+
style: {
|
|
2792
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
2793
|
+
},
|
|
2794
|
+
side,
|
|
2795
|
+
children: [
|
|
2796
|
+
/* @__PURE__ */ jsx(SheetTitle, { className: "sr-only" }),
|
|
2797
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
2798
|
+
]
|
|
2799
|
+
}
|
|
2800
|
+
) });
|
|
2801
|
+
}
|
|
2802
|
+
return /* @__PURE__ */ jsxs(
|
|
2803
|
+
"div",
|
|
2804
|
+
{
|
|
2805
|
+
ref,
|
|
2806
|
+
className: "group peer hidden md:block text-sidebar-foreground",
|
|
2807
|
+
"data-state": state,
|
|
2808
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2809
|
+
"data-variant": variant,
|
|
2810
|
+
"data-side": side,
|
|
2811
|
+
children: [
|
|
2812
|
+
/* @__PURE__ */ jsx(
|
|
2813
|
+
"div",
|
|
2814
|
+
{
|
|
2815
|
+
className: cn(
|
|
2816
|
+
"duration-100 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
|
|
2817
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
2818
|
+
"group-data-[side=right]:rotate-180",
|
|
2819
|
+
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]"
|
|
2820
|
+
)
|
|
2821
|
+
}
|
|
2822
|
+
),
|
|
2823
|
+
/* @__PURE__ */ jsx(
|
|
2824
|
+
"div",
|
|
2825
|
+
{
|
|
2826
|
+
className: cn(
|
|
2827
|
+
"duration-100 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
|
|
2828
|
+
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)]",
|
|
2829
|
+
// Adjust the padding for floating and inset variants.
|
|
2830
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "px-4 py-7 group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
2831
|
+
className
|
|
2832
|
+
),
|
|
2833
|
+
...props,
|
|
2834
|
+
children: /* @__PURE__ */ jsx(
|
|
2835
|
+
"div",
|
|
2836
|
+
{
|
|
2837
|
+
"data-sidebar": "sidebar",
|
|
2838
|
+
className: "flex h-full w-full flex-col bg-background group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
2839
|
+
children
|
|
2840
|
+
}
|
|
2841
|
+
)
|
|
2842
|
+
}
|
|
2843
|
+
)
|
|
2844
|
+
]
|
|
2845
|
+
}
|
|
2846
|
+
);
|
|
2847
|
+
}
|
|
2848
|
+
);
|
|
2849
|
+
Sidebar.displayName = "Sidebar";
|
|
2850
|
+
var SidebarTrigger = React36.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
2851
|
+
const { toggleSidebar } = useSidebar();
|
|
2852
|
+
return /* @__PURE__ */ jsxs(
|
|
2853
|
+
Button,
|
|
2854
|
+
{
|
|
2855
|
+
ref,
|
|
2856
|
+
"data-sidebar": "trigger",
|
|
2857
|
+
variant: "ghost",
|
|
2858
|
+
size: "icon",
|
|
2859
|
+
className: cn("h-7 w-7", className),
|
|
2860
|
+
onClick: (event) => {
|
|
2861
|
+
onClick?.(event);
|
|
2862
|
+
toggleSidebar();
|
|
2863
|
+
},
|
|
2864
|
+
...props,
|
|
2865
|
+
children: [
|
|
2866
|
+
/* @__PURE__ */ jsx(ViewVerticalIcon, {}),
|
|
2867
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
2868
|
+
]
|
|
2869
|
+
}
|
|
2870
|
+
);
|
|
2871
|
+
});
|
|
2872
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
2873
|
+
var SidebarRail = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2874
|
+
const { toggleSidebar } = useSidebar();
|
|
2875
|
+
return /* @__PURE__ */ jsx(
|
|
2876
|
+
"button",
|
|
2877
|
+
{
|
|
2878
|
+
ref,
|
|
2879
|
+
"data-sidebar": "rail",
|
|
2880
|
+
"aria-label": "Toggle Sidebar",
|
|
2881
|
+
tabIndex: -1,
|
|
2882
|
+
onClick: toggleSidebar,
|
|
2883
|
+
title: "Toggle Sidebar",
|
|
2884
|
+
className: cn(
|
|
2885
|
+
"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",
|
|
2886
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
2887
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
2888
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-primary-foreground/25",
|
|
2889
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
2890
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
2891
|
+
className
|
|
2892
|
+
),
|
|
2893
|
+
...props
|
|
2894
|
+
}
|
|
2895
|
+
);
|
|
2896
|
+
});
|
|
2897
|
+
SidebarRail.displayName = "SidebarRail";
|
|
2898
|
+
var SidebarInset = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2899
|
+
return /* @__PURE__ */ jsx(
|
|
2900
|
+
"main",
|
|
2901
|
+
{
|
|
2902
|
+
ref,
|
|
2903
|
+
className: cn(
|
|
2904
|
+
"relative flex min-h-svh flex-1 flex-col bg-primary-foreground/75 ",
|
|
2905
|
+
" peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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",
|
|
2906
|
+
className
|
|
2907
|
+
),
|
|
2908
|
+
...props
|
|
2909
|
+
}
|
|
2910
|
+
);
|
|
2911
|
+
});
|
|
2912
|
+
SidebarInset.displayName = "SidebarInset";
|
|
2913
|
+
var SidebarInput = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2914
|
+
return /* @__PURE__ */ jsx(
|
|
2915
|
+
Input,
|
|
2916
|
+
{
|
|
2917
|
+
ref,
|
|
2918
|
+
"data-sidebar": "input",
|
|
2919
|
+
className: cn(
|
|
2920
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
2921
|
+
className
|
|
2922
|
+
),
|
|
2923
|
+
...props
|
|
2924
|
+
}
|
|
2925
|
+
);
|
|
2926
|
+
});
|
|
2927
|
+
SidebarInput.displayName = "SidebarInput";
|
|
2928
|
+
var SidebarHeader = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2929
|
+
return /* @__PURE__ */ jsx(
|
|
2930
|
+
"div",
|
|
2931
|
+
{
|
|
2932
|
+
ref,
|
|
2933
|
+
"data-sidebar": "header",
|
|
2934
|
+
className: cn("flex flex-col gap-2", className),
|
|
2935
|
+
...props
|
|
2936
|
+
}
|
|
2937
|
+
);
|
|
2938
|
+
});
|
|
2939
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
2940
|
+
var SidebarFooter = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2941
|
+
return /* @__PURE__ */ jsx(
|
|
2942
|
+
"div",
|
|
2943
|
+
{
|
|
2944
|
+
ref,
|
|
2945
|
+
"data-sidebar": "footer",
|
|
2946
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
2947
|
+
...props
|
|
2948
|
+
}
|
|
2949
|
+
);
|
|
2950
|
+
});
|
|
2951
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
2952
|
+
var SidebarSeparator = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2953
|
+
return /* @__PURE__ */ jsx(
|
|
2954
|
+
Separator5,
|
|
2955
|
+
{
|
|
2956
|
+
ref,
|
|
2957
|
+
"data-sidebar": "separator",
|
|
2958
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
2959
|
+
...props
|
|
2960
|
+
}
|
|
2961
|
+
);
|
|
2962
|
+
});
|
|
2963
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
2964
|
+
var SidebarContent = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2965
|
+
return /* @__PURE__ */ jsx(
|
|
2966
|
+
"div",
|
|
2967
|
+
{
|
|
2968
|
+
ref,
|
|
2969
|
+
"data-sidebar": "content",
|
|
2970
|
+
className: cn(
|
|
2971
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2972
|
+
className
|
|
2973
|
+
),
|
|
2974
|
+
...props
|
|
2975
|
+
}
|
|
2976
|
+
);
|
|
2977
|
+
});
|
|
2978
|
+
SidebarContent.displayName = "SidebarContent";
|
|
2979
|
+
var SidebarGroup = React36.forwardRef(({ className, ...props }, ref) => {
|
|
2980
|
+
return /* @__PURE__ */ jsx(
|
|
2981
|
+
"div",
|
|
2982
|
+
{
|
|
2983
|
+
ref,
|
|
2984
|
+
"data-sidebar": "group",
|
|
2985
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2986
|
+
...props
|
|
2987
|
+
}
|
|
2988
|
+
);
|
|
2989
|
+
});
|
|
2990
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
2991
|
+
var SidebarGroupLabel = React36.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2992
|
+
const Comp = asChild ? Slot : "div";
|
|
2993
|
+
return /* @__PURE__ */ jsx(
|
|
2994
|
+
Comp,
|
|
2995
|
+
{
|
|
2996
|
+
ref,
|
|
2997
|
+
"data-sidebar": "group-label",
|
|
2998
|
+
className: cn(
|
|
2999
|
+
"duration-200 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,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3000
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
3001
|
+
className
|
|
3002
|
+
),
|
|
3003
|
+
...props
|
|
3004
|
+
}
|
|
3005
|
+
);
|
|
3006
|
+
});
|
|
3007
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
3008
|
+
var SidebarGroupAction = React36.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3009
|
+
const Comp = asChild ? Slot : "button";
|
|
3010
|
+
return /* @__PURE__ */ jsx(
|
|
3011
|
+
Comp,
|
|
3012
|
+
{
|
|
3013
|
+
ref,
|
|
3014
|
+
"data-sidebar": "group-action",
|
|
3015
|
+
className: cn(
|
|
3016
|
+
"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-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3017
|
+
// Increases the hit area of the button on mobile.
|
|
3018
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3019
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3020
|
+
className
|
|
3021
|
+
),
|
|
3022
|
+
...props
|
|
3023
|
+
}
|
|
3024
|
+
);
|
|
3025
|
+
});
|
|
3026
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
3027
|
+
var SidebarGroupContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3028
|
+
"div",
|
|
3029
|
+
{
|
|
3030
|
+
ref,
|
|
3031
|
+
"data-sidebar": "group-content",
|
|
3032
|
+
className: cn("w-full text-sm", className),
|
|
3033
|
+
...props
|
|
3034
|
+
}
|
|
3035
|
+
));
|
|
3036
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
3037
|
+
var SidebarMenu = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3038
|
+
"ul",
|
|
3039
|
+
{
|
|
3040
|
+
ref,
|
|
3041
|
+
"data-sidebar": "menu",
|
|
3042
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
3043
|
+
...props
|
|
3044
|
+
}
|
|
3045
|
+
));
|
|
3046
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
3047
|
+
var SidebarMenuItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3048
|
+
"li",
|
|
3049
|
+
{
|
|
3050
|
+
ref,
|
|
3051
|
+
"data-sidebar": "menu-item",
|
|
3052
|
+
className: cn("group/menu-item relative", className),
|
|
3053
|
+
...props
|
|
3054
|
+
}
|
|
3055
|
+
));
|
|
3056
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
3057
|
+
var sidebarMenuButtonVariants = cva(
|
|
3058
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-secondary/50 dark:hover:bg-secondary/25 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-background-secondary-light dark:data-[active=true]:bg-background-secondary-light data-[active=true]:font-medium data-[active=true]:text-text-brand-primary data-[state=open]:hover:bg-primary-foreground data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3059
|
+
{
|
|
3060
|
+
variants: {
|
|
3061
|
+
variant: {
|
|
3062
|
+
default: "hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground",
|
|
3063
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
3064
|
+
},
|
|
3065
|
+
size: {
|
|
3066
|
+
default: "h-8 text-sm",
|
|
3067
|
+
sm: "h-7 text-xs",
|
|
3068
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
3069
|
+
}
|
|
3070
|
+
},
|
|
3071
|
+
defaultVariants: {
|
|
3072
|
+
variant: "default",
|
|
3073
|
+
size: "default"
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
);
|
|
3077
|
+
var SidebarMenuButton = React36.forwardRef(
|
|
3078
|
+
({
|
|
3079
|
+
asChild = false,
|
|
3080
|
+
isActive = false,
|
|
3081
|
+
variant = "default",
|
|
3082
|
+
size = "default",
|
|
3083
|
+
tooltip,
|
|
3084
|
+
className,
|
|
3085
|
+
...props
|
|
3086
|
+
}, ref) => {
|
|
3087
|
+
const Comp = asChild ? Slot : "button";
|
|
3088
|
+
const { isMobile, state } = useSidebar();
|
|
3089
|
+
const button = /* @__PURE__ */ jsx(
|
|
3090
|
+
Comp,
|
|
3091
|
+
{
|
|
3092
|
+
ref,
|
|
3093
|
+
"data-sidebar": "menu-button",
|
|
3094
|
+
"data-size": size,
|
|
3095
|
+
"data-active": isActive,
|
|
3096
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
3097
|
+
...props
|
|
3098
|
+
}
|
|
3099
|
+
);
|
|
3100
|
+
if (!tooltip) {
|
|
3101
|
+
return button;
|
|
3102
|
+
}
|
|
3103
|
+
if (typeof tooltip === "string") {
|
|
3104
|
+
tooltip = {
|
|
3105
|
+
children: tooltip
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3108
|
+
return /* @__PURE__ */ jsxs(Tooltip2, { children: [
|
|
3109
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
3110
|
+
/* @__PURE__ */ jsx(
|
|
3111
|
+
TooltipContent,
|
|
3112
|
+
{
|
|
3113
|
+
side: "right",
|
|
3114
|
+
align: "center",
|
|
3115
|
+
hidden: state !== "collapsed" || isMobile,
|
|
3116
|
+
...tooltip
|
|
3117
|
+
}
|
|
3118
|
+
)
|
|
3119
|
+
] });
|
|
3120
|
+
}
|
|
3121
|
+
);
|
|
3122
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
3123
|
+
var SidebarMenuAction = React36.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
3124
|
+
const Comp = asChild ? Slot : "button";
|
|
3125
|
+
return /* @__PURE__ */ jsx(
|
|
3126
|
+
Comp,
|
|
3127
|
+
{
|
|
3128
|
+
ref,
|
|
3129
|
+
"data-sidebar": "menu-action",
|
|
3130
|
+
className: cn(
|
|
3131
|
+
"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-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3132
|
+
// Increases the hit area of the button on mobile.
|
|
3133
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3134
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3135
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3136
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3137
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3138
|
+
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",
|
|
3139
|
+
className
|
|
3140
|
+
),
|
|
3141
|
+
...props
|
|
3142
|
+
}
|
|
3143
|
+
);
|
|
3144
|
+
});
|
|
3145
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
3146
|
+
var SidebarMenuBadge = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3147
|
+
"div",
|
|
3148
|
+
{
|
|
3149
|
+
ref,
|
|
3150
|
+
"data-sidebar": "menu-badge",
|
|
3151
|
+
className: cn(
|
|
3152
|
+
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
|
|
3153
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
3154
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3155
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3156
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3157
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3158
|
+
className
|
|
3159
|
+
),
|
|
3160
|
+
...props
|
|
3161
|
+
}
|
|
3162
|
+
));
|
|
3163
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
3164
|
+
var SidebarMenuSkeleton = React36.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
3165
|
+
const width = React36.useMemo(() => {
|
|
3166
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3167
|
+
}, []);
|
|
3168
|
+
return /* @__PURE__ */ jsxs(
|
|
3169
|
+
"div",
|
|
3170
|
+
{
|
|
3171
|
+
ref,
|
|
3172
|
+
"data-sidebar": "menu-skeleton",
|
|
3173
|
+
className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
|
|
3174
|
+
...props,
|
|
3175
|
+
children: [
|
|
3176
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
3177
|
+
Skeleton,
|
|
3178
|
+
{
|
|
3179
|
+
className: "size-4 rounded-md",
|
|
3180
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
3181
|
+
}
|
|
3182
|
+
),
|
|
3183
|
+
/* @__PURE__ */ jsx(
|
|
3184
|
+
Skeleton,
|
|
3185
|
+
{
|
|
3186
|
+
className: "h-4 flex-1 max-w-[--skeleton-width]",
|
|
3187
|
+
"data-sidebar": "menu-skeleton-text",
|
|
3188
|
+
style: {
|
|
3189
|
+
"--skeleton-width": width
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
)
|
|
3193
|
+
]
|
|
3194
|
+
}
|
|
3195
|
+
);
|
|
3196
|
+
});
|
|
3197
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
3198
|
+
var SidebarMenuSub = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3199
|
+
"ul",
|
|
3200
|
+
{
|
|
3201
|
+
ref,
|
|
3202
|
+
"data-sidebar": "menu-sub",
|
|
3203
|
+
className: cn(
|
|
3204
|
+
"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",
|
|
3205
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3206
|
+
className
|
|
3207
|
+
),
|
|
3208
|
+
...props
|
|
3209
|
+
}
|
|
3210
|
+
));
|
|
3211
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
3212
|
+
var SidebarMenuSubItem = React36.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
|
|
3213
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
3214
|
+
var SidebarMenuSubButton = React36.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
3215
|
+
const Comp = asChild ? Slot : "a";
|
|
3216
|
+
return /* @__PURE__ */ jsx(
|
|
3217
|
+
Comp,
|
|
3218
|
+
{
|
|
3219
|
+
ref,
|
|
3220
|
+
"data-sidebar": "menu-sub-button",
|
|
3221
|
+
"data-size": size,
|
|
3222
|
+
"data-active": isActive,
|
|
3223
|
+
className: cn(
|
|
3224
|
+
"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-secondary/50 dark:hover:bg-secondary/25 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",
|
|
3225
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
3226
|
+
size === "sm" && "text-xs",
|
|
3227
|
+
size === "md" && "text-sm",
|
|
3228
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3229
|
+
className
|
|
3230
|
+
),
|
|
3231
|
+
...props
|
|
3232
|
+
}
|
|
3233
|
+
);
|
|
3234
|
+
});
|
|
3235
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
3236
|
+
var Slider = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3237
|
+
SliderPrimitive.Root,
|
|
3238
|
+
{
|
|
3239
|
+
ref,
|
|
3240
|
+
className: cn(
|
|
3241
|
+
"relative flex w-full touch-none select-none items-center",
|
|
3242
|
+
className
|
|
3243
|
+
),
|
|
3244
|
+
...props,
|
|
3245
|
+
children: [
|
|
3246
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
3247
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
3248
|
+
]
|
|
3249
|
+
}
|
|
3250
|
+
));
|
|
3251
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3252
|
+
var Toaster = ({ ...props }) => {
|
|
3253
|
+
const { theme = "system" } = useTheme();
|
|
3254
|
+
return /* @__PURE__ */ jsx(
|
|
3255
|
+
Toaster$1,
|
|
3256
|
+
{
|
|
3257
|
+
theme,
|
|
3258
|
+
className: "toaster group",
|
|
3259
|
+
icons: {
|
|
3260
|
+
error: /* @__PURE__ */ jsx(XCircle, { className: "text-danger-foreground", size: 32 }),
|
|
3261
|
+
warning: /* @__PURE__ */ jsx(WarningCircle$1, { className: "text-warning-foreground", size: 32 }),
|
|
3262
|
+
info: /* @__PURE__ */ jsx(WarningCircle$1, { className: "text-foreground", size: 32 }),
|
|
3263
|
+
success: /* @__PURE__ */ jsx(CheckCircle, { className: "text-success-foreground", size: 32 })
|
|
3264
|
+
},
|
|
3265
|
+
toastOptions: {
|
|
3266
|
+
classNames: {
|
|
3267
|
+
success: "group-[.toaster]:bg-success group-[.toaster]:border-success-border ",
|
|
3268
|
+
error: "group-[.toaster]:bg-danger group-[.toaster]:border-danger-border",
|
|
3269
|
+
warning: "group-[.toaster]:bg-warning group-[.toaster]:border-warning-border",
|
|
3270
|
+
icon: "icon min-w-8 h-8 mr-0",
|
|
3271
|
+
toast: "group toast group-[.toaster]:bg-background p-6 gap-4 flex group-[.toaster]:border-border group-[.toast]:text-primary-foreground group-[.toaster]:shadow-lg",
|
|
3272
|
+
content: "flex-1 gap-1",
|
|
3273
|
+
title: "font-bold text-sm",
|
|
3274
|
+
description: "group-[.toast]:text-foreground text-sm",
|
|
3275
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
3276
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
3277
|
+
}
|
|
3278
|
+
},
|
|
3279
|
+
...props
|
|
3280
|
+
}
|
|
3281
|
+
);
|
|
3282
|
+
};
|
|
3283
|
+
var Spinner = ({ className, size = 24, strokeWidth = 80, text, textClassName }) => {
|
|
3284
|
+
const gradientId = useId();
|
|
3285
|
+
const patternId = useId();
|
|
3286
|
+
return /* @__PURE__ */ jsxs(
|
|
3287
|
+
"span",
|
|
3288
|
+
{
|
|
3289
|
+
className: `${className} flex justify-center items-center rounded-full aspect-square relative`,
|
|
3290
|
+
style: {
|
|
3291
|
+
width: size,
|
|
3292
|
+
height: size,
|
|
3293
|
+
minWidth: size,
|
|
3294
|
+
minHeight: size,
|
|
3295
|
+
boxShadow: `inset 0 0 0 ${size / 6}px hsl(var(--muted))`
|
|
3296
|
+
},
|
|
3297
|
+
children: [
|
|
3298
|
+
text && /* @__PURE__ */ jsx(
|
|
3299
|
+
"span",
|
|
3300
|
+
{
|
|
3301
|
+
className: `absolute font-bold inset-0 flex items-center justify-center ${textClassName}`,
|
|
3302
|
+
style: {
|
|
3303
|
+
fontSize: `${size * 0.15}px`,
|
|
3304
|
+
lineHeight: 1
|
|
3305
|
+
},
|
|
3306
|
+
children: text
|
|
3307
|
+
}
|
|
3308
|
+
),
|
|
3309
|
+
/* @__PURE__ */ jsxs(
|
|
3310
|
+
"svg",
|
|
3311
|
+
{
|
|
3312
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3313
|
+
version: "1.1",
|
|
3314
|
+
width: "100%",
|
|
3315
|
+
height: "100%",
|
|
3316
|
+
viewBox: "0 0 600 600",
|
|
3317
|
+
role: "progressbar",
|
|
3318
|
+
className: "m-auto flex justify-center items-center",
|
|
3319
|
+
children: [
|
|
3320
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
3321
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
3322
|
+
@keyframes rotate {
|
|
3323
|
+
from { transform: rotate(105deg); }
|
|
3324
|
+
to { transform: rotate(465deg); }
|
|
3325
|
+
}
|
|
3326
|
+
.rotating {
|
|
3327
|
+
animation: rotate 500ms infinite linear;
|
|
3328
|
+
transform-origin: 300px 300px;
|
|
3329
|
+
}
|
|
3330
|
+
` }),
|
|
3331
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: `Gradient${gradientId}`, gradientTransform: "rotate(90)", children: [
|
|
3332
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: `hsl(var(--color-lilas-400))` }),
|
|
3333
|
+
/* @__PURE__ */ jsx("stop", { offset: "75%", stopColor: `hsl(var(--color-indigo-400)/0.5)` }),
|
|
3334
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: `hsl(var(--color-madrugada-400)/0)` })
|
|
3335
|
+
] }),
|
|
3336
|
+
/* @__PURE__ */ jsx("pattern", { id: `Pattern${patternId}`, x: "0", y: "0", width: "600", height: "600", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("g", { transform: "rotate(0, 300, 300)", children: /* @__PURE__ */ jsx("rect", { shapeRendering: "crispEdges", x: "0", y: "0", width: "300", height: "600", fill: `url(#Gradient${gradientId})` }) }) })
|
|
3337
|
+
] }),
|
|
3338
|
+
/* @__PURE__ */ jsx(
|
|
3339
|
+
"path",
|
|
3340
|
+
{
|
|
3341
|
+
className: "rotating ",
|
|
3342
|
+
style: { stroke: `url(#Pattern${patternId})` },
|
|
3343
|
+
fill: "transparent",
|
|
3344
|
+
transform: "rotate(105, 300, 300)",
|
|
3345
|
+
strokeWidth,
|
|
3346
|
+
strokeLinecap: "round",
|
|
3347
|
+
d: "M 364 58 A 250 250 0 1 1 235 58"
|
|
3348
|
+
}
|
|
3349
|
+
)
|
|
3350
|
+
]
|
|
3351
|
+
}
|
|
3352
|
+
)
|
|
3353
|
+
]
|
|
3354
|
+
}
|
|
3355
|
+
);
|
|
3356
|
+
};
|
|
3357
|
+
var switchVariants = cva(
|
|
3358
|
+
"peer group inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
3359
|
+
{
|
|
3360
|
+
variants: {
|
|
3361
|
+
size: {
|
|
3362
|
+
default: "h-6 w-11",
|
|
3363
|
+
sm: "h-4 w-7 sm"
|
|
3364
|
+
}
|
|
3365
|
+
},
|
|
3366
|
+
defaultVariants: {
|
|
3367
|
+
size: "default"
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
);
|
|
3371
|
+
var Switch = React36.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3372
|
+
SwitchPrimitives.Root,
|
|
3373
|
+
{
|
|
3374
|
+
className: cn(switchVariants({ size }), className),
|
|
3375
|
+
...props,
|
|
3376
|
+
ref,
|
|
3377
|
+
children: /* @__PURE__ */ jsx(
|
|
3378
|
+
SwitchPrimitives.Thumb,
|
|
3379
|
+
{
|
|
3380
|
+
className: cn(
|
|
3381
|
+
"group-[.sm]:h-3 group-[.sm]:w-3 pointer-events-none block h-5 w-5 rounded-full bg-background shadow-md ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 group-[.sm]:data-[state=checked]:translate-x-3"
|
|
3382
|
+
)
|
|
3383
|
+
}
|
|
3384
|
+
)
|
|
3385
|
+
}
|
|
3386
|
+
));
|
|
3387
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
3388
|
+
var Table = React36.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("relative w-full rounded-xl border border-border overflow-auto", containerClassName), children: /* @__PURE__ */ jsx(
|
|
3389
|
+
"table",
|
|
3390
|
+
{
|
|
3391
|
+
ref,
|
|
3392
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
3393
|
+
...props
|
|
3394
|
+
}
|
|
3395
|
+
) }));
|
|
3396
|
+
Table.displayName = "Table";
|
|
3397
|
+
var TableHeader = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
3398
|
+
TableHeader.displayName = "TableHeader";
|
|
3399
|
+
var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3400
|
+
"tbody",
|
|
3401
|
+
{
|
|
3402
|
+
ref,
|
|
3403
|
+
className: cn("[&_tr:last-child]:border-0 [&_tr]:h-16", className),
|
|
3404
|
+
...props
|
|
3405
|
+
}
|
|
3406
|
+
));
|
|
3407
|
+
TableBody.displayName = "TableBody";
|
|
3408
|
+
var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3409
|
+
"tfoot",
|
|
3410
|
+
{
|
|
3411
|
+
ref,
|
|
3412
|
+
className: cn(
|
|
3413
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
3414
|
+
className
|
|
3415
|
+
),
|
|
3416
|
+
...props
|
|
3417
|
+
}
|
|
3418
|
+
));
|
|
3419
|
+
TableFooter.displayName = "TableFooter";
|
|
3420
|
+
var TableRow = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3421
|
+
"tr",
|
|
3422
|
+
{
|
|
3423
|
+
ref,
|
|
3424
|
+
className: cn(
|
|
3425
|
+
"group row border-b hover:bg-secondary/40 dark:hover:bg-secondary/10 data-[state=selected]:bg-muted",
|
|
3426
|
+
className
|
|
3427
|
+
),
|
|
3428
|
+
...props
|
|
3429
|
+
}
|
|
3430
|
+
));
|
|
3431
|
+
TableRow.displayName = "TableRow";
|
|
3432
|
+
var TableHead = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3433
|
+
"th",
|
|
3434
|
+
{
|
|
3435
|
+
ref,
|
|
3436
|
+
className: cn(
|
|
3437
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3438
|
+
className
|
|
3439
|
+
),
|
|
3440
|
+
...props
|
|
3441
|
+
}
|
|
3442
|
+
));
|
|
3443
|
+
TableHead.displayName = "TableHead";
|
|
3444
|
+
var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3445
|
+
"td",
|
|
3446
|
+
{
|
|
3447
|
+
ref,
|
|
3448
|
+
className: cn(
|
|
3449
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3450
|
+
className
|
|
3451
|
+
),
|
|
3452
|
+
...props
|
|
3453
|
+
}
|
|
3454
|
+
));
|
|
3455
|
+
TableCell.displayName = "TableCell";
|
|
3456
|
+
var TableCaption = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3457
|
+
"caption",
|
|
3458
|
+
{
|
|
3459
|
+
ref,
|
|
3460
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
3461
|
+
...props
|
|
3462
|
+
}
|
|
3463
|
+
));
|
|
3464
|
+
TableCaption.displayName = "TableCaption";
|
|
3465
|
+
var Tabs = TabsPrimitive.Root;
|
|
3466
|
+
var TabsList = React36.forwardRef(({ className, variant = "switch", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3467
|
+
TabsPrimitive.List,
|
|
3468
|
+
{
|
|
3469
|
+
ref,
|
|
3470
|
+
"data-variant": variant,
|
|
3471
|
+
className: cn(
|
|
3472
|
+
" border-muted-foreground/10 inline-flex items-center justify-center text-muted-foreground",
|
|
3473
|
+
variant === "switch" ? "h-10 bg-background rounded-xl p-1" : "relative border-b-2 space-x-2",
|
|
3474
|
+
className
|
|
3475
|
+
),
|
|
3476
|
+
...props
|
|
3477
|
+
}
|
|
3478
|
+
));
|
|
3479
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3480
|
+
var TabsTrigger = React36.forwardRef(({ className, variant = "switch", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3481
|
+
TabsPrimitive.Trigger,
|
|
3482
|
+
{
|
|
3483
|
+
ref,
|
|
3484
|
+
"data-variant": variant,
|
|
3485
|
+
className: cn(
|
|
3486
|
+
"!outline-none relative inline-flex h-8 gap-2.5 items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
3487
|
+
variant === "switch" ? "truncate rounded-lg data-[state=active]:bg-background-secondary-light data-[state=active]:font-semibold data-[state=active]:text-text-brand-primary border border-transparent data-[state=active]:border-border-primary-light" : " font-medium text-muted-foreground after:data-[state=active]:opacity-100 data-[state=active]:text-text-brand-primary after:border-b-2 after:border-transparent data-[state=active]:after:!border-foreground-primary-heavy after:absolute after:bottom-[-2px] after:left-0 after:right-0 after:transform after:origin-bottom",
|
|
3488
|
+
className
|
|
3489
|
+
),
|
|
3490
|
+
...props
|
|
3491
|
+
}
|
|
3492
|
+
));
|
|
3493
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3494
|
+
var TabsContent = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3495
|
+
TabsPrimitive.Content,
|
|
3496
|
+
{
|
|
3497
|
+
ref,
|
|
3498
|
+
className: cn(
|
|
3499
|
+
"data-[state=active]:mt-2 data-[state=active]:!block !hidden ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
3500
|
+
className
|
|
3501
|
+
),
|
|
3502
|
+
...props
|
|
3503
|
+
}
|
|
3504
|
+
));
|
|
3505
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3506
|
+
var Textarea = React36.forwardRef(({ className, ...props }, ref) => {
|
|
3507
|
+
return /* @__PURE__ */ jsx(
|
|
3508
|
+
"textarea",
|
|
3509
|
+
{
|
|
3510
|
+
className: cn(
|
|
3511
|
+
"flex min-h-[60px] w-full rounded-xl border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
3512
|
+
className
|
|
3513
|
+
),
|
|
3514
|
+
ref,
|
|
3515
|
+
...props
|
|
3516
|
+
}
|
|
3517
|
+
);
|
|
3518
|
+
});
|
|
3519
|
+
Textarea.displayName = "Textarea";
|
|
3520
|
+
var ToastProvider = ToastPrimitives.Provider;
|
|
3521
|
+
var ToastViewport = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3522
|
+
ToastPrimitives.Viewport,
|
|
3523
|
+
{
|
|
3524
|
+
ref,
|
|
3525
|
+
className: cn(
|
|
3526
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
3527
|
+
className
|
|
3528
|
+
),
|
|
3529
|
+
...props
|
|
3530
|
+
}
|
|
3531
|
+
));
|
|
3532
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
3533
|
+
var toastVariants = cva(
|
|
3534
|
+
"group border-border pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
3535
|
+
{
|
|
3536
|
+
variants: {
|
|
3537
|
+
variant: {
|
|
3538
|
+
default: "border bg-background text-foreground",
|
|
3539
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
3540
|
+
}
|
|
3541
|
+
},
|
|
3542
|
+
defaultVariants: {
|
|
3543
|
+
variant: "default"
|
|
3544
|
+
}
|
|
3545
|
+
}
|
|
3546
|
+
);
|
|
3547
|
+
var Toast = React36.forwardRef(({ className, variant, ...props }, ref) => {
|
|
3548
|
+
return /* @__PURE__ */ jsx(
|
|
3549
|
+
ToastPrimitives.Root,
|
|
3550
|
+
{
|
|
3551
|
+
ref,
|
|
3552
|
+
className: cn(toastVariants({ variant }), className),
|
|
3553
|
+
...props
|
|
3554
|
+
}
|
|
3555
|
+
);
|
|
3556
|
+
});
|
|
3557
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
3558
|
+
var ToastAction = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3559
|
+
ToastPrimitives.Action,
|
|
3560
|
+
{
|
|
3561
|
+
ref,
|
|
3562
|
+
className: cn(
|
|
3563
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-xl border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
3564
|
+
className
|
|
3565
|
+
),
|
|
3566
|
+
...props
|
|
3567
|
+
}
|
|
3568
|
+
));
|
|
3569
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
3570
|
+
var ToastClose = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3571
|
+
ToastPrimitives.Close,
|
|
3572
|
+
{
|
|
3573
|
+
ref,
|
|
3574
|
+
className: cn(
|
|
3575
|
+
"absolute right-1 top-1 rounded-xl p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
3576
|
+
className
|
|
3577
|
+
),
|
|
3578
|
+
"toast-close": "",
|
|
3579
|
+
...props,
|
|
3580
|
+
children: /* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" })
|
|
3581
|
+
}
|
|
3582
|
+
));
|
|
3583
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
3584
|
+
var ToastTitle = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3585
|
+
ToastPrimitives.Title,
|
|
3586
|
+
{
|
|
3587
|
+
ref,
|
|
3588
|
+
className: cn("text-sm font-semibold [&+div]:text-xs", className),
|
|
3589
|
+
...props
|
|
3590
|
+
}
|
|
3591
|
+
));
|
|
3592
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
3593
|
+
var ToastDescription = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3594
|
+
ToastPrimitives.Description,
|
|
3595
|
+
{
|
|
3596
|
+
ref,
|
|
3597
|
+
className: cn("text-sm opacity-90", className),
|
|
3598
|
+
...props
|
|
3599
|
+
}
|
|
3600
|
+
));
|
|
3601
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
3602
|
+
var toggleVariants = cva(
|
|
3603
|
+
"inline-flex items-center justify-center gap-2 rounded-xl text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3604
|
+
{
|
|
3605
|
+
variants: {
|
|
3606
|
+
variant: {
|
|
3607
|
+
default: "bg-transparent",
|
|
3608
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
3609
|
+
},
|
|
3610
|
+
size: {
|
|
3611
|
+
default: "h-10 px-2 min-w-10",
|
|
3612
|
+
sm: "h-9 px-1.5 min-w-9",
|
|
3613
|
+
lg: "h-11 px-2.5 min-w-11"
|
|
3614
|
+
}
|
|
3615
|
+
},
|
|
3616
|
+
defaultVariants: {
|
|
3617
|
+
variant: "default",
|
|
3618
|
+
size: "default"
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
);
|
|
3622
|
+
var Toggle = React36.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3623
|
+
TogglePrimitive.Root,
|
|
3624
|
+
{
|
|
3625
|
+
ref,
|
|
3626
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
3627
|
+
...props
|
|
3628
|
+
}
|
|
3629
|
+
));
|
|
3630
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3631
|
+
var ToggleGroupContext = React36.createContext({
|
|
3632
|
+
size: "default",
|
|
3633
|
+
variant: "default"
|
|
3634
|
+
});
|
|
3635
|
+
var ToggleGroup = React36.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3636
|
+
ToggleGroupPrimitive.Root,
|
|
3637
|
+
{
|
|
3638
|
+
ref,
|
|
3639
|
+
className: cn("flex items-center justify-center gap-1", className),
|
|
3640
|
+
...props,
|
|
3641
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
3642
|
+
}
|
|
3643
|
+
));
|
|
3644
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3645
|
+
var ToggleGroupItem = React36.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3646
|
+
const context = React36.useContext(ToggleGroupContext);
|
|
3647
|
+
return /* @__PURE__ */ jsx(
|
|
3648
|
+
ToggleGroupPrimitive.Item,
|
|
3649
|
+
{
|
|
3650
|
+
ref,
|
|
3651
|
+
className: cn(
|
|
3652
|
+
toggleVariants({
|
|
3653
|
+
variant: context.variant || variant,
|
|
3654
|
+
size: context.size || size
|
|
3655
|
+
}),
|
|
3656
|
+
className
|
|
3657
|
+
),
|
|
3658
|
+
...props,
|
|
3659
|
+
children
|
|
3660
|
+
}
|
|
3661
|
+
);
|
|
3662
|
+
});
|
|
3663
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
3664
|
+
var TOAST_LIMIT = 1;
|
|
3665
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
3666
|
+
var count = 0;
|
|
3667
|
+
function genId() {
|
|
3668
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
3669
|
+
return count.toString();
|
|
3670
|
+
}
|
|
3671
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
3672
|
+
var addToRemoveQueue = (toastId) => {
|
|
3673
|
+
if (toastTimeouts.has(toastId)) {
|
|
3674
|
+
return;
|
|
3675
|
+
}
|
|
3676
|
+
const timeout = setTimeout(() => {
|
|
3677
|
+
toastTimeouts.delete(toastId);
|
|
3678
|
+
dispatch({
|
|
3679
|
+
type: "REMOVE_TOAST",
|
|
3680
|
+
toastId
|
|
3681
|
+
});
|
|
3682
|
+
}, TOAST_REMOVE_DELAY);
|
|
3683
|
+
toastTimeouts.set(toastId, timeout);
|
|
3684
|
+
};
|
|
3685
|
+
var reducer = (state, action) => {
|
|
3686
|
+
switch (action.type) {
|
|
3687
|
+
case "ADD_TOAST":
|
|
3688
|
+
return {
|
|
3689
|
+
...state,
|
|
3690
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
3691
|
+
};
|
|
3692
|
+
case "UPDATE_TOAST":
|
|
3693
|
+
return {
|
|
3694
|
+
...state,
|
|
3695
|
+
toasts: state.toasts.map(
|
|
3696
|
+
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
|
3697
|
+
)
|
|
3698
|
+
};
|
|
3699
|
+
case "DISMISS_TOAST": {
|
|
3700
|
+
const { toastId } = action;
|
|
3701
|
+
if (toastId) {
|
|
3702
|
+
addToRemoveQueue(toastId);
|
|
3703
|
+
} else {
|
|
3704
|
+
state.toasts.forEach((toast4) => {
|
|
3705
|
+
addToRemoveQueue(toast4.id);
|
|
3706
|
+
});
|
|
3707
|
+
}
|
|
3708
|
+
return {
|
|
3709
|
+
...state,
|
|
3710
|
+
toasts: state.toasts.map(
|
|
3711
|
+
(t) => t.id === toastId || toastId === void 0 ? {
|
|
3712
|
+
...t,
|
|
3713
|
+
open: false
|
|
3714
|
+
} : t
|
|
3715
|
+
)
|
|
3716
|
+
};
|
|
3717
|
+
}
|
|
3718
|
+
case "REMOVE_TOAST":
|
|
3719
|
+
if (action.toastId === void 0) {
|
|
3720
|
+
return {
|
|
3721
|
+
...state,
|
|
3722
|
+
toasts: []
|
|
3723
|
+
};
|
|
3724
|
+
}
|
|
3725
|
+
return {
|
|
3726
|
+
...state,
|
|
3727
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
3728
|
+
};
|
|
3729
|
+
}
|
|
3730
|
+
};
|
|
3731
|
+
var listeners = [];
|
|
3732
|
+
var memoryState = { toasts: [] };
|
|
3733
|
+
function dispatch(action) {
|
|
3734
|
+
memoryState = reducer(memoryState, action);
|
|
3735
|
+
listeners.forEach((listener) => {
|
|
3736
|
+
listener(memoryState);
|
|
3737
|
+
});
|
|
3738
|
+
}
|
|
3739
|
+
function toast3({ ...props }) {
|
|
3740
|
+
const id = genId();
|
|
3741
|
+
const update = (props2) => dispatch({
|
|
3742
|
+
type: "UPDATE_TOAST",
|
|
3743
|
+
toast: { ...props2, id }
|
|
3744
|
+
});
|
|
3745
|
+
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
3746
|
+
dispatch({
|
|
3747
|
+
type: "ADD_TOAST",
|
|
3748
|
+
toast: {
|
|
3749
|
+
...props,
|
|
3750
|
+
id,
|
|
3751
|
+
open: true,
|
|
3752
|
+
onOpenChange: (open) => {
|
|
3753
|
+
if (!open) dismiss();
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
});
|
|
3757
|
+
return {
|
|
3758
|
+
id,
|
|
3759
|
+
dismiss,
|
|
3760
|
+
update
|
|
3761
|
+
};
|
|
3762
|
+
}
|
|
3763
|
+
function useToast() {
|
|
3764
|
+
const [state, setState] = React36.useState(memoryState);
|
|
3765
|
+
React36.useEffect(() => {
|
|
3766
|
+
listeners.push(setState);
|
|
3767
|
+
return () => {
|
|
3768
|
+
const index = listeners.indexOf(setState);
|
|
3769
|
+
if (index > -1) {
|
|
3770
|
+
listeners.splice(index, 1);
|
|
3771
|
+
}
|
|
3772
|
+
};
|
|
3773
|
+
}, [state]);
|
|
3774
|
+
return {
|
|
3775
|
+
...state,
|
|
3776
|
+
toast: toast3,
|
|
3777
|
+
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
3778
|
+
};
|
|
3779
|
+
}
|
|
3780
|
+
|
|
3781
|
+
// src/lib/fonts.ts
|
|
3782
|
+
var fonts = cn("touch-manipulation font-sans antialiased");
|
|
3783
|
+
var ThemeProvider = ({
|
|
3784
|
+
children,
|
|
3785
|
+
...properties
|
|
3786
|
+
}) => /* @__PURE__ */ jsx(
|
|
3787
|
+
ThemeProvider$1,
|
|
3788
|
+
{
|
|
3789
|
+
attribute: "class",
|
|
3790
|
+
defaultTheme: "system",
|
|
3791
|
+
enableSystem: true,
|
|
3792
|
+
disableTransitionOnChange: true,
|
|
3793
|
+
...properties,
|
|
3794
|
+
children
|
|
3795
|
+
}
|
|
3796
|
+
);
|
|
3797
|
+
|
|
3798
|
+
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, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Chip, ChipGroup, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox, 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, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiCombobox, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator5 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, ThemeProvider, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, capitalize, chipVariants, cn, fonts, handleError, navigationMenuTriggerStyle, reducer, toast3 as toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast };
|
|
3799
|
+
//# sourceMappingURL=index.js.map
|
|
3800
|
+
//# sourceMappingURL=index.js.map
|