@nxgt/material 3.75.0 → 3.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +37 -1
- package/dist/{alert-dialog-BfO_ri-N.js → alert-dialog-653apk3f.js} +8 -7
- package/dist/{async-slice-roMAJVzG.js → async-slice-CXLbQuOc.js} +1 -1
- package/dist/{bubble-input-B7BVd9fX.js → bubble-input-CQwVSoU3.js} +30 -29
- package/dist/{button-DgenqmpS.js → button-3op3rtZh.js} +5 -4
- package/dist/calculator-BaSMe0SK.js +1189 -0
- package/dist/calculator-announce-DRd2c6Dq.js +89 -0
- package/dist/calculator-context-BugcKuVG.js +10 -0
- package/dist/calculator-field.js +172 -0
- package/dist/calculator-panel-announce-AZSnZUSr.js +29 -0
- package/dist/calculator-segment-BlJE1LaS.js +22 -0
- package/dist/calculator.js +2 -0
- package/dist/charts.js +3 -3
- package/dist/{chip-CiDczNxO.js → chip-MuKDwtkG.js} +2 -2
- package/dist/{code-editor-CohlhFsA.js → code-editor-Bp2RrdNx.js} +13 -13
- package/dist/code-editor.js +37 -37
- package/dist/{code-language-items-Cs8GLYDp.js → code-language-items-B7WR5ua_.js} +19 -24
- package/dist/components/base-content.css +9 -4
- package/dist/components/ui/collections/server-table/server-table-phone-row.css +10 -3
- package/dist/{components-zJdfH4im.js → components-Ci3Zo8kC.js} +15837 -17245
- package/dist/components.js +37 -28
- package/dist/conversion-variant-BDFAxqe9.js +529 -0
- package/dist/copy-to-clipboard-Be5Ffvs_.js +7 -0
- package/dist/currency-B-r3ig11.js +16 -0
- package/dist/currency-field-BJ9rSrif.js +285 -0
- package/dist/{number.utils-BG_eEt5g.js → date.utils-DUvqcjan.js} +1 -7
- package/dist/dialog-Bm5LvVlB.js +166 -0
- package/dist/dist-BZe2evxL.js +139 -0
- package/dist/dist-CxhKjOYm.js +28 -0
- package/dist/dist-DHdUUM1w.js +241 -0
- package/dist/{dist-C4wtXCjf.js → dist-DOK3zo5C.js} +33 -32
- package/dist/dist-DWZXlCZR.js +182 -0
- package/dist/dist-DkQbkF9T.js +33 -0
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CzR6JP31.js → dropdown-menu-xlZ6NYUA.js} +160 -159
- package/dist/editor.js +299 -298
- package/dist/{empty-state-DjHGMp5F.js → empty-state-C0kviQdW.js} +2 -2
- package/dist/{field-blur-CdASxjL7.js → field-blur-DkiZOVNV.js} +178 -180
- package/dist/{field-blur-context-kZ4SD7xu.js → field-blur-context-BLGgf_3z.js} +2 -2
- package/dist/financial-variant-BsZEa5sF.js +459 -0
- package/dist/{hooks-Dqq8O3Az.js → hooks-Dg94jPRq.js} +12 -12
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BPKqte4a.js → hover-card-B1g55Hi6.js} +44 -43
- package/dist/i18n.js +3 -3
- package/dist/icon-badge-BcW66bRk.js +17 -0
- package/dist/{icon-button-Cr-DyDGg.js → icon-button-Cogxy1cy.js} +5 -4
- package/dist/{in-dialog-Vwkyp-M5.js → in-dialog-D61Yeaol.js} +2 -1
- package/dist/input-CC2joTjB.js +56 -0
- package/dist/key-layout-cR79xfGE.js +38 -0
- package/dist/lib/calculator/index.d.ts +16 -0
- package/dist/lib/calculator-field/index.d.ts +12 -0
- package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -2
- package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +17 -2
- package/dist/lib/components/ui/feedback/moment/moment-passive.d.ts +13 -0
- package/dist/lib/components/ui/feedback/moment/moment.d.ts +16 -2
- package/dist/lib/components/ui/fields/calculator-field/apply-calculated.d.ts +17 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field-content.d.ts +16 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field-trigger.d.ts +4 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field.d.ts +12 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field.types.d.ts +31 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-form-field.d.ts +4 -0
- package/dist/lib/components/ui/fields/calculator-field/index.d.ts +3 -0
- package/dist/lib/components/ui/fields/calculator-field/use-calculator-field.d.ts +15 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/currency-field/currency-field.d.ts +7 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-context.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-announce.d.ts +27 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-clipboard.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-context.d.ts +49 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-feedback.d.ts +18 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-keyboard.d.ts +30 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-storage.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-variant-steps.d.ts +16 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.d.ts +11 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.selectors.d.ts +23 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.slice.d.ts +1881 -0
- package/dist/lib/components/ui/widgets/calculator/currency.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/engine.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/index.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-announcer.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-display.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-key.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +8 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-loading.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-memory.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-announce.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-body.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-screen.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-segment.d.ts +21 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-shell.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-switcher.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-tape.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-tools.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/keypad-navigation.d.ts +24 -0
- package/dist/lib/components/ui/widgets/calculator/types.d.ts +102 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-clipboard.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-conversion.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-feedback.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-keyboard.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-persistence.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-pos.d.ts +25 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-press.d.ts +26 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-tape.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-value.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-variant.d.ts +23 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/use-engine-settings.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-fields.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-labels.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-math.d.ts +31 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-names.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-panel.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-rates.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-result.d.ts +15 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-state.d.ts +36 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/use-conversion.d.ts +24 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-change.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-figures.d.ts +43 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-format.d.ts +12 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan-math.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-margin.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-math.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-panel.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-parts.d.ts +35 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-table.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-vat.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +51 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-announce.d.ts +16 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-aside.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-display.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-fields.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-layout.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-line.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-state.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-tender.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket-data.d.ts +41 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-totals.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-types.d.ts +76 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-vat.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-view.d.ts +28 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-announce.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-base.d.ts +11 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-bitpad.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-display.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-layout.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-readouts.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-reduce.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-state.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-toolbar.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-word.d.ts +15 -0
- package/dist/lib/components/ui/widgets/calculator/variants/registry.d.ts +21 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-layout.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-toolbar.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/standard/standard-layout.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-loader.d.ts +34 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-logic.d.ts +40 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-types.d.ts +62 -0
- package/dist/lib/i18n/resources/en/en.d.ts +412 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +412 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +412 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +412 -0
- package/dist/lib/i18n/resources/resources.d.ts +824 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +4 -3
- package/dist/main.js +50 -40
- package/dist/map.js +66 -65
- package/dist/material.css +1 -1
- package/dist/native-select-w_FlBLHV.js +40 -0
- package/dist/number.utils-CSueQZcv.js +7 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/percent-field-lahyDJDG.js +14 -0
- package/dist/picker-surface-CV09H7Nb.js +1220 -0
- package/dist/popover-Cd7DkND4.js +233 -0
- package/dist/pos-types-DKCkOTYy.js +49 -0
- package/dist/pos-variant-GrUfbTTP.js +603 -0
- package/dist/print.js +1 -1
- package/dist/programmer-variant-eKJNKENL.js +501 -0
- package/dist/programmer-word-CNCF7DJF.js +15 -0
- package/dist/{public-DC9VQw4Z.js → public-y6g4ddxd.js} +895 -892
- package/dist/{rich-code-block-DBSL9zEN.js → rich-code-block-CRQ0iyLb.js} +5 -5
- package/dist/scientific-variant-2y3UxAAU.js +149 -0
- package/dist/{sortable-provider-C4tk5esY.js → sortable-provider-DdiI3Fwk.js} +2 -2
- package/dist/{spinner-B2MubVWb.js → spinner-C1QIewWv.js} +133 -159
- package/dist/standard-layout-BuSRr3TY.js +40 -0
- package/dist/tabs-DzEqMb1W.js +383 -0
- package/dist/{icon-badge-B9uvDoyY.js → text-field-BAdY-kpO.js} +20 -34
- package/dist/theme-picker.js +3 -3
- package/dist/{theme-toggle-BInlu21G.js → theme-toggle-C_VeiiCm.js} +2 -2
- package/dist/toggle-FeCCJqbg.js +40 -0
- package/dist/{toggle-group-DXXlqid2.js → toggle-group-CVMxEpWi.js} +1 -1
- package/dist/{toolbar-items-CRJSx1MU.js → toolbar-items-D310xDuM.js} +333 -554
- package/dist/{translate-material-pVlPJ1v4.js → translate-material-BypJJ1l5.js} +1 -1
- package/dist/{translator-BoYCward.js → translator-DJkf4J7t.js} +824 -0
- package/dist/{typography-B6YMbCge.js → typography-CYEquVeb.js} +1 -1
- package/dist/{use-chat-composer-BvWQogJe.js → use-chat-composer-DMXu9E1O.js} +4198 -4600
- package/dist/{use-heading-spy-B_Z4ArDh.js → use-heading-spy-DJR8YYm6.js} +19 -19
- package/dist/{use-material-translation-CIS2n3RB.js → use-material-translation-CD6QoVal.js} +1 -1
- package/dist/{use-return-focus-DNQtADAR.js → use-return-focus-Cevw_6yq.js} +106 -105
- package/dist/useLatest-C2PnQEeD.js +8 -0
- package/docs/README.md +1 -0
- package/docs/components/feedback-and-status.md +10 -1
- package/docs/components/form-fields.md +1 -0
- package/docs/components/rich-widgets.md +108 -0
- package/docs/getting-started.md +1 -0
- package/docs/guides/calculator.md +468 -0
- package/docs/guides/forms.md +4 -2
- package/docs/guides/i18n.md +5 -0
- package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
- package/docs/previews/rich-widgets-calculator-point-of-sale.webp +0 -0
- package/docs/previews/rich-widgets-calculator.webp +0 -0
- package/docs/roadmap.md +9 -3
- package/docs/troubleshooting.md +134 -0
- package/lib/components/base-content.css +9 -4
- package/lib/components/ui/collections/server-table/server-table-phone-row.css +10 -3
- package/lib/components/ui/widgets/calculator/calculator-bands.css +146 -0
- package/lib/components/ui/widgets/calculator/calculator-display.css +83 -0
- package/lib/components/ui/widgets/calculator/calculator-keys.css +118 -0
- package/lib/components/ui/widgets/calculator/calculator-pos-ticket.css +185 -0
- package/lib/components/ui/widgets/calculator/calculator-pos.css +38 -0
- package/lib/components/ui/widgets/calculator/calculator-tape.css +71 -0
- package/lib/components/ui/widgets/calculator/calculator.css +97 -0
- package/lib/components/ui/widgets/calculator/variants/conversion/conversion.css +98 -0
- package/lib/components/ui/widgets/calculator/variants/financial/financial.css +162 -0
- package/lib/components/ui/widgets/calculator/variants/programmer/programmer.css +162 -0
- package/package.json +17 -3
- package/dist/dialog-AGsB3bv4.js +0 -219
- package/dist/dist-B7RjY7SL.js +0 -158
- package/dist/dist-lmHmz_bu.js +0 -419
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { n as t, o as n, r } from "./dist-DVRQkaTK.js";
|
|
3
|
-
import { a as i,
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import { a as
|
|
3
|
+
import { a as i, i as a, r as o, t as s } from "./dist-DWZXlCZR.js";
|
|
4
|
+
import { S as c, d as l, f as u, l as d, p as f, t as p, x as m } from "./spinner-C1QIewWv.js";
|
|
5
|
+
import { a as h, i as g, n as _, r as v } from "./dist-DHdUUM1w.js";
|
|
6
|
+
import { a as y, i as b, n as ee, r as x, t as te } from "./dist-DOK3zo5C.js";
|
|
7
|
+
import { a as ne, c as re, l as ie, o as S, r as ae, s as oe, t as se } from "./in-dialog-D61Yeaol.js";
|
|
7
8
|
import * as C from "react";
|
|
8
9
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
9
10
|
//#region ../../node_modules/@radix-ui/react-menu/dist/index.mjs
|
|
@@ -24,12 +25,12 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
24
25
|
}, j = {
|
|
25
26
|
ltr: ["ArrowLeft"],
|
|
26
27
|
rtl: ["ArrowRight"]
|
|
27
|
-
}, M = "Menu", [N, de, fe] =
|
|
28
|
+
}, M = "Menu", [N, de, fe] = y(M), [P, F] = h(M, [
|
|
28
29
|
fe,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
]), I =
|
|
32
|
-
let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = I(t), [
|
|
30
|
+
f,
|
|
31
|
+
x
|
|
32
|
+
]), I = f(), pe = x(), [me, L] = P(M), [he, R] = P(M), ge = /* @__PURE__ */ O((e) => {
|
|
33
|
+
let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = I(t), [c, l] = C.useState(null), d = C.useRef(!1), f = _(a), p = b(i);
|
|
33
34
|
return C.useEffect(() => {
|
|
34
35
|
let e = /* @__PURE__ */ O(() => {
|
|
35
36
|
d.current = !0, document.addEventListener("pointerdown", t, {
|
|
@@ -47,14 +48,14 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
47
48
|
if (!n) return;
|
|
48
49
|
let e = /* @__PURE__ */ O(() => f(!1), "handleBlur");
|
|
49
50
|
return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
|
|
50
|
-
}, [n, f]), /* @__PURE__ */ T(
|
|
51
|
+
}, [n, f]), /* @__PURE__ */ T(u, {
|
|
51
52
|
...s,
|
|
52
53
|
children: /* @__PURE__ */ T(me, {
|
|
53
54
|
scope: t,
|
|
54
55
|
open: n,
|
|
55
56
|
onOpenChange: f,
|
|
56
|
-
content:
|
|
57
|
-
onContentChange:
|
|
57
|
+
content: c,
|
|
58
|
+
onContentChange: l,
|
|
58
59
|
children: /* @__PURE__ */ T(he, {
|
|
59
60
|
scope: t,
|
|
60
61
|
onClose: C.useCallback(() => f(!1), [f]),
|
|
@@ -67,7 +68,7 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
67
68
|
});
|
|
68
69
|
}, "Menu"), _e = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
69
70
|
let { __scopeMenu: n, ...r } = e;
|
|
70
|
-
return /* @__PURE__ */ T(
|
|
71
|
+
return /* @__PURE__ */ T(d, {
|
|
71
72
|
...I(n),
|
|
72
73
|
...r,
|
|
73
74
|
ref: t
|
|
@@ -77,9 +78,9 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
77
78
|
return /* @__PURE__ */ T(ye, {
|
|
78
79
|
scope: t,
|
|
79
80
|
forceMount: n,
|
|
80
|
-
children: /* @__PURE__ */ T(
|
|
81
|
+
children: /* @__PURE__ */ T(g, {
|
|
81
82
|
present: n || a.open,
|
|
82
|
-
children: /* @__PURE__ */ T(
|
|
83
|
+
children: /* @__PURE__ */ T(m, {
|
|
83
84
|
asChild: !0,
|
|
84
85
|
container: i,
|
|
85
86
|
children: r
|
|
@@ -87,14 +88,14 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
87
88
|
})
|
|
88
89
|
});
|
|
89
90
|
}, "MenuPortal"), z = "MenuContent", [Se, B] = P(z), Ce = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
90
|
-
let n = be(z, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = L(z, e.__scopeMenu),
|
|
91
|
+
let n = be(z, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = L(z, e.__scopeMenu), o = R(z, e.__scopeMenu);
|
|
91
92
|
return /* @__PURE__ */ T(N.Provider, {
|
|
92
93
|
scope: e.__scopeMenu,
|
|
93
|
-
children: /* @__PURE__ */ T(
|
|
94
|
+
children: /* @__PURE__ */ T(g, {
|
|
94
95
|
present: r || a.open,
|
|
95
96
|
children: /* @__PURE__ */ T(N.Slot, {
|
|
96
97
|
scope: e.__scopeMenu,
|
|
97
|
-
children:
|
|
98
|
+
children: o.modal ? /* @__PURE__ */ T(we, {
|
|
98
99
|
...i,
|
|
99
100
|
ref: t
|
|
100
101
|
}) : /* @__PURE__ */ T(Te, {
|
|
@@ -108,14 +109,14 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
108
109
|
let r = L(z, e.__scopeMenu), i = C.useRef(null), a = n(t, i);
|
|
109
110
|
return C.useEffect(() => {
|
|
110
111
|
let e = i.current;
|
|
111
|
-
if (e) return
|
|
112
|
+
if (e) return S(e);
|
|
112
113
|
}, []), /* @__PURE__ */ T(V, {
|
|
113
114
|
...e,
|
|
114
115
|
ref: a,
|
|
115
116
|
trapFocus: r.open,
|
|
116
117
|
disableOutsidePointerEvents: r.open,
|
|
117
118
|
disableOutsideScroll: !0,
|
|
118
|
-
onFocusOutside:
|
|
119
|
+
onFocusOutside: o(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
|
|
119
120
|
onDismiss: () => r.onOpenChange(!1)
|
|
120
121
|
});
|
|
121
122
|
}, "MenuRootContentModal")), Te = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
@@ -129,16 +130,16 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
129
130
|
onDismiss: () => n.onOpenChange(!1)
|
|
130
131
|
});
|
|
131
132
|
}, "MenuRootContentNonModal")), Ee = r("MenuContent.ScrollLock"), V = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
132
|
-
let { __scopeMenu: r, loop: i = !1, trapFocus: a, onOpenAutoFocus:
|
|
133
|
+
let { __scopeMenu: r, loop: i = !1, trapFocus: a, onOpenAutoFocus: s, onCloseAutoFocus: u, disableOutsidePointerEvents: d, onEntryFocus: f, onEscapeKeyDown: p, onPointerDownOutside: m, onFocusOutside: h, onInteractOutside: g, onDismiss: _, disableOutsideScroll: v, ...y } = e, b = L(z, r), x = R(z, r), te = I(r), ne = pe(r), S = de(r), [ae, se] = C.useState(null), w = C.useRef(null), E = n(t, w, b.onContentChange), D = C.useRef(0), k = C.useRef(""), ce = C.useRef(0), A = C.useRef(null), j = C.useRef("right"), M = C.useRef(0), N = v ? oe : C.Fragment, fe = v ? {
|
|
133
134
|
as: Ee,
|
|
134
135
|
allowPinchZoom: !0
|
|
135
136
|
} : void 0, P = /* @__PURE__ */ O((e) => {
|
|
136
|
-
let t = k.current + e, n =
|
|
137
|
+
let t = k.current + e, n = S().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = Ze(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
|
|
137
138
|
(/* @__PURE__ */ O((function e(t) {
|
|
138
139
|
k.current = t, window.clearTimeout(D.current), t !== "" && (D.current = window.setTimeout(() => e(""), 1e3));
|
|
139
140
|
}), "updateSearch"))(t), o && setTimeout(() => o.focus());
|
|
140
141
|
}, "handleTypeaheadSearch");
|
|
141
|
-
C.useEffect(() => () => window.clearTimeout(D.current), []),
|
|
142
|
+
C.useEffect(() => () => window.clearTimeout(D.current), []), re();
|
|
142
143
|
let F = C.useCallback((e) => j.current === A.current?.side && $e(e, A.current?.area), []);
|
|
143
144
|
return /* @__PURE__ */ T(Se, {
|
|
144
145
|
scope: r,
|
|
@@ -147,7 +148,7 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
147
148
|
F(e) && e.preventDefault();
|
|
148
149
|
}, [F]),
|
|
149
150
|
onItemLeave: C.useCallback((e) => {
|
|
150
|
-
F(e) || (w.current?.focus(),
|
|
151
|
+
F(e) || (w.current?.focus(), se(null));
|
|
151
152
|
}, [F]),
|
|
152
153
|
onTriggerLeave: C.useCallback((e) => {
|
|
153
154
|
F(e) && e.preventDefault();
|
|
@@ -158,59 +159,59 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
158
159
|
}, []),
|
|
159
160
|
children: /* @__PURE__ */ T(N, {
|
|
160
161
|
...fe,
|
|
161
|
-
children: /* @__PURE__ */ T(
|
|
162
|
+
children: /* @__PURE__ */ T(ie, {
|
|
162
163
|
asChild: !0,
|
|
163
164
|
trapped: a,
|
|
164
|
-
onMountAutoFocus:
|
|
165
|
+
onMountAutoFocus: o(s, (e) => {
|
|
165
166
|
e.preventDefault(), w.current?.focus({ preventScroll: !0 });
|
|
166
167
|
}),
|
|
167
|
-
onUnmountAutoFocus:
|
|
168
|
-
children: /* @__PURE__ */ T(
|
|
168
|
+
onUnmountAutoFocus: u,
|
|
169
|
+
children: /* @__PURE__ */ T(c, {
|
|
169
170
|
asChild: !0,
|
|
170
|
-
disableOutsidePointerEvents:
|
|
171
|
-
onEscapeKeyDown:
|
|
172
|
-
onPointerDownOutside:
|
|
171
|
+
disableOutsidePointerEvents: d,
|
|
172
|
+
onEscapeKeyDown: p,
|
|
173
|
+
onPointerDownOutside: m,
|
|
173
174
|
onFocusOutside: h,
|
|
174
175
|
onInteractOutside: g,
|
|
175
|
-
onDismiss:
|
|
176
|
-
children: /* @__PURE__ */ T(
|
|
176
|
+
onDismiss: _,
|
|
177
|
+
children: /* @__PURE__ */ T(ee, {
|
|
177
178
|
asChild: !0,
|
|
178
|
-
...
|
|
179
|
-
dir:
|
|
179
|
+
...ne,
|
|
180
|
+
dir: x.dir,
|
|
180
181
|
orientation: "vertical",
|
|
181
182
|
loop: i,
|
|
182
|
-
currentTabStopId:
|
|
183
|
-
onCurrentTabStopIdChange:
|
|
184
|
-
onEntryFocus:
|
|
185
|
-
|
|
183
|
+
currentTabStopId: ae,
|
|
184
|
+
onCurrentTabStopIdChange: se,
|
|
185
|
+
onEntryFocus: o(f, (e) => {
|
|
186
|
+
x.isUsingKeyboardRef.current || e.preventDefault();
|
|
186
187
|
}),
|
|
187
188
|
preventScrollOnEntryFocus: !0,
|
|
188
|
-
children: /* @__PURE__ */ T(
|
|
189
|
+
children: /* @__PURE__ */ T(l, {
|
|
189
190
|
role: "menu",
|
|
190
191
|
"aria-orientation": "vertical",
|
|
191
|
-
"data-state": G(
|
|
192
|
+
"data-state": G(b.open),
|
|
192
193
|
"data-radix-menu-content": "",
|
|
193
|
-
dir:
|
|
194
|
-
...
|
|
195
|
-
...
|
|
194
|
+
dir: x.dir,
|
|
195
|
+
...te,
|
|
196
|
+
...y,
|
|
196
197
|
ref: E,
|
|
197
198
|
style: {
|
|
198
199
|
outline: "none",
|
|
199
|
-
...
|
|
200
|
+
...y.style
|
|
200
201
|
},
|
|
201
|
-
onKeyDown:
|
|
202
|
+
onKeyDown: o(y.onKeyDown, (e) => {
|
|
202
203
|
let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
|
|
203
204
|
t && (e.key === "Tab" && e.preventDefault(), !n && r && P(e.key));
|
|
204
205
|
let i = w.current;
|
|
205
206
|
if (e.target !== i || !ue.includes(e.key)) return;
|
|
206
207
|
e.preventDefault();
|
|
207
|
-
let a =
|
|
208
|
+
let a = S().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
208
209
|
le.includes(e.key) && a.reverse(), Ye(a);
|
|
209
210
|
}),
|
|
210
|
-
onBlur:
|
|
211
|
+
onBlur: o(e.onBlur, (e) => {
|
|
211
212
|
e.currentTarget.contains(e.target) || (window.clearTimeout(D.current), k.current = "");
|
|
212
213
|
}),
|
|
213
|
-
onPointerMove:
|
|
214
|
+
onPointerMove: o(e.onPointerMove, J((e) => {
|
|
214
215
|
let t = e.target, n = M.current !== e.clientX;
|
|
215
216
|
if (e.currentTarget.contains(t) && n) {
|
|
216
217
|
let t = e.clientX > M.current ? "right" : "left";
|
|
@@ -225,69 +226,69 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
225
226
|
});
|
|
226
227
|
}, "MenuContentImpl")), De = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
227
228
|
let { __scopeMenu: n, ...r } = e;
|
|
228
|
-
return /* @__PURE__ */ T(
|
|
229
|
+
return /* @__PURE__ */ T(a.div, {
|
|
229
230
|
role: "group",
|
|
230
231
|
...r,
|
|
231
232
|
ref: t
|
|
232
233
|
});
|
|
233
234
|
}, "MenuGroup")), Oe = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
234
235
|
let { __scopeMenu: n, ...r } = e;
|
|
235
|
-
return /* @__PURE__ */ T(
|
|
236
|
+
return /* @__PURE__ */ T(a.div, {
|
|
236
237
|
...r,
|
|
237
238
|
ref: t
|
|
238
239
|
});
|
|
239
240
|
}, "MenuLabel")), H = "MenuItem", ke = "menu.itemSelect", U = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
240
|
-
let { disabled: r = !1, onSelect:
|
|
241
|
-
let e =
|
|
241
|
+
let { disabled: r = !1, onSelect: a, ...s } = e, c = C.useRef(null), l = R(H, e.__scopeMenu), u = B(H, e.__scopeMenu), d = n(t, c), f = C.useRef(!1), p = /* @__PURE__ */ O(() => {
|
|
242
|
+
let e = c.current;
|
|
242
243
|
if (!r && e) {
|
|
243
244
|
let t = new CustomEvent(ke, {
|
|
244
245
|
bubbles: !0,
|
|
245
246
|
cancelable: !0
|
|
246
247
|
});
|
|
247
|
-
e.addEventListener(ke, (e) =>
|
|
248
|
+
e.addEventListener(ke, (e) => a?.(e), { once: !0 }), i(e, t), t.defaultPrevented ? f.current = !1 : l.onClose();
|
|
248
249
|
}
|
|
249
250
|
}, "handleSelect");
|
|
250
251
|
return /* @__PURE__ */ T(Ae, {
|
|
251
|
-
...
|
|
252
|
-
ref:
|
|
252
|
+
...s,
|
|
253
|
+
ref: d,
|
|
253
254
|
disabled: r,
|
|
254
|
-
onClick:
|
|
255
|
+
onClick: o(e.onClick, p),
|
|
255
256
|
onPointerDown: (t) => {
|
|
256
257
|
e.onPointerDown?.(t), f.current = !0;
|
|
257
258
|
},
|
|
258
|
-
onPointerUp:
|
|
259
|
+
onPointerUp: o(e.onPointerUp, (e) => {
|
|
259
260
|
f.current || e.currentTarget?.click();
|
|
260
261
|
}),
|
|
261
|
-
onKeyDown:
|
|
262
|
-
r || e.target !== e.currentTarget ||
|
|
262
|
+
onKeyDown: o(e.onKeyDown, (e) => {
|
|
263
|
+
r || e.target !== e.currentTarget || u.searchRef.current !== "" && e.key === " " || k.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
|
|
263
264
|
})
|
|
264
265
|
});
|
|
265
266
|
}, "MenuItem")), Ae = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
266
|
-
let { __scopeMenu: r, disabled: i = !1, textValue:
|
|
267
|
+
let { __scopeMenu: r, disabled: i = !1, textValue: s, ...c } = e, l = B(H, r), u = pe(r), d = C.useRef(null), f = n(t, d), [p, m] = C.useState(!1), [h, g] = C.useState("");
|
|
267
268
|
return C.useEffect(() => {
|
|
268
269
|
let e = d.current;
|
|
269
270
|
e && g((e.textContent ?? "").trim());
|
|
270
|
-
}, [
|
|
271
|
+
}, [c.children]), /* @__PURE__ */ T(N.ItemSlot, {
|
|
271
272
|
scope: r,
|
|
272
273
|
disabled: i,
|
|
273
|
-
textValue:
|
|
274
|
-
children: /* @__PURE__ */ T(
|
|
274
|
+
textValue: s ?? h,
|
|
275
|
+
children: /* @__PURE__ */ T(te, {
|
|
275
276
|
asChild: !0,
|
|
276
|
-
...
|
|
277
|
+
...u,
|
|
277
278
|
focusable: !i,
|
|
278
|
-
children: /* @__PURE__ */ T(
|
|
279
|
+
children: /* @__PURE__ */ T(a.div, {
|
|
279
280
|
role: "menuitem",
|
|
280
281
|
"data-highlighted": p ? "" : void 0,
|
|
281
282
|
"aria-disabled": i || void 0,
|
|
282
283
|
"data-disabled": i ? "" : void 0,
|
|
283
|
-
...
|
|
284
|
+
...c,
|
|
284
285
|
ref: f,
|
|
285
|
-
onPointerMove:
|
|
286
|
-
i ?
|
|
286
|
+
onPointerMove: o(e.onPointerMove, J((e) => {
|
|
287
|
+
i ? l.onItemLeave(e) : (l.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
|
|
287
288
|
})),
|
|
288
|
-
onPointerLeave:
|
|
289
|
-
onFocus:
|
|
290
|
-
onBlur:
|
|
289
|
+
onPointerLeave: o(e.onPointerLeave, J((e) => l.onItemLeave(e))),
|
|
290
|
+
onFocus: o(e.onFocus, () => m(!0)),
|
|
291
|
+
onBlur: o(e.onBlur, () => m(!1))
|
|
291
292
|
})
|
|
292
293
|
})
|
|
293
294
|
});
|
|
@@ -302,14 +303,14 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
302
303
|
...i,
|
|
303
304
|
ref: t,
|
|
304
305
|
"data-state": q(n),
|
|
305
|
-
onSelect:
|
|
306
|
+
onSelect: o(i.onSelect, () => r?.(K(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
|
|
306
307
|
})
|
|
307
308
|
});
|
|
308
309
|
}, "MenuCheckboxItem")), [Me, Ne] = P("MenuRadioGroup", {
|
|
309
310
|
value: void 0,
|
|
310
311
|
onValueChange: /* @__PURE__ */ O(() => {}, "onValueChange")
|
|
311
312
|
}), Pe = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
312
|
-
let { value: n, onValueChange: r, ...i } = e, a =
|
|
313
|
+
let { value: n, onValueChange: r, ...i } = e, a = _(r);
|
|
313
314
|
return /* @__PURE__ */ T(Me, {
|
|
314
315
|
scope: e.__scopeMenu,
|
|
315
316
|
value: n,
|
|
@@ -330,57 +331,57 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
330
331
|
...r,
|
|
331
332
|
ref: t,
|
|
332
333
|
"data-state": q(a),
|
|
333
|
-
onSelect:
|
|
334
|
+
onSelect: o(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
|
|
334
335
|
})
|
|
335
336
|
});
|
|
336
337
|
}, "MenuRadioItem")), Le = "MenuItemIndicator", [Re, ze] = P(Le, { checked: !1 }), Be = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
337
|
-
let { __scopeMenu: n, forceMount: r, ...i } = e,
|
|
338
|
-
return /* @__PURE__ */ T(
|
|
339
|
-
present: r || K(
|
|
340
|
-
children: /* @__PURE__ */ T(
|
|
338
|
+
let { __scopeMenu: n, forceMount: r, ...i } = e, o = ze(Le, n);
|
|
339
|
+
return /* @__PURE__ */ T(g, {
|
|
340
|
+
present: r || K(o.checked) || o.checked === !0,
|
|
341
|
+
children: /* @__PURE__ */ T(a.span, {
|
|
341
342
|
...i,
|
|
342
343
|
ref: t,
|
|
343
|
-
"data-state": q(
|
|
344
|
+
"data-state": q(o.checked)
|
|
344
345
|
})
|
|
345
346
|
});
|
|
346
347
|
}, "MenuItemIndicator")), Ve = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
347
348
|
let { __scopeMenu: n, ...r } = e;
|
|
348
|
-
return /* @__PURE__ */ T(
|
|
349
|
+
return /* @__PURE__ */ T(a.div, {
|
|
349
350
|
role: "separator",
|
|
350
351
|
"aria-orientation": "horizontal",
|
|
351
352
|
...r,
|
|
352
353
|
ref: t
|
|
353
354
|
});
|
|
354
355
|
}, "MenuSeparator")), He = "MenuSub", [Ue, We] = P(He), Ge = /* @__PURE__ */ O((e) => {
|
|
355
|
-
let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = L(He, t), o = I(t), [s,
|
|
356
|
-
return C.useEffect(() => (a.open === !1 &&
|
|
356
|
+
let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = L(He, t), o = I(t), [s, c] = C.useState(null), [l, d] = C.useState(null), f = _(i);
|
|
357
|
+
return C.useEffect(() => (a.open === !1 && f(!1), () => f(!1)), [a.open, f]), /* @__PURE__ */ T(u, {
|
|
357
358
|
...o,
|
|
358
359
|
children: /* @__PURE__ */ T(me, {
|
|
359
360
|
scope: t,
|
|
360
361
|
open: r,
|
|
361
|
-
onOpenChange:
|
|
362
|
-
content:
|
|
363
|
-
onContentChange:
|
|
362
|
+
onOpenChange: f,
|
|
363
|
+
content: l,
|
|
364
|
+
onContentChange: d,
|
|
364
365
|
children: /* @__PURE__ */ T(Ue, {
|
|
365
366
|
scope: t,
|
|
366
|
-
contentId:
|
|
367
|
-
triggerId:
|
|
367
|
+
contentId: v(),
|
|
368
|
+
triggerId: v(),
|
|
368
369
|
trigger: s,
|
|
369
|
-
onTriggerChange:
|
|
370
|
+
onTriggerChange: c,
|
|
370
371
|
children: n
|
|
371
372
|
})
|
|
372
373
|
})
|
|
373
374
|
});
|
|
374
375
|
}, "MenuSub"), W = "MenuSubTrigger", Ke = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
375
|
-
let r = L(W, e.__scopeMenu), i = R(W, e.__scopeMenu), a = We(W, e.__scopeMenu),
|
|
376
|
-
|
|
376
|
+
let r = L(W, e.__scopeMenu), i = R(W, e.__scopeMenu), a = We(W, e.__scopeMenu), s = B(W, e.__scopeMenu), c = C.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, d = { __scopeMenu: e.__scopeMenu }, f = C.useCallback(() => {
|
|
377
|
+
c.current && window.clearTimeout(c.current), c.current = null;
|
|
377
378
|
}, []);
|
|
378
379
|
C.useEffect(() => f, [f]), C.useEffect(() => {
|
|
379
|
-
let e =
|
|
380
|
+
let e = l.current;
|
|
380
381
|
return () => {
|
|
381
|
-
window.clearTimeout(e),
|
|
382
|
+
window.clearTimeout(e), u(null);
|
|
382
383
|
};
|
|
383
|
-
}, [
|
|
384
|
+
}, [l, u]);
|
|
384
385
|
let p = n(t, a.onTriggerChange);
|
|
385
386
|
return /* @__PURE__ */ T(_e, {
|
|
386
387
|
asChild: !0,
|
|
@@ -396,82 +397,82 @@ var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
|
396
397
|
onClick: (t) => {
|
|
397
398
|
e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), r.open || r.onOpenChange(!0));
|
|
398
399
|
},
|
|
399
|
-
onPointerMove:
|
|
400
|
-
|
|
400
|
+
onPointerMove: o(e.onPointerMove, J((t) => {
|
|
401
|
+
s.onItemEnter(t), !t.defaultPrevented && !e.disabled && !r.open && !c.current && (s.onPointerGraceIntentChange(null), c.current = window.setTimeout(() => {
|
|
401
402
|
r.onOpenChange(!0), f();
|
|
402
403
|
}, 100));
|
|
403
404
|
})),
|
|
404
|
-
onPointerLeave:
|
|
405
|
+
onPointerLeave: o(e.onPointerLeave, J((e) => {
|
|
405
406
|
f();
|
|
406
407
|
let t = r.content?.getBoundingClientRect();
|
|
407
408
|
if (t) {
|
|
408
|
-
let n = r.content?.dataset.side, i = n === "right", a = i ? -5 : 5,
|
|
409
|
-
|
|
409
|
+
let n = r.content?.dataset.side, i = n === "right", a = i ? -5 : 5, o = t[i ? "left" : "right"], c = t[i ? "right" : "left"];
|
|
410
|
+
s.onPointerGraceIntentChange({
|
|
410
411
|
area: [
|
|
411
412
|
{
|
|
412
413
|
x: e.clientX + a,
|
|
413
414
|
y: e.clientY
|
|
414
415
|
},
|
|
415
416
|
{
|
|
416
|
-
x:
|
|
417
|
+
x: o,
|
|
417
418
|
y: t.top
|
|
418
419
|
},
|
|
419
420
|
{
|
|
420
|
-
x:
|
|
421
|
+
x: c,
|
|
421
422
|
y: t.top
|
|
422
423
|
},
|
|
423
424
|
{
|
|
424
|
-
x:
|
|
425
|
+
x: c,
|
|
425
426
|
y: t.bottom
|
|
426
427
|
},
|
|
427
428
|
{
|
|
428
|
-
x:
|
|
429
|
+
x: o,
|
|
429
430
|
y: t.bottom
|
|
430
431
|
}
|
|
431
432
|
],
|
|
432
433
|
side: n
|
|
433
|
-
}), window.clearTimeout(
|
|
434
|
+
}), window.clearTimeout(l.current), l.current = window.setTimeout(() => s.onPointerGraceIntentChange(null), 300);
|
|
434
435
|
} else {
|
|
435
|
-
if (
|
|
436
|
-
|
|
436
|
+
if (s.onTriggerLeave(e), e.defaultPrevented) return;
|
|
437
|
+
s.onPointerGraceIntentChange(null);
|
|
437
438
|
}
|
|
438
439
|
})),
|
|
439
|
-
onKeyDown:
|
|
440
|
-
e.disabled || t.target !== t.currentTarget ||
|
|
440
|
+
onKeyDown: o(e.onKeyDown, (t) => {
|
|
441
|
+
e.disabled || t.target !== t.currentTarget || s.searchRef.current !== "" && t.key === " " || A[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
|
|
441
442
|
})
|
|
442
443
|
})
|
|
443
444
|
});
|
|
444
445
|
}, "MenuSubTrigger")), qe = "MenuSubContent", Je = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ O(function(e, t) {
|
|
445
|
-
let r = be(z, e.__scopeMenu), { forceMount: i = r.forceMount, align: a = "start", ...s } = e, c = L(z, e.__scopeMenu), l = R(z, e.__scopeMenu),
|
|
446
|
+
let r = be(z, e.__scopeMenu), { forceMount: i = r.forceMount, align: a = "start", ...s } = e, c = L(z, e.__scopeMenu), l = R(z, e.__scopeMenu), u = We(qe, e.__scopeMenu), d = C.useRef(null), f = n(t, d);
|
|
446
447
|
return /* @__PURE__ */ T(N.Provider, {
|
|
447
448
|
scope: e.__scopeMenu,
|
|
448
|
-
children: /* @__PURE__ */ T(
|
|
449
|
+
children: /* @__PURE__ */ T(g, {
|
|
449
450
|
present: i || c.open,
|
|
450
451
|
children: /* @__PURE__ */ T(N.Slot, {
|
|
451
452
|
scope: e.__scopeMenu,
|
|
452
453
|
children: /* @__PURE__ */ T(V, {
|
|
453
|
-
id:
|
|
454
|
-
"aria-labelledby":
|
|
454
|
+
id: u.contentId,
|
|
455
|
+
"aria-labelledby": u.triggerId,
|
|
455
456
|
...s,
|
|
456
|
-
ref:
|
|
457
|
+
ref: f,
|
|
457
458
|
align: a,
|
|
458
459
|
side: l.dir === "rtl" ? "left" : "right",
|
|
459
460
|
disableOutsidePointerEvents: !1,
|
|
460
461
|
disableOutsideScroll: !1,
|
|
461
462
|
trapFocus: !1,
|
|
462
463
|
onOpenAutoFocus: (e) => {
|
|
463
|
-
l.isUsingKeyboardRef.current &&
|
|
464
|
+
l.isUsingKeyboardRef.current && d.current?.focus(), e.preventDefault();
|
|
464
465
|
},
|
|
465
466
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
466
|
-
onFocusOutside:
|
|
467
|
-
e.target !==
|
|
467
|
+
onFocusOutside: o(e.onFocusOutside, (e) => {
|
|
468
|
+
e.target !== u.trigger && c.onOpenChange(!1);
|
|
468
469
|
}),
|
|
469
|
-
onEscapeKeyDown:
|
|
470
|
+
onEscapeKeyDown: o(e.onEscapeKeyDown, (e) => {
|
|
470
471
|
l.onClose(), e.preventDefault();
|
|
471
472
|
}),
|
|
472
|
-
onKeyDown:
|
|
473
|
+
onKeyDown: o(e.onKeyDown, (e) => {
|
|
473
474
|
let t = e.currentTarget.contains(e.target), n = j[l.dir].includes(e.key);
|
|
474
|
-
t && n && (c.onOpenChange(!1),
|
|
475
|
+
t && n && (c.onOpenChange(!1), u.trigger?.focus(), e.preventDefault());
|
|
475
476
|
})
|
|
476
477
|
})
|
|
477
478
|
})
|
|
@@ -529,52 +530,52 @@ O(J, "whenMouse");
|
|
|
529
530
|
var et = ge, tt = _e, nt = xe, rt = Ce, it = De, at = Oe, ot = U, st = je, ct = Pe, lt = Ie, ut = Be, dt = Ve, ft = Ge, pt = Ke, mt = Je, ht = Object.defineProperty, Y = (e, t) => ht(e, "name", {
|
|
530
531
|
value: t,
|
|
531
532
|
configurable: !0
|
|
532
|
-
}), X = "DropdownMenu", [gt, _t] =
|
|
533
|
-
let { __scopeDropdownMenu: t, children: n, dir: r, open:
|
|
534
|
-
prop:
|
|
535
|
-
defaultProp:
|
|
536
|
-
onChange:
|
|
533
|
+
}), X = "DropdownMenu", [gt, _t] = h(X, [F]), Z = F(), [vt, yt] = gt(X), bt = /* @__PURE__ */ Y((e) => {
|
|
534
|
+
let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: c = !0 } = e, l = Z(t), u = C.useRef(null), [d, f] = s({
|
|
535
|
+
prop: i,
|
|
536
|
+
defaultProp: a ?? !1,
|
|
537
|
+
onChange: o,
|
|
537
538
|
caller: X
|
|
538
539
|
});
|
|
539
540
|
return /* @__PURE__ */ T(vt, {
|
|
540
541
|
scope: t,
|
|
541
|
-
triggerId:
|
|
542
|
-
triggerRef:
|
|
543
|
-
contentId:
|
|
544
|
-
open:
|
|
545
|
-
onOpenChange:
|
|
546
|
-
onOpenToggle: C.useCallback(() =>
|
|
542
|
+
triggerId: v(),
|
|
543
|
+
triggerRef: u,
|
|
544
|
+
contentId: v(),
|
|
545
|
+
open: d,
|
|
546
|
+
onOpenChange: f,
|
|
547
|
+
onOpenToggle: C.useCallback(() => f((e) => !e), [f]),
|
|
547
548
|
modal: c,
|
|
548
549
|
children: /* @__PURE__ */ T(et, {
|
|
549
|
-
...
|
|
550
|
-
open:
|
|
551
|
-
onOpenChange:
|
|
550
|
+
...l,
|
|
551
|
+
open: d,
|
|
552
|
+
onOpenChange: f,
|
|
552
553
|
dir: r,
|
|
553
554
|
modal: c,
|
|
554
555
|
children: n
|
|
555
556
|
})
|
|
556
557
|
});
|
|
557
558
|
}, "DropdownMenu"), xt = "DropdownMenuTrigger", St = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
558
|
-
let { __scopeDropdownMenu: r, disabled: i = !1, ...
|
|
559
|
+
let { __scopeDropdownMenu: r, disabled: i = !1, ...s } = e, c = yt(xt, r), l = Z(r), u = n(t, c.triggerRef);
|
|
559
560
|
return /* @__PURE__ */ T(tt, {
|
|
560
561
|
asChild: !0,
|
|
561
|
-
...
|
|
562
|
-
children: /* @__PURE__ */ T(
|
|
562
|
+
...l,
|
|
563
|
+
children: /* @__PURE__ */ T(a.button, {
|
|
563
564
|
type: "button",
|
|
564
|
-
id:
|
|
565
|
+
id: c.triggerId,
|
|
565
566
|
"aria-haspopup": "menu",
|
|
566
|
-
"aria-expanded":
|
|
567
|
-
"aria-controls":
|
|
568
|
-
"data-state":
|
|
567
|
+
"aria-expanded": c.open,
|
|
568
|
+
"aria-controls": c.open ? c.contentId : void 0,
|
|
569
|
+
"data-state": c.open ? "open" : "closed",
|
|
569
570
|
"data-disabled": i ? "" : void 0,
|
|
570
571
|
disabled: i,
|
|
571
|
-
...
|
|
572
|
-
ref:
|
|
573
|
-
onPointerDown:
|
|
574
|
-
!i && e.button === 0 && e.ctrlKey === !1 && (
|
|
572
|
+
...s,
|
|
573
|
+
ref: u,
|
|
574
|
+
onPointerDown: o(e.onPointerDown, (e) => {
|
|
575
|
+
!i && e.button === 0 && e.ctrlKey === !1 && (c.onOpenToggle(), c.open || e.preventDefault());
|
|
575
576
|
}),
|
|
576
|
-
onKeyDown:
|
|
577
|
-
i || (["Enter", " "].includes(e.key) &&
|
|
577
|
+
onKeyDown: o(e.onKeyDown, (e) => {
|
|
578
|
+
i || (["Enter", " "].includes(e.key) && c.onOpenToggle(), e.key === "ArrowDown" && c.onOpenChange(!0), [
|
|
578
579
|
"Enter",
|
|
579
580
|
" ",
|
|
580
581
|
"ArrowDown"
|
|
@@ -589,19 +590,19 @@ var et = ge, tt = _e, nt = xe, rt = Ce, it = De, at = Oe, ot = U, st = je, ct =
|
|
|
589
590
|
...n
|
|
590
591
|
});
|
|
591
592
|
}, "DropdownMenuPortal"), wt = "DropdownMenuContent", Tt = /* @__PURE__ */ C.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
592
|
-
let { __scopeDropdownMenu: n, ...r } = e, i = yt(wt, n), a = Z(n),
|
|
593
|
+
let { __scopeDropdownMenu: n, ...r } = e, i = yt(wt, n), a = Z(n), s = C.useRef(!1);
|
|
593
594
|
return /* @__PURE__ */ T(rt, {
|
|
594
595
|
id: i.contentId,
|
|
595
596
|
"aria-labelledby": i.triggerId,
|
|
596
597
|
...a,
|
|
597
598
|
...r,
|
|
598
599
|
ref: t,
|
|
599
|
-
onCloseAutoFocus:
|
|
600
|
-
|
|
600
|
+
onCloseAutoFocus: o(e.onCloseAutoFocus, (e) => {
|
|
601
|
+
s.current || i.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
|
|
601
602
|
}),
|
|
602
|
-
onInteractOutside:
|
|
603
|
+
onInteractOutside: o(e.onInteractOutside, (e) => {
|
|
603
604
|
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
604
|
-
(!i.modal || r) && (
|
|
605
|
+
(!i.modal || r) && (s.current = !0);
|
|
605
606
|
}),
|
|
606
607
|
style: {
|
|
607
608
|
...e.style,
|
|
@@ -669,14 +670,14 @@ var et = ge, tt = _e, nt = xe, rt = Ce, it = De, at = Oe, ot = U, st = je, ct =
|
|
|
669
670
|
ref: t
|
|
670
671
|
});
|
|
671
672
|
}, "DropdownMenuSeparator")), Pt = /* @__PURE__ */ Y((e) => {
|
|
672
|
-
let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange:
|
|
673
|
+
let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = Z(t), [c, l] = s({
|
|
673
674
|
prop: r,
|
|
674
|
-
defaultProp:
|
|
675
|
-
onChange:
|
|
675
|
+
defaultProp: a ?? !1,
|
|
676
|
+
onChange: i,
|
|
676
677
|
caller: "DropdownMenuSub"
|
|
677
678
|
});
|
|
678
679
|
return /* @__PURE__ */ T(ft, {
|
|
679
|
-
...
|
|
680
|
+
...o,
|
|
680
681
|
open: c,
|
|
681
682
|
onOpenChange: l,
|
|
682
683
|
children: n
|
|
@@ -717,7 +718,7 @@ function Qt(e) {
|
|
|
717
718
|
}
|
|
718
719
|
var $t = "data-[loading]:cursor-progress data-[loading]:opacity-70 data-[loading]:[&>svg]:hidden";
|
|
719
720
|
function en({ className: t }) {
|
|
720
|
-
return /* @__PURE__ */ T(
|
|
721
|
+
return /* @__PURE__ */ T(p, {
|
|
721
722
|
"aria-hidden": "true",
|
|
722
723
|
color: "default",
|
|
723
724
|
className: e("size-4", t)
|
|
@@ -836,7 +837,7 @@ function hn({ className: t, children: n, mark: r = "start", ...i }) {
|
|
|
836
837
|
//#endregion
|
|
837
838
|
//#region lib/components/ui/overlays/dropdown-menu/dropdown-menu.tsx
|
|
838
839
|
function gn(e) {
|
|
839
|
-
return /* @__PURE__ */ T(
|
|
840
|
+
return /* @__PURE__ */ T(ae, {
|
|
840
841
|
value: e.modal ?? !1,
|
|
841
842
|
children: /* @__PURE__ */ T(Lt, {
|
|
842
843
|
"data-slot": "dropdown-menu",
|
|
@@ -860,12 +861,12 @@ function vn({ className: t, ...n }) {
|
|
|
860
861
|
});
|
|
861
862
|
}
|
|
862
863
|
function yn({ className: t, sideOffset: n = 4, container: r, ref: i, ...a }) {
|
|
863
|
-
return /* @__PURE__ */ T(
|
|
864
|
+
return /* @__PURE__ */ T(se, {
|
|
864
865
|
value: !1,
|
|
865
866
|
children: /* @__PURE__ */ T(zt, {
|
|
866
867
|
container: r,
|
|
867
868
|
children: /* @__PURE__ */ T(Bt, {
|
|
868
|
-
ref:
|
|
869
|
+
ref: ne(!1, i),
|
|
869
870
|
"data-slot": "dropdown-menu-content",
|
|
870
871
|
sideOffset: n,
|
|
871
872
|
className: e("grid bg-popover min-w-2xs text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded border p-1 shadow gap-0.5", t),
|