@0xchain/ui 1.1.0-beta.2 → 1.1.0-beta.21
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/LICENSE +21 -0
- package/dist/accordion.js +64 -0
- package/dist/alert-dialog.js +146 -0
- package/dist/{alert.mjs → alert.js} +26 -26
- package/dist/aspect-ratio.js +10 -0
- package/dist/avatar.js +53 -0
- package/dist/{badge.mjs → badge.js} +17 -16
- package/dist/breadcrumb.js +103 -0
- package/dist/{button.mjs → button.js} +18 -17
- package/dist/calendar.js +186 -0
- package/dist/card.js +90 -0
- package/dist/carousel.js +198 -0
- package/dist/{checkbox.mjs → checkbox.js} +16 -16
- package/dist/collapsible.js +34 -0
- package/dist/command.js +170 -0
- package/dist/context-menu.js +223 -0
- package/dist/dialog.js +136 -0
- package/dist/dropdown-menu.js +231 -0
- package/dist/form.js +116 -0
- package/dist/hover-card.js +38 -0
- package/dist/{input.mjs → input.js} +9 -9
- package/dist/{label.mjs → label.js} +12 -12
- package/dist/menubar.js +251 -0
- package/dist/{navigation-menu.mjs → navigation-menu.js} +89 -89
- package/dist/pagination.js +116 -0
- package/dist/popover.js +44 -0
- package/dist/progress.js +31 -0
- package/dist/radio-group.js +45 -0
- package/dist/resizable.js +48 -0
- package/dist/scroll-area.js +60 -0
- package/dist/select.js +169 -0
- package/dist/separator.js +26 -0
- package/dist/sheet.js +126 -0
- package/dist/skeleton.js +15 -0
- package/dist/{slider.mjs → slider.js} +33 -33
- package/dist/sonner.js +22 -0
- package/dist/{switch.mjs → switch.js} +15 -15
- package/dist/table.js +114 -0
- package/dist/{tabs.mjs → tabs.js} +37 -37
- package/dist/{textarea.mjs → textarea.js} +8 -8
- package/dist/toggle-group.js +62 -0
- package/dist/{toggle.mjs → toggle.js} +16 -16
- package/dist/tooltip.js +55 -0
- package/dist/utils-CzDCF-Ah.js +8 -0
- package/package.json +138 -89
- package/dist/accordion.mjs +0 -64
- package/dist/alert-dialog.mjs +0 -146
- package/dist/aspect-ratio.mjs +0 -10
- package/dist/avatar.mjs +0 -53
- package/dist/breadcrumb.mjs +0 -102
- package/dist/calendar.mjs +0 -173
- package/dist/card.mjs +0 -90
- package/dist/carousel.mjs +0 -177
- package/dist/collapsible.mjs +0 -34
- package/dist/command.mjs +0 -170
- package/dist/context-menu.mjs +0 -223
- package/dist/dialog.mjs +0 -136
- package/dist/dropdown-menu.mjs +0 -231
- package/dist/form.mjs +0 -101
- package/dist/hover-card.mjs +0 -38
- package/dist/menubar.mjs +0 -251
- package/dist/pagination.mjs +0 -116
- package/dist/popover.mjs +0 -44
- package/dist/progress.mjs +0 -31
- package/dist/radio-group.mjs +0 -45
- package/dist/resizable.mjs +0 -48
- package/dist/scroll-area.mjs +0 -60
- package/dist/select.mjs +0 -169
- package/dist/separator.mjs +0 -26
- package/dist/sheet.mjs +0 -126
- package/dist/skeleton.mjs +0 -15
- package/dist/sonner.mjs +0 -22
- package/dist/table.mjs +0 -114
- package/dist/toggle-group.mjs +0 -62
- package/dist/tooltip.mjs +0 -55
- package/dist/utils-B7J70Nno.js +0 -8
package/dist/command.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Command as Command$1 } from "cmdk";
|
|
3
|
+
import { SearchIcon } from "lucide-react";
|
|
4
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
5
|
+
import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogContent } from "./dialog.js";
|
|
6
|
+
function Command({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Command$1,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "command",
|
|
14
|
+
className: cn(
|
|
15
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function CommandDialog({
|
|
23
|
+
title = "Command Palette",
|
|
24
|
+
description = "Search for a command to run...",
|
|
25
|
+
children,
|
|
26
|
+
className,
|
|
27
|
+
showCloseButton = true,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
31
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
32
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
33
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
DialogContent,
|
|
37
|
+
{
|
|
38
|
+
className: cn("overflow-hidden p-0", className),
|
|
39
|
+
showCloseButton,
|
|
40
|
+
children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
function CommandInput({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ jsxs(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "command-input-wrapper",
|
|
53
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
Command$1.Input,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "command-input",
|
|
60
|
+
className: cn(
|
|
61
|
+
"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",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function CommandList({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
Command$1.List,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "command-list",
|
|
79
|
+
className: cn(
|
|
80
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
function CommandEmpty({
|
|
88
|
+
...props
|
|
89
|
+
}) {
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
Command$1.Empty,
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "command-empty",
|
|
94
|
+
className: "py-6 text-center text-sm",
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function CommandGroup({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
Command$1.Group,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "command-group",
|
|
107
|
+
className: cn(
|
|
108
|
+
"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",
|
|
109
|
+
className
|
|
110
|
+
),
|
|
111
|
+
...props
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function CommandSeparator({
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
Command$1.Separator,
|
|
121
|
+
{
|
|
122
|
+
"data-slot": "command-separator",
|
|
123
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
124
|
+
...props
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
function CommandItem({
|
|
129
|
+
className,
|
|
130
|
+
...props
|
|
131
|
+
}) {
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
Command$1.Item,
|
|
134
|
+
{
|
|
135
|
+
"data-slot": "command-item",
|
|
136
|
+
className: cn(
|
|
137
|
+
"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",
|
|
138
|
+
className
|
|
139
|
+
),
|
|
140
|
+
...props
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function CommandShortcut({
|
|
145
|
+
className,
|
|
146
|
+
...props
|
|
147
|
+
}) {
|
|
148
|
+
return /* @__PURE__ */ jsx(
|
|
149
|
+
"span",
|
|
150
|
+
{
|
|
151
|
+
"data-slot": "command-shortcut",
|
|
152
|
+
className: cn(
|
|
153
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
154
|
+
className
|
|
155
|
+
),
|
|
156
|
+
...props
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
export {
|
|
161
|
+
Command,
|
|
162
|
+
CommandDialog,
|
|
163
|
+
CommandEmpty,
|
|
164
|
+
CommandGroup,
|
|
165
|
+
CommandInput,
|
|
166
|
+
CommandItem,
|
|
167
|
+
CommandList,
|
|
168
|
+
CommandSeparator,
|
|
169
|
+
CommandShortcut
|
|
170
|
+
};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
import { CheckIcon, CircleIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
5
|
+
function ContextMenu({
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
9
|
+
}
|
|
10
|
+
function ContextMenuTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
14
|
+
}
|
|
15
|
+
function ContextMenuGroup({
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
|
|
19
|
+
}
|
|
20
|
+
function ContextMenuPortal({
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
24
|
+
}
|
|
25
|
+
function ContextMenuSub({
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
29
|
+
}
|
|
30
|
+
function ContextMenuRadioGroup({
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
ContextMenuPrimitive.RadioGroup,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "context-menu-radio-group",
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function ContextMenuSubTrigger({
|
|
42
|
+
className,
|
|
43
|
+
inset,
|
|
44
|
+
children,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
48
|
+
ContextMenuPrimitive.SubTrigger,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "context-menu-sub-trigger",
|
|
51
|
+
"data-inset": inset,
|
|
52
|
+
className: cn(
|
|
53
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
children,
|
|
59
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function ContextMenuSubContent({
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
ContextMenuPrimitive.SubContent,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "context-menu-sub-content",
|
|
72
|
+
className: cn(
|
|
73
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function ContextMenuContent({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
85
|
+
ContextMenuPrimitive.Content,
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "context-menu-content",
|
|
88
|
+
className: cn(
|
|
89
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
) });
|
|
95
|
+
}
|
|
96
|
+
function ContextMenuItem({
|
|
97
|
+
className,
|
|
98
|
+
inset,
|
|
99
|
+
variant = "default",
|
|
100
|
+
...props
|
|
101
|
+
}) {
|
|
102
|
+
return /* @__PURE__ */ jsx(
|
|
103
|
+
ContextMenuPrimitive.Item,
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "context-menu-item",
|
|
106
|
+
"data-inset": inset,
|
|
107
|
+
"data-variant": variant,
|
|
108
|
+
className: cn(
|
|
109
|
+
"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",
|
|
110
|
+
className
|
|
111
|
+
),
|
|
112
|
+
...props
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function ContextMenuCheckboxItem({
|
|
117
|
+
className,
|
|
118
|
+
children,
|
|
119
|
+
checked,
|
|
120
|
+
...props
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ jsxs(
|
|
123
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
124
|
+
{
|
|
125
|
+
"data-slot": "context-menu-checkbox-item",
|
|
126
|
+
className: cn(
|
|
127
|
+
"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",
|
|
128
|
+
className
|
|
129
|
+
),
|
|
130
|
+
checked,
|
|
131
|
+
...props,
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
134
|
+
children
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function ContextMenuRadioItem({
|
|
140
|
+
className,
|
|
141
|
+
children,
|
|
142
|
+
...props
|
|
143
|
+
}) {
|
|
144
|
+
return /* @__PURE__ */ jsxs(
|
|
145
|
+
ContextMenuPrimitive.RadioItem,
|
|
146
|
+
{
|
|
147
|
+
"data-slot": "context-menu-radio-item",
|
|
148
|
+
className: cn(
|
|
149
|
+
"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",
|
|
150
|
+
className
|
|
151
|
+
),
|
|
152
|
+
...props,
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
155
|
+
children
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
function ContextMenuLabel({
|
|
161
|
+
className,
|
|
162
|
+
inset,
|
|
163
|
+
...props
|
|
164
|
+
}) {
|
|
165
|
+
return /* @__PURE__ */ jsx(
|
|
166
|
+
ContextMenuPrimitive.Label,
|
|
167
|
+
{
|
|
168
|
+
"data-slot": "context-menu-label",
|
|
169
|
+
"data-inset": inset,
|
|
170
|
+
className: cn(
|
|
171
|
+
"text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
172
|
+
className
|
|
173
|
+
),
|
|
174
|
+
...props
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
function ContextMenuSeparator({
|
|
179
|
+
className,
|
|
180
|
+
...props
|
|
181
|
+
}) {
|
|
182
|
+
return /* @__PURE__ */ jsx(
|
|
183
|
+
ContextMenuPrimitive.Separator,
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "context-menu-separator",
|
|
186
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
187
|
+
...props
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
function ContextMenuShortcut({
|
|
192
|
+
className,
|
|
193
|
+
...props
|
|
194
|
+
}) {
|
|
195
|
+
return /* @__PURE__ */ jsx(
|
|
196
|
+
"span",
|
|
197
|
+
{
|
|
198
|
+
"data-slot": "context-menu-shortcut",
|
|
199
|
+
className: cn(
|
|
200
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
201
|
+
className
|
|
202
|
+
),
|
|
203
|
+
...props
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
export {
|
|
208
|
+
ContextMenu,
|
|
209
|
+
ContextMenuCheckboxItem,
|
|
210
|
+
ContextMenuContent,
|
|
211
|
+
ContextMenuGroup,
|
|
212
|
+
ContextMenuItem,
|
|
213
|
+
ContextMenuLabel,
|
|
214
|
+
ContextMenuPortal,
|
|
215
|
+
ContextMenuRadioGroup,
|
|
216
|
+
ContextMenuRadioItem,
|
|
217
|
+
ContextMenuSeparator,
|
|
218
|
+
ContextMenuShortcut,
|
|
219
|
+
ContextMenuSub,
|
|
220
|
+
ContextMenuSubContent,
|
|
221
|
+
ContextMenuSubTrigger,
|
|
222
|
+
ContextMenuTrigger
|
|
223
|
+
};
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { XIcon } from "lucide-react";
|
|
4
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
5
|
+
function Dialog({
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
9
|
+
}
|
|
10
|
+
function DialogTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
14
|
+
}
|
|
15
|
+
function DialogPortal({
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
19
|
+
}
|
|
20
|
+
function DialogClose({
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
24
|
+
}
|
|
25
|
+
function DialogOverlay({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}) {
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
DialogPrimitive.Overlay,
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "dialog-overlay",
|
|
33
|
+
className: cn(
|
|
34
|
+
"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",
|
|
35
|
+
className
|
|
36
|
+
),
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function DialogContent({
|
|
42
|
+
className,
|
|
43
|
+
children,
|
|
44
|
+
showCloseButton = true,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
48
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
49
|
+
/* @__PURE__ */ jsxs(
|
|
50
|
+
DialogPrimitive.Content,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "dialog-content",
|
|
53
|
+
className: cn(
|
|
54
|
+
"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",
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
...props,
|
|
58
|
+
children: [
|
|
59
|
+
children,
|
|
60
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
61
|
+
DialogPrimitive.Close,
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "dialog-close",
|
|
64
|
+
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",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
function DialogHeader({ className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
"data-slot": "dialog-header",
|
|
81
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function DialogFooter({ className, ...props }) {
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
"data-slot": "dialog-footer",
|
|
91
|
+
className: cn(
|
|
92
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
93
|
+
className
|
|
94
|
+
),
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function DialogTitle({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
DialogPrimitive.Title,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "dialog-title",
|
|
107
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
function DialogDescription({
|
|
113
|
+
className,
|
|
114
|
+
...props
|
|
115
|
+
}) {
|
|
116
|
+
return /* @__PURE__ */ jsx(
|
|
117
|
+
DialogPrimitive.Description,
|
|
118
|
+
{
|
|
119
|
+
"data-slot": "dialog-description",
|
|
120
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
121
|
+
...props
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
Dialog,
|
|
127
|
+
DialogClose,
|
|
128
|
+
DialogContent,
|
|
129
|
+
DialogDescription,
|
|
130
|
+
DialogFooter,
|
|
131
|
+
DialogHeader,
|
|
132
|
+
DialogOverlay,
|
|
133
|
+
DialogPortal,
|
|
134
|
+
DialogTitle,
|
|
135
|
+
DialogTrigger
|
|
136
|
+
};
|