@arch-cadre/ui 0.0.44 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.js +18 -0
- package/dist/components/alert-dialog.js +39 -0
- package/dist/components/alert.js +24 -0
- package/dist/components/aspect-ratio.js +7 -0
- package/dist/components/avatar.js +14 -0
- package/dist/components/badge.js +22 -0
- package/dist/components/breadcrumb.js +30 -0
- package/dist/components/button-group.js +28 -0
- package/dist/components/button.js +33 -0
- package/dist/components/calendar.js +76 -0
- package/dist/components/card.js +24 -0
- package/dist/components/checkbox.js +9 -0
- package/dist/components/collapsible.js +13 -0
- package/dist/components/command.js +34 -0
- package/dist/components/context-menu.js +51 -0
- package/dist/components/dialog.js +36 -0
- package/dist/components/drawer.js +35 -0
- package/dist/components/dropdown-menu.js +51 -0
- package/dist/components/empty.js +33 -0
- package/dist/components/field.js +78 -0
- package/dist/components/form.js +59 -0
- package/dist/components/hover-card.js +14 -0
- package/dist/components/input-group.js +63 -0
- package/dist/components/input-otp.js +21 -0
- package/dist/components/input.js +6 -0
- package/dist/components/item.js +66 -0
- package/dist/components/kbd.js +9 -0
- package/dist/components/label.js +8 -0
- package/dist/components/language-switcher.js +20 -0
- package/dist/components/menubar.js +54 -0
- package/dist/components/navigation-menu.js +31 -0
- package/dist/components/pagination.js +31 -0
- package/dist/components/popover.js +17 -0
- package/dist/components/progress.js +8 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/scroll-area.js +13 -0
- package/dist/components/select.js +38 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/sheet.js +40 -0
- package/dist/components/sidebar.js +213 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.js +21 -0
- package/dist/components/spinner.js +7 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/table.js +28 -0
- package/dist/components/tabs.js +17 -0
- package/dist/components/textarea.js +6 -0
- package/dist/components/toggle-group.js +22 -0
- package/dist/components/toggle.js +26 -0
- package/dist/components/tooltip.js +17 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-user.js +25 -0
- package/dist/lib/{utils.mjs → utils.js} +1 -1
- package/dist/logo.js +28 -0
- package/dist/postcss.config.mjs +1 -2
- package/dist/providers/auth-provider.js +27 -0
- package/dist/providers/index.js +23 -0
- package/dist/shared/access-denied.js +6 -0
- package/dist/shared/loader.js +41 -0
- package/dist/shared/page-loader.js +6 -0
- package/dist/shared/scroll-fade-effect.js +5 -0
- package/package.json +17 -20
- package/build.config.ts +0 -23
- package/components.json +0 -20
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.d.ts +0 -7
- package/dist/components/accordion.mjs +0 -58
- package/dist/components/alert-dialog.d.ts +0 -14
- package/dist/components/alert-dialog.mjs +0 -144
- package/dist/components/alert.d.ts +0 -9
- package/dist/components/alert.mjs +0 -62
- package/dist/components/aspect-ratio.d.ts +0 -4
- package/dist/components/aspect-ratio.mjs +0 -9
- package/dist/components/avatar.d.ts +0 -6
- package/dist/components/avatar.mjs +0 -50
- package/dist/components/badge.d.ts +0 -9
- package/dist/components/badge.mjs +0 -37
- package/dist/components/breadcrumb.d.ts +0 -11
- package/dist/components/breadcrumb.mjs +0 -105
- package/dist/components/button-group.d.ts +0 -13
- package/dist/components/button-group.mjs +0 -76
- package/dist/components/button.d.ts +0 -10
- package/dist/components/button.mjs +0 -51
- package/dist/components/calendar.d.ts +0 -8
- package/dist/components/calendar.mjs +0 -191
- package/dist/components/card.d.ts +0 -9
- package/dist/components/card.mjs +0 -90
- package/dist/components/checkbox.d.ts +0 -4
- package/dist/components/checkbox.mjs +0 -30
- package/dist/components/collapsible.d.ts +0 -6
- package/dist/components/collapsible.mjs +0 -31
- package/dist/components/command.d.ts +0 -18
- package/dist/components/command.mjs +0 -169
- package/dist/components/context-menu.d.ts +0 -25
- package/dist/components/context-menu.mjs +0 -218
- package/dist/components/dialog.d.ts +0 -15
- package/dist/components/dialog.mjs +0 -130
- package/dist/components/drawer.d.ts +0 -13
- package/dist/components/drawer.mjs +0 -124
- package/dist/components/dropdown-menu.d.ts +0 -25
- package/dist/components/dropdown-menu.mjs +0 -226
- package/dist/components/empty.d.ts +0 -12
- package/dist/components/empty.mjs +0 -102
- package/dist/components/field.d.ts +0 -25
- package/dist/components/field.mjs +0 -228
- package/dist/components/form.d.ts +0 -23
- package/dist/components/form.mjs +0 -123
- package/dist/components/hover-card.d.ts +0 -6
- package/dist/components/hover-card.mjs +0 -35
- package/dist/components/input-group.d.ts +0 -16
- package/dist/components/input-group.mjs +0 -155
- package/dist/components/input-otp.d.ts +0 -11
- package/dist/components/input-otp.mjs +0 -59
- package/dist/components/input.d.ts +0 -3
- package/dist/components/input.mjs +0 -19
- package/dist/components/item.d.ts +0 -23
- package/dist/components/item.mjs +0 -187
- package/dist/components/kbd.d.ts +0 -4
- package/dist/components/kbd.mjs +0 -28
- package/dist/components/label.d.ts +0 -4
- package/dist/components/label.mjs +0 -21
- package/dist/components/language-switcher.d.ts +0 -2
- package/dist/components/language-switcher.mjs +0 -30
- package/dist/components/menubar.d.ts +0 -26
- package/dist/components/menubar.mjs +0 -246
- package/dist/components/navigation-menu.d.ts +0 -14
- package/dist/components/navigation-menu.mjs +0 -166
- package/dist/components/pagination.d.ts +0 -15
- package/dist/components/pagination.mjs +0 -116
- package/dist/components/popover.d.ts +0 -7
- package/dist/components/popover.mjs +0 -40
- package/dist/components/progress.d.ts +0 -4
- package/dist/components/progress.mjs +0 -30
- package/dist/components/radio-group.d.ts +0 -5
- package/dist/components/radio-group.mjs +0 -43
- package/dist/components/scroll-area.d.ts +0 -7
- package/dist/components/scroll-area.mjs +0 -59
- package/dist/components/select.d.ts +0 -15
- package/dist/components/select.mjs +0 -173
- package/dist/components/separator.d.ts +0 -4
- package/dist/components/separator.mjs +0 -25
- package/dist/components/sheet.d.ts +0 -13
- package/dist/components/sheet.mjs +0 -119
- package/dist/components/sidebar.d.ts +0 -69
- package/dist/components/sidebar.mjs +0 -635
- package/dist/components/skeleton.d.ts +0 -3
- package/dist/components/skeleton.mjs +0 -13
- package/dist/components/slider.d.ts +0 -4
- package/dist/components/slider.mjs +0 -59
- package/dist/components/sonner.d.ts +0 -4
- package/dist/components/sonner.mjs +0 -36
- package/dist/components/spinner.d.ts +0 -3
- package/dist/components/spinner.mjs +0 -15
- package/dist/components/switch.d.ts +0 -4
- package/dist/components/switch.mjs +0 -30
- package/dist/components/table.d.ts +0 -10
- package/dist/components/table.mjs +0 -115
- package/dist/components/tabs.d.ts +0 -7
- package/dist/components/tabs.mjs +0 -63
- package/dist/components/textarea.d.ts +0 -3
- package/dist/components/textarea.mjs +0 -16
- package/dist/components/toggle-group.d.ts +0 -9
- package/dist/components/toggle-group.mjs +0 -65
- package/dist/components/toggle.d.ts +0 -9
- package/dist/components/toggle.mjs +0 -41
- package/dist/components/tooltip.d.ts +0 -7
- package/dist/components/tooltip.mjs +0 -49
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.mjs +0 -17
- package/dist/hooks/use-user.d.ts +0 -12
- package/dist/hooks/use-user.mjs +0 -12
- package/dist/index.mjs +0 -15
- package/dist/lib/utils.d.ts +0 -2
- package/dist/logo.d.ts +0 -15
- package/dist/logo.mjs +0 -32
- package/dist/postcss.config.d.mts +0 -3
- package/dist/providers/auth-provider.d.ts +0 -15
- package/dist/providers/auth-provider.mjs +0 -37
- package/dist/providers/index.d.ts +0 -7
- package/dist/providers/index.mjs +0 -33
- package/dist/shared/access-denied.d.ts +0 -2
- package/dist/shared/access-denied.mjs +0 -12
- package/dist/shared/loader.d.ts +0 -11
- package/dist/shared/loader.mjs +0 -98
- package/dist/shared/page-loader.d.ts +0 -7
- package/dist/shared/page-loader.mjs +0 -6
- package/dist/shared/scroll-fade-effect.d.ts +0 -4
- package/dist/shared/scroll-fade-effect.mjs +0 -20
- package/dist/styles/globals.css +0 -1
- package/postcss.config.mjs +0 -6
- package/scripts/switchToDist.js +0 -55
- package/scripts/switchToSrc.js +0 -52
- package/src/components/.gitkeep +0 -0
- package/src/components/accordion.tsx +0 -66
- package/src/components/alert-dialog.tsx +0 -157
- package/src/components/alert.tsx +0 -66
- package/src/components/aspect-ratio.tsx +0 -12
- package/src/components/avatar.tsx +0 -53
- package/src/components/badge.tsx +0 -46
- package/src/components/breadcrumb.tsx +0 -111
- package/src/components/button-group.tsx +0 -86
- package/src/components/button.tsx +0 -62
- package/src/components/calendar.tsx +0 -220
- package/src/components/card.tsx +0 -92
- package/src/components/checkbox.tsx +0 -32
- package/src/components/collapsible.tsx +0 -34
- package/src/components/command.tsx +0 -184
- package/src/components/context-menu.tsx +0 -252
- package/src/components/dialog.tsx +0 -143
- package/src/components/drawer.tsx +0 -135
- package/src/components/dropdown-menu.tsx +0 -257
- package/src/components/empty.tsx +0 -105
- package/src/components/field.tsx +0 -251
- package/src/components/form.tsx +0 -170
- package/src/components/hover-card.tsx +0 -44
- package/src/components/input-group.tsx +0 -170
- package/src/components/input-otp.tsx +0 -77
- package/src/components/input.tsx +0 -21
- package/src/components/item.tsx +0 -193
- package/src/components/kbd.tsx +0 -29
- package/src/components/label.tsx +0 -24
- package/src/components/language-switcher.tsx +0 -49
- package/src/components/menubar.tsx +0 -276
- package/src/components/navigation-menu.tsx +0 -168
- package/src/components/pagination.tsx +0 -130
- package/src/components/popover.tsx +0 -48
- package/src/components/progress.tsx +0 -31
- package/src/components/radio-group.tsx +0 -45
- package/src/components/scroll-area.tsx +0 -67
- package/src/components/select.tsx +0 -190
- package/src/components/separator.tsx +0 -28
- package/src/components/sheet.tsx +0 -139
- package/src/components/sidebar.tsx +0 -726
- package/src/components/skeleton.tsx +0 -14
- package/src/components/slider.tsx +0 -63
- package/src/components/sonner.tsx +0 -41
- package/src/components/spinner.tsx +0 -17
- package/src/components/switch.tsx +0 -31
- package/src/components/table.tsx +0 -116
- package/src/components/tabs.tsx +0 -66
- package/src/components/textarea.tsx +0 -18
- package/src/components/toggle-group.tsx +0 -83
- package/src/components/toggle.tsx +0 -47
- package/src/components/tooltip.tsx +0 -61
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/use-mobile.ts +0 -21
- package/src/hooks/use-user.ts +0 -27
- package/src/index.ts +0 -15
- package/src/lib/utils.ts +0 -6
- package/src/logo.tsx +0 -49
- package/src/postcss.config.mjs +0 -6
- package/src/providers/auth-provider.tsx +0 -66
- package/src/providers/index.tsx +0 -50
- package/src/shared/access-denied.tsx +0 -31
- package/src/shared/loader.tsx +0 -109
- package/src/shared/page-loader.tsx +0 -24
- package/src/shared/scroll-fade-effect.tsx +0 -23
- package/src/styles/globals.css +0 -314
- package/tsconfig.json +0 -24
- /package/dist/{index.d.ts → index.js} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function Accordion({ ...props }) {
|
|
7
|
+
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
8
|
+
}
|
|
9
|
+
function AccordionItem({ className, ...props }) {
|
|
10
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("border-b last:border-b-0", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
13
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("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", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })] }) }));
|
|
14
|
+
}
|
|
15
|
+
function AccordionContent({ className, children, ...props }) {
|
|
16
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm", ...props, children: _jsx("div", { className: cn("pt-0 pb-4", className), children: children }) }));
|
|
17
|
+
}
|
|
18
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
import { buttonVariants } from "./button";
|
|
6
|
+
function AlertDialog({ ...props }) {
|
|
7
|
+
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
8
|
+
}
|
|
9
|
+
function AlertDialogTrigger({ ...props }) {
|
|
10
|
+
return (_jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AlertDialogPortal({ ...props }) {
|
|
13
|
+
return (_jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props }));
|
|
14
|
+
}
|
|
15
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
16
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn("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", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertDialogContent({ className, ...props }) {
|
|
19
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", className: cn("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", className), ...props })] }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
28
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-lg font-semibold", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
31
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function AlertDialogAction({ className, ...props }) {
|
|
34
|
+
return (_jsx(AlertDialogPrimitive.Action, { className: cn(buttonVariants(), className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
37
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { className: cn(buttonVariants({ variant: "outline" }), className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const alertVariants = cva("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", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground",
|
|
8
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: "default",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Alert({ className, variant, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertTitle({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
|
|
4
|
+
function AspectRatio({ ...props }) {
|
|
5
|
+
return _jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
6
|
+
}
|
|
7
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
function Avatar({ className, ...props }) {
|
|
6
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function AvatarImage({ className, ...props }) {
|
|
9
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn("aspect-square size-full", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function AvatarFallback({ className, ...props }) {
|
|
12
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("bg-muted flex size-full items-center justify-center rounded-full", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
const badgeVariants = cva("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", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
9
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
10
|
+
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",
|
|
11
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
function Badge({ className, variant, asChild = false, ...props }) {
|
|
19
|
+
const Comp = asChild ? SlotPrimitive.Slot : "span";
|
|
20
|
+
return (_jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
3
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
function Breadcrumb({ ...props }) {
|
|
6
|
+
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
7
|
+
}
|
|
8
|
+
function BreadcrumbList({ className, ...props }) {
|
|
9
|
+
return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
12
|
+
return (_jsx("li", { "data-slot": "breadcrumb-item", className: cn("inline-flex items-center gap-1.5", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
15
|
+
const Comp = asChild ? SlotPrimitive.Slot : "a";
|
|
16
|
+
return (_jsx(Comp, { "data-slot": "breadcrumb-link", className: cn("hover:text-foreground transition-colors", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
19
|
+
return (
|
|
20
|
+
// biome-ignore lint/a11y/useSemanticElements: <explanation>
|
|
21
|
+
// biome-ignore lint/a11y/useFocusableInteractive: <explanation>
|
|
22
|
+
_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("text-foreground font-normal", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
25
|
+
return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
|
|
26
|
+
}
|
|
27
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
28
|
+
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn("flex size-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
|
|
29
|
+
}
|
|
30
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** biome-ignore-all lint/a11y/useSemanticElements: <explanation> */
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
import { Separator } from "./separator";
|
|
7
|
+
const buttonGroupVariants = cva("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", {
|
|
8
|
+
variants: {
|
|
9
|
+
orientation: {
|
|
10
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
11
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
orientation: "horizontal",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
function ButtonGroup({ className, orientation, ...props }) {
|
|
19
|
+
return (_jsx("div", { role: "group", "data-slot": "button-group", "data-orientation": orientation, className: cn(buttonGroupVariants({ orientation }), className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
22
|
+
const Comp = asChild ? SlotPrimitive.Slot : "div";
|
|
23
|
+
return (_jsx(Comp, { className: cn("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", className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
26
|
+
return (_jsx(Separator, { "data-slot": "button-group-separator", orientation: orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
const buttonVariants = cva("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", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
9
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
10
|
+
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",
|
|
11
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
12
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
13
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
17
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
18
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
19
|
+
icon: "size-9",
|
|
20
|
+
"icon-sm": "size-8",
|
|
21
|
+
"icon-lg": "size-10",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default",
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
30
|
+
const Comp = asChild ? SlotPrimitive.Slot : "button";
|
|
31
|
+
return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
32
|
+
}
|
|
33
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { DayPicker, getDefaultClassNames, } from "react-day-picker";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
import { Button, buttonVariants } from "./button";
|
|
8
|
+
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, ...props }) {
|
|
9
|
+
const defaultClassNames = getDefaultClassNames();
|
|
10
|
+
return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
|
|
11
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
12
|
+
...formatters,
|
|
13
|
+
}, classNames: {
|
|
14
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
15
|
+
months: cn("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months),
|
|
16
|
+
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
17
|
+
nav: cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", defaultClassNames.nav),
|
|
18
|
+
button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_previous),
|
|
19
|
+
button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_next),
|
|
20
|
+
month_caption: cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", defaultClassNames.month_caption),
|
|
21
|
+
dropdowns: cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", defaultClassNames.dropdowns),
|
|
22
|
+
dropdown_root: cn("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md", defaultClassNames.dropdown_root),
|
|
23
|
+
dropdown: cn("absolute bg-popover inset-0 opacity-0", defaultClassNames.dropdown),
|
|
24
|
+
caption_label: cn("select-none font-medium", captionLayout === "label"
|
|
25
|
+
? "text-sm"
|
|
26
|
+
: "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", defaultClassNames.caption_label),
|
|
27
|
+
table: "w-full border-collapse",
|
|
28
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
29
|
+
weekday: cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", defaultClassNames.weekday),
|
|
30
|
+
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
31
|
+
week_number_header: cn("select-none w-(--cell-size)", defaultClassNames.week_number_header),
|
|
32
|
+
week_number: cn("text-[0.8rem] select-none text-muted-foreground", defaultClassNames.week_number),
|
|
33
|
+
day: cn("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", props.showWeekNumber
|
|
34
|
+
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
35
|
+
: "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
|
|
36
|
+
range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
|
|
37
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
38
|
+
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
39
|
+
today: cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
40
|
+
outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
41
|
+
disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
42
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
43
|
+
...classNames,
|
|
44
|
+
}, components: {
|
|
45
|
+
Root: ({ className, rootRef, ...props }) => {
|
|
46
|
+
return (_jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props }));
|
|
47
|
+
},
|
|
48
|
+
Chevron: ({ className, orientation, ...props }) => {
|
|
49
|
+
if (orientation === "left") {
|
|
50
|
+
return (_jsx(ChevronLeftIcon, { className: cn("size-4", className), ...props }));
|
|
51
|
+
}
|
|
52
|
+
if (orientation === "right") {
|
|
53
|
+
return (_jsx(ChevronRightIcon, { className: cn("size-4", className), ...props }));
|
|
54
|
+
}
|
|
55
|
+
return (_jsx(ChevronDownIcon, { className: cn("size-4", className), ...props }));
|
|
56
|
+
},
|
|
57
|
+
DayButton: CalendarDayButton,
|
|
58
|
+
WeekNumber: ({ children, ...props }) => {
|
|
59
|
+
return (_jsx("td", { ...props, children: _jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: children }) }));
|
|
60
|
+
},
|
|
61
|
+
...components,
|
|
62
|
+
}, ...props }));
|
|
63
|
+
}
|
|
64
|
+
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
65
|
+
const defaultClassNames = getDefaultClassNames();
|
|
66
|
+
const ref = React.useRef(null);
|
|
67
|
+
React.useEffect(() => {
|
|
68
|
+
if (modifiers.focused)
|
|
69
|
+
ref.current?.focus();
|
|
70
|
+
}, [modifiers.focused]);
|
|
71
|
+
return (_jsx(Button, { ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
|
|
72
|
+
!modifiers.range_start &&
|
|
73
|
+
!modifiers.range_end &&
|
|
74
|
+
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("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", defaultClassNames.day, className), ...props }));
|
|
75
|
+
}
|
|
76
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
function Card({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "card", className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function CardHeader({ className, ...props }) {
|
|
7
|
+
return (_jsx("div", { "data-slot": "card-header", className: cn("@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", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function CardTitle({ className, ...props }) {
|
|
10
|
+
return (_jsx("div", { "data-slot": "card-title", className: cn("leading-none font-semibold", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function CardDescription({ className, ...props }) {
|
|
13
|
+
return (_jsx("div", { "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function CardAction({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function CardContent({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function CardFooter({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon } from "lucide-react";
|
|
4
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function Checkbox({ className, ...props }) {
|
|
7
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("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", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
|
|
8
|
+
}
|
|
9
|
+
export { Checkbox };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
4
|
+
function Collapsible({ ...props }) {
|
|
5
|
+
return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
6
|
+
}
|
|
7
|
+
function CollapsibleTrigger({ ...props }) {
|
|
8
|
+
return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props }));
|
|
9
|
+
}
|
|
10
|
+
function CollapsibleContent({ ...props }) {
|
|
11
|
+
return (_jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props }));
|
|
12
|
+
}
|
|
13
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
+
import { SearchIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog";
|
|
7
|
+
function Command({ className, ...props }) {
|
|
8
|
+
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
|
|
11
|
+
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), showCloseButton: showCloseButton, children: _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: children }) })] }));
|
|
12
|
+
}
|
|
13
|
+
function CommandInput({ className, ...props }) {
|
|
14
|
+
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("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", className), ...props })] }));
|
|
15
|
+
}
|
|
16
|
+
function CommandList({ className, ...props }) {
|
|
17
|
+
return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function CommandEmpty({ ...props }) {
|
|
20
|
+
return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
|
|
21
|
+
}
|
|
22
|
+
function CommandGroup({ className, ...props }) {
|
|
23
|
+
return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("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", className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function CommandSeparator({ className, ...props }) {
|
|
26
|
+
return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("bg-border -mx-1 h-px", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function CommandItem({ className, ...props }) {
|
|
29
|
+
return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("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", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function CommandShortcut({ className, ...props }) {
|
|
32
|
+
return (_jsx("span", { "data-slot": "command-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
+
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function ContextMenu({ ...props }) {
|
|
7
|
+
return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
function ContextMenuTrigger({ ...props }) {
|
|
10
|
+
return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props }));
|
|
11
|
+
}
|
|
12
|
+
function ContextMenuGroup({ ...props }) {
|
|
13
|
+
return (_jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props }));
|
|
14
|
+
}
|
|
15
|
+
function ContextMenuPortal({ ...props }) {
|
|
16
|
+
return (_jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props }));
|
|
17
|
+
}
|
|
18
|
+
function ContextMenuSub({ ...props }) {
|
|
19
|
+
return _jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
20
|
+
}
|
|
21
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
22
|
+
return (_jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props }));
|
|
23
|
+
}
|
|
24
|
+
function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
25
|
+
return (_jsxs(ContextMenuPrimitive.SubTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("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", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] }));
|
|
26
|
+
}
|
|
27
|
+
function ContextMenuSubContent({ className, ...props }) {
|
|
28
|
+
return (_jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn("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", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function ContextMenuContent({ className, ...props }) {
|
|
31
|
+
return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("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", className), ...props }) }));
|
|
32
|
+
}
|
|
33
|
+
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
34
|
+
return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("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", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
37
|
+
return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", className: cn("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", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
38
|
+
}
|
|
39
|
+
function ContextMenuRadioItem({ className, children, ...props }) {
|
|
40
|
+
return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", className: cn("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", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
41
|
+
}
|
|
42
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
43
|
+
return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
|
|
44
|
+
}
|
|
45
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
46
|
+
return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
|
|
47
|
+
}
|
|
48
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
49
|
+
return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { XIcon } from "lucide-react";
|
|
4
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function Dialog({ ...props }) {
|
|
7
|
+
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DialogTrigger({ ...props }) {
|
|
10
|
+
return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function DialogPortal({ ...props }) {
|
|
13
|
+
return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
14
|
+
}
|
|
15
|
+
function DialogClose({ ...props }) {
|
|
16
|
+
return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
17
|
+
}
|
|
18
|
+
function DialogOverlay({ className, ...props }) {
|
|
19
|
+
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("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", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
22
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("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 outline-none sm:max-w-lg", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", 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", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
23
|
+
}
|
|
24
|
+
function DialogHeader({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function DialogFooter({ className, ...props }) {
|
|
28
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DialogTitle({ className, ...props }) {
|
|
31
|
+
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function DialogDescription({ className, ...props }) {
|
|
34
|
+
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
function Drawer({ ...props }) {
|
|
6
|
+
return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
|
|
7
|
+
}
|
|
8
|
+
function DrawerTrigger({ ...props }) {
|
|
9
|
+
return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
function DrawerPortal({ ...props }) {
|
|
12
|
+
return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
13
|
+
}
|
|
14
|
+
function DrawerClose({ ...props }) {
|
|
15
|
+
return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
16
|
+
}
|
|
17
|
+
function DrawerOverlay({ className, ...props }) {
|
|
18
|
+
return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn("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", className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function DrawerContent({ className, children, ...props }) {
|
|
21
|
+
return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "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", "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", "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", "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", className), ...props, children: [_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" }), children] })] }));
|
|
22
|
+
}
|
|
23
|
+
function DrawerHeader({ className, ...props }) {
|
|
24
|
+
return (_jsx("div", { "data-slot": "drawer-header", className: cn("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", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function DrawerFooter({ className, ...props }) {
|
|
27
|
+
return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function DrawerTitle({ className, ...props }) {
|
|
30
|
+
return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-foreground font-semibold", className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function DrawerDescription({ className, ...props }) {
|
|
33
|
+
return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
34
|
+
}
|
|
35
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function DropdownMenu({ ...props }) {
|
|
7
|
+
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DropdownMenuPortal({ ...props }) {
|
|
10
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
|
|
11
|
+
}
|
|
12
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
13
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
16
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("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", className), ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
function DropdownMenuGroup({ ...props }) {
|
|
19
|
+
return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
22
|
+
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("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", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
25
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("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", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
26
|
+
}
|
|
27
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
28
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
31
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("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", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
32
|
+
}
|
|
33
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
34
|
+
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
37
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
40
|
+
return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function DropdownMenuSub({ ...props }) {
|
|
43
|
+
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
44
|
+
}
|
|
45
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
46
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("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", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
49
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("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", className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|