@krosoft/react 0.0.86 → 0.0.88

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.
Files changed (41) hide show
  1. package/dist/AppSubTitle-DaFa30Qp.js +13 -0
  2. package/dist/{AppTitle-2BwwWSnl.js → AppTitle-COtcNGNr.js} +4 -4
  3. package/dist/AppVerticalTabs-aeKDheVe.js +829 -0
  4. package/dist/{FormDialog--99pXUqP.js → FormDialog-B3u7bHU_.js} +18 -18
  5. package/dist/{MetricCard-BRAVWmNa.js → MetricCard-L5ETuqBs.js} +3 -3
  6. package/dist/{SearchInput-CJe4D2eD.js → SearchInput-BxnaShYy.js} +3 -3
  7. package/dist/{TableFilter-5_KAD-Po.js → TableFilter-RzydxKBF.js} +5 -5
  8. package/dist/{TableSettings-XUosW5z7.js → TableSettings-Bwysm3KH.js} +15 -15
  9. package/dist/{ThemeSelector-CpHyRG1j.js → ThemeSelector-mZBbr2qt.js} +3 -3
  10. package/dist/{Topbar-B-4vtD89.js → Topbar-DzFClMWt.js} +4 -4
  11. package/dist/{badge-Bw-aBz_H.js → badge-DCS7KMnM.js} +1 -1
  12. package/dist/components/core/cards/index.js +1 -1
  13. package/dist/components/core/dialogs/index.js +1 -1
  14. package/dist/components/core/filters/index.js +1 -1
  15. package/dist/components/core/index.js +38 -36
  16. package/dist/components/core/inputs/index.js +1 -1
  17. package/dist/components/core/layouts/AppSubTitle.d.ts +8 -0
  18. package/dist/components/core/layouts/AppSubTitle.d.ts.map +1 -0
  19. package/dist/components/core/layouts/index.d.ts +1 -0
  20. package/dist/components/core/layouts/index.d.ts.map +1 -1
  21. package/dist/components/core/layouts/index.js +5 -3
  22. package/dist/components/core/navbar/index.js +1 -1
  23. package/dist/components/core/table/index.js +1 -1
  24. package/dist/components/core/tabs/index.js +1 -1
  25. package/dist/components/core/theme/index.js +1 -1
  26. package/dist/components/index.js +84 -82
  27. package/dist/components/ui/index.js +4 -4
  28. package/dist/dropdown-menu-BDcm9kW8.js +1086 -0
  29. package/dist/index-DUnCfjrC.js +2176 -0
  30. package/dist/popover-PsZp711z.js +4533 -0
  31. package/dist/select-C6w0ck7-.js +1737 -0
  32. package/dist/tooltip-CtjaR1qq.js +337 -0
  33. package/dist/types/UseDataTableResult.d.ts +1 -1
  34. package/dist/types/UseDataTableResult.d.ts.map +1 -1
  35. package/package.json +7 -6
  36. package/dist/AppVerticalTabs-Czaejh1i.js +0 -1302
  37. package/dist/dropdown-menu-D3C3wkLH.js +0 -1685
  38. package/dist/floating-ui.react-dom-BIcsGc3t.js +0 -1681
  39. package/dist/popover-BEB_r1Wm.js +0 -5897
  40. package/dist/select-B_OLzx1W.js +0 -2071
  41. package/dist/tooltip-DzQngJZK.js +0 -828
