@codefast/ui 0.3.9 → 0.3.11-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 +30 -0
- package/README.md +277 -167
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +2 -2
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +124 -1
- package/dist/components/breadcrumb.js +72 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +1 -1
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +11 -18
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +1 -1
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +5 -4
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +2 -2
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +1 -1
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +1 -1
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +1 -1
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +3 -3
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +1 -1
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +1 -1
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +6 -6
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +2 -2
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +8 -10
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +8 -10
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.js +44 -1
- package/dist/css/amber.css +95 -1
- package/dist/css/blue.css +95 -1
- package/dist/css/cyan.css +95 -1
- package/dist/css/emerald.css +95 -1
- package/dist/css/fuchsia.css +95 -1
- package/dist/css/gray.css +95 -1
- package/dist/css/green.css +95 -1
- package/dist/css/indigo.css +95 -1
- package/dist/css/lime.css +95 -1
- package/dist/css/neutral.css +95 -1
- package/dist/css/orange.css +95 -1
- package/dist/css/pink.css +95 -1
- package/dist/css/preset.css +118 -1
- package/dist/css/purple.css +95 -1
- package/dist/css/red.css +95 -1
- package/dist/css/rose.css +95 -1
- package/dist/css/sky.css +95 -1
- package/dist/css/slate.css +95 -1
- package/dist/css/stone.css +95 -1
- package/dist/css/style.css +3 -1
- package/dist/css/teal.css +95 -1
- package/dist/css/violet.css +95 -1
- package/dist/css/yellow.css +95 -1
- package/dist/css/zinc.css +95 -1
- package/dist/hooks/use-animated-value.cjs +74 -1
- package/dist/hooks/use-animated-value.d.ts +9 -10
- package/dist/hooks/use-animated-value.js +40 -1
- package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +17 -0
- package/dist/hooks/use-copy-to-clipboard.js +23 -1
- package/dist/hooks/use-is-mobile.cjs +39 -1
- package/dist/hooks/use-is-mobile.d.ts +15 -6
- package/dist/hooks/use-is-mobile.js +5 -1
- package/dist/hooks/use-media-query.cjs +56 -1
- package/dist/hooks/use-media-query.d.ts +11 -3
- package/dist/hooks/use-media-query.js +22 -1
- package/dist/hooks/use-mutation-observer.cjs +56 -1
- package/dist/hooks/use-mutation-observer.d.ts +7 -11
- package/dist/hooks/use-mutation-observer.js +22 -1
- package/dist/hooks/use-pagination.cjs +92 -1
- package/dist/hooks/use-pagination.d.ts +12 -10
- package/dist/hooks/use-pagination.js +55 -1
- package/dist/index.cjs +1081 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +1 -1
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +1 -1
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +1 -1
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +1 -1
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +405 -62
|
@@ -1,2 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
import { Close, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-dialog";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import { buttonVariants } from "./button.js";
|
|
7
|
+
function Dialog({ ...props }) {
|
|
8
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
9
|
+
"data-slot": "dialog",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function DialogTrigger({ ...props }) {
|
|
14
|
+
return /*#__PURE__*/ jsx(Trigger, {
|
|
15
|
+
"data-slot": "dialog-trigger",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function DialogContent({ children, className, classNames, ...props }) {
|
|
20
|
+
return /*#__PURE__*/ jsxs(Portal, {
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ jsx(Overlay, {
|
|
23
|
+
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),
|
|
24
|
+
"data-slot": "dialog-overlay"
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ jsx(Content, {
|
|
27
|
+
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),
|
|
28
|
+
"data-slot": "dialog-content-wrapper",
|
|
29
|
+
...props,
|
|
30
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
31
|
+
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),
|
|
32
|
+
"data-slot": "dialog-content",
|
|
33
|
+
children: [
|
|
34
|
+
children,
|
|
35
|
+
/*#__PURE__*/ jsxs(Close, {
|
|
36
|
+
className: buttonVariants({
|
|
37
|
+
className: [
|
|
38
|
+
"absolute top-2.5 right-2.5 size-7",
|
|
39
|
+
classNames?.close
|
|
40
|
+
],
|
|
41
|
+
size: "icon",
|
|
42
|
+
variant: "ghost"
|
|
43
|
+
}),
|
|
44
|
+
"data-slot": "dialog-close",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsx(XIcon, {
|
|
47
|
+
className: "size-4"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ jsx("span", {
|
|
50
|
+
className: "sr-only",
|
|
51
|
+
children: "Close"
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function DialogHeader({ className, ...props }) {
|
|
62
|
+
return /*#__PURE__*/ jsx("header", {
|
|
63
|
+
className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-2 text-center sm:text-left", className),
|
|
64
|
+
"data-slot": "dialog-header",
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function DialogBody({ className, ...props }) {
|
|
69
|
+
return /*#__PURE__*/ jsx("main", {
|
|
70
|
+
className: cn("overflow-auto px-6 py-2", className),
|
|
71
|
+
"data-slot": "dialog-body",
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function DialogFooter({ className, ...props }) {
|
|
76
|
+
return /*#__PURE__*/ jsx("footer", {
|
|
77
|
+
className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-2 pb-6 sm:flex-row sm:justify-end", className),
|
|
78
|
+
"data-slot": "dialog-footer",
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function DialogTitle({ className, ...props }) {
|
|
83
|
+
return /*#__PURE__*/ jsx(Title, {
|
|
84
|
+
className: cn("text-lg leading-none font-semibold tracking-tight", className),
|
|
85
|
+
"data-slot": "dialog-title",
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function DialogDescription({ className, ...props }) {
|
|
90
|
+
return /*#__PURE__*/ jsx(Description, {
|
|
91
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
92
|
+
"data-slot": "dialog-description",
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function DialogClose({ className, size, variant = "outline", ...props }) {
|
|
97
|
+
return /*#__PURE__*/ jsx(Close, {
|
|
98
|
+
className: buttonVariants({
|
|
99
|
+
className,
|
|
100
|
+
size,
|
|
101
|
+
variant
|
|
102
|
+
}),
|
|
103
|
+
"data-slot": "dialog-close",
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
|
|
@@ -1,2 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
DrawerClose: ()=>DrawerClose,
|
|
29
|
+
DrawerTrigger: ()=>DrawerTrigger,
|
|
30
|
+
Drawer: ()=>Drawer,
|
|
31
|
+
DrawerFooter: ()=>DrawerFooter,
|
|
32
|
+
DrawerHeader: ()=>DrawerHeader,
|
|
33
|
+
DrawerContent: ()=>DrawerContent,
|
|
34
|
+
DrawerDescription: ()=>DrawerDescription,
|
|
35
|
+
DrawerTitle: ()=>DrawerTitle,
|
|
36
|
+
DrawerBody: ()=>DrawerBody
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
40
|
+
const external_vaul_namespaceObject = require("vaul");
|
|
41
|
+
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
42
|
+
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
43
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Root, {
|
|
44
|
+
"data-slot": "drawer",
|
|
45
|
+
shouldScaleBackground: shouldScaleBackground,
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function DrawerTrigger({ ...props }) {
|
|
50
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Trigger, {
|
|
51
|
+
"data-slot": "drawer-trigger",
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function DrawerContent({ children, className, classNames, ...props }) {
|
|
56
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_vaul_namespaceObject.Drawer.Portal, {
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Overlay, {
|
|
59
|
+
className: (0, tailwind_variants_namespaceObject.cn)("fixed inset-0 z-50 bg-black/50", classNames?.overlay),
|
|
60
|
+
"data-slot": "drawer-overlay"
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_vaul_namespaceObject.Drawer.Content, {
|
|
63
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
64
|
+
"data-slot": "drawer-content",
|
|
65
|
+
...props,
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
68
|
+
className: (0, tailwind_variants_namespaceObject.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)
|
|
69
|
+
}),
|
|
70
|
+
children
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function DrawerHeader({ className, ...props }) {
|
|
77
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
78
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-1.5 p-4", className),
|
|
79
|
+
"data-slot": "drawer-header",
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function DrawerBody({ className, ...props }) {
|
|
84
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("main", {
|
|
85
|
+
className: (0, tailwind_variants_namespaceObject.cn)("overflow-auto px-4 py-2", className),
|
|
86
|
+
"data-slot": "drawer-body",
|
|
87
|
+
...props
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function DrawerFooter({ className, ...props }) {
|
|
91
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
92
|
+
className: (0, tailwind_variants_namespaceObject.cn)("mt-auto flex flex-col gap-2 p-4", className),
|
|
93
|
+
"data-slot": "drawer-footer",
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function DrawerTitle({ className, ...props }) {
|
|
98
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Title, {
|
|
99
|
+
className: (0, tailwind_variants_namespaceObject.cn)("font-semibold text-foreground", className),
|
|
100
|
+
"data-slot": "drawer-title",
|
|
101
|
+
...props
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function DrawerDescription({ className, ...props }) {
|
|
105
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Description, {
|
|
106
|
+
className: (0, tailwind_variants_namespaceObject.cn)("text-sm text-muted-foreground", className),
|
|
107
|
+
"data-slot": "drawer-description",
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function DrawerClose({ className, size, variant = "outline", ...props }) {
|
|
112
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Close, {
|
|
113
|
+
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
114
|
+
className,
|
|
115
|
+
size,
|
|
116
|
+
variant
|
|
117
|
+
}),
|
|
118
|
+
"data-slot": "drawer-close",
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
exports.Drawer = __webpack_exports__.Drawer;
|
|
123
|
+
exports.DrawerBody = __webpack_exports__.DrawerBody;
|
|
124
|
+
exports.DrawerClose = __webpack_exports__.DrawerClose;
|
|
125
|
+
exports.DrawerContent = __webpack_exports__.DrawerContent;
|
|
126
|
+
exports.DrawerDescription = __webpack_exports__.DrawerDescription;
|
|
127
|
+
exports.DrawerFooter = __webpack_exports__.DrawerFooter;
|
|
128
|
+
exports.DrawerHeader = __webpack_exports__.DrawerHeader;
|
|
129
|
+
exports.DrawerTitle = __webpack_exports__.DrawerTitle;
|
|
130
|
+
exports.DrawerTrigger = __webpack_exports__.DrawerTrigger;
|
|
131
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
132
|
+
"Drawer",
|
|
133
|
+
"DrawerBody",
|
|
134
|
+
"DrawerClose",
|
|
135
|
+
"DrawerContent",
|
|
136
|
+
"DrawerDescription",
|
|
137
|
+
"DrawerFooter",
|
|
138
|
+
"DrawerHeader",
|
|
139
|
+
"DrawerTitle",
|
|
140
|
+
"DrawerTrigger"
|
|
141
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
142
|
+
Object.defineProperty(exports, '__esModule', {
|
|
143
|
+
value: true
|
|
144
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
1
2
|
import type { ComponentProps, JSX } from "react";
|
|
2
3
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
-
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
4
4
|
import { buttonVariants } from "./button";
|
|
5
5
|
type DrawerProps = ComponentProps<typeof DrawerPrimitive.Root>;
|
|
6
6
|
declare function Drawer({ shouldScaleBackground, ...props }: DrawerProps): JSX.Element;
|
|
@@ -1,2 +1,86 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
import { Drawer } from "vaul";
|
|
5
|
+
import { buttonVariants } from "./button.js";
|
|
6
|
+
function drawer_Drawer({ shouldScaleBackground = true, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ jsx(Drawer.Root, {
|
|
8
|
+
"data-slot": "drawer",
|
|
9
|
+
shouldScaleBackground: shouldScaleBackground,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function DrawerTrigger({ ...props }) {
|
|
14
|
+
return /*#__PURE__*/ jsx(Drawer.Trigger, {
|
|
15
|
+
"data-slot": "drawer-trigger",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function DrawerContent({ children, className, classNames, ...props }) {
|
|
20
|
+
return /*#__PURE__*/ jsxs(Drawer.Portal, {
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ jsx(Drawer.Overlay, {
|
|
23
|
+
className: cn("fixed inset-0 z-50 bg-black/50", classNames?.overlay),
|
|
24
|
+
"data-slot": "drawer-overlay"
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ jsxs(Drawer.Content, {
|
|
27
|
+
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),
|
|
28
|
+
"data-slot": "drawer-content",
|
|
29
|
+
...props,
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsx("div", {
|
|
32
|
+
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)
|
|
33
|
+
}),
|
|
34
|
+
children
|
|
35
|
+
]
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function DrawerHeader({ className, ...props }) {
|
|
41
|
+
return /*#__PURE__*/ jsx("div", {
|
|
42
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
43
|
+
"data-slot": "drawer-header",
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function DrawerBody({ className, ...props }) {
|
|
48
|
+
return /*#__PURE__*/ jsx("main", {
|
|
49
|
+
className: cn("overflow-auto px-4 py-2", className),
|
|
50
|
+
"data-slot": "drawer-body",
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function DrawerFooter({ className, ...props }) {
|
|
55
|
+
return /*#__PURE__*/ jsx("div", {
|
|
56
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
57
|
+
"data-slot": "drawer-footer",
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function DrawerTitle({ className, ...props }) {
|
|
62
|
+
return /*#__PURE__*/ jsx(Drawer.Title, {
|
|
63
|
+
className: cn("font-semibold text-foreground", className),
|
|
64
|
+
"data-slot": "drawer-title",
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function DrawerDescription({ className, ...props }) {
|
|
69
|
+
return /*#__PURE__*/ jsx(Drawer.Description, {
|
|
70
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
71
|
+
"data-slot": "drawer-description",
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function DrawerClose({ className, size, variant = "outline", ...props }) {
|
|
76
|
+
return /*#__PURE__*/ jsx(Drawer.Close, {
|
|
77
|
+
className: buttonVariants({
|
|
78
|
+
className,
|
|
79
|
+
size,
|
|
80
|
+
variant
|
|
81
|
+
}),
|
|
82
|
+
"data-slot": "drawer-close",
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export { drawer_Drawer as Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
|
|
@@ -1,2 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DropdownMenuLabel:()=>DropdownMenuLabel,DropdownMenuArrow:()=>DropdownMenuArrow,DropdownMenuTrigger:()=>DropdownMenuTrigger,DropdownMenuItem:()=>DropdownMenuItem,DropdownMenuShortcut:()=>DropdownMenuShortcut,DropdownMenu:()=>DropdownMenu,DropdownMenuGroup:()=>DropdownMenuGroup,DropdownMenuCheckboxItem:()=>DropdownMenuCheckboxItem,DropdownMenuSub:()=>DropdownMenuSub,DropdownMenuSubContent:()=>DropdownMenuSubContent,DropdownMenuSeparator:()=>DropdownMenuSeparator,DropdownMenuSubTrigger:()=>DropdownMenuSubTrigger,DropdownMenuRadioGroup:()=>DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>DropdownMenuRadioItem,DropdownMenuContent:()=>DropdownMenuContent});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),react_dropdown_menu_namespaceObject=require("@radix-ui/react-dropdown-menu");function DropdownMenu({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Root,{"data-slot":"dropdown-menu",...e})}function DropdownMenuTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function DropdownMenuGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Group,{"data-slot":"dropdown-menu-group",...e})}function DropdownMenuSub({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Sub,{"data-slot":"dropdown-menu-sub",...e})}function DropdownMenuRadioGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function DropdownMenuSubTrigger({children:e,className:t,inset:o,...n}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.SubTrigger,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8",t),"data-inset":o,"data-slot":"dropdown-menu-sub-trigger",...n,children:[e,(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon,{className:"ml-auto size-4"})]})}function DropdownMenuSubContent({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.SubContent,{className:(0,tailwind_variants_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"dropdown-menu-sub-content",...t})})}function DropdownMenuContent({className:e,sideOffset:t=4,...o}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Content,{className:(0,tailwind_variants_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"dropdown-menu-content",sideOffset:t,...o})})}function DropdownMenuItem({className:e,inset:t,variant:o,...n}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Item,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/dropdown-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 data-inset:pl-8 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),"data-inset":t,"data-slot":"dropdown-menu-item","data-variant":o,...n})}function DropdownMenuCheckboxItem({checked:e,children:t,className:o,...n}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.CheckboxItem,{checked:e,className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground 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 aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),"data-slot":"dropdown-menu-checkbox-item",...n,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-4"})})}),t]})}function DropdownMenuRadioItem({children:e,className:t,...o}){return(0,jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.RadioItem,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground 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 aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),"data-slot":"dropdown-menu-radio-item",...o,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.DotIcon,{className:"size-4 fill-current"})})}),e]})}function DropdownMenuLabel({className:e,inset:t,...o}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Label,{className:(0,tailwind_variants_namespaceObject.cn)("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8",e),"data-inset":t,"data-slot":"dropdown-menu-label",...o})}function DropdownMenuSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Separator,{className:(0,tailwind_variants_namespaceObject.cn)("bg-border mx-2 my-1 h-px",e),"data-slot":"dropdown-menu-separator",...t})}function DropdownMenuShortcut({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)("span",{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80 ml-auto text-xs tracking-widest",e),"data-slot":"dropdown-menu-shortcut",...t})}function DropdownMenuArrow({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Arrow,{className:(0,tailwind_variants_namespaceObject.cn)("fill-popover",e),"data-slot":"dropdown-menu-arrow",...t})}for(var __webpack_i__ in exports.DropdownMenu=__webpack_exports__.DropdownMenu,exports.DropdownMenuArrow=__webpack_exports__.DropdownMenuArrow,exports.DropdownMenuCheckboxItem=__webpack_exports__.DropdownMenuCheckboxItem,exports.DropdownMenuContent=__webpack_exports__.DropdownMenuContent,exports.DropdownMenuGroup=__webpack_exports__.DropdownMenuGroup,exports.DropdownMenuItem=__webpack_exports__.DropdownMenuItem,exports.DropdownMenuLabel=__webpack_exports__.DropdownMenuLabel,exports.DropdownMenuRadioGroup=__webpack_exports__.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=__webpack_exports__.DropdownMenuRadioItem,exports.DropdownMenuSeparator=__webpack_exports__.DropdownMenuSeparator,exports.DropdownMenuShortcut=__webpack_exports__.DropdownMenuShortcut,exports.DropdownMenuSub=__webpack_exports__.DropdownMenuSub,exports.DropdownMenuSubContent=__webpack_exports__.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=__webpack_exports__.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=__webpack_exports__.DropdownMenuTrigger,__webpack_exports__)-1===["DropdownMenu","DropdownMenuArrow","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
DropdownMenuLabel: ()=>DropdownMenuLabel,
|
|
29
|
+
DropdownMenuArrow: ()=>DropdownMenuArrow,
|
|
30
|
+
DropdownMenuTrigger: ()=>DropdownMenuTrigger,
|
|
31
|
+
DropdownMenuItem: ()=>DropdownMenuItem,
|
|
32
|
+
DropdownMenuShortcut: ()=>DropdownMenuShortcut,
|
|
33
|
+
DropdownMenu: ()=>DropdownMenu,
|
|
34
|
+
DropdownMenuGroup: ()=>DropdownMenuGroup,
|
|
35
|
+
DropdownMenuCheckboxItem: ()=>DropdownMenuCheckboxItem,
|
|
36
|
+
DropdownMenuSub: ()=>DropdownMenuSub,
|
|
37
|
+
DropdownMenuSubContent: ()=>DropdownMenuSubContent,
|
|
38
|
+
DropdownMenuSeparator: ()=>DropdownMenuSeparator,
|
|
39
|
+
DropdownMenuSubTrigger: ()=>DropdownMenuSubTrigger,
|
|
40
|
+
DropdownMenuRadioGroup: ()=>DropdownMenuRadioGroup,
|
|
41
|
+
DropdownMenuRadioItem: ()=>DropdownMenuRadioItem,
|
|
42
|
+
DropdownMenuContent: ()=>DropdownMenuContent
|
|
43
|
+
});
|
|
44
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
46
|
+
const react_dropdown_menu_namespaceObject = require("@radix-ui/react-dropdown-menu");
|
|
47
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
48
|
+
function DropdownMenu({ ...props }) {
|
|
49
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Root, {
|
|
50
|
+
"data-slot": "dropdown-menu",
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
55
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Trigger, {
|
|
56
|
+
"data-slot": "dropdown-menu-trigger",
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function DropdownMenuGroup({ ...props }) {
|
|
61
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Group, {
|
|
62
|
+
"data-slot": "dropdown-menu-group",
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function DropdownMenuSub({ ...props }) {
|
|
67
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Sub, {
|
|
68
|
+
"data-slot": "dropdown-menu-sub",
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
73
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.RadioGroup, {
|
|
74
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function DropdownMenuSubTrigger({ children, className, inset, ...props }) {
|
|
79
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.SubTrigger, {
|
|
80
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
81
|
+
"data-inset": inset,
|
|
82
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
83
|
+
...props,
|
|
84
|
+
children: [
|
|
85
|
+
children,
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {
|
|
87
|
+
className: "ml-auto size-4"
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
93
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Portal, {
|
|
94
|
+
"data-slot": "dropdown-menu-portal",
|
|
95
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.SubContent, {
|
|
96
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
97
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
98
|
+
...props
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
103
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Portal, {
|
|
104
|
+
"data-slot": "dropdown-menu-portal",
|
|
105
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Content, {
|
|
106
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
107
|
+
"data-slot": "dropdown-menu-content",
|
|
108
|
+
sideOffset: sideOffset,
|
|
109
|
+
...props
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function DropdownMenuItem({ className, inset, variant, ...props }) {
|
|
114
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Item, {
|
|
115
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
116
|
+
"data-inset": inset,
|
|
117
|
+
"data-slot": "dropdown-menu-item",
|
|
118
|
+
"data-variant": variant,
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function DropdownMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
123
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.CheckboxItem, {
|
|
124
|
+
checked: checked,
|
|
125
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
126
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
127
|
+
...props,
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
130
|
+
className: "absolute left-2 flex items-center justify-center",
|
|
131
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.ItemIndicator, {
|
|
132
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon, {
|
|
133
|
+
className: "size-4"
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
}),
|
|
137
|
+
children
|
|
138
|
+
]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function DropdownMenuRadioItem({ children, className, ...props }) {
|
|
142
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dropdown_menu_namespaceObject.RadioItem, {
|
|
143
|
+
className: (0, tailwind_variants_namespaceObject.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),
|
|
144
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
145
|
+
...props,
|
|
146
|
+
children: [
|
|
147
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
148
|
+
className: "absolute left-2 flex items-center justify-center",
|
|
149
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.ItemIndicator, {
|
|
150
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.DotIcon, {
|
|
151
|
+
className: "size-4 fill-current"
|
|
152
|
+
})
|
|
153
|
+
})
|
|
154
|
+
}),
|
|
155
|
+
children
|
|
156
|
+
]
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
160
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Label, {
|
|
161
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className),
|
|
162
|
+
"data-inset": inset,
|
|
163
|
+
"data-slot": "dropdown-menu-label",
|
|
164
|
+
...props
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
168
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Separator, {
|
|
169
|
+
className: (0, tailwind_variants_namespaceObject.cn)("mx-2 my-1 h-px bg-border", className),
|
|
170
|
+
"data-slot": "dropdown-menu-separator",
|
|
171
|
+
...props
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
175
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
176
|
+
className: (0, tailwind_variants_namespaceObject.cn)("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/dropdown-menu-item:text-destructive/80", className),
|
|
177
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
178
|
+
...props
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function DropdownMenuArrow({ className, ...props }) {
|
|
182
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dropdown_menu_namespaceObject.Arrow, {
|
|
183
|
+
className: (0, tailwind_variants_namespaceObject.cn)("fill-popover", className),
|
|
184
|
+
"data-slot": "dropdown-menu-arrow",
|
|
185
|
+
...props
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
exports.DropdownMenu = __webpack_exports__.DropdownMenu;
|
|
189
|
+
exports.DropdownMenuArrow = __webpack_exports__.DropdownMenuArrow;
|
|
190
|
+
exports.DropdownMenuCheckboxItem = __webpack_exports__.DropdownMenuCheckboxItem;
|
|
191
|
+
exports.DropdownMenuContent = __webpack_exports__.DropdownMenuContent;
|
|
192
|
+
exports.DropdownMenuGroup = __webpack_exports__.DropdownMenuGroup;
|
|
193
|
+
exports.DropdownMenuItem = __webpack_exports__.DropdownMenuItem;
|
|
194
|
+
exports.DropdownMenuLabel = __webpack_exports__.DropdownMenuLabel;
|
|
195
|
+
exports.DropdownMenuRadioGroup = __webpack_exports__.DropdownMenuRadioGroup;
|
|
196
|
+
exports.DropdownMenuRadioItem = __webpack_exports__.DropdownMenuRadioItem;
|
|
197
|
+
exports.DropdownMenuSeparator = __webpack_exports__.DropdownMenuSeparator;
|
|
198
|
+
exports.DropdownMenuShortcut = __webpack_exports__.DropdownMenuShortcut;
|
|
199
|
+
exports.DropdownMenuSub = __webpack_exports__.DropdownMenuSub;
|
|
200
|
+
exports.DropdownMenuSubContent = __webpack_exports__.DropdownMenuSubContent;
|
|
201
|
+
exports.DropdownMenuSubTrigger = __webpack_exports__.DropdownMenuSubTrigger;
|
|
202
|
+
exports.DropdownMenuTrigger = __webpack_exports__.DropdownMenuTrigger;
|
|
203
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
204
|
+
"DropdownMenu",
|
|
205
|
+
"DropdownMenuArrow",
|
|
206
|
+
"DropdownMenuCheckboxItem",
|
|
207
|
+
"DropdownMenuContent",
|
|
208
|
+
"DropdownMenuGroup",
|
|
209
|
+
"DropdownMenuItem",
|
|
210
|
+
"DropdownMenuLabel",
|
|
211
|
+
"DropdownMenuRadioGroup",
|
|
212
|
+
"DropdownMenuRadioItem",
|
|
213
|
+
"DropdownMenuSeparator",
|
|
214
|
+
"DropdownMenuShortcut",
|
|
215
|
+
"DropdownMenuSub",
|
|
216
|
+
"DropdownMenuSubContent",
|
|
217
|
+
"DropdownMenuSubTrigger",
|
|
218
|
+
"DropdownMenuTrigger"
|
|
219
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
220
|
+
Object.defineProperty(exports, '__esModule', {
|
|
221
|
+
value: true
|
|
222
|
+
});
|