@codefast/ui 0.3.11-canary.2 → 0.3.12-canary.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/CHANGELOG.md +42 -0
- package/README.md +38 -14
- package/dist/components/accordion.d.ts +11 -29
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +10 -37
- package/dist/components/alert-dialog.d.ts +25 -60
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +16 -69
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -30
- package/dist/components/aspect-ratio.d.ts +5 -8
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +5 -7
- package/dist/components/avatar.d.ts +7 -17
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +7 -18
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +23 -20
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +13 -49
- package/dist/components/button-group.d.ts +15 -29
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +22 -27
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -51
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +75 -92
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +11 -39
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +82 -114
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +161 -150
- package/dist/components/checkbox-cards.d.ts +9 -15
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +8 -22
- package/dist/components/checkbox-group.d.ts +9 -16
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +7 -19
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +6 -14
- package/dist/components/collapsible.d.ts +7 -14
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +7 -15
- package/dist/components/command.d.ts +24 -55
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +18 -69
- package/dist/components/context-menu.d.ts +23 -72
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +21 -89
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +20 -72
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +16 -58
- package/dist/components/dropdown-menu.d.ts +23 -73
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +21 -96
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +24 -44
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +46 -89
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +50 -66
- package/dist/components/hover-card.d.ts +8 -21
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +8 -23
- package/dist/components/input-group.d.ts +29 -53
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +59 -66
- package/dist/components/input-number.d.ts +8 -28
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +14 -55
- package/dist/components/input-otp.d.ts +11 -24
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +13 -34
- package/dist/components/input-password.d.ts +6 -12
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +10 -31
- package/dist/components/input-search.d.ts +9 -18
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +16 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +5 -9
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +47 -90
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +6 -13
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +5 -8
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +23 -99
- package/dist/components/native-select.d.ts +7 -16
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +7 -25
- package/dist/components/navigation-menu.d.ts +13 -36
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +25 -61
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +13 -55
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +9 -27
- package/dist/components/progress-circle.d.ts +89 -106
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +70 -103
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -13
- package/dist/components/radio-cards.d.ts +5 -10
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +7 -21
- package/dist/components/radio-group.d.ts +6 -13
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +6 -17
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +5 -10
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +7 -21
- package/dist/components/scroll-area.d.ts +21 -33
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +64 -84
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +26 -78
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +27 -36
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +36 -80
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +166 -301
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +5 -8
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +12 -34
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +13 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +20 -33
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +5 -12
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +12 -47
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +8 -23
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +5 -8
- package/dist/components/toggle-group.d.ts +10 -24
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +20 -38
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +24 -29
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +9 -28
- package/dist/hooks/use-animated-value.d.ts +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +67 -58
- package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +42 -39
- package/dist/hooks/use-is-mobile.d.ts +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +20 -23
- package/dist/hooks/use-media-query.d.ts +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +49 -46
- package/dist/hooks/use-mutation-observer.d.ts +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +33 -34
- package/dist/hooks/use-pagination.d.ts +15 -22
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +99 -99
- package/dist/index.d.ts +131 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -69
- package/dist/primitives/checkbox-group.d.ts +84 -105
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +91 -105
- package/dist/primitives/input-number.d.ts +41 -51
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +417 -473
- package/dist/primitives/input.d.ts +43 -48
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +67 -66
- package/dist/primitives/progress-circle.d.ts +49 -79
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +134 -149
- package/package.json +17 -10
- package/{dist → src}/css/preset.css +1 -1
- /package/{dist → src}/css/amber.css +0 -0
- /package/{dist → src}/css/blue.css +0 -0
- /package/{dist → src}/css/cyan.css +0 -0
- /package/{dist → src}/css/emerald.css +0 -0
- /package/{dist → src}/css/fuchsia.css +0 -0
- /package/{dist → src}/css/gray.css +0 -0
- /package/{dist → src}/css/green.css +0 -0
- /package/{dist → src}/css/indigo.css +0 -0
- /package/{dist → src}/css/lime.css +0 -0
- /package/{dist → src}/css/neutral.css +0 -0
- /package/{dist → src}/css/orange.css +0 -0
- /package/{dist → src}/css/pink.css +0 -0
- /package/{dist → src}/css/purple.css +0 -0
- /package/{dist → src}/css/red.css +0 -0
- /package/{dist → src}/css/rose.css +0 -0
- /package/{dist → src}/css/sky.css +0 -0
- /package/{dist → src}/css/slate.css +0 -0
- /package/{dist → src}/css/stone.css +0 -0
- /package/{dist → src}/css/style.css +0 -0
- /package/{dist → src}/css/teal.css +0 -0
- /package/{dist → src}/css/violet.css +0 -0
- /package/{dist → src}/css/yellow.css +0 -0
- /package/{dist → src}/css/zinc.css +0 -0
|
@@ -1,93 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
-
import { XIcon } from "lucide-react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
4
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
7
|
-
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import { buttonVariants } from "#components/button";
|
|
8
7
|
function Dialog({ ...props }) {
|
|
9
|
-
|
|
10
|
-
"data-slot": "dialog",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
8
|
+
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
13
9
|
}
|
|
14
10
|
function DialogTrigger({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "dialog-trigger",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
11
|
+
return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
19
12
|
}
|
|
20
13
|
function DialogContent({ children, className, classNames, ...props }) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"data-slot": "dialog-content-wrapper",
|
|
27
|
-
...props,
|
|
28
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
29
|
-
className: cn("relative row-start-2 flex w-full flex-col rounded-t-2xl border bg-popover text-popover-foreground shadow-lg sm:max-w-lg sm:rounded-2xl", classNames?.content, className),
|
|
30
|
-
"data-slot": "dialog-content",
|
|
31
|
-
children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
32
|
-
className: buttonVariants({
|
|
33
|
-
className: ["absolute top-2.5 right-2.5 size-7", classNames?.close],
|
|
34
|
-
size: "icon",
|
|
35
|
-
variant: "ghost"
|
|
36
|
-
}),
|
|
37
|
-
"data-slot": "dialog-close",
|
|
38
|
-
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
39
|
-
className: "sr-only",
|
|
40
|
-
children: "Close"
|
|
41
|
-
})]
|
|
42
|
-
})]
|
|
43
|
-
})
|
|
44
|
-
})] });
|
|
14
|
+
return (_jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/50 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", classNames?.overlay), "data-slot": "dialog-overlay" }), _jsx(DialogPrimitive.Content, { className: cn("fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto ease-ui data-[state=closed]:animate-out data-[state=open]:animate-in max-sm:data-[state=closed]:animation-duration-500 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=open]:animation-duration-500 max-sm:data-[state=open]:slide-in-from-bottom sm:grid-rows-[1fr_auto_3fr] sm:p-4 sm:data-[state=closed]:fade-out-0 sm:data-[state=closed]:zoom-out-95 sm:data-[state=open]:fade-in-0 sm:data-[state=open]:zoom-in-95", classNames?.wrapper), "data-slot": "dialog-content-wrapper", ...props, children: _jsxs("div", { className: cn("relative row-start-2 flex w-full flex-col rounded-t-2xl border bg-popover text-popover-foreground shadow-lg sm:max-w-lg sm:rounded-2xl", classNames?.content, className), "data-slot": "dialog-content", children: [children, _jsxs(DialogPrimitive.Close, { className: buttonVariants({
|
|
15
|
+
className: ["absolute top-2.5 right-2.5 size-7", classNames?.close],
|
|
16
|
+
size: "icon",
|
|
17
|
+
variant: "ghost",
|
|
18
|
+
}), "data-slot": "dialog-close", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] }) })] }));
|
|
45
19
|
}
|
|
46
20
|
function DialogHeader({ className, ...props }) {
|
|
47
|
-
|
|
48
|
-
className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-2 text-center sm:text-left", className),
|
|
49
|
-
"data-slot": "dialog-header",
|
|
50
|
-
...props
|
|
51
|
-
});
|
|
21
|
+
return (_jsx("header", { className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-2 text-center sm:text-left", className), "data-slot": "dialog-header", ...props }));
|
|
52
22
|
}
|
|
53
23
|
function DialogBody({ className, ...props }) {
|
|
54
|
-
|
|
55
|
-
className: cn("overflow-auto px-6 py-2", className),
|
|
56
|
-
"data-slot": "dialog-body",
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
24
|
+
return (_jsx("main", { className: cn("overflow-auto px-6 py-2", className), "data-slot": "dialog-body", ...props }));
|
|
59
25
|
}
|
|
60
26
|
function DialogFooter({ className, ...props }) {
|
|
61
|
-
|
|
62
|
-
className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-2 pb-6 sm:flex-row sm:justify-end", className),
|
|
63
|
-
"data-slot": "dialog-footer",
|
|
64
|
-
...props
|
|
65
|
-
});
|
|
27
|
+
return (_jsx("footer", { className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-2 pb-6 sm:flex-row sm:justify-end", className), "data-slot": "dialog-footer", ...props }));
|
|
66
28
|
}
|
|
67
29
|
function DialogTitle({ className, ...props }) {
|
|
68
|
-
|
|
69
|
-
className: cn("text-lg leading-none font-semibold tracking-tight", className),
|
|
70
|
-
"data-slot": "dialog-title",
|
|
71
|
-
...props
|
|
72
|
-
});
|
|
30
|
+
return (_jsx(DialogPrimitive.Title, { className: cn("text-lg leading-none font-semibold tracking-tight", className), "data-slot": "dialog-title", ...props }));
|
|
73
31
|
}
|
|
74
32
|
function DialogDescription({ className, ...props }) {
|
|
75
|
-
|
|
76
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
77
|
-
"data-slot": "dialog-description",
|
|
78
|
-
...props
|
|
79
|
-
});
|
|
33
|
+
return (_jsx(DialogPrimitive.Description, { className: cn("text-sm text-muted-foreground", className), "data-slot": "dialog-description", ...props }));
|
|
80
34
|
}
|
|
81
35
|
function DialogClose({ className, size, variant = "outline", ...props }) {
|
|
82
|
-
|
|
83
|
-
className: buttonVariants({
|
|
84
|
-
className,
|
|
85
|
-
size,
|
|
86
|
-
variant
|
|
87
|
-
}),
|
|
88
|
-
"data-slot": "dialog-close",
|
|
89
|
-
...props
|
|
90
|
-
});
|
|
36
|
+
return (_jsx(DialogPrimitive.Close, { className: buttonVariants({ className, size, variant }), "data-slot": "dialog-close", ...props }));
|
|
91
37
|
}
|
|
92
|
-
|
|
93
|
-
|
|
38
|
+
/* -----------------------------------------------------------------------------
|
|
39
|
+
* Exports
|
|
40
|
+
* -------------------------------------------------------------------------- */
|
|
41
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, };
|
|
@@ -1,65 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type
|
|
8
|
-
declare function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}: DrawerTriggerProps): JSX.Element;
|
|
16
|
-
interface DrawerContentProps extends ComponentProps<typeof Drawer$1.Content> {
|
|
17
|
-
classNames?: {
|
|
18
|
-
content?: string;
|
|
19
|
-
handle?: string;
|
|
20
|
-
overlay?: string;
|
|
21
|
-
};
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
4
|
+
import { buttonVariants } from "#components/button";
|
|
5
|
+
type DrawerProps = ComponentProps<typeof DrawerPrimitive.Root>;
|
|
6
|
+
declare function Drawer({ shouldScaleBackground, ...props }: DrawerProps): JSX.Element;
|
|
7
|
+
type DrawerTriggerProps = ComponentProps<typeof DrawerPrimitive.Trigger>;
|
|
8
|
+
declare function DrawerTrigger({ ...props }: DrawerTriggerProps): JSX.Element;
|
|
9
|
+
interface DrawerContentProps extends ComponentProps<typeof DrawerPrimitive.Content> {
|
|
10
|
+
classNames?: {
|
|
11
|
+
content?: string;
|
|
12
|
+
handle?: string;
|
|
13
|
+
overlay?: string;
|
|
14
|
+
};
|
|
22
15
|
}
|
|
23
|
-
declare function DrawerContent({
|
|
24
|
-
children,
|
|
25
|
-
className,
|
|
26
|
-
classNames,
|
|
27
|
-
...props
|
|
28
|
-
}: DrawerContentProps): JSX.Element;
|
|
16
|
+
declare function DrawerContent({ children, className, classNames, ...props }: DrawerContentProps): JSX.Element;
|
|
29
17
|
type DrawerHeaderProps = ComponentProps<"div">;
|
|
30
|
-
declare function DrawerHeader({
|
|
31
|
-
className,
|
|
32
|
-
...props
|
|
33
|
-
}: DrawerHeaderProps): JSX.Element;
|
|
18
|
+
declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): JSX.Element;
|
|
34
19
|
type DrawerBodyProps = ComponentProps<"div">;
|
|
35
|
-
declare function DrawerBody({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: DrawerBodyProps): JSX.Element;
|
|
20
|
+
declare function DrawerBody({ className, ...props }: DrawerBodyProps): JSX.Element;
|
|
39
21
|
type DrawerFooterProps = ComponentProps<"div">;
|
|
40
|
-
declare function DrawerFooter({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}: DrawerTitleProps): JSX.Element;
|
|
49
|
-
type DrawerDescriptionProps = ComponentProps<typeof Drawer$1.Description>;
|
|
50
|
-
declare function DrawerDescription({
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: DrawerDescriptionProps): JSX.Element;
|
|
54
|
-
interface DrawerCloseProps extends ComponentProps<typeof Drawer$1.Close> {
|
|
55
|
-
size?: VariantProps<typeof buttonVariants>["size"];
|
|
56
|
-
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
22
|
+
declare function DrawerFooter({ className, ...props }: DrawerFooterProps): JSX.Element;
|
|
23
|
+
type DrawerTitleProps = ComponentProps<typeof DrawerPrimitive.Title>;
|
|
24
|
+
declare function DrawerTitle({ className, ...props }: DrawerTitleProps): JSX.Element;
|
|
25
|
+
type DrawerDescriptionProps = ComponentProps<typeof DrawerPrimitive.Description>;
|
|
26
|
+
declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): JSX.Element;
|
|
27
|
+
interface DrawerCloseProps extends ComponentProps<typeof DrawerPrimitive.Close> {
|
|
28
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
29
|
+
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
57
30
|
}
|
|
58
|
-
declare function DrawerClose({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
...props
|
|
63
|
-
}: DrawerCloseProps): JSX.Element;
|
|
64
|
-
//#endregion
|
|
65
|
-
export { Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps };
|
|
31
|
+
declare function DrawerClose({ className, size, variant, ...props }: DrawerCloseProps): JSX.Element;
|
|
32
|
+
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, };
|
|
33
|
+
export type { DrawerBodyProps, DrawerCloseProps, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHeaderProps, DrawerProps, DrawerTitleProps, DrawerTriggerProps, };
|
|
34
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,KAAK,WAAW,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAE/D,iBAAS,MAAM,CAAC,EAAE,qBAA4B,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAQpF;AAMD,KAAK,kBAAkB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;AAEzE,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAEpE;AAMD,UAAU,kBAAmB,SAAQ,cAAc,CAAC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AAC;IAC7E,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;CAC1D;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,IAAI,EACJ,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAQhC;AAMD,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC;AACF,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,GACnB,CAAC"}
|
|
@@ -1,78 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
//#region src/components/drawer.tsx
|
|
4
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
|
+
import { buttonVariants } from "#components/button";
|
|
7
6
|
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
8
|
-
|
|
9
|
-
"data-slot": "drawer",
|
|
10
|
-
shouldScaleBackground,
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
7
|
+
return (_jsx(DrawerPrimitive.Root, { "data-slot": "drawer", shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
13
8
|
}
|
|
14
9
|
function DrawerTrigger({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "drawer-trigger",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
10
|
+
return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
19
11
|
}
|
|
20
12
|
function DrawerContent({ children, className, classNames, ...props }) {
|
|
21
|
-
|
|
22
|
-
className: cn("fixed inset-0 z-50 bg-black/50", classNames?.overlay),
|
|
23
|
-
"data-slot": "drawer-overlay"
|
|
24
|
-
}), /* @__PURE__ */ jsxs(Drawer$1.Content, {
|
|
25
|
-
className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background 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-2xl 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=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 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-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", classNames?.content, className),
|
|
26
|
-
"data-slot": "drawer-content",
|
|
27
|
-
...props,
|
|
28
|
-
children: [/* @__PURE__ */ jsx("div", { className: cn("mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block", classNames?.handle) }), children]
|
|
29
|
-
})] });
|
|
13
|
+
return (_jsxs(DrawerPrimitive.Portal, { children: [_jsx(DrawerPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/50", classNames?.overlay), "data-slot": "drawer-overlay" }), _jsxs(DrawerPrimitive.Content, { className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background 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-2xl 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=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 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-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", classNames?.content, className), "data-slot": "drawer-content", ...props, children: [_jsx("div", { className: cn("mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block", classNames?.handle) }), children] })] }));
|
|
30
14
|
}
|
|
31
15
|
function DrawerHeader({ className, ...props }) {
|
|
32
|
-
|
|
33
|
-
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
34
|
-
"data-slot": "drawer-header",
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
16
|
+
return (_jsx("div", { className: cn("flex flex-col gap-1.5 p-4", className), "data-slot": "drawer-header", ...props }));
|
|
37
17
|
}
|
|
38
18
|
function DrawerBody({ className, ...props }) {
|
|
39
|
-
|
|
40
|
-
className: cn("overflow-auto px-4 py-2", className),
|
|
41
|
-
"data-slot": "drawer-body",
|
|
42
|
-
...props
|
|
43
|
-
});
|
|
19
|
+
return (_jsx("main", { className: cn("overflow-auto px-4 py-2", className), "data-slot": "drawer-body", ...props }));
|
|
44
20
|
}
|
|
45
21
|
function DrawerFooter({ className, ...props }) {
|
|
46
|
-
|
|
47
|
-
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
48
|
-
"data-slot": "drawer-footer",
|
|
49
|
-
...props
|
|
50
|
-
});
|
|
22
|
+
return (_jsx("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), "data-slot": "drawer-footer", ...props }));
|
|
51
23
|
}
|
|
52
24
|
function DrawerTitle({ className, ...props }) {
|
|
53
|
-
|
|
54
|
-
className: cn("font-semibold text-foreground", className),
|
|
55
|
-
"data-slot": "drawer-title",
|
|
56
|
-
...props
|
|
57
|
-
});
|
|
25
|
+
return (_jsx(DrawerPrimitive.Title, { className: cn("font-semibold text-foreground", className), "data-slot": "drawer-title", ...props }));
|
|
58
26
|
}
|
|
59
27
|
function DrawerDescription({ className, ...props }) {
|
|
60
|
-
|
|
61
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
62
|
-
"data-slot": "drawer-description",
|
|
63
|
-
...props
|
|
64
|
-
});
|
|
28
|
+
return (_jsx(DrawerPrimitive.Description, { className: cn("text-sm text-muted-foreground", className), "data-slot": "drawer-description", ...props }));
|
|
65
29
|
}
|
|
66
30
|
function DrawerClose({ className, size, variant = "outline", ...props }) {
|
|
67
|
-
|
|
68
|
-
className: buttonVariants({
|
|
69
|
-
className,
|
|
70
|
-
size,
|
|
71
|
-
variant
|
|
72
|
-
}),
|
|
73
|
-
"data-slot": "drawer-close",
|
|
74
|
-
...props
|
|
75
|
-
});
|
|
31
|
+
return (_jsx(DrawerPrimitive.Close, { className: buttonVariants({ className, size, variant }), "data-slot": "drawer-close", ...props }));
|
|
76
32
|
}
|
|
77
|
-
|
|
78
|
-
|
|
33
|
+
/* -----------------------------------------------------------------------------
|
|
34
|
+
* Exports
|
|
35
|
+
* -------------------------------------------------------------------------- */
|
|
36
|
+
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, };
|
|
@@ -1,92 +1,42 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
|
|
4
|
-
//#region src/components/dropdown-menu.d.ts
|
|
5
3
|
type DropdownMenuProps = ComponentProps<typeof DropdownMenuPrimitive.Root>;
|
|
6
|
-
declare function DropdownMenu({
|
|
7
|
-
...props
|
|
8
|
-
}: DropdownMenuProps): JSX.Element;
|
|
4
|
+
declare function DropdownMenu({ ...props }: DropdownMenuProps): JSX.Element;
|
|
9
5
|
type DropdownMenuTriggerProps = ComponentProps<typeof DropdownMenuPrimitive.Trigger>;
|
|
10
|
-
declare function DropdownMenuTrigger({
|
|
11
|
-
...props
|
|
12
|
-
}: DropdownMenuTriggerProps): JSX.Element;
|
|
6
|
+
declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): JSX.Element;
|
|
13
7
|
type DropdownMenuGroupProps = ComponentProps<typeof DropdownMenuPrimitive.Group>;
|
|
14
|
-
declare function DropdownMenuGroup({
|
|
15
|
-
...props
|
|
16
|
-
}: DropdownMenuGroupProps): JSX.Element;
|
|
8
|
+
declare function DropdownMenuGroup({ ...props }: DropdownMenuGroupProps): JSX.Element;
|
|
17
9
|
type DropdownMenuSubProps = ComponentProps<typeof DropdownMenuPrimitive.Sub>;
|
|
18
|
-
declare function DropdownMenuSub({
|
|
19
|
-
...props
|
|
20
|
-
}: DropdownMenuSubProps): JSX.Element;
|
|
10
|
+
declare function DropdownMenuSub({ ...props }: DropdownMenuSubProps): JSX.Element;
|
|
21
11
|
type DropdownMenuRadioGroupProps = ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>;
|
|
22
|
-
declare function DropdownMenuRadioGroup({
|
|
23
|
-
...props
|
|
24
|
-
}: DropdownMenuRadioGroupProps): JSX.Element;
|
|
12
|
+
declare function DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps): JSX.Element;
|
|
25
13
|
interface DropdownMenuSubTriggerProps extends ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> {
|
|
26
|
-
|
|
14
|
+
inset?: boolean;
|
|
27
15
|
}
|
|
28
|
-
declare function DropdownMenuSubTrigger({
|
|
29
|
-
children,
|
|
30
|
-
className,
|
|
31
|
-
inset,
|
|
32
|
-
...props
|
|
33
|
-
}: DropdownMenuSubTriggerProps): JSX.Element;
|
|
16
|
+
declare function DropdownMenuSubTrigger({ children, className, inset, ...props }: DropdownMenuSubTriggerProps): JSX.Element;
|
|
34
17
|
type DropdownMenuSubContentProps = ComponentProps<typeof DropdownMenuPrimitive.SubContent>;
|
|
35
|
-
declare function DropdownMenuSubContent({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: DropdownMenuSubContentProps): JSX.Element;
|
|
18
|
+
declare function DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps): JSX.Element;
|
|
39
19
|
type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Content>;
|
|
40
|
-
declare function DropdownMenuContent({
|
|
41
|
-
className,
|
|
42
|
-
sideOffset,
|
|
43
|
-
...props
|
|
44
|
-
}: DropdownMenuContentProps): JSX.Element;
|
|
20
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: DropdownMenuContentProps): JSX.Element;
|
|
45
21
|
interface DropdownMenuItemProps extends ComponentProps<typeof DropdownMenuPrimitive.Item> {
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
variant?: "default" | "destructive";
|
|
48
24
|
}
|
|
49
|
-
declare function DropdownMenuItem({
|
|
50
|
-
className,
|
|
51
|
-
inset,
|
|
52
|
-
variant,
|
|
53
|
-
...props
|
|
54
|
-
}: DropdownMenuItemProps): JSX.Element;
|
|
25
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuItemProps): JSX.Element;
|
|
55
26
|
type DropdownMenuCheckboxItemProps = ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>;
|
|
56
|
-
declare function DropdownMenuCheckboxItem({
|
|
57
|
-
checked,
|
|
58
|
-
children,
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: DropdownMenuCheckboxItemProps): JSX.Element;
|
|
27
|
+
declare function DropdownMenuCheckboxItem({ checked, children, className, ...props }: DropdownMenuCheckboxItemProps): JSX.Element;
|
|
62
28
|
type DropdownMenuRadioItemProps = ComponentProps<typeof DropdownMenuPrimitive.RadioItem>;
|
|
63
|
-
declare function DropdownMenuRadioItem({
|
|
64
|
-
children,
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}: DropdownMenuRadioItemProps): JSX.Element;
|
|
29
|
+
declare function DropdownMenuRadioItem({ children, className, ...props }: DropdownMenuRadioItemProps): JSX.Element;
|
|
68
30
|
interface DropdownMenuLabelProps extends ComponentProps<typeof DropdownMenuPrimitive.Label> {
|
|
69
|
-
|
|
31
|
+
inset?: boolean;
|
|
70
32
|
}
|
|
71
|
-
declare function DropdownMenuLabel({
|
|
72
|
-
className,
|
|
73
|
-
inset,
|
|
74
|
-
...props
|
|
75
|
-
}: DropdownMenuLabelProps): JSX.Element;
|
|
33
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): JSX.Element;
|
|
76
34
|
type DropdownMenuSeparatorProps = ComponentProps<typeof DropdownMenuPrimitive.Separator>;
|
|
77
|
-
declare function DropdownMenuSeparator({
|
|
78
|
-
className,
|
|
79
|
-
...props
|
|
80
|
-
}: DropdownMenuSeparatorProps): JSX.Element;
|
|
35
|
+
declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): JSX.Element;
|
|
81
36
|
type DropdownMenuShortcutProps = ComponentProps<"span">;
|
|
82
|
-
declare function DropdownMenuShortcut({
|
|
83
|
-
className,
|
|
84
|
-
...props
|
|
85
|
-
}: DropdownMenuShortcutProps): JSX.Element;
|
|
37
|
+
declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): JSX.Element;
|
|
86
38
|
type DropdownMenuArrowProps = ComponentProps<typeof DropdownMenuPrimitive.Arrow>;
|
|
87
|
-
declare function DropdownMenuArrow({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
export { DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
|
|
39
|
+
declare function DropdownMenuArrow({ className, ...props }: DropdownMenuArrowProps): JSX.Element;
|
|
40
|
+
export { DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
41
|
+
export type { DropdownMenuArrowProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuGroupProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps, };
|
|
42
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1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";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
|
-
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6
|
-
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
7
6
|
function DropdownMenu({ ...props }) {
|
|
8
|
-
|
|
9
|
-
"data-slot": "dropdown-menu",
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
7
|
+
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
12
8
|
}
|
|
13
9
|
function DropdownMenuTrigger({ ...props }) {
|
|
14
|
-
|
|
15
|
-
"data-slot": "dropdown-menu-trigger",
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
10
|
+
return _jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
18
11
|
}
|
|
19
12
|
function DropdownMenuGroup({ ...props }) {
|
|
20
|
-
|
|
21
|
-
"data-slot": "dropdown-menu-group",
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
13
|
+
return _jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
24
14
|
}
|
|
25
15
|
function DropdownMenuSub({ ...props }) {
|
|
26
|
-
|
|
27
|
-
"data-slot": "dropdown-menu-sub",
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
16
|
+
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
30
17
|
}
|
|
31
18
|
function DropdownMenuRadioGroup({ ...props }) {
|
|
32
|
-
|
|
33
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
19
|
+
return _jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
|
|
36
20
|
}
|
|
37
21
|
function DropdownMenuSubTrigger({ children, className, inset, ...props }) {
|
|
38
|
-
|
|
39
|
-
className: cn("flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className),
|
|
40
|
-
"data-inset": inset,
|
|
41
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
42
|
-
...props,
|
|
43
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
44
|
-
});
|
|
22
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { className: cn("flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), "data-inset": inset, "data-slot": "dropdown-menu-sub-trigger", ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
45
23
|
}
|
|
46
24
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
47
|
-
|
|
48
|
-
"data-slot": "dropdown-menu-portal",
|
|
49
|
-
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
50
|
-
className: cn("z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
|
|
51
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
52
|
-
...props
|
|
53
|
-
})
|
|
54
|
-
});
|
|
25
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", children: _jsx(DropdownMenuPrimitive.SubContent, { className: cn("z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className), "data-slot": "dropdown-menu-sub-content", ...props }) }));
|
|
55
26
|
}
|
|
56
27
|
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
57
|
-
|
|
58
|
-
"data-slot": "dropdown-menu-portal",
|
|
59
|
-
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
60
|
-
className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
|
|
61
|
-
"data-slot": "dropdown-menu-content",
|
|
62
|
-
sideOffset,
|
|
63
|
-
...props
|
|
64
|
-
})
|
|
65
|
-
});
|
|
28
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", children: _jsx(DropdownMenuPrimitive.Content, { className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className), "data-slot": "dropdown-menu-content", sideOffset: sideOffset, ...props }) }));
|
|
66
29
|
}
|
|
67
30
|
function DropdownMenuItem({ className, inset, variant, ...props }) {
|
|
68
|
-
|
|
69
|
-
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className),
|
|
70
|
-
"data-inset": inset,
|
|
71
|
-
"data-slot": "dropdown-menu-item",
|
|
72
|
-
"data-variant": variant,
|
|
73
|
-
...props
|
|
74
|
-
});
|
|
31
|
+
return (_jsx(DropdownMenuPrimitive.Item, { className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className), "data-inset": inset, "data-slot": "dropdown-menu-item", "data-variant": variant, ...props }));
|
|
75
32
|
}
|
|
76
33
|
function DropdownMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
77
|
-
|
|
78
|
-
checked,
|
|
79
|
-
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
80
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
81
|
-
...props,
|
|
82
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
83
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
84
|
-
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
85
|
-
}), children]
|
|
86
|
-
});
|
|
34
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { checked: checked, className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-slot": "dropdown-menu-checkbox-item", ...props, children: [_jsx("span", { className: "absolute left-2 flex items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
87
35
|
}
|
|
88
36
|
function DropdownMenuRadioItem({ children, className, ...props }) {
|
|
89
|
-
|
|
90
|
-
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
91
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
92
|
-
...props,
|
|
93
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
94
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
95
|
-
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotIcon, { className: "size-4 fill-current" }) })
|
|
96
|
-
}), children]
|
|
97
|
-
});
|
|
37
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-slot": "dropdown-menu-radio-item", ...props, children: [_jsx("span", { className: "absolute left-2 flex items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(DotIcon, { className: "size-4 fill-current" }) }) }), children] }));
|
|
98
38
|
}
|
|
99
39
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
100
|
-
|
|
101
|
-
className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className),
|
|
102
|
-
"data-inset": inset,
|
|
103
|
-
"data-slot": "dropdown-menu-label",
|
|
104
|
-
...props
|
|
105
|
-
});
|
|
40
|
+
return (_jsx(DropdownMenuPrimitive.Label, { className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className), "data-inset": inset, "data-slot": "dropdown-menu-label", ...props }));
|
|
106
41
|
}
|
|
107
42
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
108
|
-
|
|
109
|
-
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
110
|
-
"data-slot": "dropdown-menu-separator",
|
|
111
|
-
...props
|
|
112
|
-
});
|
|
43
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { className: cn("mx-2 my-1 h-px bg-border", className), "data-slot": "dropdown-menu-separator", ...props }));
|
|
113
44
|
}
|
|
114
45
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
115
|
-
|
|
116
|
-
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80", className),
|
|
117
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
118
|
-
...props
|
|
119
|
-
});
|
|
46
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80", className), "data-slot": "dropdown-menu-shortcut", ...props }));
|
|
120
47
|
}
|
|
121
48
|
function DropdownMenuArrow({ className, ...props }) {
|
|
122
|
-
|
|
123
|
-
className: cn("fill-popover", className),
|
|
124
|
-
"data-slot": "dropdown-menu-arrow",
|
|
125
|
-
...props
|
|
126
|
-
});
|
|
49
|
+
return (_jsx(DropdownMenuPrimitive.Arrow, { className: cn("fill-popover", className), "data-slot": "dropdown-menu-arrow", ...props }));
|
|
127
50
|
}
|
|
128
|
-
|
|
129
|
-
|
|
51
|
+
/* -----------------------------------------------------------------------------
|
|
52
|
+
* Exports
|
|
53
|
+
* -------------------------------------------------------------------------- */
|
|
54
|
+
export { DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|