@turingpaper/ui 0.0.12 → 0.0.14
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/accordion.mjs +34 -46
- package/dist/alert-dialog.mjs +54 -113
- package/dist/avatar.mjs +26 -42
- package/dist/badge.mjs +21 -25
- package/dist/breadcrumb.mjs +58 -91
- package/dist/button.mjs +40 -48
- package/dist/card.mjs +41 -63
- package/dist/chart.mjs +123 -204
- package/dist/checkbox.mjs +17 -26
- package/dist/collapsible.mjs +6 -7
- package/dist/command.mjs +70 -109
- package/dist/components/mermaid-diagram.d.ts +0 -2
- package/dist/dialog.mjs +48 -99
- package/dist/drawer.mjs +48 -98
- package/dist/dropdown-menu.mjs +72 -143
- package/dist/hover-card.mjs +16 -23
- package/dist/input-group.mjs +71 -135
- package/dist/input-otp.mjs +40 -47
- package/dist/input.mjs +13 -21
- package/dist/label.mjs +15 -19
- package/dist/map.mjs +640 -730
- package/dist/mermaid-diagram.mjs +125 -141
- package/dist/pagination.mjs +62 -105
- package/dist/popover.mjs +15 -23
- package/dist/progress.mjs +16 -24
- package/dist/provider.d.ts +2 -1
- package/dist/provider.mjs +18 -14
- package/dist/radio-group.mjs +23 -30
- package/dist/scroll-area.mjs +30 -38
- package/dist/select.mjs +69 -121
- package/dist/separator.mjs +16 -24
- package/dist/sheet.mjs +58 -110
- package/dist/skeleton.mjs +10 -16
- package/dist/slider.mjs +18 -23
- package/dist/styles.css +1 -1
- package/dist/switch.mjs +14 -27
- package/dist/table.mjs +57 -87
- package/dist/tabs.mjs +25 -46
- package/dist/textarea.mjs +11 -17
- package/dist/toggle-group.mjs +36 -40
- package/dist/toggle.mjs +34 -37
- package/dist/tooltip.mjs +15 -23
- package/dist/utils.mjs +6 -6
- package/package.json +7 -7
package/dist/command.mjs
CHANGED
|
@@ -1,109 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
));
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
));
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
));
|
|
72
|
-
x.displayName = o.Separator.displayName;
|
|
73
|
-
const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
|
|
74
|
-
o.Item,
|
|
75
|
-
{
|
|
76
|
-
ref: d,
|
|
77
|
-
className: r(
|
|
78
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
79
|
-
e
|
|
80
|
-
),
|
|
81
|
-
...a
|
|
82
|
-
}
|
|
83
|
-
));
|
|
84
|
-
h.displayName = o.Item.displayName;
|
|
85
|
-
const y = ({
|
|
86
|
-
className: e,
|
|
87
|
-
...a
|
|
88
|
-
}) => /* @__PURE__ */ t(
|
|
89
|
-
"span",
|
|
90
|
-
{
|
|
91
|
-
className: r(
|
|
92
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
93
|
-
e
|
|
94
|
-
),
|
|
95
|
-
...a
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
y.displayName = "CommandShortcut";
|
|
99
|
-
export {
|
|
100
|
-
n as Command,
|
|
101
|
-
C as CommandDialog,
|
|
102
|
-
f as CommandEmpty,
|
|
103
|
-
g as CommandGroup,
|
|
104
|
-
c as CommandInput,
|
|
105
|
-
h as CommandItem,
|
|
106
|
-
u as CommandList,
|
|
107
|
-
x as CommandSeparator,
|
|
108
|
-
y as CommandShortcut
|
|
109
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "./utils.mjs";
|
|
3
|
+
import { Dialog as t, DialogContent as n } from "./dialog.mjs";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { Search as o } from "lucide-react";
|
|
7
|
+
import { Command as s } from "cmdk";
|
|
8
|
+
//#region src/components/command.tsx
|
|
9
|
+
var c = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s, {
|
|
10
|
+
ref: r,
|
|
11
|
+
className: e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", t),
|
|
12
|
+
...n
|
|
13
|
+
}));
|
|
14
|
+
c.displayName = s.displayName;
|
|
15
|
+
var l = ({ children: e, ...r }) => /* @__PURE__ */ i(t, {
|
|
16
|
+
...r,
|
|
17
|
+
children: /* @__PURE__ */ i(n, {
|
|
18
|
+
className: "overflow-hidden p-0 shadow-lg",
|
|
19
|
+
children: /* @__PURE__ */ i(c, {
|
|
20
|
+
className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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",
|
|
21
|
+
children: e
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
}), u = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a("div", {
|
|
25
|
+
className: "flex items-center border-b px-3",
|
|
26
|
+
"cmdk-input-wrapper": "",
|
|
27
|
+
children: [/* @__PURE__ */ i(o, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ i(s.Input, {
|
|
28
|
+
ref: r,
|
|
29
|
+
className: e("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
30
|
+
...n
|
|
31
|
+
})]
|
|
32
|
+
}));
|
|
33
|
+
u.displayName = s.Input.displayName;
|
|
34
|
+
var d = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.List, {
|
|
35
|
+
ref: r,
|
|
36
|
+
className: e("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
|
|
37
|
+
...n
|
|
38
|
+
}));
|
|
39
|
+
d.displayName = s.List.displayName;
|
|
40
|
+
var f = r.forwardRef((e, t) => /* @__PURE__ */ i(s.Empty, {
|
|
41
|
+
ref: t,
|
|
42
|
+
className: "py-6 text-center text-sm",
|
|
43
|
+
...e
|
|
44
|
+
}));
|
|
45
|
+
f.displayName = s.Empty.displayName;
|
|
46
|
+
var p = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.Group, {
|
|
47
|
+
ref: r,
|
|
48
|
+
className: e("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", t),
|
|
49
|
+
...n
|
|
50
|
+
}));
|
|
51
|
+
p.displayName = s.Group.displayName;
|
|
52
|
+
var m = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.Separator, {
|
|
53
|
+
ref: r,
|
|
54
|
+
className: e("-mx-1 h-px bg-border", t),
|
|
55
|
+
...n
|
|
56
|
+
}));
|
|
57
|
+
m.displayName = s.Separator.displayName;
|
|
58
|
+
var h = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(s.Item, {
|
|
59
|
+
ref: r,
|
|
60
|
+
className: e("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t),
|
|
61
|
+
...n
|
|
62
|
+
}));
|
|
63
|
+
h.displayName = s.Item.displayName;
|
|
64
|
+
var g = ({ className: t, ...n }) => /* @__PURE__ */ i("span", {
|
|
65
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
|
|
66
|
+
...n
|
|
67
|
+
});
|
|
68
|
+
g.displayName = "CommandShortcut";
|
|
69
|
+
//#endregion
|
|
70
|
+
export { c as Command, l as CommandDialog, f as CommandEmpty, p as CommandGroup, u as CommandInput, h as CommandItem, d as CommandList, m as CommandSeparator, g as CommandShortcut };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { RenderOptions } from 'beautiful-mermaid';
|
|
2
1
|
export interface MermaidDiagramProps {
|
|
3
2
|
className?: string;
|
|
4
3
|
code: string;
|
|
5
4
|
filename?: string;
|
|
6
|
-
options?: RenderOptions;
|
|
7
5
|
}
|
|
8
6
|
export declare const MermaidDiagram: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof MermaidDiagramProps> & MermaidDiagramProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/dialog.mjs
CHANGED
|
@@ -1,100 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
t,
|
|
31
|
-
/* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
32
|
-
/* @__PURE__ */ o(c, { className: "h-4 w-4" }),
|
|
33
|
-
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
34
|
-
] })
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
] }));
|
|
39
|
-
p.displayName = e.Content.displayName;
|
|
40
|
-
const f = ({
|
|
41
|
-
className: a,
|
|
42
|
-
...t
|
|
43
|
-
}) => /* @__PURE__ */ o(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: i(
|
|
47
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
48
|
-
a
|
|
49
|
-
),
|
|
50
|
-
...t
|
|
51
|
-
}
|
|
52
|
-
);
|
|
1
|
+
import { cn as e } from "./utils.mjs";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog as i } from "radix-ui";
|
|
5
|
+
import { X as a } from "lucide-react";
|
|
6
|
+
//#region src/components/dialog.tsx
|
|
7
|
+
var o = i.Root, s = i.Trigger, c = i.Portal, l = i.Close, u = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Overlay, {
|
|
8
|
+
ref: a,
|
|
9
|
+
className: e("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t),
|
|
10
|
+
...r
|
|
11
|
+
}));
|
|
12
|
+
u.displayName = i.Overlay.displayName;
|
|
13
|
+
var d = t.forwardRef(({ className: t, children: o, ...s }, l) => /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(u, {}), /* @__PURE__ */ r(i.Content, {
|
|
14
|
+
ref: l,
|
|
15
|
+
className: e("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", t),
|
|
16
|
+
...s,
|
|
17
|
+
children: [o, /* @__PURE__ */ r(i.Close, {
|
|
18
|
+
className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
19
|
+
children: [/* @__PURE__ */ n(a, { className: "h-4 w-4" }), /* @__PURE__ */ n("span", {
|
|
20
|
+
className: "sr-only",
|
|
21
|
+
children: "Close"
|
|
22
|
+
})]
|
|
23
|
+
})]
|
|
24
|
+
})] }));
|
|
25
|
+
d.displayName = i.Content.displayName;
|
|
26
|
+
var f = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
27
|
+
className: e("flex flex-col space-y-1.5 text-center sm:text-left", t),
|
|
28
|
+
...r
|
|
29
|
+
});
|
|
53
30
|
f.displayName = "DialogHeader";
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
74
|
-
a
|
|
75
|
-
),
|
|
76
|
-
...t
|
|
77
|
-
}
|
|
78
|
-
));
|
|
79
|
-
u.displayName = e.Title.displayName;
|
|
80
|
-
const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
81
|
-
e.Description,
|
|
82
|
-
{
|
|
83
|
-
ref: s,
|
|
84
|
-
className: i("text-sm text-muted-foreground", a),
|
|
85
|
-
...t
|
|
86
|
-
}
|
|
87
|
-
));
|
|
88
|
-
y.displayName = e.Description.displayName;
|
|
89
|
-
export {
|
|
90
|
-
v as Dialog,
|
|
91
|
-
w as DialogClose,
|
|
92
|
-
p as DialogContent,
|
|
93
|
-
y as DialogDescription,
|
|
94
|
-
g as DialogFooter,
|
|
95
|
-
f as DialogHeader,
|
|
96
|
-
d as DialogOverlay,
|
|
97
|
-
m as DialogPortal,
|
|
98
|
-
u as DialogTitle,
|
|
99
|
-
h as DialogTrigger
|
|
100
|
-
};
|
|
31
|
+
var p = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
32
|
+
className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
|
|
33
|
+
...r
|
|
34
|
+
});
|
|
35
|
+
p.displayName = "DialogFooter";
|
|
36
|
+
var m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Title, {
|
|
37
|
+
ref: a,
|
|
38
|
+
className: e("text-lg font-semibold leading-none tracking-tight", t),
|
|
39
|
+
...r
|
|
40
|
+
}));
|
|
41
|
+
m.displayName = i.Title.displayName;
|
|
42
|
+
var h = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Description, {
|
|
43
|
+
ref: a,
|
|
44
|
+
className: e("text-sm text-muted-foreground", t),
|
|
45
|
+
...r
|
|
46
|
+
}));
|
|
47
|
+
h.displayName = i.Description.displayName;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { o as Dialog, l as DialogClose, d as DialogContent, h as DialogDescription, p as DialogFooter, f as DialogHeader, u as DialogOverlay, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
|
package/dist/drawer.mjs
CHANGED
|
@@ -1,98 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
));
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
className: s("grid gap-1.5 p-4 text-center sm:text-left", e),
|
|
51
|
-
...r
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
f.displayName = "DrawerHeader";
|
|
55
|
-
const w = ({
|
|
56
|
-
className: e,
|
|
57
|
-
...r
|
|
58
|
-
}) => /* @__PURE__ */ t(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
className: s("mt-auto flex flex-col gap-2 p-4", e),
|
|
62
|
-
...r
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
w.displayName = "DrawerFooter";
|
|
66
|
-
const D = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
|
|
67
|
-
a.Title,
|
|
68
|
-
{
|
|
69
|
-
ref: o,
|
|
70
|
-
className: s(
|
|
71
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
72
|
-
e
|
|
73
|
-
),
|
|
74
|
-
...r
|
|
75
|
-
}
|
|
76
|
-
));
|
|
77
|
-
D.displayName = a.Title.displayName;
|
|
78
|
-
const x = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
|
|
79
|
-
a.Description,
|
|
80
|
-
{
|
|
81
|
-
ref: o,
|
|
82
|
-
className: s("text-sm text-muted-foreground", e),
|
|
83
|
-
...r
|
|
84
|
-
}
|
|
85
|
-
));
|
|
86
|
-
x.displayName = a.Description.displayName;
|
|
87
|
-
export {
|
|
88
|
-
n as Drawer,
|
|
89
|
-
b as DrawerClose,
|
|
90
|
-
p as DrawerContent,
|
|
91
|
-
x as DrawerDescription,
|
|
92
|
-
w as DrawerFooter,
|
|
93
|
-
f as DrawerHeader,
|
|
94
|
-
d as DrawerOverlay,
|
|
95
|
-
c as DrawerPortal,
|
|
96
|
-
D as DrawerTitle,
|
|
97
|
-
u as DrawerTrigger
|
|
98
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "./utils.mjs";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { Drawer as i } from "vaul";
|
|
6
|
+
//#region src/components/drawer.tsx
|
|
7
|
+
var a = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ n(i.Root, {
|
|
8
|
+
shouldScaleBackground: e,
|
|
9
|
+
...t
|
|
10
|
+
});
|
|
11
|
+
a.displayName = "Drawer";
|
|
12
|
+
var o = i.Trigger, s = i.Portal, c = i.Close, l = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Overlay, {
|
|
13
|
+
ref: a,
|
|
14
|
+
className: e("fixed inset-0 z-50 bg-black/80", t),
|
|
15
|
+
...r
|
|
16
|
+
}));
|
|
17
|
+
l.displayName = i.Overlay.displayName;
|
|
18
|
+
var u = t.forwardRef(({ className: t, children: a, ...o }, c) => /* @__PURE__ */ r(s, { children: [/* @__PURE__ */ n(l, {}), /* @__PURE__ */ r(i.Content, {
|
|
19
|
+
ref: c,
|
|
20
|
+
className: e("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", t),
|
|
21
|
+
...o,
|
|
22
|
+
children: [/* @__PURE__ */ n("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), a]
|
|
23
|
+
})] }));
|
|
24
|
+
u.displayName = "DrawerContent";
|
|
25
|
+
var d = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
26
|
+
className: e("grid gap-1.5 p-4 text-center sm:text-left", t),
|
|
27
|
+
...r
|
|
28
|
+
});
|
|
29
|
+
d.displayName = "DrawerHeader";
|
|
30
|
+
var f = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
31
|
+
className: e("mt-auto flex flex-col gap-2 p-4", t),
|
|
32
|
+
...r
|
|
33
|
+
});
|
|
34
|
+
f.displayName = "DrawerFooter";
|
|
35
|
+
var p = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Title, {
|
|
36
|
+
ref: a,
|
|
37
|
+
className: e("text-lg font-semibold leading-none tracking-tight", t),
|
|
38
|
+
...r
|
|
39
|
+
}));
|
|
40
|
+
p.displayName = i.Title.displayName;
|
|
41
|
+
var m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Description, {
|
|
42
|
+
ref: a,
|
|
43
|
+
className: e("text-sm text-muted-foreground", t),
|
|
44
|
+
...r
|
|
45
|
+
}));
|
|
46
|
+
m.displayName = i.Description.displayName;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { a as Drawer, c as DrawerClose, u as DrawerContent, m as DrawerDescription, f as DrawerFooter, d as DrawerHeader, l as DrawerOverlay, s as DrawerPortal, p as DrawerTitle, o as DrawerTrigger };
|