@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,227 +1,66 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { o as t,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
2
|
+
import { o as t, t as n } from "./dist-DVRQkaTK.js";
|
|
3
|
+
import { i as r, r as i } from "./dist-DWZXlCZR.js";
|
|
4
|
+
import { n as a } from "./spinner-C1QIewWv.js";
|
|
5
|
+
import { a as o } from "./dist-DHdUUM1w.js";
|
|
6
|
+
import { i as s, n as c, r as l, t as u } from "./dist-DOK3zo5C.js";
|
|
7
|
+
import { t as d } from "./in-dialog-D61Yeaol.js";
|
|
8
|
+
import { A as f, M as p, N as m, b as h, d as g, f as _, i as v, j as y, l as b, n as x, o as S, r as C, t as w, u as T, y as ee } from "./dropdown-menu-xlZ6NYUA.js";
|
|
9
|
+
import { a as te, n as ne } from "./popover-Cd7DkND4.js";
|
|
10
|
+
import { i as re, n as ie, r as ae, t as oe } from "./dist-BZe2evxL.js";
|
|
11
|
+
import { t as se } from "./warn-once-C_e47JM8.js";
|
|
12
|
+
import { t as ce } from "./use-material-translation-CD6QoVal.js";
|
|
12
13
|
import * as E from "react";
|
|
13
|
-
import { createContext as D, useCallback as
|
|
14
|
+
import { createContext as D, useCallback as le, useContext as O, useEffect as k, useId as ue, useLayoutEffect as A, useMemo as j, useReducer as de, useRef as M, useState as N } from "react";
|
|
14
15
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var Me = Object.defineProperty, L = (e, t) => Me(e, "name", {
|
|
16
|
+
import { ChevronLeft as fe, ChevronRightIcon as pe, MoreVertical as me } from "lucide-react";
|
|
17
|
+
//#region ../../node_modules/@radix-ui/react-toolbar/dist/index.mjs
|
|
18
|
+
var he = Object.defineProperty, L = (e, t) => he(e, "name", {
|
|
19
19
|
value: t,
|
|
20
20
|
configurable: !0
|
|
21
|
-
}),
|
|
22
|
-
let {
|
|
23
|
-
|
|
24
|
-
defaultProp: a ?? !1,
|
|
25
|
-
onChange: o,
|
|
26
|
-
caller: Ne
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ F(h, {
|
|
29
|
-
...l,
|
|
30
|
-
children: /* @__PURE__ */ F(Ie, {
|
|
31
|
-
scope: t,
|
|
32
|
-
contentId: c(),
|
|
33
|
-
triggerRef: u,
|
|
34
|
-
open: p,
|
|
35
|
-
onOpenChange: m,
|
|
36
|
-
onOpenToggle: E.useCallback(() => m((e) => !e), [m]),
|
|
37
|
-
hasCustomAnchor: d,
|
|
38
|
-
onCustomAnchorAdd: E.useCallback(() => f(!0), []),
|
|
39
|
-
onCustomAnchorRemove: E.useCallback(() => f(!1), []),
|
|
40
|
-
modal: s,
|
|
41
|
-
children: n
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
}, "Popover"), Re = "PopoverAnchor", ze = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
45
|
-
let { __scopePopover: n, ...r } = e, i = z(Re, n), a = R(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
46
|
-
return E.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ F(_, {
|
|
47
|
-
...a,
|
|
48
|
-
...r,
|
|
49
|
-
ref: t
|
|
50
|
-
});
|
|
51
|
-
}, "PopoverAnchor")), Be = "PopoverTrigger", Ve = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, n) {
|
|
52
|
-
let { __scopePopover: r, ...i } = e, a = z(Be, r), o = R(r), c = t(n, a.triggerRef), u = /* @__PURE__ */ F(s.button, {
|
|
53
|
-
type: "button",
|
|
54
|
-
"aria-haspopup": "dialog",
|
|
55
|
-
"aria-expanded": a.open,
|
|
56
|
-
"aria-controls": a.open ? a.contentId : void 0,
|
|
57
|
-
"data-state": V(a.open),
|
|
58
|
-
...i,
|
|
59
|
-
ref: c,
|
|
60
|
-
onClick: l(e.onClick, a.onOpenToggle)
|
|
61
|
-
});
|
|
62
|
-
return a.hasCustomAnchor ? u : /* @__PURE__ */ F(_, {
|
|
63
|
-
asChild: !0,
|
|
64
|
-
...o,
|
|
65
|
-
children: u
|
|
66
|
-
});
|
|
67
|
-
}, "PopoverTrigger")), He = "PopoverPortal", [Ue, We] = Pe(He, { forceMount: void 0 }), Ge = /* @__PURE__ */ L((e) => {
|
|
68
|
-
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = z(He, t);
|
|
69
|
-
return /* @__PURE__ */ F(Ue, {
|
|
70
|
-
scope: t,
|
|
71
|
-
forceMount: n,
|
|
72
|
-
children: /* @__PURE__ */ F(o, {
|
|
73
|
-
present: n || a.open,
|
|
74
|
-
children: /* @__PURE__ */ F(d, {
|
|
75
|
-
asChild: !0,
|
|
76
|
-
container: i,
|
|
77
|
-
children: r
|
|
78
|
-
})
|
|
79
|
-
})
|
|
80
|
-
});
|
|
81
|
-
}, "PopoverPortal"), B = "PopoverContent", Ke = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
82
|
-
let n = We(B, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = z(B, e.__scopePopover);
|
|
83
|
-
return /* @__PURE__ */ F(o, {
|
|
84
|
-
present: r || a.open,
|
|
85
|
-
children: a.modal ? /* @__PURE__ */ F(Je, {
|
|
86
|
-
...i,
|
|
87
|
-
ref: t
|
|
88
|
-
}) : /* @__PURE__ */ F(Ye, {
|
|
89
|
-
...i,
|
|
90
|
-
ref: t
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
|
-
}, "PopoverContent")), qe = n("PopoverContent.RemoveScroll"), Je = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, n) {
|
|
94
|
-
let r = z(B, e.__scopePopover), i = E.useRef(null), a = t(n, i), o = E.useRef(!1);
|
|
95
|
-
return E.useEffect(() => {
|
|
96
|
-
let e = i.current;
|
|
97
|
-
if (e) return T(e);
|
|
98
|
-
}, []), /* @__PURE__ */ F(te, {
|
|
99
|
-
as: qe,
|
|
100
|
-
allowPinchZoom: !0,
|
|
101
|
-
children: /* @__PURE__ */ F(Xe, {
|
|
102
|
-
...e,
|
|
103
|
-
ref: a,
|
|
104
|
-
trapFocus: r.open,
|
|
105
|
-
disableOutsidePointerEvents: !0,
|
|
106
|
-
onCloseAutoFocus: l(e.onCloseAutoFocus, (e) => {
|
|
107
|
-
e.preventDefault(), o.current || r.triggerRef.current?.focus();
|
|
108
|
-
}),
|
|
109
|
-
onPointerDownOutside: l(e.onPointerDownOutside, (e) => {
|
|
110
|
-
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
111
|
-
o.current = r;
|
|
112
|
-
}, { checkForDefaultPrevented: !1 }),
|
|
113
|
-
onFocusOutside: l(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
|
-
}, "PopoverContentModal")), Ye = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
117
|
-
let n = z(B, e.__scopePopover), r = E.useRef(!1), i = E.useRef(!1);
|
|
118
|
-
return /* @__PURE__ */ F(Xe, {
|
|
119
|
-
...e,
|
|
120
|
-
ref: t,
|
|
121
|
-
trapFocus: !1,
|
|
122
|
-
disableOutsidePointerEvents: !1,
|
|
123
|
-
onCloseAutoFocus: (t) => {
|
|
124
|
-
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
|
|
125
|
-
},
|
|
126
|
-
onInteractOutside: (t) => {
|
|
127
|
-
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
|
|
128
|
-
let a = t.target;
|
|
129
|
-
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}, "PopoverContentNonModal")), Xe = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
133
|
-
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, disableOutsidePointerEvents: o, onEscapeKeyDown: s, onPointerDownOutside: c, onFocusOutside: l, onInteractOutside: d, ...f } = e, m = z(B, n), h = R(n);
|
|
134
|
-
return C(), /* @__PURE__ */ F(w, {
|
|
135
|
-
asChild: !0,
|
|
136
|
-
loop: !0,
|
|
137
|
-
trapped: r,
|
|
138
|
-
onMountAutoFocus: i,
|
|
139
|
-
onUnmountAutoFocus: a,
|
|
140
|
-
children: /* @__PURE__ */ F(u, {
|
|
141
|
-
asChild: !0,
|
|
142
|
-
disableOutsidePointerEvents: o,
|
|
143
|
-
onInteractOutside: d,
|
|
144
|
-
onEscapeKeyDown: s,
|
|
145
|
-
onPointerDownOutside: c,
|
|
146
|
-
onFocusOutside: l,
|
|
147
|
-
onDismiss: () => m.onOpenChange(!1),
|
|
148
|
-
deferPointerDownOutside: !0,
|
|
149
|
-
children: /* @__PURE__ */ F(p, {
|
|
150
|
-
"data-state": V(m.open),
|
|
151
|
-
role: "dialog",
|
|
152
|
-
id: m.contentId,
|
|
153
|
-
...h,
|
|
154
|
-
...f,
|
|
155
|
-
ref: t,
|
|
156
|
-
style: {
|
|
157
|
-
...f.style,
|
|
158
|
-
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
159
|
-
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
160
|
-
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
161
|
-
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
162
|
-
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
163
|
-
}
|
|
164
|
-
})
|
|
165
|
-
})
|
|
166
|
-
});
|
|
167
|
-
}, "PopoverContentImpl")), Ze = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
168
|
-
let { __scopePopover: n, ...r } = e;
|
|
169
|
-
return /* @__PURE__ */ F(f, {
|
|
170
|
-
...R(n),
|
|
171
|
-
...r,
|
|
172
|
-
ref: t
|
|
173
|
-
});
|
|
174
|
-
}, "PopoverArrow"));
|
|
175
|
-
function V(e) {
|
|
176
|
-
return e ? "open" : "closed";
|
|
177
|
-
}
|
|
178
|
-
L(V, "getState");
|
|
179
|
-
var Qe = Le, $e = ze, et = Ve, tt = Ge, nt = Ke, rt = Ze, it = Object.defineProperty, H = (e, t) => it(e, "name", {
|
|
180
|
-
value: t,
|
|
181
|
-
configurable: !0
|
|
182
|
-
}), at = "Toolbar", [ot, st] = a(at, [b, be]), ct = b(), lt = be(), [ut, dt] = ot(at), ft = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ H(function(e, t) {
|
|
183
|
-
let { __scopeToolbar: n, orientation: r = "horizontal", dir: i, loop: a = !0, ...o } = e, c = ct(n), l = v(i);
|
|
184
|
-
return /* @__PURE__ */ F(ut, {
|
|
21
|
+
}), ge = "Toolbar", [_e, ve] = o(ge, [l, ae]), ye = l(), be = ae(), [xe, Se] = _e(ge), Ce = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
22
|
+
let { __scopeToolbar: n, orientation: i = "horizontal", dir: a, loop: o = !0, ...l } = e, u = ye(n), d = s(a);
|
|
23
|
+
return /* @__PURE__ */ F(xe, {
|
|
185
24
|
scope: n,
|
|
186
|
-
orientation:
|
|
187
|
-
dir:
|
|
188
|
-
children: /* @__PURE__ */ F(
|
|
25
|
+
orientation: i,
|
|
26
|
+
dir: d,
|
|
27
|
+
children: /* @__PURE__ */ F(c, {
|
|
189
28
|
asChild: !0,
|
|
190
|
-
...
|
|
191
|
-
orientation:
|
|
192
|
-
dir:
|
|
193
|
-
loop:
|
|
194
|
-
children: /* @__PURE__ */ F(
|
|
29
|
+
...u,
|
|
30
|
+
orientation: i,
|
|
31
|
+
dir: d,
|
|
32
|
+
loop: o,
|
|
33
|
+
children: /* @__PURE__ */ F(r.div, {
|
|
195
34
|
role: "toolbar",
|
|
196
|
-
"aria-orientation":
|
|
197
|
-
dir:
|
|
198
|
-
...
|
|
35
|
+
"aria-orientation": i,
|
|
36
|
+
dir: d,
|
|
37
|
+
...l,
|
|
199
38
|
ref: t
|
|
200
39
|
})
|
|
201
40
|
})
|
|
202
41
|
});
|
|
203
|
-
}, "Toolbar")),
|
|
42
|
+
}, "Toolbar")), we = "ToolbarSeparator", Te = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
204
43
|
let { __scopeToolbar: n, ...r } = e;
|
|
205
|
-
return /* @__PURE__ */ F(
|
|
206
|
-
orientation:
|
|
44
|
+
return /* @__PURE__ */ F(re, {
|
|
45
|
+
orientation: Se(we, n).orientation === "horizontal" ? "vertical" : "horizontal",
|
|
207
46
|
...r,
|
|
208
47
|
ref: t
|
|
209
48
|
});
|
|
210
|
-
}, "ToolbarSeparator")),
|
|
211
|
-
let { __scopeToolbar: n, ...
|
|
212
|
-
return /* @__PURE__ */ F(
|
|
49
|
+
}, "ToolbarSeparator")), Ee = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
50
|
+
let { __scopeToolbar: n, ...i } = e;
|
|
51
|
+
return /* @__PURE__ */ F(u, {
|
|
213
52
|
asChild: !0,
|
|
214
|
-
...
|
|
53
|
+
...ye(n),
|
|
215
54
|
focusable: !e.disabled,
|
|
216
|
-
children: /* @__PURE__ */ F(
|
|
55
|
+
children: /* @__PURE__ */ F(r.button, {
|
|
217
56
|
type: "button",
|
|
218
|
-
...
|
|
57
|
+
...i,
|
|
219
58
|
ref: t
|
|
220
59
|
})
|
|
221
60
|
});
|
|
222
|
-
}, "ToolbarButton")),
|
|
223
|
-
let { __scopeToolbar: n, ...r } = e, i =
|
|
224
|
-
return /* @__PURE__ */ F(
|
|
61
|
+
}, "ToolbarButton")), De = "ToolbarToggleGroup", Oe = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
62
|
+
let { __scopeToolbar: n, ...r } = e, i = Se(De, n), a = be(n);
|
|
63
|
+
return /* @__PURE__ */ F(oe, {
|
|
225
64
|
"data-orientation": i.orientation,
|
|
226
65
|
dir: i.dir,
|
|
227
66
|
...a,
|
|
@@ -229,21 +68,21 @@ var Qe = Le, $e = ze, et = Ve, tt = Ge, nt = Ke, rt = Ze, it = Object.defineProp
|
|
|
229
68
|
ref: t,
|
|
230
69
|
rovingFocus: !1
|
|
231
70
|
});
|
|
232
|
-
}, "ToolbarToggleGroup")),
|
|
233
|
-
let { __scopeToolbar: n, ...r } = e, i =
|
|
234
|
-
return /* @__PURE__ */ F(
|
|
71
|
+
}, "ToolbarToggleGroup")), ke = /* @__PURE__ */ E.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
72
|
+
let { __scopeToolbar: n, ...r } = e, i = be(n);
|
|
73
|
+
return /* @__PURE__ */ F(Ee, {
|
|
235
74
|
asChild: !0,
|
|
236
75
|
__scopeToolbar: e.__scopeToolbar,
|
|
237
|
-
children: /* @__PURE__ */ F(
|
|
76
|
+
children: /* @__PURE__ */ F(ie, {
|
|
238
77
|
...i,
|
|
239
78
|
...r,
|
|
240
79
|
ref: t
|
|
241
80
|
})
|
|
242
81
|
});
|
|
243
|
-
}, "ToolbarToggleItem")),
|
|
82
|
+
}, "ToolbarToggleItem")), Ae = Ce, je = Te, R = Ee, Me = Oe, Ne = ke;
|
|
244
83
|
//#endregion
|
|
245
84
|
//#region lib/hooks/use-page-direction.ts
|
|
246
|
-
function
|
|
85
|
+
function Pe(e) {
|
|
247
86
|
let [t, n] = N("ltr");
|
|
248
87
|
return A(() => {
|
|
249
88
|
let t = e.current;
|
|
@@ -254,25 +93,25 @@ function Ct(e) {
|
|
|
254
93
|
}
|
|
255
94
|
//#endregion
|
|
256
95
|
//#region lib/components/ui/overlays/dropdown-menu/dropdown-menu-sub.tsx
|
|
257
|
-
function
|
|
258
|
-
return /* @__PURE__ */ F(
|
|
96
|
+
function Fe({ ...e }) {
|
|
97
|
+
return /* @__PURE__ */ F(f, {
|
|
259
98
|
"data-slot": "dropdown-menu-sub",
|
|
260
99
|
...e
|
|
261
100
|
});
|
|
262
101
|
}
|
|
263
|
-
function
|
|
264
|
-
return /* @__PURE__ */ I(
|
|
102
|
+
function Ie({ className: t, inset: n, children: r, ...i }) {
|
|
103
|
+
return /* @__PURE__ */ I(p, {
|
|
265
104
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
266
105
|
"data-inset": n,
|
|
267
|
-
className: e(
|
|
106
|
+
className: e(ee, h, "data-[state=open]:bg-primary/8 flex cursor-default items-center rounded-(--nxgt-item-radius) px-2 py-1.5 text-sm outline-none select-none data-[inset]:ps-8", t),
|
|
268
107
|
...i,
|
|
269
|
-
children: [r, /* @__PURE__ */ F(
|
|
108
|
+
children: [r, /* @__PURE__ */ F(pe, { className: "ms-auto size-4" })]
|
|
270
109
|
});
|
|
271
110
|
}
|
|
272
|
-
function
|
|
273
|
-
return /* @__PURE__ */ F(
|
|
111
|
+
function Le({ className: t, ...n }) {
|
|
112
|
+
return /* @__PURE__ */ F(d, {
|
|
274
113
|
value: !1,
|
|
275
|
-
children: /* @__PURE__ */ F(
|
|
114
|
+
children: /* @__PURE__ */ F(y, {
|
|
276
115
|
"data-slot": "dropdown-menu-sub-content",
|
|
277
116
|
className: e("bg-popover 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 grid gap-0.5 min-w-[12rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded border p-3 shadow-lg", t),
|
|
278
117
|
...n
|
|
@@ -281,7 +120,7 @@ function Et({ className: t, ...n }) {
|
|
|
281
120
|
}
|
|
282
121
|
//#endregion
|
|
283
122
|
//#region lib/components/ui/actions/toolbar/toolbar-context.ts
|
|
284
|
-
var
|
|
123
|
+
var z = D({
|
|
285
124
|
inside: !1,
|
|
286
125
|
spilled: /* @__PURE__ */ new Set(),
|
|
287
126
|
entries: /* @__PURE__ */ new Map(),
|
|
@@ -290,9 +129,9 @@ var W = D({
|
|
|
290
129
|
overflowing: !1,
|
|
291
130
|
moreAnchor: { current: null },
|
|
292
131
|
focusLost: { current: null }
|
|
293
|
-
}),
|
|
294
|
-
function
|
|
295
|
-
let n =
|
|
132
|
+
}), B = D(null), Re = D(null);
|
|
133
|
+
function V(e, t) {
|
|
134
|
+
let n = ue(), { inside: r, spilled: i, entries: a } = O(z), o = O(B);
|
|
296
135
|
A(() => {
|
|
297
136
|
r && a.set(n, e);
|
|
298
137
|
}), A(() => () => void a.delete(n), [a, n]);
|
|
@@ -310,19 +149,19 @@ function K(e, t) {
|
|
|
310
149
|
} : {}
|
|
311
150
|
};
|
|
312
151
|
}
|
|
313
|
-
function
|
|
314
|
-
let { spilled: e, overflowing: t } = O(
|
|
152
|
+
function ze() {
|
|
153
|
+
let { spilled: e, overflowing: t } = O(z);
|
|
315
154
|
return {
|
|
316
155
|
spilled: e,
|
|
317
156
|
overflowing: t
|
|
318
157
|
};
|
|
319
158
|
}
|
|
320
|
-
function
|
|
321
|
-
return O(
|
|
159
|
+
function Be() {
|
|
160
|
+
return O(z).moreAnchor;
|
|
322
161
|
}
|
|
323
162
|
//#endregion
|
|
324
163
|
//#region lib/components/ui/actions/toolbar/toolbar-more-tracking.ts
|
|
325
|
-
function
|
|
164
|
+
function H(e, t) {
|
|
326
165
|
let n = e.current;
|
|
327
166
|
if (!n || !(t instanceof Element)) return !1;
|
|
328
167
|
let r = t.closest("[role=\"menu\"]");
|
|
@@ -333,11 +172,11 @@ function q(e, t) {
|
|
|
333
172
|
}
|
|
334
173
|
return !1;
|
|
335
174
|
}
|
|
336
|
-
function
|
|
175
|
+
function Ve(e, t, n) {
|
|
337
176
|
let r = null, i = !1, a = (e) => {
|
|
338
177
|
let a = e.target;
|
|
339
178
|
if (a instanceof HTMLElement) {
|
|
340
|
-
if (
|
|
179
|
+
if (H(n, a)) {
|
|
341
180
|
r && (i = !0);
|
|
342
181
|
return;
|
|
343
182
|
}
|
|
@@ -349,23 +188,23 @@ function At(e, t, n) {
|
|
|
349
188
|
stop: () => e.removeEventListener("focusin", a)
|
|
350
189
|
};
|
|
351
190
|
}
|
|
352
|
-
function
|
|
191
|
+
function He(e, t, n) {
|
|
353
192
|
let r = "menu.itemSelect", i = (e) => {
|
|
354
|
-
|
|
193
|
+
H(t, e.target) && n.before();
|
|
355
194
|
}, a = (e) => {
|
|
356
|
-
|
|
195
|
+
H(t, e.target) && n.after(e.defaultPrevented);
|
|
357
196
|
}, o = (e) => {
|
|
358
|
-
n.closing() &&
|
|
197
|
+
n.closing() && H(t, e.target) && e.preventDefault();
|
|
359
198
|
};
|
|
360
199
|
return e.addEventListener(r, i, !0), e.addEventListener(r, a), e.addEventListener("pointerout", o, !0), e.addEventListener("pointermove", o, !0), () => {
|
|
361
200
|
e.removeEventListener(r, i, !0), e.removeEventListener(r, a), e.removeEventListener("pointerout", o, !0), e.removeEventListener("pointermove", o, !0);
|
|
362
201
|
};
|
|
363
202
|
}
|
|
364
|
-
var
|
|
203
|
+
var Ue = D({
|
|
365
204
|
onPointerLeave: () => {},
|
|
366
205
|
onPointerMove: () => {}
|
|
367
|
-
}),
|
|
368
|
-
function
|
|
206
|
+
}), U = () => O(Ue);
|
|
207
|
+
function We(e) {
|
|
369
208
|
let t = (t) => {
|
|
370
209
|
e() && t.preventDefault();
|
|
371
210
|
};
|
|
@@ -374,8 +213,8 @@ function Nt(e) {
|
|
|
374
213
|
onPointerMove: t
|
|
375
214
|
};
|
|
376
215
|
}
|
|
377
|
-
function
|
|
378
|
-
let t = M(!1), n = M(null), r = M(null), i = M(
|
|
216
|
+
function Ge(e) {
|
|
217
|
+
let t = M(!1), n = M(null), r = M(null), i = M(We(() => t.current)).current, a = () => {
|
|
379
218
|
n.current?.stop(), n.current = null;
|
|
380
219
|
}, o = () => {
|
|
381
220
|
a(), r.current?.(), r.current = null;
|
|
@@ -384,7 +223,7 @@ function Pt(e) {
|
|
|
384
223
|
n.current?.stop(), r.current?.();
|
|
385
224
|
}, []);
|
|
386
225
|
let s = (t) => {
|
|
387
|
-
n.current ||=
|
|
226
|
+
n.current ||= Ve(t?.ownerDocument ?? document, t, e);
|
|
388
227
|
};
|
|
389
228
|
return {
|
|
390
229
|
guard: i,
|
|
@@ -392,7 +231,7 @@ function Pt(e) {
|
|
|
392
231
|
t.current = !0, s(e);
|
|
393
232
|
},
|
|
394
233
|
reset(n) {
|
|
395
|
-
t.current = !1, o(), r.current =
|
|
234
|
+
t.current = !1, o(), r.current = He(n?.ownerDocument ?? document, e, {
|
|
396
235
|
closing: () => t.current,
|
|
397
236
|
before: () => s(n),
|
|
398
237
|
after(e) {
|
|
@@ -411,15 +250,15 @@ function Pt(e) {
|
|
|
411
250
|
}
|
|
412
251
|
//#endregion
|
|
413
252
|
//#region lib/components/ui/actions/toolbar/toolbar-more-drill.tsx
|
|
414
|
-
var
|
|
415
|
-
function
|
|
253
|
+
var Ke = D(null), qe = 8;
|
|
254
|
+
function Je(e) {
|
|
416
255
|
let t = e.closest("[role=\"menu\"]"), n = e.ownerDocument.defaultView;
|
|
417
256
|
if (!t || !n) return !0;
|
|
418
257
|
let r = Number.parseFloat(n.getComputedStyle(e.ownerDocument.documentElement).fontSize) || 16, i = t.getBoundingClientRect();
|
|
419
|
-
return Math.max(i.left, n.innerWidth - i.right) >= Math.max(12 * r, i.width) +
|
|
258
|
+
return Math.max(i.left, n.innerWidth - i.right) >= Math.max(12 * r, i.width) + qe;
|
|
420
259
|
}
|
|
421
|
-
var
|
|
422
|
-
function
|
|
260
|
+
var Ye = (e) => e.querySelector("[role^=\"menuitem\"]:not([data-more-back]):not([data-disabled]):not([aria-disabled=\"true\"])");
|
|
261
|
+
function Xe(e) {
|
|
423
262
|
let [t, n] = N([]), r = t[t.length - 1] ?? null, i = M(null), a = M(null), o = M(-Infinity), s = () => {
|
|
424
263
|
a.current = r?.id ?? null, n(t.slice(0, -1));
|
|
425
264
|
};
|
|
@@ -427,7 +266,7 @@ function zt(e) {
|
|
|
427
266
|
let e = i.current;
|
|
428
267
|
if (!e) return;
|
|
429
268
|
let t = a.current;
|
|
430
|
-
a.current = null, (t ? e.querySelector(`[data-more-row="${CSS.escape(t)}"]`) : r ?
|
|
269
|
+
a.current = null, (t ? e.querySelector(`[data-more-row="${CSS.escape(t)}"]`) : r ? Ye(e) ?? e.querySelector("[data-more-back]") : null)?.focus({ preventScroll: !0 });
|
|
431
270
|
}, [r]);
|
|
432
271
|
let c = e === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
433
272
|
return {
|
|
@@ -452,18 +291,18 @@ function zt(e) {
|
|
|
452
291
|
}
|
|
453
292
|
};
|
|
454
293
|
}
|
|
455
|
-
function
|
|
456
|
-
let { t: n } =
|
|
294
|
+
function Ze({ drill: e, leave: t }) {
|
|
295
|
+
let { t: n } = ce(), r = n("material.toolbar.back", "Back");
|
|
457
296
|
return /* @__PURE__ */ I(P, { children: [
|
|
458
|
-
/* @__PURE__ */ I(
|
|
297
|
+
/* @__PURE__ */ I(T, {
|
|
459
298
|
"data-more-back": "",
|
|
460
|
-
...
|
|
299
|
+
...U(),
|
|
461
300
|
"aria-label": `${r} ${e.label}`,
|
|
462
301
|
onSelect: (e) => {
|
|
463
302
|
e.preventDefault(), t();
|
|
464
303
|
},
|
|
465
304
|
children: [
|
|
466
|
-
/* @__PURE__ */ F(
|
|
305
|
+
/* @__PURE__ */ F(fe, {
|
|
467
306
|
"aria-hidden": !0,
|
|
468
307
|
className: "rtl:rotate-180"
|
|
469
308
|
}),
|
|
@@ -474,28 +313,28 @@ function Bt({ drill: e, leave: t }) {
|
|
|
474
313
|
})
|
|
475
314
|
]
|
|
476
315
|
}),
|
|
477
|
-
/* @__PURE__ */ F(
|
|
316
|
+
/* @__PURE__ */ F(S, {}),
|
|
478
317
|
e.content
|
|
479
318
|
] });
|
|
480
319
|
}
|
|
481
320
|
//#endregion
|
|
482
321
|
//#region lib/components/ui/actions/toolbar/toolbar-more-sub.tsx
|
|
483
|
-
var
|
|
484
|
-
function
|
|
485
|
-
let s = O(
|
|
322
|
+
var Qe = 1e3;
|
|
323
|
+
function $e({ id: e, lead: t, label: n, value: r, inset: i, disabled: a, children: o }) {
|
|
324
|
+
let s = O(Ke), c = U(), l = (e) => !!s && !a && !Je(e.currentTarget), u = (t) => {
|
|
486
325
|
l(t) && (t.preventDefault(), s?.enter({
|
|
487
326
|
id: e,
|
|
488
327
|
label: n,
|
|
489
328
|
content: o
|
|
490
329
|
}));
|
|
491
330
|
}, d = s?.dir === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
492
|
-
return /* @__PURE__ */ I(
|
|
331
|
+
return /* @__PURE__ */ I(Fe, { children: [/* @__PURE__ */ I(Ie, {
|
|
493
332
|
"data-more-row": e,
|
|
494
333
|
inset: i,
|
|
495
334
|
disabled: a,
|
|
496
335
|
onClick: u,
|
|
497
336
|
onKeyDown: (e) => {
|
|
498
|
-
e.key === " " && performance.now() - (s?.typedAt() ?? 0) <
|
|
337
|
+
e.key === " " && performance.now() - (s?.typedAt() ?? 0) < Qe || [
|
|
499
338
|
"Enter",
|
|
500
339
|
" ",
|
|
501
340
|
d
|
|
@@ -518,46 +357,46 @@ function Ht({ id: e, lead: t, label: n, value: r, inset: i, disabled: a, childre
|
|
|
518
357
|
children: r
|
|
519
358
|
}) : null]
|
|
520
359
|
})]
|
|
521
|
-
}), /* @__PURE__ */ F(
|
|
360
|
+
}), /* @__PURE__ */ F(Le, { children: o })] });
|
|
522
361
|
}
|
|
523
362
|
//#endregion
|
|
524
363
|
//#region lib/components/ui/actions/toolbar/toolbar-more-item.tsx
|
|
525
|
-
var
|
|
364
|
+
var W = (e) => e.getAttribute("aria-pressed") === "true" || e.getAttribute("aria-checked") === "true" || e.dataset.state === "on", G = (e) => e.disabled || e.getAttribute("aria-disabled") === "true", K = (e) => ({
|
|
526
365
|
icons: e.some((e) => e.icon),
|
|
527
366
|
inset: e.some((e) => e.render.kind === "checkbox")
|
|
528
367
|
});
|
|
529
|
-
function
|
|
368
|
+
function et({ icon: e, layout: t }) {
|
|
530
369
|
return t.icons ? /* @__PURE__ */ F("span", {
|
|
531
370
|
"aria-hidden": !0,
|
|
532
371
|
className: "flex size-4 shrink-0 text-muted-foreground",
|
|
533
372
|
children: e
|
|
534
373
|
}) : null;
|
|
535
374
|
}
|
|
536
|
-
function
|
|
537
|
-
let { item: r, label: i, icon: a, render: o } = e, s = /* @__PURE__ */ F(
|
|
375
|
+
function q({ row: e, layout: t, select: n }) {
|
|
376
|
+
let { item: r, label: i, icon: a, render: o } = e, s = /* @__PURE__ */ F(et, {
|
|
538
377
|
icon: a,
|
|
539
378
|
layout: t
|
|
540
|
-
}), c = () => n(e), l =
|
|
541
|
-
if (o.kind === "checkbox") return /* @__PURE__ */ I(
|
|
542
|
-
checked: o.checked ??
|
|
543
|
-
disabled:
|
|
379
|
+
}), c = () => n(e), l = U();
|
|
380
|
+
if (o.kind === "checkbox") return /* @__PURE__ */ I(b, {
|
|
381
|
+
checked: o.checked ?? W(r),
|
|
382
|
+
disabled: G(r),
|
|
544
383
|
onSelect: c,
|
|
545
384
|
...l,
|
|
546
385
|
children: [s, i]
|
|
547
386
|
});
|
|
548
|
-
if (o.kind === "submenu") return /* @__PURE__ */ F(
|
|
387
|
+
if (o.kind === "submenu") return /* @__PURE__ */ F($e, {
|
|
549
388
|
id: e.id,
|
|
550
389
|
lead: s,
|
|
551
390
|
label: i,
|
|
552
391
|
value: o.value,
|
|
553
392
|
inset: t.inset || void 0,
|
|
554
|
-
disabled:
|
|
393
|
+
disabled: G(r),
|
|
555
394
|
children: o.content
|
|
556
395
|
});
|
|
557
396
|
let u = o.kind === "popover" || o.kind === "dialog";
|
|
558
|
-
return /* @__PURE__ */ I(
|
|
397
|
+
return /* @__PURE__ */ I(T, {
|
|
559
398
|
inset: t.inset || void 0,
|
|
560
|
-
disabled:
|
|
399
|
+
disabled: G(r),
|
|
561
400
|
"aria-haspopup": u ? "dialog" : void 0,
|
|
562
401
|
onSelect: c,
|
|
563
402
|
...l,
|
|
@@ -566,44 +405,44 @@ function Kt({ row: e, layout: t, select: n }) {
|
|
|
566
405
|
}
|
|
567
406
|
//#endregion
|
|
568
407
|
//#region lib/components/ui/actions/toolbar/toolbar-more-group.tsx
|
|
569
|
-
function
|
|
570
|
-
let i = (e) => e.toggle && !e.more, a = e.rows.find((e) => i(e) &&
|
|
571
|
-
return /* @__PURE__ */ I(
|
|
408
|
+
function tt({ row: e, name: t, title: n, select: r }) {
|
|
409
|
+
let i = (e) => e.toggle && !e.more, a = e.rows.find((e) => i(e) && W(e.item)), o = K(e.rows), s = U();
|
|
410
|
+
return /* @__PURE__ */ I(g, {
|
|
572
411
|
...t,
|
|
573
412
|
value: a?.id ?? "",
|
|
574
|
-
children: [n, e.rows.map((e) => i(e) ? /* @__PURE__ */ I(
|
|
413
|
+
children: [n, e.rows.map((e) => i(e) ? /* @__PURE__ */ I(_, {
|
|
575
414
|
value: e.id,
|
|
576
|
-
disabled:
|
|
415
|
+
disabled: G(e.item),
|
|
577
416
|
...s,
|
|
578
417
|
onSelect: () => {
|
|
579
|
-
(e.onSelect || !
|
|
418
|
+
(e.onSelect || !W(e.item)) && r(e);
|
|
580
419
|
},
|
|
581
|
-
children: [/* @__PURE__ */ F(
|
|
420
|
+
children: [/* @__PURE__ */ F(et, {
|
|
582
421
|
icon: e.icon,
|
|
583
422
|
layout: o
|
|
584
423
|
}), e.label]
|
|
585
|
-
}, e.id) : /* @__PURE__ */ F(
|
|
424
|
+
}, e.id) : /* @__PURE__ */ F(q, {
|
|
586
425
|
row: e,
|
|
587
426
|
layout: o,
|
|
588
427
|
select: r
|
|
589
428
|
}, e.id))]
|
|
590
429
|
});
|
|
591
430
|
}
|
|
592
|
-
function
|
|
593
|
-
let r = `${e.id}-name`, i = n ? { "aria-labelledby": r } : { "aria-label": e.label }, a = n ? /* @__PURE__ */ F(
|
|
431
|
+
function nt({ row: e, select: t, titled: n }) {
|
|
432
|
+
let r = `${e.id}-name`, i = n ? { "aria-labelledby": r } : { "aria-label": e.label }, a = n ? /* @__PURE__ */ F(v, {
|
|
594
433
|
id: r,
|
|
595
434
|
children: e.label
|
|
596
435
|
}) : null;
|
|
597
|
-
if (e.choice === "single") return /* @__PURE__ */ F(
|
|
436
|
+
if (e.choice === "single") return /* @__PURE__ */ F(tt, {
|
|
598
437
|
row: e,
|
|
599
438
|
name: i,
|
|
600
439
|
title: a,
|
|
601
440
|
select: t
|
|
602
441
|
});
|
|
603
|
-
let o =
|
|
604
|
-
return /* @__PURE__ */ I(
|
|
442
|
+
let o = K(e.rows);
|
|
443
|
+
return /* @__PURE__ */ I(C, {
|
|
605
444
|
...i,
|
|
606
|
-
children: [a, e.rows.map((e) => /* @__PURE__ */ F(
|
|
445
|
+
children: [a, e.rows.map((e) => /* @__PURE__ */ F(q, {
|
|
607
446
|
row: e,
|
|
608
447
|
layout: o,
|
|
609
448
|
select: t
|
|
@@ -612,21 +451,21 @@ function Jt({ row: e, select: t, titled: n }) {
|
|
|
612
451
|
}
|
|
613
452
|
//#endregion
|
|
614
453
|
//#region lib/components/ui/actions/toolbar/toolbar-more-items.tsx
|
|
615
|
-
function
|
|
616
|
-
let n =
|
|
617
|
-
return e.map((e) => e.kind === "separator" ? /* @__PURE__ */ F(
|
|
454
|
+
function rt({ rows: e, select: t }) {
|
|
455
|
+
let n = K(e.filter((e) => e.kind === "item"));
|
|
456
|
+
return e.map((e) => e.kind === "separator" ? /* @__PURE__ */ F(S, {}, e.id) : e.kind === "item" ? /* @__PURE__ */ F(q, {
|
|
618
457
|
row: e,
|
|
619
458
|
layout: n,
|
|
620
459
|
select: t
|
|
621
|
-
}, e.id) : e.moreAs === "submenu" ? /* @__PURE__ */ F(
|
|
460
|
+
}, e.id) : e.moreAs === "submenu" ? /* @__PURE__ */ F($e, {
|
|
622
461
|
id: e.id,
|
|
623
462
|
label: e.label,
|
|
624
|
-
children: /* @__PURE__ */ F(
|
|
463
|
+
children: /* @__PURE__ */ F(nt, {
|
|
625
464
|
row: e,
|
|
626
465
|
select: t,
|
|
627
466
|
titled: !1
|
|
628
467
|
})
|
|
629
|
-
}, e.id) : /* @__PURE__ */ F(
|
|
468
|
+
}, e.id) : /* @__PURE__ */ F(nt, {
|
|
630
469
|
row: e,
|
|
631
470
|
select: t,
|
|
632
471
|
titled: e.rows.length > 1
|
|
@@ -634,38 +473,38 @@ function Yt({ rows: e, select: t }) {
|
|
|
634
473
|
}
|
|
635
474
|
//#endregion
|
|
636
475
|
//#region lib/components/ui/actions/toolbar/toolbar-return-focus.ts
|
|
637
|
-
var
|
|
638
|
-
function
|
|
639
|
-
e.settling && a ===
|
|
476
|
+
var it = "[role=\"dialog\"],[role=\"alertdialog\"],[data-radix-popper-content-wrapper]", at = "[role=\"menu\"]", ot = 90, st = (e, t) => e.opened && t.getAttribute("aria-expanded") === "false" || !!(e.layer && !e.layer.isConnected);
|
|
477
|
+
function ct(e, t, n, r, i, a = ot) {
|
|
478
|
+
e.settling && a === ot || (e.settling = !0, requestAnimationFrame(() => {
|
|
640
479
|
if (r.aborted || !t.isConnected) return i();
|
|
641
|
-
if (
|
|
480
|
+
if (!st(e, t)) {
|
|
642
481
|
e.settling = !1;
|
|
643
482
|
return;
|
|
644
483
|
}
|
|
645
484
|
let o = document.activeElement;
|
|
646
485
|
if (o?.closest("[role=\"dialog\"],[role=\"alertdialog\"],[data-radix-popper-content-wrapper]")) {
|
|
647
|
-
if (a > 0) return
|
|
486
|
+
if (a > 0) return ct(e, t, n, r, i, a - 1);
|
|
648
487
|
e.settling = !1;
|
|
649
488
|
return;
|
|
650
489
|
}
|
|
651
490
|
(!o || o === document.body) && (n.isConnected && !n.hidden ? n : t).focus({ preventScroll: !0 }), i();
|
|
652
491
|
}));
|
|
653
492
|
}
|
|
654
|
-
function
|
|
493
|
+
function lt(e, t, n, r, i) {
|
|
655
494
|
document.addEventListener("focusin", ({ target: n }) => {
|
|
656
|
-
if (!(n instanceof HTMLElement) || n === t || n.closest(
|
|
657
|
-
let i = n.closest(
|
|
495
|
+
if (!(n instanceof HTMLElement) || n === t || n.closest(at)) return;
|
|
496
|
+
let i = n.closest(it);
|
|
658
497
|
i ? e.layer = i : n !== document.body && r();
|
|
659
498
|
}, { signal: n }), document.addEventListener("focusout", ({ relatedTarget: e }) => {
|
|
660
499
|
!e && document.hasFocus() && i();
|
|
661
500
|
}, { signal: n }), document.addEventListener("pointerdown", ({ target: e }) => {
|
|
662
|
-
(e instanceof Element ? e : null)?.closest(`[role="dialog"],[role="alertdialog"],[data-radix-popper-content-wrapper],${
|
|
501
|
+
(e instanceof Element ? e : null)?.closest(`[role="dialog"],[role="alertdialog"],[data-radix-popper-content-wrapper],${at}`) || r();
|
|
663
502
|
}, {
|
|
664
503
|
capture: !0,
|
|
665
504
|
signal: n
|
|
666
505
|
});
|
|
667
506
|
}
|
|
668
|
-
function
|
|
507
|
+
function ut(e, t) {
|
|
669
508
|
let n = new AbortController(), { signal: r } = n, i = {
|
|
670
509
|
layer: null,
|
|
671
510
|
opened: e.getAttribute("aria-expanded") === "true",
|
|
@@ -675,7 +514,7 @@ function nn(e, t) {
|
|
|
675
514
|
}), o = () => {
|
|
676
515
|
n.abort(), a.disconnect();
|
|
677
516
|
}, s = () => {
|
|
678
|
-
|
|
517
|
+
st(i, e) && ct(i, e, t, r, o);
|
|
679
518
|
};
|
|
680
519
|
return a.observe(e, {
|
|
681
520
|
attributes: !0,
|
|
@@ -683,29 +522,29 @@ function nn(e, t) {
|
|
|
683
522
|
}), a.observe(document.body, {
|
|
684
523
|
childList: !0,
|
|
685
524
|
subtree: !0
|
|
686
|
-
}),
|
|
525
|
+
}), lt(i, t, r, o, s), o;
|
|
687
526
|
}
|
|
688
527
|
//#endregion
|
|
689
528
|
//#region lib/components/ui/actions/toolbar/toolbar-more-launch.ts
|
|
690
|
-
var
|
|
691
|
-
function
|
|
529
|
+
var dt = "a[href],button:not([disabled]),input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", ft = (e) => e.onSelect ? e.onSelect() : e.item.click();
|
|
530
|
+
function pt(e, t) {
|
|
692
531
|
let n = (e instanceof Node ? e : t)?.ownerDocument, r = n?.activeElement;
|
|
693
532
|
return !n || !r || r === n.body ? !1 : !(e instanceof Node && e.contains(r)) && !t?.contains(r);
|
|
694
533
|
}
|
|
695
|
-
function
|
|
534
|
+
function mt(e, t = 20) {
|
|
696
535
|
let n = e.getAttribute("aria-controls"), r = n ? document.getElementById(n) : null;
|
|
697
536
|
if (!r) {
|
|
698
|
-
t > 0 && requestAnimationFrame(() =>
|
|
537
|
+
t > 0 && requestAnimationFrame(() => mt(e, t - 1));
|
|
699
538
|
return;
|
|
700
539
|
}
|
|
701
|
-
(r.querySelector(
|
|
540
|
+
(r.querySelector(dt) ?? r).focus({ preventScroll: !0 });
|
|
702
541
|
}
|
|
703
|
-
function
|
|
704
|
-
let n = M(null), r = M(null), i =
|
|
542
|
+
function ht(e, t) {
|
|
543
|
+
let n = M(null), r = M(null), i = Ge(t);
|
|
705
544
|
k(() => () => r.current?.(), []);
|
|
706
545
|
let a = (t) => {
|
|
707
546
|
let n = e.current, i = "returnFocus" in t.render && t.render.returnFocus === !1;
|
|
708
|
-
!n || i || (r.current?.(), r.current =
|
|
547
|
+
!n || i || (r.current?.(), r.current = ut(t.item, n));
|
|
709
548
|
};
|
|
710
549
|
return {
|
|
711
550
|
guard: i.guard,
|
|
@@ -715,13 +554,13 @@ function cn(e, t) {
|
|
|
715
554
|
n.current = t;
|
|
716
555
|
return;
|
|
717
556
|
}
|
|
718
|
-
|
|
557
|
+
ft(t), t.render.kind === "dialog" && a(t);
|
|
719
558
|
},
|
|
720
559
|
onCloseAutoFocus(t) {
|
|
721
560
|
document.activeElement?.closest("[role=\"dialog\"],[role=\"alertdialog\"],[data-radix-popper-content-wrapper]") && t.preventDefault();
|
|
722
561
|
let r = n.current;
|
|
723
562
|
if (!r) {
|
|
724
|
-
if (
|
|
563
|
+
if (pt(t.target, e.current)) {
|
|
725
564
|
i.end(), t.preventDefault();
|
|
726
565
|
return;
|
|
727
566
|
}
|
|
@@ -729,22 +568,22 @@ function cn(e, t) {
|
|
|
729
568
|
return;
|
|
730
569
|
}
|
|
731
570
|
i.end(), n.current = null, t.preventDefault(), requestAnimationFrame(() => {
|
|
732
|
-
|
|
571
|
+
ft(r), a(r), mt(r.item);
|
|
733
572
|
});
|
|
734
573
|
}
|
|
735
574
|
};
|
|
736
575
|
}
|
|
737
576
|
//#endregion
|
|
738
577
|
//#region lib/components/ui/actions/toolbar/toolbar-more-render.ts
|
|
739
|
-
function
|
|
578
|
+
function gt(e) {
|
|
740
579
|
return e.more ? e.more : e.toggle ? { kind: "checkbox" } : { kind: "item" };
|
|
741
580
|
}
|
|
742
581
|
//#endregion
|
|
743
582
|
//#region lib/components/ui/actions/toolbar/toolbar-more-rows.ts
|
|
744
|
-
var
|
|
745
|
-
function
|
|
746
|
-
let r =
|
|
747
|
-
return r.kind === "none" ? null : (!n.more && !n.onSelect && t.getAttribute("aria-haspopup") === "menu" &&
|
|
583
|
+
var _t = "[data-toolbar-id]";
|
|
584
|
+
function vt(e, t, n) {
|
|
585
|
+
let r = gt(n);
|
|
586
|
+
return r.kind === "none" ? null : (!n.more && !n.onSelect && t.getAttribute("aria-haspopup") === "menu" && se(`"${n.label}" opens a menu and is folded into More without \`more\`: pass more={{ kind: 'submenu', content }} (or an onSelect).`, "Toolbar"), {
|
|
748
587
|
...n,
|
|
749
588
|
id: e,
|
|
750
589
|
item: t,
|
|
@@ -752,17 +591,17 @@ function dn(e, t, n) {
|
|
|
752
591
|
render: r
|
|
753
592
|
});
|
|
754
593
|
}
|
|
755
|
-
function
|
|
594
|
+
function yt(e, t) {
|
|
756
595
|
let n = [];
|
|
757
|
-
for (let r of e.querySelectorAll(
|
|
596
|
+
for (let r of e.querySelectorAll(_t)) {
|
|
758
597
|
let e = r.dataset.toolbarId ?? "", i = t.get(e);
|
|
759
598
|
if (!i || i.separator || i.group) continue;
|
|
760
|
-
let a =
|
|
599
|
+
let a = vt(e, r, i);
|
|
761
600
|
a && n.push(a);
|
|
762
601
|
}
|
|
763
602
|
return n;
|
|
764
603
|
}
|
|
765
|
-
function
|
|
604
|
+
function bt(e, t) {
|
|
766
605
|
if (!e) return [];
|
|
767
606
|
let n = [], r = (e) => {
|
|
768
607
|
let t = n[n.length - 1];
|
|
@@ -771,11 +610,11 @@ function pn(e, t) {
|
|
|
771
610
|
kind: "separator"
|
|
772
611
|
});
|
|
773
612
|
};
|
|
774
|
-
for (let i of e.querySelectorAll(`:scope > ${
|
|
613
|
+
for (let i of e.querySelectorAll(`:scope > ${_t}[hidden]`)) {
|
|
775
614
|
let e = i.dataset.toolbarId ?? "", a = t.get(e);
|
|
776
615
|
if (a) if (a.separator) r(e);
|
|
777
616
|
else if (a.group) {
|
|
778
|
-
let o =
|
|
617
|
+
let o = yt(i, t);
|
|
779
618
|
if (!o.length) continue;
|
|
780
619
|
r(`${e}-before`), o.length === 1 && a.choice !== "single" ? n.push(o[0]) : n.push({
|
|
781
620
|
id: e,
|
|
@@ -786,7 +625,7 @@ function pn(e, t) {
|
|
|
786
625
|
rows: o
|
|
787
626
|
}), r(`${e}-after`);
|
|
788
627
|
} else {
|
|
789
|
-
let t =
|
|
628
|
+
let t = vt(e, i, a);
|
|
790
629
|
t && n.push(t);
|
|
791
630
|
}
|
|
792
631
|
}
|
|
@@ -794,16 +633,16 @@ function pn(e, t) {
|
|
|
794
633
|
}
|
|
795
634
|
//#endregion
|
|
796
635
|
//#region lib/components/ui/actions/toolbar/toolbar-more.tsx
|
|
797
|
-
function
|
|
798
|
-
let { t: o } =
|
|
799
|
-
return /* @__PURE__ */ I(
|
|
636
|
+
function xt({ root: e, hidden: t, label: n, dir: r, side: i, align: a = "end" }) {
|
|
637
|
+
let { t: o } = ce(), { entries: s, dir: c, orientation: l } = O(z), u = r ?? c, d = i ?? (l === "vertical" ? u === "rtl" ? "left" : "right" : void 0), f = Xe(u), p = M(null), h = ht(p, f.contentProps.ref), [g, _] = N([]), v = () => e?.current ?? p.current?.closest("[role=\"toolbar\"]") ?? null;
|
|
638
|
+
return /* @__PURE__ */ I(w, {
|
|
800
639
|
dir: u,
|
|
801
640
|
onOpenChange: (e) => {
|
|
802
|
-
e && (f.reset(),
|
|
641
|
+
e && (f.reset(), h.reset(), _(bt(v(), s)));
|
|
803
642
|
},
|
|
804
|
-
children: [/* @__PURE__ */ F(
|
|
643
|
+
children: [/* @__PURE__ */ F(m, {
|
|
805
644
|
asChild: !0,
|
|
806
|
-
children: /* @__PURE__ */ F(
|
|
645
|
+
children: /* @__PURE__ */ F(R, {
|
|
807
646
|
ref: p,
|
|
808
647
|
type: "button",
|
|
809
648
|
"data-slot": "toolbar-more",
|
|
@@ -811,24 +650,24 @@ function mn({ root: e, hidden: t, label: n, dir: r, side: i, align: a = "end" })
|
|
|
811
650
|
hidden: t || void 0,
|
|
812
651
|
"aria-label": n ?? o("material.toolbar.more", "More"),
|
|
813
652
|
className: "nxgt-toolbar-item",
|
|
814
|
-
children: /* @__PURE__ */ F(
|
|
653
|
+
children: /* @__PURE__ */ F(me, {})
|
|
815
654
|
})
|
|
816
|
-
}), /* @__PURE__ */ F(
|
|
655
|
+
}), /* @__PURE__ */ F(x, {
|
|
817
656
|
side: d,
|
|
818
657
|
align: a,
|
|
819
658
|
className: "min-w-48",
|
|
820
|
-
onCloseAutoFocus:
|
|
659
|
+
onCloseAutoFocus: h.onCloseAutoFocus,
|
|
821
660
|
...f.contentProps,
|
|
822
|
-
children: /* @__PURE__ */ F(
|
|
823
|
-
value:
|
|
824
|
-
children: /* @__PURE__ */ F(
|
|
661
|
+
children: /* @__PURE__ */ F(Ue, {
|
|
662
|
+
value: h.guard,
|
|
663
|
+
children: /* @__PURE__ */ F(Ke, {
|
|
825
664
|
value: f.api,
|
|
826
|
-
children: f.drill ? /* @__PURE__ */ F(
|
|
665
|
+
children: f.drill ? /* @__PURE__ */ F(Ze, {
|
|
827
666
|
drill: f.drill,
|
|
828
667
|
leave: f.leave
|
|
829
|
-
}) : /* @__PURE__ */ F(
|
|
830
|
-
rows:
|
|
831
|
-
select:
|
|
668
|
+
}) : /* @__PURE__ */ F(rt, {
|
|
669
|
+
rows: g,
|
|
670
|
+
select: h.select
|
|
832
671
|
})
|
|
833
672
|
})
|
|
834
673
|
})
|
|
@@ -837,24 +676,24 @@ function mn({ root: e, hidden: t, label: n, dir: r, side: i, align: a = "end" })
|
|
|
837
676
|
}
|
|
838
677
|
//#endregion
|
|
839
678
|
//#region lib/components/ui/actions/toolbar/toolbar-axis.ts
|
|
840
|
-
var
|
|
841
|
-
function
|
|
679
|
+
var J = (e) => Number.parseFloat(e) || 0;
|
|
680
|
+
function Y(e, t) {
|
|
842
681
|
let n = getComputedStyle(e);
|
|
843
|
-
return t === "x" ? e.offsetWidth +
|
|
682
|
+
return t === "x" ? e.offsetWidth + J(n.marginLeft) + J(n.marginRight) : e.offsetHeight + J(n.marginTop) + J(n.marginBottom);
|
|
844
683
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
684
|
+
function St(e, t) {
|
|
685
|
+
return J(t === "x" ? e.columnGap : e.rowGap);
|
|
847
686
|
}
|
|
848
|
-
function
|
|
849
|
-
return t === "x" ?
|
|
687
|
+
function X(e, t) {
|
|
688
|
+
return t === "x" ? J(e.paddingLeft) + J(e.paddingRight) + J(e.borderLeftWidth) + J(e.borderRightWidth) : J(e.paddingTop) + J(e.paddingBottom) + J(e.borderTopWidth) + J(e.borderBottomWidth);
|
|
850
689
|
}
|
|
851
690
|
//#endregion
|
|
852
691
|
//#region lib/components/ui/actions/toolbar/toolbar-block-room.ts
|
|
853
|
-
function
|
|
854
|
-
let { height: t, cap: n } =
|
|
692
|
+
function Ct(e) {
|
|
693
|
+
let { height: t, cap: n } = wt(e), r = [t, n].filter((e) => e > 0);
|
|
855
694
|
return r.length ? Math.min(...r) : 0;
|
|
856
695
|
}
|
|
857
|
-
function
|
|
696
|
+
function wt(e) {
|
|
858
697
|
let t = (t) => {
|
|
859
698
|
let n = document.createElement("div");
|
|
860
699
|
n.setAttribute("aria-hidden", "true"), n.style.setProperty("position", "relative"), n.style.setProperty("visibility", "hidden"), n.style.setProperty("width", "0"), n.style.setProperty("flex", "none");
|
|
@@ -871,64 +710,64 @@ function _n(e) {
|
|
|
871
710
|
cap: i < 1e5 ? i : 0
|
|
872
711
|
};
|
|
873
712
|
}
|
|
874
|
-
function
|
|
713
|
+
function Tt(e, t) {
|
|
875
714
|
let n = getComputedStyle(t);
|
|
876
715
|
if (!n.display.includes("flex") || !n.flexDirection.startsWith("column") || n.flexWrap !== "nowrap") return 0;
|
|
877
716
|
let r = 0;
|
|
878
717
|
for (let i of Array.from(t.children)) {
|
|
879
718
|
if (i === e || !(i instanceof HTMLElement)) continue;
|
|
880
719
|
let t = getComputedStyle(i);
|
|
881
|
-
["absolute", "fixed"].includes(t.position) || t.display !== "none" && (r +=
|
|
720
|
+
["absolute", "fixed"].includes(t.position) || t.display !== "none" && (r += Y(i, "y") + J(n.rowGap));
|
|
882
721
|
}
|
|
883
722
|
return r;
|
|
884
723
|
}
|
|
885
|
-
function
|
|
724
|
+
function Z(e) {
|
|
886
725
|
for (let t = e.parentElement; t; t = t.parentElement) if (/(auto|scroll)/.test(getComputedStyle(t).overflowY) && t.scrollHeight > t.clientHeight) return t;
|
|
887
726
|
return null;
|
|
888
727
|
}
|
|
889
|
-
function
|
|
728
|
+
function Et(e) {
|
|
890
729
|
for (let t = e; t; t = t.parentElement) {
|
|
891
730
|
let n = getComputedStyle(t);
|
|
892
731
|
if (n.position !== "sticky" || n.top === "auto") continue;
|
|
893
732
|
let r = e.getBoundingClientRect().top - t.getBoundingClientRect().top;
|
|
894
|
-
return
|
|
733
|
+
return J(n.top) + Math.max(0, r);
|
|
895
734
|
}
|
|
896
735
|
return -1;
|
|
897
736
|
}
|
|
898
|
-
function
|
|
899
|
-
let t =
|
|
737
|
+
function Dt(e) {
|
|
738
|
+
let t = Et(e);
|
|
900
739
|
if (t < 0) return Infinity;
|
|
901
|
-
let n =
|
|
740
|
+
let n = Z(e);
|
|
902
741
|
return (n ? n.clientHeight : window.innerHeight) - t - 16;
|
|
903
742
|
}
|
|
904
|
-
function
|
|
905
|
-
let t = getComputedStyle(e), n =
|
|
743
|
+
function Ot(e) {
|
|
744
|
+
let t = getComputedStyle(e), n = X(t, "y"), r = e.parentElement, i = wt(e), a = r ? Ct(r) - Tt(e, r) : 0, o = t.boxSizing === "border-box" ? n : 0, s = [
|
|
906
745
|
a > 0 ? a - n : 0,
|
|
907
746
|
i.height,
|
|
908
747
|
i.cap > 0 ? i.cap - o : 0
|
|
909
748
|
].filter((e) => e > 0);
|
|
910
|
-
return Math.min(...s,
|
|
749
|
+
return Math.min(...s, Dt(e) - n);
|
|
911
750
|
}
|
|
912
751
|
//#endregion
|
|
913
752
|
//#region lib/components/ui/actions/toolbar/toolbar-morph-probe.ts
|
|
914
|
-
var
|
|
915
|
-
function
|
|
753
|
+
var kt = ":is(.nxgt-toolbar-item, [data-toolbar-item][data-toolbar-fit]):not([data-toolbar-shape=\"round\"])", At = ":is([aria-pressed=\"true\"], [aria-checked=\"true\"], [data-state=\"on\"])", jt = ":is([aria-pressed], [aria-checked], [data-state=\"on\"], [data-state=\"off\"])";
|
|
754
|
+
function Mt(e, t) {
|
|
916
755
|
let n = Number.parseFloat(e);
|
|
917
756
|
return Number.isFinite(n) ? e.trim().endsWith("rem") || e.trim().endsWith("em") ? n * t : n : 0;
|
|
918
757
|
}
|
|
919
|
-
function
|
|
920
|
-
return
|
|
758
|
+
function Nt(e) {
|
|
759
|
+
return J(e.getPropertyValue("--tb-morph"));
|
|
921
760
|
}
|
|
922
|
-
function
|
|
761
|
+
function Pt(e, t, n, r, i) {
|
|
923
762
|
let a = {
|
|
924
763
|
widening: 0,
|
|
925
764
|
toggles: 0,
|
|
926
765
|
single: !1
|
|
927
766
|
};
|
|
928
767
|
if (r <= 0) return a;
|
|
929
|
-
let o =
|
|
768
|
+
let o = Mt(n.getPropertyValue("--tb-item"), i), s = [...e.matches(kt) ? [e] : [], ...Array.from(e.querySelectorAll(kt))].filter((e) => e.matches(jt) && !e.hidden), c = 0;
|
|
930
769
|
for (let e of s) {
|
|
931
|
-
if (!e.matches(".nxgt-toolbar-item") && !e.matches(
|
|
770
|
+
if (!e.matches(".nxgt-toolbar-item") && !e.matches(At)) continue;
|
|
932
771
|
let n = t === "x" ? e.offsetWidth : e.offsetHeight;
|
|
933
772
|
c += Math.max(0, Math.min(r * 2, n - o));
|
|
934
773
|
}
|
|
@@ -938,38 +777,38 @@ function On(e, t, n, r, i) {
|
|
|
938
777
|
single: e.dataset.toolbarChoice === "single"
|
|
939
778
|
};
|
|
940
779
|
}
|
|
941
|
-
var
|
|
780
|
+
var Ft = () => J(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
942
781
|
//#endregion
|
|
943
782
|
//#region lib/components/ui/actions/toolbar/toolbar-morph-room.ts
|
|
944
|
-
function
|
|
783
|
+
function It(e, t) {
|
|
945
784
|
return t <= 0 ? 0 : t * (e.single ? Math.min(1, e.toggles) : e.toggles);
|
|
946
785
|
}
|
|
947
|
-
function
|
|
948
|
-
return n <= 0 ? e : e - t.widening +
|
|
786
|
+
function Lt(e, t, n) {
|
|
787
|
+
return n <= 0 ? e : e - t.widening + It(t, n);
|
|
949
788
|
}
|
|
950
789
|
//#endregion
|
|
951
790
|
//#region lib/components/ui/actions/toolbar/toolbar-spill.ts
|
|
952
|
-
var
|
|
953
|
-
function
|
|
954
|
-
if (
|
|
791
|
+
var Q = (e, t, n) => e.reduce((e, r) => t.has(r.id) ? e : e + r.width + n, 0);
|
|
792
|
+
function Rt(e, t, n, r) {
|
|
793
|
+
if (Q(e, /* @__PURE__ */ new Set(), n) - (e.length ? n : 0) <= t) return /* @__PURE__ */ new Set();
|
|
955
794
|
let i = e.map((e, t) => ({
|
|
956
795
|
slot: e,
|
|
957
796
|
i: t
|
|
958
797
|
})).filter(({ slot: e }) => !e.separator && !e.pinned).sort((e, t) => e.slot.priority - t.slot.priority || t.i - e.i), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
959
|
-
for (let { slot: s } of i) if (a.add(s.id), o =
|
|
798
|
+
for (let { slot: s } of i) if (a.add(s.id), o = zt(e, a), (e.some((e) => !e.separator && !e.unlisted && o.has(e.id)) ? r + Q(e, o, n) : Q(e, o, n) - n) <= t) return o;
|
|
960
799
|
return o;
|
|
961
800
|
}
|
|
962
|
-
function
|
|
801
|
+
function zt(e, t) {
|
|
963
802
|
let n = new Set(t), r = !1, i = !1;
|
|
964
803
|
return e.forEach((a, o) => {
|
|
965
804
|
if (!a.separator) {
|
|
966
805
|
i = !0, r ||= !t.has(a.id);
|
|
967
806
|
return;
|
|
968
807
|
}
|
|
969
|
-
(i && !r || !
|
|
808
|
+
(i && !r || !Bt(e, o, t)) && n.add(a.id);
|
|
970
809
|
}), n;
|
|
971
810
|
}
|
|
972
|
-
function
|
|
811
|
+
function Bt(e, t, n) {
|
|
973
812
|
let r = !1;
|
|
974
813
|
for (let i = t + 1; i < e.length; i++) {
|
|
975
814
|
let t = e[i];
|
|
@@ -980,18 +819,18 @@ function Fn(e, t, n) {
|
|
|
980
819
|
}
|
|
981
820
|
//#endregion
|
|
982
821
|
//#region lib/components/ui/actions/toolbar/toolbar-measure.ts
|
|
983
|
-
var
|
|
822
|
+
var Vt = ":scope > [data-toolbar-id]", Ht = ":scope > [data-toolbar-more]", Ut = "\0more", Wt = {
|
|
984
823
|
spilled: /* @__PURE__ */ new Set(),
|
|
985
824
|
overflowing: !1
|
|
986
825
|
};
|
|
987
|
-
function
|
|
988
|
-
if (!n) return
|
|
826
|
+
function Gt(e, t, { enabled: n, axis: r = "x", room: i, entries: a = Vt, more: o = Ht }) {
|
|
827
|
+
if (!n) return Wt;
|
|
989
828
|
let s = Array.from(e.querySelectorAll(a)), c = (e) => e.dataset.toolbarId || e.id, l = (e) => c(e) || `#${s.indexOf(e)}`;
|
|
990
|
-
for (let e of s) c(e) ||
|
|
991
|
-
let u = getComputedStyle(e), d =
|
|
992
|
-
for (let e of s) e.hidden || t.set(l(e),
|
|
829
|
+
for (let e of s) c(e) || se("an overflow entry has no data-toolbar-id (nor id) and never folds.", "Toolbar");
|
|
830
|
+
let u = getComputedStyle(e), d = Nt(u), f = d > 0 ? Ft() : 16;
|
|
831
|
+
for (let e of s) e.hidden || t.set(l(e), Lt(Y(e, r), Pt(e, r, u, d, f), d));
|
|
993
832
|
let p = typeof o == "string" ? e.querySelector(o) : o.current;
|
|
994
|
-
p && !p.hidden && t.set(
|
|
833
|
+
p && !p.hidden && t.set(Ut, Y(p, r));
|
|
995
834
|
let m = s.map((e) => {
|
|
996
835
|
let n = l(e);
|
|
997
836
|
return {
|
|
@@ -1000,51 +839,51 @@ function Bn(e, t, { enabled: n, axis: r = "x", room: i, entries: a = In, more: o
|
|
|
1000
839
|
priority: Number(e.dataset.toolbarPriority) || 0,
|
|
1001
840
|
pinned: e.dataset.toolbarPriority === "pinned" || !c(e),
|
|
1002
841
|
separator: e.dataset.slot === "toolbar-separator",
|
|
1003
|
-
unlisted:
|
|
842
|
+
unlisted: Kt(e)
|
|
1004
843
|
};
|
|
1005
|
-
}), h = Math.min(...m.filter((e) => !e.separator && e.width).map((e) => e.width)), g = t.get(
|
|
844
|
+
}), h = Math.min(...m.filter((e) => !e.separator && e.width).map((e) => e.width)), g = t.get(Ut) ?? (Number.isFinite(h) ? h : 40), _ = St(u, r), v = Rt(m, qt(e, u, r, i), _, g);
|
|
1006
845
|
return {
|
|
1007
846
|
spilled: v,
|
|
1008
|
-
overflowing: s.some((e) => !
|
|
847
|
+
overflowing: s.some((e) => !Kt(e) && v.has(l(e)))
|
|
1009
848
|
};
|
|
1010
849
|
}
|
|
1011
|
-
function
|
|
850
|
+
function Kt(e) {
|
|
1012
851
|
if (e.dataset.slot === "toolbar-separator" || e.hasAttribute("data-toolbar-unlisted")) return !0;
|
|
1013
852
|
let t = Array.from(e.querySelectorAll("[data-toolbar-id]")).filter((e) => e.dataset.slot !== "toolbar-group" && e.dataset.slot !== "toolbar-toggle-group");
|
|
1014
853
|
return t.length > 0 && t.every((e) => e.hasAttribute("data-toolbar-unlisted") || e.dataset.slot === "toolbar-separator");
|
|
1015
854
|
}
|
|
1016
|
-
function
|
|
1017
|
-
return r === void 0 ? n === "x" ?
|
|
855
|
+
function qt(e, t, n, r) {
|
|
856
|
+
return r === void 0 ? n === "x" ? Jt(e, t) : Ot(e) : (typeof r == "function" ? r(e) : r) - X(t, n);
|
|
1018
857
|
}
|
|
1019
|
-
function
|
|
1020
|
-
let n =
|
|
858
|
+
function Jt(e, t) {
|
|
859
|
+
let n = X(t, "x");
|
|
1021
860
|
if (e.dataset.variant !== "floating" || !e.parentElement) return e.offsetWidth - n;
|
|
1022
|
-
let r =
|
|
1023
|
-
return t.maxWidth.endsWith("px") && (r = Math.min(r,
|
|
861
|
+
let r = Yt(e, e.parentElement);
|
|
862
|
+
return t.maxWidth.endsWith("px") && (r = Math.min(r, J(t.maxWidth))), r - n;
|
|
1024
863
|
}
|
|
1025
|
-
function
|
|
1026
|
-
let n = getComputedStyle(t), r = t.clientWidth -
|
|
864
|
+
function Yt(e, t) {
|
|
865
|
+
let n = getComputedStyle(t), r = t.clientWidth - J(n.paddingLeft) - J(n.paddingRight);
|
|
1027
866
|
if (!(n.display.includes("flex") && n.flexDirection.startsWith("row") && n.flexWrap === "nowrap")) return r;
|
|
1028
867
|
let i = Array.from(t.children).filter((t) => t !== e && t instanceof HTMLElement && !["absolute", "fixed"].includes(getComputedStyle(t).position) && getComputedStyle(t).display !== "none");
|
|
1029
|
-
for (let e of i) r -=
|
|
868
|
+
for (let e of i) r -= Y(e, "x") + J(n.columnGap);
|
|
1030
869
|
return r;
|
|
1031
870
|
}
|
|
1032
871
|
//#endregion
|
|
1033
872
|
//#region lib/components/ui/actions/toolbar/use-toolbar-fit.ts
|
|
1034
|
-
function
|
|
1035
|
-
let [a, o] = N(
|
|
873
|
+
function Xt(e, t, n = "x", r, i) {
|
|
874
|
+
let [a, o] = N(Wt), s = M(/* @__PURE__ */ new Map()), c = M(a);
|
|
1036
875
|
c.current = a;
|
|
1037
876
|
let l = M(() => {}), u = M(null);
|
|
1038
877
|
l.current = () => {
|
|
1039
878
|
let a = e.current;
|
|
1040
879
|
if (!a) return;
|
|
1041
|
-
let l =
|
|
880
|
+
let l = Gt(a, s.current, {
|
|
1042
881
|
enabled: t,
|
|
1043
882
|
axis: n,
|
|
1044
883
|
room: r,
|
|
1045
884
|
...i
|
|
1046
885
|
});
|
|
1047
|
-
u.current?.takeRecords(),
|
|
886
|
+
u.current?.takeRecords(), Zt(l, c.current) || o(l);
|
|
1048
887
|
}, A(() => l.current()), A(() => {
|
|
1049
888
|
let r = e.current;
|
|
1050
889
|
if (!r || !t || typeof ResizeObserver > "u") return;
|
|
@@ -1052,11 +891,11 @@ function Gn(e, t, n = "x", r, i) {
|
|
|
1052
891
|
u.current = i;
|
|
1053
892
|
let a = () => l.current(), o = new ResizeObserver(a);
|
|
1054
893
|
o.observe(r), r.parentElement && o.observe(r.parentElement);
|
|
1055
|
-
let s = n === "y" ?
|
|
894
|
+
let s = n === "y" ? Z(r) : null;
|
|
1056
895
|
s && o.observe(s);
|
|
1057
896
|
let c = () => {
|
|
1058
897
|
if (n === "y") {
|
|
1059
|
-
let e =
|
|
898
|
+
let e = Z(r);
|
|
1060
899
|
e !== s && (s && o.unobserve(s), e && o.observe(e), s = e);
|
|
1061
900
|
}
|
|
1062
901
|
a();
|
|
@@ -1073,20 +912,20 @@ function Gn(e, t, n = "x", r, i) {
|
|
|
1073
912
|
t,
|
|
1074
913
|
n
|
|
1075
914
|
]);
|
|
1076
|
-
let d =
|
|
915
|
+
let d = le(() => l.current(), []);
|
|
1077
916
|
return {
|
|
1078
917
|
...a,
|
|
1079
918
|
remeasure: d
|
|
1080
919
|
};
|
|
1081
920
|
}
|
|
1082
|
-
function
|
|
921
|
+
function Zt(e, t) {
|
|
1083
922
|
if (e.overflowing !== t.overflowing || e.spilled.size !== t.spilled.size) return !1;
|
|
1084
923
|
for (let n of e.spilled) if (!t.spilled.has(n)) return !1;
|
|
1085
924
|
return !0;
|
|
1086
925
|
}
|
|
1087
926
|
//#endregion
|
|
1088
927
|
//#region lib/components/ui/actions/toolbar/use-toolbar-focus.ts
|
|
1089
|
-
function
|
|
928
|
+
function Qt(e) {
|
|
1090
929
|
let t = e.parentElement;
|
|
1091
930
|
if (t?.dataset.slot !== "toolbar-pair") return null;
|
|
1092
931
|
for (let n of Array.from(t.children)) {
|
|
@@ -1097,7 +936,7 @@ function qn(e) {
|
|
|
1097
936
|
}
|
|
1098
937
|
return null;
|
|
1099
938
|
}
|
|
1100
|
-
function
|
|
939
|
+
function $t(e) {
|
|
1101
940
|
let t = M(null);
|
|
1102
941
|
return k(() => {
|
|
1103
942
|
let n = e.current;
|
|
@@ -1116,8 +955,8 @@ function Jn(e) {
|
|
|
1116
955
|
return r && (e === r || n) ? r : null;
|
|
1117
956
|
};
|
|
1118
957
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let r =
|
|
958
|
+
function en(e, t, n) {
|
|
959
|
+
let r = $t(e), i = M(null);
|
|
1121
960
|
A(() => {
|
|
1122
961
|
let t = e.current, n = r()?.closest("[hidden]");
|
|
1123
962
|
!t || !n || n === t || !t.contains(n) || t.querySelector(":scope > [data-toolbar-more]")?.focus();
|
|
@@ -1125,7 +964,7 @@ function Yn(e, t, n) {
|
|
|
1125
964
|
let t = e.current;
|
|
1126
965
|
if (!t) return;
|
|
1127
966
|
if (n) {
|
|
1128
|
-
let e = r(), n = e &&
|
|
967
|
+
let e = r(), n = e && Qt(t);
|
|
1129
968
|
if (!e || !n) return;
|
|
1130
969
|
i.current = {
|
|
1131
970
|
item: e,
|
|
@@ -1137,8 +976,8 @@ function Yn(e, t, n) {
|
|
|
1137
976
|
i.current = null, a && document.activeElement === a.fab && a.item.isConnected && a.item.focus({ preventScroll: !0 });
|
|
1138
977
|
}, [e, n]);
|
|
1139
978
|
}
|
|
1140
|
-
function
|
|
1141
|
-
let [, n] =
|
|
979
|
+
function tn(e, t) {
|
|
980
|
+
let [, n] = de((e) => e + 1, 0), r = e.current, i = !!t && r !== null && typeof document < "u" && r.contains(document.activeElement) && !Qt(r);
|
|
1142
981
|
return k(() => {
|
|
1143
982
|
let t = e.current;
|
|
1144
983
|
if (!i || !t) return;
|
|
@@ -1148,12 +987,12 @@ function Xn(e, t) {
|
|
|
1148
987
|
return t.addEventListener("focusout", r), () => t.removeEventListener("focusout", r);
|
|
1149
988
|
}, [e, i]), !!t && !i;
|
|
1150
989
|
}
|
|
1151
|
-
function
|
|
990
|
+
function nn(e) {
|
|
1152
991
|
if (e.scale > 1.01) return 0;
|
|
1153
992
|
let t = e.layoutHeight - (e.height + e.offsetTop);
|
|
1154
993
|
return t >= 120 ? Math.round(t) : 0;
|
|
1155
994
|
}
|
|
1156
|
-
var
|
|
995
|
+
var rn = "--nxgt-toolbar-lift", an = [
|
|
1157
996
|
"[role=\"dialog\"]",
|
|
1158
997
|
"[role=\"alertdialog\"]",
|
|
1159
998
|
...[
|
|
@@ -1162,26 +1001,26 @@ var Qn = "--nxgt-toolbar-lift", $n = [
|
|
|
1162
1001
|
"sheet",
|
|
1163
1002
|
"drawer"
|
|
1164
1003
|
].map((e) => `[data-slot="${e}-content"]`)
|
|
1165
|
-
].join(","),
|
|
1166
|
-
function
|
|
1004
|
+
].join(","), on = "data-nxgt-keyboard-lift";
|
|
1005
|
+
function sn(e, t) {
|
|
1167
1006
|
for (let n = e; n && n.tagName !== "BODY"; n = n.parentElement) if (t.getComputedStyle(n).position === "fixed") return n;
|
|
1168
1007
|
return null;
|
|
1169
1008
|
}
|
|
1170
|
-
function
|
|
1009
|
+
function cn(e, t = typeof window > "u" ? void 0 : window) {
|
|
1171
1010
|
let n = t?.visualViewport;
|
|
1172
1011
|
if (!t || !n) return () => {};
|
|
1173
1012
|
let r = null, i = 0, a = 0, o = (e) => {
|
|
1174
|
-
e.style.removeProperty(
|
|
1013
|
+
e.style.removeProperty(rn), e.removeAttribute(on);
|
|
1175
1014
|
}, s = (e, t) => {
|
|
1176
|
-
r && r !== e && (o(r), i = 0), r = e, !(!e || t === i) && (i = t, t ? (e.style.setProperty(
|
|
1015
|
+
r && r !== e && (o(r), i = 0), r = e, !(!e || t === i) && (i = t, t ? (e.style.setProperty(rn, `${t}px`), e.setAttribute(on, "")) : o(e));
|
|
1177
1016
|
}, c = () => {
|
|
1178
1017
|
a = 0;
|
|
1179
|
-
let o = t.matchMedia("(pointer: coarse), (max-width: 40rem)").matches ?
|
|
1018
|
+
let o = t.matchMedia("(pointer: coarse), (max-width: 40rem)").matches ? sn(e, t) : null, c = o?.getBoundingClientRect(), l = o && c && !o.matches(an) && c.height <= t.innerHeight / 2 && c.bottom + (o === r ? i : 0) > t.innerHeight / 2;
|
|
1180
1019
|
if (!o || !l) {
|
|
1181
1020
|
s(r, 0);
|
|
1182
1021
|
return;
|
|
1183
1022
|
}
|
|
1184
|
-
s(o,
|
|
1023
|
+
s(o, nn({
|
|
1185
1024
|
layoutHeight: t.innerHeight,
|
|
1186
1025
|
height: n.height,
|
|
1187
1026
|
offsetTop: n.offsetTop,
|
|
@@ -1194,25 +1033,25 @@ function nr(e, t = typeof window > "u" ? void 0 : window) {
|
|
|
1194
1033
|
n.removeEventListener("resize", l), n.removeEventListener("scroll", l), a && t.cancelAnimationFrame(a), s(r, 0);
|
|
1195
1034
|
};
|
|
1196
1035
|
}
|
|
1197
|
-
function
|
|
1036
|
+
function ln(e, t) {
|
|
1198
1037
|
k(() => {
|
|
1199
1038
|
let n = e.current;
|
|
1200
|
-
if (!(!t || !n)) return
|
|
1039
|
+
if (!(!t || !n)) return cn(n);
|
|
1201
1040
|
}, [e, t]);
|
|
1202
1041
|
}
|
|
1203
1042
|
//#endregion
|
|
1204
1043
|
//#region lib/components/ui/actions/toolbar/use-toolbar-state.ts
|
|
1205
|
-
function
|
|
1044
|
+
function un(e) {
|
|
1206
1045
|
return {
|
|
1207
1046
|
get current() {
|
|
1208
|
-
let t = e.current?.querySelector(
|
|
1047
|
+
let t = e.current?.querySelector(Ht);
|
|
1209
1048
|
return t && !t.hidden ? t : e.current;
|
|
1210
1049
|
},
|
|
1211
1050
|
set current(e) {}
|
|
1212
1051
|
};
|
|
1213
1052
|
}
|
|
1214
|
-
function
|
|
1215
|
-
let { spilled: n, dir: r, orientation: i, overflowing: a } = t, [o] = N(() => /* @__PURE__ */ new Map()), [s] = N(() =>
|
|
1053
|
+
function dn(e, t) {
|
|
1054
|
+
let { spilled: n, dir: r, orientation: i, overflowing: a } = t, [o] = N(() => /* @__PURE__ */ new Map()), [s] = N(() => un(e)), [c] = N(() => ({ current: null }));
|
|
1216
1055
|
return j(() => ({
|
|
1217
1056
|
inside: !0,
|
|
1218
1057
|
spilled: n,
|
|
@@ -1234,16 +1073,16 @@ function ar(e, t) {
|
|
|
1234
1073
|
}
|
|
1235
1074
|
//#endregion
|
|
1236
1075
|
//#region lib/components/ui/actions/toolbar/toolbar.tsx
|
|
1237
|
-
function
|
|
1238
|
-
let v = M(null), y = t(v, g), b =
|
|
1239
|
-
|
|
1240
|
-
let ee =
|
|
1076
|
+
function fn({ label: n, children: r, variant: i = "floating", density: a = "comfortable", keyboardLift: o = !0, tone: s = "neutral", selectedLook: c = "quiet", orientation: l = "horizontal", overflow: u, overflowRoom: d, moreLabel: f, hidden: p, dir: m, className: h, ref: g, ..._ }) {
|
|
1077
|
+
let v = M(null), y = t(v, g), b = Pe(v), x = m ?? b, S = tn(v, p), C = !!u, { spilled: w, overflowing: T } = Xt(v, C, l === "vertical" ? "y" : "x", d);
|
|
1078
|
+
en(v, w, S), ln(v, i === "floating" && o);
|
|
1079
|
+
let ee = dn(v, {
|
|
1241
1080
|
spilled: w,
|
|
1242
1081
|
dir: x,
|
|
1243
1082
|
orientation: l,
|
|
1244
1083
|
overflowing: T
|
|
1245
1084
|
});
|
|
1246
|
-
return /* @__PURE__ */ F(
|
|
1085
|
+
return /* @__PURE__ */ F(Ae, {
|
|
1247
1086
|
"data-slot": "toolbar",
|
|
1248
1087
|
..._,
|
|
1249
1088
|
ref: y,
|
|
@@ -1258,9 +1097,9 @@ function or({ label: n, children: r, variant: i = "floating", density: a = "comf
|
|
|
1258
1097
|
"data-hidden": S ? "" : void 0,
|
|
1259
1098
|
inert: S || void 0,
|
|
1260
1099
|
className: e("nxgt-toolbar", h),
|
|
1261
|
-
children: /* @__PURE__ */ I(
|
|
1100
|
+
children: /* @__PURE__ */ I(z, {
|
|
1262
1101
|
value: ee,
|
|
1263
|
-
children: [r, C ? /* @__PURE__ */ F(
|
|
1102
|
+
children: [r, C ? /* @__PURE__ */ F(xt, {
|
|
1264
1103
|
root: v,
|
|
1265
1104
|
dir: x,
|
|
1266
1105
|
label: f,
|
|
@@ -1271,8 +1110,8 @@ function or({ label: n, children: r, variant: i = "floating", density: a = "comf
|
|
|
1271
1110
|
}
|
|
1272
1111
|
//#endregion
|
|
1273
1112
|
//#region lib/components/ui/actions/toolbar/toolbar-group.tsx
|
|
1274
|
-
function
|
|
1275
|
-
let { spilled: c, inside: l, props: u } =
|
|
1113
|
+
function pn({ label: t, children: n, priority: r, moreAs: i, choice: a, className: o, ...s }) {
|
|
1114
|
+
let { spilled: c, inside: l, props: u } = V({
|
|
1276
1115
|
label: t,
|
|
1277
1116
|
group: !0,
|
|
1278
1117
|
choice: a,
|
|
@@ -1285,7 +1124,7 @@ function sr({ label: t, children: n, priority: r, moreAs: i, choice: a, classNam
|
|
|
1285
1124
|
role: "group",
|
|
1286
1125
|
"aria-label": t,
|
|
1287
1126
|
className: e(l && "nxgt-toolbar-group", o),
|
|
1288
|
-
children: /* @__PURE__ */ F(
|
|
1127
|
+
children: /* @__PURE__ */ F(B, {
|
|
1289
1128
|
value: d,
|
|
1290
1129
|
children: n
|
|
1291
1130
|
})
|
|
@@ -1293,7 +1132,7 @@ function sr({ label: t, children: n, priority: r, moreAs: i, choice: a, classNam
|
|
|
1293
1132
|
}
|
|
1294
1133
|
//#endregion
|
|
1295
1134
|
//#region lib/components/ui/actions/toolbar/keep-text-keys.ts
|
|
1296
|
-
var
|
|
1135
|
+
var mn = /* @__PURE__ */ new Set([
|
|
1297
1136
|
"button",
|
|
1298
1137
|
"checkbox",
|
|
1299
1138
|
"color",
|
|
@@ -1303,7 +1142,7 @@ var cr = /* @__PURE__ */ new Set([
|
|
|
1303
1142
|
"reset",
|
|
1304
1143
|
"submit"
|
|
1305
1144
|
]);
|
|
1306
|
-
function
|
|
1145
|
+
function hn(e) {
|
|
1307
1146
|
let t, n;
|
|
1308
1147
|
try {
|
|
1309
1148
|
t = e.selectionStart, n = e.selectionEnd;
|
|
@@ -1315,19 +1154,19 @@ function lr(e) {
|
|
|
1315
1154
|
atEnd: t === e.value.length
|
|
1316
1155
|
};
|
|
1317
1156
|
}
|
|
1318
|
-
function
|
|
1157
|
+
function gn(e) {
|
|
1319
1158
|
let t = e.target;
|
|
1320
1159
|
if (t.isContentEditable || e.nativeEvent.isComposing) return !0;
|
|
1321
1160
|
let n = e.key === "ArrowUp" || e.key === "ArrowDown";
|
|
1322
1161
|
if (t instanceof HTMLSelectElement) return n;
|
|
1323
|
-
let r = t instanceof HTMLInputElement && !
|
|
1162
|
+
let r = t instanceof HTMLInputElement && !mn.has(t.type) || t instanceof HTMLTextAreaElement ? t : null;
|
|
1324
1163
|
if (!r) return !1;
|
|
1325
|
-
let i =
|
|
1164
|
+
let i = hn(r);
|
|
1326
1165
|
if (!i || n) return !0;
|
|
1327
1166
|
let a = getComputedStyle(t).direction === "rtl", o = a ? "ArrowRight" : "ArrowLeft", s = a ? "ArrowLeft" : "ArrowRight";
|
|
1328
1167
|
return e.key === o || e.key === "Home" ? !i.atStart : e.key === s || e.key === "End" ? !i.atEnd : !1;
|
|
1329
1168
|
}
|
|
1330
|
-
var
|
|
1169
|
+
var _n = /* @__PURE__ */ new Set([
|
|
1331
1170
|
"ArrowLeft",
|
|
1332
1171
|
"ArrowRight",
|
|
1333
1172
|
"ArrowUp",
|
|
@@ -1335,8 +1174,8 @@ var dr = /* @__PURE__ */ new Set([
|
|
|
1335
1174
|
"Home",
|
|
1336
1175
|
"End"
|
|
1337
1176
|
]);
|
|
1338
|
-
function
|
|
1339
|
-
if (!
|
|
1177
|
+
function vn(e) {
|
|
1178
|
+
if (!_n.has(e.key) || !gn(e)) return;
|
|
1340
1179
|
let t = !0;
|
|
1341
1180
|
Object.defineProperty(e, "defaultPrevented", {
|
|
1342
1181
|
configurable: !0,
|
|
@@ -1344,69 +1183,9 @@ function fr(e) {
|
|
|
1344
1183
|
});
|
|
1345
1184
|
}
|
|
1346
1185
|
//#endregion
|
|
1347
|
-
//#region lib/components/ui/overlays/popover/in-popover.ts
|
|
1348
|
-
var pr = D(!1);
|
|
1349
|
-
function mr() {
|
|
1350
|
-
return O(pr);
|
|
1351
|
-
}
|
|
1352
|
-
//#endregion
|
|
1353
|
-
//#region lib/components/ui/overlays/popover/popover.tsx
|
|
1354
|
-
function hr({ ...e }) {
|
|
1355
|
-
return /* @__PURE__ */ F(ee, {
|
|
1356
|
-
value: e.modal ?? !1,
|
|
1357
|
-
children: /* @__PURE__ */ F(pr, {
|
|
1358
|
-
value: !0,
|
|
1359
|
-
children: /* @__PURE__ */ F(Qe, {
|
|
1360
|
-
"data-slot": "popover",
|
|
1361
|
-
...e
|
|
1362
|
-
})
|
|
1363
|
-
})
|
|
1364
|
-
});
|
|
1365
|
-
}
|
|
1366
|
-
function gr({ ...e }) {
|
|
1367
|
-
return /* @__PURE__ */ F(et, {
|
|
1368
|
-
"data-slot": "popover-trigger",
|
|
1369
|
-
...e
|
|
1370
|
-
});
|
|
1371
|
-
}
|
|
1372
|
-
function _r({ className: t, children: n, align: r = "center", sideOffset: i = 6, collisionPadding: a = 8, variant: o = "elevated", arrow: s = !1, ref: c, ...l }) {
|
|
1373
|
-
return /* @__PURE__ */ F(we, { children: /* @__PURE__ */ F(ne, {
|
|
1374
|
-
value: !1,
|
|
1375
|
-
children: /* @__PURE__ */ F(pr, {
|
|
1376
|
-
value: !1,
|
|
1377
|
-
children: /* @__PURE__ */ F(tt, { children: /* @__PURE__ */ F(nt, {
|
|
1378
|
-
ref: S(!1, c),
|
|
1379
|
-
"data-slot": "popover-content",
|
|
1380
|
-
"data-variant": o,
|
|
1381
|
-
"data-arrow": s || void 0,
|
|
1382
|
-
align: r,
|
|
1383
|
-
sideOffset: i,
|
|
1384
|
-
collisionPadding: a,
|
|
1385
|
-
className: e("nxgt-popover z-50 w-72 p-4 outline-hidden", t),
|
|
1386
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
1387
|
-
...l,
|
|
1388
|
-
onEscapeKeyDown: (e) => {
|
|
1389
|
-
Oe(e), l.onEscapeKeyDown?.(e);
|
|
1390
|
-
},
|
|
1391
|
-
children: s ? /* @__PURE__ */ I(P, { children: [n, /* @__PURE__ */ F(rt, {
|
|
1392
|
-
className: "nxgt-popover-arrow",
|
|
1393
|
-
width: 16,
|
|
1394
|
-
height: 8
|
|
1395
|
-
})] }) : n
|
|
1396
|
-
}) })
|
|
1397
|
-
})
|
|
1398
|
-
}) });
|
|
1399
|
-
}
|
|
1400
|
-
function vr({ ...e }) {
|
|
1401
|
-
return /* @__PURE__ */ F($e, {
|
|
1402
|
-
"data-slot": "popover-anchor",
|
|
1403
|
-
...e
|
|
1404
|
-
});
|
|
1405
|
-
}
|
|
1406
|
-
//#endregion
|
|
1407
1186
|
//#region lib/components/ui/actions/toolbar/toolbar-fold-anchor.tsx
|
|
1408
|
-
function
|
|
1409
|
-
let { moreAnchor: n } = O(
|
|
1187
|
+
function yn({ own: e, folded: t }) {
|
|
1188
|
+
let { moreAnchor: n } = O(z), r = te(), i = j(() => ({
|
|
1410
1189
|
get current() {
|
|
1411
1190
|
return t ? n.current : e.current;
|
|
1412
1191
|
},
|
|
@@ -1416,13 +1195,13 @@ function yr({ own: e, folded: t }) {
|
|
|
1416
1195
|
e,
|
|
1417
1196
|
n
|
|
1418
1197
|
]);
|
|
1419
|
-
return r ? /* @__PURE__ */ F(
|
|
1198
|
+
return r ? /* @__PURE__ */ F(ne, { virtualRef: i }) : null;
|
|
1420
1199
|
}
|
|
1421
1200
|
//#endregion
|
|
1422
1201
|
//#region lib/components/ui/actions/toolbar/toolbar-keep-focus.ts
|
|
1423
|
-
function
|
|
1424
|
-
let { inside: n, focusLost: r } = O(
|
|
1425
|
-
return
|
|
1202
|
+
function bn(e, t) {
|
|
1203
|
+
let { inside: n, focusLost: r } = O(z), i = M(null);
|
|
1204
|
+
return le((a) => {
|
|
1426
1205
|
if (!e || !n) {
|
|
1427
1206
|
i.current = a;
|
|
1428
1207
|
return;
|
|
@@ -1451,69 +1230,69 @@ function br(e, t) {
|
|
|
1451
1230
|
}
|
|
1452
1231
|
//#endregion
|
|
1453
1232
|
//#region lib/components/ui/actions/toolbar/toolbar-item-slot.tsx
|
|
1454
|
-
function
|
|
1455
|
-
let { inside: m, spilled: h, props: g } =
|
|
1456
|
-
label:
|
|
1457
|
-
icon:
|
|
1458
|
-
toggle:
|
|
1459
|
-
onSelect:
|
|
1460
|
-
more:
|
|
1461
|
-
},
|
|
1462
|
-
return m ? /* @__PURE__ */ I(P, { children: [
|
|
1233
|
+
function xn({ children: e, label: r, icon: a, toggle: o, priority: s, onSelect: c, more: l, onKeyDown: u, fit: d, shape: f = "pill", ...p }) {
|
|
1234
|
+
let { inside: m, spilled: h, props: g } = V({
|
|
1235
|
+
label: r,
|
|
1236
|
+
icon: a,
|
|
1237
|
+
toggle: o,
|
|
1238
|
+
onSelect: c,
|
|
1239
|
+
more: l
|
|
1240
|
+
}, s), _ = M(null), v = bn(l?.kind === "popover", r), y = t(_, p.ref, v);
|
|
1241
|
+
return m ? /* @__PURE__ */ I(P, { children: [l?.kind === "popover" ? /* @__PURE__ */ F(yn, {
|
|
1463
1242
|
own: _,
|
|
1464
1243
|
folded: h
|
|
1465
|
-
}) : null, /* @__PURE__ */ F(
|
|
1244
|
+
}) : null, /* @__PURE__ */ F(R, {
|
|
1466
1245
|
asChild: !0,
|
|
1467
1246
|
...p,
|
|
1468
1247
|
ref: y,
|
|
1469
|
-
...
|
|
1470
|
-
onKeyDown:
|
|
1248
|
+
...Sn(e),
|
|
1249
|
+
onKeyDown: i(u, vn),
|
|
1471
1250
|
...g,
|
|
1472
1251
|
"data-toolbar-item": "",
|
|
1473
1252
|
"data-toolbar-shape": f,
|
|
1474
|
-
"data-toolbar-fit": d ?? !
|
|
1253
|
+
"data-toolbar-fit": d ?? !Cn(e) ? "" : void 0,
|
|
1475
1254
|
children: e
|
|
1476
|
-
})] }) : /* @__PURE__ */ F(
|
|
1255
|
+
})] }) : /* @__PURE__ */ F(n, {
|
|
1477
1256
|
...p,
|
|
1478
1257
|
onKeyDown: u,
|
|
1479
1258
|
children: e
|
|
1480
1259
|
});
|
|
1481
1260
|
}
|
|
1482
|
-
function
|
|
1261
|
+
function Sn(e) {
|
|
1483
1262
|
let t = e.props;
|
|
1484
|
-
return e.type === "input" ? { type: t.type ?? "text" } :
|
|
1263
|
+
return e.type === "input" ? { type: t.type ?? "text" } : Cn(e) ? { type: void 0 } : {};
|
|
1485
1264
|
}
|
|
1486
|
-
var
|
|
1265
|
+
var Cn = (e) => e.type === "input" || e.type === "textarea" || e.type === "select";
|
|
1487
1266
|
//#endregion
|
|
1488
1267
|
//#region lib/components/ui/actions/toolbar/toolbar-item.tsx
|
|
1489
|
-
function $({ icon: n, label: r, tooltip: i = !0, toggle:
|
|
1490
|
-
let { spilled:
|
|
1268
|
+
function $({ icon: n, label: r, tooltip: i = !0, toggle: o, priority: s, more: c, shape: l = "pill", className: u, type: d = "button", toggleValue: f, ...p }) {
|
|
1269
|
+
let { spilled: m, props: h } = V({
|
|
1491
1270
|
label: r,
|
|
1492
1271
|
icon: n,
|
|
1493
|
-
toggle:
|
|
1494
|
-
more:
|
|
1495
|
-
},
|
|
1496
|
-
|
|
1497
|
-
let y = M(null), b =
|
|
1498
|
-
type:
|
|
1499
|
-
...
|
|
1500
|
-
...
|
|
1272
|
+
toggle: o,
|
|
1273
|
+
more: c
|
|
1274
|
+
}, s), [g, _] = N(!1), v = O(Re);
|
|
1275
|
+
m && g && _(!1);
|
|
1276
|
+
let y = M(null), b = bn(c?.kind === "popover", r), x = t(y, p.ref, b), S = {
|
|
1277
|
+
type: d,
|
|
1278
|
+
...p,
|
|
1279
|
+
...h,
|
|
1501
1280
|
ref: x,
|
|
1502
1281
|
"data-slot": "toolbar-item",
|
|
1503
|
-
"data-toolbar-shape":
|
|
1282
|
+
"data-toolbar-shape": l,
|
|
1504
1283
|
"aria-label": r,
|
|
1505
|
-
className: e("nxgt-toolbar-item",
|
|
1284
|
+
className: e("nxgt-toolbar-item", u),
|
|
1506
1285
|
children: n
|
|
1507
|
-
}, C =
|
|
1286
|
+
}, C = f === void 0 ? /* @__PURE__ */ F(R, { ...S }) : /* @__PURE__ */ F(Ne, {
|
|
1508
1287
|
...S,
|
|
1509
|
-
value:
|
|
1510
|
-
}), w =
|
|
1288
|
+
value: f
|
|
1289
|
+
}), w = c?.kind === "popover" ? /* @__PURE__ */ F(yn, {
|
|
1511
1290
|
own: y,
|
|
1512
|
-
folded:
|
|
1291
|
+
folded: m
|
|
1513
1292
|
}) : null;
|
|
1514
|
-
return i ? /* @__PURE__ */ I(P, { children: [w, /* @__PURE__ */ F(
|
|
1293
|
+
return i ? /* @__PURE__ */ I(P, { children: [w, /* @__PURE__ */ F(a, {
|
|
1515
1294
|
content: r,
|
|
1516
|
-
open:
|
|
1295
|
+
open: g && !m,
|
|
1517
1296
|
onOpenChange: (e) => {
|
|
1518
1297
|
e && v?.current || _(e);
|
|
1519
1298
|
},
|
|
@@ -1522,10 +1301,10 @@ function $({ icon: n, label: r, tooltip: i = !0, toggle: a, priority: o, more: s
|
|
|
1522
1301
|
}
|
|
1523
1302
|
//#endregion
|
|
1524
1303
|
//#region lib/components/ui/actions/toolbar/toolbar-items.tsx
|
|
1525
|
-
function
|
|
1304
|
+
function wn(e) {
|
|
1526
1305
|
return /* @__PURE__ */ F($, { ...e });
|
|
1527
1306
|
}
|
|
1528
|
-
function
|
|
1307
|
+
function Tn({ pressed: e, defaultPressed: t = !1, onPressedChange: n, onClick: r, ...i }) {
|
|
1529
1308
|
let [a, o] = N(t), s = e ?? a;
|
|
1530
1309
|
return /* @__PURE__ */ F($, {
|
|
1531
1310
|
...i,
|
|
@@ -1536,16 +1315,16 @@ function Tr({ pressed: e, defaultPressed: t = !1, onPressedChange: n, onClick: r
|
|
|
1536
1315
|
}
|
|
1537
1316
|
});
|
|
1538
1317
|
}
|
|
1539
|
-
function
|
|
1540
|
-
let { props: n } =
|
|
1318
|
+
function En({ className: t }) {
|
|
1319
|
+
let { props: n } = V({
|
|
1541
1320
|
label: "",
|
|
1542
1321
|
separator: !0
|
|
1543
1322
|
});
|
|
1544
|
-
return /* @__PURE__ */ F(
|
|
1323
|
+
return /* @__PURE__ */ F(je, {
|
|
1545
1324
|
...n,
|
|
1546
1325
|
"data-slot": "toolbar-separator",
|
|
1547
1326
|
className: e("nxgt-toolbar-separator", t)
|
|
1548
1327
|
});
|
|
1549
1328
|
}
|
|
1550
1329
|
//#endregion
|
|
1551
|
-
export {
|
|
1330
|
+
export { Ie as _, xn as a, Me as b, Xt as c, Re as d, V as f, Le as g, Fe as h, $ as i, xt as l, ze as m, En as n, pn as o, Be as p, Tn as r, fn as s, wn as t, B as u, Pe as v, R as y };
|