@docyrus/shadcn 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 +158 -0
- package/dist/default/accordion.d.ts +9 -0
- package/dist/default/accordion.js +51 -0
- package/dist/default/accordion.js.map +1 -0
- package/dist/default/alert-dialog.d.ts +23 -0
- package/dist/default/alert-dialog.js +153 -0
- package/dist/default/alert-dialog.js.map +1 -0
- package/dist/default/alert.d.ts +11 -0
- package/dist/default/alert.js +56 -0
- package/dist/default/alert.js.map +1 -0
- package/dist/default/aspect-ratio.d.ts +6 -0
- package/dist/default/aspect-ratio.js +8 -0
- package/dist/default/aspect-ratio.js.map +1 -0
- package/dist/default/avatar.d.ts +8 -0
- package/dist/default/avatar.js +46 -0
- package/dist/default/avatar.js.map +1 -0
- package/dist/default/badge.d.ts +13 -0
- package/dist/default/badge.js +32 -0
- package/dist/default/badge.js.map +1 -0
- package/dist/default/breadcrumb.d.ts +22 -0
- package/dist/default/breadcrumb.js +94 -0
- package/dist/default/breadcrumb.js.map +1 -0
- package/dist/default/button-group.d.ts +17 -0
- package/dist/default/button-group.js +98 -0
- package/dist/default/button-group.js.map +1 -0
- package/dist/default/button.d.ts +14 -0
- package/dist/default/button.js +54 -0
- package/dist/default/button.js.map +1 -0
- package/dist/default/calendar.d.ts +13 -0
- package/dist/default/calendar.js +231 -0
- package/dist/default/calendar.js.map +1 -0
- package/dist/default/card.d.ts +10 -0
- package/dist/default/card.js +66 -0
- package/dist/default/card.js.map +1 -0
- package/dist/default/carousel.d.ts +23 -0
- package/dist/default/carousel.js +237 -0
- package/dist/default/carousel.js.map +1 -0
- package/dist/default/chart.d.ts +69 -0
- package/dist/default/chart.js +241 -0
- package/dist/default/chart.js.map +1 -0
- package/dist/default/checkbox.d.ts +6 -0
- package/dist/default/checkbox.js +34 -0
- package/dist/default/checkbox.js.map +1 -0
- package/dist/default/collapsible.d.ts +8 -0
- package/dist/default/collapsible.js +9 -0
- package/dist/default/collapsible.js.map +1 -0
- package/dist/default/command.d.ts +83 -0
- package/dist/default/command.js +169 -0
- package/dist/default/command.js.map +1 -0
- package/dist/default/context-menu.d.ts +30 -0
- package/dist/default/context-menu.js +146 -0
- package/dist/default/context-menu.js.map +1 -0
- package/dist/default/dialog.d.ts +22 -0
- package/dist/default/dialog.js +101 -0
- package/dist/default/dialog.js.map +1 -0
- package/dist/default/drawer.d.ts +27 -0
- package/dist/default/drawer.js +99 -0
- package/dist/default/drawer.js.map +1 -0
- package/dist/default/dropdown-menu.d.ts +30 -0
- package/dist/default/dropdown-menu.js +143 -0
- package/dist/default/dropdown-menu.js.map +1 -0
- package/dist/default/empty.d.ts +15 -0
- package/dist/default/empty.js +104 -0
- package/dist/default/empty.js.map +1 -0
- package/dist/default/field.d.ts +30 -0
- package/dist/default/field.js +253 -0
- package/dist/default/field.js.map +1 -0
- package/dist/default/form.d.ts +28 -0
- package/dist/default/form.js +121 -0
- package/dist/default/form.js.map +1 -0
- package/dist/default/hover-card.d.ts +8 -0
- package/dist/default/hover-card.js +30 -0
- package/dist/default/hover-card.js.map +1 -0
- package/dist/default/index.d.ts +95 -0
- package/dist/default/index.js +4029 -0
- package/dist/default/index.js.map +1 -0
- package/dist/default/input-group.d.ts +20 -0
- package/dist/default/input-group.js +225 -0
- package/dist/default/input-group.js.map +1 -0
- package/dist/default/input-otp.d.ts +37 -0
- package/dist/default/input-otp.js +53 -0
- package/dist/default/input-otp.js.map +1 -0
- package/dist/default/input.d.ts +5 -0
- package/dist/default/input.js +30 -0
- package/dist/default/input.js.map +1 -0
- package/dist/default/item.d.ts +28 -0
- package/dist/default/item.js +203 -0
- package/dist/default/item.js.map +1 -0
- package/dist/default/kbd.d.ts +6 -0
- package/dist/default/kbd.js +37 -0
- package/dist/default/kbd.js.map +1 -0
- package/dist/default/label.d.ts +8 -0
- package/dist/default/label.js +26 -0
- package/dist/default/label.js.map +1 -0
- package/dist/default/menubar.d.ts +31 -0
- package/dist/default/menubar.js +194 -0
- package/dist/default/menubar.js.map +1 -0
- package/dist/default/navigation-menu.d.ts +15 -0
- package/dist/default/navigation-menu.js +106 -0
- package/dist/default/navigation-menu.js.map +1 -0
- package/dist/default/pagination.d.ts +33 -0
- package/dist/default/pagination.js +146 -0
- package/dist/default/pagination.js.map +1 -0
- package/dist/default/popover.d.ts +8 -0
- package/dist/default/popover.js +30 -0
- package/dist/default/popover.js.map +1 -0
- package/dist/default/progress.d.ts +6 -0
- package/dist/default/progress.js +32 -0
- package/dist/default/progress.js.map +1 -0
- package/dist/default/radio-group.d.ts +7 -0
- package/dist/default/radio-group.js +41 -0
- package/dist/default/radio-group.js.map +1 -0
- package/dist/default/resizable.d.ts +27 -0
- package/dist/default/resizable.js +42 -0
- package/dist/default/resizable.js.map +1 -0
- package/dist/default/scroll-area.d.ts +7 -0
- package/dist/default/scroll-area.js +44 -0
- package/dist/default/scroll-area.js.map +1 -0
- package/dist/default/select.d.ts +15 -0
- package/dist/default/select.js +121 -0
- package/dist/default/select.js.map +1 -0
- package/dist/default/separator.d.ts +6 -0
- package/dist/default/separator.js +31 -0
- package/dist/default/separator.js.map +1 -0
- package/dist/default/sheet.d.ts +29 -0
- package/dist/default/sheet.js +112 -0
- package/dist/default/sheet.js.map +1 -0
- package/dist/default/sidebar.d.ts +71 -0
- package/dist/default/sidebar.js +780 -0
- package/dist/default/sidebar.js.map +1 -0
- package/dist/default/skeleton.d.ts +5 -0
- package/dist/default/skeleton.js +24 -0
- package/dist/default/skeleton.js.map +1 -0
- package/dist/default/slider.d.ts +6 -0
- package/dist/default/slider.js +30 -0
- package/dist/default/slider.js.map +1 -0
- package/dist/default/sonner.d.ts +7 -0
- package/dist/default/sonner.js +35 -0
- package/dist/default/sonner.js.map +1 -0
- package/dist/default/spinner.d.ts +5 -0
- package/dist/default/spinner.js +24 -0
- package/dist/default/spinner.js.map +1 -0
- package/dist/default/styles.css +149 -0
- package/dist/default/switch.d.ts +6 -0
- package/dist/default/switch.js +34 -0
- package/dist/default/switch.js.map +1 -0
- package/dist/default/table.d.ts +12 -0
- package/dist/default/table.js +87 -0
- package/dist/default/table.js.map +1 -0
- package/dist/default/tabs.d.ts +9 -0
- package/dist/default/tabs.js +51 -0
- package/dist/default/tabs.js.map +1 -0
- package/dist/default/textarea.d.ts +5 -0
- package/dist/default/textarea.js +27 -0
- package/dist/default/textarea.js.map +1 -0
- package/dist/default/toggle-group.d.ts +15 -0
- package/dist/default/toggle-group.js +77 -0
- package/dist/default/toggle-group.js.map +1 -0
- package/dist/default/toggle.d.ts +15 -0
- package/dist/default/toggle.js +44 -0
- package/dist/default/toggle.js.map +1 -0
- package/dist/default/tooltip.d.ts +9 -0
- package/dist/default/tooltip.js +29 -0
- package/dist/default/tooltip.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +21 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +21 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.js +4029 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/new-york/accordion.d.ts +10 -0
- package/dist/new-york/accordion.js +68 -0
- package/dist/new-york/accordion.js.map +1 -0
- package/dist/new-york/alert-dialog.d.ts +17 -0
- package/dist/new-york/alert-dialog.js +171 -0
- package/dist/new-york/alert-dialog.js.map +1 -0
- package/dist/new-york/alert.d.ts +13 -0
- package/dist/new-york/alert.js +71 -0
- package/dist/new-york/alert.js.map +1 -0
- package/dist/new-york/aspect-ratio.d.ts +6 -0
- package/dist/new-york/aspect-ratio.js +12 -0
- package/dist/new-york/aspect-ratio.js.map +1 -0
- package/dist/new-york/avatar.d.ts +9 -0
- package/dist/new-york/avatar.js +58 -0
- package/dist/new-york/avatar.js.map +1 -0
- package/dist/new-york/badge.d.ts +13 -0
- package/dist/new-york/badge.js +46 -0
- package/dist/new-york/badge.js.map +1 -0
- package/dist/new-york/breadcrumb.d.ts +14 -0
- package/dist/new-york/breadcrumb.js +104 -0
- package/dist/new-york/breadcrumb.js.map +1 -0
- package/dist/new-york/button-group.d.ts +17 -0
- package/dist/new-york/button-group.js +100 -0
- package/dist/new-york/button-group.js.map +1 -0
- package/dist/new-york/button.d.ts +14 -0
- package/dist/new-york/button.js +58 -0
- package/dist/new-york/button.js.map +1 -0
- package/dist/new-york/calendar.d.ts +13 -0
- package/dist/new-york/calendar.js +237 -0
- package/dist/new-york/calendar.js.map +1 -0
- package/dist/new-york/card.d.ts +12 -0
- package/dist/new-york/card.js +91 -0
- package/dist/new-york/card.js.map +1 -0
- package/dist/new-york/carousel.d.ts +24 -0
- package/dist/new-york/carousel.js +246 -0
- package/dist/new-york/carousel.js.map +1 -0
- package/dist/new-york/chart.d.ts +43 -0
- package/dist/new-york/chart.js +243 -0
- package/dist/new-york/chart.js.map +1 -0
- package/dist/new-york/checkbox.d.ts +7 -0
- package/dist/new-york/checkbox.js +37 -0
- package/dist/new-york/checkbox.js.map +1 -0
- package/dist/new-york/collapsible.d.ts +8 -0
- package/dist/new-york/collapsible.js +35 -0
- package/dist/new-york/collapsible.js.map +1 -0
- package/dist/new-york/command.d.ts +22 -0
- package/dist/new-york/command.js +266 -0
- package/dist/new-york/command.js.map +1 -0
- package/dist/new-york/context-menu.d.ts +28 -0
- package/dist/new-york/context-menu.js +215 -0
- package/dist/new-york/context-menu.js.map +1 -0
- package/dist/new-york/dialog.d.ts +18 -0
- package/dist/new-york/dialog.js +134 -0
- package/dist/new-york/dialog.js.map +1 -0
- package/dist/new-york/drawer.d.ts +16 -0
- package/dist/new-york/drawer.js +125 -0
- package/dist/new-york/drawer.js.map +1 -0
- package/dist/new-york/dropdown-menu.d.ts +28 -0
- package/dist/new-york/dropdown-menu.js +224 -0
- package/dist/new-york/dropdown-menu.js.map +1 -0
- package/dist/new-york/empty.d.ts +15 -0
- package/dist/new-york/empty.js +104 -0
- package/dist/new-york/empty.js.map +1 -0
- package/dist/new-york/field.d.ts +30 -0
- package/dist/new-york/field.js +263 -0
- package/dist/new-york/field.js.map +1 -0
- package/dist/new-york/form.d.ts +28 -0
- package/dist/new-york/form.js +131 -0
- package/dist/new-york/form.js.map +1 -0
- package/dist/new-york/hover-card.d.ts +9 -0
- package/dist/new-york/hover-card.js +42 -0
- package/dist/new-york/hover-card.js.map +1 -0
- package/dist/new-york/index.d.ts +92 -0
- package/dist/new-york/index.js +4965 -0
- package/dist/new-york/index.js.map +1 -0
- package/dist/new-york/input-group.d.ts +20 -0
- package/dist/new-york/input-group.js +226 -0
- package/dist/new-york/input-group.js.map +1 -0
- package/dist/new-york/input-otp.d.ts +14 -0
- package/dist/new-york/input-otp.js +70 -0
- package/dist/new-york/input-otp.js.map +1 -0
- package/dist/new-york/input.d.ts +6 -0
- package/dist/new-york/input.js +28 -0
- package/dist/new-york/input.js.map +1 -0
- package/dist/new-york/item.d.ts +28 -0
- package/dist/new-york/item.js +205 -0
- package/dist/new-york/item.js.map +1 -0
- package/dist/new-york/kbd.d.ts +6 -0
- package/dist/new-york/kbd.js +37 -0
- package/dist/new-york/kbd.js.map +1 -0
- package/dist/new-york/label.d.ts +7 -0
- package/dist/new-york/label.js +28 -0
- package/dist/new-york/label.js.map +1 -0
- package/dist/new-york/menubar.d.ts +29 -0
- package/dist/new-york/menubar.js +243 -0
- package/dist/new-york/menubar.js.map +1 -0
- package/dist/new-york/navigation-menu.d.ts +18 -0
- package/dist/new-york/navigation-menu.js +169 -0
- package/dist/new-york/navigation-menu.js.map +1 -0
- package/dist/new-york/pagination.d.ts +18 -0
- package/dist/new-york/pagination.js +147 -0
- package/dist/new-york/pagination.js.map +1 -0
- package/dist/new-york/popover.d.ts +10 -0
- package/dist/new-york/popover.js +47 -0
- package/dist/new-york/popover.js.map +1 -0
- package/dist/new-york/progress.d.ts +7 -0
- package/dist/new-york/progress.js +38 -0
- package/dist/new-york/progress.js.map +1 -0
- package/dist/new-york/radio-group.d.ts +8 -0
- package/dist/new-york/radio-group.js +50 -0
- package/dist/new-york/radio-group.js.map +1 -0
- package/dist/new-york/resizable.d.ts +11 -0
- package/dist/new-york/resizable.js +53 -0
- package/dist/new-york/resizable.js.map +1 -0
- package/dist/new-york/scroll-area.d.ts +8 -0
- package/dist/new-york/scroll-area.js +65 -0
- package/dist/new-york/scroll-area.js.map +1 -0
- package/dist/new-york/select.d.ts +18 -0
- package/dist/new-york/select.js +169 -0
- package/dist/new-york/select.js.map +1 -0
- package/dist/new-york/separator.d.ts +7 -0
- package/dist/new-york/separator.js +32 -0
- package/dist/new-york/separator.js.map +1 -0
- package/dist/new-york/sheet.d.ts +16 -0
- package/dist/new-york/sheet.js +126 -0
- package/dist/new-york/sheet.js.map +1 -0
- package/dist/new-york/sidebar.d.ts +75 -0
- package/dist/new-york/sidebar.js +859 -0
- package/dist/new-york/sidebar.js.map +1 -0
- package/dist/new-york/skeleton.d.ts +5 -0
- package/dist/new-york/skeleton.js +22 -0
- package/dist/new-york/skeleton.js.map +1 -0
- package/dist/new-york/slider.d.ts +7 -0
- package/dist/new-york/slider.js +69 -0
- package/dist/new-york/slider.js.map +1 -0
- package/dist/new-york/sonner.d.ts +6 -0
- package/dist/new-york/sonner.js +34 -0
- package/dist/new-york/sonner.js.map +1 -0
- package/dist/new-york/spinner.d.ts +5 -0
- package/dist/new-york/spinner.js +24 -0
- package/dist/new-york/spinner.js.map +1 -0
- package/dist/new-york/styles.css +129 -0
- package/dist/new-york/switch.d.ts +7 -0
- package/dist/new-york/switch.js +37 -0
- package/dist/new-york/switch.js.map +1 -0
- package/dist/new-york/table.d.ts +13 -0
- package/dist/new-york/table.js +114 -0
- package/dist/new-york/table.js.map +1 -0
- package/dist/new-york/tabs.d.ts +10 -0
- package/dist/new-york/tabs.js +70 -0
- package/dist/new-york/tabs.js.map +1 -0
- package/dist/new-york/textarea.d.ts +6 -0
- package/dist/new-york/textarea.js +25 -0
- package/dist/new-york/textarea.js.map +1 -0
- package/dist/new-york/toggle-group.d.ts +14 -0
- package/dist/new-york/toggle-group.js +95 -0
- package/dist/new-york/toggle-group.js.map +1 -0
- package/dist/new-york/toggle.d.ts +13 -0
- package/dist/new-york/toggle.js +49 -0
- package/dist/new-york/toggle.js.map +1 -0
- package/dist/new-york/tooltip.d.ts +10 -0
- package/dist/new-york/tooltip.js +58 -0
- package/dist/new-york/tooltip.js.map +1 -0
- package/package.json +133 -0
|
@@ -0,0 +1,4965 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import { ChevronDownIcon, ChevronRight, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, CheckIcon, XIcon, SearchIcon, CircleIcon, MinusIcon, MoreHorizontalIcon, GripVerticalIcon, ChevronUpIcon, PanelLeftIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
7
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
8
|
+
import { cva } from 'class-variance-authority';
|
|
9
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
10
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
11
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
12
|
+
import * as React2 from 'react';
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
|
+
import { getDefaultClassNames, 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 { Command as Command$1 } from 'cmdk';
|
|
20
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
21
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
22
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
23
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
24
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
25
|
+
import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
|
|
26
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
27
|
+
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
28
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
29
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
30
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
31
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
32
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
33
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
34
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
35
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
36
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
37
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
38
|
+
import { useTheme } from 'next-themes';
|
|
39
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
40
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
41
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
42
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
43
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
44
|
+
|
|
45
|
+
// src/new-york/accordion.tsx
|
|
46
|
+
function cn(...inputs) {
|
|
47
|
+
return twMerge(clsx(inputs));
|
|
48
|
+
}
|
|
49
|
+
function Accordion({
|
|
50
|
+
...props
|
|
51
|
+
}) {
|
|
52
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
53
|
+
}
|
|
54
|
+
function AccordionItem({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
AccordionPrimitive.Item,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "accordion-item",
|
|
62
|
+
className: cn("border-b last:border-b-0", className),
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function AccordionTrigger({
|
|
68
|
+
className,
|
|
69
|
+
children,
|
|
70
|
+
...props
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
73
|
+
AccordionPrimitive.Trigger,
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "accordion-trigger",
|
|
76
|
+
className: cn(
|
|
77
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
...props,
|
|
81
|
+
children: [
|
|
82
|
+
children,
|
|
83
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
) });
|
|
87
|
+
}
|
|
88
|
+
function AccordionContent({
|
|
89
|
+
className,
|
|
90
|
+
children,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
AccordionPrimitive.Content,
|
|
95
|
+
{
|
|
96
|
+
"data-slot": "accordion-content",
|
|
97
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
98
|
+
...props,
|
|
99
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
var buttonVariants = cva(
|
|
104
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
105
|
+
{
|
|
106
|
+
variants: {
|
|
107
|
+
variant: {
|
|
108
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
109
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
110
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
111
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
112
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
113
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
114
|
+
},
|
|
115
|
+
size: {
|
|
116
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
117
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
118
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
119
|
+
icon: "size-9",
|
|
120
|
+
"icon-sm": "size-8",
|
|
121
|
+
"icon-lg": "size-10"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
defaultVariants: {
|
|
125
|
+
variant: "default",
|
|
126
|
+
size: "default"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
function Button({
|
|
131
|
+
className,
|
|
132
|
+
variant,
|
|
133
|
+
size,
|
|
134
|
+
asChild = false,
|
|
135
|
+
...props
|
|
136
|
+
}) {
|
|
137
|
+
const Comp = asChild ? Slot : "button";
|
|
138
|
+
return /* @__PURE__ */ jsx(
|
|
139
|
+
Comp,
|
|
140
|
+
{
|
|
141
|
+
"data-slot": "button",
|
|
142
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
function AlertDialog({
|
|
148
|
+
...props
|
|
149
|
+
}) {
|
|
150
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
151
|
+
}
|
|
152
|
+
function AlertDialogTrigger({
|
|
153
|
+
...props
|
|
154
|
+
}) {
|
|
155
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
156
|
+
}
|
|
157
|
+
function AlertDialogPortal({
|
|
158
|
+
...props
|
|
159
|
+
}) {
|
|
160
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
161
|
+
}
|
|
162
|
+
function AlertDialogOverlay({
|
|
163
|
+
className,
|
|
164
|
+
...props
|
|
165
|
+
}) {
|
|
166
|
+
return /* @__PURE__ */ jsx(
|
|
167
|
+
AlertDialogPrimitive.Overlay,
|
|
168
|
+
{
|
|
169
|
+
"data-slot": "alert-dialog-overlay",
|
|
170
|
+
className: cn(
|
|
171
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
172
|
+
className
|
|
173
|
+
),
|
|
174
|
+
...props
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
function AlertDialogContent({
|
|
179
|
+
className,
|
|
180
|
+
...props
|
|
181
|
+
}) {
|
|
182
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
183
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
185
|
+
AlertDialogPrimitive.Content,
|
|
186
|
+
{
|
|
187
|
+
"data-slot": "alert-dialog-content",
|
|
188
|
+
className: cn(
|
|
189
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
190
|
+
className
|
|
191
|
+
),
|
|
192
|
+
...props
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] });
|
|
196
|
+
}
|
|
197
|
+
function AlertDialogHeader({
|
|
198
|
+
className,
|
|
199
|
+
...props
|
|
200
|
+
}) {
|
|
201
|
+
return /* @__PURE__ */ jsx(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
"data-slot": "alert-dialog-header",
|
|
205
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
206
|
+
...props
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
function AlertDialogFooter({
|
|
211
|
+
className,
|
|
212
|
+
...props
|
|
213
|
+
}) {
|
|
214
|
+
return /* @__PURE__ */ jsx(
|
|
215
|
+
"div",
|
|
216
|
+
{
|
|
217
|
+
"data-slot": "alert-dialog-footer",
|
|
218
|
+
className: cn(
|
|
219
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
220
|
+
className
|
|
221
|
+
),
|
|
222
|
+
...props
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
function AlertDialogTitle({
|
|
227
|
+
className,
|
|
228
|
+
...props
|
|
229
|
+
}) {
|
|
230
|
+
return /* @__PURE__ */ jsx(
|
|
231
|
+
AlertDialogPrimitive.Title,
|
|
232
|
+
{
|
|
233
|
+
"data-slot": "alert-dialog-title",
|
|
234
|
+
className: cn("text-lg font-semibold", className),
|
|
235
|
+
...props
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
function AlertDialogDescription({
|
|
240
|
+
className,
|
|
241
|
+
...props
|
|
242
|
+
}) {
|
|
243
|
+
return /* @__PURE__ */ jsx(
|
|
244
|
+
AlertDialogPrimitive.Description,
|
|
245
|
+
{
|
|
246
|
+
"data-slot": "alert-dialog-description",
|
|
247
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
248
|
+
...props
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
function AlertDialogAction({
|
|
253
|
+
className,
|
|
254
|
+
...props
|
|
255
|
+
}) {
|
|
256
|
+
return /* @__PURE__ */ jsx(
|
|
257
|
+
AlertDialogPrimitive.Action,
|
|
258
|
+
{
|
|
259
|
+
className: cn(buttonVariants(), className),
|
|
260
|
+
...props
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
function AlertDialogCancel({
|
|
265
|
+
className,
|
|
266
|
+
...props
|
|
267
|
+
}) {
|
|
268
|
+
return /* @__PURE__ */ jsx(
|
|
269
|
+
AlertDialogPrimitive.Cancel,
|
|
270
|
+
{
|
|
271
|
+
className: cn(buttonVariants({ variant: "outline" }), className),
|
|
272
|
+
...props
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
var alertVariants = cva(
|
|
277
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
278
|
+
{
|
|
279
|
+
variants: {
|
|
280
|
+
variant: {
|
|
281
|
+
default: "bg-card text-card-foreground",
|
|
282
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
defaultVariants: {
|
|
286
|
+
variant: "default"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
function Alert({
|
|
291
|
+
className,
|
|
292
|
+
variant,
|
|
293
|
+
...props
|
|
294
|
+
}) {
|
|
295
|
+
return /* @__PURE__ */ jsx(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
"data-slot": "alert",
|
|
299
|
+
role: "alert",
|
|
300
|
+
className: cn(alertVariants({ variant }), className),
|
|
301
|
+
...props
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
function AlertTitle({ className, ...props }) {
|
|
306
|
+
return /* @__PURE__ */ jsx(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
"data-slot": "alert-title",
|
|
310
|
+
className: cn(
|
|
311
|
+
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
312
|
+
className
|
|
313
|
+
),
|
|
314
|
+
...props
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
function AlertDescription({
|
|
319
|
+
className,
|
|
320
|
+
...props
|
|
321
|
+
}) {
|
|
322
|
+
return /* @__PURE__ */ jsx(
|
|
323
|
+
"div",
|
|
324
|
+
{
|
|
325
|
+
"data-slot": "alert-description",
|
|
326
|
+
className: cn(
|
|
327
|
+
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
328
|
+
className
|
|
329
|
+
),
|
|
330
|
+
...props
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
function AspectRatio({
|
|
335
|
+
...props
|
|
336
|
+
}) {
|
|
337
|
+
return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
338
|
+
}
|
|
339
|
+
function Avatar({
|
|
340
|
+
className,
|
|
341
|
+
...props
|
|
342
|
+
}) {
|
|
343
|
+
return /* @__PURE__ */ jsx(
|
|
344
|
+
AvatarPrimitive.Root,
|
|
345
|
+
{
|
|
346
|
+
"data-slot": "avatar",
|
|
347
|
+
className: cn(
|
|
348
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
349
|
+
className
|
|
350
|
+
),
|
|
351
|
+
...props
|
|
352
|
+
}
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
function AvatarImage({
|
|
356
|
+
className,
|
|
357
|
+
...props
|
|
358
|
+
}) {
|
|
359
|
+
return /* @__PURE__ */ jsx(
|
|
360
|
+
AvatarPrimitive.Image,
|
|
361
|
+
{
|
|
362
|
+
"data-slot": "avatar-image",
|
|
363
|
+
className: cn("aspect-square size-full", className),
|
|
364
|
+
...props
|
|
365
|
+
}
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
function AvatarFallback({
|
|
369
|
+
className,
|
|
370
|
+
...props
|
|
371
|
+
}) {
|
|
372
|
+
return /* @__PURE__ */ jsx(
|
|
373
|
+
AvatarPrimitive.Fallback,
|
|
374
|
+
{
|
|
375
|
+
"data-slot": "avatar-fallback",
|
|
376
|
+
className: cn(
|
|
377
|
+
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
378
|
+
className
|
|
379
|
+
),
|
|
380
|
+
...props
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
var badgeVariants = cva(
|
|
385
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
386
|
+
{
|
|
387
|
+
variants: {
|
|
388
|
+
variant: {
|
|
389
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
390
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
391
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
392
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
defaultVariants: {
|
|
396
|
+
variant: "default"
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
function Badge({
|
|
401
|
+
className,
|
|
402
|
+
variant,
|
|
403
|
+
asChild = false,
|
|
404
|
+
...props
|
|
405
|
+
}) {
|
|
406
|
+
const Comp = asChild ? Slot : "span";
|
|
407
|
+
return /* @__PURE__ */ jsx(
|
|
408
|
+
Comp,
|
|
409
|
+
{
|
|
410
|
+
"data-slot": "badge",
|
|
411
|
+
className: cn(badgeVariants({ variant }), className),
|
|
412
|
+
...props
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
function Breadcrumb({ ...props }) {
|
|
417
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
418
|
+
}
|
|
419
|
+
function BreadcrumbList({ className, ...props }) {
|
|
420
|
+
return /* @__PURE__ */ jsx(
|
|
421
|
+
"ol",
|
|
422
|
+
{
|
|
423
|
+
"data-slot": "breadcrumb-list",
|
|
424
|
+
className: cn(
|
|
425
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
426
|
+
className
|
|
427
|
+
),
|
|
428
|
+
...props
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
433
|
+
return /* @__PURE__ */ jsx(
|
|
434
|
+
"li",
|
|
435
|
+
{
|
|
436
|
+
"data-slot": "breadcrumb-item",
|
|
437
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
438
|
+
...props
|
|
439
|
+
}
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
function BreadcrumbLink({
|
|
443
|
+
asChild,
|
|
444
|
+
className,
|
|
445
|
+
...props
|
|
446
|
+
}) {
|
|
447
|
+
const Comp = asChild ? Slot : "a";
|
|
448
|
+
return /* @__PURE__ */ jsx(
|
|
449
|
+
Comp,
|
|
450
|
+
{
|
|
451
|
+
"data-slot": "breadcrumb-link",
|
|
452
|
+
className: cn("hover:text-foreground transition-colors", className),
|
|
453
|
+
...props
|
|
454
|
+
}
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
458
|
+
return /* @__PURE__ */ jsx(
|
|
459
|
+
"span",
|
|
460
|
+
{
|
|
461
|
+
"data-slot": "breadcrumb-page",
|
|
462
|
+
role: "link",
|
|
463
|
+
"aria-disabled": "true",
|
|
464
|
+
"aria-current": "page",
|
|
465
|
+
className: cn("text-foreground font-normal", className),
|
|
466
|
+
...props
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
function BreadcrumbSeparator({
|
|
471
|
+
children,
|
|
472
|
+
className,
|
|
473
|
+
...props
|
|
474
|
+
}) {
|
|
475
|
+
return /* @__PURE__ */ jsx(
|
|
476
|
+
"li",
|
|
477
|
+
{
|
|
478
|
+
"data-slot": "breadcrumb-separator",
|
|
479
|
+
role: "presentation",
|
|
480
|
+
"aria-hidden": "true",
|
|
481
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
482
|
+
...props,
|
|
483
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
function BreadcrumbEllipsis({
|
|
488
|
+
className,
|
|
489
|
+
...props
|
|
490
|
+
}) {
|
|
491
|
+
return /* @__PURE__ */ jsxs(
|
|
492
|
+
"span",
|
|
493
|
+
{
|
|
494
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
495
|
+
role: "presentation",
|
|
496
|
+
"aria-hidden": "true",
|
|
497
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
498
|
+
...props,
|
|
499
|
+
children: [
|
|
500
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
|
|
501
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
function Separator({
|
|
507
|
+
className,
|
|
508
|
+
orientation = "horizontal",
|
|
509
|
+
decorative = true,
|
|
510
|
+
...props
|
|
511
|
+
}) {
|
|
512
|
+
return /* @__PURE__ */ jsx(
|
|
513
|
+
SeparatorPrimitive.Root,
|
|
514
|
+
{
|
|
515
|
+
"data-slot": "separator",
|
|
516
|
+
decorative,
|
|
517
|
+
orientation,
|
|
518
|
+
className: cn(
|
|
519
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
520
|
+
className
|
|
521
|
+
),
|
|
522
|
+
...props
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
var buttonGroupVariants = cva(
|
|
527
|
+
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
528
|
+
{
|
|
529
|
+
variants: {
|
|
530
|
+
orientation: {
|
|
531
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
532
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
defaultVariants: {
|
|
536
|
+
orientation: "horizontal"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
);
|
|
540
|
+
function ButtonGroup({
|
|
541
|
+
className,
|
|
542
|
+
orientation,
|
|
543
|
+
...props
|
|
544
|
+
}) {
|
|
545
|
+
return /* @__PURE__ */ jsx(
|
|
546
|
+
"div",
|
|
547
|
+
{
|
|
548
|
+
role: "group",
|
|
549
|
+
"data-slot": "button-group",
|
|
550
|
+
"data-orientation": orientation,
|
|
551
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
552
|
+
...props
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
function ButtonGroupText({
|
|
557
|
+
className,
|
|
558
|
+
asChild = false,
|
|
559
|
+
...props
|
|
560
|
+
}) {
|
|
561
|
+
const Comp = asChild ? Slot : "div";
|
|
562
|
+
return /* @__PURE__ */ jsx(
|
|
563
|
+
Comp,
|
|
564
|
+
{
|
|
565
|
+
className: cn(
|
|
566
|
+
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
567
|
+
className
|
|
568
|
+
),
|
|
569
|
+
...props
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
function ButtonGroupSeparator({
|
|
574
|
+
className,
|
|
575
|
+
orientation = "vertical",
|
|
576
|
+
...props
|
|
577
|
+
}) {
|
|
578
|
+
return /* @__PURE__ */ jsx(
|
|
579
|
+
Separator,
|
|
580
|
+
{
|
|
581
|
+
"data-slot": "button-group-separator",
|
|
582
|
+
orientation,
|
|
583
|
+
className: cn(
|
|
584
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
585
|
+
className
|
|
586
|
+
),
|
|
587
|
+
...props
|
|
588
|
+
}
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
function Calendar({
|
|
592
|
+
className,
|
|
593
|
+
classNames,
|
|
594
|
+
showOutsideDays = true,
|
|
595
|
+
captionLayout = "label",
|
|
596
|
+
buttonVariant = "ghost",
|
|
597
|
+
formatters,
|
|
598
|
+
components,
|
|
599
|
+
...props
|
|
600
|
+
}) {
|
|
601
|
+
const defaultClassNames = getDefaultClassNames();
|
|
602
|
+
return /* @__PURE__ */ jsx(
|
|
603
|
+
DayPicker,
|
|
604
|
+
{
|
|
605
|
+
showOutsideDays,
|
|
606
|
+
className: cn(
|
|
607
|
+
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
608
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
609
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
610
|
+
className
|
|
611
|
+
),
|
|
612
|
+
captionLayout,
|
|
613
|
+
formatters: {
|
|
614
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
615
|
+
...formatters
|
|
616
|
+
},
|
|
617
|
+
classNames: {
|
|
618
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
619
|
+
months: cn(
|
|
620
|
+
"flex gap-4 flex-col md:flex-row relative",
|
|
621
|
+
defaultClassNames.months
|
|
622
|
+
),
|
|
623
|
+
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
624
|
+
nav: cn(
|
|
625
|
+
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
626
|
+
defaultClassNames.nav
|
|
627
|
+
),
|
|
628
|
+
button_previous: cn(
|
|
629
|
+
buttonVariants({ variant: buttonVariant }),
|
|
630
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
631
|
+
defaultClassNames.button_previous
|
|
632
|
+
),
|
|
633
|
+
button_next: cn(
|
|
634
|
+
buttonVariants({ variant: buttonVariant }),
|
|
635
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
636
|
+
defaultClassNames.button_next
|
|
637
|
+
),
|
|
638
|
+
month_caption: cn(
|
|
639
|
+
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
640
|
+
defaultClassNames.month_caption
|
|
641
|
+
),
|
|
642
|
+
dropdowns: cn(
|
|
643
|
+
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
644
|
+
defaultClassNames.dropdowns
|
|
645
|
+
),
|
|
646
|
+
dropdown_root: cn(
|
|
647
|
+
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
648
|
+
defaultClassNames.dropdown_root
|
|
649
|
+
),
|
|
650
|
+
dropdown: cn(
|
|
651
|
+
"absolute bg-popover inset-0 opacity-0",
|
|
652
|
+
defaultClassNames.dropdown
|
|
653
|
+
),
|
|
654
|
+
caption_label: cn(
|
|
655
|
+
"select-none font-medium",
|
|
656
|
+
captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
657
|
+
defaultClassNames.caption_label
|
|
658
|
+
),
|
|
659
|
+
table: "w-full border-collapse",
|
|
660
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
661
|
+
weekday: cn(
|
|
662
|
+
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
663
|
+
defaultClassNames.weekday
|
|
664
|
+
),
|
|
665
|
+
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
666
|
+
week_number_header: cn(
|
|
667
|
+
"select-none w-(--cell-size)",
|
|
668
|
+
defaultClassNames.week_number_header
|
|
669
|
+
),
|
|
670
|
+
week_number: cn(
|
|
671
|
+
"text-[0.8rem] select-none text-muted-foreground",
|
|
672
|
+
defaultClassNames.week_number
|
|
673
|
+
),
|
|
674
|
+
day: cn(
|
|
675
|
+
"relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
676
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
677
|
+
defaultClassNames.day
|
|
678
|
+
),
|
|
679
|
+
range_start: cn(
|
|
680
|
+
"rounded-l-md bg-accent",
|
|
681
|
+
defaultClassNames.range_start
|
|
682
|
+
),
|
|
683
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
684
|
+
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
685
|
+
today: cn(
|
|
686
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
687
|
+
defaultClassNames.today
|
|
688
|
+
),
|
|
689
|
+
outside: cn(
|
|
690
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
691
|
+
defaultClassNames.outside
|
|
692
|
+
),
|
|
693
|
+
disabled: cn(
|
|
694
|
+
"text-muted-foreground opacity-50",
|
|
695
|
+
defaultClassNames.disabled
|
|
696
|
+
),
|
|
697
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
698
|
+
...classNames
|
|
699
|
+
},
|
|
700
|
+
components: {
|
|
701
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
702
|
+
return /* @__PURE__ */ jsx(
|
|
703
|
+
"div",
|
|
704
|
+
{
|
|
705
|
+
"data-slot": "calendar",
|
|
706
|
+
ref: rootRef,
|
|
707
|
+
className: cn(className2),
|
|
708
|
+
...props2
|
|
709
|
+
}
|
|
710
|
+
);
|
|
711
|
+
},
|
|
712
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
713
|
+
if (orientation === "left") {
|
|
714
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
715
|
+
}
|
|
716
|
+
if (orientation === "right") {
|
|
717
|
+
return /* @__PURE__ */ jsx(
|
|
718
|
+
ChevronRightIcon,
|
|
719
|
+
{
|
|
720
|
+
className: cn("size-4", className2),
|
|
721
|
+
...props2
|
|
722
|
+
}
|
|
723
|
+
);
|
|
724
|
+
}
|
|
725
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
726
|
+
},
|
|
727
|
+
DayButton: CalendarDayButton,
|
|
728
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
729
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
730
|
+
},
|
|
731
|
+
...components
|
|
732
|
+
},
|
|
733
|
+
...props
|
|
734
|
+
}
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
function CalendarDayButton({
|
|
738
|
+
className,
|
|
739
|
+
day,
|
|
740
|
+
modifiers,
|
|
741
|
+
...props
|
|
742
|
+
}) {
|
|
743
|
+
const defaultClassNames = getDefaultClassNames();
|
|
744
|
+
const ref = React2.useRef(null);
|
|
745
|
+
React2.useEffect(() => {
|
|
746
|
+
if (modifiers.focused) ref.current?.focus();
|
|
747
|
+
}, [modifiers.focused]);
|
|
748
|
+
return /* @__PURE__ */ jsx(
|
|
749
|
+
Button,
|
|
750
|
+
{
|
|
751
|
+
ref,
|
|
752
|
+
variant: "ghost",
|
|
753
|
+
size: "icon",
|
|
754
|
+
"data-day": day.date.toLocaleDateString(),
|
|
755
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
756
|
+
"data-range-start": modifiers.range_start,
|
|
757
|
+
"data-range-end": modifiers.range_end,
|
|
758
|
+
"data-range-middle": modifiers.range_middle,
|
|
759
|
+
className: cn(
|
|
760
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
761
|
+
defaultClassNames.day,
|
|
762
|
+
className
|
|
763
|
+
),
|
|
764
|
+
...props
|
|
765
|
+
}
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
function Card({ className, ...props }) {
|
|
769
|
+
return /* @__PURE__ */ jsx(
|
|
770
|
+
"div",
|
|
771
|
+
{
|
|
772
|
+
"data-slot": "card",
|
|
773
|
+
className: cn(
|
|
774
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
775
|
+
className
|
|
776
|
+
),
|
|
777
|
+
...props
|
|
778
|
+
}
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
function CardHeader({ className, ...props }) {
|
|
782
|
+
return /* @__PURE__ */ jsx(
|
|
783
|
+
"div",
|
|
784
|
+
{
|
|
785
|
+
"data-slot": "card-header",
|
|
786
|
+
className: cn(
|
|
787
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
788
|
+
className
|
|
789
|
+
),
|
|
790
|
+
...props
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
function CardTitle({ className, ...props }) {
|
|
795
|
+
return /* @__PURE__ */ jsx(
|
|
796
|
+
"div",
|
|
797
|
+
{
|
|
798
|
+
"data-slot": "card-title",
|
|
799
|
+
className: cn("leading-none font-semibold", className),
|
|
800
|
+
...props
|
|
801
|
+
}
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
function CardDescription({ className, ...props }) {
|
|
805
|
+
return /* @__PURE__ */ jsx(
|
|
806
|
+
"div",
|
|
807
|
+
{
|
|
808
|
+
"data-slot": "card-description",
|
|
809
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
810
|
+
...props
|
|
811
|
+
}
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
function CardAction({ className, ...props }) {
|
|
815
|
+
return /* @__PURE__ */ jsx(
|
|
816
|
+
"div",
|
|
817
|
+
{
|
|
818
|
+
"data-slot": "card-action",
|
|
819
|
+
className: cn(
|
|
820
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
821
|
+
className
|
|
822
|
+
),
|
|
823
|
+
...props
|
|
824
|
+
}
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
function CardContent({ className, ...props }) {
|
|
828
|
+
return /* @__PURE__ */ jsx(
|
|
829
|
+
"div",
|
|
830
|
+
{
|
|
831
|
+
"data-slot": "card-content",
|
|
832
|
+
className: cn("px-6", className),
|
|
833
|
+
...props
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
function CardFooter({ className, ...props }) {
|
|
838
|
+
return /* @__PURE__ */ jsx(
|
|
839
|
+
"div",
|
|
840
|
+
{
|
|
841
|
+
"data-slot": "card-footer",
|
|
842
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
843
|
+
...props
|
|
844
|
+
}
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
var CarouselContext = React2.createContext(null);
|
|
848
|
+
function useCarousel() {
|
|
849
|
+
const context = React2.useContext(CarouselContext);
|
|
850
|
+
if (!context) {
|
|
851
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
852
|
+
}
|
|
853
|
+
return context;
|
|
854
|
+
}
|
|
855
|
+
function Carousel({
|
|
856
|
+
orientation = "horizontal",
|
|
857
|
+
opts,
|
|
858
|
+
setApi,
|
|
859
|
+
plugins,
|
|
860
|
+
className,
|
|
861
|
+
children,
|
|
862
|
+
...props
|
|
863
|
+
}) {
|
|
864
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
865
|
+
{
|
|
866
|
+
...opts,
|
|
867
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
868
|
+
},
|
|
869
|
+
plugins
|
|
870
|
+
);
|
|
871
|
+
const [canScrollPrev, setCanScrollPrev] = React2.useState(false);
|
|
872
|
+
const [canScrollNext, setCanScrollNext] = React2.useState(false);
|
|
873
|
+
const onSelect = React2.useCallback((api2) => {
|
|
874
|
+
if (!api2) return;
|
|
875
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
876
|
+
setCanScrollNext(api2.canScrollNext());
|
|
877
|
+
}, []);
|
|
878
|
+
const scrollPrev = React2.useCallback(() => {
|
|
879
|
+
api?.scrollPrev();
|
|
880
|
+
}, [api]);
|
|
881
|
+
const scrollNext = React2.useCallback(() => {
|
|
882
|
+
api?.scrollNext();
|
|
883
|
+
}, [api]);
|
|
884
|
+
const handleKeyDown = React2.useCallback(
|
|
885
|
+
(event) => {
|
|
886
|
+
if (event.key === "ArrowLeft") {
|
|
887
|
+
event.preventDefault();
|
|
888
|
+
scrollPrev();
|
|
889
|
+
} else if (event.key === "ArrowRight") {
|
|
890
|
+
event.preventDefault();
|
|
891
|
+
scrollNext();
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
[scrollPrev, scrollNext]
|
|
895
|
+
);
|
|
896
|
+
React2.useEffect(() => {
|
|
897
|
+
if (!api || !setApi) return;
|
|
898
|
+
setApi(api);
|
|
899
|
+
}, [api, setApi]);
|
|
900
|
+
React2.useEffect(() => {
|
|
901
|
+
if (!api) return;
|
|
902
|
+
onSelect(api);
|
|
903
|
+
api.on("reInit", onSelect);
|
|
904
|
+
api.on("select", onSelect);
|
|
905
|
+
return () => {
|
|
906
|
+
api?.off("select", onSelect);
|
|
907
|
+
};
|
|
908
|
+
}, [api, onSelect]);
|
|
909
|
+
return /* @__PURE__ */ jsx(
|
|
910
|
+
CarouselContext.Provider,
|
|
911
|
+
{
|
|
912
|
+
value: {
|
|
913
|
+
carouselRef,
|
|
914
|
+
api,
|
|
915
|
+
opts,
|
|
916
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
917
|
+
scrollPrev,
|
|
918
|
+
scrollNext,
|
|
919
|
+
canScrollPrev,
|
|
920
|
+
canScrollNext
|
|
921
|
+
},
|
|
922
|
+
children: /* @__PURE__ */ jsx(
|
|
923
|
+
"div",
|
|
924
|
+
{
|
|
925
|
+
onKeyDownCapture: handleKeyDown,
|
|
926
|
+
className: cn("relative", className),
|
|
927
|
+
role: "region",
|
|
928
|
+
"aria-roledescription": "carousel",
|
|
929
|
+
"data-slot": "carousel",
|
|
930
|
+
...props,
|
|
931
|
+
children
|
|
932
|
+
}
|
|
933
|
+
)
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
function CarouselContent({ className, ...props }) {
|
|
938
|
+
const { carouselRef, orientation } = useCarousel();
|
|
939
|
+
return /* @__PURE__ */ jsx(
|
|
940
|
+
"div",
|
|
941
|
+
{
|
|
942
|
+
ref: carouselRef,
|
|
943
|
+
className: "overflow-hidden",
|
|
944
|
+
"data-slot": "carousel-content",
|
|
945
|
+
children: /* @__PURE__ */ jsx(
|
|
946
|
+
"div",
|
|
947
|
+
{
|
|
948
|
+
className: cn(
|
|
949
|
+
"flex",
|
|
950
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
951
|
+
className
|
|
952
|
+
),
|
|
953
|
+
...props
|
|
954
|
+
}
|
|
955
|
+
)
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
function CarouselItem({ className, ...props }) {
|
|
960
|
+
const { orientation } = useCarousel();
|
|
961
|
+
return /* @__PURE__ */ jsx(
|
|
962
|
+
"div",
|
|
963
|
+
{
|
|
964
|
+
role: "group",
|
|
965
|
+
"aria-roledescription": "slide",
|
|
966
|
+
"data-slot": "carousel-item",
|
|
967
|
+
className: cn(
|
|
968
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
969
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
970
|
+
className
|
|
971
|
+
),
|
|
972
|
+
...props
|
|
973
|
+
}
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
function CarouselPrevious({
|
|
977
|
+
className,
|
|
978
|
+
variant = "outline",
|
|
979
|
+
size = "icon",
|
|
980
|
+
...props
|
|
981
|
+
}) {
|
|
982
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
983
|
+
return /* @__PURE__ */ jsxs(
|
|
984
|
+
Button,
|
|
985
|
+
{
|
|
986
|
+
"data-slot": "carousel-previous",
|
|
987
|
+
variant,
|
|
988
|
+
size,
|
|
989
|
+
className: cn(
|
|
990
|
+
"absolute size-8 rounded-full",
|
|
991
|
+
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
992
|
+
className
|
|
993
|
+
),
|
|
994
|
+
disabled: !canScrollPrev,
|
|
995
|
+
onClick: scrollPrev,
|
|
996
|
+
...props,
|
|
997
|
+
children: [
|
|
998
|
+
/* @__PURE__ */ jsx(ArrowLeft, {}),
|
|
999
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
function CarouselNext({
|
|
1005
|
+
className,
|
|
1006
|
+
variant = "outline",
|
|
1007
|
+
size = "icon",
|
|
1008
|
+
...props
|
|
1009
|
+
}) {
|
|
1010
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1011
|
+
return /* @__PURE__ */ jsxs(
|
|
1012
|
+
Button,
|
|
1013
|
+
{
|
|
1014
|
+
"data-slot": "carousel-next",
|
|
1015
|
+
variant,
|
|
1016
|
+
size,
|
|
1017
|
+
className: cn(
|
|
1018
|
+
"absolute size-8 rounded-full",
|
|
1019
|
+
orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1020
|
+
className
|
|
1021
|
+
),
|
|
1022
|
+
disabled: !canScrollNext,
|
|
1023
|
+
onClick: scrollNext,
|
|
1024
|
+
...props,
|
|
1025
|
+
children: [
|
|
1026
|
+
/* @__PURE__ */ jsx(ArrowRight, {}),
|
|
1027
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
1028
|
+
]
|
|
1029
|
+
}
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
1033
|
+
var ChartContext = React2.createContext(null);
|
|
1034
|
+
function useChart() {
|
|
1035
|
+
const context = React2.useContext(ChartContext);
|
|
1036
|
+
if (!context) {
|
|
1037
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1038
|
+
}
|
|
1039
|
+
return context;
|
|
1040
|
+
}
|
|
1041
|
+
function ChartContainer({
|
|
1042
|
+
id,
|
|
1043
|
+
className,
|
|
1044
|
+
children,
|
|
1045
|
+
config,
|
|
1046
|
+
...props
|
|
1047
|
+
}) {
|
|
1048
|
+
const uniqueId = React2.useId();
|
|
1049
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
1050
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
1051
|
+
"div",
|
|
1052
|
+
{
|
|
1053
|
+
"data-slot": "chart",
|
|
1054
|
+
"data-chart": chartId,
|
|
1055
|
+
className: cn(
|
|
1056
|
+
"[&_.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-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 flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
1057
|
+
className
|
|
1058
|
+
),
|
|
1059
|
+
...props,
|
|
1060
|
+
children: [
|
|
1061
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
1062
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
) });
|
|
1066
|
+
}
|
|
1067
|
+
var ChartStyle = ({ id, config }) => {
|
|
1068
|
+
const colorConfig = Object.entries(config).filter(
|
|
1069
|
+
([, config2]) => config2.theme || config2.color
|
|
1070
|
+
);
|
|
1071
|
+
if (!colorConfig.length) {
|
|
1072
|
+
return null;
|
|
1073
|
+
}
|
|
1074
|
+
return /* @__PURE__ */ jsx(
|
|
1075
|
+
"style",
|
|
1076
|
+
{
|
|
1077
|
+
dangerouslySetInnerHTML: {
|
|
1078
|
+
__html: Object.entries(THEMES).map(
|
|
1079
|
+
([theme, prefix]) => `
|
|
1080
|
+
${prefix} [data-chart=${id}] {
|
|
1081
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
1082
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
1083
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
1084
|
+
}).join("\n")}
|
|
1085
|
+
}
|
|
1086
|
+
`
|
|
1087
|
+
).join("\n")
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1091
|
+
};
|
|
1092
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
1093
|
+
function ChartTooltipContent({
|
|
1094
|
+
active,
|
|
1095
|
+
payload,
|
|
1096
|
+
className,
|
|
1097
|
+
indicator = "dot",
|
|
1098
|
+
hideLabel = false,
|
|
1099
|
+
hideIndicator = false,
|
|
1100
|
+
label,
|
|
1101
|
+
labelFormatter,
|
|
1102
|
+
labelClassName,
|
|
1103
|
+
formatter,
|
|
1104
|
+
color,
|
|
1105
|
+
nameKey,
|
|
1106
|
+
labelKey
|
|
1107
|
+
}) {
|
|
1108
|
+
const { config } = useChart();
|
|
1109
|
+
const tooltipLabel = React2.useMemo(() => {
|
|
1110
|
+
if (hideLabel || !payload?.length) {
|
|
1111
|
+
return null;
|
|
1112
|
+
}
|
|
1113
|
+
const [item] = payload;
|
|
1114
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
1115
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1116
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
1117
|
+
if (labelFormatter) {
|
|
1118
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
1119
|
+
}
|
|
1120
|
+
if (!value) {
|
|
1121
|
+
return null;
|
|
1122
|
+
}
|
|
1123
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
1124
|
+
}, [
|
|
1125
|
+
label,
|
|
1126
|
+
labelFormatter,
|
|
1127
|
+
payload,
|
|
1128
|
+
hideLabel,
|
|
1129
|
+
labelClassName,
|
|
1130
|
+
config,
|
|
1131
|
+
labelKey
|
|
1132
|
+
]);
|
|
1133
|
+
if (!active || !payload?.length) {
|
|
1134
|
+
return null;
|
|
1135
|
+
}
|
|
1136
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
1137
|
+
return /* @__PURE__ */ jsxs(
|
|
1138
|
+
"div",
|
|
1139
|
+
{
|
|
1140
|
+
className: cn(
|
|
1141
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
1142
|
+
className
|
|
1143
|
+
),
|
|
1144
|
+
children: [
|
|
1145
|
+
!nestLabel ? tooltipLabel : null,
|
|
1146
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
1147
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
1148
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1149
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
1150
|
+
return /* @__PURE__ */ jsx(
|
|
1151
|
+
"div",
|
|
1152
|
+
{
|
|
1153
|
+
className: cn(
|
|
1154
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
1155
|
+
indicator === "dot" && "items-center"
|
|
1156
|
+
),
|
|
1157
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1158
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
1159
|
+
"div",
|
|
1160
|
+
{
|
|
1161
|
+
className: cn(
|
|
1162
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
1163
|
+
{
|
|
1164
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
1165
|
+
"w-1": indicator === "line",
|
|
1166
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
1167
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
1168
|
+
}
|
|
1169
|
+
),
|
|
1170
|
+
style: {
|
|
1171
|
+
"--color-bg": indicatorColor,
|
|
1172
|
+
"--color-border": indicatorColor
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
),
|
|
1176
|
+
/* @__PURE__ */ jsxs(
|
|
1177
|
+
"div",
|
|
1178
|
+
{
|
|
1179
|
+
className: cn(
|
|
1180
|
+
"flex flex-1 justify-between leading-none",
|
|
1181
|
+
nestLabel ? "items-end" : "items-center"
|
|
1182
|
+
),
|
|
1183
|
+
children: [
|
|
1184
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
1185
|
+
nestLabel ? tooltipLabel : null,
|
|
1186
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
1187
|
+
] }),
|
|
1188
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
1189
|
+
]
|
|
1190
|
+
}
|
|
1191
|
+
)
|
|
1192
|
+
] })
|
|
1193
|
+
},
|
|
1194
|
+
item.dataKey
|
|
1195
|
+
);
|
|
1196
|
+
}) })
|
|
1197
|
+
]
|
|
1198
|
+
}
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
1202
|
+
function ChartLegendContent({
|
|
1203
|
+
className,
|
|
1204
|
+
hideIcon = false,
|
|
1205
|
+
payload,
|
|
1206
|
+
verticalAlign = "bottom",
|
|
1207
|
+
nameKey
|
|
1208
|
+
}) {
|
|
1209
|
+
const { config } = useChart();
|
|
1210
|
+
if (!payload?.length) {
|
|
1211
|
+
return null;
|
|
1212
|
+
}
|
|
1213
|
+
return /* @__PURE__ */ jsx(
|
|
1214
|
+
"div",
|
|
1215
|
+
{
|
|
1216
|
+
className: cn(
|
|
1217
|
+
"flex items-center justify-center gap-4",
|
|
1218
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
1219
|
+
className
|
|
1220
|
+
),
|
|
1221
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
1222
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
1223
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1224
|
+
return /* @__PURE__ */ jsxs(
|
|
1225
|
+
"div",
|
|
1226
|
+
{
|
|
1227
|
+
className: cn(
|
|
1228
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
1229
|
+
),
|
|
1230
|
+
children: [
|
|
1231
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
1232
|
+
"div",
|
|
1233
|
+
{
|
|
1234
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
1235
|
+
style: {
|
|
1236
|
+
backgroundColor: item.color
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
),
|
|
1240
|
+
itemConfig?.label
|
|
1241
|
+
]
|
|
1242
|
+
},
|
|
1243
|
+
item.value
|
|
1244
|
+
);
|
|
1245
|
+
})
|
|
1246
|
+
}
|
|
1247
|
+
);
|
|
1248
|
+
}
|
|
1249
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
1250
|
+
if (typeof payload !== "object" || payload === null) {
|
|
1251
|
+
return void 0;
|
|
1252
|
+
}
|
|
1253
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
1254
|
+
let configLabelKey = key;
|
|
1255
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
1256
|
+
configLabelKey = payload[key];
|
|
1257
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
1258
|
+
configLabelKey = payloadPayload[key];
|
|
1259
|
+
}
|
|
1260
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
1261
|
+
}
|
|
1262
|
+
function Checkbox({
|
|
1263
|
+
className,
|
|
1264
|
+
...props
|
|
1265
|
+
}) {
|
|
1266
|
+
return /* @__PURE__ */ jsx(
|
|
1267
|
+
CheckboxPrimitive.Root,
|
|
1268
|
+
{
|
|
1269
|
+
"data-slot": "checkbox",
|
|
1270
|
+
className: cn(
|
|
1271
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
1272
|
+
className
|
|
1273
|
+
),
|
|
1274
|
+
...props,
|
|
1275
|
+
children: /* @__PURE__ */ jsx(
|
|
1276
|
+
CheckboxPrimitive.Indicator,
|
|
1277
|
+
{
|
|
1278
|
+
"data-slot": "checkbox-indicator",
|
|
1279
|
+
className: "grid place-content-center text-current transition-none",
|
|
1280
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
}
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
function Collapsible({
|
|
1287
|
+
...props
|
|
1288
|
+
}) {
|
|
1289
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
1290
|
+
}
|
|
1291
|
+
function CollapsibleTrigger2({
|
|
1292
|
+
...props
|
|
1293
|
+
}) {
|
|
1294
|
+
return /* @__PURE__ */ jsx(
|
|
1295
|
+
CollapsiblePrimitive.CollapsibleTrigger,
|
|
1296
|
+
{
|
|
1297
|
+
"data-slot": "collapsible-trigger",
|
|
1298
|
+
...props
|
|
1299
|
+
}
|
|
1300
|
+
);
|
|
1301
|
+
}
|
|
1302
|
+
function CollapsibleContent2({
|
|
1303
|
+
...props
|
|
1304
|
+
}) {
|
|
1305
|
+
return /* @__PURE__ */ jsx(
|
|
1306
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
1307
|
+
{
|
|
1308
|
+
"data-slot": "collapsible-content",
|
|
1309
|
+
...props
|
|
1310
|
+
}
|
|
1311
|
+
);
|
|
1312
|
+
}
|
|
1313
|
+
function Dialog({
|
|
1314
|
+
...props
|
|
1315
|
+
}) {
|
|
1316
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
1317
|
+
}
|
|
1318
|
+
function DialogTrigger({
|
|
1319
|
+
...props
|
|
1320
|
+
}) {
|
|
1321
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
1322
|
+
}
|
|
1323
|
+
function DialogPortal({
|
|
1324
|
+
...props
|
|
1325
|
+
}) {
|
|
1326
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
1327
|
+
}
|
|
1328
|
+
function DialogClose({
|
|
1329
|
+
...props
|
|
1330
|
+
}) {
|
|
1331
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
1332
|
+
}
|
|
1333
|
+
function DialogOverlay({
|
|
1334
|
+
className,
|
|
1335
|
+
...props
|
|
1336
|
+
}) {
|
|
1337
|
+
return /* @__PURE__ */ jsx(
|
|
1338
|
+
DialogPrimitive.Overlay,
|
|
1339
|
+
{
|
|
1340
|
+
"data-slot": "dialog-overlay",
|
|
1341
|
+
className: cn(
|
|
1342
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1343
|
+
className
|
|
1344
|
+
),
|
|
1345
|
+
...props
|
|
1346
|
+
}
|
|
1347
|
+
);
|
|
1348
|
+
}
|
|
1349
|
+
function DialogContent({
|
|
1350
|
+
className,
|
|
1351
|
+
children,
|
|
1352
|
+
showCloseButton = true,
|
|
1353
|
+
...props
|
|
1354
|
+
}) {
|
|
1355
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
1356
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1357
|
+
/* @__PURE__ */ jsxs(
|
|
1358
|
+
DialogPrimitive.Content,
|
|
1359
|
+
{
|
|
1360
|
+
"data-slot": "dialog-content",
|
|
1361
|
+
className: cn(
|
|
1362
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
1363
|
+
className
|
|
1364
|
+
),
|
|
1365
|
+
...props,
|
|
1366
|
+
children: [
|
|
1367
|
+
children,
|
|
1368
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
1369
|
+
DialogPrimitive.Close,
|
|
1370
|
+
{
|
|
1371
|
+
"data-slot": "dialog-close",
|
|
1372
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1373
|
+
children: [
|
|
1374
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
1375
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
]
|
|
1380
|
+
}
|
|
1381
|
+
)
|
|
1382
|
+
] });
|
|
1383
|
+
}
|
|
1384
|
+
function DialogHeader({ className, ...props }) {
|
|
1385
|
+
return /* @__PURE__ */ jsx(
|
|
1386
|
+
"div",
|
|
1387
|
+
{
|
|
1388
|
+
"data-slot": "dialog-header",
|
|
1389
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
1390
|
+
...props
|
|
1391
|
+
}
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
function DialogFooter({ className, ...props }) {
|
|
1395
|
+
return /* @__PURE__ */ jsx(
|
|
1396
|
+
"div",
|
|
1397
|
+
{
|
|
1398
|
+
"data-slot": "dialog-footer",
|
|
1399
|
+
className: cn(
|
|
1400
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
1401
|
+
className
|
|
1402
|
+
),
|
|
1403
|
+
...props
|
|
1404
|
+
}
|
|
1405
|
+
);
|
|
1406
|
+
}
|
|
1407
|
+
function DialogTitle({
|
|
1408
|
+
className,
|
|
1409
|
+
...props
|
|
1410
|
+
}) {
|
|
1411
|
+
return /* @__PURE__ */ jsx(
|
|
1412
|
+
DialogPrimitive.Title,
|
|
1413
|
+
{
|
|
1414
|
+
"data-slot": "dialog-title",
|
|
1415
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
1416
|
+
...props
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
function DialogDescription({
|
|
1421
|
+
className,
|
|
1422
|
+
...props
|
|
1423
|
+
}) {
|
|
1424
|
+
return /* @__PURE__ */ jsx(
|
|
1425
|
+
DialogPrimitive.Description,
|
|
1426
|
+
{
|
|
1427
|
+
"data-slot": "dialog-description",
|
|
1428
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1429
|
+
...props
|
|
1430
|
+
}
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
function Command({
|
|
1434
|
+
className,
|
|
1435
|
+
...props
|
|
1436
|
+
}) {
|
|
1437
|
+
return /* @__PURE__ */ jsx(
|
|
1438
|
+
Command$1,
|
|
1439
|
+
{
|
|
1440
|
+
"data-slot": "command",
|
|
1441
|
+
className: cn(
|
|
1442
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
1443
|
+
className
|
|
1444
|
+
),
|
|
1445
|
+
...props
|
|
1446
|
+
}
|
|
1447
|
+
);
|
|
1448
|
+
}
|
|
1449
|
+
function CommandDialog({
|
|
1450
|
+
title = "Command Palette",
|
|
1451
|
+
description = "Search for a command to run...",
|
|
1452
|
+
children,
|
|
1453
|
+
className,
|
|
1454
|
+
showCloseButton = true,
|
|
1455
|
+
...props
|
|
1456
|
+
}) {
|
|
1457
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
1458
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
1459
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
1460
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
1461
|
+
] }),
|
|
1462
|
+
/* @__PURE__ */ jsx(
|
|
1463
|
+
DialogContent,
|
|
1464
|
+
{
|
|
1465
|
+
className: cn("overflow-hidden p-0", className),
|
|
1466
|
+
showCloseButton,
|
|
1467
|
+
children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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 })
|
|
1468
|
+
}
|
|
1469
|
+
)
|
|
1470
|
+
] });
|
|
1471
|
+
}
|
|
1472
|
+
function CommandInput({
|
|
1473
|
+
className,
|
|
1474
|
+
...props
|
|
1475
|
+
}) {
|
|
1476
|
+
return /* @__PURE__ */ jsxs(
|
|
1477
|
+
"div",
|
|
1478
|
+
{
|
|
1479
|
+
"data-slot": "command-input-wrapper",
|
|
1480
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1481
|
+
children: [
|
|
1482
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1483
|
+
/* @__PURE__ */ jsx(
|
|
1484
|
+
Command$1.Input,
|
|
1485
|
+
{
|
|
1486
|
+
"data-slot": "command-input",
|
|
1487
|
+
className: cn(
|
|
1488
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1489
|
+
className
|
|
1490
|
+
),
|
|
1491
|
+
...props
|
|
1492
|
+
}
|
|
1493
|
+
)
|
|
1494
|
+
]
|
|
1495
|
+
}
|
|
1496
|
+
);
|
|
1497
|
+
}
|
|
1498
|
+
function CommandList({
|
|
1499
|
+
className,
|
|
1500
|
+
...props
|
|
1501
|
+
}) {
|
|
1502
|
+
return /* @__PURE__ */ jsx(
|
|
1503
|
+
Command$1.List,
|
|
1504
|
+
{
|
|
1505
|
+
"data-slot": "command-list",
|
|
1506
|
+
className: cn(
|
|
1507
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
1508
|
+
className
|
|
1509
|
+
),
|
|
1510
|
+
...props
|
|
1511
|
+
}
|
|
1512
|
+
);
|
|
1513
|
+
}
|
|
1514
|
+
function CommandEmpty({
|
|
1515
|
+
...props
|
|
1516
|
+
}) {
|
|
1517
|
+
return /* @__PURE__ */ jsx(
|
|
1518
|
+
Command$1.Empty,
|
|
1519
|
+
{
|
|
1520
|
+
"data-slot": "command-empty",
|
|
1521
|
+
className: "py-6 text-center text-sm",
|
|
1522
|
+
...props
|
|
1523
|
+
}
|
|
1524
|
+
);
|
|
1525
|
+
}
|
|
1526
|
+
function CommandGroup({
|
|
1527
|
+
className,
|
|
1528
|
+
...props
|
|
1529
|
+
}) {
|
|
1530
|
+
return /* @__PURE__ */ jsx(
|
|
1531
|
+
Command$1.Group,
|
|
1532
|
+
{
|
|
1533
|
+
"data-slot": "command-group",
|
|
1534
|
+
className: cn(
|
|
1535
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
1536
|
+
className
|
|
1537
|
+
),
|
|
1538
|
+
...props
|
|
1539
|
+
}
|
|
1540
|
+
);
|
|
1541
|
+
}
|
|
1542
|
+
function CommandSeparator({
|
|
1543
|
+
className,
|
|
1544
|
+
...props
|
|
1545
|
+
}) {
|
|
1546
|
+
return /* @__PURE__ */ jsx(
|
|
1547
|
+
Command$1.Separator,
|
|
1548
|
+
{
|
|
1549
|
+
"data-slot": "command-separator",
|
|
1550
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
1551
|
+
...props
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
function CommandItem({
|
|
1556
|
+
className,
|
|
1557
|
+
...props
|
|
1558
|
+
}) {
|
|
1559
|
+
return /* @__PURE__ */ jsx(
|
|
1560
|
+
Command$1.Item,
|
|
1561
|
+
{
|
|
1562
|
+
"data-slot": "command-item",
|
|
1563
|
+
className: cn(
|
|
1564
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1565
|
+
className
|
|
1566
|
+
),
|
|
1567
|
+
...props
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
function CommandShortcut({
|
|
1572
|
+
className,
|
|
1573
|
+
...props
|
|
1574
|
+
}) {
|
|
1575
|
+
return /* @__PURE__ */ jsx(
|
|
1576
|
+
"span",
|
|
1577
|
+
{
|
|
1578
|
+
"data-slot": "command-shortcut",
|
|
1579
|
+
className: cn(
|
|
1580
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
1581
|
+
className
|
|
1582
|
+
),
|
|
1583
|
+
...props
|
|
1584
|
+
}
|
|
1585
|
+
);
|
|
1586
|
+
}
|
|
1587
|
+
function ContextMenu({
|
|
1588
|
+
...props
|
|
1589
|
+
}) {
|
|
1590
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
1591
|
+
}
|
|
1592
|
+
function ContextMenuTrigger({
|
|
1593
|
+
...props
|
|
1594
|
+
}) {
|
|
1595
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
1596
|
+
}
|
|
1597
|
+
function ContextMenuGroup({
|
|
1598
|
+
...props
|
|
1599
|
+
}) {
|
|
1600
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
|
|
1601
|
+
}
|
|
1602
|
+
function ContextMenuPortal({
|
|
1603
|
+
...props
|
|
1604
|
+
}) {
|
|
1605
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
1606
|
+
}
|
|
1607
|
+
function ContextMenuSub({
|
|
1608
|
+
...props
|
|
1609
|
+
}) {
|
|
1610
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
1611
|
+
}
|
|
1612
|
+
function ContextMenuRadioGroup({
|
|
1613
|
+
...props
|
|
1614
|
+
}) {
|
|
1615
|
+
return /* @__PURE__ */ jsx(
|
|
1616
|
+
ContextMenuPrimitive.RadioGroup,
|
|
1617
|
+
{
|
|
1618
|
+
"data-slot": "context-menu-radio-group",
|
|
1619
|
+
...props
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1622
|
+
}
|
|
1623
|
+
function ContextMenuSubTrigger({
|
|
1624
|
+
className,
|
|
1625
|
+
inset,
|
|
1626
|
+
children,
|
|
1627
|
+
...props
|
|
1628
|
+
}) {
|
|
1629
|
+
return /* @__PURE__ */ jsxs(
|
|
1630
|
+
ContextMenuPrimitive.SubTrigger,
|
|
1631
|
+
{
|
|
1632
|
+
"data-slot": "context-menu-sub-trigger",
|
|
1633
|
+
"data-inset": inset,
|
|
1634
|
+
className: cn(
|
|
1635
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1636
|
+
className
|
|
1637
|
+
),
|
|
1638
|
+
...props,
|
|
1639
|
+
children: [
|
|
1640
|
+
children,
|
|
1641
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
1642
|
+
]
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1645
|
+
}
|
|
1646
|
+
function ContextMenuSubContent({
|
|
1647
|
+
className,
|
|
1648
|
+
...props
|
|
1649
|
+
}) {
|
|
1650
|
+
return /* @__PURE__ */ jsx(
|
|
1651
|
+
ContextMenuPrimitive.SubContent,
|
|
1652
|
+
{
|
|
1653
|
+
"data-slot": "context-menu-sub-content",
|
|
1654
|
+
className: cn(
|
|
1655
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
1656
|
+
className
|
|
1657
|
+
),
|
|
1658
|
+
...props
|
|
1659
|
+
}
|
|
1660
|
+
);
|
|
1661
|
+
}
|
|
1662
|
+
function ContextMenuContent({
|
|
1663
|
+
className,
|
|
1664
|
+
...props
|
|
1665
|
+
}) {
|
|
1666
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1667
|
+
ContextMenuPrimitive.Content,
|
|
1668
|
+
{
|
|
1669
|
+
"data-slot": "context-menu-content",
|
|
1670
|
+
className: cn(
|
|
1671
|
+
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
1672
|
+
className
|
|
1673
|
+
),
|
|
1674
|
+
...props
|
|
1675
|
+
}
|
|
1676
|
+
) });
|
|
1677
|
+
}
|
|
1678
|
+
function ContextMenuItem({
|
|
1679
|
+
className,
|
|
1680
|
+
inset,
|
|
1681
|
+
variant = "default",
|
|
1682
|
+
...props
|
|
1683
|
+
}) {
|
|
1684
|
+
return /* @__PURE__ */ jsx(
|
|
1685
|
+
ContextMenuPrimitive.Item,
|
|
1686
|
+
{
|
|
1687
|
+
"data-slot": "context-menu-item",
|
|
1688
|
+
"data-inset": inset,
|
|
1689
|
+
"data-variant": variant,
|
|
1690
|
+
className: cn(
|
|
1691
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1692
|
+
className
|
|
1693
|
+
),
|
|
1694
|
+
...props
|
|
1695
|
+
}
|
|
1696
|
+
);
|
|
1697
|
+
}
|
|
1698
|
+
function ContextMenuCheckboxItem({
|
|
1699
|
+
className,
|
|
1700
|
+
children,
|
|
1701
|
+
checked,
|
|
1702
|
+
...props
|
|
1703
|
+
}) {
|
|
1704
|
+
return /* @__PURE__ */ jsxs(
|
|
1705
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
1706
|
+
{
|
|
1707
|
+
"data-slot": "context-menu-checkbox-item",
|
|
1708
|
+
className: cn(
|
|
1709
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1710
|
+
className
|
|
1711
|
+
),
|
|
1712
|
+
checked,
|
|
1713
|
+
...props,
|
|
1714
|
+
children: [
|
|
1715
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
1716
|
+
children
|
|
1717
|
+
]
|
|
1718
|
+
}
|
|
1719
|
+
);
|
|
1720
|
+
}
|
|
1721
|
+
function ContextMenuRadioItem({
|
|
1722
|
+
className,
|
|
1723
|
+
children,
|
|
1724
|
+
...props
|
|
1725
|
+
}) {
|
|
1726
|
+
return /* @__PURE__ */ jsxs(
|
|
1727
|
+
ContextMenuPrimitive.RadioItem,
|
|
1728
|
+
{
|
|
1729
|
+
"data-slot": "context-menu-radio-item",
|
|
1730
|
+
className: cn(
|
|
1731
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1732
|
+
className
|
|
1733
|
+
),
|
|
1734
|
+
...props,
|
|
1735
|
+
children: [
|
|
1736
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
1737
|
+
children
|
|
1738
|
+
]
|
|
1739
|
+
}
|
|
1740
|
+
);
|
|
1741
|
+
}
|
|
1742
|
+
function ContextMenuLabel({
|
|
1743
|
+
className,
|
|
1744
|
+
inset,
|
|
1745
|
+
...props
|
|
1746
|
+
}) {
|
|
1747
|
+
return /* @__PURE__ */ jsx(
|
|
1748
|
+
ContextMenuPrimitive.Label,
|
|
1749
|
+
{
|
|
1750
|
+
"data-slot": "context-menu-label",
|
|
1751
|
+
"data-inset": inset,
|
|
1752
|
+
className: cn(
|
|
1753
|
+
"text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
1754
|
+
className
|
|
1755
|
+
),
|
|
1756
|
+
...props
|
|
1757
|
+
}
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
function ContextMenuSeparator({
|
|
1761
|
+
className,
|
|
1762
|
+
...props
|
|
1763
|
+
}) {
|
|
1764
|
+
return /* @__PURE__ */ jsx(
|
|
1765
|
+
ContextMenuPrimitive.Separator,
|
|
1766
|
+
{
|
|
1767
|
+
"data-slot": "context-menu-separator",
|
|
1768
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1769
|
+
...props
|
|
1770
|
+
}
|
|
1771
|
+
);
|
|
1772
|
+
}
|
|
1773
|
+
function ContextMenuShortcut({
|
|
1774
|
+
className,
|
|
1775
|
+
...props
|
|
1776
|
+
}) {
|
|
1777
|
+
return /* @__PURE__ */ jsx(
|
|
1778
|
+
"span",
|
|
1779
|
+
{
|
|
1780
|
+
"data-slot": "context-menu-shortcut",
|
|
1781
|
+
className: cn(
|
|
1782
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
1783
|
+
className
|
|
1784
|
+
),
|
|
1785
|
+
...props
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
}
|
|
1789
|
+
function Drawer({
|
|
1790
|
+
...props
|
|
1791
|
+
}) {
|
|
1792
|
+
return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
|
|
1793
|
+
}
|
|
1794
|
+
function DrawerTrigger({
|
|
1795
|
+
...props
|
|
1796
|
+
}) {
|
|
1797
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
1798
|
+
}
|
|
1799
|
+
function DrawerPortal({
|
|
1800
|
+
...props
|
|
1801
|
+
}) {
|
|
1802
|
+
return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
|
|
1803
|
+
}
|
|
1804
|
+
function DrawerClose({
|
|
1805
|
+
...props
|
|
1806
|
+
}) {
|
|
1807
|
+
return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
|
|
1808
|
+
}
|
|
1809
|
+
function DrawerOverlay({
|
|
1810
|
+
className,
|
|
1811
|
+
...props
|
|
1812
|
+
}) {
|
|
1813
|
+
return /* @__PURE__ */ jsx(
|
|
1814
|
+
Drawer$1.Overlay,
|
|
1815
|
+
{
|
|
1816
|
+
"data-slot": "drawer-overlay",
|
|
1817
|
+
className: cn(
|
|
1818
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1819
|
+
className
|
|
1820
|
+
),
|
|
1821
|
+
...props
|
|
1822
|
+
}
|
|
1823
|
+
);
|
|
1824
|
+
}
|
|
1825
|
+
function DrawerContent({
|
|
1826
|
+
className,
|
|
1827
|
+
children,
|
|
1828
|
+
...props
|
|
1829
|
+
}) {
|
|
1830
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
1831
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1832
|
+
/* @__PURE__ */ jsxs(
|
|
1833
|
+
Drawer$1.Content,
|
|
1834
|
+
{
|
|
1835
|
+
"data-slot": "drawer-content",
|
|
1836
|
+
className: cn(
|
|
1837
|
+
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
1838
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
1839
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
1840
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
1841
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
1842
|
+
className
|
|
1843
|
+
),
|
|
1844
|
+
...props,
|
|
1845
|
+
children: [
|
|
1846
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1847
|
+
children
|
|
1848
|
+
]
|
|
1849
|
+
}
|
|
1850
|
+
)
|
|
1851
|
+
] });
|
|
1852
|
+
}
|
|
1853
|
+
function DrawerHeader({ className, ...props }) {
|
|
1854
|
+
return /* @__PURE__ */ jsx(
|
|
1855
|
+
"div",
|
|
1856
|
+
{
|
|
1857
|
+
"data-slot": "drawer-header",
|
|
1858
|
+
className: cn(
|
|
1859
|
+
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
1860
|
+
className
|
|
1861
|
+
),
|
|
1862
|
+
...props
|
|
1863
|
+
}
|
|
1864
|
+
);
|
|
1865
|
+
}
|
|
1866
|
+
function DrawerFooter({ className, ...props }) {
|
|
1867
|
+
return /* @__PURE__ */ jsx(
|
|
1868
|
+
"div",
|
|
1869
|
+
{
|
|
1870
|
+
"data-slot": "drawer-footer",
|
|
1871
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1872
|
+
...props
|
|
1873
|
+
}
|
|
1874
|
+
);
|
|
1875
|
+
}
|
|
1876
|
+
function DrawerTitle({
|
|
1877
|
+
className,
|
|
1878
|
+
...props
|
|
1879
|
+
}) {
|
|
1880
|
+
return /* @__PURE__ */ jsx(
|
|
1881
|
+
Drawer$1.Title,
|
|
1882
|
+
{
|
|
1883
|
+
"data-slot": "drawer-title",
|
|
1884
|
+
className: cn("text-foreground font-semibold", className),
|
|
1885
|
+
...props
|
|
1886
|
+
}
|
|
1887
|
+
);
|
|
1888
|
+
}
|
|
1889
|
+
function DrawerDescription({
|
|
1890
|
+
className,
|
|
1891
|
+
...props
|
|
1892
|
+
}) {
|
|
1893
|
+
return /* @__PURE__ */ jsx(
|
|
1894
|
+
Drawer$1.Description,
|
|
1895
|
+
{
|
|
1896
|
+
"data-slot": "drawer-description",
|
|
1897
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1898
|
+
...props
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
function DropdownMenu({
|
|
1903
|
+
...props
|
|
1904
|
+
}) {
|
|
1905
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1906
|
+
}
|
|
1907
|
+
function DropdownMenuPortal({
|
|
1908
|
+
...props
|
|
1909
|
+
}) {
|
|
1910
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1911
|
+
}
|
|
1912
|
+
function DropdownMenuTrigger({
|
|
1913
|
+
...props
|
|
1914
|
+
}) {
|
|
1915
|
+
return /* @__PURE__ */ jsx(
|
|
1916
|
+
DropdownMenuPrimitive.Trigger,
|
|
1917
|
+
{
|
|
1918
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1919
|
+
...props
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
function DropdownMenuContent({
|
|
1924
|
+
className,
|
|
1925
|
+
sideOffset = 4,
|
|
1926
|
+
...props
|
|
1927
|
+
}) {
|
|
1928
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1929
|
+
DropdownMenuPrimitive.Content,
|
|
1930
|
+
{
|
|
1931
|
+
"data-slot": "dropdown-menu-content",
|
|
1932
|
+
sideOffset,
|
|
1933
|
+
className: cn(
|
|
1934
|
+
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
1935
|
+
className
|
|
1936
|
+
),
|
|
1937
|
+
...props
|
|
1938
|
+
}
|
|
1939
|
+
) });
|
|
1940
|
+
}
|
|
1941
|
+
function DropdownMenuGroup({
|
|
1942
|
+
...props
|
|
1943
|
+
}) {
|
|
1944
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1945
|
+
}
|
|
1946
|
+
function DropdownMenuItem({
|
|
1947
|
+
className,
|
|
1948
|
+
inset,
|
|
1949
|
+
variant = "default",
|
|
1950
|
+
...props
|
|
1951
|
+
}) {
|
|
1952
|
+
return /* @__PURE__ */ jsx(
|
|
1953
|
+
DropdownMenuPrimitive.Item,
|
|
1954
|
+
{
|
|
1955
|
+
"data-slot": "dropdown-menu-item",
|
|
1956
|
+
"data-inset": inset,
|
|
1957
|
+
"data-variant": variant,
|
|
1958
|
+
className: cn(
|
|
1959
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1960
|
+
className
|
|
1961
|
+
),
|
|
1962
|
+
...props
|
|
1963
|
+
}
|
|
1964
|
+
);
|
|
1965
|
+
}
|
|
1966
|
+
function DropdownMenuCheckboxItem({
|
|
1967
|
+
className,
|
|
1968
|
+
children,
|
|
1969
|
+
checked,
|
|
1970
|
+
...props
|
|
1971
|
+
}) {
|
|
1972
|
+
return /* @__PURE__ */ jsxs(
|
|
1973
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1974
|
+
{
|
|
1975
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1976
|
+
className: cn(
|
|
1977
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1978
|
+
className
|
|
1979
|
+
),
|
|
1980
|
+
checked,
|
|
1981
|
+
...props,
|
|
1982
|
+
children: [
|
|
1983
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
1984
|
+
children
|
|
1985
|
+
]
|
|
1986
|
+
}
|
|
1987
|
+
);
|
|
1988
|
+
}
|
|
1989
|
+
function DropdownMenuRadioGroup({
|
|
1990
|
+
...props
|
|
1991
|
+
}) {
|
|
1992
|
+
return /* @__PURE__ */ jsx(
|
|
1993
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
1994
|
+
{
|
|
1995
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1996
|
+
...props
|
|
1997
|
+
}
|
|
1998
|
+
);
|
|
1999
|
+
}
|
|
2000
|
+
function DropdownMenuRadioItem({
|
|
2001
|
+
className,
|
|
2002
|
+
children,
|
|
2003
|
+
...props
|
|
2004
|
+
}) {
|
|
2005
|
+
return /* @__PURE__ */ jsxs(
|
|
2006
|
+
DropdownMenuPrimitive.RadioItem,
|
|
2007
|
+
{
|
|
2008
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
2009
|
+
className: cn(
|
|
2010
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2011
|
+
className
|
|
2012
|
+
),
|
|
2013
|
+
...props,
|
|
2014
|
+
children: [
|
|
2015
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
2016
|
+
children
|
|
2017
|
+
]
|
|
2018
|
+
}
|
|
2019
|
+
);
|
|
2020
|
+
}
|
|
2021
|
+
function DropdownMenuLabel({
|
|
2022
|
+
className,
|
|
2023
|
+
inset,
|
|
2024
|
+
...props
|
|
2025
|
+
}) {
|
|
2026
|
+
return /* @__PURE__ */ jsx(
|
|
2027
|
+
DropdownMenuPrimitive.Label,
|
|
2028
|
+
{
|
|
2029
|
+
"data-slot": "dropdown-menu-label",
|
|
2030
|
+
"data-inset": inset,
|
|
2031
|
+
className: cn(
|
|
2032
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
2033
|
+
className
|
|
2034
|
+
),
|
|
2035
|
+
...props
|
|
2036
|
+
}
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
function DropdownMenuSeparator({
|
|
2040
|
+
className,
|
|
2041
|
+
...props
|
|
2042
|
+
}) {
|
|
2043
|
+
return /* @__PURE__ */ jsx(
|
|
2044
|
+
DropdownMenuPrimitive.Separator,
|
|
2045
|
+
{
|
|
2046
|
+
"data-slot": "dropdown-menu-separator",
|
|
2047
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
2048
|
+
...props
|
|
2049
|
+
}
|
|
2050
|
+
);
|
|
2051
|
+
}
|
|
2052
|
+
function DropdownMenuShortcut({
|
|
2053
|
+
className,
|
|
2054
|
+
...props
|
|
2055
|
+
}) {
|
|
2056
|
+
return /* @__PURE__ */ jsx(
|
|
2057
|
+
"span",
|
|
2058
|
+
{
|
|
2059
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
2060
|
+
className: cn(
|
|
2061
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
2062
|
+
className
|
|
2063
|
+
),
|
|
2064
|
+
...props
|
|
2065
|
+
}
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
function DropdownMenuSub({
|
|
2069
|
+
...props
|
|
2070
|
+
}) {
|
|
2071
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
2072
|
+
}
|
|
2073
|
+
function DropdownMenuSubTrigger({
|
|
2074
|
+
className,
|
|
2075
|
+
inset,
|
|
2076
|
+
children,
|
|
2077
|
+
...props
|
|
2078
|
+
}) {
|
|
2079
|
+
return /* @__PURE__ */ jsxs(
|
|
2080
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
2081
|
+
{
|
|
2082
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
2083
|
+
"data-inset": inset,
|
|
2084
|
+
className: cn(
|
|
2085
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2086
|
+
className
|
|
2087
|
+
),
|
|
2088
|
+
...props,
|
|
2089
|
+
children: [
|
|
2090
|
+
children,
|
|
2091
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
2092
|
+
]
|
|
2093
|
+
}
|
|
2094
|
+
);
|
|
2095
|
+
}
|
|
2096
|
+
function DropdownMenuSubContent({
|
|
2097
|
+
className,
|
|
2098
|
+
...props
|
|
2099
|
+
}) {
|
|
2100
|
+
return /* @__PURE__ */ jsx(
|
|
2101
|
+
DropdownMenuPrimitive.SubContent,
|
|
2102
|
+
{
|
|
2103
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
2104
|
+
className: cn(
|
|
2105
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
2106
|
+
className
|
|
2107
|
+
),
|
|
2108
|
+
...props
|
|
2109
|
+
}
|
|
2110
|
+
);
|
|
2111
|
+
}
|
|
2112
|
+
function Empty({ className, ...props }) {
|
|
2113
|
+
return /* @__PURE__ */ jsx(
|
|
2114
|
+
"div",
|
|
2115
|
+
{
|
|
2116
|
+
"data-slot": "empty",
|
|
2117
|
+
className: cn(
|
|
2118
|
+
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
|
|
2119
|
+
className
|
|
2120
|
+
),
|
|
2121
|
+
...props
|
|
2122
|
+
}
|
|
2123
|
+
);
|
|
2124
|
+
}
|
|
2125
|
+
function EmptyHeader({ className, ...props }) {
|
|
2126
|
+
return /* @__PURE__ */ jsx(
|
|
2127
|
+
"div",
|
|
2128
|
+
{
|
|
2129
|
+
"data-slot": "empty-header",
|
|
2130
|
+
className: cn(
|
|
2131
|
+
"flex max-w-sm flex-col items-center gap-2 text-center",
|
|
2132
|
+
className
|
|
2133
|
+
),
|
|
2134
|
+
...props
|
|
2135
|
+
}
|
|
2136
|
+
);
|
|
2137
|
+
}
|
|
2138
|
+
var emptyMediaVariants = cva(
|
|
2139
|
+
"flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2140
|
+
{
|
|
2141
|
+
variants: {
|
|
2142
|
+
variant: {
|
|
2143
|
+
default: "bg-transparent",
|
|
2144
|
+
icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
defaultVariants: {
|
|
2148
|
+
variant: "default"
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
);
|
|
2152
|
+
function EmptyMedia({
|
|
2153
|
+
className,
|
|
2154
|
+
variant = "default",
|
|
2155
|
+
...props
|
|
2156
|
+
}) {
|
|
2157
|
+
return /* @__PURE__ */ jsx(
|
|
2158
|
+
"div",
|
|
2159
|
+
{
|
|
2160
|
+
"data-slot": "empty-icon",
|
|
2161
|
+
"data-variant": variant,
|
|
2162
|
+
className: cn(emptyMediaVariants({ variant, className })),
|
|
2163
|
+
...props
|
|
2164
|
+
}
|
|
2165
|
+
);
|
|
2166
|
+
}
|
|
2167
|
+
function EmptyTitle({ className, ...props }) {
|
|
2168
|
+
return /* @__PURE__ */ jsx(
|
|
2169
|
+
"div",
|
|
2170
|
+
{
|
|
2171
|
+
"data-slot": "empty-title",
|
|
2172
|
+
className: cn("text-lg font-medium tracking-tight", className),
|
|
2173
|
+
...props
|
|
2174
|
+
}
|
|
2175
|
+
);
|
|
2176
|
+
}
|
|
2177
|
+
function EmptyDescription({ className, ...props }) {
|
|
2178
|
+
return /* @__PURE__ */ jsx(
|
|
2179
|
+
"div",
|
|
2180
|
+
{
|
|
2181
|
+
"data-slot": "empty-description",
|
|
2182
|
+
className: cn(
|
|
2183
|
+
"text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
|
|
2184
|
+
className
|
|
2185
|
+
),
|
|
2186
|
+
...props
|
|
2187
|
+
}
|
|
2188
|
+
);
|
|
2189
|
+
}
|
|
2190
|
+
function EmptyContent({ className, ...props }) {
|
|
2191
|
+
return /* @__PURE__ */ jsx(
|
|
2192
|
+
"div",
|
|
2193
|
+
{
|
|
2194
|
+
"data-slot": "empty-content",
|
|
2195
|
+
className: cn(
|
|
2196
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
|
|
2197
|
+
className
|
|
2198
|
+
),
|
|
2199
|
+
...props
|
|
2200
|
+
}
|
|
2201
|
+
);
|
|
2202
|
+
}
|
|
2203
|
+
function Label3({
|
|
2204
|
+
className,
|
|
2205
|
+
...props
|
|
2206
|
+
}) {
|
|
2207
|
+
return /* @__PURE__ */ jsx(
|
|
2208
|
+
LabelPrimitive.Root,
|
|
2209
|
+
{
|
|
2210
|
+
"data-slot": "label",
|
|
2211
|
+
className: cn(
|
|
2212
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
2213
|
+
className
|
|
2214
|
+
),
|
|
2215
|
+
...props
|
|
2216
|
+
}
|
|
2217
|
+
);
|
|
2218
|
+
}
|
|
2219
|
+
function FieldSet({ className, ...props }) {
|
|
2220
|
+
return /* @__PURE__ */ jsx(
|
|
2221
|
+
"fieldset",
|
|
2222
|
+
{
|
|
2223
|
+
"data-slot": "field-set",
|
|
2224
|
+
className: cn(
|
|
2225
|
+
"flex flex-col gap-6",
|
|
2226
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
2227
|
+
className
|
|
2228
|
+
),
|
|
2229
|
+
...props
|
|
2230
|
+
}
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2233
|
+
function FieldLegend({
|
|
2234
|
+
className,
|
|
2235
|
+
variant = "legend",
|
|
2236
|
+
...props
|
|
2237
|
+
}) {
|
|
2238
|
+
return /* @__PURE__ */ jsx(
|
|
2239
|
+
"legend",
|
|
2240
|
+
{
|
|
2241
|
+
"data-slot": "field-legend",
|
|
2242
|
+
"data-variant": variant,
|
|
2243
|
+
className: cn(
|
|
2244
|
+
"mb-3 font-medium",
|
|
2245
|
+
"data-[variant=legend]:text-base",
|
|
2246
|
+
"data-[variant=label]:text-sm",
|
|
2247
|
+
className
|
|
2248
|
+
),
|
|
2249
|
+
...props
|
|
2250
|
+
}
|
|
2251
|
+
);
|
|
2252
|
+
}
|
|
2253
|
+
function FieldGroup({ className, ...props }) {
|
|
2254
|
+
return /* @__PURE__ */ jsx(
|
|
2255
|
+
"div",
|
|
2256
|
+
{
|
|
2257
|
+
"data-slot": "field-group",
|
|
2258
|
+
className: cn(
|
|
2259
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
2260
|
+
className
|
|
2261
|
+
),
|
|
2262
|
+
...props
|
|
2263
|
+
}
|
|
2264
|
+
);
|
|
2265
|
+
}
|
|
2266
|
+
var fieldVariants = cva(
|
|
2267
|
+
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
2268
|
+
{
|
|
2269
|
+
variants: {
|
|
2270
|
+
orientation: {
|
|
2271
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
2272
|
+
horizontal: [
|
|
2273
|
+
"flex-row items-center",
|
|
2274
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
2275
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2276
|
+
],
|
|
2277
|
+
responsive: [
|
|
2278
|
+
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
2279
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
2280
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2281
|
+
]
|
|
2282
|
+
}
|
|
2283
|
+
},
|
|
2284
|
+
defaultVariants: {
|
|
2285
|
+
orientation: "vertical"
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
);
|
|
2289
|
+
function Field({
|
|
2290
|
+
className,
|
|
2291
|
+
orientation = "vertical",
|
|
2292
|
+
...props
|
|
2293
|
+
}) {
|
|
2294
|
+
return /* @__PURE__ */ jsx(
|
|
2295
|
+
"div",
|
|
2296
|
+
{
|
|
2297
|
+
role: "group",
|
|
2298
|
+
"data-slot": "field",
|
|
2299
|
+
"data-orientation": orientation,
|
|
2300
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
2301
|
+
...props
|
|
2302
|
+
}
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
function FieldContent({ className, ...props }) {
|
|
2306
|
+
return /* @__PURE__ */ jsx(
|
|
2307
|
+
"div",
|
|
2308
|
+
{
|
|
2309
|
+
"data-slot": "field-content",
|
|
2310
|
+
className: cn(
|
|
2311
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
2312
|
+
className
|
|
2313
|
+
),
|
|
2314
|
+
...props
|
|
2315
|
+
}
|
|
2316
|
+
);
|
|
2317
|
+
}
|
|
2318
|
+
function FieldLabel({
|
|
2319
|
+
className,
|
|
2320
|
+
...props
|
|
2321
|
+
}) {
|
|
2322
|
+
return /* @__PURE__ */ jsx(
|
|
2323
|
+
Label3,
|
|
2324
|
+
{
|
|
2325
|
+
"data-slot": "field-label",
|
|
2326
|
+
className: cn(
|
|
2327
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
2328
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
2329
|
+
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
2330
|
+
className
|
|
2331
|
+
),
|
|
2332
|
+
...props
|
|
2333
|
+
}
|
|
2334
|
+
);
|
|
2335
|
+
}
|
|
2336
|
+
function FieldTitle({ className, ...props }) {
|
|
2337
|
+
return /* @__PURE__ */ jsx(
|
|
2338
|
+
"div",
|
|
2339
|
+
{
|
|
2340
|
+
"data-slot": "field-label",
|
|
2341
|
+
className: cn(
|
|
2342
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
2343
|
+
className
|
|
2344
|
+
),
|
|
2345
|
+
...props
|
|
2346
|
+
}
|
|
2347
|
+
);
|
|
2348
|
+
}
|
|
2349
|
+
function FieldDescription({ className, ...props }) {
|
|
2350
|
+
return /* @__PURE__ */ jsx(
|
|
2351
|
+
"p",
|
|
2352
|
+
{
|
|
2353
|
+
"data-slot": "field-description",
|
|
2354
|
+
className: cn(
|
|
2355
|
+
"text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
2356
|
+
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
2357
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
2358
|
+
className
|
|
2359
|
+
),
|
|
2360
|
+
...props
|
|
2361
|
+
}
|
|
2362
|
+
);
|
|
2363
|
+
}
|
|
2364
|
+
function FieldSeparator({
|
|
2365
|
+
children,
|
|
2366
|
+
className,
|
|
2367
|
+
...props
|
|
2368
|
+
}) {
|
|
2369
|
+
return /* @__PURE__ */ jsxs(
|
|
2370
|
+
"div",
|
|
2371
|
+
{
|
|
2372
|
+
"data-slot": "field-separator",
|
|
2373
|
+
"data-content": !!children,
|
|
2374
|
+
className: cn(
|
|
2375
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
2376
|
+
className
|
|
2377
|
+
),
|
|
2378
|
+
...props,
|
|
2379
|
+
children: [
|
|
2380
|
+
/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2381
|
+
children && /* @__PURE__ */ jsx(
|
|
2382
|
+
"span",
|
|
2383
|
+
{
|
|
2384
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
2385
|
+
"data-slot": "field-separator-content",
|
|
2386
|
+
children
|
|
2387
|
+
}
|
|
2388
|
+
)
|
|
2389
|
+
]
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
function FieldError({
|
|
2394
|
+
className,
|
|
2395
|
+
children,
|
|
2396
|
+
errors,
|
|
2397
|
+
...props
|
|
2398
|
+
}) {
|
|
2399
|
+
const content = useMemo(() => {
|
|
2400
|
+
if (children) {
|
|
2401
|
+
return children;
|
|
2402
|
+
}
|
|
2403
|
+
if (!errors?.length) {
|
|
2404
|
+
return null;
|
|
2405
|
+
}
|
|
2406
|
+
const uniqueErrors = [
|
|
2407
|
+
...new Map(errors.map((error) => [error?.message, error])).values()
|
|
2408
|
+
];
|
|
2409
|
+
if (uniqueErrors?.length == 1) {
|
|
2410
|
+
return uniqueErrors[0]?.message;
|
|
2411
|
+
}
|
|
2412
|
+
return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
2413
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
|
|
2414
|
+
) });
|
|
2415
|
+
}, [children, errors]);
|
|
2416
|
+
if (!content) {
|
|
2417
|
+
return null;
|
|
2418
|
+
}
|
|
2419
|
+
return /* @__PURE__ */ jsx(
|
|
2420
|
+
"div",
|
|
2421
|
+
{
|
|
2422
|
+
role: "alert",
|
|
2423
|
+
"data-slot": "field-error",
|
|
2424
|
+
className: cn("text-destructive text-sm font-normal", className),
|
|
2425
|
+
...props,
|
|
2426
|
+
children: content
|
|
2427
|
+
}
|
|
2428
|
+
);
|
|
2429
|
+
}
|
|
2430
|
+
var Form = FormProvider;
|
|
2431
|
+
var FormFieldContext = React2.createContext(
|
|
2432
|
+
{}
|
|
2433
|
+
);
|
|
2434
|
+
var FormField = ({
|
|
2435
|
+
...props
|
|
2436
|
+
}) => {
|
|
2437
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
2438
|
+
};
|
|
2439
|
+
var useFormField = () => {
|
|
2440
|
+
const fieldContext = React2.useContext(FormFieldContext);
|
|
2441
|
+
const itemContext = React2.useContext(FormItemContext);
|
|
2442
|
+
const { getFieldState } = useFormContext();
|
|
2443
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
2444
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2445
|
+
if (!fieldContext) {
|
|
2446
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
2447
|
+
}
|
|
2448
|
+
const { id } = itemContext;
|
|
2449
|
+
return {
|
|
2450
|
+
id,
|
|
2451
|
+
name: fieldContext.name,
|
|
2452
|
+
formItemId: `${id}-form-item`,
|
|
2453
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
2454
|
+
formMessageId: `${id}-form-item-message`,
|
|
2455
|
+
...fieldState
|
|
2456
|
+
};
|
|
2457
|
+
};
|
|
2458
|
+
var FormItemContext = React2.createContext(
|
|
2459
|
+
{}
|
|
2460
|
+
);
|
|
2461
|
+
function FormItem({ className, ...props }) {
|
|
2462
|
+
const id = React2.useId();
|
|
2463
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
|
|
2464
|
+
"div",
|
|
2465
|
+
{
|
|
2466
|
+
"data-slot": "form-item",
|
|
2467
|
+
className: cn("grid gap-2", className),
|
|
2468
|
+
...props
|
|
2469
|
+
}
|
|
2470
|
+
) });
|
|
2471
|
+
}
|
|
2472
|
+
function FormLabel({
|
|
2473
|
+
className,
|
|
2474
|
+
...props
|
|
2475
|
+
}) {
|
|
2476
|
+
const { error, formItemId } = useFormField();
|
|
2477
|
+
return /* @__PURE__ */ jsx(
|
|
2478
|
+
Label3,
|
|
2479
|
+
{
|
|
2480
|
+
"data-slot": "form-label",
|
|
2481
|
+
"data-error": !!error,
|
|
2482
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
2483
|
+
htmlFor: formItemId,
|
|
2484
|
+
...props
|
|
2485
|
+
}
|
|
2486
|
+
);
|
|
2487
|
+
}
|
|
2488
|
+
function FormControl({ ...props }) {
|
|
2489
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2490
|
+
return /* @__PURE__ */ jsx(
|
|
2491
|
+
Slot,
|
|
2492
|
+
{
|
|
2493
|
+
"data-slot": "form-control",
|
|
2494
|
+
id: formItemId,
|
|
2495
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
2496
|
+
"aria-invalid": !!error,
|
|
2497
|
+
...props
|
|
2498
|
+
}
|
|
2499
|
+
);
|
|
2500
|
+
}
|
|
2501
|
+
function FormDescription({ className, ...props }) {
|
|
2502
|
+
const { formDescriptionId } = useFormField();
|
|
2503
|
+
return /* @__PURE__ */ jsx(
|
|
2504
|
+
"p",
|
|
2505
|
+
{
|
|
2506
|
+
"data-slot": "form-description",
|
|
2507
|
+
id: formDescriptionId,
|
|
2508
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
2509
|
+
...props
|
|
2510
|
+
}
|
|
2511
|
+
);
|
|
2512
|
+
}
|
|
2513
|
+
function FormMessage({ className, ...props }) {
|
|
2514
|
+
const { error, formMessageId } = useFormField();
|
|
2515
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
2516
|
+
if (!body) {
|
|
2517
|
+
return null;
|
|
2518
|
+
}
|
|
2519
|
+
return /* @__PURE__ */ jsx(
|
|
2520
|
+
"p",
|
|
2521
|
+
{
|
|
2522
|
+
"data-slot": "form-message",
|
|
2523
|
+
id: formMessageId,
|
|
2524
|
+
className: cn("text-destructive text-sm", className),
|
|
2525
|
+
...props,
|
|
2526
|
+
children: body
|
|
2527
|
+
}
|
|
2528
|
+
);
|
|
2529
|
+
}
|
|
2530
|
+
function HoverCard({
|
|
2531
|
+
...props
|
|
2532
|
+
}) {
|
|
2533
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
2534
|
+
}
|
|
2535
|
+
function HoverCardTrigger({
|
|
2536
|
+
...props
|
|
2537
|
+
}) {
|
|
2538
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
2539
|
+
}
|
|
2540
|
+
function HoverCardContent({
|
|
2541
|
+
className,
|
|
2542
|
+
align = "center",
|
|
2543
|
+
sideOffset = 4,
|
|
2544
|
+
...props
|
|
2545
|
+
}) {
|
|
2546
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
|
|
2547
|
+
HoverCardPrimitive.Content,
|
|
2548
|
+
{
|
|
2549
|
+
"data-slot": "hover-card-content",
|
|
2550
|
+
align,
|
|
2551
|
+
sideOffset,
|
|
2552
|
+
className: cn(
|
|
2553
|
+
"bg-popover text-popover-foreground 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
2554
|
+
className
|
|
2555
|
+
),
|
|
2556
|
+
...props
|
|
2557
|
+
}
|
|
2558
|
+
) });
|
|
2559
|
+
}
|
|
2560
|
+
function Input({ className, type, ...props }) {
|
|
2561
|
+
return /* @__PURE__ */ jsx(
|
|
2562
|
+
"input",
|
|
2563
|
+
{
|
|
2564
|
+
type,
|
|
2565
|
+
"data-slot": "input",
|
|
2566
|
+
className: cn(
|
|
2567
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2568
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
2569
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
2570
|
+
className
|
|
2571
|
+
),
|
|
2572
|
+
...props
|
|
2573
|
+
}
|
|
2574
|
+
);
|
|
2575
|
+
}
|
|
2576
|
+
function Textarea({ className, ...props }) {
|
|
2577
|
+
return /* @__PURE__ */ jsx(
|
|
2578
|
+
"textarea",
|
|
2579
|
+
{
|
|
2580
|
+
"data-slot": "textarea",
|
|
2581
|
+
className: cn(
|
|
2582
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2583
|
+
className
|
|
2584
|
+
),
|
|
2585
|
+
...props
|
|
2586
|
+
}
|
|
2587
|
+
);
|
|
2588
|
+
}
|
|
2589
|
+
function InputGroup({ className, ...props }) {
|
|
2590
|
+
return /* @__PURE__ */ jsx(
|
|
2591
|
+
"div",
|
|
2592
|
+
{
|
|
2593
|
+
"data-slot": "input-group",
|
|
2594
|
+
role: "group",
|
|
2595
|
+
className: cn(
|
|
2596
|
+
"group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
|
|
2597
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
2598
|
+
// Variants based on alignment.
|
|
2599
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
2600
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
2601
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
2602
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
2603
|
+
// Focus state.
|
|
2604
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
2605
|
+
// Error state.
|
|
2606
|
+
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
2607
|
+
className
|
|
2608
|
+
),
|
|
2609
|
+
...props
|
|
2610
|
+
}
|
|
2611
|
+
);
|
|
2612
|
+
}
|
|
2613
|
+
var inputGroupAddonVariants = cva(
|
|
2614
|
+
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
2615
|
+
{
|
|
2616
|
+
variants: {
|
|
2617
|
+
align: {
|
|
2618
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
2619
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
2620
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
2621
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
defaultVariants: {
|
|
2625
|
+
align: "inline-start"
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
);
|
|
2629
|
+
function InputGroupAddon({
|
|
2630
|
+
className,
|
|
2631
|
+
align = "inline-start",
|
|
2632
|
+
...props
|
|
2633
|
+
}) {
|
|
2634
|
+
return /* @__PURE__ */ jsx(
|
|
2635
|
+
"div",
|
|
2636
|
+
{
|
|
2637
|
+
role: "group",
|
|
2638
|
+
"data-slot": "input-group-addon",
|
|
2639
|
+
"data-align": align,
|
|
2640
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
2641
|
+
onClick: (e) => {
|
|
2642
|
+
if (e.target.closest("button")) {
|
|
2643
|
+
return;
|
|
2644
|
+
}
|
|
2645
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
2646
|
+
},
|
|
2647
|
+
...props
|
|
2648
|
+
}
|
|
2649
|
+
);
|
|
2650
|
+
}
|
|
2651
|
+
var inputGroupButtonVariants = cva(
|
|
2652
|
+
"text-sm shadow-none flex gap-2 items-center",
|
|
2653
|
+
{
|
|
2654
|
+
variants: {
|
|
2655
|
+
size: {
|
|
2656
|
+
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
2657
|
+
sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
2658
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
2659
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
defaultVariants: {
|
|
2663
|
+
size: "xs"
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
);
|
|
2667
|
+
function InputGroupButton({
|
|
2668
|
+
className,
|
|
2669
|
+
type = "button",
|
|
2670
|
+
variant = "ghost",
|
|
2671
|
+
size = "xs",
|
|
2672
|
+
...props
|
|
2673
|
+
}) {
|
|
2674
|
+
return /* @__PURE__ */ jsx(
|
|
2675
|
+
Button,
|
|
2676
|
+
{
|
|
2677
|
+
type,
|
|
2678
|
+
"data-size": size,
|
|
2679
|
+
variant,
|
|
2680
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
2681
|
+
...props
|
|
2682
|
+
}
|
|
2683
|
+
);
|
|
2684
|
+
}
|
|
2685
|
+
function InputGroupText({ className, ...props }) {
|
|
2686
|
+
return /* @__PURE__ */ jsx(
|
|
2687
|
+
"span",
|
|
2688
|
+
{
|
|
2689
|
+
className: cn(
|
|
2690
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
2691
|
+
className
|
|
2692
|
+
),
|
|
2693
|
+
...props
|
|
2694
|
+
}
|
|
2695
|
+
);
|
|
2696
|
+
}
|
|
2697
|
+
function InputGroupInput({
|
|
2698
|
+
className,
|
|
2699
|
+
...props
|
|
2700
|
+
}) {
|
|
2701
|
+
return /* @__PURE__ */ jsx(
|
|
2702
|
+
Input,
|
|
2703
|
+
{
|
|
2704
|
+
"data-slot": "input-group-control",
|
|
2705
|
+
className: cn(
|
|
2706
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
2707
|
+
className
|
|
2708
|
+
),
|
|
2709
|
+
...props
|
|
2710
|
+
}
|
|
2711
|
+
);
|
|
2712
|
+
}
|
|
2713
|
+
function InputGroupTextarea({
|
|
2714
|
+
className,
|
|
2715
|
+
...props
|
|
2716
|
+
}) {
|
|
2717
|
+
return /* @__PURE__ */ jsx(
|
|
2718
|
+
Textarea,
|
|
2719
|
+
{
|
|
2720
|
+
"data-slot": "input-group-control",
|
|
2721
|
+
className: cn(
|
|
2722
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
2723
|
+
className
|
|
2724
|
+
),
|
|
2725
|
+
...props
|
|
2726
|
+
}
|
|
2727
|
+
);
|
|
2728
|
+
}
|
|
2729
|
+
function InputOTP({
|
|
2730
|
+
className,
|
|
2731
|
+
containerClassName,
|
|
2732
|
+
...props
|
|
2733
|
+
}) {
|
|
2734
|
+
return /* @__PURE__ */ jsx(
|
|
2735
|
+
OTPInput,
|
|
2736
|
+
{
|
|
2737
|
+
"data-slot": "input-otp",
|
|
2738
|
+
containerClassName: cn(
|
|
2739
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
2740
|
+
containerClassName
|
|
2741
|
+
),
|
|
2742
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
2743
|
+
...props
|
|
2744
|
+
}
|
|
2745
|
+
);
|
|
2746
|
+
}
|
|
2747
|
+
function InputOTPGroup({ className, ...props }) {
|
|
2748
|
+
return /* @__PURE__ */ jsx(
|
|
2749
|
+
"div",
|
|
2750
|
+
{
|
|
2751
|
+
"data-slot": "input-otp-group",
|
|
2752
|
+
className: cn("flex items-center", className),
|
|
2753
|
+
...props
|
|
2754
|
+
}
|
|
2755
|
+
);
|
|
2756
|
+
}
|
|
2757
|
+
function InputOTPSlot({
|
|
2758
|
+
index,
|
|
2759
|
+
className,
|
|
2760
|
+
...props
|
|
2761
|
+
}) {
|
|
2762
|
+
const inputOTPContext = React2.useContext(OTPInputContext);
|
|
2763
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
2764
|
+
return /* @__PURE__ */ jsxs(
|
|
2765
|
+
"div",
|
|
2766
|
+
{
|
|
2767
|
+
"data-slot": "input-otp-slot",
|
|
2768
|
+
"data-active": isActive,
|
|
2769
|
+
className: cn(
|
|
2770
|
+
"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
|
|
2771
|
+
className
|
|
2772
|
+
),
|
|
2773
|
+
...props,
|
|
2774
|
+
children: [
|
|
2775
|
+
char,
|
|
2776
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
2777
|
+
]
|
|
2778
|
+
}
|
|
2779
|
+
);
|
|
2780
|
+
}
|
|
2781
|
+
function InputOTPSeparator({ ...props }) {
|
|
2782
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
|
|
2783
|
+
}
|
|
2784
|
+
function ItemGroup({ className, ...props }) {
|
|
2785
|
+
return /* @__PURE__ */ jsx(
|
|
2786
|
+
"div",
|
|
2787
|
+
{
|
|
2788
|
+
role: "list",
|
|
2789
|
+
"data-slot": "item-group",
|
|
2790
|
+
className: cn("group/item-group flex flex-col", className),
|
|
2791
|
+
...props
|
|
2792
|
+
}
|
|
2793
|
+
);
|
|
2794
|
+
}
|
|
2795
|
+
function ItemSeparator({
|
|
2796
|
+
className,
|
|
2797
|
+
...props
|
|
2798
|
+
}) {
|
|
2799
|
+
return /* @__PURE__ */ jsx(
|
|
2800
|
+
Separator,
|
|
2801
|
+
{
|
|
2802
|
+
"data-slot": "item-separator",
|
|
2803
|
+
orientation: "horizontal",
|
|
2804
|
+
className: cn("my-0", className),
|
|
2805
|
+
...props
|
|
2806
|
+
}
|
|
2807
|
+
);
|
|
2808
|
+
}
|
|
2809
|
+
var itemVariants = cva(
|
|
2810
|
+
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
2811
|
+
{
|
|
2812
|
+
variants: {
|
|
2813
|
+
variant: {
|
|
2814
|
+
default: "bg-transparent",
|
|
2815
|
+
outline: "border-border",
|
|
2816
|
+
muted: "bg-muted/50"
|
|
2817
|
+
},
|
|
2818
|
+
size: {
|
|
2819
|
+
default: "p-4 gap-4 ",
|
|
2820
|
+
sm: "py-3 px-4 gap-2.5"
|
|
2821
|
+
}
|
|
2822
|
+
},
|
|
2823
|
+
defaultVariants: {
|
|
2824
|
+
variant: "default",
|
|
2825
|
+
size: "default"
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
);
|
|
2829
|
+
function Item4({
|
|
2830
|
+
className,
|
|
2831
|
+
variant = "default",
|
|
2832
|
+
size = "default",
|
|
2833
|
+
asChild = false,
|
|
2834
|
+
...props
|
|
2835
|
+
}) {
|
|
2836
|
+
const Comp = asChild ? Slot : "div";
|
|
2837
|
+
return /* @__PURE__ */ jsx(
|
|
2838
|
+
Comp,
|
|
2839
|
+
{
|
|
2840
|
+
"data-slot": "item",
|
|
2841
|
+
"data-variant": variant,
|
|
2842
|
+
"data-size": size,
|
|
2843
|
+
className: cn(itemVariants({ variant, size, className })),
|
|
2844
|
+
...props
|
|
2845
|
+
}
|
|
2846
|
+
);
|
|
2847
|
+
}
|
|
2848
|
+
var itemMediaVariants = cva(
|
|
2849
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
|
|
2850
|
+
{
|
|
2851
|
+
variants: {
|
|
2852
|
+
variant: {
|
|
2853
|
+
default: "bg-transparent",
|
|
2854
|
+
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
2855
|
+
image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"
|
|
2856
|
+
}
|
|
2857
|
+
},
|
|
2858
|
+
defaultVariants: {
|
|
2859
|
+
variant: "default"
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
);
|
|
2863
|
+
function ItemMedia({
|
|
2864
|
+
className,
|
|
2865
|
+
variant = "default",
|
|
2866
|
+
...props
|
|
2867
|
+
}) {
|
|
2868
|
+
return /* @__PURE__ */ jsx(
|
|
2869
|
+
"div",
|
|
2870
|
+
{
|
|
2871
|
+
"data-slot": "item-media",
|
|
2872
|
+
"data-variant": variant,
|
|
2873
|
+
className: cn(itemMediaVariants({ variant, className })),
|
|
2874
|
+
...props
|
|
2875
|
+
}
|
|
2876
|
+
);
|
|
2877
|
+
}
|
|
2878
|
+
function ItemContent({ className, ...props }) {
|
|
2879
|
+
return /* @__PURE__ */ jsx(
|
|
2880
|
+
"div",
|
|
2881
|
+
{
|
|
2882
|
+
"data-slot": "item-content",
|
|
2883
|
+
className: cn(
|
|
2884
|
+
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
2885
|
+
className
|
|
2886
|
+
),
|
|
2887
|
+
...props
|
|
2888
|
+
}
|
|
2889
|
+
);
|
|
2890
|
+
}
|
|
2891
|
+
function ItemTitle({ className, ...props }) {
|
|
2892
|
+
return /* @__PURE__ */ jsx(
|
|
2893
|
+
"div",
|
|
2894
|
+
{
|
|
2895
|
+
"data-slot": "item-title",
|
|
2896
|
+
className: cn(
|
|
2897
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
2898
|
+
className
|
|
2899
|
+
),
|
|
2900
|
+
...props
|
|
2901
|
+
}
|
|
2902
|
+
);
|
|
2903
|
+
}
|
|
2904
|
+
function ItemDescription({ className, ...props }) {
|
|
2905
|
+
return /* @__PURE__ */ jsx(
|
|
2906
|
+
"p",
|
|
2907
|
+
{
|
|
2908
|
+
"data-slot": "item-description",
|
|
2909
|
+
className: cn(
|
|
2910
|
+
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
2911
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
2912
|
+
className
|
|
2913
|
+
),
|
|
2914
|
+
...props
|
|
2915
|
+
}
|
|
2916
|
+
);
|
|
2917
|
+
}
|
|
2918
|
+
function ItemActions({ className, ...props }) {
|
|
2919
|
+
return /* @__PURE__ */ jsx(
|
|
2920
|
+
"div",
|
|
2921
|
+
{
|
|
2922
|
+
"data-slot": "item-actions",
|
|
2923
|
+
className: cn("flex items-center gap-2", className),
|
|
2924
|
+
...props
|
|
2925
|
+
}
|
|
2926
|
+
);
|
|
2927
|
+
}
|
|
2928
|
+
function ItemHeader({ className, ...props }) {
|
|
2929
|
+
return /* @__PURE__ */ jsx(
|
|
2930
|
+
"div",
|
|
2931
|
+
{
|
|
2932
|
+
"data-slot": "item-header",
|
|
2933
|
+
className: cn(
|
|
2934
|
+
"flex basis-full items-center justify-between gap-2",
|
|
2935
|
+
className
|
|
2936
|
+
),
|
|
2937
|
+
...props
|
|
2938
|
+
}
|
|
2939
|
+
);
|
|
2940
|
+
}
|
|
2941
|
+
function ItemFooter({ className, ...props }) {
|
|
2942
|
+
return /* @__PURE__ */ jsx(
|
|
2943
|
+
"div",
|
|
2944
|
+
{
|
|
2945
|
+
"data-slot": "item-footer",
|
|
2946
|
+
className: cn(
|
|
2947
|
+
"flex basis-full items-center justify-between gap-2",
|
|
2948
|
+
className
|
|
2949
|
+
),
|
|
2950
|
+
...props
|
|
2951
|
+
}
|
|
2952
|
+
);
|
|
2953
|
+
}
|
|
2954
|
+
function Kbd({ className, ...props }) {
|
|
2955
|
+
return /* @__PURE__ */ jsx(
|
|
2956
|
+
"kbd",
|
|
2957
|
+
{
|
|
2958
|
+
"data-slot": "kbd",
|
|
2959
|
+
className: cn(
|
|
2960
|
+
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none",
|
|
2961
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
2962
|
+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
2963
|
+
className
|
|
2964
|
+
),
|
|
2965
|
+
...props
|
|
2966
|
+
}
|
|
2967
|
+
);
|
|
2968
|
+
}
|
|
2969
|
+
function KbdGroup({ className, ...props }) {
|
|
2970
|
+
return /* @__PURE__ */ jsx(
|
|
2971
|
+
"kbd",
|
|
2972
|
+
{
|
|
2973
|
+
"data-slot": "kbd-group",
|
|
2974
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
2975
|
+
...props
|
|
2976
|
+
}
|
|
2977
|
+
);
|
|
2978
|
+
}
|
|
2979
|
+
function Menubar({
|
|
2980
|
+
className,
|
|
2981
|
+
...props
|
|
2982
|
+
}) {
|
|
2983
|
+
return /* @__PURE__ */ jsx(
|
|
2984
|
+
MenubarPrimitive.Root,
|
|
2985
|
+
{
|
|
2986
|
+
"data-slot": "menubar",
|
|
2987
|
+
className: cn(
|
|
2988
|
+
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
2989
|
+
className
|
|
2990
|
+
),
|
|
2991
|
+
...props
|
|
2992
|
+
}
|
|
2993
|
+
);
|
|
2994
|
+
}
|
|
2995
|
+
function MenubarMenu({
|
|
2996
|
+
...props
|
|
2997
|
+
}) {
|
|
2998
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
2999
|
+
}
|
|
3000
|
+
function MenubarGroup({
|
|
3001
|
+
...props
|
|
3002
|
+
}) {
|
|
3003
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
3004
|
+
}
|
|
3005
|
+
function MenubarPortal({
|
|
3006
|
+
...props
|
|
3007
|
+
}) {
|
|
3008
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
3009
|
+
}
|
|
3010
|
+
function MenubarRadioGroup({
|
|
3011
|
+
...props
|
|
3012
|
+
}) {
|
|
3013
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
3014
|
+
}
|
|
3015
|
+
function MenubarTrigger({
|
|
3016
|
+
className,
|
|
3017
|
+
...props
|
|
3018
|
+
}) {
|
|
3019
|
+
return /* @__PURE__ */ jsx(
|
|
3020
|
+
MenubarPrimitive.Trigger,
|
|
3021
|
+
{
|
|
3022
|
+
"data-slot": "menubar-trigger",
|
|
3023
|
+
className: cn(
|
|
3024
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
3025
|
+
className
|
|
3026
|
+
),
|
|
3027
|
+
...props
|
|
3028
|
+
}
|
|
3029
|
+
);
|
|
3030
|
+
}
|
|
3031
|
+
function MenubarContent({
|
|
3032
|
+
className,
|
|
3033
|
+
align = "start",
|
|
3034
|
+
alignOffset = -4,
|
|
3035
|
+
sideOffset = 8,
|
|
3036
|
+
...props
|
|
3037
|
+
}) {
|
|
3038
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
|
|
3039
|
+
MenubarPrimitive.Content,
|
|
3040
|
+
{
|
|
3041
|
+
"data-slot": "menubar-content",
|
|
3042
|
+
align,
|
|
3043
|
+
alignOffset,
|
|
3044
|
+
sideOffset,
|
|
3045
|
+
className: cn(
|
|
3046
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
3047
|
+
className
|
|
3048
|
+
),
|
|
3049
|
+
...props
|
|
3050
|
+
}
|
|
3051
|
+
) });
|
|
3052
|
+
}
|
|
3053
|
+
function MenubarItem({
|
|
3054
|
+
className,
|
|
3055
|
+
inset,
|
|
3056
|
+
variant = "default",
|
|
3057
|
+
...props
|
|
3058
|
+
}) {
|
|
3059
|
+
return /* @__PURE__ */ jsx(
|
|
3060
|
+
MenubarPrimitive.Item,
|
|
3061
|
+
{
|
|
3062
|
+
"data-slot": "menubar-item",
|
|
3063
|
+
"data-inset": inset,
|
|
3064
|
+
"data-variant": variant,
|
|
3065
|
+
className: cn(
|
|
3066
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3067
|
+
className
|
|
3068
|
+
),
|
|
3069
|
+
...props
|
|
3070
|
+
}
|
|
3071
|
+
);
|
|
3072
|
+
}
|
|
3073
|
+
function MenubarCheckboxItem({
|
|
3074
|
+
className,
|
|
3075
|
+
children,
|
|
3076
|
+
checked,
|
|
3077
|
+
...props
|
|
3078
|
+
}) {
|
|
3079
|
+
return /* @__PURE__ */ jsxs(
|
|
3080
|
+
MenubarPrimitive.CheckboxItem,
|
|
3081
|
+
{
|
|
3082
|
+
"data-slot": "menubar-checkbox-item",
|
|
3083
|
+
className: cn(
|
|
3084
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3085
|
+
className
|
|
3086
|
+
),
|
|
3087
|
+
checked,
|
|
3088
|
+
...props,
|
|
3089
|
+
children: [
|
|
3090
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
3091
|
+
children
|
|
3092
|
+
]
|
|
3093
|
+
}
|
|
3094
|
+
);
|
|
3095
|
+
}
|
|
3096
|
+
function MenubarRadioItem({
|
|
3097
|
+
className,
|
|
3098
|
+
children,
|
|
3099
|
+
...props
|
|
3100
|
+
}) {
|
|
3101
|
+
return /* @__PURE__ */ jsxs(
|
|
3102
|
+
MenubarPrimitive.RadioItem,
|
|
3103
|
+
{
|
|
3104
|
+
"data-slot": "menubar-radio-item",
|
|
3105
|
+
className: cn(
|
|
3106
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3107
|
+
className
|
|
3108
|
+
),
|
|
3109
|
+
...props,
|
|
3110
|
+
children: [
|
|
3111
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
3112
|
+
children
|
|
3113
|
+
]
|
|
3114
|
+
}
|
|
3115
|
+
);
|
|
3116
|
+
}
|
|
3117
|
+
function MenubarLabel({
|
|
3118
|
+
className,
|
|
3119
|
+
inset,
|
|
3120
|
+
...props
|
|
3121
|
+
}) {
|
|
3122
|
+
return /* @__PURE__ */ jsx(
|
|
3123
|
+
MenubarPrimitive.Label,
|
|
3124
|
+
{
|
|
3125
|
+
"data-slot": "menubar-label",
|
|
3126
|
+
"data-inset": inset,
|
|
3127
|
+
className: cn(
|
|
3128
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
3129
|
+
className
|
|
3130
|
+
),
|
|
3131
|
+
...props
|
|
3132
|
+
}
|
|
3133
|
+
);
|
|
3134
|
+
}
|
|
3135
|
+
function MenubarSeparator({
|
|
3136
|
+
className,
|
|
3137
|
+
...props
|
|
3138
|
+
}) {
|
|
3139
|
+
return /* @__PURE__ */ jsx(
|
|
3140
|
+
MenubarPrimitive.Separator,
|
|
3141
|
+
{
|
|
3142
|
+
"data-slot": "menubar-separator",
|
|
3143
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
3144
|
+
...props
|
|
3145
|
+
}
|
|
3146
|
+
);
|
|
3147
|
+
}
|
|
3148
|
+
function MenubarShortcut({
|
|
3149
|
+
className,
|
|
3150
|
+
...props
|
|
3151
|
+
}) {
|
|
3152
|
+
return /* @__PURE__ */ jsx(
|
|
3153
|
+
"span",
|
|
3154
|
+
{
|
|
3155
|
+
"data-slot": "menubar-shortcut",
|
|
3156
|
+
className: cn(
|
|
3157
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
3158
|
+
className
|
|
3159
|
+
),
|
|
3160
|
+
...props
|
|
3161
|
+
}
|
|
3162
|
+
);
|
|
3163
|
+
}
|
|
3164
|
+
function MenubarSub({
|
|
3165
|
+
...props
|
|
3166
|
+
}) {
|
|
3167
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
3168
|
+
}
|
|
3169
|
+
function MenubarSubTrigger({
|
|
3170
|
+
className,
|
|
3171
|
+
inset,
|
|
3172
|
+
children,
|
|
3173
|
+
...props
|
|
3174
|
+
}) {
|
|
3175
|
+
return /* @__PURE__ */ jsxs(
|
|
3176
|
+
MenubarPrimitive.SubTrigger,
|
|
3177
|
+
{
|
|
3178
|
+
"data-slot": "menubar-sub-trigger",
|
|
3179
|
+
"data-inset": inset,
|
|
3180
|
+
className: cn(
|
|
3181
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
|
|
3182
|
+
className
|
|
3183
|
+
),
|
|
3184
|
+
...props,
|
|
3185
|
+
children: [
|
|
3186
|
+
children,
|
|
3187
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
3188
|
+
]
|
|
3189
|
+
}
|
|
3190
|
+
);
|
|
3191
|
+
}
|
|
3192
|
+
function MenubarSubContent({
|
|
3193
|
+
className,
|
|
3194
|
+
...props
|
|
3195
|
+
}) {
|
|
3196
|
+
return /* @__PURE__ */ jsx(
|
|
3197
|
+
MenubarPrimitive.SubContent,
|
|
3198
|
+
{
|
|
3199
|
+
"data-slot": "menubar-sub-content",
|
|
3200
|
+
className: cn(
|
|
3201
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
3202
|
+
className
|
|
3203
|
+
),
|
|
3204
|
+
...props
|
|
3205
|
+
}
|
|
3206
|
+
);
|
|
3207
|
+
}
|
|
3208
|
+
function NavigationMenu({
|
|
3209
|
+
className,
|
|
3210
|
+
children,
|
|
3211
|
+
viewport = true,
|
|
3212
|
+
...props
|
|
3213
|
+
}) {
|
|
3214
|
+
return /* @__PURE__ */ jsxs(
|
|
3215
|
+
NavigationMenuPrimitive.Root,
|
|
3216
|
+
{
|
|
3217
|
+
"data-slot": "navigation-menu",
|
|
3218
|
+
"data-viewport": viewport,
|
|
3219
|
+
className: cn(
|
|
3220
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
3221
|
+
className
|
|
3222
|
+
),
|
|
3223
|
+
...props,
|
|
3224
|
+
children: [
|
|
3225
|
+
children,
|
|
3226
|
+
viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
3227
|
+
]
|
|
3228
|
+
}
|
|
3229
|
+
);
|
|
3230
|
+
}
|
|
3231
|
+
function NavigationMenuList({
|
|
3232
|
+
className,
|
|
3233
|
+
...props
|
|
3234
|
+
}) {
|
|
3235
|
+
return /* @__PURE__ */ jsx(
|
|
3236
|
+
NavigationMenuPrimitive.List,
|
|
3237
|
+
{
|
|
3238
|
+
"data-slot": "navigation-menu-list",
|
|
3239
|
+
className: cn(
|
|
3240
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
3241
|
+
className
|
|
3242
|
+
),
|
|
3243
|
+
...props
|
|
3244
|
+
}
|
|
3245
|
+
);
|
|
3246
|
+
}
|
|
3247
|
+
function NavigationMenuItem({
|
|
3248
|
+
className,
|
|
3249
|
+
...props
|
|
3250
|
+
}) {
|
|
3251
|
+
return /* @__PURE__ */ jsx(
|
|
3252
|
+
NavigationMenuPrimitive.Item,
|
|
3253
|
+
{
|
|
3254
|
+
"data-slot": "navigation-menu-item",
|
|
3255
|
+
className: cn("relative", className),
|
|
3256
|
+
...props
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3259
|
+
}
|
|
3260
|
+
var navigationMenuTriggerStyle = cva(
|
|
3261
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
3262
|
+
);
|
|
3263
|
+
function NavigationMenuTrigger({
|
|
3264
|
+
className,
|
|
3265
|
+
children,
|
|
3266
|
+
...props
|
|
3267
|
+
}) {
|
|
3268
|
+
return /* @__PURE__ */ jsxs(
|
|
3269
|
+
NavigationMenuPrimitive.Trigger,
|
|
3270
|
+
{
|
|
3271
|
+
"data-slot": "navigation-menu-trigger",
|
|
3272
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
3273
|
+
...props,
|
|
3274
|
+
children: [
|
|
3275
|
+
children,
|
|
3276
|
+
" ",
|
|
3277
|
+
/* @__PURE__ */ jsx(
|
|
3278
|
+
ChevronDownIcon,
|
|
3279
|
+
{
|
|
3280
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
3281
|
+
"aria-hidden": "true"
|
|
3282
|
+
}
|
|
3283
|
+
)
|
|
3284
|
+
]
|
|
3285
|
+
}
|
|
3286
|
+
);
|
|
3287
|
+
}
|
|
3288
|
+
function NavigationMenuContent({
|
|
3289
|
+
className,
|
|
3290
|
+
...props
|
|
3291
|
+
}) {
|
|
3292
|
+
return /* @__PURE__ */ jsx(
|
|
3293
|
+
NavigationMenuPrimitive.Content,
|
|
3294
|
+
{
|
|
3295
|
+
"data-slot": "navigation-menu-content",
|
|
3296
|
+
className: cn(
|
|
3297
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
3298
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
3299
|
+
className
|
|
3300
|
+
),
|
|
3301
|
+
...props
|
|
3302
|
+
}
|
|
3303
|
+
);
|
|
3304
|
+
}
|
|
3305
|
+
function NavigationMenuViewport({
|
|
3306
|
+
className,
|
|
3307
|
+
...props
|
|
3308
|
+
}) {
|
|
3309
|
+
return /* @__PURE__ */ jsx(
|
|
3310
|
+
"div",
|
|
3311
|
+
{
|
|
3312
|
+
className: cn(
|
|
3313
|
+
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
3314
|
+
),
|
|
3315
|
+
children: /* @__PURE__ */ jsx(
|
|
3316
|
+
NavigationMenuPrimitive.Viewport,
|
|
3317
|
+
{
|
|
3318
|
+
"data-slot": "navigation-menu-viewport",
|
|
3319
|
+
className: cn(
|
|
3320
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
3321
|
+
className
|
|
3322
|
+
),
|
|
3323
|
+
...props
|
|
3324
|
+
}
|
|
3325
|
+
)
|
|
3326
|
+
}
|
|
3327
|
+
);
|
|
3328
|
+
}
|
|
3329
|
+
function NavigationMenuLink({
|
|
3330
|
+
className,
|
|
3331
|
+
...props
|
|
3332
|
+
}) {
|
|
3333
|
+
return /* @__PURE__ */ jsx(
|
|
3334
|
+
NavigationMenuPrimitive.Link,
|
|
3335
|
+
{
|
|
3336
|
+
"data-slot": "navigation-menu-link",
|
|
3337
|
+
className: cn(
|
|
3338
|
+
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3339
|
+
className
|
|
3340
|
+
),
|
|
3341
|
+
...props
|
|
3342
|
+
}
|
|
3343
|
+
);
|
|
3344
|
+
}
|
|
3345
|
+
function NavigationMenuIndicator({
|
|
3346
|
+
className,
|
|
3347
|
+
...props
|
|
3348
|
+
}) {
|
|
3349
|
+
return /* @__PURE__ */ jsx(
|
|
3350
|
+
NavigationMenuPrimitive.Indicator,
|
|
3351
|
+
{
|
|
3352
|
+
"data-slot": "navigation-menu-indicator",
|
|
3353
|
+
className: cn(
|
|
3354
|
+
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
3355
|
+
className
|
|
3356
|
+
),
|
|
3357
|
+
...props,
|
|
3358
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
3359
|
+
}
|
|
3360
|
+
);
|
|
3361
|
+
}
|
|
3362
|
+
function Pagination({ className, ...props }) {
|
|
3363
|
+
return /* @__PURE__ */ jsx(
|
|
3364
|
+
"nav",
|
|
3365
|
+
{
|
|
3366
|
+
role: "navigation",
|
|
3367
|
+
"aria-label": "pagination",
|
|
3368
|
+
"data-slot": "pagination",
|
|
3369
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
3370
|
+
...props
|
|
3371
|
+
}
|
|
3372
|
+
);
|
|
3373
|
+
}
|
|
3374
|
+
function PaginationContent({
|
|
3375
|
+
className,
|
|
3376
|
+
...props
|
|
3377
|
+
}) {
|
|
3378
|
+
return /* @__PURE__ */ jsx(
|
|
3379
|
+
"ul",
|
|
3380
|
+
{
|
|
3381
|
+
"data-slot": "pagination-content",
|
|
3382
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
3383
|
+
...props
|
|
3384
|
+
}
|
|
3385
|
+
);
|
|
3386
|
+
}
|
|
3387
|
+
function PaginationItem({ ...props }) {
|
|
3388
|
+
return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
|
|
3389
|
+
}
|
|
3390
|
+
function PaginationLink({
|
|
3391
|
+
className,
|
|
3392
|
+
isActive,
|
|
3393
|
+
size = "icon",
|
|
3394
|
+
...props
|
|
3395
|
+
}) {
|
|
3396
|
+
return /* @__PURE__ */ jsx(
|
|
3397
|
+
"a",
|
|
3398
|
+
{
|
|
3399
|
+
"aria-current": isActive ? "page" : void 0,
|
|
3400
|
+
"data-slot": "pagination-link",
|
|
3401
|
+
"data-active": isActive,
|
|
3402
|
+
className: cn(
|
|
3403
|
+
buttonVariants({
|
|
3404
|
+
variant: isActive ? "outline" : "ghost",
|
|
3405
|
+
size
|
|
3406
|
+
}),
|
|
3407
|
+
className
|
|
3408
|
+
),
|
|
3409
|
+
...props
|
|
3410
|
+
}
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3413
|
+
function PaginationPrevious({
|
|
3414
|
+
className,
|
|
3415
|
+
...props
|
|
3416
|
+
}) {
|
|
3417
|
+
return /* @__PURE__ */ jsxs(
|
|
3418
|
+
PaginationLink,
|
|
3419
|
+
{
|
|
3420
|
+
"aria-label": "Go to previous page",
|
|
3421
|
+
size: "default",
|
|
3422
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
3423
|
+
...props,
|
|
3424
|
+
children: [
|
|
3425
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
3426
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
|
|
3427
|
+
]
|
|
3428
|
+
}
|
|
3429
|
+
);
|
|
3430
|
+
}
|
|
3431
|
+
function PaginationNext({
|
|
3432
|
+
className,
|
|
3433
|
+
...props
|
|
3434
|
+
}) {
|
|
3435
|
+
return /* @__PURE__ */ jsxs(
|
|
3436
|
+
PaginationLink,
|
|
3437
|
+
{
|
|
3438
|
+
"aria-label": "Go to next page",
|
|
3439
|
+
size: "default",
|
|
3440
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
3441
|
+
...props,
|
|
3442
|
+
children: [
|
|
3443
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
|
|
3444
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
3445
|
+
]
|
|
3446
|
+
}
|
|
3447
|
+
);
|
|
3448
|
+
}
|
|
3449
|
+
function PaginationEllipsis({
|
|
3450
|
+
className,
|
|
3451
|
+
...props
|
|
3452
|
+
}) {
|
|
3453
|
+
return /* @__PURE__ */ jsxs(
|
|
3454
|
+
"span",
|
|
3455
|
+
{
|
|
3456
|
+
"aria-hidden": true,
|
|
3457
|
+
"data-slot": "pagination-ellipsis",
|
|
3458
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
3459
|
+
...props,
|
|
3460
|
+
children: [
|
|
3461
|
+
/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
|
|
3462
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
3463
|
+
]
|
|
3464
|
+
}
|
|
3465
|
+
);
|
|
3466
|
+
}
|
|
3467
|
+
function Popover({
|
|
3468
|
+
...props
|
|
3469
|
+
}) {
|
|
3470
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
3471
|
+
}
|
|
3472
|
+
function PopoverTrigger({
|
|
3473
|
+
...props
|
|
3474
|
+
}) {
|
|
3475
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
3476
|
+
}
|
|
3477
|
+
function PopoverContent({
|
|
3478
|
+
className,
|
|
3479
|
+
align = "center",
|
|
3480
|
+
sideOffset = 4,
|
|
3481
|
+
...props
|
|
3482
|
+
}) {
|
|
3483
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3484
|
+
PopoverPrimitive.Content,
|
|
3485
|
+
{
|
|
3486
|
+
"data-slot": "popover-content",
|
|
3487
|
+
align,
|
|
3488
|
+
sideOffset,
|
|
3489
|
+
className: cn(
|
|
3490
|
+
"bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
3491
|
+
className
|
|
3492
|
+
),
|
|
3493
|
+
...props
|
|
3494
|
+
}
|
|
3495
|
+
) });
|
|
3496
|
+
}
|
|
3497
|
+
function PopoverAnchor({
|
|
3498
|
+
...props
|
|
3499
|
+
}) {
|
|
3500
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
3501
|
+
}
|
|
3502
|
+
function Progress({
|
|
3503
|
+
className,
|
|
3504
|
+
value,
|
|
3505
|
+
...props
|
|
3506
|
+
}) {
|
|
3507
|
+
return /* @__PURE__ */ jsx(
|
|
3508
|
+
ProgressPrimitive.Root,
|
|
3509
|
+
{
|
|
3510
|
+
"data-slot": "progress",
|
|
3511
|
+
className: cn(
|
|
3512
|
+
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
3513
|
+
className
|
|
3514
|
+
),
|
|
3515
|
+
...props,
|
|
3516
|
+
children: /* @__PURE__ */ jsx(
|
|
3517
|
+
ProgressPrimitive.Indicator,
|
|
3518
|
+
{
|
|
3519
|
+
"data-slot": "progress-indicator",
|
|
3520
|
+
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
3521
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
3522
|
+
}
|
|
3523
|
+
)
|
|
3524
|
+
}
|
|
3525
|
+
);
|
|
3526
|
+
}
|
|
3527
|
+
function RadioGroup4({
|
|
3528
|
+
className,
|
|
3529
|
+
...props
|
|
3530
|
+
}) {
|
|
3531
|
+
return /* @__PURE__ */ jsx(
|
|
3532
|
+
RadioGroupPrimitive.Root,
|
|
3533
|
+
{
|
|
3534
|
+
"data-slot": "radio-group",
|
|
3535
|
+
className: cn("grid gap-3", className),
|
|
3536
|
+
...props
|
|
3537
|
+
}
|
|
3538
|
+
);
|
|
3539
|
+
}
|
|
3540
|
+
function RadioGroupItem({
|
|
3541
|
+
className,
|
|
3542
|
+
...props
|
|
3543
|
+
}) {
|
|
3544
|
+
return /* @__PURE__ */ jsx(
|
|
3545
|
+
RadioGroupPrimitive.Item,
|
|
3546
|
+
{
|
|
3547
|
+
"data-slot": "radio-group-item",
|
|
3548
|
+
className: cn(
|
|
3549
|
+
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
3550
|
+
className
|
|
3551
|
+
),
|
|
3552
|
+
...props,
|
|
3553
|
+
children: /* @__PURE__ */ jsx(
|
|
3554
|
+
RadioGroupPrimitive.Indicator,
|
|
3555
|
+
{
|
|
3556
|
+
"data-slot": "radio-group-indicator",
|
|
3557
|
+
className: "relative flex items-center justify-center",
|
|
3558
|
+
children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
3559
|
+
}
|
|
3560
|
+
)
|
|
3561
|
+
}
|
|
3562
|
+
);
|
|
3563
|
+
}
|
|
3564
|
+
function ResizablePanelGroup({
|
|
3565
|
+
className,
|
|
3566
|
+
...props
|
|
3567
|
+
}) {
|
|
3568
|
+
return /* @__PURE__ */ jsx(
|
|
3569
|
+
ResizablePrimitive.PanelGroup,
|
|
3570
|
+
{
|
|
3571
|
+
"data-slot": "resizable-panel-group",
|
|
3572
|
+
className: cn(
|
|
3573
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
3574
|
+
className
|
|
3575
|
+
),
|
|
3576
|
+
...props
|
|
3577
|
+
}
|
|
3578
|
+
);
|
|
3579
|
+
}
|
|
3580
|
+
function ResizablePanel({
|
|
3581
|
+
...props
|
|
3582
|
+
}) {
|
|
3583
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
3584
|
+
}
|
|
3585
|
+
function ResizableHandle({
|
|
3586
|
+
withHandle,
|
|
3587
|
+
className,
|
|
3588
|
+
...props
|
|
3589
|
+
}) {
|
|
3590
|
+
return /* @__PURE__ */ jsx(
|
|
3591
|
+
ResizablePrimitive.PanelResizeHandle,
|
|
3592
|
+
{
|
|
3593
|
+
"data-slot": "resizable-handle",
|
|
3594
|
+
className: cn(
|
|
3595
|
+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden 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-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
3596
|
+
className
|
|
3597
|
+
),
|
|
3598
|
+
...props,
|
|
3599
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
|
|
3600
|
+
}
|
|
3601
|
+
);
|
|
3602
|
+
}
|
|
3603
|
+
function ScrollArea({
|
|
3604
|
+
className,
|
|
3605
|
+
children,
|
|
3606
|
+
...props
|
|
3607
|
+
}) {
|
|
3608
|
+
return /* @__PURE__ */ jsxs(
|
|
3609
|
+
ScrollAreaPrimitive.Root,
|
|
3610
|
+
{
|
|
3611
|
+
"data-slot": "scroll-area",
|
|
3612
|
+
className: cn("relative", className),
|
|
3613
|
+
...props,
|
|
3614
|
+
children: [
|
|
3615
|
+
/* @__PURE__ */ jsx(
|
|
3616
|
+
ScrollAreaPrimitive.Viewport,
|
|
3617
|
+
{
|
|
3618
|
+
"data-slot": "scroll-area-viewport",
|
|
3619
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
3620
|
+
children
|
|
3621
|
+
}
|
|
3622
|
+
),
|
|
3623
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
3624
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
3625
|
+
]
|
|
3626
|
+
}
|
|
3627
|
+
);
|
|
3628
|
+
}
|
|
3629
|
+
function ScrollBar({
|
|
3630
|
+
className,
|
|
3631
|
+
orientation = "vertical",
|
|
3632
|
+
...props
|
|
3633
|
+
}) {
|
|
3634
|
+
return /* @__PURE__ */ jsx(
|
|
3635
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3636
|
+
{
|
|
3637
|
+
"data-slot": "scroll-area-scrollbar",
|
|
3638
|
+
orientation,
|
|
3639
|
+
className: cn(
|
|
3640
|
+
"flex touch-none p-px transition-colors select-none",
|
|
3641
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
3642
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
3643
|
+
className
|
|
3644
|
+
),
|
|
3645
|
+
...props,
|
|
3646
|
+
children: /* @__PURE__ */ jsx(
|
|
3647
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
3648
|
+
{
|
|
3649
|
+
"data-slot": "scroll-area-thumb",
|
|
3650
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
3651
|
+
}
|
|
3652
|
+
)
|
|
3653
|
+
}
|
|
3654
|
+
);
|
|
3655
|
+
}
|
|
3656
|
+
function Select({
|
|
3657
|
+
...props
|
|
3658
|
+
}) {
|
|
3659
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
3660
|
+
}
|
|
3661
|
+
function SelectGroup({
|
|
3662
|
+
...props
|
|
3663
|
+
}) {
|
|
3664
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
3665
|
+
}
|
|
3666
|
+
function SelectValue({
|
|
3667
|
+
...props
|
|
3668
|
+
}) {
|
|
3669
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
3670
|
+
}
|
|
3671
|
+
function SelectTrigger({
|
|
3672
|
+
className,
|
|
3673
|
+
size = "default",
|
|
3674
|
+
children,
|
|
3675
|
+
...props
|
|
3676
|
+
}) {
|
|
3677
|
+
return /* @__PURE__ */ jsxs(
|
|
3678
|
+
SelectPrimitive.Trigger,
|
|
3679
|
+
{
|
|
3680
|
+
"data-slot": "select-trigger",
|
|
3681
|
+
"data-size": size,
|
|
3682
|
+
className: cn(
|
|
3683
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3684
|
+
className
|
|
3685
|
+
),
|
|
3686
|
+
...props,
|
|
3687
|
+
children: [
|
|
3688
|
+
children,
|
|
3689
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
3690
|
+
]
|
|
3691
|
+
}
|
|
3692
|
+
);
|
|
3693
|
+
}
|
|
3694
|
+
function SelectContent({
|
|
3695
|
+
className,
|
|
3696
|
+
children,
|
|
3697
|
+
position = "popper",
|
|
3698
|
+
align = "center",
|
|
3699
|
+
...props
|
|
3700
|
+
}) {
|
|
3701
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
3702
|
+
SelectPrimitive.Content,
|
|
3703
|
+
{
|
|
3704
|
+
"data-slot": "select-content",
|
|
3705
|
+
className: cn(
|
|
3706
|
+
"bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
3707
|
+
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",
|
|
3708
|
+
className
|
|
3709
|
+
),
|
|
3710
|
+
position,
|
|
3711
|
+
align,
|
|
3712
|
+
...props,
|
|
3713
|
+
children: [
|
|
3714
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
3715
|
+
/* @__PURE__ */ jsx(
|
|
3716
|
+
SelectPrimitive.Viewport,
|
|
3717
|
+
{
|
|
3718
|
+
className: cn(
|
|
3719
|
+
"p-1",
|
|
3720
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
3721
|
+
),
|
|
3722
|
+
children
|
|
3723
|
+
}
|
|
3724
|
+
),
|
|
3725
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
3726
|
+
]
|
|
3727
|
+
}
|
|
3728
|
+
) });
|
|
3729
|
+
}
|
|
3730
|
+
function SelectLabel({
|
|
3731
|
+
className,
|
|
3732
|
+
...props
|
|
3733
|
+
}) {
|
|
3734
|
+
return /* @__PURE__ */ jsx(
|
|
3735
|
+
SelectPrimitive.Label,
|
|
3736
|
+
{
|
|
3737
|
+
"data-slot": "select-label",
|
|
3738
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
3739
|
+
...props
|
|
3740
|
+
}
|
|
3741
|
+
);
|
|
3742
|
+
}
|
|
3743
|
+
function SelectItem({
|
|
3744
|
+
className,
|
|
3745
|
+
children,
|
|
3746
|
+
...props
|
|
3747
|
+
}) {
|
|
3748
|
+
return /* @__PURE__ */ jsxs(
|
|
3749
|
+
SelectPrimitive.Item,
|
|
3750
|
+
{
|
|
3751
|
+
"data-slot": "select-item",
|
|
3752
|
+
className: cn(
|
|
3753
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
3754
|
+
className
|
|
3755
|
+
),
|
|
3756
|
+
...props,
|
|
3757
|
+
children: [
|
|
3758
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
3759
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
3760
|
+
]
|
|
3761
|
+
}
|
|
3762
|
+
);
|
|
3763
|
+
}
|
|
3764
|
+
function SelectSeparator({
|
|
3765
|
+
className,
|
|
3766
|
+
...props
|
|
3767
|
+
}) {
|
|
3768
|
+
return /* @__PURE__ */ jsx(
|
|
3769
|
+
SelectPrimitive.Separator,
|
|
3770
|
+
{
|
|
3771
|
+
"data-slot": "select-separator",
|
|
3772
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
3773
|
+
...props
|
|
3774
|
+
}
|
|
3775
|
+
);
|
|
3776
|
+
}
|
|
3777
|
+
function SelectScrollUpButton({
|
|
3778
|
+
className,
|
|
3779
|
+
...props
|
|
3780
|
+
}) {
|
|
3781
|
+
return /* @__PURE__ */ jsx(
|
|
3782
|
+
SelectPrimitive.ScrollUpButton,
|
|
3783
|
+
{
|
|
3784
|
+
"data-slot": "select-scroll-up-button",
|
|
3785
|
+
className: cn(
|
|
3786
|
+
"flex cursor-default items-center justify-center py-1",
|
|
3787
|
+
className
|
|
3788
|
+
),
|
|
3789
|
+
...props,
|
|
3790
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
3791
|
+
}
|
|
3792
|
+
);
|
|
3793
|
+
}
|
|
3794
|
+
function SelectScrollDownButton({
|
|
3795
|
+
className,
|
|
3796
|
+
...props
|
|
3797
|
+
}) {
|
|
3798
|
+
return /* @__PURE__ */ jsx(
|
|
3799
|
+
SelectPrimitive.ScrollDownButton,
|
|
3800
|
+
{
|
|
3801
|
+
"data-slot": "select-scroll-down-button",
|
|
3802
|
+
className: cn(
|
|
3803
|
+
"flex cursor-default items-center justify-center py-1",
|
|
3804
|
+
className
|
|
3805
|
+
),
|
|
3806
|
+
...props,
|
|
3807
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
3808
|
+
}
|
|
3809
|
+
);
|
|
3810
|
+
}
|
|
3811
|
+
function Sheet({ ...props }) {
|
|
3812
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
3813
|
+
}
|
|
3814
|
+
function SheetTrigger({
|
|
3815
|
+
...props
|
|
3816
|
+
}) {
|
|
3817
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
3818
|
+
}
|
|
3819
|
+
function SheetClose({
|
|
3820
|
+
...props
|
|
3821
|
+
}) {
|
|
3822
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
3823
|
+
}
|
|
3824
|
+
function SheetPortal({
|
|
3825
|
+
...props
|
|
3826
|
+
}) {
|
|
3827
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
3828
|
+
}
|
|
3829
|
+
function SheetOverlay({
|
|
3830
|
+
className,
|
|
3831
|
+
...props
|
|
3832
|
+
}) {
|
|
3833
|
+
return /* @__PURE__ */ jsx(
|
|
3834
|
+
DialogPrimitive.Overlay,
|
|
3835
|
+
{
|
|
3836
|
+
"data-slot": "sheet-overlay",
|
|
3837
|
+
className: cn(
|
|
3838
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
3839
|
+
className
|
|
3840
|
+
),
|
|
3841
|
+
...props
|
|
3842
|
+
}
|
|
3843
|
+
);
|
|
3844
|
+
}
|
|
3845
|
+
function SheetContent({
|
|
3846
|
+
className,
|
|
3847
|
+
children,
|
|
3848
|
+
side = "right",
|
|
3849
|
+
...props
|
|
3850
|
+
}) {
|
|
3851
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
3852
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
3853
|
+
/* @__PURE__ */ jsxs(
|
|
3854
|
+
DialogPrimitive.Content,
|
|
3855
|
+
{
|
|
3856
|
+
"data-slot": "sheet-content",
|
|
3857
|
+
className: cn(
|
|
3858
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
3859
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
3860
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
3861
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
3862
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
3863
|
+
className
|
|
3864
|
+
),
|
|
3865
|
+
...props,
|
|
3866
|
+
children: [
|
|
3867
|
+
children,
|
|
3868
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
3869
|
+
/* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
|
|
3870
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
3871
|
+
] })
|
|
3872
|
+
]
|
|
3873
|
+
}
|
|
3874
|
+
)
|
|
3875
|
+
] });
|
|
3876
|
+
}
|
|
3877
|
+
function SheetHeader({ className, ...props }) {
|
|
3878
|
+
return /* @__PURE__ */ jsx(
|
|
3879
|
+
"div",
|
|
3880
|
+
{
|
|
3881
|
+
"data-slot": "sheet-header",
|
|
3882
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
3883
|
+
...props
|
|
3884
|
+
}
|
|
3885
|
+
);
|
|
3886
|
+
}
|
|
3887
|
+
function SheetFooter({ className, ...props }) {
|
|
3888
|
+
return /* @__PURE__ */ jsx(
|
|
3889
|
+
"div",
|
|
3890
|
+
{
|
|
3891
|
+
"data-slot": "sheet-footer",
|
|
3892
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
3893
|
+
...props
|
|
3894
|
+
}
|
|
3895
|
+
);
|
|
3896
|
+
}
|
|
3897
|
+
function SheetTitle({
|
|
3898
|
+
className,
|
|
3899
|
+
...props
|
|
3900
|
+
}) {
|
|
3901
|
+
return /* @__PURE__ */ jsx(
|
|
3902
|
+
DialogPrimitive.Title,
|
|
3903
|
+
{
|
|
3904
|
+
"data-slot": "sheet-title",
|
|
3905
|
+
className: cn("text-foreground font-semibold", className),
|
|
3906
|
+
...props
|
|
3907
|
+
}
|
|
3908
|
+
);
|
|
3909
|
+
}
|
|
3910
|
+
function SheetDescription({
|
|
3911
|
+
className,
|
|
3912
|
+
...props
|
|
3913
|
+
}) {
|
|
3914
|
+
return /* @__PURE__ */ jsx(
|
|
3915
|
+
DialogPrimitive.Description,
|
|
3916
|
+
{
|
|
3917
|
+
"data-slot": "sheet-description",
|
|
3918
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
3919
|
+
...props
|
|
3920
|
+
}
|
|
3921
|
+
);
|
|
3922
|
+
}
|
|
3923
|
+
var MOBILE_BREAKPOINT = 768;
|
|
3924
|
+
function useIsMobile() {
|
|
3925
|
+
const [isMobile, setIsMobile] = React2.useState(void 0);
|
|
3926
|
+
React2.useEffect(() => {
|
|
3927
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
3928
|
+
const onChange = () => {
|
|
3929
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3930
|
+
};
|
|
3931
|
+
mql.addEventListener("change", onChange);
|
|
3932
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3933
|
+
return () => mql.removeEventListener("change", onChange);
|
|
3934
|
+
}, []);
|
|
3935
|
+
return !!isMobile;
|
|
3936
|
+
}
|
|
3937
|
+
function Skeleton({ className, ...props }) {
|
|
3938
|
+
return /* @__PURE__ */ jsx(
|
|
3939
|
+
"div",
|
|
3940
|
+
{
|
|
3941
|
+
"data-slot": "skeleton",
|
|
3942
|
+
className: cn("bg-accent animate-pulse rounded-md", className),
|
|
3943
|
+
...props
|
|
3944
|
+
}
|
|
3945
|
+
);
|
|
3946
|
+
}
|
|
3947
|
+
function TooltipProvider({
|
|
3948
|
+
delayDuration = 0,
|
|
3949
|
+
...props
|
|
3950
|
+
}) {
|
|
3951
|
+
return /* @__PURE__ */ jsx(
|
|
3952
|
+
TooltipPrimitive.Provider,
|
|
3953
|
+
{
|
|
3954
|
+
"data-slot": "tooltip-provider",
|
|
3955
|
+
delayDuration,
|
|
3956
|
+
...props
|
|
3957
|
+
}
|
|
3958
|
+
);
|
|
3959
|
+
}
|
|
3960
|
+
function Tooltip2({
|
|
3961
|
+
...props
|
|
3962
|
+
}) {
|
|
3963
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
3964
|
+
}
|
|
3965
|
+
function TooltipTrigger({
|
|
3966
|
+
...props
|
|
3967
|
+
}) {
|
|
3968
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
3969
|
+
}
|
|
3970
|
+
function TooltipContent({
|
|
3971
|
+
className,
|
|
3972
|
+
sideOffset = 0,
|
|
3973
|
+
children,
|
|
3974
|
+
...props
|
|
3975
|
+
}) {
|
|
3976
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
3977
|
+
TooltipPrimitive.Content,
|
|
3978
|
+
{
|
|
3979
|
+
"data-slot": "tooltip-content",
|
|
3980
|
+
sideOffset,
|
|
3981
|
+
className: cn(
|
|
3982
|
+
"bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
3983
|
+
className
|
|
3984
|
+
),
|
|
3985
|
+
...props,
|
|
3986
|
+
children: [
|
|
3987
|
+
children,
|
|
3988
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
3989
|
+
]
|
|
3990
|
+
}
|
|
3991
|
+
) });
|
|
3992
|
+
}
|
|
3993
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
3994
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3995
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
3996
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
3997
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
3998
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
3999
|
+
var SidebarContext = React2.createContext(null);
|
|
4000
|
+
function useSidebar() {
|
|
4001
|
+
const context = React2.useContext(SidebarContext);
|
|
4002
|
+
if (!context) {
|
|
4003
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4004
|
+
}
|
|
4005
|
+
return context;
|
|
4006
|
+
}
|
|
4007
|
+
function SidebarProvider({
|
|
4008
|
+
defaultOpen = true,
|
|
4009
|
+
open: openProp,
|
|
4010
|
+
onOpenChange: setOpenProp,
|
|
4011
|
+
className,
|
|
4012
|
+
style,
|
|
4013
|
+
children,
|
|
4014
|
+
...props
|
|
4015
|
+
}) {
|
|
4016
|
+
const isMobile = useIsMobile();
|
|
4017
|
+
const [openMobile, setOpenMobile] = React2.useState(false);
|
|
4018
|
+
const [_open, _setOpen] = React2.useState(defaultOpen);
|
|
4019
|
+
const open = openProp ?? _open;
|
|
4020
|
+
const setOpen = React2.useCallback(
|
|
4021
|
+
(value) => {
|
|
4022
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
4023
|
+
if (setOpenProp) {
|
|
4024
|
+
setOpenProp(openState);
|
|
4025
|
+
} else {
|
|
4026
|
+
_setOpen(openState);
|
|
4027
|
+
}
|
|
4028
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
4029
|
+
},
|
|
4030
|
+
[setOpenProp, open]
|
|
4031
|
+
);
|
|
4032
|
+
const toggleSidebar = React2.useCallback(() => {
|
|
4033
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4034
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
4035
|
+
React2.useEffect(() => {
|
|
4036
|
+
const handleKeyDown = (event) => {
|
|
4037
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4038
|
+
event.preventDefault();
|
|
4039
|
+
toggleSidebar();
|
|
4040
|
+
}
|
|
4041
|
+
};
|
|
4042
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
4043
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4044
|
+
}, [toggleSidebar]);
|
|
4045
|
+
const state = open ? "expanded" : "collapsed";
|
|
4046
|
+
const contextValue = React2.useMemo(
|
|
4047
|
+
() => ({
|
|
4048
|
+
state,
|
|
4049
|
+
open,
|
|
4050
|
+
setOpen,
|
|
4051
|
+
isMobile,
|
|
4052
|
+
openMobile,
|
|
4053
|
+
setOpenMobile,
|
|
4054
|
+
toggleSidebar
|
|
4055
|
+
}),
|
|
4056
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
4057
|
+
);
|
|
4058
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
4059
|
+
"div",
|
|
4060
|
+
{
|
|
4061
|
+
"data-slot": "sidebar-wrapper",
|
|
4062
|
+
style: {
|
|
4063
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
4064
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
4065
|
+
...style
|
|
4066
|
+
},
|
|
4067
|
+
className: cn(
|
|
4068
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
4069
|
+
className
|
|
4070
|
+
),
|
|
4071
|
+
...props,
|
|
4072
|
+
children
|
|
4073
|
+
}
|
|
4074
|
+
) }) });
|
|
4075
|
+
}
|
|
4076
|
+
function Sidebar({
|
|
4077
|
+
side = "left",
|
|
4078
|
+
variant = "sidebar",
|
|
4079
|
+
collapsible = "offcanvas",
|
|
4080
|
+
className,
|
|
4081
|
+
children,
|
|
4082
|
+
...props
|
|
4083
|
+
}) {
|
|
4084
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
4085
|
+
if (collapsible === "none") {
|
|
4086
|
+
return /* @__PURE__ */ jsx(
|
|
4087
|
+
"div",
|
|
4088
|
+
{
|
|
4089
|
+
"data-slot": "sidebar",
|
|
4090
|
+
className: cn(
|
|
4091
|
+
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
4092
|
+
className
|
|
4093
|
+
),
|
|
4094
|
+
...props,
|
|
4095
|
+
children
|
|
4096
|
+
}
|
|
4097
|
+
);
|
|
4098
|
+
}
|
|
4099
|
+
if (isMobile) {
|
|
4100
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
4101
|
+
SheetContent,
|
|
4102
|
+
{
|
|
4103
|
+
"data-sidebar": "sidebar",
|
|
4104
|
+
"data-slot": "sidebar",
|
|
4105
|
+
"data-mobile": "true",
|
|
4106
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
4107
|
+
style: {
|
|
4108
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
4109
|
+
},
|
|
4110
|
+
side,
|
|
4111
|
+
children: [
|
|
4112
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
4113
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
4114
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
4115
|
+
] }),
|
|
4116
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
4117
|
+
]
|
|
4118
|
+
}
|
|
4119
|
+
) });
|
|
4120
|
+
}
|
|
4121
|
+
return /* @__PURE__ */ jsxs(
|
|
4122
|
+
"div",
|
|
4123
|
+
{
|
|
4124
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
4125
|
+
"data-state": state,
|
|
4126
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
4127
|
+
"data-variant": variant,
|
|
4128
|
+
"data-side": side,
|
|
4129
|
+
"data-slot": "sidebar",
|
|
4130
|
+
children: [
|
|
4131
|
+
/* @__PURE__ */ jsx(
|
|
4132
|
+
"div",
|
|
4133
|
+
{
|
|
4134
|
+
"data-slot": "sidebar-gap",
|
|
4135
|
+
className: cn(
|
|
4136
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
4137
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
4138
|
+
"group-data-[side=right]:rotate-180",
|
|
4139
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
4140
|
+
)
|
|
4141
|
+
}
|
|
4142
|
+
),
|
|
4143
|
+
/* @__PURE__ */ jsx(
|
|
4144
|
+
"div",
|
|
4145
|
+
{
|
|
4146
|
+
"data-slot": "sidebar-container",
|
|
4147
|
+
className: cn(
|
|
4148
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
4149
|
+
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)]",
|
|
4150
|
+
// Adjust the padding for floating and inset variants.
|
|
4151
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
4152
|
+
className
|
|
4153
|
+
),
|
|
4154
|
+
...props,
|
|
4155
|
+
children: /* @__PURE__ */ jsx(
|
|
4156
|
+
"div",
|
|
4157
|
+
{
|
|
4158
|
+
"data-sidebar": "sidebar",
|
|
4159
|
+
"data-slot": "sidebar-inner",
|
|
4160
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
4161
|
+
children
|
|
4162
|
+
}
|
|
4163
|
+
)
|
|
4164
|
+
}
|
|
4165
|
+
)
|
|
4166
|
+
]
|
|
4167
|
+
}
|
|
4168
|
+
);
|
|
4169
|
+
}
|
|
4170
|
+
function SidebarTrigger({
|
|
4171
|
+
className,
|
|
4172
|
+
onClick,
|
|
4173
|
+
...props
|
|
4174
|
+
}) {
|
|
4175
|
+
const { toggleSidebar } = useSidebar();
|
|
4176
|
+
return /* @__PURE__ */ jsxs(
|
|
4177
|
+
Button,
|
|
4178
|
+
{
|
|
4179
|
+
"data-sidebar": "trigger",
|
|
4180
|
+
"data-slot": "sidebar-trigger",
|
|
4181
|
+
variant: "ghost",
|
|
4182
|
+
size: "icon",
|
|
4183
|
+
className: cn("size-7", className),
|
|
4184
|
+
onClick: (event) => {
|
|
4185
|
+
onClick?.(event);
|
|
4186
|
+
toggleSidebar();
|
|
4187
|
+
},
|
|
4188
|
+
...props,
|
|
4189
|
+
children: [
|
|
4190
|
+
/* @__PURE__ */ jsx(PanelLeftIcon, {}),
|
|
4191
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
4192
|
+
]
|
|
4193
|
+
}
|
|
4194
|
+
);
|
|
4195
|
+
}
|
|
4196
|
+
function SidebarRail({ className, ...props }) {
|
|
4197
|
+
const { toggleSidebar } = useSidebar();
|
|
4198
|
+
return /* @__PURE__ */ jsx(
|
|
4199
|
+
"button",
|
|
4200
|
+
{
|
|
4201
|
+
"data-sidebar": "rail",
|
|
4202
|
+
"data-slot": "sidebar-rail",
|
|
4203
|
+
"aria-label": "Toggle Sidebar",
|
|
4204
|
+
tabIndex: -1,
|
|
4205
|
+
onClick: toggleSidebar,
|
|
4206
|
+
title: "Toggle Sidebar",
|
|
4207
|
+
className: cn(
|
|
4208
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
4209
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
4210
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
4211
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
4212
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
4213
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
4214
|
+
className
|
|
4215
|
+
),
|
|
4216
|
+
...props
|
|
4217
|
+
}
|
|
4218
|
+
);
|
|
4219
|
+
}
|
|
4220
|
+
function SidebarInset({ className, ...props }) {
|
|
4221
|
+
return /* @__PURE__ */ jsx(
|
|
4222
|
+
"main",
|
|
4223
|
+
{
|
|
4224
|
+
"data-slot": "sidebar-inset",
|
|
4225
|
+
className: cn(
|
|
4226
|
+
"bg-background relative flex w-full flex-1 flex-col",
|
|
4227
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
4228
|
+
className
|
|
4229
|
+
),
|
|
4230
|
+
...props
|
|
4231
|
+
}
|
|
4232
|
+
);
|
|
4233
|
+
}
|
|
4234
|
+
function SidebarInput({
|
|
4235
|
+
className,
|
|
4236
|
+
...props
|
|
4237
|
+
}) {
|
|
4238
|
+
return /* @__PURE__ */ jsx(
|
|
4239
|
+
Input,
|
|
4240
|
+
{
|
|
4241
|
+
"data-slot": "sidebar-input",
|
|
4242
|
+
"data-sidebar": "input",
|
|
4243
|
+
className: cn("bg-background h-8 w-full shadow-none", className),
|
|
4244
|
+
...props
|
|
4245
|
+
}
|
|
4246
|
+
);
|
|
4247
|
+
}
|
|
4248
|
+
function SidebarHeader({ className, ...props }) {
|
|
4249
|
+
return /* @__PURE__ */ jsx(
|
|
4250
|
+
"div",
|
|
4251
|
+
{
|
|
4252
|
+
"data-slot": "sidebar-header",
|
|
4253
|
+
"data-sidebar": "header",
|
|
4254
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
4255
|
+
...props
|
|
4256
|
+
}
|
|
4257
|
+
);
|
|
4258
|
+
}
|
|
4259
|
+
function SidebarFooter({ className, ...props }) {
|
|
4260
|
+
return /* @__PURE__ */ jsx(
|
|
4261
|
+
"div",
|
|
4262
|
+
{
|
|
4263
|
+
"data-slot": "sidebar-footer",
|
|
4264
|
+
"data-sidebar": "footer",
|
|
4265
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
4266
|
+
...props
|
|
4267
|
+
}
|
|
4268
|
+
);
|
|
4269
|
+
}
|
|
4270
|
+
function SidebarSeparator({
|
|
4271
|
+
className,
|
|
4272
|
+
...props
|
|
4273
|
+
}) {
|
|
4274
|
+
return /* @__PURE__ */ jsx(
|
|
4275
|
+
Separator,
|
|
4276
|
+
{
|
|
4277
|
+
"data-slot": "sidebar-separator",
|
|
4278
|
+
"data-sidebar": "separator",
|
|
4279
|
+
className: cn("bg-sidebar-border mx-2 w-auto", className),
|
|
4280
|
+
...props
|
|
4281
|
+
}
|
|
4282
|
+
);
|
|
4283
|
+
}
|
|
4284
|
+
function SidebarContent({ className, ...props }) {
|
|
4285
|
+
return /* @__PURE__ */ jsx(
|
|
4286
|
+
"div",
|
|
4287
|
+
{
|
|
4288
|
+
"data-slot": "sidebar-content",
|
|
4289
|
+
"data-sidebar": "content",
|
|
4290
|
+
className: cn(
|
|
4291
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
4292
|
+
className
|
|
4293
|
+
),
|
|
4294
|
+
...props
|
|
4295
|
+
}
|
|
4296
|
+
);
|
|
4297
|
+
}
|
|
4298
|
+
function SidebarGroup({ className, ...props }) {
|
|
4299
|
+
return /* @__PURE__ */ jsx(
|
|
4300
|
+
"div",
|
|
4301
|
+
{
|
|
4302
|
+
"data-slot": "sidebar-group",
|
|
4303
|
+
"data-sidebar": "group",
|
|
4304
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
4305
|
+
...props
|
|
4306
|
+
}
|
|
4307
|
+
);
|
|
4308
|
+
}
|
|
4309
|
+
function SidebarGroupLabel({
|
|
4310
|
+
className,
|
|
4311
|
+
asChild = false,
|
|
4312
|
+
...props
|
|
4313
|
+
}) {
|
|
4314
|
+
const Comp = asChild ? Slot : "div";
|
|
4315
|
+
return /* @__PURE__ */ jsx(
|
|
4316
|
+
Comp,
|
|
4317
|
+
{
|
|
4318
|
+
"data-slot": "sidebar-group-label",
|
|
4319
|
+
"data-sidebar": "group-label",
|
|
4320
|
+
className: cn(
|
|
4321
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
4322
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
4323
|
+
className
|
|
4324
|
+
),
|
|
4325
|
+
...props
|
|
4326
|
+
}
|
|
4327
|
+
);
|
|
4328
|
+
}
|
|
4329
|
+
function SidebarGroupAction({
|
|
4330
|
+
className,
|
|
4331
|
+
asChild = false,
|
|
4332
|
+
...props
|
|
4333
|
+
}) {
|
|
4334
|
+
const Comp = asChild ? Slot : "button";
|
|
4335
|
+
return /* @__PURE__ */ jsx(
|
|
4336
|
+
Comp,
|
|
4337
|
+
{
|
|
4338
|
+
"data-slot": "sidebar-group-action",
|
|
4339
|
+
"data-sidebar": "group-action",
|
|
4340
|
+
className: cn(
|
|
4341
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
4342
|
+
// Increases the hit area of the button on mobile.
|
|
4343
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
4344
|
+
"group-data-[collapsible=icon]:hidden",
|
|
4345
|
+
className
|
|
4346
|
+
),
|
|
4347
|
+
...props
|
|
4348
|
+
}
|
|
4349
|
+
);
|
|
4350
|
+
}
|
|
4351
|
+
function SidebarGroupContent({
|
|
4352
|
+
className,
|
|
4353
|
+
...props
|
|
4354
|
+
}) {
|
|
4355
|
+
return /* @__PURE__ */ jsx(
|
|
4356
|
+
"div",
|
|
4357
|
+
{
|
|
4358
|
+
"data-slot": "sidebar-group-content",
|
|
4359
|
+
"data-sidebar": "group-content",
|
|
4360
|
+
className: cn("w-full text-sm", className),
|
|
4361
|
+
...props
|
|
4362
|
+
}
|
|
4363
|
+
);
|
|
4364
|
+
}
|
|
4365
|
+
function SidebarMenu({ className, ...props }) {
|
|
4366
|
+
return /* @__PURE__ */ jsx(
|
|
4367
|
+
"ul",
|
|
4368
|
+
{
|
|
4369
|
+
"data-slot": "sidebar-menu",
|
|
4370
|
+
"data-sidebar": "menu",
|
|
4371
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
4372
|
+
...props
|
|
4373
|
+
}
|
|
4374
|
+
);
|
|
4375
|
+
}
|
|
4376
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
4377
|
+
return /* @__PURE__ */ jsx(
|
|
4378
|
+
"li",
|
|
4379
|
+
{
|
|
4380
|
+
"data-slot": "sidebar-menu-item",
|
|
4381
|
+
"data-sidebar": "menu-item",
|
|
4382
|
+
className: cn("group/menu-item relative", className),
|
|
4383
|
+
...props
|
|
4384
|
+
}
|
|
4385
|
+
);
|
|
4386
|
+
}
|
|
4387
|
+
var sidebarMenuButtonVariants = cva(
|
|
4388
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
4389
|
+
{
|
|
4390
|
+
variants: {
|
|
4391
|
+
variant: {
|
|
4392
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
4393
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
4394
|
+
},
|
|
4395
|
+
size: {
|
|
4396
|
+
default: "h-8 text-sm",
|
|
4397
|
+
sm: "h-7 text-xs",
|
|
4398
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
4399
|
+
}
|
|
4400
|
+
},
|
|
4401
|
+
defaultVariants: {
|
|
4402
|
+
variant: "default",
|
|
4403
|
+
size: "default"
|
|
4404
|
+
}
|
|
4405
|
+
}
|
|
4406
|
+
);
|
|
4407
|
+
function SidebarMenuButton({
|
|
4408
|
+
asChild = false,
|
|
4409
|
+
isActive = false,
|
|
4410
|
+
variant = "default",
|
|
4411
|
+
size = "default",
|
|
4412
|
+
tooltip,
|
|
4413
|
+
className,
|
|
4414
|
+
...props
|
|
4415
|
+
}) {
|
|
4416
|
+
const Comp = asChild ? Slot : "button";
|
|
4417
|
+
const { isMobile, state } = useSidebar();
|
|
4418
|
+
const button = /* @__PURE__ */ jsx(
|
|
4419
|
+
Comp,
|
|
4420
|
+
{
|
|
4421
|
+
"data-slot": "sidebar-menu-button",
|
|
4422
|
+
"data-sidebar": "menu-button",
|
|
4423
|
+
"data-size": size,
|
|
4424
|
+
"data-active": isActive,
|
|
4425
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
4426
|
+
...props
|
|
4427
|
+
}
|
|
4428
|
+
);
|
|
4429
|
+
if (!tooltip) {
|
|
4430
|
+
return button;
|
|
4431
|
+
}
|
|
4432
|
+
if (typeof tooltip === "string") {
|
|
4433
|
+
tooltip = {
|
|
4434
|
+
children: tooltip
|
|
4435
|
+
};
|
|
4436
|
+
}
|
|
4437
|
+
return /* @__PURE__ */ jsxs(Tooltip2, { children: [
|
|
4438
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
4439
|
+
/* @__PURE__ */ jsx(
|
|
4440
|
+
TooltipContent,
|
|
4441
|
+
{
|
|
4442
|
+
side: "right",
|
|
4443
|
+
align: "center",
|
|
4444
|
+
hidden: state !== "collapsed" || isMobile,
|
|
4445
|
+
...tooltip
|
|
4446
|
+
}
|
|
4447
|
+
)
|
|
4448
|
+
] });
|
|
4449
|
+
}
|
|
4450
|
+
function SidebarMenuAction({
|
|
4451
|
+
className,
|
|
4452
|
+
asChild = false,
|
|
4453
|
+
showOnHover = false,
|
|
4454
|
+
...props
|
|
4455
|
+
}) {
|
|
4456
|
+
const Comp = asChild ? Slot : "button";
|
|
4457
|
+
return /* @__PURE__ */ jsx(
|
|
4458
|
+
Comp,
|
|
4459
|
+
{
|
|
4460
|
+
"data-slot": "sidebar-menu-action",
|
|
4461
|
+
"data-sidebar": "menu-action",
|
|
4462
|
+
className: cn(
|
|
4463
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
4464
|
+
// Increases the hit area of the button on mobile.
|
|
4465
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
4466
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
4467
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
4468
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
4469
|
+
"group-data-[collapsible=icon]:hidden",
|
|
4470
|
+
showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
4471
|
+
className
|
|
4472
|
+
),
|
|
4473
|
+
...props
|
|
4474
|
+
}
|
|
4475
|
+
);
|
|
4476
|
+
}
|
|
4477
|
+
function SidebarMenuBadge({
|
|
4478
|
+
className,
|
|
4479
|
+
...props
|
|
4480
|
+
}) {
|
|
4481
|
+
return /* @__PURE__ */ jsx(
|
|
4482
|
+
"div",
|
|
4483
|
+
{
|
|
4484
|
+
"data-slot": "sidebar-menu-badge",
|
|
4485
|
+
"data-sidebar": "menu-badge",
|
|
4486
|
+
className: cn(
|
|
4487
|
+
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
4488
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
4489
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
4490
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
4491
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
4492
|
+
"group-data-[collapsible=icon]:hidden",
|
|
4493
|
+
className
|
|
4494
|
+
),
|
|
4495
|
+
...props
|
|
4496
|
+
}
|
|
4497
|
+
);
|
|
4498
|
+
}
|
|
4499
|
+
function SidebarMenuSkeleton({
|
|
4500
|
+
className,
|
|
4501
|
+
showIcon = false,
|
|
4502
|
+
...props
|
|
4503
|
+
}) {
|
|
4504
|
+
const width = React2.useMemo(() => {
|
|
4505
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4506
|
+
}, []);
|
|
4507
|
+
return /* @__PURE__ */ jsxs(
|
|
4508
|
+
"div",
|
|
4509
|
+
{
|
|
4510
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
4511
|
+
"data-sidebar": "menu-skeleton",
|
|
4512
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
4513
|
+
...props,
|
|
4514
|
+
children: [
|
|
4515
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
4516
|
+
Skeleton,
|
|
4517
|
+
{
|
|
4518
|
+
className: "size-4 rounded-md",
|
|
4519
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
4520
|
+
}
|
|
4521
|
+
),
|
|
4522
|
+
/* @__PURE__ */ jsx(
|
|
4523
|
+
Skeleton,
|
|
4524
|
+
{
|
|
4525
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
4526
|
+
"data-sidebar": "menu-skeleton-text",
|
|
4527
|
+
style: {
|
|
4528
|
+
"--skeleton-width": width
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
)
|
|
4532
|
+
]
|
|
4533
|
+
}
|
|
4534
|
+
);
|
|
4535
|
+
}
|
|
4536
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
4537
|
+
return /* @__PURE__ */ jsx(
|
|
4538
|
+
"ul",
|
|
4539
|
+
{
|
|
4540
|
+
"data-slot": "sidebar-menu-sub",
|
|
4541
|
+
"data-sidebar": "menu-sub",
|
|
4542
|
+
className: cn(
|
|
4543
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
4544
|
+
"group-data-[collapsible=icon]:hidden",
|
|
4545
|
+
className
|
|
4546
|
+
),
|
|
4547
|
+
...props
|
|
4548
|
+
}
|
|
4549
|
+
);
|
|
4550
|
+
}
|
|
4551
|
+
function SidebarMenuSubItem({
|
|
4552
|
+
className,
|
|
4553
|
+
...props
|
|
4554
|
+
}) {
|
|
4555
|
+
return /* @__PURE__ */ jsx(
|
|
4556
|
+
"li",
|
|
4557
|
+
{
|
|
4558
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
4559
|
+
"data-sidebar": "menu-sub-item",
|
|
4560
|
+
className: cn("group/menu-sub-item relative", className),
|
|
4561
|
+
...props
|
|
4562
|
+
}
|
|
4563
|
+
);
|
|
4564
|
+
}
|
|
4565
|
+
function SidebarMenuSubButton({
|
|
4566
|
+
asChild = false,
|
|
4567
|
+
size = "md",
|
|
4568
|
+
isActive = false,
|
|
4569
|
+
className,
|
|
4570
|
+
...props
|
|
4571
|
+
}) {
|
|
4572
|
+
const Comp = asChild ? Slot : "a";
|
|
4573
|
+
return /* @__PURE__ */ jsx(
|
|
4574
|
+
Comp,
|
|
4575
|
+
{
|
|
4576
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
4577
|
+
"data-sidebar": "menu-sub-button",
|
|
4578
|
+
"data-size": size,
|
|
4579
|
+
"data-active": isActive,
|
|
4580
|
+
className: cn(
|
|
4581
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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",
|
|
4582
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
4583
|
+
size === "sm" && "text-xs",
|
|
4584
|
+
size === "md" && "text-sm",
|
|
4585
|
+
"group-data-[collapsible=icon]:hidden",
|
|
4586
|
+
className
|
|
4587
|
+
),
|
|
4588
|
+
...props
|
|
4589
|
+
}
|
|
4590
|
+
);
|
|
4591
|
+
}
|
|
4592
|
+
function Slider({
|
|
4593
|
+
className,
|
|
4594
|
+
defaultValue,
|
|
4595
|
+
value,
|
|
4596
|
+
min = 0,
|
|
4597
|
+
max = 100,
|
|
4598
|
+
...props
|
|
4599
|
+
}) {
|
|
4600
|
+
const _values = React2.useMemo(
|
|
4601
|
+
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
4602
|
+
[value, defaultValue, min, max]
|
|
4603
|
+
);
|
|
4604
|
+
return /* @__PURE__ */ jsxs(
|
|
4605
|
+
SliderPrimitive.Root,
|
|
4606
|
+
{
|
|
4607
|
+
"data-slot": "slider",
|
|
4608
|
+
defaultValue,
|
|
4609
|
+
value,
|
|
4610
|
+
min,
|
|
4611
|
+
max,
|
|
4612
|
+
className: cn(
|
|
4613
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
4614
|
+
className
|
|
4615
|
+
),
|
|
4616
|
+
...props,
|
|
4617
|
+
children: [
|
|
4618
|
+
/* @__PURE__ */ jsx(
|
|
4619
|
+
SliderPrimitive.Track,
|
|
4620
|
+
{
|
|
4621
|
+
"data-slot": "slider-track",
|
|
4622
|
+
className: cn(
|
|
4623
|
+
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
4624
|
+
),
|
|
4625
|
+
children: /* @__PURE__ */ jsx(
|
|
4626
|
+
SliderPrimitive.Range,
|
|
4627
|
+
{
|
|
4628
|
+
"data-slot": "slider-range",
|
|
4629
|
+
className: cn(
|
|
4630
|
+
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
4631
|
+
)
|
|
4632
|
+
}
|
|
4633
|
+
)
|
|
4634
|
+
}
|
|
4635
|
+
),
|
|
4636
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(
|
|
4637
|
+
SliderPrimitive.Thumb,
|
|
4638
|
+
{
|
|
4639
|
+
"data-slot": "slider-thumb",
|
|
4640
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
4641
|
+
},
|
|
4642
|
+
index
|
|
4643
|
+
))
|
|
4644
|
+
]
|
|
4645
|
+
}
|
|
4646
|
+
);
|
|
4647
|
+
}
|
|
4648
|
+
var Toaster = ({ ...props }) => {
|
|
4649
|
+
const { theme = "system" } = useTheme();
|
|
4650
|
+
return /* @__PURE__ */ jsx(
|
|
4651
|
+
Toaster$1,
|
|
4652
|
+
{
|
|
4653
|
+
theme,
|
|
4654
|
+
className: "toaster group",
|
|
4655
|
+
icons: {
|
|
4656
|
+
success: /* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4" }),
|
|
4657
|
+
info: /* @__PURE__ */ jsx(InfoIcon, { className: "size-4" }),
|
|
4658
|
+
warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" }),
|
|
4659
|
+
error: /* @__PURE__ */ jsx(OctagonXIcon, { className: "size-4" }),
|
|
4660
|
+
loading: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" })
|
|
4661
|
+
},
|
|
4662
|
+
style: {
|
|
4663
|
+
"--normal-bg": "var(--popover)",
|
|
4664
|
+
"--normal-text": "var(--popover-foreground)",
|
|
4665
|
+
"--normal-border": "var(--border)",
|
|
4666
|
+
"--border-radius": "var(--radius)"
|
|
4667
|
+
},
|
|
4668
|
+
...props
|
|
4669
|
+
}
|
|
4670
|
+
);
|
|
4671
|
+
};
|
|
4672
|
+
function Spinner({ className, ...props }) {
|
|
4673
|
+
return /* @__PURE__ */ jsx(
|
|
4674
|
+
Loader2Icon,
|
|
4675
|
+
{
|
|
4676
|
+
role: "status",
|
|
4677
|
+
"aria-label": "Loading",
|
|
4678
|
+
className: cn("size-4 animate-spin", className),
|
|
4679
|
+
...props
|
|
4680
|
+
}
|
|
4681
|
+
);
|
|
4682
|
+
}
|
|
4683
|
+
function Switch({
|
|
4684
|
+
className,
|
|
4685
|
+
...props
|
|
4686
|
+
}) {
|
|
4687
|
+
return /* @__PURE__ */ jsx(
|
|
4688
|
+
SwitchPrimitive.Root,
|
|
4689
|
+
{
|
|
4690
|
+
"data-slot": "switch",
|
|
4691
|
+
className: cn(
|
|
4692
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
4693
|
+
className
|
|
4694
|
+
),
|
|
4695
|
+
...props,
|
|
4696
|
+
children: /* @__PURE__ */ jsx(
|
|
4697
|
+
SwitchPrimitive.Thumb,
|
|
4698
|
+
{
|
|
4699
|
+
"data-slot": "switch-thumb",
|
|
4700
|
+
className: cn(
|
|
4701
|
+
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
4702
|
+
)
|
|
4703
|
+
}
|
|
4704
|
+
)
|
|
4705
|
+
}
|
|
4706
|
+
);
|
|
4707
|
+
}
|
|
4708
|
+
function Table({ className, ...props }) {
|
|
4709
|
+
return /* @__PURE__ */ jsx(
|
|
4710
|
+
"div",
|
|
4711
|
+
{
|
|
4712
|
+
"data-slot": "table-container",
|
|
4713
|
+
className: "relative w-full overflow-x-auto",
|
|
4714
|
+
children: /* @__PURE__ */ jsx(
|
|
4715
|
+
"table",
|
|
4716
|
+
{
|
|
4717
|
+
"data-slot": "table",
|
|
4718
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
4719
|
+
...props
|
|
4720
|
+
}
|
|
4721
|
+
)
|
|
4722
|
+
}
|
|
4723
|
+
);
|
|
4724
|
+
}
|
|
4725
|
+
function TableHeader({ className, ...props }) {
|
|
4726
|
+
return /* @__PURE__ */ jsx(
|
|
4727
|
+
"thead",
|
|
4728
|
+
{
|
|
4729
|
+
"data-slot": "table-header",
|
|
4730
|
+
className: cn("[&_tr]:border-b", className),
|
|
4731
|
+
...props
|
|
4732
|
+
}
|
|
4733
|
+
);
|
|
4734
|
+
}
|
|
4735
|
+
function TableBody({ className, ...props }) {
|
|
4736
|
+
return /* @__PURE__ */ jsx(
|
|
4737
|
+
"tbody",
|
|
4738
|
+
{
|
|
4739
|
+
"data-slot": "table-body",
|
|
4740
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
4741
|
+
...props
|
|
4742
|
+
}
|
|
4743
|
+
);
|
|
4744
|
+
}
|
|
4745
|
+
function TableFooter({ className, ...props }) {
|
|
4746
|
+
return /* @__PURE__ */ jsx(
|
|
4747
|
+
"tfoot",
|
|
4748
|
+
{
|
|
4749
|
+
"data-slot": "table-footer",
|
|
4750
|
+
className: cn(
|
|
4751
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
4752
|
+
className
|
|
4753
|
+
),
|
|
4754
|
+
...props
|
|
4755
|
+
}
|
|
4756
|
+
);
|
|
4757
|
+
}
|
|
4758
|
+
function TableRow({ className, ...props }) {
|
|
4759
|
+
return /* @__PURE__ */ jsx(
|
|
4760
|
+
"tr",
|
|
4761
|
+
{
|
|
4762
|
+
"data-slot": "table-row",
|
|
4763
|
+
className: cn(
|
|
4764
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
4765
|
+
className
|
|
4766
|
+
),
|
|
4767
|
+
...props
|
|
4768
|
+
}
|
|
4769
|
+
);
|
|
4770
|
+
}
|
|
4771
|
+
function TableHead({ className, ...props }) {
|
|
4772
|
+
return /* @__PURE__ */ jsx(
|
|
4773
|
+
"th",
|
|
4774
|
+
{
|
|
4775
|
+
"data-slot": "table-head",
|
|
4776
|
+
className: cn(
|
|
4777
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
4778
|
+
className
|
|
4779
|
+
),
|
|
4780
|
+
...props
|
|
4781
|
+
}
|
|
4782
|
+
);
|
|
4783
|
+
}
|
|
4784
|
+
function TableCell({ className, ...props }) {
|
|
4785
|
+
return /* @__PURE__ */ jsx(
|
|
4786
|
+
"td",
|
|
4787
|
+
{
|
|
4788
|
+
"data-slot": "table-cell",
|
|
4789
|
+
className: cn(
|
|
4790
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
4791
|
+
className
|
|
4792
|
+
),
|
|
4793
|
+
...props
|
|
4794
|
+
}
|
|
4795
|
+
);
|
|
4796
|
+
}
|
|
4797
|
+
function TableCaption({
|
|
4798
|
+
className,
|
|
4799
|
+
...props
|
|
4800
|
+
}) {
|
|
4801
|
+
return /* @__PURE__ */ jsx(
|
|
4802
|
+
"caption",
|
|
4803
|
+
{
|
|
4804
|
+
"data-slot": "table-caption",
|
|
4805
|
+
className: cn("text-muted-foreground mt-4 text-sm", className),
|
|
4806
|
+
...props
|
|
4807
|
+
}
|
|
4808
|
+
);
|
|
4809
|
+
}
|
|
4810
|
+
function Tabs({
|
|
4811
|
+
className,
|
|
4812
|
+
...props
|
|
4813
|
+
}) {
|
|
4814
|
+
return /* @__PURE__ */ jsx(
|
|
4815
|
+
TabsPrimitive.Root,
|
|
4816
|
+
{
|
|
4817
|
+
"data-slot": "tabs",
|
|
4818
|
+
className: cn("flex flex-col gap-2", className),
|
|
4819
|
+
...props
|
|
4820
|
+
}
|
|
4821
|
+
);
|
|
4822
|
+
}
|
|
4823
|
+
function TabsList({
|
|
4824
|
+
className,
|
|
4825
|
+
...props
|
|
4826
|
+
}) {
|
|
4827
|
+
return /* @__PURE__ */ jsx(
|
|
4828
|
+
TabsPrimitive.List,
|
|
4829
|
+
{
|
|
4830
|
+
"data-slot": "tabs-list",
|
|
4831
|
+
className: cn(
|
|
4832
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
4833
|
+
className
|
|
4834
|
+
),
|
|
4835
|
+
...props
|
|
4836
|
+
}
|
|
4837
|
+
);
|
|
4838
|
+
}
|
|
4839
|
+
function TabsTrigger({
|
|
4840
|
+
className,
|
|
4841
|
+
...props
|
|
4842
|
+
}) {
|
|
4843
|
+
return /* @__PURE__ */ jsx(
|
|
4844
|
+
TabsPrimitive.Trigger,
|
|
4845
|
+
{
|
|
4846
|
+
"data-slot": "tabs-trigger",
|
|
4847
|
+
className: cn(
|
|
4848
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4849
|
+
className
|
|
4850
|
+
),
|
|
4851
|
+
...props
|
|
4852
|
+
}
|
|
4853
|
+
);
|
|
4854
|
+
}
|
|
4855
|
+
function TabsContent({
|
|
4856
|
+
className,
|
|
4857
|
+
...props
|
|
4858
|
+
}) {
|
|
4859
|
+
return /* @__PURE__ */ jsx(
|
|
4860
|
+
TabsPrimitive.Content,
|
|
4861
|
+
{
|
|
4862
|
+
"data-slot": "tabs-content",
|
|
4863
|
+
className: cn("flex-1 outline-none", className),
|
|
4864
|
+
...props
|
|
4865
|
+
}
|
|
4866
|
+
);
|
|
4867
|
+
}
|
|
4868
|
+
var toggleVariants = cva(
|
|
4869
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
4870
|
+
{
|
|
4871
|
+
variants: {
|
|
4872
|
+
variant: {
|
|
4873
|
+
default: "bg-transparent",
|
|
4874
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
4875
|
+
},
|
|
4876
|
+
size: {
|
|
4877
|
+
default: "h-9 px-2 min-w-9",
|
|
4878
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
4879
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
4880
|
+
}
|
|
4881
|
+
},
|
|
4882
|
+
defaultVariants: {
|
|
4883
|
+
variant: "default",
|
|
4884
|
+
size: "default"
|
|
4885
|
+
}
|
|
4886
|
+
}
|
|
4887
|
+
);
|
|
4888
|
+
function Toggle({
|
|
4889
|
+
className,
|
|
4890
|
+
variant,
|
|
4891
|
+
size,
|
|
4892
|
+
...props
|
|
4893
|
+
}) {
|
|
4894
|
+
return /* @__PURE__ */ jsx(
|
|
4895
|
+
TogglePrimitive.Root,
|
|
4896
|
+
{
|
|
4897
|
+
"data-slot": "toggle",
|
|
4898
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
4899
|
+
...props
|
|
4900
|
+
}
|
|
4901
|
+
);
|
|
4902
|
+
}
|
|
4903
|
+
var ToggleGroupContext = React2.createContext({
|
|
4904
|
+
size: "default",
|
|
4905
|
+
variant: "default",
|
|
4906
|
+
spacing: 0
|
|
4907
|
+
});
|
|
4908
|
+
function ToggleGroup({
|
|
4909
|
+
className,
|
|
4910
|
+
variant,
|
|
4911
|
+
size,
|
|
4912
|
+
spacing = 0,
|
|
4913
|
+
children,
|
|
4914
|
+
...props
|
|
4915
|
+
}) {
|
|
4916
|
+
return /* @__PURE__ */ jsx(
|
|
4917
|
+
ToggleGroupPrimitive.Root,
|
|
4918
|
+
{
|
|
4919
|
+
"data-slot": "toggle-group",
|
|
4920
|
+
"data-variant": variant,
|
|
4921
|
+
"data-size": size,
|
|
4922
|
+
"data-spacing": spacing,
|
|
4923
|
+
style: { "--gap": spacing },
|
|
4924
|
+
className: cn(
|
|
4925
|
+
"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",
|
|
4926
|
+
className
|
|
4927
|
+
),
|
|
4928
|
+
...props,
|
|
4929
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
|
|
4930
|
+
}
|
|
4931
|
+
);
|
|
4932
|
+
}
|
|
4933
|
+
function ToggleGroupItem({
|
|
4934
|
+
className,
|
|
4935
|
+
children,
|
|
4936
|
+
variant,
|
|
4937
|
+
size,
|
|
4938
|
+
...props
|
|
4939
|
+
}) {
|
|
4940
|
+
const context = React2.useContext(ToggleGroupContext);
|
|
4941
|
+
return /* @__PURE__ */ jsx(
|
|
4942
|
+
ToggleGroupPrimitive.Item,
|
|
4943
|
+
{
|
|
4944
|
+
"data-slot": "toggle-group-item",
|
|
4945
|
+
"data-variant": context.variant || variant,
|
|
4946
|
+
"data-size": context.size || size,
|
|
4947
|
+
"data-spacing": context.spacing,
|
|
4948
|
+
className: cn(
|
|
4949
|
+
toggleVariants({
|
|
4950
|
+
variant: context.variant || variant,
|
|
4951
|
+
size: context.size || size
|
|
4952
|
+
}),
|
|
4953
|
+
"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10",
|
|
4954
|
+
"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
|
|
4955
|
+
className
|
|
4956
|
+
),
|
|
4957
|
+
...props,
|
|
4958
|
+
children
|
|
4959
|
+
}
|
|
4960
|
+
);
|
|
4961
|
+
}
|
|
4962
|
+
|
|
4963
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item4 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, navigationMenuTriggerStyle, toggleVariants, useFormField, useSidebar };
|
|
4964
|
+
//# sourceMappingURL=index.js.map
|
|
4965
|
+
//# sourceMappingURL=index.js.map
|