react-shadcn-kit 0.0.1
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 +7 -0
- package/README.md +113 -0
- package/dist/assets/global.css +1 -0
- package/dist/atoms/accordion.d.ts +7 -0
- package/dist/atoms/accordion.js +62 -0
- package/dist/atoms/alert-dialog.d.ts +14 -0
- package/dist/atoms/alert-dialog.js +127 -0
- package/dist/atoms/alert.d.ts +9 -0
- package/dist/atoms/alert.js +60 -0
- package/dist/atoms/aspect-ratio.d.ts +3 -0
- package/dist/atoms/aspect-ratio.js +8 -0
- package/dist/atoms/avatar.d.ts +6 -0
- package/dist/atoms/avatar.js +41 -0
- package/dist/atoms/badge.d.ts +9 -0
- package/dist/atoms/badge.js +32 -0
- package/dist/atoms/breadcrumb.d.ts +11 -0
- package/dist/atoms/breadcrumb.js +95 -0
- package/dist/atoms/button-group.d.ts +11 -0
- package/dist/atoms/button-group.js +75 -0
- package/dist/atoms/button.d.ts +10 -0
- package/dist/atoms/button.js +51 -0
- package/dist/atoms/calendar.d.ts +8 -0
- package/dist/atoms/calendar.js +144 -0
- package/dist/atoms/card.d.ts +9 -0
- package/dist/atoms/card.js +80 -0
- package/dist/atoms/carousel.d.ts +19 -0
- package/dist/atoms/carousel.js +165 -0
- package/dist/atoms/chart.d.ts +43 -0
- package/dist/atoms/chart.js +203 -0
- package/dist/atoms/checkbox.d.ts +4 -0
- package/dist/atoms/checkbox.js +28 -0
- package/dist/atoms/collapsible.d.ts +5 -0
- package/dist/atoms/collapsible.js +20 -0
- package/dist/atoms/command.d.ts +18 -0
- package/dist/atoms/command.js +143 -0
- package/dist/atoms/context-menu.d.ts +25 -0
- package/dist/atoms/context-menu.js +200 -0
- package/dist/atoms/dialog.d.ts +15 -0
- package/dist/atoms/dialog.js +122 -0
- package/dist/atoms/drawer.d.ts +13 -0
- package/dist/atoms/drawer.js +117 -0
- package/dist/atoms/dropdown-menu.d.ts +25 -0
- package/dist/atoms/dropdown-menu.js +204 -0
- package/dist/atoms/empty.d.ts +11 -0
- package/dist/atoms/empty.js +99 -0
- package/dist/atoms/field.d.ts +24 -0
- package/dist/atoms/field.js +208 -0
- package/dist/atoms/form.d.ts +24 -0
- package/dist/atoms/form.js +87 -0
- package/dist/atoms/hover-card.d.ts +6 -0
- package/dist/atoms/hover-card.js +34 -0
- package/dist/atoms/input-group.d.ts +16 -0
- package/dist/atoms/input-group.js +142 -0
- package/dist/atoms/input-otp.d.ts +11 -0
- package/dist/atoms/input-otp.js +55 -0
- package/dist/atoms/input.d.ts +3 -0
- package/dist/atoms/input.js +21 -0
- package/dist/atoms/item.d.ts +23 -0
- package/dist/atoms/item.js +164 -0
- package/dist/atoms/kbd.d.ts +3 -0
- package/dist/atoms/kbd.js +31 -0
- package/dist/atoms/label.d.ts +4 -0
- package/dist/atoms/label.js +19 -0
- package/dist/atoms/menubar.d.ts +26 -0
- package/dist/atoms/menubar.js +229 -0
- package/dist/atoms/navigation-menu.d.ts +14 -0
- package/dist/atoms/navigation-menu.js +159 -0
- package/dist/atoms/pagination.d.ts +13 -0
- package/dist/atoms/pagination.js +100 -0
- package/dist/atoms/popover.d.ts +7 -0
- package/dist/atoms/popover.js +38 -0
- package/dist/atoms/progress.d.ts +4 -0
- package/dist/atoms/progress.js +28 -0
- package/dist/atoms/radio-group.d.ts +5 -0
- package/dist/atoms/radio-group.js +45 -0
- package/dist/atoms/resizable.d.ts +8 -0
- package/dist/atoms/resizable.js +43 -0
- package/dist/atoms/scroll-area.d.ts +5 -0
- package/dist/atoms/scroll-area.js +60 -0
- package/dist/atoms/select.d.ts +15 -0
- package/dist/atoms/select.js +156 -0
- package/dist/atoms/separator.d.ts +4 -0
- package/dist/atoms/separator.js +26 -0
- package/dist/atoms/sheet.d.ts +13 -0
- package/dist/atoms/sheet.js +117 -0
- package/dist/atoms/sidebar.d.ts +69 -0
- package/dist/atoms/sidebar.js +570 -0
- package/dist/atoms/skeleton.d.ts +2 -0
- package/dist/atoms/skeleton.js +15 -0
- package/dist/atoms/slider.d.ts +4 -0
- package/dist/atoms/slider.js +63 -0
- package/dist/atoms/sonner.d.ts +3 -0
- package/dist/atoms/sonner.js +31 -0
- package/dist/atoms/spinner.d.ts +2 -0
- package/dist/atoms/spinner.js +17 -0
- package/dist/atoms/switch.d.ts +4 -0
- package/dist/atoms/switch.js +28 -0
- package/dist/atoms/table.d.ts +10 -0
- package/dist/atoms/table.js +94 -0
- package/dist/atoms/tabs.d.ts +7 -0
- package/dist/atoms/tabs.js +55 -0
- package/dist/atoms/textarea.d.ts +3 -0
- package/dist/atoms/textarea.js +18 -0
- package/dist/atoms/toggle-group.d.ts +9 -0
- package/dist/atoms/toggle-group.js +68 -0
- package/dist/atoms/toggle.d.ts +9 -0
- package/dist/atoms/toggle.js +43 -0
- package/dist/atoms/tooltip.d.ts +7 -0
- package/dist/atoms/tooltip.js +51 -0
- package/dist/config/default-navigation.js +136 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +347 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/molecules/app-navbar.d.ts +11 -0
- package/dist/molecules/app-navbar.js +117 -0
- package/dist/molecules/app-sidebar.d.ts +9 -0
- package/dist/molecules/app-sidebar.js +121 -0
- package/dist/organisms/layout.d.ts +3 -0
- package/dist/organisms/layout.js +16 -0
- package/package.json +120 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-context-menu";
|
|
3
|
+
import { CheckIcon as d, CircleIcon as u, ChevronRightIcon as c } from "lucide-react";
|
|
4
|
+
import { cn as s } from "../lib/utils.js";
|
|
5
|
+
function x({ ...t }) {
|
|
6
|
+
return /* @__PURE__ */ e(o.Root, { "data-slot": "context-menu", ...t });
|
|
7
|
+
}
|
|
8
|
+
function p({
|
|
9
|
+
...t
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "context-menu-trigger", ...t });
|
|
12
|
+
}
|
|
13
|
+
function g({ ...t }) {
|
|
14
|
+
return /* @__PURE__ */ e(o.Group, { "data-slot": "context-menu-group", ...t });
|
|
15
|
+
}
|
|
16
|
+
function v({ ...t }) {
|
|
17
|
+
return /* @__PURE__ */ e(o.Portal, { "data-slot": "context-menu-portal", ...t });
|
|
18
|
+
}
|
|
19
|
+
function b({ ...t }) {
|
|
20
|
+
return /* @__PURE__ */ e(o.Sub, { "data-slot": "context-menu-sub", ...t });
|
|
21
|
+
}
|
|
22
|
+
function h({
|
|
23
|
+
...t
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ e(o.RadioGroup, { "data-slot": "context-menu-radio-group", ...t });
|
|
26
|
+
}
|
|
27
|
+
function C({
|
|
28
|
+
className: t,
|
|
29
|
+
inset: n,
|
|
30
|
+
children: a,
|
|
31
|
+
...r
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ i(
|
|
34
|
+
o.SubTrigger,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "context-menu-sub-trigger",
|
|
37
|
+
"data-inset": n,
|
|
38
|
+
className: s(
|
|
39
|
+
"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 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",
|
|
40
|
+
t
|
|
41
|
+
),
|
|
42
|
+
...r,
|
|
43
|
+
children: [
|
|
44
|
+
a,
|
|
45
|
+
/* @__PURE__ */ e(c, { className: "ml-auto" })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function z({
|
|
51
|
+
className: t,
|
|
52
|
+
...n
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ e(
|
|
55
|
+
o.SubContent,
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "context-menu-sub-content",
|
|
58
|
+
className: s(
|
|
59
|
+
"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",
|
|
60
|
+
t
|
|
61
|
+
),
|
|
62
|
+
...n
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function M({
|
|
67
|
+
className: t,
|
|
68
|
+
...n
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ e(
|
|
71
|
+
o.Content,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "context-menu-content",
|
|
74
|
+
className: s(
|
|
75
|
+
"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",
|
|
76
|
+
t
|
|
77
|
+
),
|
|
78
|
+
...n
|
|
79
|
+
}
|
|
80
|
+
) });
|
|
81
|
+
}
|
|
82
|
+
function N({
|
|
83
|
+
className: t,
|
|
84
|
+
inset: n,
|
|
85
|
+
variant: a = "default",
|
|
86
|
+
...r
|
|
87
|
+
}) {
|
|
88
|
+
return /* @__PURE__ */ e(
|
|
89
|
+
o.Item,
|
|
90
|
+
{
|
|
91
|
+
"data-slot": "context-menu-item",
|
|
92
|
+
"data-inset": n,
|
|
93
|
+
"data-variant": a,
|
|
94
|
+
className: s(
|
|
95
|
+
"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",
|
|
96
|
+
t
|
|
97
|
+
),
|
|
98
|
+
...r
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function _({
|
|
103
|
+
className: t,
|
|
104
|
+
children: n,
|
|
105
|
+
checked: a,
|
|
106
|
+
...r
|
|
107
|
+
}) {
|
|
108
|
+
return /* @__PURE__ */ i(
|
|
109
|
+
o.CheckboxItem,
|
|
110
|
+
{
|
|
111
|
+
"data-slot": "context-menu-checkbox-item",
|
|
112
|
+
className: s(
|
|
113
|
+
"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",
|
|
114
|
+
t
|
|
115
|
+
),
|
|
116
|
+
checked: a,
|
|
117
|
+
...r,
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(d, { className: "size-4" }) }) }),
|
|
120
|
+
n
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
function I({
|
|
126
|
+
className: t,
|
|
127
|
+
children: n,
|
|
128
|
+
...a
|
|
129
|
+
}) {
|
|
130
|
+
return /* @__PURE__ */ i(
|
|
131
|
+
o.RadioItem,
|
|
132
|
+
{
|
|
133
|
+
"data-slot": "context-menu-radio-item",
|
|
134
|
+
className: s(
|
|
135
|
+
"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",
|
|
136
|
+
t
|
|
137
|
+
),
|
|
138
|
+
...a,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(u, { className: "size-2 fill-current" }) }) }),
|
|
141
|
+
n
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function y({
|
|
147
|
+
className: t,
|
|
148
|
+
inset: n,
|
|
149
|
+
...a
|
|
150
|
+
}) {
|
|
151
|
+
return /* @__PURE__ */ e(
|
|
152
|
+
o.Label,
|
|
153
|
+
{
|
|
154
|
+
"data-slot": "context-menu-label",
|
|
155
|
+
"data-inset": n,
|
|
156
|
+
className: s("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
|
|
157
|
+
...a
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function k({
|
|
162
|
+
className: t,
|
|
163
|
+
...n
|
|
164
|
+
}) {
|
|
165
|
+
return /* @__PURE__ */ e(
|
|
166
|
+
o.Separator,
|
|
167
|
+
{
|
|
168
|
+
"data-slot": "context-menu-separator",
|
|
169
|
+
className: s("bg-border -mx-1 my-1 h-px", t),
|
|
170
|
+
...n
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
function S({ className: t, ...n }) {
|
|
175
|
+
return /* @__PURE__ */ e(
|
|
176
|
+
"span",
|
|
177
|
+
{
|
|
178
|
+
"data-slot": "context-menu-shortcut",
|
|
179
|
+
className: s("text-muted-foreground ml-auto text-xs tracking-widest", t),
|
|
180
|
+
...n
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
export {
|
|
185
|
+
x as ContextMenu,
|
|
186
|
+
_ as ContextMenuCheckboxItem,
|
|
187
|
+
M as ContextMenuContent,
|
|
188
|
+
g as ContextMenuGroup,
|
|
189
|
+
N as ContextMenuItem,
|
|
190
|
+
y as ContextMenuLabel,
|
|
191
|
+
v as ContextMenuPortal,
|
|
192
|
+
h as ContextMenuRadioGroup,
|
|
193
|
+
I as ContextMenuRadioItem,
|
|
194
|
+
k as ContextMenuSeparator,
|
|
195
|
+
S as ContextMenuShortcut,
|
|
196
|
+
b as ContextMenuSub,
|
|
197
|
+
z as ContextMenuSubContent,
|
|
198
|
+
C as ContextMenuSubTrigger,
|
|
199
|
+
p as ContextMenuTrigger
|
|
200
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-dialog";
|
|
3
|
+
import { XIcon as r } from "lucide-react";
|
|
4
|
+
import { cn as n } from "../lib/utils.js";
|
|
5
|
+
function m({ ...t }) {
|
|
6
|
+
return /* @__PURE__ */ a(o.Root, { "data-slot": "dialog", ...t });
|
|
7
|
+
}
|
|
8
|
+
function p({ ...t }) {
|
|
9
|
+
return /* @__PURE__ */ a(o.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
10
|
+
}
|
|
11
|
+
function d({ ...t }) {
|
|
12
|
+
return /* @__PURE__ */ a(o.Portal, { "data-slot": "dialog-portal", ...t });
|
|
13
|
+
}
|
|
14
|
+
function x({ ...t }) {
|
|
15
|
+
return /* @__PURE__ */ a(o.Close, { "data-slot": "dialog-close", ...t });
|
|
16
|
+
}
|
|
17
|
+
function c({
|
|
18
|
+
className: t,
|
|
19
|
+
...e
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
o.Overlay,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "dialog-overlay",
|
|
25
|
+
className: n(
|
|
26
|
+
"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",
|
|
27
|
+
t
|
|
28
|
+
),
|
|
29
|
+
...e
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function v({
|
|
34
|
+
className: t,
|
|
35
|
+
children: e,
|
|
36
|
+
showCloseButton: l = !0,
|
|
37
|
+
...s
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ i(d, { "data-slot": "dialog-portal", children: [
|
|
40
|
+
/* @__PURE__ */ a(c, {}),
|
|
41
|
+
/* @__PURE__ */ i(
|
|
42
|
+
o.Content,
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "dialog-content",
|
|
45
|
+
className: n(
|
|
46
|
+
"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",
|
|
47
|
+
t
|
|
48
|
+
),
|
|
49
|
+
...s,
|
|
50
|
+
children: [
|
|
51
|
+
e,
|
|
52
|
+
l && /* @__PURE__ */ i(
|
|
53
|
+
o.Close,
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "dialog-close",
|
|
56
|
+
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",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ a(r, {}),
|
|
59
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
function D({ className: t, ...e }) {
|
|
69
|
+
return /* @__PURE__ */ a(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "dialog-header",
|
|
73
|
+
className: n("flex flex-col gap-2 text-center sm:text-left", t),
|
|
74
|
+
...e
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function h({ className: t, ...e }) {
|
|
79
|
+
return /* @__PURE__ */ a(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "dialog-footer",
|
|
83
|
+
className: n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t),
|
|
84
|
+
...e
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function b({ className: t, ...e }) {
|
|
89
|
+
return /* @__PURE__ */ a(
|
|
90
|
+
o.Title,
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "dialog-title",
|
|
93
|
+
className: n("text-lg leading-none font-semibold", t),
|
|
94
|
+
...e
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function y({
|
|
99
|
+
className: t,
|
|
100
|
+
...e
|
|
101
|
+
}) {
|
|
102
|
+
return /* @__PURE__ */ a(
|
|
103
|
+
o.Description,
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "dialog-description",
|
|
106
|
+
className: n("text-muted-foreground text-sm", t),
|
|
107
|
+
...e
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
m as Dialog,
|
|
113
|
+
x as DialogClose,
|
|
114
|
+
v as DialogContent,
|
|
115
|
+
y as DialogDescription,
|
|
116
|
+
h as DialogFooter,
|
|
117
|
+
D as DialogHeader,
|
|
118
|
+
c as DialogOverlay,
|
|
119
|
+
d as DialogPortal,
|
|
120
|
+
b as DialogTitle,
|
|
121
|
+
p as DialogTrigger
|
|
122
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Drawer as e } from "vaul";
|
|
3
|
+
import { cn as d } from "../lib/utils.js";
|
|
4
|
+
function s({ ...t }) {
|
|
5
|
+
return /* @__PURE__ */ a(e.Root, { "data-slot": "drawer", ...t });
|
|
6
|
+
}
|
|
7
|
+
function m({ ...t }) {
|
|
8
|
+
return /* @__PURE__ */ a(e.Trigger, { "data-slot": "drawer-trigger", ...t });
|
|
9
|
+
}
|
|
10
|
+
function n({ ...t }) {
|
|
11
|
+
return /* @__PURE__ */ a(e.Portal, { "data-slot": "drawer-portal", ...t });
|
|
12
|
+
}
|
|
13
|
+
function f({ ...t }) {
|
|
14
|
+
return /* @__PURE__ */ a(e.Close, { "data-slot": "drawer-close", ...t });
|
|
15
|
+
}
|
|
16
|
+
function l({
|
|
17
|
+
className: t,
|
|
18
|
+
...r
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ a(
|
|
21
|
+
e.Overlay,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "drawer-overlay",
|
|
24
|
+
className: d(
|
|
25
|
+
"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",
|
|
26
|
+
t
|
|
27
|
+
),
|
|
28
|
+
...r
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function v({
|
|
33
|
+
className: t,
|
|
34
|
+
children: r,
|
|
35
|
+
...i
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ o(n, { "data-slot": "drawer-portal", children: [
|
|
38
|
+
/* @__PURE__ */ a(l, {}),
|
|
39
|
+
/* @__PURE__ */ o(
|
|
40
|
+
e.Content,
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "drawer-content",
|
|
43
|
+
className: d(
|
|
44
|
+
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
45
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
46
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
47
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
48
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
49
|
+
t
|
|
50
|
+
),
|
|
51
|
+
...i,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ a("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
54
|
+
r
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] });
|
|
59
|
+
}
|
|
60
|
+
function p({ className: t, ...r }) {
|
|
61
|
+
return /* @__PURE__ */ a(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
"data-slot": "drawer-header",
|
|
65
|
+
className: d(
|
|
66
|
+
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
67
|
+
t
|
|
68
|
+
),
|
|
69
|
+
...r
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function g({ className: t, ...r }) {
|
|
74
|
+
return /* @__PURE__ */ a(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
"data-slot": "drawer-footer",
|
|
78
|
+
className: d("mt-auto flex flex-col gap-2 p-4", t),
|
|
79
|
+
...r
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function x({ className: t, ...r }) {
|
|
84
|
+
return /* @__PURE__ */ a(
|
|
85
|
+
e.Title,
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "drawer-title",
|
|
88
|
+
className: d("text-foreground font-semibold", t),
|
|
89
|
+
...r
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function b({
|
|
94
|
+
className: t,
|
|
95
|
+
...r
|
|
96
|
+
}) {
|
|
97
|
+
return /* @__PURE__ */ a(
|
|
98
|
+
e.Description,
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "drawer-description",
|
|
101
|
+
className: d("text-muted-foreground text-sm", t),
|
|
102
|
+
...r
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
export {
|
|
107
|
+
s as Drawer,
|
|
108
|
+
f as DrawerClose,
|
|
109
|
+
v as DrawerContent,
|
|
110
|
+
b as DrawerDescription,
|
|
111
|
+
g as DrawerFooter,
|
|
112
|
+
p as DrawerHeader,
|
|
113
|
+
l as DrawerOverlay,
|
|
114
|
+
n as DrawerPortal,
|
|
115
|
+
x as DrawerTitle,
|
|
116
|
+
m as DrawerTrigger
|
|
117
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|