@pixpilot/shadcn 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.cjs +25 -1
- package/dist/components/index.cjs +30 -1
- package/dist/components/index.js +30 -1
- package/dist/components/ui/OrContinueWithSeparator.cjs +30 -1
- package/dist/components/ui/OrContinueWithSeparator.js +27 -1
- package/dist/components/ui/alert-dialog.cjs +101 -1
- package/dist/components/ui/alert-dialog.js +87 -1
- package/dist/components/ui/alert.cjs +45 -1
- package/dist/components/ui/alert.d.cts +4 -4
- package/dist/components/ui/alert.js +39 -1
- package/dist/components/ui/avatar.cjs +37 -1
- package/dist/components/ui/avatar.js +31 -1
- package/dist/components/ui/badge.cjs +33 -1
- package/dist/components/ui/badge.js +27 -1
- package/dist/components/ui/button.cjs +52 -1
- package/dist/components/ui/button.js +46 -1
- package/dist/components/ui/calendar.cjs +113 -1
- package/dist/components/ui/calendar.js +107 -1
- package/dist/components/ui/card.cjs +67 -1
- package/dist/components/ui/card.js +58 -1
- package/dist/components/ui/checkbox.cjs +31 -1
- package/dist/components/ui/checkbox.js +26 -1
- package/dist/components/ui/command.cjs +104 -1
- package/dist/components/ui/command.js +91 -1
- package/dist/components/ui/dialog.cjs +102 -1
- package/dist/components/ui/dialog.js +88 -1
- package/dist/components/ui/dropdown-menu.cjs +144 -1
- package/dist/components/ui/dropdown-menu.js +125 -1
- package/dist/components/ui/file-upload.cjs +926 -1
- package/dist/components/ui/file-upload.js +910 -1
- package/dist/components/ui/form.cjs +101 -1
- package/dist/components/ui/form.js +89 -1
- package/dist/components/ui/index.cjs +29 -1
- package/dist/components/ui/index.js +29 -1
- package/dist/components/ui/input.cjs +20 -1
- package/dist/components/ui/input.js +17 -1
- package/dist/components/ui/label.cjs +21 -1
- package/dist/components/ui/label.js +17 -1
- package/dist/components/ui/pagination.cjs +92 -1
- package/dist/components/ui/pagination.js +82 -1
- package/dist/components/ui/popover.cjs +44 -1
- package/dist/components/ui/popover.js +37 -1
- package/dist/components/ui/radio-group.cjs +36 -1
- package/dist/components/ui/radio-group.js +30 -1
- package/dist/components/ui/select.cjs +116 -1
- package/dist/components/ui/select.js +102 -1
- package/dist/components/ui/separator.cjs +23 -1
- package/dist/components/ui/separator.js +19 -1
- package/dist/components/ui/shadcn-io/tags/index.cjs +146 -1
- package/dist/components/ui/shadcn-io/tags/index.js +134 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.cjs +66 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.js +57 -1
- package/dist/components/ui/sheet.cjs +96 -1
- package/dist/components/ui/sheet.js +84 -1
- package/dist/components/ui/slider.cjs +42 -1
- package/dist/components/ui/slider.js +38 -1
- package/dist/components/ui/switch.cjs +28 -1
- package/dist/components/ui/switch.js +24 -1
- package/dist/components/ui/tabs.cjs +45 -1
- package/dist/components/ui/tabs.js +38 -1
- package/dist/components/ui/textarea.cjs +19 -1
- package/dist/components/ui/textarea.js +16 -1
- package/dist/components/ui/tooltip.cjs +45 -1
- package/dist/components/ui/tooltip.d.cts +5 -5
- package/dist/components/ui/tooltip.js +38 -1
- package/dist/index.cjs +189 -1
- package/dist/index.js +34 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/utils.cjs +13 -1
- package/dist/lib/utils.js +10 -1
- package/package.json +1 -1
|
@@ -1 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
6
|
+
require('../../lib/index.cjs');
|
|
7
|
+
const require_dialog = require('./dialog.cjs');
|
|
8
|
+
let react = require("react");
|
|
9
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
|
+
let lucide_react = require("lucide-react");
|
|
13
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
14
|
+
let cmdk = require("cmdk");
|
|
15
|
+
cmdk = require_rolldown_runtime.__toESM(cmdk);
|
|
16
|
+
|
|
17
|
+
//#region src/components/ui/command.tsx
|
|
18
|
+
function Command({ className,...props }) {
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command, {
|
|
20
|
+
"data-slot": "command",
|
|
21
|
+
className: require_utils.cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true,...props }) {
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.Dialog, {
|
|
27
|
+
...props,
|
|
28
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.DialogHeader, {
|
|
29
|
+
className: "sr-only",
|
|
30
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogTitle, { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogDescription, { children: description })]
|
|
31
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogContent, {
|
|
32
|
+
className: require_utils.cn("overflow-hidden p-0", className),
|
|
33
|
+
showCloseButton,
|
|
34
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
|
|
35
|
+
className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
36
|
+
children
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function CommandInput({ className,...props }) {
|
|
42
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
43
|
+
"data-slot": "command-input-wrapper",
|
|
44
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
45
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Input, {
|
|
46
|
+
"data-slot": "command-input",
|
|
47
|
+
className: require_utils.cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
48
|
+
...props
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function CommandList({ className,...props }) {
|
|
53
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.List, {
|
|
54
|
+
"data-slot": "command-list",
|
|
55
|
+
className: require_utils.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function CommandEmpty({ ...props }) {
|
|
60
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Empty, {
|
|
61
|
+
"data-slot": "command-empty",
|
|
62
|
+
className: "py-6 text-center text-sm",
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function CommandGroup({ className,...props }) {
|
|
67
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Group, {
|
|
68
|
+
"data-slot": "command-group",
|
|
69
|
+
className: require_utils.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),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function CommandSeparator({ className,...props }) {
|
|
74
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Separator, {
|
|
75
|
+
"data-slot": "command-separator",
|
|
76
|
+
className: require_utils.cn("bg-border -mx-1 h-px", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function CommandItem({ className,...props }) {
|
|
81
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Item, {
|
|
82
|
+
"data-slot": "command-item",
|
|
83
|
+
className: require_utils.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function CommandShortcut({ className,...props }) {
|
|
88
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
89
|
+
"data-slot": "command-shortcut",
|
|
90
|
+
className: require_utils.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
91
|
+
...props
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
exports.Command = Command;
|
|
97
|
+
exports.CommandDialog = CommandDialog;
|
|
98
|
+
exports.CommandEmpty = CommandEmpty;
|
|
99
|
+
exports.CommandGroup = CommandGroup;
|
|
100
|
+
exports.CommandInput = CommandInput;
|
|
101
|
+
exports.CommandItem = CommandItem;
|
|
102
|
+
exports.CommandList = CommandList;
|
|
103
|
+
exports.CommandSeparator = CommandSeparator;
|
|
104
|
+
exports.CommandShortcut = CommandShortcut;
|
|
@@ -1 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import "../../lib/index.js";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { SearchIcon } from "lucide-react";
|
|
10
|
+
import { Command } from "cmdk";
|
|
11
|
+
|
|
12
|
+
//#region src/components/ui/command.tsx
|
|
13
|
+
function Command$1({ className,...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Command, {
|
|
15
|
+
"data-slot": "command",
|
|
16
|
+
className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true,...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
22
|
+
...props,
|
|
23
|
+
children: [/* @__PURE__ */ jsxs(DialogHeader, {
|
|
24
|
+
className: "sr-only",
|
|
25
|
+
children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
|
|
26
|
+
}), /* @__PURE__ */ jsx(DialogContent, {
|
|
27
|
+
className: cn("overflow-hidden p-0", className),
|
|
28
|
+
showCloseButton,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Command$1, {
|
|
30
|
+
className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
31
|
+
children
|
|
32
|
+
})
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function CommandInput({ className,...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
38
|
+
"data-slot": "command-input-wrapper",
|
|
39
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
40
|
+
children: [/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command.Input, {
|
|
41
|
+
"data-slot": "command-input",
|
|
42
|
+
className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
43
|
+
...props
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function CommandList({ className,...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Command.List, {
|
|
49
|
+
"data-slot": "command-list",
|
|
50
|
+
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function CommandEmpty({ ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(Command.Empty, {
|
|
56
|
+
"data-slot": "command-empty",
|
|
57
|
+
className: "py-6 text-center text-sm",
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function CommandGroup({ className,...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(Command.Group, {
|
|
63
|
+
"data-slot": "command-group",
|
|
64
|
+
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),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function CommandSeparator({ className,...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(Command.Separator, {
|
|
70
|
+
"data-slot": "command-separator",
|
|
71
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function CommandItem({ className,...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx(Command.Item, {
|
|
77
|
+
"data-slot": "command-item",
|
|
78
|
+
className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function CommandShortcut({ className,...props }) {
|
|
83
|
+
return /* @__PURE__ */ jsx("span", {
|
|
84
|
+
"data-slot": "command-shortcut",
|
|
85
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -1 +1,102 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
10
|
+
let __radix_ui_react_dialog = require("@radix-ui/react-dialog");
|
|
11
|
+
__radix_ui_react_dialog = require_rolldown_runtime.__toESM(__radix_ui_react_dialog);
|
|
12
|
+
|
|
13
|
+
//#region src/components/ui/dialog.tsx
|
|
14
|
+
function Dialog({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Root, {
|
|
16
|
+
"data-slot": "dialog",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function DialogTrigger({ ...props }) {
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Trigger, {
|
|
22
|
+
"data-slot": "dialog-trigger",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function DialogPortal({ ...props }) {
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Portal, {
|
|
28
|
+
"data-slot": "dialog-portal",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function DialogClose({ ...props }) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Close, {
|
|
34
|
+
"data-slot": "dialog-close",
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function DialogOverlay({ className,...props }) {
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Overlay, {
|
|
40
|
+
"data-slot": "dialog-overlay",
|
|
41
|
+
className: require_utils.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function DialogContent({ className, children, showCloseButton = true,...props }) {
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, {
|
|
47
|
+
"data-slot": "dialog-portal",
|
|
48
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Content, {
|
|
49
|
+
"data-slot": "dialog-content",
|
|
50
|
+
className: require_utils.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
51
|
+
...props,
|
|
52
|
+
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Close, {
|
|
53
|
+
"data-slot": "dialog-close",
|
|
54
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
55
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
56
|
+
className: "sr-only",
|
|
57
|
+
children: "Close"
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function DialogHeader({ className,...props }) {
|
|
64
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
65
|
+
"data-slot": "dialog-header",
|
|
66
|
+
className: require_utils.cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function DialogFooter({ className,...props }) {
|
|
71
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
72
|
+
"data-slot": "dialog-footer",
|
|
73
|
+
className: require_utils.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function DialogTitle({ className,...props }) {
|
|
78
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Title, {
|
|
79
|
+
"data-slot": "dialog-title",
|
|
80
|
+
className: require_utils.cn("text-lg leading-none font-semibold", className),
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function DialogDescription({ className,...props }) {
|
|
85
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Description, {
|
|
86
|
+
"data-slot": "dialog-description",
|
|
87
|
+
className: require_utils.cn("text-muted-foreground text-sm", className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
exports.Dialog = Dialog;
|
|
94
|
+
exports.DialogClose = DialogClose;
|
|
95
|
+
exports.DialogContent = DialogContent;
|
|
96
|
+
exports.DialogDescription = DialogDescription;
|
|
97
|
+
exports.DialogFooter = DialogFooter;
|
|
98
|
+
exports.DialogHeader = DialogHeader;
|
|
99
|
+
exports.DialogOverlay = DialogOverlay;
|
|
100
|
+
exports.DialogPortal = DialogPortal;
|
|
101
|
+
exports.DialogTitle = DialogTitle;
|
|
102
|
+
exports.DialogTrigger = DialogTrigger;
|
|
@@ -1 +1,88 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
7
|
+
|
|
8
|
+
//#region src/components/ui/dialog.tsx
|
|
9
|
+
function Dialog({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
11
|
+
"data-slot": "dialog",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function DialogTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
|
|
17
|
+
"data-slot": "dialog-trigger",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function DialogPortal({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
|
|
23
|
+
"data-slot": "dialog-portal",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function DialogClose({ ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
29
|
+
"data-slot": "dialog-close",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function DialogOverlay({ className,...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
35
|
+
"data-slot": "dialog-overlay",
|
|
36
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function DialogContent({ className, children, showCloseButton = true,...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
42
|
+
"data-slot": "dialog-portal",
|
|
43
|
+
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
44
|
+
"data-slot": "dialog-content",
|
|
45
|
+
className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
46
|
+
...props,
|
|
47
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
48
|
+
"data-slot": "dialog-close",
|
|
49
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
50
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: "sr-only",
|
|
52
|
+
children: "Close"
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function DialogHeader({ className,...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx("div", {
|
|
60
|
+
"data-slot": "dialog-header",
|
|
61
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function DialogFooter({ className,...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("div", {
|
|
67
|
+
"data-slot": "dialog-footer",
|
|
68
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function DialogTitle({ className,...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
74
|
+
"data-slot": "dialog-title",
|
|
75
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function DialogDescription({ className,...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
81
|
+
"data-slot": "dialog-description",
|
|
82
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -1 +1,144 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
10
|
+
let __radix_ui_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
11
|
+
__radix_ui_react_dropdown_menu = require_rolldown_runtime.__toESM(__radix_ui_react_dropdown_menu);
|
|
12
|
+
|
|
13
|
+
//#region src/components/ui/dropdown-menu.tsx
|
|
14
|
+
function DropdownMenu({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Root, {
|
|
16
|
+
"data-slot": "dropdown-menu",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function DropdownMenuPortal({ ...props }) {
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Portal, {
|
|
22
|
+
"data-slot": "dropdown-menu-portal",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Trigger, {
|
|
28
|
+
"data-slot": "dropdown-menu-trigger",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function DropdownMenuContent({ className, sideOffset = 4,...props }) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Content, {
|
|
34
|
+
"data-slot": "dropdown-menu-content",
|
|
35
|
+
sideOffset,
|
|
36
|
+
className: require_utils.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
|
|
37
|
+
...props
|
|
38
|
+
}) });
|
|
39
|
+
}
|
|
40
|
+
function DropdownMenuGroup({ ...props }) {
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Group, {
|
|
42
|
+
"data-slot": "dropdown-menu-group",
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function DropdownMenuItem({ className, inset, variant = "default",...props }) {
|
|
47
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Item, {
|
|
48
|
+
"data-slot": "dropdown-menu-item",
|
|
49
|
+
"data-inset": inset,
|
|
50
|
+
"data-variant": variant,
|
|
51
|
+
className: require_utils.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function DropdownMenuCheckboxItem({ className, children, checked,...props }) {
|
|
56
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.CheckboxItem, {
|
|
57
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
58
|
+
className: require_utils.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
59
|
+
checked,
|
|
60
|
+
...props,
|
|
61
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
62
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
63
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "size-4" }) })
|
|
64
|
+
}), children]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
68
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.RadioGroup, {
|
|
69
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function DropdownMenuRadioItem({ className, children,...props }) {
|
|
74
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.RadioItem, {
|
|
75
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
76
|
+
className: require_utils.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
79
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
80
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleIcon, { className: "size-2 fill-current" }) })
|
|
81
|
+
}), children]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function DropdownMenuLabel({ className, inset,...props }) {
|
|
85
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Label, {
|
|
86
|
+
"data-slot": "dropdown-menu-label",
|
|
87
|
+
"data-inset": inset,
|
|
88
|
+
className: require_utils.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function DropdownMenuSeparator({ className,...props }) {
|
|
93
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Separator, {
|
|
94
|
+
"data-slot": "dropdown-menu-separator",
|
|
95
|
+
className: require_utils.cn("bg-border -mx-1 my-1 h-px", className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function DropdownMenuShortcut({ className,...props }) {
|
|
100
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
101
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
102
|
+
className: require_utils.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function DropdownMenuSub({ ...props }) {
|
|
107
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Sub, {
|
|
108
|
+
"data-slot": "dropdown-menu-sub",
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function DropdownMenuSubTrigger({ className, inset, children,...props }) {
|
|
113
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.SubTrigger, {
|
|
114
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
115
|
+
"data-inset": inset,
|
|
116
|
+
className: require_utils.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
117
|
+
...props,
|
|
118
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function DropdownMenuSubContent({ className,...props }) {
|
|
122
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.SubContent, {
|
|
123
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
124
|
+
className: require_utils.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
125
|
+
...props
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
exports.DropdownMenu = DropdownMenu;
|
|
131
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
132
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
133
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
134
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
135
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
136
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
137
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
138
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
139
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
140
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
141
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
142
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
143
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
144
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|