@codefast/ui 0.3.9 → 0.3.10
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 +11 -0
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +126 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +74 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +12 -19
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +9 -9
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +8 -8
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +10 -12
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +10 -12
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.d.ts +3 -3
- 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 +18 -1
- 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 +8 -12
- 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 +130 -131
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +385 -38
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CollapsibleContent, CollapsibleTrigger, Root } from "@radix-ui/react-collapsible";
|
|
4
|
+
function Collapsible({ ...props }) {
|
|
5
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
6
|
+
"data-slot": "collapsible",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function collapsible_CollapsibleTrigger({ ...props }) {
|
|
11
|
+
return /*#__PURE__*/ jsx(CollapsibleTrigger, {
|
|
12
|
+
"data-slot": "collapsible-trigger",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function collapsible_CollapsibleContent({ ...props }) {
|
|
17
|
+
return /*#__PURE__*/ jsx(CollapsibleContent, {
|
|
18
|
+
"data-slot": "collapsible-content",
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { Collapsible, collapsible_CollapsibleContent as CollapsibleContent, collapsible_CollapsibleTrigger as CollapsibleTrigger };
|
|
@@ -1,2 +1,168 @@
|
|
|
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
|
+
Command: ()=>Command,
|
|
29
|
+
CommandEmpty: ()=>CommandEmpty,
|
|
30
|
+
CommandGroup: ()=>CommandGroup,
|
|
31
|
+
CommandShortcut: ()=>CommandShortcut,
|
|
32
|
+
CommandSeparator: ()=>CommandSeparator,
|
|
33
|
+
CommandDialog: ()=>CommandDialog,
|
|
34
|
+
CommandInput: ()=>CommandInput,
|
|
35
|
+
CommandItem: ()=>CommandItem,
|
|
36
|
+
CommandList: ()=>CommandList,
|
|
37
|
+
CommandLoading: ()=>CommandLoading
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
41
|
+
const react_visually_hidden_namespaceObject = require("@radix-ui/react-visually-hidden");
|
|
42
|
+
const external_cmdk_namespaceObject = require("cmdk");
|
|
43
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
44
|
+
const external_dialog_cjs_namespaceObject = require("./dialog.cjs");
|
|
45
|
+
function Command({ className, ...props }) {
|
|
46
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command, {
|
|
47
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-popover text-popover-foreground flex flex-col overflow-hidden rounded-[inherit] outline-hidden', className),
|
|
48
|
+
"data-slot": "command",
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function CommandDialog({ children, ...props }) {
|
|
53
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dialog_cjs_namespaceObject.Dialog, {
|
|
54
|
+
"data-slot": "command-dialog",
|
|
55
|
+
...props,
|
|
56
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dialog_cjs_namespaceObject.DialogContent, {
|
|
57
|
+
className: "rounded-t-lg sm:rounded-lg",
|
|
58
|
+
"data-slot": "command-dialog-content",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_visually_hidden_namespaceObject.VisuallyHidden, {
|
|
61
|
+
children: [
|
|
62
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dialog_cjs_namespaceObject.DialogTitle, {
|
|
63
|
+
children: "Search command"
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dialog_cjs_namespaceObject.DialogDescription, {
|
|
66
|
+
children: "Use the search bar to find and select the desired command."
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Command, {
|
|
71
|
+
className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12",
|
|
72
|
+
children: children
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function CommandInput({ className, ...props }) {
|
|
79
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
80
|
+
"cmdk-input-wrapper": true,
|
|
81
|
+
className: "flex items-center gap-2 border-b px-3",
|
|
82
|
+
"data-slot": "command-input-wrapper",
|
|
83
|
+
children: [
|
|
84
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.SearchIcon, {
|
|
85
|
+
className: "size-4 shrink-0 opacity-50"
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Input, {
|
|
88
|
+
className: (0, tailwind_variants_namespaceObject.cn)('placeholder:text-muted-foreground flex h-10 w-full text-base outline-hidden disabled:opacity-50 md:text-sm', className),
|
|
89
|
+
"data-slot": "command-input",
|
|
90
|
+
...props
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function CommandList({ className, ...props }) {
|
|
96
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.List, {
|
|
97
|
+
className: (0, tailwind_variants_namespaceObject.cn)('max-h-75 overflow-x-hidden overflow-y-auto', className),
|
|
98
|
+
"data-slot": "command-list",
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function CommandEmpty({ className, ...props }) {
|
|
103
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Empty, {
|
|
104
|
+
className: (0, tailwind_variants_namespaceObject.cn)('py-6 text-center text-sm', className),
|
|
105
|
+
"data-slot": "command-empty",
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function CommandGroup({ className, ...props }) {
|
|
110
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Group, {
|
|
111
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className),
|
|
112
|
+
"data-slot": "command-group",
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function CommandSeparator({ className, ...props }) {
|
|
117
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Separator, {
|
|
118
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-border -mx-1 h-px', className),
|
|
119
|
+
"data-slot": "command-separator",
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function CommandItem({ className, ...props }) {
|
|
124
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Item, {
|
|
125
|
+
className: (0, tailwind_variants_namespaceObject.cn)("aria-selected:bg-accent aria-selected:text-accent-foreground group/command-item [&_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 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
126
|
+
"data-slot": "command-item",
|
|
127
|
+
...props
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function CommandLoading({ className, ...props }) {
|
|
131
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Loading, {
|
|
132
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex justify-center p-2', className),
|
|
133
|
+
"data-slot": "command-loading",
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function CommandShortcut({ className, ...props }) {
|
|
138
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
139
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground ml-auto text-xs tracking-widest', className),
|
|
140
|
+
"data-slot": "command-shortcut",
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
exports.Command = __webpack_exports__.Command;
|
|
145
|
+
exports.CommandDialog = __webpack_exports__.CommandDialog;
|
|
146
|
+
exports.CommandEmpty = __webpack_exports__.CommandEmpty;
|
|
147
|
+
exports.CommandGroup = __webpack_exports__.CommandGroup;
|
|
148
|
+
exports.CommandInput = __webpack_exports__.CommandInput;
|
|
149
|
+
exports.CommandItem = __webpack_exports__.CommandItem;
|
|
150
|
+
exports.CommandList = __webpack_exports__.CommandList;
|
|
151
|
+
exports.CommandLoading = __webpack_exports__.CommandLoading;
|
|
152
|
+
exports.CommandSeparator = __webpack_exports__.CommandSeparator;
|
|
153
|
+
exports.CommandShortcut = __webpack_exports__.CommandShortcut;
|
|
154
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
155
|
+
"Command",
|
|
156
|
+
"CommandDialog",
|
|
157
|
+
"CommandEmpty",
|
|
158
|
+
"CommandGroup",
|
|
159
|
+
"CommandInput",
|
|
160
|
+
"CommandItem",
|
|
161
|
+
"CommandList",
|
|
162
|
+
"CommandLoading",
|
|
163
|
+
"CommandSeparator",
|
|
164
|
+
"CommandShortcut"
|
|
165
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
166
|
+
Object.defineProperty(exports, '__esModule', {
|
|
167
|
+
value: true
|
|
168
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import { Command as CommandPrimitive } from
|
|
3
|
-
import { Dialog } from
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
+
import { Dialog } from './dialog';
|
|
4
4
|
type CommandProps = ComponentProps<typeof CommandPrimitive>;
|
|
5
5
|
declare function Command({ className, ...props }: CommandProps): JSX.Element;
|
|
6
6
|
type CommandDialogProps = ComponentProps<typeof Dialog>;
|
|
@@ -19,7 +19,7 @@ type CommandItemProps = ComponentProps<typeof CommandPrimitive.Item>;
|
|
|
19
19
|
declare function CommandItem({ className, ...props }: CommandItemProps): JSX.Element;
|
|
20
20
|
type CommandLoadingProps = ComponentProps<typeof CommandPrimitive.Loading>;
|
|
21
21
|
declare function CommandLoading({ className, ...props }: CommandLoadingProps): JSX.Element;
|
|
22
|
-
type CommandShortcutProps = ComponentProps<
|
|
22
|
+
type CommandShortcutProps = ComponentProps<'span'>;
|
|
23
23
|
declare function CommandShortcut({ className, ...props }: CommandShortcutProps): JSX.Element;
|
|
24
24
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, };
|
|
25
25
|
export type { CommandDialogProps, CommandEmptyProps, CommandGroupProps, CommandInputProps, CommandItemProps, CommandListProps, CommandLoadingProps, CommandProps, CommandSeparatorProps, CommandShortcutProps, };
|
|
@@ -1,2 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
5
|
+
import { Command } from "cmdk";
|
|
6
|
+
import { SearchIcon } from "lucide-react";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./dialog.js";
|
|
8
|
+
function command_Command({ className, ...props }) {
|
|
9
|
+
return /*#__PURE__*/ jsx(Command, {
|
|
10
|
+
className: cn('bg-popover text-popover-foreground flex flex-col overflow-hidden rounded-[inherit] outline-hidden', className),
|
|
11
|
+
"data-slot": "command",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function CommandDialog({ children, ...props }) {
|
|
16
|
+
return /*#__PURE__*/ jsx(Dialog, {
|
|
17
|
+
"data-slot": "command-dialog",
|
|
18
|
+
...props,
|
|
19
|
+
children: /*#__PURE__*/ jsxs(DialogContent, {
|
|
20
|
+
className: "rounded-t-lg sm:rounded-lg",
|
|
21
|
+
"data-slot": "command-dialog-content",
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ jsxs(VisuallyHidden, {
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsx(DialogTitle, {
|
|
26
|
+
children: "Search command"
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsx(DialogDescription, {
|
|
29
|
+
children: "Use the search bar to find and select the desired command."
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ jsx(command_Command, {
|
|
34
|
+
className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12",
|
|
35
|
+
children: children
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function CommandInput({ className, ...props }) {
|
|
42
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
43
|
+
"cmdk-input-wrapper": true,
|
|
44
|
+
className: "flex items-center gap-2 border-b px-3",
|
|
45
|
+
"data-slot": "command-input-wrapper",
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ jsx(SearchIcon, {
|
|
48
|
+
className: "size-4 shrink-0 opacity-50"
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ jsx(Command.Input, {
|
|
51
|
+
className: cn('placeholder:text-muted-foreground flex h-10 w-full text-base outline-hidden disabled:opacity-50 md:text-sm', className),
|
|
52
|
+
"data-slot": "command-input",
|
|
53
|
+
...props
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function CommandList({ className, ...props }) {
|
|
59
|
+
return /*#__PURE__*/ jsx(Command.List, {
|
|
60
|
+
className: cn('max-h-75 overflow-x-hidden overflow-y-auto', className),
|
|
61
|
+
"data-slot": "command-list",
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function CommandEmpty({ className, ...props }) {
|
|
66
|
+
return /*#__PURE__*/ jsx(Command.Empty, {
|
|
67
|
+
className: cn('py-6 text-center text-sm', className),
|
|
68
|
+
"data-slot": "command-empty",
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function CommandGroup({ className, ...props }) {
|
|
73
|
+
return /*#__PURE__*/ jsx(Command.Group, {
|
|
74
|
+
className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className),
|
|
75
|
+
"data-slot": "command-group",
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function CommandSeparator({ className, ...props }) {
|
|
80
|
+
return /*#__PURE__*/ jsx(Command.Separator, {
|
|
81
|
+
className: cn('bg-border -mx-1 h-px', className),
|
|
82
|
+
"data-slot": "command-separator",
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function CommandItem({ className, ...props }) {
|
|
87
|
+
return /*#__PURE__*/ jsx(Command.Item, {
|
|
88
|
+
className: cn("aria-selected:bg-accent aria-selected:text-accent-foreground group/command-item [&_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 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
89
|
+
"data-slot": "command-item",
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function CommandLoading({ className, ...props }) {
|
|
94
|
+
return /*#__PURE__*/ jsx(Command.Loading, {
|
|
95
|
+
className: cn('flex justify-center p-2', className),
|
|
96
|
+
"data-slot": "command-loading",
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function CommandShortcut({ className, ...props }) {
|
|
101
|
+
return /*#__PURE__*/ jsx("span", {
|
|
102
|
+
className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className),
|
|
103
|
+
"data-slot": "command-shortcut",
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
export { command_Command as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut };
|
|
@@ -1,2 +1,219 @@
|
|
|
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 n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__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__,{ContextMenuCheckboxItem:()=>ContextMenuCheckboxItem,ContextMenuContent:()=>ContextMenuContent,ContextMenuRadioItem:()=>ContextMenuRadioItem,ContextMenuGroup:()=>ContextMenuGroup,ContextMenuSubTrigger:()=>ContextMenuSubTrigger,ContextMenuTrigger:()=>ContextMenuTrigger,ContextMenuSubContent:()=>ContextMenuSubContent,ContextMenuArrow:()=>ContextMenuArrow,ContextMenu:()=>ContextMenu,ContextMenuItem:()=>ContextMenuItem,ContextMenuShortcut:()=>ContextMenuShortcut,ContextMenuLabel:()=>ContextMenuLabel,ContextMenuRadioGroup:()=>ContextMenuRadioGroup,ContextMenuSeparator:()=>ContextMenuSeparator,ContextMenuSub:()=>ContextMenuSub});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),react_context_menu_namespaceObject=require("@radix-ui/react-context-menu");function ContextMenu({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Root,{"data-slot":"context-menu",...e})}function ContextMenuTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Trigger,{"data-slot":"context-menu-trigger",...e})}function ContextMenuGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Group,{"data-slot":"context-menu-group",...e})}function ContextMenuSub({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Sub,{"data-slot":"context-menu-sub",...e})}function ContextMenuRadioGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function ContextMenuSubTrigger({children:e,className:t,inset:n,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_context_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 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),"data-inset":n,"data-slot":"context-menu-sub-trigger",...a,children:[e,(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon,{className:"ml-auto size-4"})]})}function ContextMenuSubContent({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_context_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":"context-menu-sub-content",...t})})}function ContextMenuContent({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_context_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 ease-ui z-50 min-w-32 rounded-lg border p-1 shadow-lg",e),"data-slot":"context-menu-content",...t})})}function ContextMenuItem({className:e,inset:t,variant:n,...a}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Item,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/context-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":"context-menu-item","data-variant":n,...a})}function ContextMenuCheckboxItem({checked:e,children:t,className:n,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.CheckboxItem,{checked:e,className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/context-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",n),"data-slot":"context-menu-checkbox-item",...a,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-4"})})}),t]})}function ContextMenuRadioItem({children:e,className:t,...n}){return(0,jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.RadioItem,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/context-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":"context-menu-radio-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_context_menu_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.DotIcon,{className:"size-4 fill-current"})})}),e]})}function ContextMenuLabel({className:e,inset:t,...n}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_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":"context-menu-label",...n})}function ContextMenuSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Separator,{className:(0,tailwind_variants_namespaceObject.cn)("bg-border mx-2 my-1 h-px",e),"data-slot":"context-menu-separator",...t})}function ContextMenuShortcut({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)("span",{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest",e),"data-slot":"context-menu-shortcut",...t})}function ContextMenuArrow({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Arrow,{className:(0,tailwind_variants_namespaceObject.cn)("fill-popover",e),"data-slot":"context-menu-arrow",...t})}for(var __webpack_i__ in exports.ContextMenu=__webpack_exports__.ContextMenu,exports.ContextMenuArrow=__webpack_exports__.ContextMenuArrow,exports.ContextMenuCheckboxItem=__webpack_exports__.ContextMenuCheckboxItem,exports.ContextMenuContent=__webpack_exports__.ContextMenuContent,exports.ContextMenuGroup=__webpack_exports__.ContextMenuGroup,exports.ContextMenuItem=__webpack_exports__.ContextMenuItem,exports.ContextMenuLabel=__webpack_exports__.ContextMenuLabel,exports.ContextMenuRadioGroup=__webpack_exports__.ContextMenuRadioGroup,exports.ContextMenuRadioItem=__webpack_exports__.ContextMenuRadioItem,exports.ContextMenuSeparator=__webpack_exports__.ContextMenuSeparator,exports.ContextMenuShortcut=__webpack_exports__.ContextMenuShortcut,exports.ContextMenuSub=__webpack_exports__.ContextMenuSub,exports.ContextMenuSubContent=__webpack_exports__.ContextMenuSubContent,exports.ContextMenuSubTrigger=__webpack_exports__.ContextMenuSubTrigger,exports.ContextMenuTrigger=__webpack_exports__.ContextMenuTrigger,__webpack_exports__)-1===["ContextMenu","ContextMenuArrow","ContextMenuCheckboxItem","ContextMenuContent","ContextMenuGroup","ContextMenuItem","ContextMenuLabel","ContextMenuRadioGroup","ContextMenuRadioItem","ContextMenuSeparator","ContextMenuShortcut","ContextMenuSub","ContextMenuSubContent","ContextMenuSubTrigger","ContextMenuTrigger"].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
|
+
ContextMenuCheckboxItem: ()=>ContextMenuCheckboxItem,
|
|
29
|
+
ContextMenuContent: ()=>ContextMenuContent,
|
|
30
|
+
ContextMenuRadioItem: ()=>ContextMenuRadioItem,
|
|
31
|
+
ContextMenuGroup: ()=>ContextMenuGroup,
|
|
32
|
+
ContextMenuSubTrigger: ()=>ContextMenuSubTrigger,
|
|
33
|
+
ContextMenuTrigger: ()=>ContextMenuTrigger,
|
|
34
|
+
ContextMenuSubContent: ()=>ContextMenuSubContent,
|
|
35
|
+
ContextMenuArrow: ()=>ContextMenuArrow,
|
|
36
|
+
ContextMenu: ()=>ContextMenu,
|
|
37
|
+
ContextMenuItem: ()=>ContextMenuItem,
|
|
38
|
+
ContextMenuShortcut: ()=>ContextMenuShortcut,
|
|
39
|
+
ContextMenuLabel: ()=>ContextMenuLabel,
|
|
40
|
+
ContextMenuRadioGroup: ()=>ContextMenuRadioGroup,
|
|
41
|
+
ContextMenuSeparator: ()=>ContextMenuSeparator,
|
|
42
|
+
ContextMenuSub: ()=>ContextMenuSub
|
|
43
|
+
});
|
|
44
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
46
|
+
const react_context_menu_namespaceObject = require("@radix-ui/react-context-menu");
|
|
47
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
48
|
+
function ContextMenu({ ...props }) {
|
|
49
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Root, {
|
|
50
|
+
"data-slot": "context-menu",
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function ContextMenuTrigger({ ...props }) {
|
|
55
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Trigger, {
|
|
56
|
+
"data-slot": "context-menu-trigger",
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function ContextMenuGroup({ ...props }) {
|
|
61
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Group, {
|
|
62
|
+
"data-slot": "context-menu-group",
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function ContextMenuSub({ ...props }) {
|
|
67
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Sub, {
|
|
68
|
+
"data-slot": "context-menu-sub",
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
73
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.RadioGroup, {
|
|
74
|
+
"data-slot": "context-menu-radio-group",
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function ContextMenuSubTrigger({ children, className, inset, ...props }) {
|
|
79
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.SubTrigger, {
|
|
80
|
+
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 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
81
|
+
"data-inset": inset,
|
|
82
|
+
"data-slot": "context-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 ContextMenuSubContent({ className, ...props }) {
|
|
93
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Portal, {
|
|
94
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.SubContent, {
|
|
95
|
+
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 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg', className),
|
|
96
|
+
"data-slot": "context-menu-sub-content",
|
|
97
|
+
...props
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function ContextMenuContent({ className, ...props }) {
|
|
102
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Portal, {
|
|
103
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Content, {
|
|
104
|
+
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 ease-ui z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-lg', className),
|
|
105
|
+
"data-slot": "context-menu-content",
|
|
106
|
+
...props
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function ContextMenuItem({ className, inset, variant, ...props }) {
|
|
111
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Item, {
|
|
112
|
+
className: (0, tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/context-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", className),
|
|
113
|
+
"data-inset": inset,
|
|
114
|
+
"data-slot": "context-menu-item",
|
|
115
|
+
"data-variant": variant,
|
|
116
|
+
...props
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function ContextMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
120
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.CheckboxItem, {
|
|
121
|
+
checked: checked,
|
|
122
|
+
className: (0, tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/context-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", className),
|
|
123
|
+
"data-slot": "context-menu-checkbox-item",
|
|
124
|
+
...props,
|
|
125
|
+
children: [
|
|
126
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
127
|
+
className: "absolute left-2 flex items-center justify-center",
|
|
128
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.ItemIndicator, {
|
|
129
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon, {
|
|
130
|
+
className: "size-4"
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
}),
|
|
134
|
+
children
|
|
135
|
+
]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function ContextMenuRadioItem({ children, className, ...props }) {
|
|
139
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_context_menu_namespaceObject.RadioItem, {
|
|
140
|
+
className: (0, tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground group/context-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", className),
|
|
141
|
+
"data-slot": "context-menu-radio-item",
|
|
142
|
+
...props,
|
|
143
|
+
children: [
|
|
144
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
145
|
+
className: "absolute left-2 flex items-center justify-center",
|
|
146
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.ItemIndicator, {
|
|
147
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.DotIcon, {
|
|
148
|
+
className: "size-4 fill-current"
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
}),
|
|
152
|
+
children
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
157
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Label, {
|
|
158
|
+
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),
|
|
159
|
+
"data-inset": inset,
|
|
160
|
+
"data-slot": "context-menu-label",
|
|
161
|
+
...props
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
165
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Separator, {
|
|
166
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-border mx-2 my-1 h-px', className),
|
|
167
|
+
"data-slot": "context-menu-separator",
|
|
168
|
+
...props
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
172
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
173
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest', className),
|
|
174
|
+
"data-slot": "context-menu-shortcut",
|
|
175
|
+
...props
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function ContextMenuArrow({ className, ...props }) {
|
|
179
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_context_menu_namespaceObject.Arrow, {
|
|
180
|
+
className: (0, tailwind_variants_namespaceObject.cn)('fill-popover', className),
|
|
181
|
+
"data-slot": "context-menu-arrow",
|
|
182
|
+
...props
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
exports.ContextMenu = __webpack_exports__.ContextMenu;
|
|
186
|
+
exports.ContextMenuArrow = __webpack_exports__.ContextMenuArrow;
|
|
187
|
+
exports.ContextMenuCheckboxItem = __webpack_exports__.ContextMenuCheckboxItem;
|
|
188
|
+
exports.ContextMenuContent = __webpack_exports__.ContextMenuContent;
|
|
189
|
+
exports.ContextMenuGroup = __webpack_exports__.ContextMenuGroup;
|
|
190
|
+
exports.ContextMenuItem = __webpack_exports__.ContextMenuItem;
|
|
191
|
+
exports.ContextMenuLabel = __webpack_exports__.ContextMenuLabel;
|
|
192
|
+
exports.ContextMenuRadioGroup = __webpack_exports__.ContextMenuRadioGroup;
|
|
193
|
+
exports.ContextMenuRadioItem = __webpack_exports__.ContextMenuRadioItem;
|
|
194
|
+
exports.ContextMenuSeparator = __webpack_exports__.ContextMenuSeparator;
|
|
195
|
+
exports.ContextMenuShortcut = __webpack_exports__.ContextMenuShortcut;
|
|
196
|
+
exports.ContextMenuSub = __webpack_exports__.ContextMenuSub;
|
|
197
|
+
exports.ContextMenuSubContent = __webpack_exports__.ContextMenuSubContent;
|
|
198
|
+
exports.ContextMenuSubTrigger = __webpack_exports__.ContextMenuSubTrigger;
|
|
199
|
+
exports.ContextMenuTrigger = __webpack_exports__.ContextMenuTrigger;
|
|
200
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
201
|
+
"ContextMenu",
|
|
202
|
+
"ContextMenuArrow",
|
|
203
|
+
"ContextMenuCheckboxItem",
|
|
204
|
+
"ContextMenuContent",
|
|
205
|
+
"ContextMenuGroup",
|
|
206
|
+
"ContextMenuItem",
|
|
207
|
+
"ContextMenuLabel",
|
|
208
|
+
"ContextMenuRadioGroup",
|
|
209
|
+
"ContextMenuRadioItem",
|
|
210
|
+
"ContextMenuSeparator",
|
|
211
|
+
"ContextMenuShortcut",
|
|
212
|
+
"ContextMenuSub",
|
|
213
|
+
"ContextMenuSubContent",
|
|
214
|
+
"ContextMenuSubTrigger",
|
|
215
|
+
"ContextMenuTrigger"
|
|
216
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
217
|
+
Object.defineProperty(exports, '__esModule', {
|
|
218
|
+
value: true
|
|
219
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as ContextMenuPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
3
3
|
type ContextMenuProps = ComponentProps<typeof ContextMenuPrimitive.Root>;
|
|
4
4
|
declare function ContextMenu({ ...props }: ContextMenuProps): JSX.Element;
|
|
5
5
|
type ContextMenuTriggerProps = ComponentProps<typeof ContextMenuPrimitive.Trigger>;
|
|
@@ -20,7 +20,7 @@ type ContextMenuContentProps = ComponentProps<typeof ContextMenuPrimitive.Conten
|
|
|
20
20
|
declare function ContextMenuContent({ className, ...props }: ContextMenuContentProps): JSX.Element;
|
|
21
21
|
interface ContextMenuItemProps extends ComponentProps<typeof ContextMenuPrimitive.Item> {
|
|
22
22
|
inset?: boolean;
|
|
23
|
-
variant?:
|
|
23
|
+
variant?: 'default' | 'destructive';
|
|
24
24
|
}
|
|
25
25
|
declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenuItemProps): JSX.Element;
|
|
26
26
|
type ContextMenuCheckboxItemProps = ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>;
|
|
@@ -33,7 +33,7 @@ interface ContextMenuLabelProps extends ComponentProps<typeof ContextMenuPrimiti
|
|
|
33
33
|
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuLabelProps): JSX.Element;
|
|
34
34
|
type ContextMenuSeparatorProps = ComponentProps<typeof ContextMenuPrimitive.Separator>;
|
|
35
35
|
declare function ContextMenuSeparator({ className, ...props }: ContextMenuSeparatorProps): JSX.Element;
|
|
36
|
-
type ContextMenuShortcutProps = ComponentProps<
|
|
36
|
+
type ContextMenuShortcutProps = ComponentProps<'span'>;
|
|
37
37
|
declare function ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): JSX.Element;
|
|
38
38
|
type ContextMenuArrowProps = ComponentProps<typeof ContextMenuPrimitive.Arrow>;
|
|
39
39
|
declare function ContextMenuArrow({ className, ...props }: ContextMenuArrowProps): JSX.Element;
|