@definable/ui 0.1.32 → 0.1.35
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/components/alert-dialog.js +15 -15
- package/dist/components/alert.js +21 -21
- package/dist/components/avatar.js +7 -7
- package/dist/components/badge.js +10 -10
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +20 -18
- package/dist/components/calendar.js +26 -26
- package/dist/components/card.js +14 -14
- package/dist/components/carousel.js +39 -39
- package/dist/components/checkbox.js +7 -7
- package/dist/components/collapse.js +17 -17
- package/dist/components/command-menu.js +30 -30
- package/dist/components/command.js +52 -52
- package/dist/components/confirmation-modal.js +23 -23
- package/dist/components/context-menu.js +30 -30
- package/dist/components/dialog.js +32 -32
- package/dist/components/drawer.js +6 -6
- package/dist/components/dropdown-menu.js +16 -16
- package/dist/components/image-cropper-modal.js +27 -27
- package/dist/components/image-cropper.js +27 -27
- package/dist/components/input.js +9 -9
- package/dist/components/loader.js +3 -3
- package/dist/components/loading-placeholder.js +4 -4
- package/dist/components/mention.js +18 -18
- package/dist/components/modal.js +39 -39
- package/dist/components/picker.js +30 -30
- package/dist/components/popover.js +7 -7
- package/dist/components/progress.js +13 -13
- package/dist/components/radio-group.js +19 -19
- package/dist/components/scroll-area.js +20 -20
- package/dist/components/select.js +25 -25
- package/dist/components/selection-bar.js +17 -17
- package/dist/components/separator.js +8 -8
- package/dist/components/skeleton.js +8 -8
- package/dist/components/slider.js +11 -11
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch.js +8 -8
- package/dist/components/table-empty.js +6 -6
- package/dist/components/table-mobile.js +45 -45
- package/dist/components/table.js +66 -66
- package/dist/components/tabs.js +16 -16
- package/dist/components/textarea.js +4 -4
- package/dist/components/use-toast.js +9 -9
- package/dist/index.js +1 -1
- package/dist/{stepper-modal-JXpOXOV2.js → stepper-modal-Bh6gsg8o.js} +79 -79
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
|
-
import { motion as
|
|
3
|
+
import { motion as n, AnimatePresence as f } from "framer-motion";
|
|
4
4
|
import { ChevronDown as p } from "lucide-react";
|
|
5
5
|
import { cn as i } from "../lib/utils.js";
|
|
6
|
-
function
|
|
7
|
-
title:
|
|
6
|
+
function w({
|
|
7
|
+
title: o,
|
|
8
8
|
children: r,
|
|
9
9
|
defaultOpen: s = !1,
|
|
10
10
|
className: l,
|
|
11
11
|
titleClassName: m,
|
|
12
12
|
contentClassName: c
|
|
13
13
|
}) {
|
|
14
|
-
const [
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
14
|
+
const [e, d] = h.useState(s);
|
|
15
|
+
return /* @__PURE__ */ a("div", { className: i("border rounded-lg", l), children: [
|
|
16
|
+
/* @__PURE__ */ a(
|
|
17
17
|
"button",
|
|
18
18
|
{
|
|
19
|
-
onClick: () => d(!
|
|
19
|
+
onClick: () => d(!e),
|
|
20
20
|
className: "flex items-center justify-between w-full text-left",
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
22
|
+
/* @__PURE__ */ t("h3", { className: i("text-sm font-sm", m), children: o }),
|
|
23
|
+
/* @__PURE__ */ t(
|
|
24
|
+
n.div,
|
|
25
25
|
{
|
|
26
|
-
animate: { rotate:
|
|
26
|
+
animate: { rotate: e ? 180 : 0 },
|
|
27
27
|
transition: { duration: 0.2 },
|
|
28
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ t(p, { className: "h-5 w-5 text-tertiary" })
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
33
|
),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
34
|
+
/* @__PURE__ */ t(f, { initial: !1, children: e && /* @__PURE__ */ t(
|
|
35
|
+
n.div,
|
|
36
36
|
{
|
|
37
37
|
initial: { height: 0, opacity: 0 },
|
|
38
38
|
animate: { height: "auto", opacity: 1 },
|
|
39
39
|
exit: { height: 0, opacity: 0 },
|
|
40
40
|
transition: { duration: 0.2 },
|
|
41
41
|
className: "overflow-hidden",
|
|
42
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ t("div", { className: i("p-4 pt-0", c), children: r })
|
|
43
43
|
}
|
|
44
44
|
) })
|
|
45
45
|
] });
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
w as Collapse
|
|
49
49
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { CommandDialog as
|
|
2
|
+
import { CommandDialog as d, Command as a, CommandInput as i, CommandList as h, CommandEmpty as u, CommandGroup as c, CommandItem as l, CommandSeparator as p } from "./command.js";
|
|
3
3
|
import { useEffect as f, useCallback as g, useState as x } from "react";
|
|
4
|
-
import { Home as
|
|
5
|
-
function
|
|
4
|
+
import { Home as y, FileText as S, FolderOpen as b, Settings as N, Search as v } from "lucide-react";
|
|
5
|
+
function C({ open: r, onOpenChange: o }) {
|
|
6
6
|
f(() => {
|
|
7
|
-
const m = (
|
|
8
|
-
|
|
7
|
+
const m = (s) => {
|
|
8
|
+
s.key === "k" && (s.metaKey || s.ctrlKey) && (s.preventDefault(), o(!r));
|
|
9
9
|
};
|
|
10
10
|
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
11
|
-
}, [
|
|
12
|
-
const
|
|
11
|
+
}, [r, o]);
|
|
12
|
+
const t = g((m) => {
|
|
13
13
|
o(!1), m();
|
|
14
14
|
}, [o]);
|
|
15
|
-
return /* @__PURE__ */ e(
|
|
15
|
+
return /* @__PURE__ */ e(d, { open: r, onOpenChange: o, children: /* @__PURE__ */ n(a, { className: "rounded-lg border shadow-md", children: [
|
|
16
16
|
/* @__PURE__ */ e(i, { placeholder: "Type a command or search..." }),
|
|
17
|
-
/* @__PURE__ */ n(
|
|
18
|
-
/* @__PURE__ */ e(
|
|
19
|
-
/* @__PURE__ */ n(
|
|
17
|
+
/* @__PURE__ */ n(h, { children: [
|
|
18
|
+
/* @__PURE__ */ e(u, { children: "No results found." }),
|
|
19
|
+
/* @__PURE__ */ n(c, { heading: "Suggestions", children: [
|
|
20
20
|
/* @__PURE__ */ n(
|
|
21
|
-
|
|
21
|
+
l,
|
|
22
22
|
{
|
|
23
|
-
onSelect: () =>
|
|
23
|
+
onSelect: () => t(() => console.log("Home")),
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ e(y, { className: "mr-2 h-4 w-4" }),
|
|
26
26
|
/* @__PURE__ */ e("span", { children: "Home" })
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
30
|
/* @__PURE__ */ n(
|
|
31
|
-
|
|
31
|
+
l,
|
|
32
32
|
{
|
|
33
|
-
onSelect: () =>
|
|
33
|
+
onSelect: () => t(() => console.log("Documents")),
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ e(
|
|
35
|
+
/* @__PURE__ */ e(S, { className: "mr-2 h-4 w-4" }),
|
|
36
36
|
/* @__PURE__ */ e("span", { children: "Documents" })
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
40
|
/* @__PURE__ */ n(
|
|
41
|
-
|
|
41
|
+
l,
|
|
42
42
|
{
|
|
43
|
-
onSelect: () =>
|
|
43
|
+
onSelect: () => t(() => console.log("Projects")),
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */ e(
|
|
45
|
+
/* @__PURE__ */ e(b, { className: "mr-2 h-4 w-4" }),
|
|
46
46
|
/* @__PURE__ */ e("span", { children: "Projects" })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
] }),
|
|
51
51
|
/* @__PURE__ */ e(p, {}),
|
|
52
|
-
/* @__PURE__ */ e(
|
|
53
|
-
|
|
52
|
+
/* @__PURE__ */ e(c, { heading: "Settings", children: /* @__PURE__ */ n(
|
|
53
|
+
l,
|
|
54
54
|
{
|
|
55
|
-
onSelect: () =>
|
|
55
|
+
onSelect: () => t(() => console.log("Settings")),
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(N, { className: "mr-2 h-4 w-4" }),
|
|
58
58
|
/* @__PURE__ */ e("span", { children: "Settings" })
|
|
59
59
|
]
|
|
60
60
|
}
|
|
@@ -63,27 +63,27 @@ function w({ open: t, onOpenChange: o }) {
|
|
|
63
63
|
] }) });
|
|
64
64
|
}
|
|
65
65
|
function E() {
|
|
66
|
-
const [
|
|
66
|
+
const [r, o] = x(!1);
|
|
67
67
|
return /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-2", children: [
|
|
68
68
|
/* @__PURE__ */ n(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
71
|
onClick: () => o(!0),
|
|
72
|
-
className: "inline-flex items-center justify-center gap-1 rounded-md border border-
|
|
72
|
+
className: "inline-flex items-center justify-center gap-1 rounded-md border border-light bg-secondary px-4 py-2 text-sm font-medium text-primary hover:bg-hover hover:text-primary",
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */ e(
|
|
74
|
+
/* @__PURE__ */ e(v, { className: "h-4 w-4" }),
|
|
75
75
|
/* @__PURE__ */ e("span", { children: "Search..." }),
|
|
76
|
-
/* @__PURE__ */ n("kbd", { className: "pointer-events-none ml-1 inline-flex h-5 select-none items-center gap-1 rounded border border-
|
|
76
|
+
/* @__PURE__ */ n("kbd", { className: "pointer-events-none ml-1 inline-flex h-5 select-none items-center gap-1 rounded border border-light bg-hover px-1.5 font-mono text-[10px] font-medium text-tertiary", children: [
|
|
77
77
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "⌘" }),
|
|
78
78
|
"K"
|
|
79
79
|
] })
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */ e(
|
|
83
|
+
/* @__PURE__ */ e(C, { open: r, onOpenChange: o })
|
|
84
84
|
] });
|
|
85
85
|
}
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
C as CommandMenu,
|
|
88
88
|
E as CommandMenuDemo
|
|
89
89
|
};
|
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { Command as t } from "cmdk";
|
|
4
|
-
import { Search as
|
|
4
|
+
import { Search as i } from "lucide-react";
|
|
5
5
|
import { cn as s } from "../lib/utils.js";
|
|
6
|
-
const
|
|
6
|
+
const n = r.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ o(
|
|
7
7
|
t,
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
9
|
+
ref: d,
|
|
10
10
|
className: s(
|
|
11
|
-
"flex h-full w-full flex-col overflow-hidden rounded-lg bg-
|
|
12
|
-
|
|
11
|
+
"flex h-full w-full flex-col overflow-hidden rounded-lg bg-card text-primary",
|
|
12
|
+
a
|
|
13
13
|
),
|
|
14
|
-
...
|
|
14
|
+
...e
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
|
-
|
|
17
|
+
n.displayName = t.displayName;
|
|
18
18
|
const b = ({
|
|
19
|
-
children:
|
|
20
|
-
open:
|
|
21
|
-
onOpenChange:
|
|
22
|
-
}) => /* @__PURE__ */
|
|
19
|
+
children: a,
|
|
20
|
+
open: e,
|
|
21
|
+
onOpenChange: d
|
|
22
|
+
}) => /* @__PURE__ */ o(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
className: s(
|
|
26
26
|
"fixed inset-0 z-50 bg-secondary/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
27
|
-
|
|
27
|
+
e ? "block" : "hidden"
|
|
28
28
|
),
|
|
29
|
-
onClick: (
|
|
30
|
-
|
|
29
|
+
onClick: (m) => {
|
|
30
|
+
m.target === m.currentTarget && d(!1);
|
|
31
31
|
},
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ o(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
|
-
className: "fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-lg border border-light bg-
|
|
36
|
-
children:
|
|
35
|
+
className: "fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-lg border border-light bg-card 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%]",
|
|
36
|
+
children: a
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
|
-
), p = r.forwardRef(({ className:
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
40
|
+
), p = r.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ l("div", { className: "flex items-center border-b border-light px-3", "cmdk-input-wrapper": "", children: [
|
|
41
|
+
/* @__PURE__ */ o(i, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
42
|
+
/* @__PURE__ */ o(
|
|
43
43
|
t.Input,
|
|
44
44
|
{
|
|
45
|
-
ref:
|
|
45
|
+
ref: d,
|
|
46
46
|
className: s(
|
|
47
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-
|
|
48
|
-
|
|
47
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-tertiary disabled:cursor-not-allowed disabled:opacity-50",
|
|
48
|
+
a
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...e
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
] }));
|
|
54
54
|
p.displayName = t.Input.displayName;
|
|
55
|
-
const c = r.forwardRef(({ className:
|
|
55
|
+
const c = r.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ o(
|
|
56
56
|
t.List,
|
|
57
57
|
{
|
|
58
|
-
ref:
|
|
59
|
-
className: s("max-h-[300px] overflow-y-auto overflow-x-hidden",
|
|
60
|
-
...
|
|
58
|
+
ref: d,
|
|
59
|
+
className: s("max-h-[300px] overflow-y-auto overflow-x-hidden", a),
|
|
60
|
+
...e
|
|
61
61
|
}
|
|
62
62
|
));
|
|
63
63
|
c.displayName = t.List.displayName;
|
|
64
|
-
const f = r.forwardRef((
|
|
64
|
+
const f = r.forwardRef((a, e) => /* @__PURE__ */ o(
|
|
65
65
|
t.Empty,
|
|
66
66
|
{
|
|
67
|
-
ref:
|
|
68
|
-
className: "py-6 text-center text-sm text-
|
|
69
|
-
...
|
|
67
|
+
ref: e,
|
|
68
|
+
className: "py-6 text-center text-sm text-tertiary",
|
|
69
|
+
...a
|
|
70
70
|
}
|
|
71
71
|
));
|
|
72
72
|
f.displayName = t.Empty.displayName;
|
|
73
|
-
const u = r.forwardRef(({ className:
|
|
73
|
+
const u = r.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ o(
|
|
74
74
|
t.Group,
|
|
75
75
|
{
|
|
76
|
-
ref:
|
|
76
|
+
ref: d,
|
|
77
77
|
className: s(
|
|
78
|
-
"overflow-hidden p-1 text-
|
|
79
|
-
|
|
78
|
+
"overflow-hidden p-1 text-primary [&_[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-tertiary",
|
|
79
|
+
a
|
|
80
80
|
),
|
|
81
|
-
...
|
|
81
|
+
...e
|
|
82
82
|
}
|
|
83
83
|
));
|
|
84
84
|
u.displayName = t.Group.displayName;
|
|
85
|
-
const
|
|
85
|
+
const y = r.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ o(
|
|
86
86
|
t.Separator,
|
|
87
87
|
{
|
|
88
|
-
ref:
|
|
89
|
-
className: s("-mx-1 h-px bg-
|
|
90
|
-
...
|
|
88
|
+
ref: d,
|
|
89
|
+
className: s("-mx-1 h-px bg-light", a),
|
|
90
|
+
...e
|
|
91
91
|
}
|
|
92
92
|
));
|
|
93
|
-
|
|
94
|
-
const
|
|
93
|
+
y.displayName = t.Separator.displayName;
|
|
94
|
+
const x = r.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ o(
|
|
95
95
|
t.Item,
|
|
96
96
|
{
|
|
97
|
-
ref:
|
|
97
|
+
ref: d,
|
|
98
98
|
className: s(
|
|
99
|
-
"relative flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none aria-selected:bg-
|
|
100
|
-
|
|
99
|
+
"relative flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none aria-selected:bg-hover aria-selected:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
100
|
+
a
|
|
101
101
|
),
|
|
102
|
-
...
|
|
102
|
+
...e
|
|
103
103
|
}
|
|
104
104
|
));
|
|
105
|
-
|
|
105
|
+
x.displayName = t.Item.displayName;
|
|
106
106
|
export {
|
|
107
|
-
|
|
107
|
+
n as Command,
|
|
108
108
|
b as CommandDialog,
|
|
109
109
|
f as CommandEmpty,
|
|
110
110
|
u as CommandGroup,
|
|
111
111
|
p as CommandInput,
|
|
112
|
-
|
|
112
|
+
x as CommandItem,
|
|
113
113
|
c as CommandList,
|
|
114
|
-
|
|
114
|
+
y as CommandSeparator
|
|
115
115
|
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as d, Fragment as s } from "react/jsx-runtime";
|
|
2
2
|
import { AlertTriangle as f } from "lucide-react";
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { Button as
|
|
3
|
+
import { Modal as h } from "./modal.js";
|
|
4
|
+
import { Button as a } from "./button.js";
|
|
5
5
|
function C({
|
|
6
|
-
isOpen:
|
|
7
|
-
onClose:
|
|
8
|
-
onConfirm:
|
|
9
|
-
title:
|
|
10
|
-
description:
|
|
11
|
-
confirmText:
|
|
6
|
+
isOpen: n,
|
|
7
|
+
onClose: t,
|
|
8
|
+
onConfirm: o,
|
|
9
|
+
title: m,
|
|
10
|
+
description: e,
|
|
11
|
+
confirmText: l = "Confirm",
|
|
12
12
|
cancelText: c = "Cancel",
|
|
13
|
-
type:
|
|
13
|
+
type: i = "danger"
|
|
14
14
|
}) {
|
|
15
15
|
return /* @__PURE__ */ r(
|
|
16
|
-
|
|
16
|
+
h,
|
|
17
17
|
{
|
|
18
|
-
isOpen:
|
|
19
|
-
onClose:
|
|
18
|
+
isOpen: n,
|
|
19
|
+
onClose: t,
|
|
20
20
|
size: "md",
|
|
21
21
|
zIndexClassName: "z-[1000]",
|
|
22
|
-
title:
|
|
23
|
-
description:
|
|
24
|
-
icon: /* @__PURE__ */ r(f, { className:
|
|
25
|
-
footer: /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ r(
|
|
22
|
+
title: m,
|
|
23
|
+
description: e,
|
|
24
|
+
icon: /* @__PURE__ */ r(f, { className: "h-5 w-5 text-white" }),
|
|
25
|
+
footer: /* @__PURE__ */ d(s, { children: [
|
|
26
|
+
/* @__PURE__ */ r(a, { variant: "ghost", onClick: t, children: c }),
|
|
27
27
|
/* @__PURE__ */ r(
|
|
28
|
-
|
|
28
|
+
a,
|
|
29
29
|
{
|
|
30
|
-
variant:
|
|
30
|
+
variant: i === "danger" ? "destructive" : "default",
|
|
31
31
|
onClick: () => {
|
|
32
|
-
|
|
32
|
+
o(), t();
|
|
33
33
|
},
|
|
34
|
-
children:
|
|
34
|
+
children: l
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
] }),
|
|
38
|
-
children: /* @__PURE__ */ r("div", { className: "p-4", children: /* @__PURE__ */ r("p", { className: "text-sm text-
|
|
38
|
+
children: /* @__PURE__ */ r("div", { className: "p-4", children: /* @__PURE__ */ r("p", { className: "text-sm text-tertiary", children: e }) })
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import d from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-context-menu";
|
|
4
4
|
import { cn as s } from "../lib/utils.js";
|
|
5
|
-
function
|
|
5
|
+
function N({
|
|
6
6
|
children: o,
|
|
7
7
|
menuContent: a,
|
|
8
8
|
className: n = "",
|
|
9
9
|
disabled: r = !1,
|
|
10
|
-
onContextMenuOpen:
|
|
11
|
-
onContextMenuClose:
|
|
10
|
+
onContextMenuOpen: i,
|
|
11
|
+
onContextMenuClose: m
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ l(
|
|
14
14
|
t.Root,
|
|
15
15
|
{
|
|
16
|
-
onOpenChange: (
|
|
17
|
-
|
|
16
|
+
onOpenChange: (c) => {
|
|
17
|
+
c ? i == null || i() : m == null || m();
|
|
18
18
|
},
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ e(t.Trigger, { disabled: r, asChild: !0, className: s("block", n), children: /* @__PURE__ */ e("div", { children: o }) }),
|
|
21
21
|
/* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
|
|
22
22
|
t.Content,
|
|
23
23
|
{
|
|
24
|
-
className: "min-w-[220px] overflow-hidden rounded-md border bg-
|
|
24
|
+
className: "min-w-[220px] overflow-hidden rounded-md border bg-card p-1 shadow-md animate-in fade-in-80 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",
|
|
25
25
|
children: a
|
|
26
26
|
}
|
|
27
27
|
) })
|
|
@@ -29,33 +29,33 @@ function y({
|
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
const u =
|
|
32
|
+
const u = d.forwardRef(({ className: o, ...a }, n) => /* @__PURE__ */ e(
|
|
33
33
|
t.Item,
|
|
34
34
|
{
|
|
35
35
|
ref: n,
|
|
36
36
|
className: s(
|
|
37
|
-
"relative cursor-pointer flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-
|
|
37
|
+
"relative cursor-pointer flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-hover focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
38
38
|
o
|
|
39
39
|
),
|
|
40
40
|
...a
|
|
41
41
|
}
|
|
42
42
|
));
|
|
43
43
|
u.displayName = "ContextMenuItem";
|
|
44
|
-
const
|
|
44
|
+
const p = d.forwardRef(({ className: o, ...a }, n) => /* @__PURE__ */ e(
|
|
45
45
|
t.Separator,
|
|
46
46
|
{
|
|
47
47
|
ref: n,
|
|
48
|
-
className: s("-mx-1 my-1 h-px bg-
|
|
48
|
+
className: s("-mx-1 my-1 h-px bg-light", o),
|
|
49
49
|
...a
|
|
50
50
|
}
|
|
51
51
|
));
|
|
52
|
-
|
|
53
|
-
const C = t.Sub,
|
|
52
|
+
p.displayName = "ContextMenuSeparator";
|
|
53
|
+
const C = t.Sub, f = d.forwardRef(({ className: o, inset: a, children: n, ...r }, i) => /* @__PURE__ */ l(
|
|
54
54
|
t.SubTrigger,
|
|
55
55
|
{
|
|
56
|
-
ref:
|
|
56
|
+
ref: i,
|
|
57
57
|
className: s(
|
|
58
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-
|
|
58
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-hover focus:text-primary data-[state=open]:bg-hover data-[state=open]:text-primary",
|
|
59
59
|
a && "pl-8",
|
|
60
60
|
o
|
|
61
61
|
),
|
|
@@ -81,25 +81,25 @@ const C = t.Sub, p = i.forwardRef(({ className: o, inset: a, children: n, ...r }
|
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
));
|
|
84
|
-
|
|
85
|
-
const h =
|
|
84
|
+
f.displayName = "ContextMenuSubTrigger";
|
|
85
|
+
const h = d.forwardRef(({ className: o, ...a }, n) => /* @__PURE__ */ e(
|
|
86
86
|
t.SubContent,
|
|
87
87
|
{
|
|
88
88
|
ref: n,
|
|
89
89
|
className: s(
|
|
90
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-
|
|
90
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-card p-1 shadow-md animate-in 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",
|
|
91
91
|
o
|
|
92
92
|
),
|
|
93
93
|
...a
|
|
94
94
|
}
|
|
95
95
|
));
|
|
96
96
|
h.displayName = "ContextMenuSubContent";
|
|
97
|
-
const k = t.Group, R = t.RadioGroup, x =
|
|
97
|
+
const k = t.Group, R = t.RadioGroup, x = d.forwardRef(({ className: o, children: a, ...n }, r) => /* @__PURE__ */ l(
|
|
98
98
|
t.RadioItem,
|
|
99
99
|
{
|
|
100
100
|
ref: r,
|
|
101
101
|
className: s(
|
|
102
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-
|
|
102
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-hover focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
103
103
|
o
|
|
104
104
|
),
|
|
105
105
|
...n,
|
|
@@ -125,12 +125,12 @@ const k = t.Group, R = t.RadioGroup, x = i.forwardRef(({ className: o, children:
|
|
|
125
125
|
}
|
|
126
126
|
));
|
|
127
127
|
x.displayName = "ContextMenuRadioItem";
|
|
128
|
-
const b =
|
|
128
|
+
const b = d.forwardRef(({ className: o, inset: a, ...n }, r) => /* @__PURE__ */ e(
|
|
129
129
|
t.Label,
|
|
130
130
|
{
|
|
131
131
|
ref: r,
|
|
132
132
|
className: s(
|
|
133
|
-
"px-2 py-1.5 text-sm font-semibold text-
|
|
133
|
+
"px-2 py-1.5 text-sm font-semibold text-primary",
|
|
134
134
|
a && "pl-8",
|
|
135
135
|
o
|
|
136
136
|
),
|
|
@@ -138,12 +138,12 @@ const b = i.forwardRef(({ className: o, inset: a, ...n }, r) => /* @__PURE__ */
|
|
|
138
138
|
}
|
|
139
139
|
));
|
|
140
140
|
b.displayName = "ContextMenuLabel";
|
|
141
|
-
const
|
|
141
|
+
const w = d.forwardRef(({ className: o, children: a, checked: n, ...r }, i) => /* @__PURE__ */ l(
|
|
142
142
|
t.CheckboxItem,
|
|
143
143
|
{
|
|
144
|
-
ref:
|
|
144
|
+
ref: i,
|
|
145
145
|
className: s(
|
|
146
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-
|
|
146
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-hover focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
147
147
|
o
|
|
148
148
|
),
|
|
149
149
|
checked: n,
|
|
@@ -169,17 +169,17 @@ const g = i.forwardRef(({ className: o, children: a, checked: n, ...r }, d) => /
|
|
|
169
169
|
]
|
|
170
170
|
}
|
|
171
171
|
));
|
|
172
|
-
|
|
172
|
+
w.displayName = "ContextMenuCheckboxItem";
|
|
173
173
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
N as ContextMenu,
|
|
175
|
+
w as ContextMenuCheckboxItem,
|
|
176
176
|
k as ContextMenuGroup,
|
|
177
177
|
u as ContextMenuItem,
|
|
178
178
|
b as ContextMenuLabel,
|
|
179
179
|
R as ContextMenuRadioGroup,
|
|
180
180
|
x as ContextMenuRadioItem,
|
|
181
|
-
|
|
181
|
+
p as ContextMenuSeparator,
|
|
182
182
|
C as ContextMenuSub,
|
|
183
183
|
h as ContextMenuSubContent,
|
|
184
|
-
|
|
184
|
+
f as ContextMenuSubTrigger
|
|
185
185
|
};
|