@@ -1,1685 +0,0 @@
1
- import { c as Je } from "./createLucideIcon-CRdjzt2A.js";
2
- import { jsx as c, jsxs as Ae } from "react/jsx-runtime";
3
- import * as a from "react";
4
- import X from "react";
5
- import { a as De, q as le, u as T, d as Rn, e as b, f as V, g as Pn, h as _n, o as Nn, s as Sn, l as In, i as xn, j as An, k as Dn, m as Tn, n as On, p as ie, r as Ne, t as Qe } from "./floating-ui.react-dom-BIcsGc3t.js";
6
- import * as Fn from "react-dom";
7
- import Ln from "react-dom";
8
- import { u as et, j as kn, R as Un, k as $n, C as Kn } from "./select-B_OLzx1W.js";
9
- import { c as Y } from "./index-gWiv5-6R.js";
10
- import { B as Gn } from "./popover-BEB_r1Wm.js";
11
- /**
12
- * @license lucide-react v1.16.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */
17
- const Bn = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Wn = Je("circle", Bn);
18
- /**
19
- * @license lucide-react v1.16.0 - ISC
20
- *
21
- * This source code is licensed under the ISC license.
22
- * See the LICENSE file in the root directory of this source tree.
23
- */
24
- const Hn = [
25
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
26
- ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
27
- ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
28
- ], da = Je("ellipsis-vertical", Hn);
29
- // @__NO_SIDE_EFFECTS__
30
- function we(e) {
31
- const t = /* @__PURE__ */ Vn(e), n = a.forwardRef((o, r) => {
32
- const { children: s, ...u } = o, i = a.Children.toArray(s), p = i.find(jn);
33
- if (p) {
34
- const l = p.props.children, d = i.map((f) => f === p ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : f);
35
- return /* @__PURE__ */ c(t, { ...u, ref: r, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
36
- }
37
- return /* @__PURE__ */ c(t, { ...u, ref: r, children: s });
38
- });
39
- return n.displayName = `${e}.Slot`, n;
40
- }
41
- // @__NO_SIDE_EFFECTS__
42
- function Vn(e) {
43
- const t = a.forwardRef((n, o) => {
44
- const { children: r, ...s } = n;
45
- if (a.isValidElement(r)) {
46
- const u = Xn(r), i = zn(s, r.props);
47
- return r.type !== a.Fragment && (i.ref = o ? De(o, u) : u), a.cloneElement(r, i);
48
- }
49
- return a.Children.count(r) > 1 ? a.Children.only(null) : null;
50
- });
51
- return t.displayName = `${e}.SlotClone`, t;
52
- }
53
- var Yn = Symbol("radix.slottable");
54
- function jn(e) {
55
- return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Yn;
56
- }
57
- function zn(e, t) {
58
- const n = { ...t };
59
- for (const o in t) {
60
- const r = e[o], s = t[o];
61
- /^on[A-Z]/.test(o) ? r && s ? n[o] = (...i) => {
62
- const p = s(...i);
63
- return r(...i), p;
64
- } : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...s } : o === "className" && (n[o] = [r, s].filter(Boolean).join(" "));
65
- }
66
- return { ...e, ...n };
67
- }
68
- function Xn(e) {
69
- var o, r;
70
- let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
71
- return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
72
- }
73
- var Zn = [
74
- "a",
75
- "button",
76
- "div",
77
- "form",
78
- "h2",
79
- "h3",
80
- "img",
81
- "input",
82
- "label",
83
- "li",
84
- "nav",
85
- "ol",
86
- "p",
87
- "select",
88
- "span",
89
- "svg",
90
- "ul"
91
- ], x = Zn.reduce((e, t) => {
92
- const n = /* @__PURE__ */ we(`Primitive.${t}`), o = a.forwardRef((r, s) => {
93
- const { asChild: u, ...i } = r, p = u ? n : t;
94
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c(p, { ...i, ref: s });
95
- });
96
- return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
97
- }, {});
98
- function tt(e, t) {
99
- e && Fn.flushSync(() => e.dispatchEvent(t));
100
- }
101
- function nt(e) {
102
- const t = e + "CollectionProvider", [n, o] = le(t), [r, s] = n(
103
- t,
104
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
105
- ), u = (v) => {
106
- const { scope: g, children: w } = v, R = X.useRef(null), C = X.useRef(/* @__PURE__ */ new Map()).current;
107
- return /* @__PURE__ */ c(r, { scope: g, itemMap: C, collectionRef: R, children: w });
108
- };
109
- u.displayName = t;
110
- const i = e + "CollectionSlot", p = /* @__PURE__ */ we(i), l = X.forwardRef(
111
- (v, g) => {
112
- const { scope: w, children: R } = v, C = s(i, w), M = T(g, C.collectionRef);
113
- return /* @__PURE__ */ c(p, { ref: M, children: R });
114
- }
115
- );
116
- l.displayName = i;
117
- const d = e + "CollectionItemSlot", f = "data-radix-collection-item", m = /* @__PURE__ */ we(d), h = X.forwardRef(
118
- (v, g) => {
119
- const { scope: w, children: R, ...C } = v, M = X.useRef(null), S = T(g, M), N = s(d, w);
120
- return X.useEffect(() => (N.itemMap.set(M, { ref: M, ...C }), () => void N.itemMap.delete(M))), /* @__PURE__ */ c(m, { [f]: "", ref: S, children: R });
121
- }
122
- );
123
- h.displayName = d;
124
- function E(v) {
125
- const g = s(e + "CollectionConsumer", v);
126
- return X.useCallback(() => {
127
- const R = g.collectionRef.current;
128
- if (!R) return [];
129
- const C = Array.from(R.querySelectorAll(`[${f}]`));
130
- return Array.from(g.itemMap.values()).sort(
131
- (N, P) => C.indexOf(N.ref.current) - C.indexOf(P.ref.current)
132
- );
133
- }, [g.collectionRef, g.itemMap]);
134
- }
135
- return [
136
- { Provider: u, Slot: l, ItemSlot: h },
137
- E,
138
- o
139
- ];
140
- }
141
- var qn = "DismissableLayer", Se = "dismissableLayer.update", Jn = "dismissableLayer.pointerDownOutside", Qn = "dismissableLayer.focusOutside", Ve, ot = a.createContext({
142
- layers: /* @__PURE__ */ new Set(),
143
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
144
- branches: /* @__PURE__ */ new Set()
145
- }), rt = a.forwardRef(
146
- (e, t) => {
147
- const {
148
- disableOutsidePointerEvents: n = !1,
149
- onEscapeKeyDown: o,
150
- onPointerDownOutside: r,
151
- onFocusOutside: s,
152
- onInteractOutside: u,
153
- onDismiss: i,
154
- ...p
155
- } = e, l = a.useContext(ot), [d, f] = a.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = a.useState({}), E = T(t, (P) => f(P)), v = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = v.indexOf(g), R = d ? v.indexOf(d) : -1, C = l.layersWithOutsidePointerEventsDisabled.size > 0, M = R >= w, S = no((P) => {
156
- const _ = P.target, U = [...l.branches].some((O) => O.contains(_));
157
- !M || U || (r == null || r(P), u == null || u(P), P.defaultPrevented || i == null || i());
158
- }, m), N = oo((P) => {
159
- const _ = P.target;
160
- [...l.branches].some((O) => O.contains(_)) || (s == null || s(P), u == null || u(P), P.defaultPrevented || i == null || i());
161
- }, m);
162
- return Rn((P) => {
163
- R === l.layers.size - 1 && (o == null || o(P), !P.defaultPrevented && i && (P.preventDefault(), i()));
164
- }, m), a.useEffect(() => {
165
- if (d)
166
- return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Ve = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), Ye(), () => {
167
- n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = Ve);
168
- };
169
- }, [d, m, n, l]), a.useEffect(() => () => {
170
- d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), Ye());
171
- }, [d, l]), a.useEffect(() => {
172
- const P = () => h({});
173
- return document.addEventListener(Se, P), () => document.removeEventListener(Se, P);
174
- }, []), /* @__PURE__ */ c(
175
- x.div,
176
- {
177
- ...p,
178
- ref: E,
179
- style: {
180
- pointerEvents: C ? M ? "auto" : "none" : void 0,
181
- ...e.style
182
- },
183
- onFocusCapture: b(e.onFocusCapture, N.onFocusCapture),
184
- onBlurCapture: b(e.onBlurCapture, N.onBlurCapture),
185
- onPointerDownCapture: b(
186
- e.onPointerDownCapture,
187
- S.onPointerDownCapture
188
- )
189
- }
190
- );
191
- }
192
- );
193
- rt.displayName = qn;
194
- var eo = "DismissableLayerBranch", to = a.forwardRef((e, t) => {
195
- const n = a.useContext(ot), o = a.useRef(null), r = T(t, o);
196
- return a.useEffect(() => {
197
- const s = o.current;
198
- if (s)
199
- return n.branches.add(s), () => {
200
- n.branches.delete(s);
201
- };
202
- }, [n.branches]), /* @__PURE__ */ c(x.div, { ...e, ref: r });
203
- });
204
- to.displayName = eo;
205
- function no(e, t = globalThis == null ? void 0 : globalThis.document) {
206
- const n = V(e), o = a.useRef(!1), r = a.useRef(() => {
207
- });
208
- return a.useEffect(() => {
209
- const s = (i) => {
210
- if (i.target && !o.current) {
211
- let p = function() {
212
- at(
213
- Jn,
214
- n,
215
- l,
216
- { discrete: !0 }
217
- );
218
- };
219
- const l = { originalEvent: i };
220
- i.pointerType === "touch" ? (t.removeEventListener("click", r.current), r.current = p, t.addEventListener("click", r.current, { once: !0 })) : p();
221
- } else
222
- t.removeEventListener("click", r.current);
223
- o.current = !1;
224
- }, u = window.setTimeout(() => {
225
- t.addEventListener("pointerdown", s);
226
- }, 0);
227
- return () => {
228
- window.clearTimeout(u), t.removeEventListener("pointerdown", s), t.removeEventListener("click", r.current);
229
- };
230
- }, [t, n]), {
231
- // ensures we check React component tree (not just DOM tree)
232
- onPointerDownCapture: () => o.current = !0
233
- };
234
- }
235
- function oo(e, t = globalThis == null ? void 0 : globalThis.document) {
236
- const n = V(e), o = a.useRef(!1);
237
- return a.useEffect(() => {
238
- const r = (s) => {
239
- s.target && !o.current && at(Qn, n, { originalEvent: s }, {
240
- discrete: !1
241
- });
242
- };
243
- return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
244
- }, [t, n]), {
245
- onFocusCapture: () => o.current = !0,
246
- onBlurCapture: () => o.current = !1
247
- };
248
- }
249
- function Ye() {
250
- const e = new CustomEvent(Se);
251
- document.dispatchEvent(e);
252
- }
253
- function at(e, t, n, { discrete: o }) {
254
- const r = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
255
- t && r.addEventListener(e, t, { once: !0 }), o ? tt(r, s) : r.dispatchEvent(s);
256
- }
257
- var Re = "focusScope.autoFocusOnMount", Pe = "focusScope.autoFocusOnUnmount", je = { bubbles: !1, cancelable: !0 }, ro = "FocusScope", st = a.forwardRef((e, t) => {
258
- const {
259
- loop: n = !1,
260
- trapped: o = !1,
261
- onMountAutoFocus: r,
262
- onUnmountAutoFocus: s,
263
- ...u
264
- } = e, [i, p] = a.useState(null), l = V(r), d = V(s), f = a.useRef(null), m = T(t, (v) => p(v)), h = a.useRef({
265
- paused: !1,
266
- pause() {
267
- this.paused = !0;
268
- },
269
- resume() {
270
- this.paused = !1;
271
- }
272
- }).current;
273
- a.useEffect(() => {
274
- if (o) {
275
- let v = function(C) {
276
- if (h.paused || !i) return;
277
- const M = C.target;
278
- i.contains(M) ? f.current = M : H(f.current, { select: !0 });
279
- }, g = function(C) {
280
- if (h.paused || !i) return;
281
- const M = C.relatedTarget;
282
- M !== null && (i.contains(M) || H(f.current, { select: !0 }));
283
- }, w = function(C) {
284
- if (document.activeElement === document.body)
285
- for (const S of C)
286
- S.removedNodes.length > 0 && H(i);
287
- };
288
- document.addEventListener("focusin", v), document.addEventListener("focusout", g);
289
- const R = new MutationObserver(w);
290
- return i && R.observe(i, { childList: !0, subtree: !0 }), () => {
291
- document.removeEventListener("focusin", v), document.removeEventListener("focusout", g), R.disconnect();
292
- };
293
- }
294
- }, [o, i, h.paused]), a.useEffect(() => {
295
- if (i) {
296
- Xe.add(h);
297
- const v = document.activeElement;
298
- if (!i.contains(v)) {
299
- const w = new CustomEvent(Re, je);
300
- i.addEventListener(Re, l), i.dispatchEvent(w), w.defaultPrevented || (ao(lo(it(i)), { select: !0 }), document.activeElement === v && H(i));
301
- }
302
- return () => {
303
- i.removeEventListener(Re, l), setTimeout(() => {
304
- const w = new CustomEvent(Pe, je);
305
- i.addEventListener(Pe, d), i.dispatchEvent(w), w.defaultPrevented || H(v ?? document.body, { select: !0 }), i.removeEventListener(Pe, d), Xe.remove(h);
306
- }, 0);
307
- };
308
- }
309
- }, [i, l, d, h]);
310
- const E = a.useCallback(
311
- (v) => {
312
- if (!n && !o || h.paused) return;
313
- const g = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, w = document.activeElement;
314
- if (g && w) {
315
- const R = v.currentTarget, [C, M] = so(R);
316
- C && M ? !v.shiftKey && w === M ? (v.preventDefault(), n && H(C, { select: !0 })) : v.shiftKey && w === C && (v.preventDefault(), n && H(M, { select: !0 })) : w === R && v.preventDefault();
317
- }
318
- },
319
- [n, o, h.paused]
320
- );
321
- return /* @__PURE__ */ c(x.div, { tabIndex: -1, ...u, ref: m, onKeyDown: E });
322
- });
323
- st.displayName = ro;
324
- function ao(e, { select: t = !1 } = {}) {
325
- const n = document.activeElement;
326
- for (const o of e)
327
- if (H(o, { select: t }), document.activeElement !== n) return;
328
- }
329
- function so(e) {
330
- const t = it(e), n = ze(t, e), o = ze(t.reverse(), e);
331
- return [n, o];
332
- }
333
- function it(e) {
334
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
335
- acceptNode: (o) => {
336
- const r = o.tagName === "INPUT" && o.type === "hidden";
337
- return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
338
- }
339
- });
340
- for (; n.nextNode(); ) t.push(n.currentNode);
341
- return t;
342
- }
343
- function ze(e, t) {
344
- for (const n of e)
345
- if (!io(n, { upTo: t })) return n;
346
- }
347
- function io(e, { upTo: t }) {
348
- if (getComputedStyle(e).visibility === "hidden") return !0;
349
- for (; e; ) {
350
- if (t !== void 0 && e === t) return !1;
351
- if (getComputedStyle(e).display === "none") return !0;
352
- e = e.parentElement;
353
- }
354
- return !1;
355
- }
356
- function co(e) {
357
- return e instanceof HTMLInputElement && "select" in e;
358
- }
359
- function H(e, { select: t = !1 } = {}) {
360
- if (e && e.focus) {
361
- const n = document.activeElement;
362
- e.focus({ preventScroll: !0 }), e !== n && co(e) && t && e.select();
363
- }
364
- }
365
- var Xe = uo();
366
- function uo() {
367
- let e = [];
368
- return {
369
- add(t) {
370
- const n = e[0];
371
- t !== n && (n == null || n.pause()), e = Ze(e, t), e.unshift(t);
372
- },
373
- remove(t) {
374
- var n;
375
- e = Ze(e, t), (n = e[0]) == null || n.resume();
376
- }
377
- };
378
- }
379
- function Ze(e, t) {
380
- const n = [...e], o = n.indexOf(t);
381
- return o !== -1 && n.splice(o, 1), n;
382
- }
383
- function lo(e) {
384
- return e.filter((t) => t.tagName !== "A");
385
- }
386
- var fo = "Arrow", ct = a.forwardRef((e, t) => {
387
- const { children: n, width: o = 10, height: r = 5, ...s } = e;
388
- return /* @__PURE__ */ c(
389
- x.svg,
390
- {
391
- ...s,
392
- ref: t,
393
- width: o,
394
- height: r,
395
- viewBox: "0 0 30 10",
396
- preserveAspectRatio: "none",
397
- children: e.asChild ? n : /* @__PURE__ */ c("polygon", { points: "0,0 30,0 15,10" })
398
- }
399
- );
400
- });
401
- ct.displayName = fo;
402
- var po = ct, Te = "Popper", [ut, lt] = le(Te), [mo, dt] = ut(Te), ft = (e) => {
403
- const { __scopePopper: t, children: n } = e, [o, r] = a.useState(null);
404
- return /* @__PURE__ */ c(mo, { scope: t, anchor: o, onAnchorChange: r, children: n });
405
- };
406
- ft.displayName = Te;
407
- var pt = "PopperAnchor", mt = a.forwardRef(
408
- (e, t) => {
409
- const { __scopePopper: n, virtualRef: o, ...r } = e, s = dt(pt, n), u = a.useRef(null), i = T(t, u), p = a.useRef(null);
410
- return a.useEffect(() => {
411
- const l = p.current;
412
- p.current = (o == null ? void 0 : o.current) || u.current, l !== p.current && s.onAnchorChange(p.current);
413
- }), o ? null : /* @__PURE__ */ c(x.div, { ...r, ref: i });
414
- }
415
- );
416
- mt.displayName = pt;
417
- var Oe = "PopperContent", [vo, ho] = ut(Oe), vt = a.forwardRef(
418
- (e, t) => {
419
- var B, oe, L, re, Be, We;
420
- const {
421
- __scopePopper: n,
422
- side: o = "bottom",
423
- sideOffset: r = 0,
424
- align: s = "center",
425
- alignOffset: u = 0,
426
- arrowPadding: i = 0,
427
- avoidCollisions: p = !0,
428
- collisionBoundary: l = [],
429
- collisionPadding: d = 0,
430
- sticky: f = "partial",
431
- hideWhenDetached: m = !1,
432
- updatePositionStrategy: h = "optimized",
433
- onPlaced: E,
434
- ...v
435
- } = e, g = dt(Oe, n), [w, R] = a.useState(null), C = T(t, (ae) => R(ae)), [M, S] = a.useState(null), N = Pn(M), P = (N == null ? void 0 : N.width) ?? 0, _ = (N == null ? void 0 : N.height) ?? 0, U = o + (s !== "center" ? "-" + s : ""), O = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, W = Array.isArray(l) ? l : [l], j = W.length > 0, G = {
436
- padding: O,
437
- boundary: W.filter(wo),
438
- // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
439
- altBoundary: j
440
- }, { refs: J, floatingStyles: Q, placement: $, isPositioned: ee, middlewareData: F } = _n({
441
- // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
442
- strategy: "fixed",
443
- placement: U,
444
- whileElementsMounted: (...ae) => On(...ae, {
445
- animationFrame: h === "always"
446
- }),
447
- elements: {
448
- reference: g.anchor
449
- },
450
- middleware: [
451
- Nn({ mainAxis: r + _, alignmentAxis: u }),
452
- p && Sn({
453
- mainAxis: !0,
454
- crossAxis: !1,
455
- limiter: f === "partial" ? In() : void 0,
456
- ...G
457
- }),
458
- p && xn({ ...G }),
459
- An({
460
- ...G,
461
- apply: ({ elements: ae, rects: He, availableWidth: En, availableHeight: Cn }) => {
462
- const { width: Mn, height: bn } = He.reference, he = ae.floating.style;
463
- he.setProperty("--radix-popper-available-width", `${En}px`), he.setProperty("--radix-popper-available-height", `${Cn}px`), he.setProperty("--radix-popper-anchor-width", `${Mn}px`), he.setProperty("--radix-popper-anchor-height", `${bn}px`);
464
- }
465
- }),
466
- M && Dn({ element: M, padding: i }),
467
- yo({ arrowWidth: P, arrowHeight: _ }),
468
- m && Tn({ strategy: "referenceHidden", ...G })
469
- ]
470
- }), [y, D] = wt($), I = V(E);
471
- ie(() => {
472
- ee && (I == null || I());
473
- }, [ee, I]);
474
- const K = (B = F.arrow) == null ? void 0 : B.x, te = (oe = F.arrow) == null ? void 0 : oe.y, ne = ((L = F.arrow) == null ? void 0 : L.centerOffset) !== 0, [ve, z] = a.useState();
475
- return ie(() => {
476
- w && z(window.getComputedStyle(w).zIndex);
477
- }, [w]), /* @__PURE__ */ c(
478
- "div",
479
- {
480
- ref: J.setFloating,
481
- "data-radix-popper-content-wrapper": "",
482
- style: {
483
- ...Q,
484
- transform: ee ? Q.transform : "translate(0, -200%)",
485
- // keep off the page when measuring
486
- minWidth: "max-content",
487
- zIndex: ve,
488
- "--radix-popper-transform-origin": [
489
- (re = F.transformOrigin) == null ? void 0 : re.x,
490
- (Be = F.transformOrigin) == null ? void 0 : Be.y
491
- ].join(" "),
492
- // hide the content if using the hide middleware and should be hidden
493
- // set visibility to hidden and disable pointer events so the UI behaves
494
- // as if the PopperContent isn't there at all
495
- ...((We = F.hide) == null ? void 0 : We.referenceHidden) && {
496
- visibility: "hidden",
497
- pointerEvents: "none"
498
- }
499
- },
500
- dir: e.dir,
501
- children: /* @__PURE__ */ c(
502
- vo,
503
- {
504
- scope: n,
505
- placedSide: y,
506
- onArrowChange: S,
507
- arrowX: K,
508
- arrowY: te,
509
- shouldHideArrow: ne,
510
- children: /* @__PURE__ */ c(
511
- x.div,
512
- {
513
- "data-side": y,
514
- "data-align": D,
515
- ...v,
516
- ref: C,
517
- style: {
518
- ...v.style,
519
- // if the PopperContent hasn't been placed yet (not all measurements done)
520
- // we prevent animations so that users's animation don't kick in too early referring wrong sides
521
- animation: ee ? void 0 : "none"
522
- }
523
- }
524
- )
525
- }
526
- )
527
- }
528
- );
529
- }
530
- );
531
- vt.displayName = Oe;
532
- var ht = "PopperArrow", go = {
533
- top: "bottom",
534
- right: "left",
535
- bottom: "top",
536
- left: "right"
537
- }, gt = a.forwardRef(function(t, n) {
538
- const { __scopePopper: o, ...r } = t, s = ho(ht, o), u = go[s.placedSide];
539
- return (
540
- // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
541
- // doesn't report size as we'd expect on SVG elements.
542
- // it reports their bounding box which is effectively the largest path inside the SVG.
543
- /* @__PURE__ */ c(
544
- "span",
545
- {
546
- ref: s.onArrowChange,
547
- style: {
548
- position: "absolute",
549
- left: s.arrowX,
550
- top: s.arrowY,
551
- [u]: 0,
552
- transformOrigin: {
553
- top: "",
554
- right: "0 0",
555
- bottom: "center 0",
556
- left: "100% 0"
557
- }[s.placedSide],
558
- transform: {
559
- top: "translateY(100%)",
560
- right: "translateY(50%) rotate(90deg) translateX(-50%)",
561
- bottom: "rotate(180deg)",
562
- left: "translateY(50%) rotate(-90deg) translateX(50%)"
563
- }[s.placedSide],
564
- visibility: s.shouldHideArrow ? "hidden" : void 0
565
- },
566
- children: /* @__PURE__ */ c(
567
- po,
568
- {
569
- ...r,
570
- ref: n,
571
- style: {
572
- ...r.style,
573
- // ensures the element can be measured correctly (mostly for if SVG)
574
- display: "block"
575
- }
576
- }
577
- )
578
- }
579
- )
580
- );
581
- });
582
- gt.displayName = ht;
583
- function wo(e) {
584
- return e !== null;
585
- }
586
- var yo = (e) => ({
587
- name: "transformOrigin",
588
- options: e,
589
- fn(t) {
590
- var g, w, R;
591
- const { placement: n, rects: o, middlewareData: r } = t, u = ((g = r.arrow) == null ? void 0 : g.centerOffset) !== 0, i = u ? 0 : e.arrowWidth, p = u ? 0 : e.arrowHeight, [l, d] = wt(n), f = { start: "0%", center: "50%", end: "100%" }[d], m = (((w = r.arrow) == null ? void 0 : w.x) ?? 0) + i / 2, h = (((R = r.arrow) == null ? void 0 : R.y) ?? 0) + p / 2;
592
- let E = "", v = "";
593
- return l === "bottom" ? (E = u ? f : `${m}px`, v = `${-p}px`) : l === "top" ? (E = u ? f : `${m}px`, v = `${o.floating.height + p}px`) : l === "right" ? (E = `${-p}px`, v = u ? f : `${h}px`) : l === "left" && (E = `${o.floating.width + p}px`, v = u ? f : `${h}px`), { data: { x: E, y: v } };
594
- }
595
- });
596
- function wt(e) {
597
- const [t, n = "center"] = e.split("-");
598
- return [t, n];
599
- }
600
- var Eo = ft, Co = mt, Mo = vt, bo = gt, Ro = "Portal", yt = a.forwardRef((e, t) => {
601
- var i;
602
- const { container: n, ...o } = e, [r, s] = a.useState(!1);
603
- ie(() => s(!0), []);
604
- const u = n || r && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
605
- return u ? Ln.createPortal(/* @__PURE__ */ c(x.div, { ...o, ref: t }), u) : null;
606
- });
607
- yt.displayName = Ro;
608
- function Po(e, t) {
609
- return a.useReducer((n, o) => t[n][o] ?? n, e);
610
- }
611
- var de = (e) => {
612
- const { present: t, children: n } = e, o = _o(t), r = typeof n == "function" ? n({ present: o.isPresent }) : a.Children.only(n), s = T(o.ref, No(r));
613
- return typeof n == "function" || o.isPresent ? a.cloneElement(r, { ref: s }) : null;
614
- };
615
- de.displayName = "Presence";
616
- function _o(e) {
617
- const [t, n] = a.useState(), o = a.useRef(null), r = a.useRef(e), s = a.useRef("none"), u = e ? "mounted" : "unmounted", [i, p] = Po(u, {
618
- mounted: {
619
- UNMOUNT: "unmounted",
620
- ANIMATION_OUT: "unmountSuspended"
621
- },
622
- unmountSuspended: {
623
- MOUNT: "mounted",
624
- ANIMATION_END: "unmounted"
625
- },
626
- unmounted: {
627
- MOUNT: "mounted"
628
- }
629
- });
630
- return a.useEffect(() => {
631
- const l = ge(o.current);
632
- s.current = i === "mounted" ? l : "none";
633
- }, [i]), ie(() => {
634
- const l = o.current, d = r.current;
635
- if (d !== e) {
636
- const m = s.current, h = ge(l);
637
- e ? p("MOUNT") : h === "none" || (l == null ? void 0 : l.display) === "none" ? p("UNMOUNT") : p(d && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
638
- }
639
- }, [e, p]), ie(() => {
640
- if (t) {
641
- let l;
642
- const d = t.ownerDocument.defaultView ?? window, f = (h) => {
643
- const v = ge(o.current).includes(CSS.escape(h.animationName));
644
- if (h.target === t && v && (p("ANIMATION_END"), !r.current)) {
645
- const g = t.style.animationFillMode;
646
- t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
647
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
648
- });
649
- }
650
- }, m = (h) => {
651
- h.target === t && (s.current = ge(o.current));
652
- };
653
- return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
654
- d.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
655
- };
656
- } else
657
- p("ANIMATION_END");
658
- }, [t, p]), {
659
- isPresent: ["mounted", "unmountSuspended"].includes(i),
660
- ref: a.useCallback((l) => {
661
- o.current = l ? getComputedStyle(l) : null, n(l);
662
- }, [])
663
- };
664
- }
665
- function ge(e) {
666
- return (e == null ? void 0 : e.animationName) || "none";
667
- }
668
- function No(e) {
669
- var o, r;
670
- let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
671
- return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
672
- }
673
- var _e = "rovingFocusGroup.onEntryFocus", So = { bubbles: !1, cancelable: !0 }, fe = "RovingFocusGroup", [Ie, Et, Io] = nt(fe), [xo, Ct] = le(
674
- fe,
675
- [Io]
676
- ), [Ao, Do] = xo(fe), Mt = a.forwardRef(
677
- (e, t) => /* @__PURE__ */ c(Ie.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c(Ie.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c(To, { ...e, ref: t }) }) })
678
- );
679
- Mt.displayName = fe;
680
- var To = a.forwardRef((e, t) => {
681
- const {
682
- __scopeRovingFocusGroup: n,
683
- orientation: o,
684
- loop: r = !1,
685
- dir: s,
686
- currentTabStopId: u,
687
- defaultCurrentTabStopId: i,
688
- onCurrentTabStopIdChange: p,
689
- onEntryFocus: l,
690
- preventScrollOnEntryFocus: d = !1,
691
- ...f
692
- } = e, m = a.useRef(null), h = T(t, m), E = et(s), [v, g] = Qe({
693
- prop: u,
694
- defaultProp: i ?? null,
695
- onChange: p,
696
- caller: fe
697
- }), [w, R] = a.useState(!1), C = V(l), M = Et(n), S = a.useRef(!1), [N, P] = a.useState(0);
698
- return a.useEffect(() => {
699
- const _ = m.current;
700
- if (_)
701
- return _.addEventListener(_e, C), () => _.removeEventListener(_e, C);
702
- }, [C]), /* @__PURE__ */ c(
703
- Ao,
704
- {
705
- scope: n,
706
- orientation: o,
707
- dir: E,
708
- loop: r,
709
- currentTabStopId: v,
710
- onItemFocus: a.useCallback(
711
- (_) => g(_),
712
- [g]
713
- ),
714
- onItemShiftTab: a.useCallback(() => R(!0), []),
715
- onFocusableItemAdd: a.useCallback(
716
- () => P((_) => _ + 1),
717
- []
718
- ),
719
- onFocusableItemRemove: a.useCallback(
720
- () => P((_) => _ - 1),
721
- []
722
- ),
723
- children: /* @__PURE__ */ c(
724
- x.div,
725
- {
726
- tabIndex: w || N === 0 ? -1 : 0,
727
- "data-orientation": o,
728
- ...f,
729
- ref: h,
730
- style: { outline: "none", ...e.style },
731
- onMouseDown: b(e.onMouseDown, () => {
732
- S.current = !0;
733
- }),
734
- onFocus: b(e.onFocus, (_) => {
735
- const U = !S.current;
736
- if (_.target === _.currentTarget && U && !w) {
737
- const O = new CustomEvent(_e, So);
738
- if (_.currentTarget.dispatchEvent(O), !O.defaultPrevented) {
739
- const W = M().filter(($) => $.focusable), j = W.find(($) => $.active), G = W.find(($) => $.id === v), Q = [j, G, ...W].filter(
740
- Boolean
741
- ).map(($) => $.ref.current);
742
- Pt(Q, d);
743
- }
744
- }
745
- S.current = !1;
746
- }),
747
- onBlur: b(e.onBlur, () => R(!1))
748
- }
749
- )
750
- }
751
- );
752
- }), bt = "RovingFocusGroupItem", Rt = a.forwardRef(
753
- (e, t) => {
754
- const {
755
- __scopeRovingFocusGroup: n,
756
- focusable: o = !0,
757
- active: r = !1,
758
- tabStopId: s,
759
- children: u,
760
- ...i
761
- } = e, p = Ne(), l = s || p, d = Do(bt, n), f = d.currentTabStopId === l, m = Et(n), { onFocusableItemAdd: h, onFocusableItemRemove: E, currentTabStopId: v } = d;
762
- return a.useEffect(() => {
763
- if (o)
764
- return h(), () => E();
765
- }, [o, h, E]), /* @__PURE__ */ c(
766
- Ie.ItemSlot,
767
- {
768
- scope: n,
769
- id: l,
770
- focusable: o,
771
- active: r,
772
- children: /* @__PURE__ */ c(
773
- x.span,
774
- {
775
- tabIndex: f ? 0 : -1,
776
- "data-orientation": d.orientation,
777
- ...i,
778
- ref: t,
779
- onMouseDown: b(e.onMouseDown, (g) => {
780
- o ? d.onItemFocus(l) : g.preventDefault();
781
- }),
782
- onFocus: b(e.onFocus, () => d.onItemFocus(l)),
783
- onKeyDown: b(e.onKeyDown, (g) => {
784
- if (g.key === "Tab" && g.shiftKey) {
785
- d.onItemShiftTab();
786
- return;
787
- }
788
- if (g.target !== g.currentTarget) return;
789
- const w = Lo(g, d.orientation, d.dir);
790
- if (w !== void 0) {
791
- if (g.metaKey || g.ctrlKey || g.altKey || g.shiftKey) return;
792
- g.preventDefault();
793
- let C = m().filter((M) => M.focusable).map((M) => M.ref.current);
794
- if (w === "last") C.reverse();
795
- else if (w === "prev" || w === "next") {
796
- w === "prev" && C.reverse();
797
- const M = C.indexOf(g.currentTarget);
798
- C = d.loop ? ko(C, M + 1) : C.slice(M + 1);
799
- }
800
- setTimeout(() => Pt(C));
801
- }
802
- }),
803
- children: typeof u == "function" ? u({ isCurrentTabStop: f, hasTabStop: v != null }) : u
804
- }
805
- )
806
- }
807
- );
808
- }
809
- );
810
- Rt.displayName = bt;
811
- var Oo = {
812
- ArrowLeft: "prev",
813
- ArrowUp: "prev",
814
- ArrowRight: "next",
815
- ArrowDown: "next",
816
- PageUp: "first",
817
- Home: "first",
818
- PageDown: "last",
819
- End: "last"
820
- };
821
- function Fo(e, t) {
822
- return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
823
- }
824
- function Lo(e, t, n) {
825
- const o = Fo(e.key, n);
826
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
827
- return Oo[o];
828
- }
829
- function Pt(e, t = !1) {
830
- const n = document.activeElement;
831
- for (const o of e)
832
- if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
833
- }
834
- function ko(e, t) {
835
- return e.map((n, o) => e[(t + o) % e.length]);
836
- }
837
- var Uo = Mt, $o = Rt, xe = ["Enter", " "], Ko = ["ArrowDown", "PageUp", "Home"], _t = ["ArrowUp", "PageDown", "End"], Go = [...Ko, ..._t], Bo = {
838
- ltr: [...xe, "ArrowRight"],
839
- rtl: [...xe, "ArrowLeft"]
840
- }, Wo = {
841
- ltr: ["ArrowLeft"],
842
- rtl: ["ArrowRight"]
843
- }, pe = "Menu", [ce, Ho, Vo] = nt(pe), [Z, Nt] = le(pe, [
844
- Vo,
845
- lt,
846
- Ct
847
- ]), Ce = lt(), St = Ct(), [Yo, q] = Z(pe), [jo, me] = Z(pe), It = (e) => {
848
- const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: s, modal: u = !0 } = e, i = Ce(t), [p, l] = a.useState(null), d = a.useRef(!1), f = V(s), m = et(r);
849
- return a.useEffect(() => {
850
- const h = () => {
851
- d.current = !0, document.addEventListener("pointerdown", E, { capture: !0, once: !0 }), document.addEventListener("pointermove", E, { capture: !0, once: !0 });
852
- }, E = () => d.current = !1;
853
- return document.addEventListener("keydown", h, { capture: !0 }), () => {
854
- document.removeEventListener("keydown", h, { capture: !0 }), document.removeEventListener("pointerdown", E, { capture: !0 }), document.removeEventListener("pointermove", E, { capture: !0 });
855
- };
856
- }, []), /* @__PURE__ */ c(Eo, { ...i, children: /* @__PURE__ */ c(
857
- Yo,
858
- {
859
- scope: t,
860
- open: n,
861
- onOpenChange: f,
862
- content: p,
863
- onContentChange: l,
864
- children: /* @__PURE__ */ c(
865
- jo,
866
- {
867
- scope: t,
868
- onClose: a.useCallback(() => f(!1), [f]),
869
- isUsingKeyboardRef: d,
870
- dir: m,
871
- modal: u,
872
- children: o
873
- }
874
- )
875
- }
876
- ) });
877
- };
878
- It.displayName = pe;
879
- var zo = "MenuAnchor", Fe = a.forwardRef(
880
- (e, t) => {
881
- const { __scopeMenu: n, ...o } = e, r = Ce(n);
882
- return /* @__PURE__ */ c(Co, { ...r, ...o, ref: t });
883
- }
884
- );
885
- Fe.displayName = zo;
886
- var Le = "MenuPortal", [Xo, xt] = Z(Le, {
887
- forceMount: void 0
888
- }), At = (e) => {
889
- const { __scopeMenu: t, forceMount: n, children: o, container: r } = e, s = q(Le, t);
890
- return /* @__PURE__ */ c(Xo, { scope: t, forceMount: n, children: /* @__PURE__ */ c(de, { present: n || s.open, children: /* @__PURE__ */ c(yt, { asChild: !0, container: r, children: o }) }) });
891
- };
892
- At.displayName = Le;
893
- var k = "MenuContent", [Zo, ke] = Z(k), Dt = a.forwardRef(
894
- (e, t) => {
895
- const n = xt(k, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, s = q(k, e.__scopeMenu), u = me(k, e.__scopeMenu);
896
- return /* @__PURE__ */ c(ce.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(de, { present: o || s.open, children: /* @__PURE__ */ c(ce.Slot, { scope: e.__scopeMenu, children: u.modal ? /* @__PURE__ */ c(qo, { ...r, ref: t }) : /* @__PURE__ */ c(Jo, { ...r, ref: t }) }) }) });
897
- }
898
- ), qo = a.forwardRef(
899
- (e, t) => {
900
- const n = q(k, e.__scopeMenu), o = a.useRef(null), r = T(t, o);
901
- return a.useEffect(() => {
902
- const s = o.current;
903
- if (s) return $n(s);
904
- }, []), /* @__PURE__ */ c(
905
- Ue,
906
- {
907
- ...e,
908
- ref: r,
909
- trapFocus: n.open,
910
- disableOutsidePointerEvents: n.open,
911
- disableOutsideScroll: !0,
912
- onFocusOutside: b(
913
- e.onFocusOutside,
914
- (s) => s.preventDefault(),
915
- { checkForDefaultPrevented: !1 }
916
- ),
917
- onDismiss: () => n.onOpenChange(!1)
918
- }
919
- );
920
- }
921
- ), Jo = a.forwardRef((e, t) => {
922
- const n = q(k, e.__scopeMenu);
923
- return /* @__PURE__ */ c(
924
- Ue,
925
- {
926
- ...e,
927
- ref: t,
928
- trapFocus: !1,
929
- disableOutsidePointerEvents: !1,
930
- disableOutsideScroll: !1,
931
- onDismiss: () => n.onOpenChange(!1)
932
- }
933
- );
934
- }), Qo = /* @__PURE__ */ we("MenuContent.ScrollLock"), Ue = a.forwardRef(
935
- (e, t) => {
936
- const {
937
- __scopeMenu: n,
938
- loop: o = !1,
939
- trapFocus: r,
940
- onOpenAutoFocus: s,
941
- onCloseAutoFocus: u,
942
- disableOutsidePointerEvents: i,
943
- onEntryFocus: p,
944
- onEscapeKeyDown: l,
945
- onPointerDownOutside: d,
946
- onFocusOutside: f,
947
- onInteractOutside: m,
948
- onDismiss: h,
949
- disableOutsideScroll: E,
950
- ...v
951
- } = e, g = q(k, n), w = me(k, n), R = Ce(n), C = St(n), M = Ho(n), [S, N] = a.useState(null), P = a.useRef(null), _ = T(t, P, g.onContentChange), U = a.useRef(0), O = a.useRef(""), W = a.useRef(0), j = a.useRef(null), G = a.useRef("right"), J = a.useRef(0), Q = E ? Un : a.Fragment, $ = E ? { as: Qo, allowPinchZoom: !0 } : void 0, ee = (y) => {
952
- var B, oe;
953
- const D = O.current + y, I = M().filter((L) => !L.disabled), K = document.activeElement, te = (B = I.find((L) => L.ref.current === K)) == null ? void 0 : B.textValue, ne = I.map((L) => L.textValue), ve = dr(ne, D, te), z = (oe = I.find((L) => L.textValue === ve)) == null ? void 0 : oe.ref.current;
954
- (function L(re) {
955
- O.current = re, window.clearTimeout(U.current), re !== "" && (U.current = window.setTimeout(() => L(""), 1e3));
956
- })(D), z && setTimeout(() => z.focus());
957
- };
958
- a.useEffect(() => () => window.clearTimeout(U.current), []), kn();
959
- const F = a.useCallback((y) => {
960
- var I, K;
961
- return G.current === ((I = j.current) == null ? void 0 : I.side) && pr(y, (K = j.current) == null ? void 0 : K.area);
962
- }, []);
963
- return /* @__PURE__ */ c(
964
- Zo,
965
- {
966
- scope: n,
967
- searchRef: O,
968
- onItemEnter: a.useCallback(
969
- (y) => {
970
- F(y) && y.preventDefault();
971
- },
972
- [F]
973
- ),
974
- onItemLeave: a.useCallback(
975
- (y) => {
976
- var D;
977
- F(y) || ((D = P.current) == null || D.focus(), N(null));
978
- },
979
- [F]
980
- ),
981
- onTriggerLeave: a.useCallback(
982
- (y) => {
983
- F(y) && y.preventDefault();
984
- },
985
- [F]
986
- ),
987
- pointerGraceTimerRef: W,
988
- onPointerGraceIntentChange: a.useCallback((y) => {
989
- j.current = y;
990
- }, []),
991
- children: /* @__PURE__ */ c(Q, { ...$, children: /* @__PURE__ */ c(
992
- st,
993
- {
994
- asChild: !0,
995
- trapped: r,
996
- onMountAutoFocus: b(s, (y) => {
997
- var D;
998
- y.preventDefault(), (D = P.current) == null || D.focus({ preventScroll: !0 });
999
- }),
1000
- onUnmountAutoFocus: u,
1001
- children: /* @__PURE__ */ c(
1002
- rt,
1003
- {
1004
- asChild: !0,
1005
- disableOutsidePointerEvents: i,
1006
- onEscapeKeyDown: l,
1007
- onPointerDownOutside: d,
1008
- onFocusOutside: f,
1009
- onInteractOutside: m,
1010
- onDismiss: h,
1011
- children: /* @__PURE__ */ c(
1012
- Uo,
1013
- {
1014
- asChild: !0,
1015
- ...C,
1016
- dir: w.dir,
1017
- orientation: "vertical",
1018
- loop: o,
1019
- currentTabStopId: S,
1020
- onCurrentTabStopIdChange: N,
1021
- onEntryFocus: b(p, (y) => {
1022
- w.isUsingKeyboardRef.current || y.preventDefault();
1023
- }),
1024
- preventScrollOnEntryFocus: !0,
1025
- children: /* @__PURE__ */ c(
1026
- Mo,
1027
- {
1028
- role: "menu",
1029
- "aria-orientation": "vertical",
1030
- "data-state": zt(g.open),
1031
- "data-radix-menu-content": "",
1032
- dir: w.dir,
1033
- ...R,
1034
- ...v,
1035
- ref: _,
1036
- style: { outline: "none", ...v.style },
1037
- onKeyDown: b(v.onKeyDown, (y) => {
1038
- const I = y.target.closest("[data-radix-menu-content]") === y.currentTarget, K = y.ctrlKey || y.altKey || y.metaKey, te = y.key.length === 1;
1039
- I && (y.key === "Tab" && y.preventDefault(), !K && te && ee(y.key));
1040
- const ne = P.current;
1041
- if (y.target !== ne || !Go.includes(y.key)) return;
1042
- y.preventDefault();
1043
- const z = M().filter((B) => !B.disabled).map((B) => B.ref.current);
1044
- _t.includes(y.key) && z.reverse(), ur(z);
1045
- }),
1046
- onBlur: b(e.onBlur, (y) => {
1047
- y.currentTarget.contains(y.target) || (window.clearTimeout(U.current), O.current = "");
1048
- }),
1049
- onPointerMove: b(
1050
- e.onPointerMove,
1051
- ue((y) => {
1052
- const D = y.target, I = J.current !== y.clientX;
1053
- if (y.currentTarget.contains(D) && I) {
1054
- const K = y.clientX > J.current ? "right" : "left";
1055
- G.current = K, J.current = y.clientX;
1056
- }
1057
- })
1058
- )
1059
- }
1060
- )
1061
- }
1062
- )
1063
- }
1064
- )
1065
- }
1066
- ) })
1067
- }
1068
- );
1069
- }
1070
- );
1071
- Dt.displayName = k;
1072
- var er = "MenuGroup", $e = a.forwardRef(
1073
- (e, t) => {
1074
- const { __scopeMenu: n, ...o } = e;
1075
- return /* @__PURE__ */ c(x.div, { role: "group", ...o, ref: t });
1076
- }
1077
- );
1078
- $e.displayName = er;
1079
- var tr = "MenuLabel", Tt = a.forwardRef(
1080
- (e, t) => {
1081
- const { __scopeMenu: n, ...o } = e;
1082
- return /* @__PURE__ */ c(x.div, { ...o, ref: t });
1083
- }
1084
- );
1085
- Tt.displayName = tr;
1086
- var ye = "MenuItem", qe = "menu.itemSelect", Me = a.forwardRef(
1087
- (e, t) => {
1088
- const { disabled: n = !1, onSelect: o, ...r } = e, s = a.useRef(null), u = me(ye, e.__scopeMenu), i = ke(ye, e.__scopeMenu), p = T(t, s), l = a.useRef(!1), d = () => {
1089
- const f = s.current;
1090
- if (!n && f) {
1091
- const m = new CustomEvent(qe, { bubbles: !0, cancelable: !0 });
1092
- f.addEventListener(qe, (h) => o == null ? void 0 : o(h), { once: !0 }), tt(f, m), m.defaultPrevented ? l.current = !1 : u.onClose();
1093
- }
1094
- };
1095
- return /* @__PURE__ */ c(
1096
- Ot,
1097
- {
1098
- ...r,
1099
- ref: p,
1100
- disabled: n,
1101
- onClick: b(e.onClick, d),
1102
- onPointerDown: (f) => {
1103
- var m;
1104
- (m = e.onPointerDown) == null || m.call(e, f), l.current = !0;
1105
- },
1106
- onPointerUp: b(e.onPointerUp, (f) => {
1107
- var m;
1108
- l.current || (m = f.currentTarget) == null || m.click();
1109
- }),
1110
- onKeyDown: b(e.onKeyDown, (f) => {
1111
- const m = i.searchRef.current !== "";
1112
- n || m && f.key === " " || xe.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
1113
- })
1114
- }
1115
- );
1116
- }
1117
- );
1118
- Me.displayName = ye;
1119
- var Ot = a.forwardRef(
1120
- (e, t) => {
1121
- const { __scopeMenu: n, disabled: o = !1, textValue: r, ...s } = e, u = ke(ye, n), i = St(n), p = a.useRef(null), l = T(t, p), [d, f] = a.useState(!1), [m, h] = a.useState("");
1122
- return a.useEffect(() => {
1123
- const E = p.current;
1124
- E && h((E.textContent ?? "").trim());
1125
- }, [s.children]), /* @__PURE__ */ c(
1126
- ce.ItemSlot,
1127
- {
1128
- scope: n,
1129
- disabled: o,
1130
- textValue: r ?? m,
1131
- children: /* @__PURE__ */ c($o, { asChild: !0, ...i, focusable: !o, children: /* @__PURE__ */ c(
1132
- x.div,
1133
- {
1134
- role: "menuitem",
1135
- "data-highlighted": d ? "" : void 0,
1136
- "aria-disabled": o || void 0,
1137
- "data-disabled": o ? "" : void 0,
1138
- ...s,
1139
- ref: l,
1140
- onPointerMove: b(
1141
- e.onPointerMove,
1142
- ue((E) => {
1143
- o ? u.onItemLeave(E) : (u.onItemEnter(E), E.defaultPrevented || E.currentTarget.focus({ preventScroll: !0 }));
1144
- })
1145
- ),
1146
- onPointerLeave: b(
1147
- e.onPointerLeave,
1148
- ue((E) => u.onItemLeave(E))
1149
- ),
1150
- onFocus: b(e.onFocus, () => f(!0)),
1151
- onBlur: b(e.onBlur, () => f(!1))
1152
- }
1153
- ) })
1154
- }
1155
- );
1156
- }
1157
- ), nr = "MenuCheckboxItem", Ft = a.forwardRef(
1158
- (e, t) => {
1159
- const { checked: n = !1, onCheckedChange: o, ...r } = e;
1160
- return /* @__PURE__ */ c(Kt, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ c(
1161
- Me,
1162
- {
1163
- role: "menuitemcheckbox",
1164
- "aria-checked": Ee(n) ? "mixed" : n,
1165
- ...r,
1166
- ref: t,
1167
- "data-state": Ge(n),
1168
- onSelect: b(
1169
- r.onSelect,
1170
- () => o == null ? void 0 : o(Ee(n) ? !0 : !n),
1171
- { checkForDefaultPrevented: !1 }
1172
- )
1173
- }
1174
- ) });
1175
- }
1176
- );
1177
- Ft.displayName = nr;
1178
- var Lt = "MenuRadioGroup", [or, rr] = Z(
1179
- Lt,
1180
- { value: void 0, onValueChange: () => {
1181
- } }
1182
- ), kt = a.forwardRef(
1183
- (e, t) => {
1184
- const { value: n, onValueChange: o, ...r } = e, s = V(o);
1185
- return /* @__PURE__ */ c(or, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c($e, { ...r, ref: t }) });
1186
- }
1187
- );
1188
- kt.displayName = Lt;
1189
- var Ut = "MenuRadioItem", $t = a.forwardRef(
1190
- (e, t) => {
1191
- const { value: n, ...o } = e, r = rr(Ut, e.__scopeMenu), s = n === r.value;
1192
- return /* @__PURE__ */ c(Kt, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ c(
1193
- Me,
1194
- {
1195
- role: "menuitemradio",
1196
- "aria-checked": s,
1197
- ...o,
1198
- ref: t,
1199
- "data-state": Ge(s),
1200
- onSelect: b(
1201
- o.onSelect,
1202
- () => {
1203
- var u;
1204
- return (u = r.onValueChange) == null ? void 0 : u.call(r, n);
1205
- },
1206
- { checkForDefaultPrevented: !1 }
1207
- )
1208
- }
1209
- ) });
1210
- }
1211
- );
1212
- $t.displayName = Ut;
1213
- var Ke = "MenuItemIndicator", [Kt, ar] = Z(
1214
- Ke,
1215
- { checked: !1 }
1216
- ), Gt = a.forwardRef(
1217
- (e, t) => {
1218
- const { __scopeMenu: n, forceMount: o, ...r } = e, s = ar(Ke, n);
1219
- return /* @__PURE__ */ c(
1220
- de,
1221
- {
1222
- present: o || Ee(s.checked) || s.checked === !0,
1223
- children: /* @__PURE__ */ c(
1224
- x.span,
1225
- {
1226
- ...r,
1227
- ref: t,
1228
- "data-state": Ge(s.checked)
1229
- }
1230
- )
1231
- }
1232
- );
1233
- }
1234
- );
1235
- Gt.displayName = Ke;
1236
- var sr = "MenuSeparator", Bt = a.forwardRef(
1237
- (e, t) => {
1238
- const { __scopeMenu: n, ...o } = e;
1239
- return /* @__PURE__ */ c(
1240
- x.div,
1241
- {
1242
- role: "separator",
1243
- "aria-orientation": "horizontal",
1244
- ...o,
1245
- ref: t
1246
- }
1247
- );
1248
- }
1249
- );
1250
- Bt.displayName = sr;
1251
- var ir = "MenuArrow", Wt = a.forwardRef(
1252
- (e, t) => {
1253
- const { __scopeMenu: n, ...o } = e, r = Ce(n);
1254
- return /* @__PURE__ */ c(bo, { ...r, ...o, ref: t });
1255
- }
1256
- );
1257
- Wt.displayName = ir;
1258
- var cr = "MenuSub", [fa, Ht] = Z(cr), se = "MenuSubTrigger", Vt = a.forwardRef(
1259
- (e, t) => {
1260
- const n = q(se, e.__scopeMenu), o = me(se, e.__scopeMenu), r = Ht(se, e.__scopeMenu), s = ke(se, e.__scopeMenu), u = a.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: p } = s, l = { __scopeMenu: e.__scopeMenu }, d = a.useCallback(() => {
1261
- u.current && window.clearTimeout(u.current), u.current = null;
1262
- }, []);
1263
- return a.useEffect(() => d, [d]), a.useEffect(() => {
1264
- const f = i.current;
1265
- return () => {
1266
- window.clearTimeout(f), p(null);
1267
- };
1268
- }, [i, p]), /* @__PURE__ */ c(Fe, { asChild: !0, ...l, children: /* @__PURE__ */ c(
1269
- Ot,
1270
- {
1271
- id: r.triggerId,
1272
- "aria-haspopup": "menu",
1273
- "aria-expanded": n.open,
1274
- "aria-controls": r.contentId,
1275
- "data-state": zt(n.open),
1276
- ...e,
1277
- ref: De(t, r.onTriggerChange),
1278
- onClick: (f) => {
1279
- var m;
1280
- (m = e.onClick) == null || m.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
1281
- },
1282
- onPointerMove: b(
1283
- e.onPointerMove,
1284
- ue((f) => {
1285
- s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !u.current && (s.onPointerGraceIntentChange(null), u.current = window.setTimeout(() => {
1286
- n.onOpenChange(!0), d();
1287
- }, 100));
1288
- })
1289
- ),
1290
- onPointerLeave: b(
1291
- e.onPointerLeave,
1292
- ue((f) => {
1293
- var h, E;
1294
- d();
1295
- const m = (h = n.content) == null ? void 0 : h.getBoundingClientRect();
1296
- if (m) {
1297
- const v = (E = n.content) == null ? void 0 : E.dataset.side, g = v === "right", w = g ? -5 : 5, R = m[g ? "left" : "right"], C = m[g ? "right" : "left"];
1298
- s.onPointerGraceIntentChange({
1299
- area: [
1300
- // Apply a bleed on clientX to ensure that our exit point is
1301
- // consistently within polygon bounds
1302
- { x: f.clientX + w, y: f.clientY },
1303
- { x: R, y: m.top },
1304
- { x: C, y: m.top },
1305
- { x: C, y: m.bottom },
1306
- { x: R, y: m.bottom }
1307
- ],
1308
- side: v
1309
- }), window.clearTimeout(i.current), i.current = window.setTimeout(
1310
- () => s.onPointerGraceIntentChange(null),
1311
- 300
1312
- );
1313
- } else {
1314
- if (s.onTriggerLeave(f), f.defaultPrevented) return;
1315
- s.onPointerGraceIntentChange(null);
1316
- }
1317
- })
1318
- ),
1319
- onKeyDown: b(e.onKeyDown, (f) => {
1320
- var h;
1321
- const m = s.searchRef.current !== "";
1322
- e.disabled || m && f.key === " " || Bo[o.dir].includes(f.key) && (n.onOpenChange(!0), (h = n.content) == null || h.focus(), f.preventDefault());
1323
- })
1324
- }
1325
- ) });
1326
- }
1327
- );
1328
- Vt.displayName = se;
1329
- var Yt = "MenuSubContent", jt = a.forwardRef(
1330
- (e, t) => {
1331
- const n = xt(k, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, s = q(k, e.__scopeMenu), u = me(k, e.__scopeMenu), i = Ht(Yt, e.__scopeMenu), p = a.useRef(null), l = T(t, p);
1332
- return /* @__PURE__ */ c(ce.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(de, { present: o || s.open, children: /* @__PURE__ */ c(ce.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(
1333
- Ue,
1334
- {
1335
- id: i.contentId,
1336
- "aria-labelledby": i.triggerId,
1337
- ...r,
1338
- ref: l,
1339
- align: "start",
1340
- side: u.dir === "rtl" ? "left" : "right",
1341
- disableOutsidePointerEvents: !1,
1342
- disableOutsideScroll: !1,
1343
- trapFocus: !1,
1344
- onOpenAutoFocus: (d) => {
1345
- var f;
1346
- u.isUsingKeyboardRef.current && ((f = p.current) == null || f.focus()), d.preventDefault();
1347
- },
1348
- onCloseAutoFocus: (d) => d.preventDefault(),
1349
- onFocusOutside: b(e.onFocusOutside, (d) => {
1350
- d.target !== i.trigger && s.onOpenChange(!1);
1351
- }),
1352
- onEscapeKeyDown: b(e.onEscapeKeyDown, (d) => {
1353
- u.onClose(), d.preventDefault();
1354
- }),
1355
- onKeyDown: b(e.onKeyDown, (d) => {
1356
- var h;
1357
- const f = d.currentTarget.contains(d.target), m = Wo[u.dir].includes(d.key);
1358
- f && m && (s.onOpenChange(!1), (h = i.trigger) == null || h.focus(), d.preventDefault());
1359
- })
1360
- }
1361
- ) }) }) });
1362
- }
1363
- );
1364
- jt.displayName = Yt;
1365
- function zt(e) {
1366
- return e ? "open" : "closed";
1367
- }
1368
- function Ee(e) {
1369
- return e === "indeterminate";
1370
- }
1371
- function Ge(e) {
1372
- return Ee(e) ? "indeterminate" : e ? "checked" : "unchecked";
1373
- }
1374
- function ur(e) {
1375
- const t = document.activeElement;
1376
- for (const n of e)
1377
- if (n === t || (n.focus(), document.activeElement !== t)) return;
1378
- }
1379
- function lr(e, t) {
1380
- return e.map((n, o) => e[(t + o) % e.length]);
1381
- }
1382
- function dr(e, t, n) {
1383
- const r = t.length > 1 && Array.from(t).every((l) => l === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1384
- let u = lr(e, Math.max(s, 0));
1385
- r.length === 1 && (u = u.filter((l) => l !== n));
1386
- const p = u.find(
1387
- (l) => l.toLowerCase().startsWith(r.toLowerCase())
1388
- );
1389
- return p !== n ? p : void 0;
1390
- }
1391
- function fr(e, t) {
1392
- const { x: n, y: o } = e;
1393
- let r = !1;
1394
- for (let s = 0, u = t.length - 1; s < t.length; u = s++) {
1395
- const i = t[s], p = t[u], l = i.x, d = i.y, f = p.x, m = p.y;
1396
- d > o != m > o && n < (f - l) * (o - d) / (m - d) + l && (r = !r);
1397
- }
1398
- return r;
1399
- }
1400
- function pr(e, t) {
1401
- if (!t) return !1;
1402
- const n = { x: e.clientX, y: e.clientY };
1403
- return fr(n, t);
1404
- }
1405
- function ue(e) {
1406
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1407
- }
1408
- var mr = It, vr = Fe, hr = At, gr = Dt, wr = $e, yr = Tt, Er = Me, Cr = Ft, Mr = kt, br = $t, Rr = Gt, Pr = Bt, _r = Wt, Nr = Vt, Sr = jt, be = "DropdownMenu", [Ir] = le(
1409
- be,
1410
- [Nt]
1411
- ), A = Nt(), [xr, Xt] = Ir(be), Zt = (e) => {
1412
- const {
1413
- __scopeDropdownMenu: t,
1414
- children: n,
1415
- dir: o,
1416
- open: r,
1417
- defaultOpen: s,
1418
- onOpenChange: u,
1419
- modal: i = !0
1420
- } = e, p = A(t), l = a.useRef(null), [d, f] = Qe({
1421
- prop: r,
1422
- defaultProp: s ?? !1,
1423
- onChange: u,
1424
- caller: be
1425
- });
1426
- return /* @__PURE__ */ c(
1427
- xr,
1428
- {
1429
- scope: t,
1430
- triggerId: Ne(),
1431
- triggerRef: l,
1432
- contentId: Ne(),
1433
- open: d,
1434
- onOpenChange: f,
1435
- onOpenToggle: a.useCallback(() => f((m) => !m), [f]),
1436
- modal: i,
1437
- children: /* @__PURE__ */ c(mr, { ...p, open: d, onOpenChange: f, dir: o, modal: i, children: n })
1438
- }
1439
- );
1440
- };
1441
- Zt.displayName = be;
1442
- var qt = "DropdownMenuTrigger", Jt = a.forwardRef(
1443
- (e, t) => {
1444
- const { __scopeDropdownMenu: n, disabled: o = !1, ...r } = e, s = Xt(qt, n), u = A(n);
1445
- return /* @__PURE__ */ c(vr, { asChild: !0, ...u, children: /* @__PURE__ */ c(
1446
- x.button,
1447
- {
1448
- type: "button",
1449
- id: s.triggerId,
1450
- "aria-haspopup": "menu",
1451
- "aria-expanded": s.open,
1452
- "aria-controls": s.open ? s.contentId : void 0,
1453
- "data-state": s.open ? "open" : "closed",
1454
- "data-disabled": o ? "" : void 0,
1455
- disabled: o,
1456
- ...r,
1457
- ref: De(t, s.triggerRef),
1458
- onPointerDown: b(e.onPointerDown, (i) => {
1459
- !o && i.button === 0 && i.ctrlKey === !1 && (s.onOpenToggle(), s.open || i.preventDefault());
1460
- }),
1461
- onKeyDown: b(e.onKeyDown, (i) => {
1462
- o || (["Enter", " "].includes(i.key) && s.onOpenToggle(), i.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(i.key) && i.preventDefault());
1463
- })
1464
- }
1465
- ) });
1466
- }
1467
- );
1468
- Jt.displayName = qt;
1469
- var Ar = "DropdownMenuPortal", Qt = (e) => {
1470
- const { __scopeDropdownMenu: t, ...n } = e, o = A(t);
1471
- return /* @__PURE__ */ c(hr, { ...o, ...n });
1472
- };
1473
- Qt.displayName = Ar;
1474
- var en = "DropdownMenuContent", tn = a.forwardRef(
1475
- (e, t) => {
1476
- const { __scopeDropdownMenu: n, ...o } = e, r = Xt(en, n), s = A(n), u = a.useRef(!1);
1477
- return /* @__PURE__ */ c(
1478
- gr,
1479
- {
1480
- id: r.contentId,
1481
- "aria-labelledby": r.triggerId,
1482
- ...s,
1483
- ...o,
1484
- ref: t,
1485
- onCloseAutoFocus: b(e.onCloseAutoFocus, (i) => {
1486
- var p;
1487
- u.current || (p = r.triggerRef.current) == null || p.focus(), u.current = !1, i.preventDefault();
1488
- }),
1489
- onInteractOutside: b(e.onInteractOutside, (i) => {
1490
- const p = i.detail.originalEvent, l = p.button === 0 && p.ctrlKey === !0, d = p.button === 2 || l;
1491
- (!r.modal || d) && (u.current = !0);
1492
- }),
1493
- style: {
1494
- ...e.style,
1495
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1496
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1497
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1498
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1499
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1500
- }
1501
- }
1502
- );
1503
- }
1504
- );
1505
- tn.displayName = en;
1506
- var Dr = "DropdownMenuGroup", Tr = a.forwardRef(
1507
- (e, t) => {
1508
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1509
- return /* @__PURE__ */ c(wr, { ...r, ...o, ref: t });
1510
- }
1511
- );
1512
- Tr.displayName = Dr;
1513
- var Or = "DropdownMenuLabel", nn = a.forwardRef(
1514
- (e, t) => {
1515
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1516
- return /* @__PURE__ */ c(yr, { ...r, ...o, ref: t });
1517
- }
1518
- );
1519
- nn.displayName = Or;
1520
- var Fr = "DropdownMenuItem", on = a.forwardRef(
1521
- (e, t) => {
1522
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1523
- return /* @__PURE__ */ c(Er, { ...r, ...o, ref: t });
1524
- }
1525
- );
1526
- on.displayName = Fr;
1527
- var Lr = "DropdownMenuCheckboxItem", rn = a.forwardRef((e, t) => {
1528
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1529
- return /* @__PURE__ */ c(Cr, { ...r, ...o, ref: t });
1530
- });
1531
- rn.displayName = Lr;
1532
- var kr = "DropdownMenuRadioGroup", Ur = a.forwardRef((e, t) => {
1533
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1534
- return /* @__PURE__ */ c(Mr, { ...r, ...o, ref: t });
1535
- });
1536
- Ur.displayName = kr;
1537
- var $r = "DropdownMenuRadioItem", an = a.forwardRef((e, t) => {
1538
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1539
- return /* @__PURE__ */ c(br, { ...r, ...o, ref: t });
1540
- });
1541
- an.displayName = $r;
1542
- var Kr = "DropdownMenuItemIndicator", sn = a.forwardRef((e, t) => {
1543
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1544
- return /* @__PURE__ */ c(Rr, { ...r, ...o, ref: t });
1545
- });
1546
- sn.displayName = Kr;
1547
- var Gr = "DropdownMenuSeparator", cn = a.forwardRef((e, t) => {
1548
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1549
- return /* @__PURE__ */ c(Pr, { ...r, ...o, ref: t });
1550
- });
1551
- cn.displayName = Gr;
1552
- var Br = "DropdownMenuArrow", Wr = a.forwardRef(
1553
- (e, t) => {
1554
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1555
- return /* @__PURE__ */ c(_r, { ...r, ...o, ref: t });
1556
- }
1557
- );
1558
- Wr.displayName = Br;
1559
- var Hr = "DropdownMenuSubTrigger", un = a.forwardRef((e, t) => {
1560
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1561
- return /* @__PURE__ */ c(Nr, { ...r, ...o, ref: t });
1562
- });
1563
- un.displayName = Hr;
1564
- var Vr = "DropdownMenuSubContent", ln = a.forwardRef((e, t) => {
1565
- const { __scopeDropdownMenu: n, ...o } = e, r = A(n);
1566
- return /* @__PURE__ */ c(
1567
- Sr,
1568
- {
1569
- ...r,
1570
- ...o,
1571
- ref: t,
1572
- style: {
1573
- ...e.style,
1574
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1575
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1576
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1577
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1578
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1579
- }
1580
- }
1581
- );
1582
- });
1583
- ln.displayName = Vr;
1584
- var Yr = Zt, jr = Jt, zr = Qt, dn = tn, fn = nn, pn = on, mn = rn, vn = an, hn = sn, gn = cn, wn = un, yn = ln;
1585
- const pa = Yr, ma = jr, Xr = a.forwardRef(({ className: e, inset: t, children: n, ...o }, r) => /* @__PURE__ */ Ae(
1586
- wn,
1587
- {
1588
- ref: r,
1589
- className: Y(
1590
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",
1591
- t === !0 && "pl-8",
1592
- e
1593
- ),
1594
- ...o,
1595
- children: [
1596
- n,
1597
- /* @__PURE__ */ c(Gn, { className: "ml-auto size-4" })
1598
- ]
1599
- }
1600
- ));
1601
- Xr.displayName = wn.displayName;
1602
- const Zr = a.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
1603
- yn,
1604
- {
1605
- ref: n,
1606
- className: Y(
1607
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
1608
- e
1609
- ),
1610
- ...t
1611
- }
1612
- ));
1613
- Zr.displayName = yn.displayName;
1614
- const qr = a.forwardRef(({ className: e, sideOffset: t = 4, ...n }, o) => /* @__PURE__ */ c(zr, { children: /* @__PURE__ */ c(
1615
- dn,
1616
- {
1617
- ref: o,
1618
- sideOffset: t,
1619
- className: Y(
1620
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
1621
- e
1622
- ),
1623
- ...n
1624
- }
1625
- ) }));
1626
- qr.displayName = dn.displayName;
1627
- const Jr = a.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ c(
1628
- pn,
1629
- {
1630
- ref: o,
1631
- className: Y(
1632
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
1633
- t === !0 && "pl-8",
1634
- e
1635
- ),
1636
- ...n
1637
- }
1638
- ));
1639
- Jr.displayName = pn.displayName;
1640
- const Qr = a.forwardRef(({ className: e, children: t, checked: n, ...o }, r) => /* @__PURE__ */ Ae(
1641
- mn,
1642
- {
1643
- ref: r,
1644
- className: Y(
1645
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
1646
- e
1647
- ),
1648
- checked: n,
1649
- ...o,
1650
- children: [
1651
- /* @__PURE__ */ c("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c(hn, { children: /* @__PURE__ */ c(Kn, { className: "size-4" }) }) }),
1652
- t
1653
- ]
1654
- }
1655
- ));
1656
- Qr.displayName = mn.displayName;
1657
- const ea = a.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ Ae(
1658
- vn,
1659
- {
1660
- ref: o,
1661
- className: Y(
1662
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
1663
- e
1664
- ),
1665
- ...n,
1666
- children: [
1667
- /* @__PURE__ */ c("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c(hn, { children: /* @__PURE__ */ c(Wn, { className: "h-2 w-2 fill-current" }) }) }),
1668
- t
1669
- ]
1670
- }
1671
- ));
1672
- ea.displayName = vn.displayName;
1673
- const ta = a.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ c(fn, { ref: o, className: Y("px-2 py-1.5 text-sm font-semibold", t === !0 && "pl-8", e), ...n }));
1674
- ta.displayName = fn.displayName;
1675
- const na = a.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(gn, { ref: n, className: Y("-mx-1 my-1 h-px bg-muted", e), ...t }));
1676
- na.displayName = gn.displayName;
1677
- export {
1678
- pa as D,
1679
- da as E,
1680
- ma as a,
1681
- qr as b,
1682
- na as c,
1683
- Jr as d,
1684
- Qr as e
1685
- };