@gv-tech/ui-web 2.29.2 → 2.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +53 -1
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +99 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +10 -1
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +25 -24
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +49 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -4
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +12 -11
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +4 -3
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +12 -11
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +4 -3
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +97 -1
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +107 -1
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +19 -1
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +12 -12
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +161 -1
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +89 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +123 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +40 -40
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +7 -7
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +1 -1
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +126 -1
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +36 -36
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +36 -36
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +30 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +36 -36
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +26 -26
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +45 -1
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +1 -1
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +28 -27
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +13 -1
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +4 -3
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +133 -1
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +59 -1
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +1 -1
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +1 -1
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +79 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +14 -14
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +54 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +19 -1
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +168 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +25 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +26 -1
- package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +35 -1
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +98 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +15 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +38 -38
- package/dist/{sidebar-C2ax_A0G.mjs → sidebar-DrU3nKaL.mjs} +138 -134
- package/dist/sidebar-uOtFHnBs.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +3 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +34 -1
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +1 -1
- package/dist/support-fab.cjs +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +18 -1
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +44 -1
- package/dist/text.cjs +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +1 -1
- package/dist/{theme-toggle-BSMwXb8o.mjs → theme-toggle-9KtAIRxy.mjs} +6 -6
- package/dist/theme-toggle-DkNI3bfh.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -1
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +52 -1
- package/dist/{toaster-D2BV6jez.mjs → toaster-8RrHPtlc.mjs} +8 -8
- package/dist/toaster-AFud4l6l.js +1 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +2 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +49 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +35 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +34 -1
- package/package.json +1 -1
- package/dist/accordion-Bd0-CZQn.js +0 -1
- package/dist/accordion-Cf6DNbLH.mjs +0 -244
- package/dist/alert-dialog-BxFH0Lwn.mjs +0 -180
- package/dist/alert-dialog-C6vNmGBL.js +0 -1
- package/dist/aspect-ratio-CdQevcDV.mjs +0 -38
- package/dist/aspect-ratio-Z4Nkc56X.js +0 -1
- package/dist/avatar-B5PWwGhY.mjs +0 -136
- package/dist/avatar-CFhYRM52.js +0 -1
- package/dist/calendar-D5qgt2o2.js +0 -1
- package/dist/calendar-DIqXNjOR.mjs +0 -3029
- package/dist/carousel-D-xEqRCX.js +0 -1
- package/dist/carousel-DPjWmM_A.mjs +0 -1169
- package/dist/checkbox-DEPm1BBc.mjs +0 -184
- package/dist/checkbox-DI9Hn_e_.js +0 -1
- package/dist/chunk-HBS6WEDP-D2-yWzIN.js +0 -1
- package/dist/chunk-HBS6WEDP-DD8ZmxRM.mjs +0 -62
- package/dist/combobox-C4y8AbZX.mjs +0 -5644
- package/dist/combobox-boXp-mix.js +0 -3
- package/dist/command-BnW6UIVk.js +0 -1
- package/dist/command-Cbsp7PBx.mjs +0 -542
- package/dist/context-menu-CwsdFpx1.js +0 -1
- package/dist/context-menu-FNgV55ZV.mjs +0 -315
- package/dist/dist-7YyzJonC.mjs +0 -39
- package/dist/dist-AlmToDtO.mjs +0 -17
- package/dist/dist-B76UOZbx.mjs +0 -40
- package/dist/dist-B7Ph9-T6.mjs +0 -44
- package/dist/dist-B7jnFMko.js +0 -1
- package/dist/dist-BOiFyvyS.mjs +0 -10
- package/dist/dist-BQkDLAY7.js +0 -1
- package/dist/dist-Bal96K8t.js +0 -1
- package/dist/dist-Blgp9lfa.js +0 -1
- package/dist/dist-BnlI08Je.mjs +0 -96
- package/dist/dist-Bu-uFV1C.mjs +0 -191
- package/dist/dist-C2BHd5i1.mjs +0 -460
- package/dist/dist-C516Vwxy.mjs +0 -116
- package/dist/dist-CBlqVBTk.js +0 -1
- package/dist/dist-CDcZ8WMF.js +0 -1
- package/dist/dist-CDksSmTD.mjs +0 -189
- package/dist/dist-CF-qVmmV.js +0 -1
- package/dist/dist-CIgGRTmJ.js +0 -1
- package/dist/dist-CJqVmdrU.js +0 -1
- package/dist/dist-COqM3IM6.mjs +0 -89
- package/dist/dist-CbWpCWog.mjs +0 -180
- package/dist/dist-CcGLWbPa.mjs +0 -19
- package/dist/dist-Cn4F8XlY.mjs +0 -220
- package/dist/dist-CoTs6T03.js +0 -1
- package/dist/dist-Co_xSt6d.js +0 -1
- package/dist/dist-Cu0GG-3j.mjs +0 -15
- package/dist/dist-DJqkhIXb.js +0 -1
- package/dist/dist-DKI-XYwI.mjs +0 -98
- package/dist/dist-DQeXXRYL.mjs +0 -201
- package/dist/dist-DW2ltK5-.js +0 -1
- package/dist/dist-DWcKY_sJ.js +0 -1
- package/dist/dist-DZiOPWLp.js +0 -1
- package/dist/dist-DdAeWIwf.js +0 -1
- package/dist/dist-DhubV_gU.mjs +0 -4
- package/dist/dist-DmY7elIQ.js +0 -1
- package/dist/dist-DoWtzxYc.mjs +0 -684
- package/dist/dist-DuQlxGyN.js +0 -1
- package/dist/dist-KFF7QKuL.js +0 -1
- package/dist/dist-RXrZgzkO.js +0 -1
- package/dist/dist-R_G5UQRm.js +0 -1
- package/dist/dist-dwRwxUPt.mjs +0 -22
- package/dist/dist-fzmUl3YX.mjs +0 -553
- package/dist/dist-hBsne-A2.mjs +0 -92
- package/dist/dist-ljiGYyay.mjs +0 -29
- package/dist/dist-pqMcQ1Nk.js +0 -1
- package/dist/dist-zmnQp5Xf.js +0 -1
- package/dist/dropdown-menu-ChuqZeix.js +0 -1
- package/dist/dropdown-menu-DU7KNoXP.mjs +0 -311
- package/dist/es2015-BooeZGhO.mjs +0 -554
- package/dist/es2015-Dggv0vx3.js +0 -41
- package/dist/floating-ui.react-dom-2hihjuTL.mjs +0 -1057
- package/dist/floating-ui.react-dom-BtFIezY4.js +0 -1
- package/dist/hover-card-BeqCs_2R.js +0 -1
- package/dist/hover-card-w8PmCyw2.mjs +0 -176
- package/dist/input-otp-Bn_Uy1mR.mjs +0 -398
- package/dist/input-otp-CTRB_0Xp.js +0 -20
- package/dist/label-Da0kELfR.mjs +0 -26
- package/dist/label-JMa1tFfC.js +0 -1
- package/dist/menubar-B7sRxpE4.mjs +0 -405
- package/dist/menubar-Bd-QKMcw.js +0 -1
- package/dist/message-scroller-B8AU0v3Y.mjs +0 -805
- package/dist/message-scroller-BJb4Mh_I.js +0 -1
- package/dist/navigation-menu-B-RwfscB.mjs +0 -638
- package/dist/navigation-menu-kPwxYZCR.js +0 -1
- package/dist/popover-Cq5cTNtC.js +0 -1
- package/dist/popover-T6Ra737i.mjs +0 -241
- package/dist/progress-e9YzxvRo.mjs +0 -90
- package/dist/progress-iUSEI7J9.js +0 -6
- package/dist/questionnaire-BLCvUX1C.mjs +0 -1137
- package/dist/questionnaire-CcymIPae.js +0 -1
- package/dist/radio-group-BKpiDcIb.mjs +0 -264
- package/dist/radio-group-DPEzCmxe.js +0 -1
- package/dist/resizable-ByF0NmN9.mjs +0 -2153
- package/dist/resizable-oL3v42zT.js +0 -1
- package/dist/rolldown-runtime-D7yIeQp2.mjs +0 -13
- package/dist/rolldown-runtime-DbbDpzbe.js +0 -1
- package/dist/scroll-area-BzNeOQ6C.mjs +0 -568
- package/dist/scroll-area-s4_ZJK59.js +0 -1
- package/dist/select-B_nRxX2Y.mjs +0 -831
- package/dist/select-j5_dph9S.js +0 -1
- package/dist/separator-Bn-3XUSJ.js +0 -1
- package/dist/separator-CCcMNS78.mjs +0 -38
- package/dist/sidebar-Cnem2n5A.js +0 -1
- package/dist/slider-B2PUTc7W.mjs +0 -484
- package/dist/slider-wZuXwuib.js +0 -1
- package/dist/switch-CD675xU7.js +0 -1
- package/dist/switch-ikzIzrme.mjs +0 -172
- package/dist/tabs-DCm5zOYB.mjs +0 -158
- package/dist/tabs-fcahDQDp.js +0 -1
- package/dist/theme-toggle-BGTJsIA-.js +0 -1
- package/dist/toast-C31v9P1K.js +0 -1
- package/dist/toast-vU5ISM03.mjs +0 -445
- package/dist/toaster-CaJyOCyC.js +0 -1
- package/dist/toggle-CSZdCCwX.js +0 -1
- package/dist/toggle-Cv9YYwLI.mjs +0 -58
- package/dist/toggle-group-RT8wyBwK.js +0 -1
- package/dist/toggle-group-qvjasXS-.mjs +0 -166
- package/dist/tooltip-7ERoN5mV.mjs +0 -386
- package/dist/tooltip-CC9_spXT.js +0 -1
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
import { a as e, o as t, r as n, t as r } from "./dist-DQeXXRYL.mjs";
|
|
2
|
-
import { t as i } from "./dist-B7Ph9-T6.mjs";
|
|
3
|
-
import { t as a } from "./dist-Cu0GG-3j.mjs";
|
|
4
|
-
import { i as o } from "./dist-C516Vwxy.mjs";
|
|
5
|
-
import { t as s } from "./dist-DoWtzxYc.mjs";
|
|
6
|
-
import { Dialog as c, DialogContent as l, DialogDescription as u, DialogHeader as d, DialogTitle as f } from "./dialog.mjs";
|
|
7
|
-
import { InputGroup as p, InputGroupAddon as m } from "./input-group.mjs";
|
|
8
|
-
import { CheckIcon as h, SearchIcon as g } from "lucide-react";
|
|
9
|
-
import * as _ from "react";
|
|
10
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
-
// ../../node_modules/.bun/cmdk@1.1.1+2b23df507bdda662/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
|
|
12
|
-
var b = 1, x = .9, ee = .8, S = .17, C = .1, w = .999, T = .9999, E = .99, D = /[\\\/_+.#"@\[\(\{&]/, O = /[\\\/_+.#"@\[\(\{&]/g, k = /[\s-]/, A = /[\s-]/g;
|
|
13
|
-
function j(e, t, n, r, i, a, o) {
|
|
14
|
-
if (a === t.length) return i === e.length ? b : E;
|
|
15
|
-
var s = `${i},${a}`;
|
|
16
|
-
if (o[s] !== void 0) return o[s];
|
|
17
|
-
for (var c = r.charAt(a), l = n.indexOf(c, i), u = 0, d, f, p, m; l >= 0;) d = j(e, t, n, r, l + 1, a + 1, o), d > u && (l === i ? d *= b : D.test(e.charAt(l - 1)) ? (d *= ee, p = e.slice(i, l - 1).match(O), p && i > 0 && (d *= w ** +p.length)) : k.test(e.charAt(l - 1)) ? (d *= x, m = e.slice(i, l - 1).match(A), m && i > 0 && (d *= w ** +m.length)) : (d *= S, i > 0 && (d *= w ** +(l - i))), e.charAt(l) !== t.charAt(a) && (d *= T)), (d < C && n.charAt(l - 1) === r.charAt(a + 1) || r.charAt(a + 1) === r.charAt(a) && n.charAt(l - 1) !== r.charAt(a)) && (f = j(e, t, n, r, l + 1, a + 2, o), f * C > d && (d = f * C)), d > u && (u = d), l = n.indexOf(c, l + 1);
|
|
18
|
-
return o[s] = u, u;
|
|
19
|
-
}
|
|
20
|
-
function M(e) {
|
|
21
|
-
return e.toLowerCase().replace(A, " ");
|
|
22
|
-
}
|
|
23
|
-
function N(e, t, n) {
|
|
24
|
-
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, j(e, t, M(e), M(t), 0, 0, {});
|
|
25
|
-
}
|
|
26
|
-
// ../../node_modules/.bun/cmdk@1.1.1+2b23df507bdda662/node_modules/cmdk/dist/index.mjs
|
|
27
|
-
var P = "[cmdk-group=\"\"]", F = "[cmdk-group-items=\"\"]", te = "[cmdk-group-heading=\"\"]", I = "[cmdk-item=\"\"]", L = `${I}:not([aria-disabled="true"])`, R = "cmdk-item-select", z = "data-value", ne = (e, t, n) => N(e, t, n), B = _.createContext(void 0), V = () => _.useContext(B), H = _.createContext(void 0), U = () => _.useContext(H), W = _.createContext(void 0), G = _.forwardRef((e, t) => {
|
|
28
|
-
let n = Z(() => ({
|
|
29
|
-
search: "",
|
|
30
|
-
value: e.value ?? e.defaultValue ?? "",
|
|
31
|
-
selectedItemId: void 0,
|
|
32
|
-
filtered: {
|
|
33
|
-
count: 0,
|
|
34
|
-
items: /* @__PURE__ */ new Map(),
|
|
35
|
-
groups: /* @__PURE__ */ new Set()
|
|
36
|
-
}
|
|
37
|
-
})), r = Z(() => /* @__PURE__ */ new Set()), o = Z(() => /* @__PURE__ */ new Map()), s = Z(() => /* @__PURE__ */ new Map()), c = Z(() => /* @__PURE__ */ new Set()), l = Y(e), { label: u, children: d, value: f, onValueChange: p, filter: m, shouldFilter: h, loop: g, disablePointerSelection: v = !1, vimBindings: y = !0, ...b } = e, x = a(), ee = a(), S = a(), C = _.useRef(null), w = fe();
|
|
38
|
-
X(() => {
|
|
39
|
-
if (f !== void 0) {
|
|
40
|
-
let e = f.trim();
|
|
41
|
-
n.current.value = e, T.emit();
|
|
42
|
-
}
|
|
43
|
-
}, [f]), X(() => {
|
|
44
|
-
w(6, j);
|
|
45
|
-
}, []);
|
|
46
|
-
let T = _.useMemo(() => ({
|
|
47
|
-
subscribe: (e) => (c.current.add(e), () => c.current.delete(e)),
|
|
48
|
-
snapshot: () => n.current,
|
|
49
|
-
setState: (e, t, r) => {
|
|
50
|
-
var i, a, o;
|
|
51
|
-
if (!Object.is(n.current[e], t)) {
|
|
52
|
-
if (n.current[e] = t, e === "search") A(), O(), w(1, k);
|
|
53
|
-
else if (e === "value") {
|
|
54
|
-
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
55
|
-
let e = document.getElementById(S);
|
|
56
|
-
e ? e.focus() : (i = document.getElementById(x)) == null || i.focus();
|
|
57
|
-
}
|
|
58
|
-
if (w(7, () => {
|
|
59
|
-
n.current.selectedItemId = M()?.id, T.emit();
|
|
60
|
-
}), r || w(5, j), l.current?.value !== void 0) {
|
|
61
|
-
let e = t ?? "";
|
|
62
|
-
(o = (a = l.current).onValueChange) == null || o.call(a, e);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
T.emit();
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
emit: () => {
|
|
70
|
-
c.current.forEach((e) => e());
|
|
71
|
-
}
|
|
72
|
-
}), []), E = _.useMemo(() => ({
|
|
73
|
-
value: (e, t, r) => {
|
|
74
|
-
t !== s.current.get(e)?.value && (s.current.set(e, {
|
|
75
|
-
value: t,
|
|
76
|
-
keywords: r
|
|
77
|
-
}), n.current.filtered.items.set(e, D(t, r)), w(2, () => {
|
|
78
|
-
O(), T.emit();
|
|
79
|
-
}));
|
|
80
|
-
},
|
|
81
|
-
item: (e, t) => (r.current.add(e), t && (o.current.has(t) ? o.current.get(t).add(e) : o.current.set(t, /* @__PURE__ */ new Set([e]))), w(3, () => {
|
|
82
|
-
A(), O(), n.current.value || k(), T.emit();
|
|
83
|
-
}), () => {
|
|
84
|
-
s.current.delete(e), r.current.delete(e), n.current.filtered.items.delete(e);
|
|
85
|
-
let t = M();
|
|
86
|
-
w(4, () => {
|
|
87
|
-
A(), t?.getAttribute("id") === e && k(), T.emit();
|
|
88
|
-
});
|
|
89
|
-
}),
|
|
90
|
-
group: (e) => (o.current.has(e) || o.current.set(e, /* @__PURE__ */ new Set()), () => {
|
|
91
|
-
s.current.delete(e), o.current.delete(e);
|
|
92
|
-
}),
|
|
93
|
-
filter: () => l.current.shouldFilter,
|
|
94
|
-
label: u || e["aria-label"],
|
|
95
|
-
getDisablePointerSelection: () => l.current.disablePointerSelection,
|
|
96
|
-
listId: x,
|
|
97
|
-
inputId: S,
|
|
98
|
-
labelId: ee,
|
|
99
|
-
listInnerRef: C
|
|
100
|
-
}), []);
|
|
101
|
-
function D(e, t) {
|
|
102
|
-
let r = l.current?.filter ?? ne;
|
|
103
|
-
return e ? r(e, n.current.search, t) : 0;
|
|
104
|
-
}
|
|
105
|
-
function O() {
|
|
106
|
-
if (!n.current.search || l.current.shouldFilter === !1) return;
|
|
107
|
-
let e = n.current.filtered.items, t = [];
|
|
108
|
-
n.current.filtered.groups.forEach((n) => {
|
|
109
|
-
let r = o.current.get(n), i = 0;
|
|
110
|
-
r.forEach((t) => {
|
|
111
|
-
let n = e.get(t);
|
|
112
|
-
i = Math.max(n, i);
|
|
113
|
-
}), t.push([n, i]);
|
|
114
|
-
});
|
|
115
|
-
let r = C.current;
|
|
116
|
-
N().sort((t, n) => {
|
|
117
|
-
let r = t.getAttribute("id"), i = n.getAttribute("id");
|
|
118
|
-
return (e.get(i) ?? 0) - (e.get(r) ?? 0);
|
|
119
|
-
}).forEach((e) => {
|
|
120
|
-
let t = e.closest(F);
|
|
121
|
-
t ? t.appendChild(e.parentElement === t ? e : e.closest(`${F} > *`)) : r.appendChild(e.parentElement === r ? e : e.closest(`${F} > *`));
|
|
122
|
-
}), t.sort((e, t) => t[1] - e[1]).forEach((e) => {
|
|
123
|
-
let t = C.current?.querySelector(`${P}[${z}="${encodeURIComponent(e[0])}"]`);
|
|
124
|
-
t?.parentElement.appendChild(t);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function k() {
|
|
128
|
-
let e = N().find((e) => e.getAttribute("aria-disabled") !== "true")?.getAttribute(z);
|
|
129
|
-
T.setState("value", e || void 0);
|
|
130
|
-
}
|
|
131
|
-
function A() {
|
|
132
|
-
if (!n.current.search || l.current.shouldFilter === !1) {
|
|
133
|
-
n.current.filtered.count = r.current.size;
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
n.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
137
|
-
let e = 0;
|
|
138
|
-
for (let t of r.current) {
|
|
139
|
-
let r = D(s.current.get(t)?.value ?? "", s.current.get(t)?.keywords ?? []);
|
|
140
|
-
n.current.filtered.items.set(t, r), r > 0 && e++;
|
|
141
|
-
}
|
|
142
|
-
for (let [e, t] of o.current) for (let r of t) if (n.current.filtered.items.get(r) > 0) {
|
|
143
|
-
n.current.filtered.groups.add(e);
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
n.current.filtered.count = e;
|
|
147
|
-
}
|
|
148
|
-
function j() {
|
|
149
|
-
var e;
|
|
150
|
-
let t = M();
|
|
151
|
-
t && (t.parentElement?.firstChild === t && ((e = t.closest(P)?.querySelector(te)) == null || e.scrollIntoView({ block: "nearest" })), t.scrollIntoView({ block: "nearest" }));
|
|
152
|
-
}
|
|
153
|
-
function M() {
|
|
154
|
-
return C.current?.querySelector(`${I}[aria-selected="true"]`);
|
|
155
|
-
}
|
|
156
|
-
function N() {
|
|
157
|
-
return Array.from(C.current?.querySelectorAll(L) || []);
|
|
158
|
-
}
|
|
159
|
-
function V(e) {
|
|
160
|
-
let t = N()[e];
|
|
161
|
-
t && T.setState("value", t.getAttribute(z));
|
|
162
|
-
}
|
|
163
|
-
function U(e) {
|
|
164
|
-
var t;
|
|
165
|
-
let n = M(), r = N(), i = r.findIndex((e) => e === n), a = r[i + e];
|
|
166
|
-
(t = l.current) != null && t.loop && (a = i + e < 0 ? r[r.length - 1] : i + e === r.length ? r[0] : r[i + e]), a && T.setState("value", a.getAttribute(z));
|
|
167
|
-
}
|
|
168
|
-
function W(e) {
|
|
169
|
-
let t = M()?.closest(P), n;
|
|
170
|
-
for (; t && !n;) t = e > 0 ? le(t, P) : ue(t, P), n = t?.querySelector(L);
|
|
171
|
-
n ? T.setState("value", n.getAttribute(z)) : U(e);
|
|
172
|
-
}
|
|
173
|
-
let G = () => V(N().length - 1), K = (e) => {
|
|
174
|
-
e.preventDefault(), e.metaKey ? G() : e.altKey ? W(1) : U(1);
|
|
175
|
-
}, q = (e) => {
|
|
176
|
-
e.preventDefault(), e.metaKey ? V(0) : e.altKey ? W(-1) : U(-1);
|
|
177
|
-
};
|
|
178
|
-
return _.createElement(i.div, {
|
|
179
|
-
ref: t,
|
|
180
|
-
tabIndex: -1,
|
|
181
|
-
...b,
|
|
182
|
-
"cmdk-root": "",
|
|
183
|
-
onKeyDown: (e) => {
|
|
184
|
-
var t;
|
|
185
|
-
(t = b.onKeyDown) == null || t.call(b, e);
|
|
186
|
-
let n = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
187
|
-
if (!(e.defaultPrevented || n)) switch (e.key) {
|
|
188
|
-
case "n":
|
|
189
|
-
case "j":
|
|
190
|
-
y && e.ctrlKey && K(e);
|
|
191
|
-
break;
|
|
192
|
-
case "ArrowDown":
|
|
193
|
-
K(e);
|
|
194
|
-
break;
|
|
195
|
-
case "p":
|
|
196
|
-
case "k":
|
|
197
|
-
y && e.ctrlKey && q(e);
|
|
198
|
-
break;
|
|
199
|
-
case "ArrowUp":
|
|
200
|
-
q(e);
|
|
201
|
-
break;
|
|
202
|
-
case "Home":
|
|
203
|
-
e.preventDefault(), V(0);
|
|
204
|
-
break;
|
|
205
|
-
case "End":
|
|
206
|
-
e.preventDefault(), G();
|
|
207
|
-
break;
|
|
208
|
-
case "Enter": {
|
|
209
|
-
e.preventDefault();
|
|
210
|
-
let t = M();
|
|
211
|
-
if (t) {
|
|
212
|
-
let e = new Event(R);
|
|
213
|
-
t.dispatchEvent(e);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}, _.createElement("label", {
|
|
219
|
-
"cmdk-label": "",
|
|
220
|
-
htmlFor: E.inputId,
|
|
221
|
-
id: E.labelId,
|
|
222
|
-
style: me
|
|
223
|
-
}, u), $(e, (e) => _.createElement(H.Provider, { value: T }, _.createElement(B.Provider, { value: E }, e))));
|
|
224
|
-
}), K = _.forwardRef((e, t) => {
|
|
225
|
-
let n = a(), r = _.useRef(null), s = _.useContext(W), c = V(), l = Y(e), u = l.current?.forceMount ?? s?.forceMount;
|
|
226
|
-
X(() => {
|
|
227
|
-
if (!u) return c.item(n, s?.id);
|
|
228
|
-
}, [u]);
|
|
229
|
-
let d = de(n, r, [
|
|
230
|
-
e.value,
|
|
231
|
-
e.children,
|
|
232
|
-
r
|
|
233
|
-
], e.keywords), f = U(), p = Q((e) => e.value && e.value === d.current), m = Q((e) => u || c.filter() === !1 ? !0 : !e.search || e.filtered.items.get(n) > 0);
|
|
234
|
-
_.useEffect(() => {
|
|
235
|
-
let t = r.current;
|
|
236
|
-
if (t && !e.disabled) return t.addEventListener(R, h), () => t.removeEventListener(R, h);
|
|
237
|
-
}, [
|
|
238
|
-
m,
|
|
239
|
-
e.onSelect,
|
|
240
|
-
e.disabled
|
|
241
|
-
]);
|
|
242
|
-
function h() {
|
|
243
|
-
var e, t;
|
|
244
|
-
g(), (t = (e = l.current).onSelect) == null || t.call(e, d.current);
|
|
245
|
-
}
|
|
246
|
-
function g() {
|
|
247
|
-
f.setState("value", d.current, !0);
|
|
248
|
-
}
|
|
249
|
-
if (!m) return null;
|
|
250
|
-
let { disabled: v, value: y, onSelect: b, forceMount: x, keywords: ee, ...S } = e;
|
|
251
|
-
return _.createElement(i.div, {
|
|
252
|
-
ref: o(r, t),
|
|
253
|
-
...S,
|
|
254
|
-
id: n,
|
|
255
|
-
"cmdk-item": "",
|
|
256
|
-
role: "option",
|
|
257
|
-
"aria-disabled": !!v,
|
|
258
|
-
"aria-selected": !!p,
|
|
259
|
-
"data-disabled": !!v,
|
|
260
|
-
"data-selected": !!p,
|
|
261
|
-
onPointerMove: v || c.getDisablePointerSelection() ? void 0 : g,
|
|
262
|
-
onClick: v ? void 0 : h
|
|
263
|
-
}, e.children);
|
|
264
|
-
}), q = _.forwardRef((e, t) => {
|
|
265
|
-
let { heading: n, children: r, forceMount: s, ...c } = e, l = a(), u = _.useRef(null), d = _.useRef(null), f = a(), p = V(), m = Q((e) => s || p.filter() === !1 ? !0 : !e.search || e.filtered.groups.has(l));
|
|
266
|
-
X(() => p.group(l), []), de(l, u, [
|
|
267
|
-
e.value,
|
|
268
|
-
e.heading,
|
|
269
|
-
d
|
|
270
|
-
]);
|
|
271
|
-
let h = _.useMemo(() => ({
|
|
272
|
-
id: l,
|
|
273
|
-
forceMount: s
|
|
274
|
-
}), [s]);
|
|
275
|
-
return _.createElement(i.div, {
|
|
276
|
-
ref: o(u, t),
|
|
277
|
-
...c,
|
|
278
|
-
"cmdk-group": "",
|
|
279
|
-
role: "presentation",
|
|
280
|
-
hidden: !m || void 0
|
|
281
|
-
}, n && _.createElement("div", {
|
|
282
|
-
ref: d,
|
|
283
|
-
"cmdk-group-heading": "",
|
|
284
|
-
"aria-hidden": !0,
|
|
285
|
-
id: f
|
|
286
|
-
}, n), $(e, (e) => _.createElement("div", {
|
|
287
|
-
"cmdk-group-items": "",
|
|
288
|
-
role: "group",
|
|
289
|
-
"aria-labelledby": n ? f : void 0
|
|
290
|
-
}, _.createElement(W.Provider, { value: h }, e))));
|
|
291
|
-
}), re = _.forwardRef((e, t) => {
|
|
292
|
-
let { alwaysRender: n, ...r } = e, a = _.useRef(null), s = Q((e) => !e.search);
|
|
293
|
-
return !n && !s ? null : _.createElement(i.div, {
|
|
294
|
-
ref: o(a, t),
|
|
295
|
-
...r,
|
|
296
|
-
"cmdk-separator": "",
|
|
297
|
-
role: "separator"
|
|
298
|
-
});
|
|
299
|
-
}), ie = _.forwardRef((e, t) => {
|
|
300
|
-
let { onValueChange: n, ...r } = e, a = e.value != null, o = U(), s = Q((e) => e.search), c = Q((e) => e.selectedItemId), l = V();
|
|
301
|
-
return _.useEffect(() => {
|
|
302
|
-
e.value != null && o.setState("search", e.value);
|
|
303
|
-
}, [e.value]), _.createElement(i.input, {
|
|
304
|
-
ref: t,
|
|
305
|
-
...r,
|
|
306
|
-
"cmdk-input": "",
|
|
307
|
-
autoComplete: "off",
|
|
308
|
-
autoCorrect: "off",
|
|
309
|
-
spellCheck: !1,
|
|
310
|
-
"aria-autocomplete": "list",
|
|
311
|
-
role: "combobox",
|
|
312
|
-
"aria-expanded": !0,
|
|
313
|
-
"aria-controls": l.listId,
|
|
314
|
-
"aria-labelledby": l.labelId,
|
|
315
|
-
"aria-activedescendant": c,
|
|
316
|
-
id: l.inputId,
|
|
317
|
-
type: "text",
|
|
318
|
-
value: a ? e.value : s,
|
|
319
|
-
onChange: (e) => {
|
|
320
|
-
a || o.setState("search", e.target.value), n?.(e.target.value);
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}), ae = _.forwardRef((e, t) => {
|
|
324
|
-
let { children: n, label: r = "Suggestions", ...a } = e, s = _.useRef(null), c = _.useRef(null), l = Q((e) => e.selectedItemId), u = V();
|
|
325
|
-
return _.useEffect(() => {
|
|
326
|
-
if (c.current && s.current) {
|
|
327
|
-
let e = c.current, t = s.current, n, r = new ResizeObserver(() => {
|
|
328
|
-
n = requestAnimationFrame(() => {
|
|
329
|
-
let n = e.offsetHeight;
|
|
330
|
-
t.style.setProperty("--cmdk-list-height", n.toFixed(1) + "px");
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
return r.observe(e), () => {
|
|
334
|
-
cancelAnimationFrame(n), r.unobserve(e);
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
}, []), _.createElement(i.div, {
|
|
338
|
-
ref: o(s, t),
|
|
339
|
-
...a,
|
|
340
|
-
"cmdk-list": "",
|
|
341
|
-
role: "listbox",
|
|
342
|
-
tabIndex: -1,
|
|
343
|
-
"aria-activedescendant": l,
|
|
344
|
-
"aria-label": r,
|
|
345
|
-
id: u.listId
|
|
346
|
-
}, $(e, (e) => _.createElement("div", {
|
|
347
|
-
ref: o(c, u.listInnerRef),
|
|
348
|
-
"cmdk-list-sizer": ""
|
|
349
|
-
}, e)));
|
|
350
|
-
}), oe = _.forwardRef((i, a) => {
|
|
351
|
-
let { open: o, onOpenChange: s, overlayClassName: c, contentClassName: l, container: u, ...d } = i;
|
|
352
|
-
return _.createElement(r, {
|
|
353
|
-
open: o,
|
|
354
|
-
onOpenChange: s
|
|
355
|
-
}, _.createElement(t, { container: u }, _.createElement(e, {
|
|
356
|
-
"cmdk-overlay": "",
|
|
357
|
-
className: c
|
|
358
|
-
}), _.createElement(n, {
|
|
359
|
-
"aria-label": i.label,
|
|
360
|
-
"cmdk-dialog": "",
|
|
361
|
-
className: l
|
|
362
|
-
}, _.createElement(G, {
|
|
363
|
-
ref: a,
|
|
364
|
-
...d
|
|
365
|
-
}))));
|
|
366
|
-
}), se = _.forwardRef((e, t) => Q((e) => e.filtered.count === 0) ? _.createElement(i.div, {
|
|
367
|
-
ref: t,
|
|
368
|
-
...e,
|
|
369
|
-
"cmdk-empty": "",
|
|
370
|
-
role: "presentation"
|
|
371
|
-
}) : null), ce = _.forwardRef((e, t) => {
|
|
372
|
-
let { progress: n, children: r, label: a = "Loading...", ...o } = e;
|
|
373
|
-
return _.createElement(i.div, {
|
|
374
|
-
ref: t,
|
|
375
|
-
...o,
|
|
376
|
-
"cmdk-loading": "",
|
|
377
|
-
role: "progressbar",
|
|
378
|
-
"aria-valuenow": n,
|
|
379
|
-
"aria-valuemin": 0,
|
|
380
|
-
"aria-valuemax": 100,
|
|
381
|
-
"aria-label": a
|
|
382
|
-
}, $(e, (e) => _.createElement("div", { "aria-hidden": !0 }, e)));
|
|
383
|
-
}), J = Object.assign(G, {
|
|
384
|
-
List: ae,
|
|
385
|
-
Item: K,
|
|
386
|
-
Input: ie,
|
|
387
|
-
Group: q,
|
|
388
|
-
Separator: re,
|
|
389
|
-
Dialog: oe,
|
|
390
|
-
Empty: se,
|
|
391
|
-
Loading: ce
|
|
392
|
-
});
|
|
393
|
-
function le(e, t) {
|
|
394
|
-
let n = e.nextElementSibling;
|
|
395
|
-
for (; n;) {
|
|
396
|
-
if (n.matches(t)) return n;
|
|
397
|
-
n = n.nextElementSibling;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function ue(e, t) {
|
|
401
|
-
let n = e.previousElementSibling;
|
|
402
|
-
for (; n;) {
|
|
403
|
-
if (n.matches(t)) return n;
|
|
404
|
-
n = n.previousElementSibling;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
function Y(e) {
|
|
408
|
-
let t = _.useRef(e);
|
|
409
|
-
return X(() => {
|
|
410
|
-
t.current = e;
|
|
411
|
-
}), t;
|
|
412
|
-
}
|
|
413
|
-
var X = typeof window > "u" ? _.useEffect : _.useLayoutEffect;
|
|
414
|
-
function Z(e) {
|
|
415
|
-
let t = _.useRef();
|
|
416
|
-
return t.current === void 0 && (t.current = e()), t;
|
|
417
|
-
}
|
|
418
|
-
function Q(e) {
|
|
419
|
-
let t = U(), n = () => e(t.snapshot());
|
|
420
|
-
return _.useSyncExternalStore(t.subscribe, n, n);
|
|
421
|
-
}
|
|
422
|
-
function de(e, t, n, r = []) {
|
|
423
|
-
let i = _.useRef(), a = V();
|
|
424
|
-
return X(() => {
|
|
425
|
-
var o;
|
|
426
|
-
let s = (() => {
|
|
427
|
-
for (let e of n) {
|
|
428
|
-
if (typeof e == "string") return e.trim();
|
|
429
|
-
if (typeof e == "object" && "current" in e) return e.current ? e.current.textContent?.trim() : i.current;
|
|
430
|
-
}
|
|
431
|
-
})(), c = r.map((e) => e.trim());
|
|
432
|
-
a.value(e, s, c), (o = t.current) == null || o.setAttribute(z, s), i.current = s;
|
|
433
|
-
}), i;
|
|
434
|
-
}
|
|
435
|
-
var fe = () => {
|
|
436
|
-
let [e, t] = _.useState(), n = Z(() => /* @__PURE__ */ new Map());
|
|
437
|
-
return X(() => {
|
|
438
|
-
n.current.forEach((e) => e()), n.current = /* @__PURE__ */ new Map();
|
|
439
|
-
}, [e]), (e, r) => {
|
|
440
|
-
n.current.set(e, r), t({});
|
|
441
|
-
};
|
|
442
|
-
};
|
|
443
|
-
function pe(e) {
|
|
444
|
-
let t = e.type;
|
|
445
|
-
return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
|
|
446
|
-
}
|
|
447
|
-
function $({ asChild: e, children: t }, n) {
|
|
448
|
-
return e && _.isValidElement(t) ? _.cloneElement(pe(t), { ref: t.ref }, n(t.props.children)) : n(t);
|
|
449
|
-
}
|
|
450
|
-
var me = {
|
|
451
|
-
position: "absolute",
|
|
452
|
-
width: "1px",
|
|
453
|
-
height: "1px",
|
|
454
|
-
padding: "0",
|
|
455
|
-
margin: "-1px",
|
|
456
|
-
overflow: "hidden",
|
|
457
|
-
clip: "rect(0, 0, 0, 0)",
|
|
458
|
-
whiteSpace: "nowrap",
|
|
459
|
-
borderWidth: "0"
|
|
460
|
-
};
|
|
461
|
-
// src/command.tsx
|
|
462
|
-
function he({ className: e, ...t }) {
|
|
463
|
-
return /* @__PURE__ */ v(J, {
|
|
464
|
-
"data-slot": "command",
|
|
465
|
-
className: s("bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1", e),
|
|
466
|
-
...t
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
function ge({ title: e = "Command Palette", description: t = "Search for a command to run...", children: n, className: r, showCloseButton: i = !1, ...a }) {
|
|
470
|
-
return /* @__PURE__ */ y(c, {
|
|
471
|
-
...a,
|
|
472
|
-
children: [/* @__PURE__ */ y(d, {
|
|
473
|
-
className: "sr-only",
|
|
474
|
-
children: [/* @__PURE__ */ v(f, { children: e }), /* @__PURE__ */ v(u, { children: t })]
|
|
475
|
-
}), /* @__PURE__ */ v(l, {
|
|
476
|
-
className: s("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", r),
|
|
477
|
-
showCloseButton: i,
|
|
478
|
-
children: /* @__PURE__ */ v(he, {
|
|
479
|
-
className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",
|
|
480
|
-
children: n
|
|
481
|
-
})
|
|
482
|
-
})]
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
function _e({ className: e, ...t }) {
|
|
486
|
-
return /* @__PURE__ */ v("div", {
|
|
487
|
-
"data-slot": "command-input-wrapper",
|
|
488
|
-
className: "p-1 pb-0",
|
|
489
|
-
children: /* @__PURE__ */ y(p, {
|
|
490
|
-
className: "border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!",
|
|
491
|
-
children: [/* @__PURE__ */ v(J.Input, {
|
|
492
|
-
"data-slot": "command-input",
|
|
493
|
-
className: s("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
494
|
-
...t
|
|
495
|
-
}), /* @__PURE__ */ v(m, { children: /* @__PURE__ */ v(g, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
496
|
-
})
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
function ve({ className: e, ...t }) {
|
|
500
|
-
return /* @__PURE__ */ v(J.List, {
|
|
501
|
-
"data-slot": "command-list",
|
|
502
|
-
className: s("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", e),
|
|
503
|
-
...t
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
function ye({ className: e, ...t }) {
|
|
507
|
-
return /* @__PURE__ */ v(J.Empty, {
|
|
508
|
-
"data-slot": "command-empty",
|
|
509
|
-
className: s("py-6 text-center text-sm", e),
|
|
510
|
-
...t
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
function be({ className: e, ...t }) {
|
|
514
|
-
return /* @__PURE__ */ v(J.Group, {
|
|
515
|
-
"data-slot": "command-group",
|
|
516
|
-
className: s("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium", e),
|
|
517
|
-
...t
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
function xe({ className: e, ...t }) {
|
|
521
|
-
return /* @__PURE__ */ v(J.Separator, {
|
|
522
|
-
"data-slot": "command-separator",
|
|
523
|
-
className: s("bg-border -mx-1 h-px", e),
|
|
524
|
-
...t
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
function Se({ className: e, children: t, ...n }) {
|
|
528
|
-
return /* @__PURE__ */ y(J.Item, {
|
|
529
|
-
"data-slot": "command-item",
|
|
530
|
-
className: s("group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
531
|
-
...n,
|
|
532
|
-
children: [t, /* @__PURE__ */ v(h, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
function Ce({ className: e, ...t }) {
|
|
536
|
-
return /* @__PURE__ */ v("span", {
|
|
537
|
-
"data-slot": "command-shortcut",
|
|
538
|
-
className: s("text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest", e),
|
|
539
|
-
...t
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
export { _e as a, xe as c, be as i, Ce as l, ge as n, Se as o, ye as r, ve as s, he as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-DbbDpzbe.js"),t=require("./dist-CoTs6T03.js"),n=require("./dist-DZiOPWLp.js"),r=require("./dist-DW2ltK5-.js"),i=require("./dist-CBlqVBTk.js"),a=require("./dist-CF-qVmmV.js"),o=require("./dist-zmnQp5Xf.js");let s=require("lucide-react"),c=require("react"),l=e.r(c,1);c=e.r(c);let u=require("react/jsx-runtime");var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0}),p=`ContextMenu`,[m,h]=r.t(p,[a.g]),g=a.g(),[_,v]=m(p),y=f(e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:s,modal:c=!0}=e,d=l.useRef(!1),[f,m]=o.t({prop:i,defaultProp:!1,onChange:r,caller:p}),h=g(t);return(0,u.jsx)(_,{scope:t,open:f,onOpenChange:m,modal:c,hasInteractedRef:d,children:(0,u.jsx)(a.t,{...h,dir:s,open:f,onOpenChange:m,modal:c,children:n})})},`ContextMenu`),b=`ContextMenuTrigger`,x=l.forwardRef(f(function(e,t){let{__scopeContextMenu:r,disabled:o=!1,...s}=e,c=v(b,r),d=g(r),[p,m]=l.useState({x:0,y:0}),h=l.useMemo(()=>({current:{getBoundingClientRect:f(()=>DOMRect.fromRect({width:0,height:0,...p}),`getBoundingClientRect`)}}),[p]),_=l.useRef(0),y=l.useCallback(()=>window.clearTimeout(_.current),[]),x=f(e=>{c.hasInteractedRef.current=!0,m({x:e.clientX,y:e.clientY}),c.onOpenChange(!0)},`handleOpen`);return l.useEffect(()=>y,[y]),l.useEffect(()=>void(o&&y()),[o,y]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a.n,{...d,virtualRef:h}),(0,u.jsx)(i.t.span,{"data-state":c.open?`open`:`closed`,"data-disabled":o?``:void 0,...s,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:o?e.onContextMenu:n.t(e.onContextMenu,e=>{y(),x(e),e.preventDefault()}),onPointerDown:o?e.onPointerDown:n.t(e.onPointerDown,L(e=>{y(),c.open&&c.onOpenChange(!1),_.current=window.setTimeout(()=>x(e),700)})),onPointerMove:o?e.onPointerMove:n.t(e.onPointerMove,L(y)),onPointerCancel:o?e.onPointerCancel:n.t(e.onPointerCancel,L(y)),onPointerUp:o?e.onPointerUp:n.t(e.onPointerUp,L(y))})]})},`ContextMenuTrigger`)),S=f(e=>{let{__scopeContextMenu:t,...n}=e,r=g(t);return(0,u.jsx)(a.l,{...r,...n})},`ContextMenuPortal`),C=`ContextMenuContent`,w=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=v(C,n),o=g(n),s=l.useRef(!1);return(0,u.jsx)(a.i,{...o,side:`right`,sideOffset:2,align:`start`,...r,ref:t,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&s.current&&t.preventDefault(),s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`ContextMenuContent`)),T=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.a,{...i,...r,ref:t})},`ContextMenuGroup`)),E=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.c,{...i,...r,ref:t})},`ContextMenuLabel`)),D=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.o,{...i,...r,ref:t})},`ContextMenuItem`)),O=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.r,{...i,...r,ref:t})},`ContextMenuCheckboxItem`)),k=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.u,{...i,...r,ref:t})},`ContextMenuRadioGroup`)),A=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.d,{...i,...r,ref:t})},`ContextMenuRadioItem`)),j=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.s,{...i,...r,ref:t})},`ContextMenuItemIndicator`)),M=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.f,{...i,...r,ref:t})},`ContextMenuSeparator`)),N=`ContextMenuSub`,P=f(e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:s}=e,c=g(t),[l,d]=o.t({prop:i,defaultProp:s??!1,onChange:r,caller:N});return(0,u.jsx)(a.p,{...c,open:l,onOpenChange:d,children:n})},`ContextMenuSub`),F=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.h,{...i,...r,ref:t})},`ContextMenuSubTrigger`)),I=l.forwardRef(f(function(e,t){let{__scopeContextMenu:n,...r}=e,i=g(n);return(0,u.jsx)(a.m,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`ContextMenuSubContent`));function L(e){return t=>t.pointerType===`mouse`?void 0:e(t)}f(L,`whenTouchOrPen`);function R({...e}){return(0,u.jsx)(y,{"data-slot":`context-menu`,...e})}function z({className:e,...n}){return(0,u.jsx)(x,{"data-slot":`context-menu-trigger`,className:t.t(`select-none`,e),...n})}function B({...e}){return(0,u.jsx)(T,{"data-slot":`context-menu-group`,...e})}function V({...e}){return(0,u.jsx)(S,{"data-slot":`context-menu-portal`,...e})}function H({...e}){return(0,u.jsx)(P,{"data-slot":`context-menu-sub`,...e})}function U({...e}){return(0,u.jsx)(k,{"data-slot":`context-menu-radio-group`,...e})}function W({className:e,...n}){return(0,u.jsx)(S,{children:(0,u.jsx)(w,{"data-slot":`context-menu-content`,className:t.t(`bg-popover text-popover-foreground ring-foreground/10 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100`,e),...n})})}function G({className:e,inset:n,variant:r=`default`,...i}){return(0,u.jsx)(D,{"data-slot":`context-menu-item`,"data-inset":n,"data-variant":r,className:t.t(`group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...i})}function K({className:e,inset:n,children:r,...i}){return(0,u.jsxs)(F,{"data-slot":`context-menu-sub-trigger`,"data-inset":n,className:t.t(`focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...i,children:[r,(0,u.jsx)(s.ChevronRightIcon,{className:`ms-auto rtl:rotate-180`})]})}function q({className:e,...n}){return(0,u.jsx)(I,{"data-slot":`context-menu-sub-content`,className:t.t(`bg-popover text-popover-foreground 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100`,e),...n})}function J({className:e,children:n,checked:r,inset:i,...a}){return(0,u.jsxs)(O,{"data-slot":`context-menu-checkbox-item`,"data-inset":i,className:t.t(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:r,...a,children:[(0,u.jsx)(`span`,{className:`pointer-events-none absolute end-2`,children:(0,u.jsx)(j,{children:(0,u.jsx)(s.CheckIcon,{})})}),n]})}function Y({className:e,children:n,inset:r,...i}){return(0,u.jsxs)(A,{"data-slot":`context-menu-radio-item`,"data-inset":r,className:t.t(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...i,children:[(0,u.jsx)(`span`,{className:`pointer-events-none absolute end-2`,children:(0,u.jsx)(j,{children:(0,u.jsx)(s.CheckIcon,{})})}),n]})}function X({className:e,inset:n,...r}){return(0,u.jsx)(E,{"data-slot":`context-menu-label`,"data-inset":n,className:t.t(`text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7`,e),...r})}function Z({className:e,...n}){return(0,u.jsx)(M,{"data-slot":`context-menu-separator`,className:t.t(`bg-border -mx-1 my-1 h-px`,e),...n})}function Q({className:e,...n}){return(0,u.jsx)(`span`,{"data-slot":`context-menu-shortcut`,className:t.t(`text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest`,e),...n})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Z}});
|