@arcadeai/design-system 0.0.0
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/README.md +128 -0
- package/dist/check-CxcShTlQ.js +11 -0
- package/dist/chevron-down-D_a-ccxi.js +11 -0
- package/dist/chevron-right-DriXIqe5.js +11 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +195 -0
- package/dist/components/ui/atoms/accordion.d.ts +7 -0
- package/dist/components/ui/atoms/accordion.js +289 -0
- package/dist/components/ui/atoms/alert.d.ts +9 -0
- package/dist/components/ui/atoms/alert.js +66 -0
- package/dist/components/ui/atoms/avatar.d.ts +6 -0
- package/dist/components/ui/atoms/avatar.js +130 -0
- package/dist/components/ui/atoms/badge.d.ts +9 -0
- package/dist/components/ui/atoms/badge.js +41 -0
- package/dist/components/ui/atoms/breadcrumb.d.ts +11 -0
- package/dist/components/ui/atoms/breadcrumb.js +115 -0
- package/dist/components/ui/atoms/button.d.ts +10 -0
- package/dist/components/ui/atoms/button.js +51 -0
- package/dist/components/ui/atoms/card.d.ts +9 -0
- package/dist/components/ui/atoms/card.js +90 -0
- package/dist/components/ui/atoms/chart.d.ts +68 -0
- package/dist/components/ui/atoms/chart.js +10477 -0
- package/dist/components/ui/atoms/collapsible.d.ts +5 -0
- package/dist/components/ui/atoms/collapsible.js +34 -0
- package/dist/components/ui/atoms/command.d.ts +18 -0
- package/dist/components/ui/atoms/command.js +490 -0
- package/dist/components/ui/atoms/dialog.d.ts +15 -0
- package/dist/components/ui/atoms/dialog.js +135 -0
- package/dist/components/ui/atoms/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/atoms/dropdown-menu.js +1035 -0
- package/dist/components/ui/atoms/form.d.ts +24 -0
- package/dist/components/ui/atoms/form.js +297 -0
- package/dist/components/ui/atoms/hover-card.d.ts +6 -0
- package/dist/components/ui/atoms/hover-card.js +211 -0
- package/dist/components/ui/atoms/index.d.ts +33 -0
- package/dist/components/ui/atoms/index.js +195 -0
- package/dist/components/ui/atoms/input.d.ts +3 -0
- package/dist/components/ui/atoms/input.js +21 -0
- package/dist/components/ui/atoms/label.d.ts +4 -0
- package/dist/components/ui/atoms/label.js +36 -0
- package/dist/components/ui/atoms/popover.d.ts +7 -0
- package/dist/components/ui/atoms/popover.js +266 -0
- package/dist/components/ui/atoms/progress.d.ts +4 -0
- package/dist/components/ui/atoms/progress.js +107 -0
- package/dist/components/ui/atoms/resizable.d.ts +8 -0
- package/dist/components/ui/atoms/resizable.js +1564 -0
- package/dist/components/ui/atoms/scroll-area.d.ts +5 -0
- package/dist/components/ui/atoms/scroll-area.js +580 -0
- package/dist/components/ui/atoms/select.d.ts +15 -0
- package/dist/components/ui/atoms/select.js +1000 -0
- package/dist/components/ui/atoms/separator.d.ts +4 -0
- package/dist/components/ui/atoms/separator.js +44 -0
- package/dist/components/ui/atoms/sheet.d.ts +14 -0
- package/dist/components/ui/atoms/sheet.js +127 -0
- package/dist/components/ui/atoms/sidebar.d.ts +69 -0
- package/dist/components/ui/atoms/sidebar.js +602 -0
- package/dist/components/ui/atoms/skeleton.d.ts +2 -0
- package/dist/components/ui/atoms/skeleton.js +15 -0
- package/dist/components/ui/atoms/slider.d.ts +4 -0
- package/dist/components/ui/atoms/slider.js +484 -0
- package/dist/components/ui/atoms/sonner.d.ts +3 -0
- package/dist/components/ui/atoms/sonner.js +788 -0
- package/dist/components/ui/atoms/switch.d.ts +4 -0
- package/dist/components/ui/atoms/switch.js +155 -0
- package/dist/components/ui/atoms/table.d.ts +10 -0
- package/dist/components/ui/atoms/table.js +114 -0
- package/dist/components/ui/atoms/tabs.d.ts +7 -0
- package/dist/components/ui/atoms/tabs.js +218 -0
- package/dist/components/ui/atoms/textarea.d.ts +3 -0
- package/dist/components/ui/atoms/textarea.js +18 -0
- package/dist/components/ui/atoms/toggle.d.ts +9 -0
- package/dist/components/ui/atoms/toggle.js +70 -0
- package/dist/components/ui/atoms/tooltip.d.ts +7 -0
- package/dist/components/ui/atoms/tooltip.js +376 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +195 -0
- package/dist/createLucideIcon-B6fy1GTR.js +94 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index-BAhNQL1u.js +675 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-ByaXH_ih.js +10 -0
- package/dist/index-C9KW2H79.js +36 -0
- package/dist/index-CB1Wkg0G.js +83 -0
- package/dist/index-CHDs-SiB.js +27 -0
- package/dist/index-CJFGOBPb.js +122 -0
- package/dist/index-CL4N9wMT.js +259 -0
- package/dist/index-CuMpq4Un.js +47 -0
- package/dist/index-CxK6rt_N.js +119 -0
- package/dist/index-D2uXV4lz.js +181 -0
- package/dist/index-DLeNytVF.js +9 -0
- package/dist/index-DYfkNB0n.js +54 -0
- package/dist/index-DdnpnyX2.js +34 -0
- package/dist/index-DuekHEmj.js +6 -0
- package/dist/index-DwYXX2sM.js +13 -0
- package/dist/index-Dy7YuPrV.js +1532 -0
- package/dist/index-QMp1pYFl.js +145 -0
- package/dist/index-UFb2E87s.js +70 -0
- package/dist/index-nluJZSbA.js +31 -0
- package/dist/index-p7nYL7BU.js +71 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/index-umR1UobZ.js +13 -0
- package/dist/index.css +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +4 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +195 -0
- package/dist/utils-Dy2WjYNJ.js +2744 -0
- package/package.json +100 -0
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
import { jsx as r, jsxs as re } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { c as g } from "../../../index-DLeNytVF.js";
|
|
4
|
+
import { u as F, b as Ce, c as xn } from "../../../index-CB1Wkg0G.js";
|
|
5
|
+
import { c as Re } from "../../../index-UFb2E87s.js";
|
|
6
|
+
import { u as be } from "../../../index-DYfkNB0n.js";
|
|
7
|
+
import { P as T, d as Dn } from "../../../index-C9KW2H79.js";
|
|
8
|
+
import { c as Sn } from "../../../index-CuMpq4Un.js";
|
|
9
|
+
import { u as In } from "../../../index-ByaXH_ih.js";
|
|
10
|
+
import { P as Pn, D as yn } from "../../../index-QMp1pYFl.js";
|
|
11
|
+
import { h as En, u as Nn, R as Tn, F as An } from "../../../index-BAhNQL1u.js";
|
|
12
|
+
import { u as Y } from "../../../index-umR1UobZ.js";
|
|
13
|
+
import { c as xe, R as De, A as On, C as kn, a as Ln } from "../../../index-Dy7YuPrV.js";
|
|
14
|
+
import { P as Z } from "../../../index-p7nYL7BU.js";
|
|
15
|
+
import { c as Se, I as Gn, R as Fn } from "../../../index-D2uXV4lz.js";
|
|
16
|
+
import { u as ae } from "../../../index-DwYXX2sM.js";
|
|
17
|
+
import { c as x } from "../../../utils-Dy2WjYNJ.js";
|
|
18
|
+
import { C as Kn } from "../../../check-CxcShTlQ.js";
|
|
19
|
+
import { c as $n } from "../../../createLucideIcon-B6fy1GTR.js";
|
|
20
|
+
import { C as Un } from "../../../chevron-right-DriXIqe5.js";
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.522.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
27
|
+
const zn = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Bn = $n("circle", zn);
|
|
28
|
+
var oe = ["Enter", " "], Vn = ["ArrowDown", "PageUp", "Home"], Ie = ["ArrowUp", "PageDown", "End"], jn = [...Vn, ...Ie], Xn = {
|
|
29
|
+
ltr: [...oe, "ArrowRight"],
|
|
30
|
+
rtl: [...oe, "ArrowLeft"]
|
|
31
|
+
}, Yn = {
|
|
32
|
+
ltr: ["ArrowLeft"],
|
|
33
|
+
rtl: ["ArrowRight"]
|
|
34
|
+
}, K = "Menu", [L, Hn, Wn] = Sn(K), [P, Pe] = Re(K, [
|
|
35
|
+
Wn,
|
|
36
|
+
xe,
|
|
37
|
+
Se
|
|
38
|
+
]), $ = xe(), ye = Se(), [Ee, S] = P(K), [Zn, U] = P(K), Ne = (e) => {
|
|
39
|
+
const { __scopeMenu: t, open: n = !1, children: o, dir: a, onOpenChange: c, modal: i = !0 } = e, d = $(t), [m, v] = s.useState(null), p = s.useRef(!1), u = ae(c), f = In(a);
|
|
40
|
+
return s.useEffect(() => {
|
|
41
|
+
const w = () => {
|
|
42
|
+
p.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
|
|
43
|
+
}, M = () => p.current = !1;
|
|
44
|
+
return document.addEventListener("keydown", w, { capture: !0 }), () => {
|
|
45
|
+
document.removeEventListener("keydown", w, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
|
|
46
|
+
};
|
|
47
|
+
}, []), /* @__PURE__ */ r(De, { ...d, children: /* @__PURE__ */ r(
|
|
48
|
+
Ee,
|
|
49
|
+
{
|
|
50
|
+
scope: t,
|
|
51
|
+
open: n,
|
|
52
|
+
onOpenChange: u,
|
|
53
|
+
content: m,
|
|
54
|
+
onContentChange: v,
|
|
55
|
+
children: /* @__PURE__ */ r(
|
|
56
|
+
Zn,
|
|
57
|
+
{
|
|
58
|
+
scope: t,
|
|
59
|
+
onClose: s.useCallback(() => u(!1), [u]),
|
|
60
|
+
isUsingKeyboardRef: p,
|
|
61
|
+
dir: f,
|
|
62
|
+
modal: i,
|
|
63
|
+
children: o
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
) });
|
|
68
|
+
};
|
|
69
|
+
Ne.displayName = K;
|
|
70
|
+
var qn = "MenuAnchor", se = s.forwardRef(
|
|
71
|
+
(e, t) => {
|
|
72
|
+
const { __scopeMenu: n, ...o } = e, a = $(n);
|
|
73
|
+
return /* @__PURE__ */ r(On, { ...a, ...o, ref: t });
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
se.displayName = qn;
|
|
77
|
+
var ce = "MenuPortal", [Jn, Te] = P(ce, {
|
|
78
|
+
forceMount: void 0
|
|
79
|
+
}), Ae = (e) => {
|
|
80
|
+
const { __scopeMenu: t, forceMount: n, children: o, container: a } = e, c = S(ce, t);
|
|
81
|
+
return /* @__PURE__ */ r(Jn, { scope: t, forceMount: n, children: /* @__PURE__ */ r(Z, { present: n || c.open, children: /* @__PURE__ */ r(Pn, { asChild: !0, container: a, children: o }) }) });
|
|
82
|
+
};
|
|
83
|
+
Ae.displayName = ce;
|
|
84
|
+
var C = "MenuContent", [Qn, ue] = P(C), Oe = s.forwardRef(
|
|
85
|
+
(e, t) => {
|
|
86
|
+
const n = Te(C, e.__scopeMenu), { forceMount: o = n.forceMount, ...a } = e, c = S(C, e.__scopeMenu), i = U(C, e.__scopeMenu);
|
|
87
|
+
return /* @__PURE__ */ r(L.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ r(Z, { present: o || c.open, children: /* @__PURE__ */ r(L.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ r(et, { ...a, ref: t }) : /* @__PURE__ */ r(nt, { ...a, ref: t }) }) }) });
|
|
88
|
+
}
|
|
89
|
+
), et = s.forwardRef(
|
|
90
|
+
(e, t) => {
|
|
91
|
+
const n = S(C, e.__scopeMenu), o = s.useRef(null), a = F(t, o);
|
|
92
|
+
return s.useEffect(() => {
|
|
93
|
+
const c = o.current;
|
|
94
|
+
if (c) return En(c);
|
|
95
|
+
}, []), /* @__PURE__ */ r(
|
|
96
|
+
ie,
|
|
97
|
+
{
|
|
98
|
+
...e,
|
|
99
|
+
ref: a,
|
|
100
|
+
trapFocus: n.open,
|
|
101
|
+
disableOutsidePointerEvents: n.open,
|
|
102
|
+
disableOutsideScroll: !0,
|
|
103
|
+
onFocusOutside: g(
|
|
104
|
+
e.onFocusOutside,
|
|
105
|
+
(c) => c.preventDefault(),
|
|
106
|
+
{ checkForDefaultPrevented: !1 }
|
|
107
|
+
),
|
|
108
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
), nt = s.forwardRef((e, t) => {
|
|
113
|
+
const n = S(C, e.__scopeMenu);
|
|
114
|
+
return /* @__PURE__ */ r(
|
|
115
|
+
ie,
|
|
116
|
+
{
|
|
117
|
+
...e,
|
|
118
|
+
ref: t,
|
|
119
|
+
trapFocus: !1,
|
|
120
|
+
disableOutsidePointerEvents: !1,
|
|
121
|
+
disableOutsideScroll: !1,
|
|
122
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}), tt = xn("MenuContent.ScrollLock"), ie = s.forwardRef(
|
|
126
|
+
(e, t) => {
|
|
127
|
+
const {
|
|
128
|
+
__scopeMenu: n,
|
|
129
|
+
loop: o = !1,
|
|
130
|
+
trapFocus: a,
|
|
131
|
+
onOpenAutoFocus: c,
|
|
132
|
+
onCloseAutoFocus: i,
|
|
133
|
+
disableOutsidePointerEvents: d,
|
|
134
|
+
onEntryFocus: m,
|
|
135
|
+
onEscapeKeyDown: v,
|
|
136
|
+
onPointerDownOutside: p,
|
|
137
|
+
onFocusOutside: u,
|
|
138
|
+
onInteractOutside: f,
|
|
139
|
+
onDismiss: w,
|
|
140
|
+
disableOutsideScroll: M,
|
|
141
|
+
...I
|
|
142
|
+
} = e, y = S(C, n), A = U(C, n), z = $(n), B = ye(n), me = Hn(n), [wn, ve] = s.useState(null), V = s.useRef(null), hn = F(t, V, y.onContentChange), j = s.useRef(0), X = s.useRef(""), _n = s.useRef(0), Q = s.useRef(null), ge = s.useRef("right"), ee = s.useRef(0), Cn = M ? Tn : s.Fragment, Rn = M ? { as: tt, allowPinchZoom: !0 } : void 0, bn = (l) => {
|
|
143
|
+
var N, we;
|
|
144
|
+
const _ = X.current + l, R = me().filter((b) => !b.disabled), D = document.activeElement, ne = (N = R.find((b) => b.ref.current === D)) == null ? void 0 : N.textValue, te = R.map((b) => b.textValue), Me = mt(te, _, ne), O = (we = R.find((b) => b.textValue === Me)) == null ? void 0 : we.ref.current;
|
|
145
|
+
(function b(he) {
|
|
146
|
+
X.current = he, window.clearTimeout(j.current), he !== "" && (j.current = window.setTimeout(() => b(""), 1e3));
|
|
147
|
+
})(_), O && setTimeout(() => O.focus());
|
|
148
|
+
};
|
|
149
|
+
s.useEffect(() => () => window.clearTimeout(j.current), []), Nn();
|
|
150
|
+
const E = s.useCallback((l) => {
|
|
151
|
+
var R, D;
|
|
152
|
+
return ge.current === ((R = Q.current) == null ? void 0 : R.side) && gt(l, (D = Q.current) == null ? void 0 : D.area);
|
|
153
|
+
}, []);
|
|
154
|
+
return /* @__PURE__ */ r(
|
|
155
|
+
Qn,
|
|
156
|
+
{
|
|
157
|
+
scope: n,
|
|
158
|
+
searchRef: X,
|
|
159
|
+
onItemEnter: s.useCallback(
|
|
160
|
+
(l) => {
|
|
161
|
+
E(l) && l.preventDefault();
|
|
162
|
+
},
|
|
163
|
+
[E]
|
|
164
|
+
),
|
|
165
|
+
onItemLeave: s.useCallback(
|
|
166
|
+
(l) => {
|
|
167
|
+
var _;
|
|
168
|
+
E(l) || ((_ = V.current) == null || _.focus(), ve(null));
|
|
169
|
+
},
|
|
170
|
+
[E]
|
|
171
|
+
),
|
|
172
|
+
onTriggerLeave: s.useCallback(
|
|
173
|
+
(l) => {
|
|
174
|
+
E(l) && l.preventDefault();
|
|
175
|
+
},
|
|
176
|
+
[E]
|
|
177
|
+
),
|
|
178
|
+
pointerGraceTimerRef: _n,
|
|
179
|
+
onPointerGraceIntentChange: s.useCallback((l) => {
|
|
180
|
+
Q.current = l;
|
|
181
|
+
}, []),
|
|
182
|
+
children: /* @__PURE__ */ r(Cn, { ...Rn, children: /* @__PURE__ */ r(
|
|
183
|
+
An,
|
|
184
|
+
{
|
|
185
|
+
asChild: !0,
|
|
186
|
+
trapped: a,
|
|
187
|
+
onMountAutoFocus: g(c, (l) => {
|
|
188
|
+
var _;
|
|
189
|
+
l.preventDefault(), (_ = V.current) == null || _.focus({ preventScroll: !0 });
|
|
190
|
+
}),
|
|
191
|
+
onUnmountAutoFocus: i,
|
|
192
|
+
children: /* @__PURE__ */ r(
|
|
193
|
+
yn,
|
|
194
|
+
{
|
|
195
|
+
asChild: !0,
|
|
196
|
+
disableOutsidePointerEvents: d,
|
|
197
|
+
onEscapeKeyDown: v,
|
|
198
|
+
onPointerDownOutside: p,
|
|
199
|
+
onFocusOutside: u,
|
|
200
|
+
onInteractOutside: f,
|
|
201
|
+
onDismiss: w,
|
|
202
|
+
children: /* @__PURE__ */ r(
|
|
203
|
+
Fn,
|
|
204
|
+
{
|
|
205
|
+
asChild: !0,
|
|
206
|
+
...B,
|
|
207
|
+
dir: A.dir,
|
|
208
|
+
orientation: "vertical",
|
|
209
|
+
loop: o,
|
|
210
|
+
currentTabStopId: wn,
|
|
211
|
+
onCurrentTabStopIdChange: ve,
|
|
212
|
+
onEntryFocus: g(m, (l) => {
|
|
213
|
+
A.isUsingKeyboardRef.current || l.preventDefault();
|
|
214
|
+
}),
|
|
215
|
+
preventScrollOnEntryFocus: !0,
|
|
216
|
+
children: /* @__PURE__ */ r(
|
|
217
|
+
kn,
|
|
218
|
+
{
|
|
219
|
+
role: "menu",
|
|
220
|
+
"aria-orientation": "vertical",
|
|
221
|
+
"data-state": qe(y.open),
|
|
222
|
+
"data-radix-menu-content": "",
|
|
223
|
+
dir: A.dir,
|
|
224
|
+
...z,
|
|
225
|
+
...I,
|
|
226
|
+
ref: hn,
|
|
227
|
+
style: { outline: "none", ...I.style },
|
|
228
|
+
onKeyDown: g(I.onKeyDown, (l) => {
|
|
229
|
+
const R = l.target.closest("[data-radix-menu-content]") === l.currentTarget, D = l.ctrlKey || l.altKey || l.metaKey, ne = l.key.length === 1;
|
|
230
|
+
R && (l.key === "Tab" && l.preventDefault(), !D && ne && bn(l.key));
|
|
231
|
+
const te = V.current;
|
|
232
|
+
if (l.target !== te || !jn.includes(l.key)) return;
|
|
233
|
+
l.preventDefault();
|
|
234
|
+
const O = me().filter((N) => !N.disabled).map((N) => N.ref.current);
|
|
235
|
+
Ie.includes(l.key) && O.reverse(), pt(O);
|
|
236
|
+
}),
|
|
237
|
+
onBlur: g(e.onBlur, (l) => {
|
|
238
|
+
l.currentTarget.contains(l.target) || (window.clearTimeout(j.current), X.current = "");
|
|
239
|
+
}),
|
|
240
|
+
onPointerMove: g(
|
|
241
|
+
e.onPointerMove,
|
|
242
|
+
G((l) => {
|
|
243
|
+
const _ = l.target, R = ee.current !== l.clientX;
|
|
244
|
+
if (l.currentTarget.contains(_) && R) {
|
|
245
|
+
const D = l.clientX > ee.current ? "right" : "left";
|
|
246
|
+
ge.current = D, ee.current = l.clientX;
|
|
247
|
+
}
|
|
248
|
+
})
|
|
249
|
+
)
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
) })
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
Oe.displayName = C;
|
|
263
|
+
var ot = "MenuGroup", de = s.forwardRef(
|
|
264
|
+
(e, t) => {
|
|
265
|
+
const { __scopeMenu: n, ...o } = e;
|
|
266
|
+
return /* @__PURE__ */ r(T.div, { role: "group", ...o, ref: t });
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
de.displayName = ot;
|
|
270
|
+
var rt = "MenuLabel", ke = s.forwardRef(
|
|
271
|
+
(e, t) => {
|
|
272
|
+
const { __scopeMenu: n, ...o } = e;
|
|
273
|
+
return /* @__PURE__ */ r(T.div, { ...o, ref: t });
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
ke.displayName = rt;
|
|
277
|
+
var H = "MenuItem", _e = "menu.itemSelect", q = s.forwardRef(
|
|
278
|
+
(e, t) => {
|
|
279
|
+
const { disabled: n = !1, onSelect: o, ...a } = e, c = s.useRef(null), i = U(H, e.__scopeMenu), d = ue(H, e.__scopeMenu), m = F(t, c), v = s.useRef(!1), p = () => {
|
|
280
|
+
const u = c.current;
|
|
281
|
+
if (!n && u) {
|
|
282
|
+
const f = new CustomEvent(_e, { bubbles: !0, cancelable: !0 });
|
|
283
|
+
u.addEventListener(_e, (w) => o == null ? void 0 : o(w), { once: !0 }), Dn(u, f), f.defaultPrevented ? v.current = !1 : i.onClose();
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
return /* @__PURE__ */ r(
|
|
287
|
+
Le,
|
|
288
|
+
{
|
|
289
|
+
...a,
|
|
290
|
+
ref: m,
|
|
291
|
+
disabled: n,
|
|
292
|
+
onClick: g(e.onClick, p),
|
|
293
|
+
onPointerDown: (u) => {
|
|
294
|
+
var f;
|
|
295
|
+
(f = e.onPointerDown) == null || f.call(e, u), v.current = !0;
|
|
296
|
+
},
|
|
297
|
+
onPointerUp: g(e.onPointerUp, (u) => {
|
|
298
|
+
var f;
|
|
299
|
+
v.current || (f = u.currentTarget) == null || f.click();
|
|
300
|
+
}),
|
|
301
|
+
onKeyDown: g(e.onKeyDown, (u) => {
|
|
302
|
+
const f = d.searchRef.current !== "";
|
|
303
|
+
n || f && u.key === " " || oe.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
|
|
304
|
+
})
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
q.displayName = H;
|
|
310
|
+
var Le = s.forwardRef(
|
|
311
|
+
(e, t) => {
|
|
312
|
+
const { __scopeMenu: n, disabled: o = !1, textValue: a, ...c } = e, i = ue(H, n), d = ye(n), m = s.useRef(null), v = F(t, m), [p, u] = s.useState(!1), [f, w] = s.useState("");
|
|
313
|
+
return s.useEffect(() => {
|
|
314
|
+
const M = m.current;
|
|
315
|
+
M && w((M.textContent ?? "").trim());
|
|
316
|
+
}, [c.children]), /* @__PURE__ */ r(
|
|
317
|
+
L.ItemSlot,
|
|
318
|
+
{
|
|
319
|
+
scope: n,
|
|
320
|
+
disabled: o,
|
|
321
|
+
textValue: a ?? f,
|
|
322
|
+
children: /* @__PURE__ */ r(Gn, { asChild: !0, ...d, focusable: !o, children: /* @__PURE__ */ r(
|
|
323
|
+
T.div,
|
|
324
|
+
{
|
|
325
|
+
role: "menuitem",
|
|
326
|
+
"data-highlighted": p ? "" : void 0,
|
|
327
|
+
"aria-disabled": o || void 0,
|
|
328
|
+
"data-disabled": o ? "" : void 0,
|
|
329
|
+
...c,
|
|
330
|
+
ref: v,
|
|
331
|
+
onPointerMove: g(
|
|
332
|
+
e.onPointerMove,
|
|
333
|
+
G((M) => {
|
|
334
|
+
o ? i.onItemLeave(M) : (i.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
|
|
335
|
+
})
|
|
336
|
+
),
|
|
337
|
+
onPointerLeave: g(
|
|
338
|
+
e.onPointerLeave,
|
|
339
|
+
G((M) => i.onItemLeave(M))
|
|
340
|
+
),
|
|
341
|
+
onFocus: g(e.onFocus, () => u(!0)),
|
|
342
|
+
onBlur: g(e.onBlur, () => u(!1))
|
|
343
|
+
}
|
|
344
|
+
) })
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
), at = "MenuCheckboxItem", Ge = s.forwardRef(
|
|
349
|
+
(e, t) => {
|
|
350
|
+
const { checked: n = !1, onCheckedChange: o, ...a } = e;
|
|
351
|
+
return /* @__PURE__ */ r(ze, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ r(
|
|
352
|
+
q,
|
|
353
|
+
{
|
|
354
|
+
role: "menuitemcheckbox",
|
|
355
|
+
"aria-checked": W(n) ? "mixed" : n,
|
|
356
|
+
...a,
|
|
357
|
+
ref: t,
|
|
358
|
+
"data-state": fe(n),
|
|
359
|
+
onSelect: g(
|
|
360
|
+
a.onSelect,
|
|
361
|
+
() => o == null ? void 0 : o(W(n) ? !0 : !n),
|
|
362
|
+
{ checkForDefaultPrevented: !1 }
|
|
363
|
+
)
|
|
364
|
+
}
|
|
365
|
+
) });
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
Ge.displayName = at;
|
|
369
|
+
var Fe = "MenuRadioGroup", [st, ct] = P(
|
|
370
|
+
Fe,
|
|
371
|
+
{ value: void 0, onValueChange: () => {
|
|
372
|
+
} }
|
|
373
|
+
), Ke = s.forwardRef(
|
|
374
|
+
(e, t) => {
|
|
375
|
+
const { value: n, onValueChange: o, ...a } = e, c = ae(o);
|
|
376
|
+
return /* @__PURE__ */ r(st, { scope: e.__scopeMenu, value: n, onValueChange: c, children: /* @__PURE__ */ r(de, { ...a, ref: t }) });
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
Ke.displayName = Fe;
|
|
380
|
+
var $e = "MenuRadioItem", Ue = s.forwardRef(
|
|
381
|
+
(e, t) => {
|
|
382
|
+
const { value: n, ...o } = e, a = ct($e, e.__scopeMenu), c = n === a.value;
|
|
383
|
+
return /* @__PURE__ */ r(ze, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ r(
|
|
384
|
+
q,
|
|
385
|
+
{
|
|
386
|
+
role: "menuitemradio",
|
|
387
|
+
"aria-checked": c,
|
|
388
|
+
...o,
|
|
389
|
+
ref: t,
|
|
390
|
+
"data-state": fe(c),
|
|
391
|
+
onSelect: g(
|
|
392
|
+
o.onSelect,
|
|
393
|
+
() => {
|
|
394
|
+
var i;
|
|
395
|
+
return (i = a.onValueChange) == null ? void 0 : i.call(a, n);
|
|
396
|
+
},
|
|
397
|
+
{ checkForDefaultPrevented: !1 }
|
|
398
|
+
)
|
|
399
|
+
}
|
|
400
|
+
) });
|
|
401
|
+
}
|
|
402
|
+
);
|
|
403
|
+
Ue.displayName = $e;
|
|
404
|
+
var le = "MenuItemIndicator", [ze, ut] = P(
|
|
405
|
+
le,
|
|
406
|
+
{ checked: !1 }
|
|
407
|
+
), Be = s.forwardRef(
|
|
408
|
+
(e, t) => {
|
|
409
|
+
const { __scopeMenu: n, forceMount: o, ...a } = e, c = ut(le, n);
|
|
410
|
+
return /* @__PURE__ */ r(
|
|
411
|
+
Z,
|
|
412
|
+
{
|
|
413
|
+
present: o || W(c.checked) || c.checked === !0,
|
|
414
|
+
children: /* @__PURE__ */ r(
|
|
415
|
+
T.span,
|
|
416
|
+
{
|
|
417
|
+
...a,
|
|
418
|
+
ref: t,
|
|
419
|
+
"data-state": fe(c.checked)
|
|
420
|
+
}
|
|
421
|
+
)
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
Be.displayName = le;
|
|
427
|
+
var it = "MenuSeparator", Ve = s.forwardRef(
|
|
428
|
+
(e, t) => {
|
|
429
|
+
const { __scopeMenu: n, ...o } = e;
|
|
430
|
+
return /* @__PURE__ */ r(
|
|
431
|
+
T.div,
|
|
432
|
+
{
|
|
433
|
+
role: "separator",
|
|
434
|
+
"aria-orientation": "horizontal",
|
|
435
|
+
...o,
|
|
436
|
+
ref: t
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
);
|
|
441
|
+
Ve.displayName = it;
|
|
442
|
+
var dt = "MenuArrow", je = s.forwardRef(
|
|
443
|
+
(e, t) => {
|
|
444
|
+
const { __scopeMenu: n, ...o } = e, a = $(n);
|
|
445
|
+
return /* @__PURE__ */ r(Ln, { ...a, ...o, ref: t });
|
|
446
|
+
}
|
|
447
|
+
);
|
|
448
|
+
je.displayName = dt;
|
|
449
|
+
var pe = "MenuSub", [lt, Xe] = P(pe), Ye = (e) => {
|
|
450
|
+
const { __scopeMenu: t, children: n, open: o = !1, onOpenChange: a } = e, c = S(pe, t), i = $(t), [d, m] = s.useState(null), [v, p] = s.useState(null), u = ae(a);
|
|
451
|
+
return s.useEffect(() => (c.open === !1 && u(!1), () => u(!1)), [c.open, u]), /* @__PURE__ */ r(De, { ...i, children: /* @__PURE__ */ r(
|
|
452
|
+
Ee,
|
|
453
|
+
{
|
|
454
|
+
scope: t,
|
|
455
|
+
open: o,
|
|
456
|
+
onOpenChange: u,
|
|
457
|
+
content: v,
|
|
458
|
+
onContentChange: p,
|
|
459
|
+
children: /* @__PURE__ */ r(
|
|
460
|
+
lt,
|
|
461
|
+
{
|
|
462
|
+
scope: t,
|
|
463
|
+
contentId: Y(),
|
|
464
|
+
triggerId: Y(),
|
|
465
|
+
trigger: d,
|
|
466
|
+
onTriggerChange: m,
|
|
467
|
+
children: n
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
}
|
|
471
|
+
) });
|
|
472
|
+
};
|
|
473
|
+
Ye.displayName = pe;
|
|
474
|
+
var k = "MenuSubTrigger", He = s.forwardRef(
|
|
475
|
+
(e, t) => {
|
|
476
|
+
const n = S(k, e.__scopeMenu), o = U(k, e.__scopeMenu), a = Xe(k, e.__scopeMenu), c = ue(k, e.__scopeMenu), i = s.useRef(null), { pointerGraceTimerRef: d, onPointerGraceIntentChange: m } = c, v = { __scopeMenu: e.__scopeMenu }, p = s.useCallback(() => {
|
|
477
|
+
i.current && window.clearTimeout(i.current), i.current = null;
|
|
478
|
+
}, []);
|
|
479
|
+
return s.useEffect(() => p, [p]), s.useEffect(() => {
|
|
480
|
+
const u = d.current;
|
|
481
|
+
return () => {
|
|
482
|
+
window.clearTimeout(u), m(null);
|
|
483
|
+
};
|
|
484
|
+
}, [d, m]), /* @__PURE__ */ r(se, { asChild: !0, ...v, children: /* @__PURE__ */ r(
|
|
485
|
+
Le,
|
|
486
|
+
{
|
|
487
|
+
id: a.triggerId,
|
|
488
|
+
"aria-haspopup": "menu",
|
|
489
|
+
"aria-expanded": n.open,
|
|
490
|
+
"aria-controls": a.contentId,
|
|
491
|
+
"data-state": qe(n.open),
|
|
492
|
+
...e,
|
|
493
|
+
ref: Ce(t, a.onTriggerChange),
|
|
494
|
+
onClick: (u) => {
|
|
495
|
+
var f;
|
|
496
|
+
(f = e.onClick) == null || f.call(e, u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
497
|
+
},
|
|
498
|
+
onPointerMove: g(
|
|
499
|
+
e.onPointerMove,
|
|
500
|
+
G((u) => {
|
|
501
|
+
c.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !i.current && (c.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
502
|
+
n.onOpenChange(!0), p();
|
|
503
|
+
}, 100));
|
|
504
|
+
})
|
|
505
|
+
),
|
|
506
|
+
onPointerLeave: g(
|
|
507
|
+
e.onPointerLeave,
|
|
508
|
+
G((u) => {
|
|
509
|
+
var w, M;
|
|
510
|
+
p();
|
|
511
|
+
const f = (w = n.content) == null ? void 0 : w.getBoundingClientRect();
|
|
512
|
+
if (f) {
|
|
513
|
+
const I = (M = n.content) == null ? void 0 : M.dataset.side, y = I === "right", A = y ? -5 : 5, z = f[y ? "left" : "right"], B = f[y ? "right" : "left"];
|
|
514
|
+
c.onPointerGraceIntentChange({
|
|
515
|
+
area: [
|
|
516
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
517
|
+
// consistently within polygon bounds
|
|
518
|
+
{ x: u.clientX + A, y: u.clientY },
|
|
519
|
+
{ x: z, y: f.top },
|
|
520
|
+
{ x: B, y: f.top },
|
|
521
|
+
{ x: B, y: f.bottom },
|
|
522
|
+
{ x: z, y: f.bottom }
|
|
523
|
+
],
|
|
524
|
+
side: I
|
|
525
|
+
}), window.clearTimeout(d.current), d.current = window.setTimeout(
|
|
526
|
+
() => c.onPointerGraceIntentChange(null),
|
|
527
|
+
300
|
|
528
|
+
);
|
|
529
|
+
} else {
|
|
530
|
+
if (c.onTriggerLeave(u), u.defaultPrevented) return;
|
|
531
|
+
c.onPointerGraceIntentChange(null);
|
|
532
|
+
}
|
|
533
|
+
})
|
|
534
|
+
),
|
|
535
|
+
onKeyDown: g(e.onKeyDown, (u) => {
|
|
536
|
+
var w;
|
|
537
|
+
const f = c.searchRef.current !== "";
|
|
538
|
+
e.disabled || f && u.key === " " || Xn[o.dir].includes(u.key) && (n.onOpenChange(!0), (w = n.content) == null || w.focus(), u.preventDefault());
|
|
539
|
+
})
|
|
540
|
+
}
|
|
541
|
+
) });
|
|
542
|
+
}
|
|
543
|
+
);
|
|
544
|
+
He.displayName = k;
|
|
545
|
+
var We = "MenuSubContent", Ze = s.forwardRef(
|
|
546
|
+
(e, t) => {
|
|
547
|
+
const n = Te(C, e.__scopeMenu), { forceMount: o = n.forceMount, ...a } = e, c = S(C, e.__scopeMenu), i = U(C, e.__scopeMenu), d = Xe(We, e.__scopeMenu), m = s.useRef(null), v = F(t, m);
|
|
548
|
+
return /* @__PURE__ */ r(L.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ r(Z, { present: o || c.open, children: /* @__PURE__ */ r(L.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ r(
|
|
549
|
+
ie,
|
|
550
|
+
{
|
|
551
|
+
id: d.contentId,
|
|
552
|
+
"aria-labelledby": d.triggerId,
|
|
553
|
+
...a,
|
|
554
|
+
ref: v,
|
|
555
|
+
align: "start",
|
|
556
|
+
side: i.dir === "rtl" ? "left" : "right",
|
|
557
|
+
disableOutsidePointerEvents: !1,
|
|
558
|
+
disableOutsideScroll: !1,
|
|
559
|
+
trapFocus: !1,
|
|
560
|
+
onOpenAutoFocus: (p) => {
|
|
561
|
+
var u;
|
|
562
|
+
i.isUsingKeyboardRef.current && ((u = m.current) == null || u.focus()), p.preventDefault();
|
|
563
|
+
},
|
|
564
|
+
onCloseAutoFocus: (p) => p.preventDefault(),
|
|
565
|
+
onFocusOutside: g(e.onFocusOutside, (p) => {
|
|
566
|
+
p.target !== d.trigger && c.onOpenChange(!1);
|
|
567
|
+
}),
|
|
568
|
+
onEscapeKeyDown: g(e.onEscapeKeyDown, (p) => {
|
|
569
|
+
i.onClose(), p.preventDefault();
|
|
570
|
+
}),
|
|
571
|
+
onKeyDown: g(e.onKeyDown, (p) => {
|
|
572
|
+
var w;
|
|
573
|
+
const u = p.currentTarget.contains(p.target), f = Yn[i.dir].includes(p.key);
|
|
574
|
+
u && f && (c.onOpenChange(!1), (w = d.trigger) == null || w.focus(), p.preventDefault());
|
|
575
|
+
})
|
|
576
|
+
}
|
|
577
|
+
) }) }) });
|
|
578
|
+
}
|
|
579
|
+
);
|
|
580
|
+
Ze.displayName = We;
|
|
581
|
+
function qe(e) {
|
|
582
|
+
return e ? "open" : "closed";
|
|
583
|
+
}
|
|
584
|
+
function W(e) {
|
|
585
|
+
return e === "indeterminate";
|
|
586
|
+
}
|
|
587
|
+
function fe(e) {
|
|
588
|
+
return W(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
589
|
+
}
|
|
590
|
+
function pt(e) {
|
|
591
|
+
const t = document.activeElement;
|
|
592
|
+
for (const n of e)
|
|
593
|
+
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
594
|
+
}
|
|
595
|
+
function ft(e, t) {
|
|
596
|
+
return e.map((n, o) => e[(t + o) % e.length]);
|
|
597
|
+
}
|
|
598
|
+
function mt(e, t, n) {
|
|
599
|
+
const a = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
|
|
600
|
+
let i = ft(e, Math.max(c, 0));
|
|
601
|
+
a.length === 1 && (i = i.filter((v) => v !== n));
|
|
602
|
+
const m = i.find(
|
|
603
|
+
(v) => v.toLowerCase().startsWith(a.toLowerCase())
|
|
604
|
+
);
|
|
605
|
+
return m !== n ? m : void 0;
|
|
606
|
+
}
|
|
607
|
+
function vt(e, t) {
|
|
608
|
+
const { x: n, y: o } = e;
|
|
609
|
+
let a = !1;
|
|
610
|
+
for (let c = 0, i = t.length - 1; c < t.length; i = c++) {
|
|
611
|
+
const d = t[c], m = t[i], v = d.x, p = d.y, u = m.x, f = m.y;
|
|
612
|
+
p > o != f > o && n < (u - v) * (o - p) / (f - p) + v && (a = !a);
|
|
613
|
+
}
|
|
614
|
+
return a;
|
|
615
|
+
}
|
|
616
|
+
function gt(e, t) {
|
|
617
|
+
if (!t) return !1;
|
|
618
|
+
const n = { x: e.clientX, y: e.clientY };
|
|
619
|
+
return vt(n, t);
|
|
620
|
+
}
|
|
621
|
+
function G(e) {
|
|
622
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
623
|
+
}
|
|
624
|
+
var Mt = Ne, wt = se, ht = Ae, _t = Oe, Ct = de, Rt = ke, bt = q, xt = Ge, Dt = Ke, St = Ue, It = Be, Pt = Ve, yt = je, Et = Ye, Nt = He, Tt = Ze, J = "DropdownMenu", [At, Po] = Re(
|
|
625
|
+
J,
|
|
626
|
+
[Pe]
|
|
627
|
+
), h = Pe(), [Ot, Je] = At(J), Qe = (e) => {
|
|
628
|
+
const {
|
|
629
|
+
__scopeDropdownMenu: t,
|
|
630
|
+
children: n,
|
|
631
|
+
dir: o,
|
|
632
|
+
open: a,
|
|
633
|
+
defaultOpen: c,
|
|
634
|
+
onOpenChange: i,
|
|
635
|
+
modal: d = !0
|
|
636
|
+
} = e, m = h(t), v = s.useRef(null), [p, u] = be({
|
|
637
|
+
prop: a,
|
|
638
|
+
defaultProp: c ?? !1,
|
|
639
|
+
onChange: i,
|
|
640
|
+
caller: J
|
|
641
|
+
});
|
|
642
|
+
return /* @__PURE__ */ r(
|
|
643
|
+
Ot,
|
|
644
|
+
{
|
|
645
|
+
scope: t,
|
|
646
|
+
triggerId: Y(),
|
|
647
|
+
triggerRef: v,
|
|
648
|
+
contentId: Y(),
|
|
649
|
+
open: p,
|
|
650
|
+
onOpenChange: u,
|
|
651
|
+
onOpenToggle: s.useCallback(() => u((f) => !f), [u]),
|
|
652
|
+
modal: d,
|
|
653
|
+
children: /* @__PURE__ */ r(Mt, { ...m, open: p, onOpenChange: u, dir: o, modal: d, children: n })
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
};
|
|
657
|
+
Qe.displayName = J;
|
|
658
|
+
var en = "DropdownMenuTrigger", nn = s.forwardRef(
|
|
659
|
+
(e, t) => {
|
|
660
|
+
const { __scopeDropdownMenu: n, disabled: o = !1, ...a } = e, c = Je(en, n), i = h(n);
|
|
661
|
+
return /* @__PURE__ */ r(wt, { asChild: !0, ...i, children: /* @__PURE__ */ r(
|
|
662
|
+
T.button,
|
|
663
|
+
{
|
|
664
|
+
type: "button",
|
|
665
|
+
id: c.triggerId,
|
|
666
|
+
"aria-haspopup": "menu",
|
|
667
|
+
"aria-expanded": c.open,
|
|
668
|
+
"aria-controls": c.open ? c.contentId : void 0,
|
|
669
|
+
"data-state": c.open ? "open" : "closed",
|
|
670
|
+
"data-disabled": o ? "" : void 0,
|
|
671
|
+
disabled: o,
|
|
672
|
+
...a,
|
|
673
|
+
ref: Ce(t, c.triggerRef),
|
|
674
|
+
onPointerDown: g(e.onPointerDown, (d) => {
|
|
675
|
+
!o && d.button === 0 && d.ctrlKey === !1 && (c.onOpenToggle(), c.open || d.preventDefault());
|
|
676
|
+
}),
|
|
677
|
+
onKeyDown: g(e.onKeyDown, (d) => {
|
|
678
|
+
o || (["Enter", " "].includes(d.key) && c.onOpenToggle(), d.key === "ArrowDown" && c.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(d.key) && d.preventDefault());
|
|
679
|
+
})
|
|
680
|
+
}
|
|
681
|
+
) });
|
|
682
|
+
}
|
|
683
|
+
);
|
|
684
|
+
nn.displayName = en;
|
|
685
|
+
var kt = "DropdownMenuPortal", tn = (e) => {
|
|
686
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = h(t);
|
|
687
|
+
return /* @__PURE__ */ r(ht, { ...o, ...n });
|
|
688
|
+
};
|
|
689
|
+
tn.displayName = kt;
|
|
690
|
+
var on = "DropdownMenuContent", rn = s.forwardRef(
|
|
691
|
+
(e, t) => {
|
|
692
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = Je(on, n), c = h(n), i = s.useRef(!1);
|
|
693
|
+
return /* @__PURE__ */ r(
|
|
694
|
+
_t,
|
|
695
|
+
{
|
|
696
|
+
id: a.contentId,
|
|
697
|
+
"aria-labelledby": a.triggerId,
|
|
698
|
+
...c,
|
|
699
|
+
...o,
|
|
700
|
+
ref: t,
|
|
701
|
+
onCloseAutoFocus: g(e.onCloseAutoFocus, (d) => {
|
|
702
|
+
var m;
|
|
703
|
+
i.current || (m = a.triggerRef.current) == null || m.focus(), i.current = !1, d.preventDefault();
|
|
704
|
+
}),
|
|
705
|
+
onInteractOutside: g(e.onInteractOutside, (d) => {
|
|
706
|
+
const m = d.detail.originalEvent, v = m.button === 0 && m.ctrlKey === !0, p = m.button === 2 || v;
|
|
707
|
+
(!a.modal || p) && (i.current = !0);
|
|
708
|
+
}),
|
|
709
|
+
style: {
|
|
710
|
+
...e.style,
|
|
711
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
712
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
713
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
714
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
715
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
);
|
|
721
|
+
rn.displayName = on;
|
|
722
|
+
var Lt = "DropdownMenuGroup", an = s.forwardRef(
|
|
723
|
+
(e, t) => {
|
|
724
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
725
|
+
return /* @__PURE__ */ r(Ct, { ...a, ...o, ref: t });
|
|
726
|
+
}
|
|
727
|
+
);
|
|
728
|
+
an.displayName = Lt;
|
|
729
|
+
var Gt = "DropdownMenuLabel", sn = s.forwardRef(
|
|
730
|
+
(e, t) => {
|
|
731
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
732
|
+
return /* @__PURE__ */ r(Rt, { ...a, ...o, ref: t });
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
sn.displayName = Gt;
|
|
736
|
+
var Ft = "DropdownMenuItem", cn = s.forwardRef(
|
|
737
|
+
(e, t) => {
|
|
738
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
739
|
+
return /* @__PURE__ */ r(bt, { ...a, ...o, ref: t });
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
cn.displayName = Ft;
|
|
743
|
+
var Kt = "DropdownMenuCheckboxItem", un = s.forwardRef((e, t) => {
|
|
744
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
745
|
+
return /* @__PURE__ */ r(xt, { ...a, ...o, ref: t });
|
|
746
|
+
});
|
|
747
|
+
un.displayName = Kt;
|
|
748
|
+
var $t = "DropdownMenuRadioGroup", dn = s.forwardRef((e, t) => {
|
|
749
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
750
|
+
return /* @__PURE__ */ r(Dt, { ...a, ...o, ref: t });
|
|
751
|
+
});
|
|
752
|
+
dn.displayName = $t;
|
|
753
|
+
var Ut = "DropdownMenuRadioItem", ln = s.forwardRef((e, t) => {
|
|
754
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
755
|
+
return /* @__PURE__ */ r(St, { ...a, ...o, ref: t });
|
|
756
|
+
});
|
|
757
|
+
ln.displayName = Ut;
|
|
758
|
+
var zt = "DropdownMenuItemIndicator", pn = s.forwardRef((e, t) => {
|
|
759
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
760
|
+
return /* @__PURE__ */ r(It, { ...a, ...o, ref: t });
|
|
761
|
+
});
|
|
762
|
+
pn.displayName = zt;
|
|
763
|
+
var Bt = "DropdownMenuSeparator", fn = s.forwardRef((e, t) => {
|
|
764
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
765
|
+
return /* @__PURE__ */ r(Pt, { ...a, ...o, ref: t });
|
|
766
|
+
});
|
|
767
|
+
fn.displayName = Bt;
|
|
768
|
+
var Vt = "DropdownMenuArrow", jt = s.forwardRef(
|
|
769
|
+
(e, t) => {
|
|
770
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
771
|
+
return /* @__PURE__ */ r(yt, { ...a, ...o, ref: t });
|
|
772
|
+
}
|
|
773
|
+
);
|
|
774
|
+
jt.displayName = Vt;
|
|
775
|
+
var Xt = (e) => {
|
|
776
|
+
const { __scopeDropdownMenu: t, children: n, open: o, onOpenChange: a, defaultOpen: c } = e, i = h(t), [d, m] = be({
|
|
777
|
+
prop: o,
|
|
778
|
+
defaultProp: c ?? !1,
|
|
779
|
+
onChange: a,
|
|
780
|
+
caller: "DropdownMenuSub"
|
|
781
|
+
});
|
|
782
|
+
return /* @__PURE__ */ r(Et, { ...i, open: d, onOpenChange: m, children: n });
|
|
783
|
+
}, Yt = "DropdownMenuSubTrigger", mn = s.forwardRef((e, t) => {
|
|
784
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
785
|
+
return /* @__PURE__ */ r(Nt, { ...a, ...o, ref: t });
|
|
786
|
+
});
|
|
787
|
+
mn.displayName = Yt;
|
|
788
|
+
var Ht = "DropdownMenuSubContent", vn = s.forwardRef((e, t) => {
|
|
789
|
+
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
790
|
+
return /* @__PURE__ */ r(
|
|
791
|
+
Tt,
|
|
792
|
+
{
|
|
793
|
+
...a,
|
|
794
|
+
...o,
|
|
795
|
+
ref: t,
|
|
796
|
+
style: {
|
|
797
|
+
...e.style,
|
|
798
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
799
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
800
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
801
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
802
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
});
|
|
807
|
+
vn.displayName = Ht;
|
|
808
|
+
var Wt = Qe, Zt = nn, gn = tn, qt = rn, Jt = an, Qt = sn, eo = cn, no = un, to = dn, oo = ln, Mn = pn, ro = fn, ao = Xt, so = mn, co = vn;
|
|
809
|
+
function yo({
|
|
810
|
+
...e
|
|
811
|
+
}) {
|
|
812
|
+
return /* @__PURE__ */ r(Wt, { "data-slot": "dropdown-menu", ...e });
|
|
813
|
+
}
|
|
814
|
+
function Eo({
|
|
815
|
+
...e
|
|
816
|
+
}) {
|
|
817
|
+
return /* @__PURE__ */ r(gn, { "data-slot": "dropdown-menu-portal", ...e });
|
|
818
|
+
}
|
|
819
|
+
function No({
|
|
820
|
+
...e
|
|
821
|
+
}) {
|
|
822
|
+
return /* @__PURE__ */ r(
|
|
823
|
+
Zt,
|
|
824
|
+
{
|
|
825
|
+
"data-slot": "dropdown-menu-trigger",
|
|
826
|
+
...e
|
|
827
|
+
}
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
function To({
|
|
831
|
+
className: e,
|
|
832
|
+
sideOffset: t = 4,
|
|
833
|
+
...n
|
|
834
|
+
}) {
|
|
835
|
+
return /* @__PURE__ */ r(gn, { children: /* @__PURE__ */ r(
|
|
836
|
+
qt,
|
|
837
|
+
{
|
|
838
|
+
className: x(
|
|
839
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
840
|
+
e
|
|
841
|
+
),
|
|
842
|
+
"data-slot": "dropdown-menu-content",
|
|
843
|
+
sideOffset: t,
|
|
844
|
+
...n
|
|
845
|
+
}
|
|
846
|
+
) });
|
|
847
|
+
}
|
|
848
|
+
function Ao({
|
|
849
|
+
...e
|
|
850
|
+
}) {
|
|
851
|
+
return /* @__PURE__ */ r(Jt, { "data-slot": "dropdown-menu-group", ...e });
|
|
852
|
+
}
|
|
853
|
+
function Oo({
|
|
854
|
+
className: e,
|
|
855
|
+
inset: t,
|
|
856
|
+
variant: n = "default",
|
|
857
|
+
...o
|
|
858
|
+
}) {
|
|
859
|
+
return /* @__PURE__ */ r(
|
|
860
|
+
eo,
|
|
861
|
+
{
|
|
862
|
+
className: x(
|
|
863
|
+
"data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
864
|
+
e
|
|
865
|
+
),
|
|
866
|
+
"data-inset": t,
|
|
867
|
+
"data-slot": "dropdown-menu-item",
|
|
868
|
+
"data-variant": n,
|
|
869
|
+
...o
|
|
870
|
+
}
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
function ko({
|
|
874
|
+
className: e,
|
|
875
|
+
children: t,
|
|
876
|
+
checked: n,
|
|
877
|
+
...o
|
|
878
|
+
}) {
|
|
879
|
+
return /* @__PURE__ */ re(
|
|
880
|
+
no,
|
|
881
|
+
{
|
|
882
|
+
checked: n,
|
|
883
|
+
className: x(
|
|
884
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
885
|
+
e
|
|
886
|
+
),
|
|
887
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
888
|
+
...o,
|
|
889
|
+
children: [
|
|
890
|
+
/* @__PURE__ */ r("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ r(Mn, { children: /* @__PURE__ */ r(Kn, { className: "size-4" }) }) }),
|
|
891
|
+
t
|
|
892
|
+
]
|
|
893
|
+
}
|
|
894
|
+
);
|
|
895
|
+
}
|
|
896
|
+
function Lo({
|
|
897
|
+
...e
|
|
898
|
+
}) {
|
|
899
|
+
return /* @__PURE__ */ r(
|
|
900
|
+
to,
|
|
901
|
+
{
|
|
902
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
903
|
+
...e
|
|
904
|
+
}
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
function Go({
|
|
908
|
+
className: e,
|
|
909
|
+
children: t,
|
|
910
|
+
...n
|
|
911
|
+
}) {
|
|
912
|
+
return /* @__PURE__ */ re(
|
|
913
|
+
oo,
|
|
914
|
+
{
|
|
915
|
+
className: x(
|
|
916
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
917
|
+
e
|
|
918
|
+
),
|
|
919
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
920
|
+
...n,
|
|
921
|
+
children: [
|
|
922
|
+
/* @__PURE__ */ r("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ r(Mn, { children: /* @__PURE__ */ r(Bn, { className: "size-2 fill-current" }) }) }),
|
|
923
|
+
t
|
|
924
|
+
]
|
|
925
|
+
}
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
function Fo({
|
|
929
|
+
className: e,
|
|
930
|
+
inset: t,
|
|
931
|
+
...n
|
|
932
|
+
}) {
|
|
933
|
+
return /* @__PURE__ */ r(
|
|
934
|
+
Qt,
|
|
935
|
+
{
|
|
936
|
+
className: x(
|
|
937
|
+
"px-2 py-1.5 font-medium text-sm data-[inset]:pl-8",
|
|
938
|
+
e
|
|
939
|
+
),
|
|
940
|
+
"data-inset": t,
|
|
941
|
+
"data-slot": "dropdown-menu-label",
|
|
942
|
+
...n
|
|
943
|
+
}
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
function Ko({
|
|
947
|
+
className: e,
|
|
948
|
+
...t
|
|
949
|
+
}) {
|
|
950
|
+
return /* @__PURE__ */ r(
|
|
951
|
+
ro,
|
|
952
|
+
{
|
|
953
|
+
className: x("-mx-1 my-1 h-px bg-border", e),
|
|
954
|
+
"data-slot": "dropdown-menu-separator",
|
|
955
|
+
...t
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
function $o({
|
|
960
|
+
className: e,
|
|
961
|
+
...t
|
|
962
|
+
}) {
|
|
963
|
+
return /* @__PURE__ */ r(
|
|
964
|
+
"span",
|
|
965
|
+
{
|
|
966
|
+
className: x(
|
|
967
|
+
"ml-auto text-muted-foreground text-xs tracking-widest",
|
|
968
|
+
e
|
|
969
|
+
),
|
|
970
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
971
|
+
...t
|
|
972
|
+
}
|
|
973
|
+
);
|
|
974
|
+
}
|
|
975
|
+
function Uo({
|
|
976
|
+
...e
|
|
977
|
+
}) {
|
|
978
|
+
return /* @__PURE__ */ r(ao, { "data-slot": "dropdown-menu-sub", ...e });
|
|
979
|
+
}
|
|
980
|
+
function zo({
|
|
981
|
+
className: e,
|
|
982
|
+
inset: t,
|
|
983
|
+
children: n,
|
|
984
|
+
...o
|
|
985
|
+
}) {
|
|
986
|
+
return /* @__PURE__ */ re(
|
|
987
|
+
so,
|
|
988
|
+
{
|
|
989
|
+
className: x(
|
|
990
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[inset]:pl-8 data-[state=open]:text-accent-foreground",
|
|
991
|
+
e
|
|
992
|
+
),
|
|
993
|
+
"data-inset": t,
|
|
994
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
995
|
+
...o,
|
|
996
|
+
children: [
|
|
997
|
+
n,
|
|
998
|
+
/* @__PURE__ */ r(Un, { className: "ml-auto size-4" })
|
|
999
|
+
]
|
|
1000
|
+
}
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
function Bo({
|
|
1004
|
+
className: e,
|
|
1005
|
+
...t
|
|
1006
|
+
}) {
|
|
1007
|
+
return /* @__PURE__ */ r(
|
|
1008
|
+
co,
|
|
1009
|
+
{
|
|
1010
|
+
className: x(
|
|
1011
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
1012
|
+
e
|
|
1013
|
+
),
|
|
1014
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1015
|
+
...t
|
|
1016
|
+
}
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
export {
|
|
1020
|
+
yo as DropdownMenu,
|
|
1021
|
+
ko as DropdownMenuCheckboxItem,
|
|
1022
|
+
To as DropdownMenuContent,
|
|
1023
|
+
Ao as DropdownMenuGroup,
|
|
1024
|
+
Oo as DropdownMenuItem,
|
|
1025
|
+
Fo as DropdownMenuLabel,
|
|
1026
|
+
Eo as DropdownMenuPortal,
|
|
1027
|
+
Lo as DropdownMenuRadioGroup,
|
|
1028
|
+
Go as DropdownMenuRadioItem,
|
|
1029
|
+
Ko as DropdownMenuSeparator,
|
|
1030
|
+
$o as DropdownMenuShortcut,
|
|
1031
|
+
Uo as DropdownMenuSub,
|
|
1032
|
+
Bo as DropdownMenuSubContent,
|
|
1033
|
+
zo as DropdownMenuSubTrigger,
|
|
1034
|
+
No as DropdownMenuTrigger
|
|
1035
|
+
};
|