highsoft-ui 1.0.133 → 1.0.135
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/{Button-BWe-hGo0.js → Button-K3WlRB7Q.js} +2 -2
- package/dist/{ButtonGroup-CXgj-MxA.js → ButtonGroup-Di8R8XMS.js} +2 -2
- package/dist/{Checkbox-Dgs_Bq30.js → Checkbox-Yg8sUFcu.js} +2 -2
- package/dist/{Container-mH6tG_kR.js → Container--5g4TI1z.js} +1 -1
- package/dist/{CookiePolicyModal-loN0LAaO.js → CookiePolicyModal-BDtX6aXU.js} +6 -6
- package/dist/{CopyCode-D6zuZ3nb.js → CopyCode-CPC5QPAz.js} +4 -4
- package/dist/{DiscordInvite-CR7g5hay.js → DiscordInvite-CLYxexdH.js} +2 -2
- package/dist/Dropdown-CMR98u7M.js +821 -0
- package/dist/{Footer-CLBv8yI9.js → Footer-CsMI-4FF.js} +11 -11
- package/dist/{FooterBottom-BuUj1R5w.js → FooterBottom-BSII1GXN.js} +4 -4
- package/dist/{FooterHelp-aae_c9D0.js → FooterHelp-D14IrxvA.js} +5 -5
- package/dist/{FooterLinks-CMoTnXpW.js → FooterLinks-_OSgp8_1.js} +5 -5
- package/dist/{GPTInput-Cgu6_F53.js → GPTInput-C0YG1990.js} +1 -1
- package/dist/{Header-DjRIOI5-.js → Header-CB4t3RmW.js} +10 -10
- package/dist/{Heading-DvLlRFvQ.js → Heading-pg3St8MI.js} +1 -1
- package/dist/{Icon-Dwo9ZDNX.js → Icon-VeXJMj8Q.js} +1 -1
- package/dist/{InputGrouped-qenKO8Jl.js → InputGrouped-ENTLSUR_.js} +3 -3
- package/dist/{InputSolo-DOZp13Mv.js → InputSolo-BUg1ip7e.js} +1 -1
- package/dist/{Label-DkJ9JjU6.js → Label-gTAMwE0j.js} +2 -2
- package/dist/{Logo-BRXxiQk8.js → Logo-DTfFHBgU.js} +1 -1
- package/dist/{NewsletterSignup-CQ16wS4l.js → NewsletterSignup-C8dPx-p1.js} +9 -9
- package/dist/{Notification-BDC_8mYw.js → Notification-DcC9pjzU.js} +5 -5
- package/dist/{PrefPanel-Cf-9oKfS.js → PrefPanel-pFTxxuQW.js} +54 -53
- package/dist/{ProductIcon-DjgAODwc.js → ProductIcon-DFLAYWbu.js} +1 -1
- package/dist/{RadioBox-B9rLrNTK.js → RadioBox-o1Ssyj0s.js} +1 -1
- package/dist/{RoadmapDetails-8I0H8cJO.js → RoadmapDetails-Cv-T7-lm.js} +4 -4
- package/dist/{Search-BvuVKy00.js → Search-DwY5daIl.js} +1039 -943
- package/dist/{Tabs-DanjfIHP.js → Tabs-BEpADhmv.js} +2 -2
- package/dist/{Typography-Dw2_XzMu.js → Typography-CJ7GcPcE.js} +1 -1
- package/dist/{YoutubeModal-CcsPAJj8.js → YoutubeModal-CiBt7a4G.js} +7 -7
- package/dist/components/Box/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Container/index.js +1 -1
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/DiscordInvite/index.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/GPTInput/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/Heading/index.js +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/InputSolo/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/Logo/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +4 -4
- package/dist/components/Modal/index.js +5 -5
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/ProductIcon/icons/grayscale/index.js +1 -1
- package/dist/components/ProductIcon/icons/line/index.js +1 -1
- package/dist/components/ProductIcon/icons/monochrome/index.js +1 -1
- package/dist/components/ProductIcon/icons/multi/index.js +1 -1
- package/dist/components/ProductIcon/index.js +1 -1
- package/dist/components/RadioBox/index.js +1 -1
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/{dist-MBZ50zVE.js → dist-B04QoImH.js} +60 -45
- package/dist/{dist-BMBUb7XY.js → dist-CE9LFbij.js} +71 -72
- package/dist/{dist-SfVqm611.js → dist-J9cXmrDi.js} +1 -1
- package/dist/dist-f0z6DapB.js +185 -0
- package/dist/{es2015-CJyFgdNb.js → es2015-DWa0ZZ7A.js} +395 -337
- package/dist/{esm-CH52zwuf.js → esm-Co_Guu6S.js} +89 -89
- package/dist/{fa-Ci5IATkb.js → fa-B95RwBpz.js} +6 -6
- package/dist/lib/components/ButtonGroup/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/index.d.ts +2 -2
- package/dist/lib/components/DiscordInvite/index.d.ts +1 -1
- package/dist/lib/components/Dropdown/index.d.ts +3 -3
- package/dist/lib/components/Footer/CookiePolicyModal.d.ts +1 -1
- package/dist/lib/components/Footer/FooterBottom.d.ts +1 -1
- package/dist/lib/components/Footer/FooterHelp.d.ts +1 -1
- package/dist/lib/components/Footer/FooterLinks.d.ts +1 -1
- package/dist/lib/components/Footer/YoutubeModal.d.ts +1 -1
- package/dist/lib/components/Footer/index.d.ts +1 -1
- package/dist/lib/components/GPTInput/index.d.ts +2 -2
- package/dist/lib/components/Header/index.d.ts +2 -2
- package/dist/lib/components/Icon/index.d.ts +1 -1
- package/dist/lib/components/InputGrouped/index.d.ts +1 -1
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Link/index.d.ts +1 -1
- package/dist/lib/components/Logo/index.d.ts +1 -1
- package/dist/lib/components/Modal/ModalContactFooter.d.ts +1 -1
- package/dist/lib/components/Modal/index.d.ts +1 -1
- package/dist/lib/components/NewsletterSignup/index.d.ts +1 -1
- package/dist/lib/components/Notification/index.d.ts +1 -1
- package/dist/lib/components/PrefPanel/index.d.ts +2 -2
- package/dist/lib/components/ProductIcon/icons/grayscale/Accessibility.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Advantageplus.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Api.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/CaseStudies.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Changelog.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/ChartChooser.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Core.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/CustomProjects.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Dashboards.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Demos.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Docs.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Editor.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/EduLicense.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/ExportServer.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Gantt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Gpt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Grid.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Hca.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Lab.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/License.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Maps.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Python.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Roadmap.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Stock.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Support.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Accessibility.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Advantageplus.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Api.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/CaseStudies.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Changelog.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/ChartChooser.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Core.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/CustomProjects.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Dashboards.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Demos.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Docs.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Editor.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/EduLicense.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/ExportServer.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Gantt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Gpt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Grid.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Hca.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Lab.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/License.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Maps.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Python.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Roadmap.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Stock.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/line/Support.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Accessibility.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Advantageplus.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Api.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/CaseStudies.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Changelog.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/ChartChooser.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Core.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/CustomProjects.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Dashboards.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Demos.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Docs.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Editor.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/EduLicense.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/ExportServer.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Gantt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Gpt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Grid.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Hca.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Lab.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/License.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Maps.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Python.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Roadmap.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Stock.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/monochrome/Support.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Accessibility.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Advantageplus.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Api.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/CaseStudies.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Changelog.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/ChartChooser.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Core.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/CustomProjects.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Dashboards.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Demos.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Docs.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Editor.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/EduLicense.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/ExportServer.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Gantt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Gpt.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Grid.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Hca.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Lab.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/License.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Maps.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Python.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Roadmap.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Stock.d.ts +1 -1
- package/dist/lib/components/ProductIcon/icons/multi/Support.d.ts +1 -1
- package/dist/lib/components/ProductIcon/index.d.ts +1 -1
- package/dist/lib/components/RadioBox/index.d.ts +2 -2
- package/dist/lib/components/RoadmapDetails/index.d.ts +1 -1
- package/dist/lib/components/Search/index.d.ts +1 -1
- package/dist/lib/components/Tabs/index.d.ts +1 -1
- package/dist/lib/components/ThemeLoader/index.d.ts +1 -1
- package/dist/lib/components/icons/Bubble.d.ts +1 -1
- package/dist/lib/components/icons/MadeInNorway.d.ts +1 -1
- package/dist/lib/components/icons/Plane.d.ts +1 -1
- package/dist/main.js +27 -27
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/Dropdown-fBTRMHW7.js +0 -817
- package/dist/dist-9h8Pur86.js +0 -211
- /package/dist/{Box-Bi-n_ZxQ.js → Box-BZgeSeCV.js} +0 -0
- /package/dist/{Link-DGMiLJES.js → Link-CYR92_U0.js} +0 -0
- /package/dist/{chunk-foFoljWS.js → chunk-jwUa06l-.js} +0 -0
- /package/dist/{clsx-D7D_XZ_-.js → clsx-BWCAbrjV.js} +0 -0
- /package/dist/{styles.module-BZplfYRW.js → styles.module-BDcr8Smc.js} +0 -0
- /package/dist/{utils-BCI5dixg.js → utils-K9S_6_Eq.js} +0 -0
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
import { t as e } from "./clsx-BWCAbrjV.js";
|
|
2
|
+
import { L as t } from "./esm-Co_Guu6S.js";
|
|
3
|
+
import { t as n } from "./Icon-VeXJMj8Q.js";
|
|
4
|
+
import { _ as r, a as i, c as a, d as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, t as g, u as _, v, y } from "./es2015-DWa0ZZ7A.js";
|
|
5
|
+
import { a as ee, i as b, n as te, r as x, t as S } from "./dist-CE9LFbij.js";
|
|
6
|
+
import { a as C, i as w, n as T, r as ne, t as re } from "./dist-B04QoImH.js";
|
|
7
|
+
import * as E from "react";
|
|
8
|
+
import { createContext as D, useContext as O } from "react";
|
|
9
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
10
|
+
//#region node_modules/@radix-ui/react-menu/dist/index.mjs
|
|
11
|
+
var j = ["Enter", " "], M = [
|
|
12
|
+
"ArrowDown",
|
|
13
|
+
"PageUp",
|
|
14
|
+
"Home"
|
|
15
|
+
], ie = [
|
|
16
|
+
"ArrowUp",
|
|
17
|
+
"PageDown",
|
|
18
|
+
"End"
|
|
19
|
+
], ae = [...M, ...ie], oe = {
|
|
20
|
+
ltr: [...j, "ArrowRight"],
|
|
21
|
+
rtl: [...j, "ArrowLeft"]
|
|
22
|
+
}, N = {
|
|
23
|
+
ltr: ["ArrowLeft"],
|
|
24
|
+
rtl: ["ArrowRight"]
|
|
25
|
+
}, P = "Menu", [F, se, ce] = ee(P), [I, le] = d(P, [
|
|
26
|
+
ce,
|
|
27
|
+
C,
|
|
28
|
+
x
|
|
29
|
+
]), L = C(), ue = x(), [R, z] = I(P), [de, B] = I(P), fe = (e) => {
|
|
30
|
+
let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: o, modal: s = !0 } = e, c = L(t), [l, u] = E.useState(null), d = E.useRef(!1), f = a(o), p = b(i);
|
|
31
|
+
return E.useEffect(() => {
|
|
32
|
+
let e = () => {
|
|
33
|
+
d.current = !0, document.addEventListener("pointerdown", t, {
|
|
34
|
+
capture: !0,
|
|
35
|
+
once: !0
|
|
36
|
+
}), document.addEventListener("pointermove", t, {
|
|
37
|
+
capture: !0,
|
|
38
|
+
once: !0
|
|
39
|
+
});
|
|
40
|
+
}, t = () => d.current = !1;
|
|
41
|
+
return document.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
42
|
+
document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
|
|
43
|
+
};
|
|
44
|
+
}, []), E.useEffect(() => {
|
|
45
|
+
if (!n) return;
|
|
46
|
+
let e = () => f(!1);
|
|
47
|
+
return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
|
|
48
|
+
}, [n, f]), /* @__PURE__ */ k(w, {
|
|
49
|
+
...c,
|
|
50
|
+
children: /* @__PURE__ */ k(R, {
|
|
51
|
+
scope: t,
|
|
52
|
+
open: n,
|
|
53
|
+
onOpenChange: f,
|
|
54
|
+
content: l,
|
|
55
|
+
onContentChange: u,
|
|
56
|
+
children: /* @__PURE__ */ k(de, {
|
|
57
|
+
scope: t,
|
|
58
|
+
onClose: E.useCallback(() => f(!1), [f]),
|
|
59
|
+
isUsingKeyboardRef: d,
|
|
60
|
+
dir: p,
|
|
61
|
+
modal: s,
|
|
62
|
+
children: r
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
fe.displayName = P;
|
|
68
|
+
var pe = "MenuAnchor", V = E.forwardRef((e, t) => {
|
|
69
|
+
let { __scopeMenu: n, ...r } = e;
|
|
70
|
+
return /* @__PURE__ */ k(re, {
|
|
71
|
+
...L(n),
|
|
72
|
+
...r,
|
|
73
|
+
ref: t
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
V.displayName = pe;
|
|
77
|
+
var H = "MenuPortal", [me, he] = I(H, { forceMount: void 0 }), ge = (e) => {
|
|
78
|
+
let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = z(H, t);
|
|
79
|
+
return /* @__PURE__ */ k(me, {
|
|
80
|
+
scope: t,
|
|
81
|
+
forceMount: n,
|
|
82
|
+
children: /* @__PURE__ */ k(_, {
|
|
83
|
+
present: n || a.open,
|
|
84
|
+
children: /* @__PURE__ */ k(l, {
|
|
85
|
+
asChild: !0,
|
|
86
|
+
container: i,
|
|
87
|
+
children: r
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
ge.displayName = H;
|
|
93
|
+
var U = "MenuContent", [_e, W] = I(U), ve = E.forwardRef((e, t) => {
|
|
94
|
+
let n = he(U, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = z(U, e.__scopeMenu), o = B(U, e.__scopeMenu);
|
|
95
|
+
return /* @__PURE__ */ k(F.Provider, {
|
|
96
|
+
scope: e.__scopeMenu,
|
|
97
|
+
children: /* @__PURE__ */ k(_, {
|
|
98
|
+
present: r || a.open,
|
|
99
|
+
children: /* @__PURE__ */ k(F.Slot, {
|
|
100
|
+
scope: e.__scopeMenu,
|
|
101
|
+
children: o.modal ? /* @__PURE__ */ k(ye, {
|
|
102
|
+
...i,
|
|
103
|
+
ref: t
|
|
104
|
+
}) : /* @__PURE__ */ k(be, {
|
|
105
|
+
...i,
|
|
106
|
+
ref: t
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
}), ye = E.forwardRef((e, t) => {
|
|
112
|
+
let n = z(U, e.__scopeMenu), r = E.useRef(null), i = y(t, r);
|
|
113
|
+
return E.useEffect(() => {
|
|
114
|
+
let e = r.current;
|
|
115
|
+
if (e) return g(e);
|
|
116
|
+
}, []), /* @__PURE__ */ k(Se, {
|
|
117
|
+
...e,
|
|
118
|
+
ref: i,
|
|
119
|
+
trapFocus: n.open,
|
|
120
|
+
disableOutsidePointerEvents: n.open,
|
|
121
|
+
disableOutsideScroll: !0,
|
|
122
|
+
onFocusOutside: m(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
|
|
123
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
124
|
+
});
|
|
125
|
+
}), be = E.forwardRef((e, t) => {
|
|
126
|
+
let n = z(U, e.__scopeMenu);
|
|
127
|
+
return /* @__PURE__ */ k(Se, {
|
|
128
|
+
...e,
|
|
129
|
+
ref: t,
|
|
130
|
+
trapFocus: !1,
|
|
131
|
+
disableOutsidePointerEvents: !1,
|
|
132
|
+
disableOutsideScroll: !1,
|
|
133
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
134
|
+
});
|
|
135
|
+
}), xe = r("MenuContent.ScrollLock"), Se = E.forwardRef((e, t) => {
|
|
136
|
+
let { __scopeMenu: n, loop: r = !1, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: u, onPointerDownOutside: d, onFocusOutside: g, onInteractOutside: _, onDismiss: v, disableOutsideScroll: ee, ...b } = e, x = z(U, n), S = B(U, n), C = L(n), w = ue(n), T = se(n), [re, D] = E.useState(null), O = E.useRef(null), A = y(t, O, x.onContentChange), j = E.useRef(0), M = E.useRef(""), oe = E.useRef(0), N = E.useRef(null), P = E.useRef("right"), F = E.useRef(0), ce = ee ? f : E.Fragment, I = ee ? {
|
|
137
|
+
as: xe,
|
|
138
|
+
allowPinchZoom: !0
|
|
139
|
+
} : void 0, le = (e) => {
|
|
140
|
+
let t = M.current + e, n = T().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = tt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
|
|
141
|
+
(function e(t) {
|
|
142
|
+
M.current = t, window.clearTimeout(j.current), t !== "" && (j.current = window.setTimeout(() => e(""), 1e3));
|
|
143
|
+
})(t), o && setTimeout(() => o.focus());
|
|
144
|
+
};
|
|
145
|
+
E.useEffect(() => () => window.clearTimeout(j.current), []), h();
|
|
146
|
+
let R = E.useCallback((e) => P.current === N.current?.side && rt(e, N.current?.area), []);
|
|
147
|
+
return /* @__PURE__ */ k(_e, {
|
|
148
|
+
scope: n,
|
|
149
|
+
searchRef: M,
|
|
150
|
+
onItemEnter: E.useCallback((e) => {
|
|
151
|
+
R(e) && e.preventDefault();
|
|
152
|
+
}, [R]),
|
|
153
|
+
onItemLeave: E.useCallback((e) => {
|
|
154
|
+
R(e) || (O.current?.focus(), D(null));
|
|
155
|
+
}, [R]),
|
|
156
|
+
onTriggerLeave: E.useCallback((e) => {
|
|
157
|
+
R(e) && e.preventDefault();
|
|
158
|
+
}, [R]),
|
|
159
|
+
pointerGraceTimerRef: oe,
|
|
160
|
+
onPointerGraceIntentChange: E.useCallback((e) => {
|
|
161
|
+
N.current = e;
|
|
162
|
+
}, []),
|
|
163
|
+
children: /* @__PURE__ */ k(ce, {
|
|
164
|
+
...I,
|
|
165
|
+
children: /* @__PURE__ */ k(i, {
|
|
166
|
+
asChild: !0,
|
|
167
|
+
trapped: a,
|
|
168
|
+
onMountAutoFocus: m(o, (e) => {
|
|
169
|
+
e.preventDefault(), O.current?.focus({ preventScroll: !0 });
|
|
170
|
+
}),
|
|
171
|
+
onUnmountAutoFocus: s,
|
|
172
|
+
children: /* @__PURE__ */ k(p, {
|
|
173
|
+
asChild: !0,
|
|
174
|
+
disableOutsidePointerEvents: c,
|
|
175
|
+
onEscapeKeyDown: u,
|
|
176
|
+
onPointerDownOutside: d,
|
|
177
|
+
onFocusOutside: g,
|
|
178
|
+
onInteractOutside: _,
|
|
179
|
+
onDismiss: v,
|
|
180
|
+
children: /* @__PURE__ */ k(te, {
|
|
181
|
+
asChild: !0,
|
|
182
|
+
...w,
|
|
183
|
+
dir: S.dir,
|
|
184
|
+
orientation: "vertical",
|
|
185
|
+
loop: r,
|
|
186
|
+
currentTabStopId: re,
|
|
187
|
+
onCurrentTabStopIdChange: D,
|
|
188
|
+
onEntryFocus: m(l, (e) => {
|
|
189
|
+
S.isUsingKeyboardRef.current || e.preventDefault();
|
|
190
|
+
}),
|
|
191
|
+
preventScrollOnEntryFocus: !0,
|
|
192
|
+
children: /* @__PURE__ */ k(ne, {
|
|
193
|
+
role: "menu",
|
|
194
|
+
"aria-orientation": "vertical",
|
|
195
|
+
"data-state": Ze(x.open),
|
|
196
|
+
"data-radix-menu-content": "",
|
|
197
|
+
dir: S.dir,
|
|
198
|
+
...C,
|
|
199
|
+
...b,
|
|
200
|
+
ref: A,
|
|
201
|
+
style: {
|
|
202
|
+
outline: "none",
|
|
203
|
+
...b.style
|
|
204
|
+
},
|
|
205
|
+
onKeyDown: m(b.onKeyDown, (e) => {
|
|
206
|
+
let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
|
|
207
|
+
t && (e.key === "Tab" && e.preventDefault(), !n && r && le(e.key));
|
|
208
|
+
let i = O.current;
|
|
209
|
+
if (e.target !== i || !ae.includes(e.key)) return;
|
|
210
|
+
e.preventDefault();
|
|
211
|
+
let a = T().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
212
|
+
ie.includes(e.key) && a.reverse(), $e(a);
|
|
213
|
+
}),
|
|
214
|
+
onBlur: m(e.onBlur, (e) => {
|
|
215
|
+
e.currentTarget.contains(e.target) || (window.clearTimeout(j.current), M.current = "");
|
|
216
|
+
}),
|
|
217
|
+
onPointerMove: m(e.onPointerMove, X((e) => {
|
|
218
|
+
let t = e.target, n = F.current !== e.clientX;
|
|
219
|
+
e.currentTarget.contains(t) && n && (P.current = e.clientX > F.current ? "right" : "left", F.current = e.clientX);
|
|
220
|
+
}))
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
ve.displayName = U;
|
|
229
|
+
var Ce = "MenuGroup", we = E.forwardRef((e, t) => {
|
|
230
|
+
let { __scopeMenu: n, ...r } = e;
|
|
231
|
+
return /* @__PURE__ */ k(c.div, {
|
|
232
|
+
role: "group",
|
|
233
|
+
...r,
|
|
234
|
+
ref: t
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
we.displayName = Ce;
|
|
238
|
+
var Te = "MenuLabel", Ee = E.forwardRef((e, t) => {
|
|
239
|
+
let { __scopeMenu: n, ...r } = e;
|
|
240
|
+
return /* @__PURE__ */ k(c.div, {
|
|
241
|
+
...r,
|
|
242
|
+
ref: t
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
Ee.displayName = Te;
|
|
246
|
+
var G = "MenuItem", De = "menu.itemSelect", K = E.forwardRef((e, t) => {
|
|
247
|
+
let { disabled: n = !1, onSelect: r, ...i } = e, a = E.useRef(null), o = B(G, e.__scopeMenu), c = W(G, e.__scopeMenu), l = y(t, a), u = E.useRef(!1), d = () => {
|
|
248
|
+
let e = a.current;
|
|
249
|
+
if (!n && e) {
|
|
250
|
+
let t = new CustomEvent(De, {
|
|
251
|
+
bubbles: !0,
|
|
252
|
+
cancelable: !0
|
|
253
|
+
});
|
|
254
|
+
e.addEventListener(De, (e) => r?.(e), { once: !0 }), s(e, t), t.defaultPrevented ? u.current = !1 : o.onClose();
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
return /* @__PURE__ */ k(Oe, {
|
|
258
|
+
...i,
|
|
259
|
+
ref: l,
|
|
260
|
+
disabled: n,
|
|
261
|
+
onClick: m(e.onClick, d),
|
|
262
|
+
onPointerDown: (t) => {
|
|
263
|
+
e.onPointerDown?.(t), u.current = !0;
|
|
264
|
+
},
|
|
265
|
+
onPointerUp: m(e.onPointerUp, (e) => {
|
|
266
|
+
u.current || e.currentTarget?.click();
|
|
267
|
+
}),
|
|
268
|
+
onKeyDown: m(e.onKeyDown, (e) => {
|
|
269
|
+
let t = c.searchRef.current !== "";
|
|
270
|
+
n || t && e.key === " " || j.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
K.displayName = G;
|
|
275
|
+
var Oe = E.forwardRef((e, t) => {
|
|
276
|
+
let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = W(G, n), s = ue(n), l = E.useRef(null), u = y(t, l), [d, f] = E.useState(!1), [p, h] = E.useState("");
|
|
277
|
+
return E.useEffect(() => {
|
|
278
|
+
let e = l.current;
|
|
279
|
+
e && h((e.textContent ?? "").trim());
|
|
280
|
+
}, [a.children]), /* @__PURE__ */ k(F.ItemSlot, {
|
|
281
|
+
scope: n,
|
|
282
|
+
disabled: r,
|
|
283
|
+
textValue: i ?? p,
|
|
284
|
+
children: /* @__PURE__ */ k(S, {
|
|
285
|
+
asChild: !0,
|
|
286
|
+
...s,
|
|
287
|
+
focusable: !r,
|
|
288
|
+
children: /* @__PURE__ */ k(c.div, {
|
|
289
|
+
role: "menuitem",
|
|
290
|
+
"data-highlighted": d ? "" : void 0,
|
|
291
|
+
"aria-disabled": r || void 0,
|
|
292
|
+
"data-disabled": r ? "" : void 0,
|
|
293
|
+
...a,
|
|
294
|
+
ref: u,
|
|
295
|
+
onPointerMove: m(e.onPointerMove, X((e) => {
|
|
296
|
+
r ? o.onItemLeave(e) : (o.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
|
|
297
|
+
})),
|
|
298
|
+
onPointerLeave: m(e.onPointerLeave, X((e) => o.onItemLeave(e))),
|
|
299
|
+
onFocus: m(e.onFocus, () => f(!0)),
|
|
300
|
+
onBlur: m(e.onBlur, () => f(!1))
|
|
301
|
+
})
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
}), ke = "MenuCheckboxItem", Ae = E.forwardRef((e, t) => {
|
|
305
|
+
let { checked: n = !1, onCheckedChange: r, ...i } = e;
|
|
306
|
+
return /* @__PURE__ */ k(Le, {
|
|
307
|
+
scope: e.__scopeMenu,
|
|
308
|
+
checked: n,
|
|
309
|
+
children: /* @__PURE__ */ k(K, {
|
|
310
|
+
role: "menuitemcheckbox",
|
|
311
|
+
"aria-checked": Y(n) ? "mixed" : n,
|
|
312
|
+
...i,
|
|
313
|
+
ref: t,
|
|
314
|
+
"data-state": Qe(n),
|
|
315
|
+
onSelect: m(i.onSelect, () => r?.(Y(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
|
|
316
|
+
})
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
Ae.displayName = ke;
|
|
320
|
+
var je = "MenuRadioGroup", [Me, Ne] = I(je, {
|
|
321
|
+
value: void 0,
|
|
322
|
+
onValueChange: () => {}
|
|
323
|
+
}), Pe = E.forwardRef((e, t) => {
|
|
324
|
+
let { value: n, onValueChange: r, ...i } = e, o = a(r);
|
|
325
|
+
return /* @__PURE__ */ k(Me, {
|
|
326
|
+
scope: e.__scopeMenu,
|
|
327
|
+
value: n,
|
|
328
|
+
onValueChange: o,
|
|
329
|
+
children: /* @__PURE__ */ k(we, {
|
|
330
|
+
...i,
|
|
331
|
+
ref: t
|
|
332
|
+
})
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
Pe.displayName = je;
|
|
336
|
+
var Fe = "MenuRadioItem", Ie = E.forwardRef((e, t) => {
|
|
337
|
+
let { value: n, ...r } = e, i = Ne(Fe, e.__scopeMenu), a = n === i.value;
|
|
338
|
+
return /* @__PURE__ */ k(Le, {
|
|
339
|
+
scope: e.__scopeMenu,
|
|
340
|
+
checked: a,
|
|
341
|
+
children: /* @__PURE__ */ k(K, {
|
|
342
|
+
role: "menuitemradio",
|
|
343
|
+
"aria-checked": a,
|
|
344
|
+
...r,
|
|
345
|
+
ref: t,
|
|
346
|
+
"data-state": Qe(a),
|
|
347
|
+
onSelect: m(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
|
|
348
|
+
})
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
Ie.displayName = Fe;
|
|
352
|
+
var q = "MenuItemIndicator", [Le, Re] = I(q, { checked: !1 }), ze = E.forwardRef((e, t) => {
|
|
353
|
+
let { __scopeMenu: n, forceMount: r, ...i } = e, a = Re(q, n);
|
|
354
|
+
return /* @__PURE__ */ k(_, {
|
|
355
|
+
present: r || Y(a.checked) || a.checked === !0,
|
|
356
|
+
children: /* @__PURE__ */ k(c.span, {
|
|
357
|
+
...i,
|
|
358
|
+
ref: t,
|
|
359
|
+
"data-state": Qe(a.checked)
|
|
360
|
+
})
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
ze.displayName = q;
|
|
364
|
+
var Be = "MenuSeparator", Ve = E.forwardRef((e, t) => {
|
|
365
|
+
let { __scopeMenu: n, ...r } = e;
|
|
366
|
+
return /* @__PURE__ */ k(c.div, {
|
|
367
|
+
role: "separator",
|
|
368
|
+
"aria-orientation": "horizontal",
|
|
369
|
+
...r,
|
|
370
|
+
ref: t
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
Ve.displayName = Be;
|
|
374
|
+
var He = "MenuArrow", Ue = E.forwardRef((e, t) => {
|
|
375
|
+
let { __scopeMenu: n, ...r } = e;
|
|
376
|
+
return /* @__PURE__ */ k(T, {
|
|
377
|
+
...L(n),
|
|
378
|
+
...r,
|
|
379
|
+
ref: t
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
Ue.displayName = He;
|
|
383
|
+
var We = "MenuSub", [Ge, Ke] = I(We), qe = (e) => {
|
|
384
|
+
let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, o = z(We, t), s = L(t), [c, l] = E.useState(null), [d, f] = E.useState(null), p = a(i);
|
|
385
|
+
return E.useEffect(() => (o.open === !1 && p(!1), () => p(!1)), [o.open, p]), /* @__PURE__ */ k(w, {
|
|
386
|
+
...s,
|
|
387
|
+
children: /* @__PURE__ */ k(R, {
|
|
388
|
+
scope: t,
|
|
389
|
+
open: r,
|
|
390
|
+
onOpenChange: p,
|
|
391
|
+
content: d,
|
|
392
|
+
onContentChange: f,
|
|
393
|
+
children: /* @__PURE__ */ k(Ge, {
|
|
394
|
+
scope: t,
|
|
395
|
+
contentId: u(),
|
|
396
|
+
triggerId: u(),
|
|
397
|
+
trigger: c,
|
|
398
|
+
onTriggerChange: l,
|
|
399
|
+
children: n
|
|
400
|
+
})
|
|
401
|
+
})
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
qe.displayName = We;
|
|
405
|
+
var J = "MenuSubTrigger", Je = E.forwardRef((e, t) => {
|
|
406
|
+
let n = z(J, e.__scopeMenu), r = B(J, e.__scopeMenu), i = Ke(J, e.__scopeMenu), a = W(J, e.__scopeMenu), o = E.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: c } = a, l = { __scopeMenu: e.__scopeMenu }, u = E.useCallback(() => {
|
|
407
|
+
o.current && window.clearTimeout(o.current), o.current = null;
|
|
408
|
+
}, []);
|
|
409
|
+
return E.useEffect(() => u, [u]), E.useEffect(() => {
|
|
410
|
+
let e = s.current;
|
|
411
|
+
return () => {
|
|
412
|
+
window.clearTimeout(e), c(null);
|
|
413
|
+
};
|
|
414
|
+
}, [s, c]), /* @__PURE__ */ k(V, {
|
|
415
|
+
asChild: !0,
|
|
416
|
+
...l,
|
|
417
|
+
children: /* @__PURE__ */ k(Oe, {
|
|
418
|
+
id: i.triggerId,
|
|
419
|
+
"aria-haspopup": "menu",
|
|
420
|
+
"aria-expanded": n.open,
|
|
421
|
+
"aria-controls": n.open ? i.contentId : void 0,
|
|
422
|
+
"data-state": Ze(n.open),
|
|
423
|
+
...e,
|
|
424
|
+
ref: v(t, i.onTriggerChange),
|
|
425
|
+
onClick: (t) => {
|
|
426
|
+
e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
427
|
+
},
|
|
428
|
+
onPointerMove: m(e.onPointerMove, X((t) => {
|
|
429
|
+
a.onItemEnter(t), !t.defaultPrevented && !e.disabled && !n.open && !o.current && (a.onPointerGraceIntentChange(null), o.current = window.setTimeout(() => {
|
|
430
|
+
n.onOpenChange(!0), u();
|
|
431
|
+
}, 100));
|
|
432
|
+
})),
|
|
433
|
+
onPointerLeave: m(e.onPointerLeave, X((e) => {
|
|
434
|
+
u();
|
|
435
|
+
let t = n.content?.getBoundingClientRect();
|
|
436
|
+
if (t) {
|
|
437
|
+
let r = n.content?.dataset.side, i = r === "right", o = i ? -5 : 5, c = t[i ? "left" : "right"], l = t[i ? "right" : "left"];
|
|
438
|
+
a.onPointerGraceIntentChange({
|
|
439
|
+
area: [
|
|
440
|
+
{
|
|
441
|
+
x: e.clientX + o,
|
|
442
|
+
y: e.clientY
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
x: c,
|
|
446
|
+
y: t.top
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
x: l,
|
|
450
|
+
y: t.top
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
x: l,
|
|
454
|
+
y: t.bottom
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
x: c,
|
|
458
|
+
y: t.bottom
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
side: r
|
|
462
|
+
}), window.clearTimeout(s.current), s.current = window.setTimeout(() => a.onPointerGraceIntentChange(null), 300);
|
|
463
|
+
} else {
|
|
464
|
+
if (a.onTriggerLeave(e), e.defaultPrevented) return;
|
|
465
|
+
a.onPointerGraceIntentChange(null);
|
|
466
|
+
}
|
|
467
|
+
})),
|
|
468
|
+
onKeyDown: m(e.onKeyDown, (t) => {
|
|
469
|
+
let i = a.searchRef.current !== "";
|
|
470
|
+
e.disabled || i && t.key === " " || oe[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
|
|
471
|
+
})
|
|
472
|
+
})
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
Je.displayName = J;
|
|
476
|
+
var Ye = "MenuSubContent", Xe = E.forwardRef((e, t) => {
|
|
477
|
+
let n = he(U, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = z(U, e.__scopeMenu), s = B(U, e.__scopeMenu), c = Ke(Ye, e.__scopeMenu), l = E.useRef(null), u = y(t, l);
|
|
478
|
+
return /* @__PURE__ */ k(F.Provider, {
|
|
479
|
+
scope: e.__scopeMenu,
|
|
480
|
+
children: /* @__PURE__ */ k(_, {
|
|
481
|
+
present: r || o.open,
|
|
482
|
+
children: /* @__PURE__ */ k(F.Slot, {
|
|
483
|
+
scope: e.__scopeMenu,
|
|
484
|
+
children: /* @__PURE__ */ k(Se, {
|
|
485
|
+
id: c.contentId,
|
|
486
|
+
"aria-labelledby": c.triggerId,
|
|
487
|
+
...a,
|
|
488
|
+
ref: u,
|
|
489
|
+
align: i,
|
|
490
|
+
side: s.dir === "rtl" ? "left" : "right",
|
|
491
|
+
disableOutsidePointerEvents: !1,
|
|
492
|
+
disableOutsideScroll: !1,
|
|
493
|
+
trapFocus: !1,
|
|
494
|
+
onOpenAutoFocus: (e) => {
|
|
495
|
+
s.isUsingKeyboardRef.current && l.current?.focus(), e.preventDefault();
|
|
496
|
+
},
|
|
497
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
498
|
+
onFocusOutside: m(e.onFocusOutside, (e) => {
|
|
499
|
+
e.target !== c.trigger && o.onOpenChange(!1);
|
|
500
|
+
}),
|
|
501
|
+
onEscapeKeyDown: m(e.onEscapeKeyDown, (e) => {
|
|
502
|
+
s.onClose(), e.preventDefault();
|
|
503
|
+
}),
|
|
504
|
+
onKeyDown: m(e.onKeyDown, (e) => {
|
|
505
|
+
let t = e.currentTarget.contains(e.target), n = N[s.dir].includes(e.key);
|
|
506
|
+
t && n && (o.onOpenChange(!1), c.trigger?.focus(), e.preventDefault());
|
|
507
|
+
})
|
|
508
|
+
})
|
|
509
|
+
})
|
|
510
|
+
})
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
Xe.displayName = Ye;
|
|
514
|
+
function Ze(e) {
|
|
515
|
+
return e ? "open" : "closed";
|
|
516
|
+
}
|
|
517
|
+
function Y(e) {
|
|
518
|
+
return e === "indeterminate";
|
|
519
|
+
}
|
|
520
|
+
function Qe(e) {
|
|
521
|
+
return Y(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
522
|
+
}
|
|
523
|
+
function $e(e) {
|
|
524
|
+
let t = document.activeElement;
|
|
525
|
+
for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
526
|
+
}
|
|
527
|
+
function et(e, t) {
|
|
528
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
529
|
+
}
|
|
530
|
+
function tt(e, t, n) {
|
|
531
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = et(e, Math.max(i, 0));
|
|
532
|
+
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
533
|
+
let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
|
|
534
|
+
return o === n ? void 0 : o;
|
|
535
|
+
}
|
|
536
|
+
function nt(e, t) {
|
|
537
|
+
let { x: n, y: r } = e, i = !1;
|
|
538
|
+
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
539
|
+
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
540
|
+
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
|
|
541
|
+
}
|
|
542
|
+
return i;
|
|
543
|
+
}
|
|
544
|
+
function rt(e, t) {
|
|
545
|
+
return t ? nt({
|
|
546
|
+
x: e.clientX,
|
|
547
|
+
y: e.clientY
|
|
548
|
+
}, t) : !1;
|
|
549
|
+
}
|
|
550
|
+
function X(e) {
|
|
551
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
552
|
+
}
|
|
553
|
+
var it = fe, at = V, ot = ge, st = ve, ct = we, lt = Ee, ut = K, dt = Ae, ft = Pe, pt = Ie, mt = ze, ht = Ve, gt = Ue, _t = Je, vt = Xe, Z = "DropdownMenu", [yt, bt] = d(Z, [le]), Q = le(), [xt, St] = yt(Z), Ct = (e) => {
|
|
554
|
+
let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: s, modal: c = !0 } = e, l = Q(t), d = E.useRef(null), [f, p] = o({
|
|
555
|
+
prop: i,
|
|
556
|
+
defaultProp: a ?? !1,
|
|
557
|
+
onChange: s,
|
|
558
|
+
caller: Z
|
|
559
|
+
});
|
|
560
|
+
return /* @__PURE__ */ k(xt, {
|
|
561
|
+
scope: t,
|
|
562
|
+
triggerId: u(),
|
|
563
|
+
triggerRef: d,
|
|
564
|
+
contentId: u(),
|
|
565
|
+
open: f,
|
|
566
|
+
onOpenChange: p,
|
|
567
|
+
onOpenToggle: E.useCallback(() => p((e) => !e), [p]),
|
|
568
|
+
modal: c,
|
|
569
|
+
children: /* @__PURE__ */ k(it, {
|
|
570
|
+
...l,
|
|
571
|
+
open: f,
|
|
572
|
+
onOpenChange: p,
|
|
573
|
+
dir: r,
|
|
574
|
+
modal: c,
|
|
575
|
+
children: n
|
|
576
|
+
})
|
|
577
|
+
});
|
|
578
|
+
};
|
|
579
|
+
Ct.displayName = Z;
|
|
580
|
+
var wt = "DropdownMenuTrigger", Tt = E.forwardRef((e, t) => {
|
|
581
|
+
let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = St(wt, n);
|
|
582
|
+
return /* @__PURE__ */ k(at, {
|
|
583
|
+
asChild: !0,
|
|
584
|
+
...Q(n),
|
|
585
|
+
children: /* @__PURE__ */ k(c.button, {
|
|
586
|
+
type: "button",
|
|
587
|
+
id: a.triggerId,
|
|
588
|
+
"aria-haspopup": "menu",
|
|
589
|
+
"aria-expanded": a.open,
|
|
590
|
+
"aria-controls": a.open ? a.contentId : void 0,
|
|
591
|
+
"data-state": a.open ? "open" : "closed",
|
|
592
|
+
"data-disabled": r ? "" : void 0,
|
|
593
|
+
disabled: r,
|
|
594
|
+
...i,
|
|
595
|
+
ref: v(t, a.triggerRef),
|
|
596
|
+
onPointerDown: m(e.onPointerDown, (e) => {
|
|
597
|
+
!r && e.button === 0 && e.ctrlKey === !1 && (a.onOpenToggle(), a.open || e.preventDefault());
|
|
598
|
+
}),
|
|
599
|
+
onKeyDown: m(e.onKeyDown, (e) => {
|
|
600
|
+
r || (["Enter", " "].includes(e.key) && a.onOpenToggle(), e.key === "ArrowDown" && a.onOpenChange(!0), [
|
|
601
|
+
"Enter",
|
|
602
|
+
" ",
|
|
603
|
+
"ArrowDown"
|
|
604
|
+
].includes(e.key) && e.preventDefault());
|
|
605
|
+
})
|
|
606
|
+
})
|
|
607
|
+
});
|
|
608
|
+
});
|
|
609
|
+
Tt.displayName = wt;
|
|
610
|
+
var Et = "DropdownMenuPortal", Dt = (e) => {
|
|
611
|
+
let { __scopeDropdownMenu: t, ...n } = e;
|
|
612
|
+
return /* @__PURE__ */ k(ot, {
|
|
613
|
+
...Q(t),
|
|
614
|
+
...n
|
|
615
|
+
});
|
|
616
|
+
};
|
|
617
|
+
Dt.displayName = Et;
|
|
618
|
+
var Ot = "DropdownMenuContent", kt = E.forwardRef((e, t) => {
|
|
619
|
+
let { __scopeDropdownMenu: n, ...r } = e, i = St(Ot, n), a = Q(n), o = E.useRef(!1);
|
|
620
|
+
return /* @__PURE__ */ k(st, {
|
|
621
|
+
id: i.contentId,
|
|
622
|
+
"aria-labelledby": i.triggerId,
|
|
623
|
+
...a,
|
|
624
|
+
...r,
|
|
625
|
+
ref: t,
|
|
626
|
+
onCloseAutoFocus: m(e.onCloseAutoFocus, (e) => {
|
|
627
|
+
o.current || i.triggerRef.current?.focus(), o.current = !1, e.preventDefault();
|
|
628
|
+
}),
|
|
629
|
+
onInteractOutside: m(e.onInteractOutside, (e) => {
|
|
630
|
+
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
631
|
+
(!i.modal || r) && (o.current = !0);
|
|
632
|
+
}),
|
|
633
|
+
style: {
|
|
634
|
+
...e.style,
|
|
635
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
636
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
637
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
638
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
639
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
kt.displayName = Ot;
|
|
644
|
+
var At = "DropdownMenuGroup", jt = E.forwardRef((e, t) => {
|
|
645
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
646
|
+
return /* @__PURE__ */ k(ct, {
|
|
647
|
+
...Q(n),
|
|
648
|
+
...r,
|
|
649
|
+
ref: t
|
|
650
|
+
});
|
|
651
|
+
});
|
|
652
|
+
jt.displayName = At;
|
|
653
|
+
var Mt = "DropdownMenuLabel", Nt = E.forwardRef((e, t) => {
|
|
654
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
655
|
+
return /* @__PURE__ */ k(lt, {
|
|
656
|
+
...Q(n),
|
|
657
|
+
...r,
|
|
658
|
+
ref: t
|
|
659
|
+
});
|
|
660
|
+
});
|
|
661
|
+
Nt.displayName = Mt;
|
|
662
|
+
var Pt = "DropdownMenuItem", Ft = E.forwardRef((e, t) => {
|
|
663
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
664
|
+
return /* @__PURE__ */ k(ut, {
|
|
665
|
+
...Q(n),
|
|
666
|
+
...r,
|
|
667
|
+
ref: t
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
Ft.displayName = Pt;
|
|
671
|
+
var It = "DropdownMenuCheckboxItem", Lt = E.forwardRef((e, t) => {
|
|
672
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
673
|
+
return /* @__PURE__ */ k(dt, {
|
|
674
|
+
...Q(n),
|
|
675
|
+
...r,
|
|
676
|
+
ref: t
|
|
677
|
+
});
|
|
678
|
+
});
|
|
679
|
+
Lt.displayName = It;
|
|
680
|
+
var Rt = "DropdownMenuRadioGroup", zt = E.forwardRef((e, t) => {
|
|
681
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
682
|
+
return /* @__PURE__ */ k(ft, {
|
|
683
|
+
...Q(n),
|
|
684
|
+
...r,
|
|
685
|
+
ref: t
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
zt.displayName = Rt;
|
|
689
|
+
var Bt = "DropdownMenuRadioItem", Vt = E.forwardRef((e, t) => {
|
|
690
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
691
|
+
return /* @__PURE__ */ k(pt, {
|
|
692
|
+
...Q(n),
|
|
693
|
+
...r,
|
|
694
|
+
ref: t
|
|
695
|
+
});
|
|
696
|
+
});
|
|
697
|
+
Vt.displayName = Bt;
|
|
698
|
+
var Ht = "DropdownMenuItemIndicator", Ut = E.forwardRef((e, t) => {
|
|
699
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
700
|
+
return /* @__PURE__ */ k(mt, {
|
|
701
|
+
...Q(n),
|
|
702
|
+
...r,
|
|
703
|
+
ref: t
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
Ut.displayName = Ht;
|
|
707
|
+
var Wt = "DropdownMenuSeparator", Gt = E.forwardRef((e, t) => {
|
|
708
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
709
|
+
return /* @__PURE__ */ k(ht, {
|
|
710
|
+
...Q(n),
|
|
711
|
+
...r,
|
|
712
|
+
ref: t
|
|
713
|
+
});
|
|
714
|
+
});
|
|
715
|
+
Gt.displayName = Wt;
|
|
716
|
+
var Kt = "DropdownMenuArrow", qt = E.forwardRef((e, t) => {
|
|
717
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
718
|
+
return /* @__PURE__ */ k(gt, {
|
|
719
|
+
...Q(n),
|
|
720
|
+
...r,
|
|
721
|
+
ref: t
|
|
722
|
+
});
|
|
723
|
+
});
|
|
724
|
+
qt.displayName = Kt;
|
|
725
|
+
var Jt = "DropdownMenuSubTrigger", Yt = E.forwardRef((e, t) => {
|
|
726
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
727
|
+
return /* @__PURE__ */ k(_t, {
|
|
728
|
+
...Q(n),
|
|
729
|
+
...r,
|
|
730
|
+
ref: t
|
|
731
|
+
});
|
|
732
|
+
});
|
|
733
|
+
Yt.displayName = Jt;
|
|
734
|
+
var Xt = "DropdownMenuSubContent", Zt = E.forwardRef((e, t) => {
|
|
735
|
+
let { __scopeDropdownMenu: n, ...r } = e;
|
|
736
|
+
return /* @__PURE__ */ k(vt, {
|
|
737
|
+
...Q(n),
|
|
738
|
+
...r,
|
|
739
|
+
ref: t,
|
|
740
|
+
style: {
|
|
741
|
+
...e.style,
|
|
742
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
743
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
744
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
745
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
746
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
});
|
|
750
|
+
Zt.displayName = Xt;
|
|
751
|
+
var Qt = Ct, $t = Tt, en = Dt, tn = kt, nn = Ft, rn = zt, an = Vt, on = Gt, $ = {
|
|
752
|
+
checkIcon: "_0tr6ea_checkIcon",
|
|
753
|
+
content: "_0tr6ea_content",
|
|
754
|
+
"hsui-dropdown-in": "_0tr6ea_hsui-dropdown-in",
|
|
755
|
+
"hsui-dropdown-out": "_0tr6ea_hsui-dropdown-out",
|
|
756
|
+
item: "_0tr6ea_item",
|
|
757
|
+
label: "_0tr6ea_label",
|
|
758
|
+
noCheck: "_0tr6ea_noCheck",
|
|
759
|
+
separator: "_0tr6ea_separator"
|
|
760
|
+
}, sn = D({ closeOnSelect: !1 });
|
|
761
|
+
function cn({ trigger: t, value: n, onValueChange: r, showCheck: i = !0, closeOnSelect: a = !1, options: o, children: s, side: c = "bottom", align: l = "start", sideOffset: u = 8, alignOffset: d, open: f, onOpenChange: p, defaultOpen: m, width: h, className: g }) {
|
|
762
|
+
let _ = n !== void 0 || r !== void 0, v = h === void 0 ? void 0 : h === "trigger" ? { width: "var(--radix-dropdown-menu-trigger-width)" } : { width: h }, y = o ? o.map((e) => /* @__PURE__ */ k(ln, {
|
|
763
|
+
value: e.value,
|
|
764
|
+
disabled: e.disabled,
|
|
765
|
+
children: e.label
|
|
766
|
+
}, e.value)) : s;
|
|
767
|
+
return /* @__PURE__ */ k(sn.Provider, {
|
|
768
|
+
value: { closeOnSelect: a },
|
|
769
|
+
children: /* @__PURE__ */ A(Qt, {
|
|
770
|
+
open: f,
|
|
771
|
+
onOpenChange: p,
|
|
772
|
+
defaultOpen: m,
|
|
773
|
+
children: [/* @__PURE__ */ k($t, {
|
|
774
|
+
asChild: !0,
|
|
775
|
+
children: t
|
|
776
|
+
}), /* @__PURE__ */ k(en, { children: /* @__PURE__ */ k(tn, {
|
|
777
|
+
sideOffset: u,
|
|
778
|
+
alignOffset: d,
|
|
779
|
+
side: c,
|
|
780
|
+
align: l,
|
|
781
|
+
className: e("hsui-dropdown", $.content, !i && $.noCheck, g),
|
|
782
|
+
style: v,
|
|
783
|
+
children: _ ? /* @__PURE__ */ k(rn, {
|
|
784
|
+
value: n ?? "",
|
|
785
|
+
onValueChange: r,
|
|
786
|
+
children: y
|
|
787
|
+
}) : y
|
|
788
|
+
}) })]
|
|
789
|
+
})
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
function ln({ value: r, disabled: i, children: a, onSelect: o, className: s }) {
|
|
793
|
+
let { closeOnSelect: c } = O(sn), l = (e) => {
|
|
794
|
+
c || e.preventDefault(), o?.();
|
|
795
|
+
}, u = e($.item, s), d = /* @__PURE__ */ k(n, {
|
|
796
|
+
name: t,
|
|
797
|
+
size: 16,
|
|
798
|
+
className: $.checkIcon
|
|
799
|
+
});
|
|
800
|
+
return r === void 0 ? /* @__PURE__ */ A(nn, {
|
|
801
|
+
disabled: i,
|
|
802
|
+
onSelect: l,
|
|
803
|
+
className: u,
|
|
804
|
+
children: [d, /* @__PURE__ */ k("span", {
|
|
805
|
+
className: $.label,
|
|
806
|
+
children: a
|
|
807
|
+
})]
|
|
808
|
+
}) : /* @__PURE__ */ A(an, {
|
|
809
|
+
value: r,
|
|
810
|
+
disabled: i,
|
|
811
|
+
onSelect: l,
|
|
812
|
+
className: u,
|
|
813
|
+
children: [d, /* @__PURE__ */ k("span", {
|
|
814
|
+
className: $.label,
|
|
815
|
+
children: a
|
|
816
|
+
})]
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
var un = ({ className: t }) => /* @__PURE__ */ k(on, { className: e($.separator, t) });
|
|
820
|
+
//#endregion
|
|
821
|
+
export { ln as n, un as r, cn as t };
|