@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,11 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import { a
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as
|
|
2
|
+
import { t } from "./utils-BLfntITJ.js";
|
|
3
|
+
import { i as n, o as r } from "./dist-DVRQkaTK.js";
|
|
4
|
+
import { a as i, i as a, n as o, r as s, t as c } from "./dist-DWZXlCZR.js";
|
|
5
|
+
import { a as l, i as u, n as d, r as f, t as p } from "./dist-DHdUUM1w.js";
|
|
6
|
+
import { a as m, c as h, d as g, i as _, l as v, o as y, r as b, t as x, u as S } from "./floating-ui.dom-KkZSW8_E.js";
|
|
7
|
+
import { t as C } from "./dist-DkQbkF9T.js";
|
|
8
|
+
import { t as w } from "./use-material-translation-CD6QoVal.js";
|
|
7
9
|
import * as T from "react";
|
|
8
10
|
import { useLayoutEffect as E, useRef as D, useSyncExternalStore as O } from "react";
|
|
9
11
|
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
@@ -25,7 +27,7 @@ var N = Object.defineProperty, P = (e, t) => N(e, "name", {
|
|
|
25
27
|
whiteSpace: "nowrap",
|
|
26
28
|
wordWrap: "normal"
|
|
27
29
|
}), I = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
28
|
-
return /* @__PURE__ */ k(
|
|
30
|
+
return /* @__PURE__ */ k(a.span, {
|
|
29
31
|
...e,
|
|
30
32
|
ref: t,
|
|
31
33
|
style: {
|
|
@@ -42,11 +44,11 @@ var N = Object.defineProperty, P = (e, t) => N(e, "name", {
|
|
|
42
44
|
branches: /* @__PURE__ */ new Set(),
|
|
43
45
|
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
44
46
|
}), U = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ R(function(e, t) {
|
|
45
|
-
let { disableOutsidePointerEvents: n = !1, deferPointerDownOutside:
|
|
46
|
-
|
|
47
|
+
let { disableOutsidePointerEvents: n = !1, deferPointerDownOutside: i = !1, onEscapeKeyDown: o, onPointerDownOutside: c, onFocusOutside: l, onInteractOutside: u, onDismiss: f, ...p } = e, m = T.useContext(H), [h, g] = T.useState(null), _ = h?.ownerDocument ?? globalThis?.document, [, v] = T.useState({}), y = r(t, g), b = Array.from(m.layers), [x] = [...m.layersWithOutsidePointerEventsDisabled].slice(-1), S = x ? b.indexOf(x) : -1, C = h ? b.indexOf(h) : -1, w = m.layersWithOutsidePointerEventsDisabled.size > 0, E = C >= S, D = T.useRef(!1), O = ne((e) => {
|
|
48
|
+
c?.(e), u?.(e), e.defaultPrevented || f?.();
|
|
47
49
|
}, {
|
|
48
50
|
ownerDocument: _,
|
|
49
|
-
deferPointerDownOutside:
|
|
51
|
+
deferPointerDownOutside: i,
|
|
50
52
|
isDeferredPointerDownOutsideRef: D,
|
|
51
53
|
dismissableSurfaces: m.dismissableSurfaces,
|
|
52
54
|
shouldHandlePointerDownOutside: T.useCallback((e) => {
|
|
@@ -55,11 +57,11 @@ var N = Object.defineProperty, P = (e, t) => N(e, "name", {
|
|
|
55
57
|
return E && !t;
|
|
56
58
|
}, [m.branches, E])
|
|
57
59
|
}), A = re((e) => {
|
|
58
|
-
if (
|
|
60
|
+
if (i && D.current) return;
|
|
59
61
|
let t = e.target;
|
|
60
|
-
[...m.branches].some((e) => e.contains(t)) || (
|
|
61
|
-
}, _), j = h ? C === b.length - 1 : !1, M =
|
|
62
|
-
e.key === "Escape" && (
|
|
62
|
+
[...m.branches].some((e) => e.contains(t)) || (l?.(e), u?.(e), e.defaultPrevented || f?.());
|
|
63
|
+
}, _), j = h ? C === b.length - 1 : !1, M = d((e) => {
|
|
64
|
+
e.key === "Escape" && (o?.(e), !e.defaultPrevented && f && (e.preventDefault(), f()));
|
|
63
65
|
});
|
|
64
66
|
return T.useEffect(() => {
|
|
65
67
|
if (j) return _.addEventListener("keydown", M, { capture: !0 }), () => _.removeEventListener("keydown", M, { capture: !0 });
|
|
@@ -81,16 +83,16 @@ var N = Object.defineProperty, P = (e, t) => N(e, "name", {
|
|
|
81
83
|
}, [h, m]), T.useEffect(() => {
|
|
82
84
|
let e = /* @__PURE__ */ R(() => v({}), "handleUpdate");
|
|
83
85
|
return document.addEventListener(z, e), () => document.removeEventListener(z, e);
|
|
84
|
-
}, []), /* @__PURE__ */ k(
|
|
86
|
+
}, []), /* @__PURE__ */ k(a.div, {
|
|
85
87
|
...p,
|
|
86
88
|
ref: y,
|
|
87
89
|
style: {
|
|
88
90
|
pointerEvents: w ? E ? "auto" : "none" : void 0,
|
|
89
91
|
...e.style
|
|
90
92
|
},
|
|
91
|
-
onFocusCapture:
|
|
92
|
-
onBlurCapture:
|
|
93
|
-
onPointerDownCapture:
|
|
93
|
+
onFocusCapture: s(e.onFocusCapture, A.onFocusCapture),
|
|
94
|
+
onBlurCapture: s(e.onBlurCapture, A.onBlurCapture),
|
|
95
|
+
onPointerDownCapture: s(e.onPointerDownCapture, O.onPointerDownCapture)
|
|
94
96
|
});
|
|
95
97
|
}, "DismissableLayer"));
|
|
96
98
|
function W() {
|
|
@@ -104,41 +106,41 @@ function W() {
|
|
|
104
106
|
R(W, "useDismissableLayerSurface");
|
|
105
107
|
var te = /* @__PURE__ */ R(() => !0, "IS_TRUE");
|
|
106
108
|
function ne(e, t) {
|
|
107
|
-
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = te } = t, s =
|
|
109
|
+
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = te } = t, s = d(e), c = T.useRef(!1), l = T.useRef(!1), u = T.useRef(/* @__PURE__ */ new Map()), f = T.useRef(() => {});
|
|
108
110
|
return T.useEffect(() => {
|
|
109
111
|
function e() {
|
|
110
|
-
|
|
112
|
+
l.current = !1, i.current = !1, u.current.clear();
|
|
111
113
|
}
|
|
112
114
|
R(e, "resetOutsideInteraction");
|
|
113
115
|
function t() {
|
|
114
|
-
return Array.from(
|
|
116
|
+
return Array.from(u.current.values()).some(Boolean);
|
|
115
117
|
}
|
|
116
118
|
R(t, "isOutsideInteractionIntercepted");
|
|
117
|
-
function
|
|
118
|
-
if (!
|
|
119
|
+
function d(e) {
|
|
120
|
+
if (!l.current) return;
|
|
119
121
|
let t = e.target;
|
|
120
|
-
t instanceof Node && [...a].some((e) => e.contains(t)) ||
|
|
121
|
-
|
|
122
|
+
t instanceof Node && [...a].some((e) => e.contains(t)) || u.current.set(e.type, !0), e.type === "click" && window.setTimeout(() => {
|
|
123
|
+
l.current && f.current();
|
|
122
124
|
}, 0);
|
|
123
125
|
}
|
|
124
|
-
R(
|
|
126
|
+
R(d, "handleInteractionCapture");
|
|
125
127
|
function p(e) {
|
|
126
|
-
|
|
128
|
+
l.current && u.current.set(e.type, !1);
|
|
127
129
|
}
|
|
128
130
|
R(p, "handleInteractionBubble");
|
|
129
131
|
let m = /* @__PURE__ */ R((a) => {
|
|
130
132
|
if (a.target && !c.current) {
|
|
131
|
-
let
|
|
133
|
+
let d = function() {
|
|
132
134
|
n.removeEventListener("click", f.current);
|
|
133
135
|
let r = t();
|
|
134
136
|
e(), r || K(ee, s, p, { discrete: !0 });
|
|
135
137
|
};
|
|
136
|
-
if (R(
|
|
138
|
+
if (R(d, "handleAndDispatchPointerDownOutsideEvent"), !o(a.target)) {
|
|
137
139
|
n.removeEventListener("click", f.current), e(), c.current = !1;
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
142
|
let p = { originalEvent: a };
|
|
141
|
-
|
|
143
|
+
l.current = !0, i.current = r && a.button === 0, u.current.clear(), !r || a.button !== 0 ? d() : (n.removeEventListener("click", f.current), f.current = d, n.addEventListener("click", f.current, { once: !0 }));
|
|
142
144
|
} else n.removeEventListener("click", f.current), e();
|
|
143
145
|
c.current = !1;
|
|
144
146
|
}, "handlePointerDown"), h = [
|
|
@@ -149,13 +151,13 @@ function ne(e, t) {
|
|
|
149
151
|
"touchend",
|
|
150
152
|
"click"
|
|
151
153
|
];
|
|
152
|
-
for (let e of h) n.addEventListener(e,
|
|
154
|
+
for (let e of h) n.addEventListener(e, d, !0), n.addEventListener(e, p);
|
|
153
155
|
let g = window.setTimeout(() => {
|
|
154
156
|
n.addEventListener("pointerdown", m);
|
|
155
157
|
}, 0);
|
|
156
158
|
return () => {
|
|
157
159
|
window.clearTimeout(g), n.removeEventListener("pointerdown", m), n.removeEventListener("click", f.current);
|
|
158
|
-
for (let e of h) n.removeEventListener(e,
|
|
160
|
+
for (let e of h) n.removeEventListener(e, d, !0), n.removeEventListener(e, p);
|
|
159
161
|
};
|
|
160
162
|
}, [
|
|
161
163
|
n,
|
|
@@ -168,7 +170,7 @@ function ne(e, t) {
|
|
|
168
170
|
}
|
|
169
171
|
R(ne, "usePointerDownOutside");
|
|
170
172
|
function re(e, t = globalThis?.document) {
|
|
171
|
-
let n =
|
|
173
|
+
let n = d(e), r = T.useRef(!1);
|
|
172
174
|
return T.useEffect(() => {
|
|
173
175
|
let e = /* @__PURE__ */ R((e) => {
|
|
174
176
|
e.target && !r.current && K(B, n, { originalEvent: e }, { discrete: !1 });
|
|
@@ -186,12 +188,12 @@ function G() {
|
|
|
186
188
|
}
|
|
187
189
|
R(G, "dispatchUpdate");
|
|
188
190
|
function K(e, t, n, { discrete: r }) {
|
|
189
|
-
let
|
|
191
|
+
let a = n.originalEvent.target, o = new CustomEvent(e, {
|
|
190
192
|
bubbles: !1,
|
|
191
193
|
cancelable: !0,
|
|
192
194
|
detail: n
|
|
193
195
|
});
|
|
194
|
-
t &&
|
|
196
|
+
t && a.addEventListener(e, t, { once: !0 }), r ? i(a, o) : a.dispatchEvent(o);
|
|
195
197
|
}
|
|
196
198
|
R(K, "handleAndDispatchCustomEvent");
|
|
197
199
|
//#endregion
|
|
@@ -200,13 +202,13 @@ var ie = Object.defineProperty, ae = /* @__PURE__ */ T.forwardRef(/* @__PURE__ *
|
|
|
200
202
|
value: t,
|
|
201
203
|
configurable: !0
|
|
202
204
|
}))(function(e, t) {
|
|
203
|
-
let { container: n, ...r } = e, [i,
|
|
204
|
-
|
|
205
|
-
let
|
|
206
|
-
return
|
|
205
|
+
let { container: n, ...r } = e, [i, s] = T.useState(!1);
|
|
206
|
+
o(() => s(!0), []);
|
|
207
|
+
let c = n || i && globalThis?.document?.body;
|
|
208
|
+
return c ? M.createPortal(/* @__PURE__ */ k(a.div, {
|
|
207
209
|
...r,
|
|
208
210
|
ref: t
|
|
209
|
-
}),
|
|
211
|
+
}), c) : null;
|
|
210
212
|
}, "Portal")), q = typeof document < "u" ? E : function() {};
|
|
211
213
|
function J(e, t) {
|
|
212
214
|
if (e === t) return !0;
|
|
@@ -253,10 +255,10 @@ function le(e) {
|
|
|
253
255
|
isPositioned: !1
|
|
254
256
|
}), [f, p] = T.useState(r);
|
|
255
257
|
J(f, r) || p(r);
|
|
256
|
-
let [m, h] = T.useState(null), [g,
|
|
258
|
+
let [m, h] = T.useState(null), [g, v] = T.useState(null), y = T.useCallback((e) => {
|
|
257
259
|
e !== C.current && (C.current = e, h(e));
|
|
258
260
|
}, []), b = T.useCallback((e) => {
|
|
259
|
-
e !== w.current && (w.current = e,
|
|
261
|
+
e !== w.current && (w.current = e, v(e));
|
|
260
262
|
}, []), x = a || m, S = o || g, C = T.useRef(null), w = T.useRef(null), E = T.useRef(u), D = c != null, O = ce(c), k = ce(i), A = ce(l), j = T.useCallback(() => {
|
|
261
263
|
if (!C.current || !w.current) return;
|
|
262
264
|
let e = {
|
|
@@ -264,7 +266,7 @@ function le(e) {
|
|
|
264
266
|
strategy: n,
|
|
265
267
|
middleware: f
|
|
266
268
|
};
|
|
267
|
-
k.current && (e.platform = k.current),
|
|
269
|
+
k.current && (e.platform = k.current), _(C.current, w.current, e).then((e) => {
|
|
268
270
|
let t = {
|
|
269
271
|
...e,
|
|
270
272
|
isPositioned: A.current !== !1
|
|
@@ -356,48 +358,48 @@ var ue = (e) => {
|
|
|
356
358
|
options: e,
|
|
357
359
|
fn(n) {
|
|
358
360
|
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
359
|
-
return r && t(r) ? r.current == null ? {} :
|
|
361
|
+
return r && t(r) ? r.current == null ? {} : x({
|
|
360
362
|
element: r.current,
|
|
361
363
|
padding: i
|
|
362
|
-
}).fn(n) : r ?
|
|
364
|
+
}).fn(n) : r ? x({
|
|
363
365
|
element: r,
|
|
364
366
|
padding: i
|
|
365
367
|
}).fn(n) : {};
|
|
366
368
|
}
|
|
367
369
|
};
|
|
368
370
|
}, de = (e, t) => {
|
|
369
|
-
let n =
|
|
371
|
+
let n = v(e);
|
|
370
372
|
return {
|
|
371
373
|
name: n.name,
|
|
372
374
|
fn: n.fn,
|
|
373
375
|
options: [e, t]
|
|
374
376
|
};
|
|
375
377
|
}, fe = (e, t) => {
|
|
376
|
-
let n =
|
|
378
|
+
let n = S(e);
|
|
377
379
|
return {
|
|
378
380
|
name: n.name,
|
|
379
381
|
fn: n.fn,
|
|
380
382
|
options: [e, t]
|
|
381
383
|
};
|
|
382
384
|
}, pe = (e, t) => ({
|
|
383
|
-
fn:
|
|
385
|
+
fn: h(e).fn,
|
|
384
386
|
options: [e, t]
|
|
385
387
|
}), me = (e, t) => {
|
|
386
|
-
let n =
|
|
388
|
+
let n = m(e);
|
|
387
389
|
return {
|
|
388
390
|
name: n.name,
|
|
389
391
|
fn: n.fn,
|
|
390
392
|
options: [e, t]
|
|
391
393
|
};
|
|
392
394
|
}, he = (e, t) => {
|
|
393
|
-
let n =
|
|
395
|
+
let n = g(e);
|
|
394
396
|
return {
|
|
395
397
|
name: n.name,
|
|
396
398
|
fn: n.fn,
|
|
397
399
|
options: [e, t]
|
|
398
400
|
};
|
|
399
401
|
}, ge = (e, t) => {
|
|
400
|
-
let n =
|
|
402
|
+
let n = y(e);
|
|
401
403
|
return {
|
|
402
404
|
name: n.name,
|
|
403
405
|
fn: n.fn,
|
|
@@ -414,9 +416,9 @@ var ue = (e) => {
|
|
|
414
416
|
value: t,
|
|
415
417
|
configurable: !0
|
|
416
418
|
}))(function(e, t) {
|
|
417
|
-
let { children: n, width: r = 10, height: i = 5, ...
|
|
418
|
-
return /* @__PURE__ */ k(
|
|
419
|
-
...
|
|
419
|
+
let { children: n, width: r = 10, height: i = 5, ...o } = e;
|
|
420
|
+
return /* @__PURE__ */ k(a.svg, {
|
|
421
|
+
...o,
|
|
420
422
|
ref: t,
|
|
421
423
|
width: r,
|
|
422
424
|
height: i,
|
|
@@ -427,7 +429,7 @@ var ue = (e) => {
|
|
|
427
429
|
}, "Arrow")), be = Object.defineProperty, Y = (e, t) => be(e, "name", {
|
|
428
430
|
value: t,
|
|
429
431
|
configurable: !0
|
|
430
|
-
}), xe = "Popper", [Se, Ce] =
|
|
432
|
+
}), xe = "Popper", [Se, Ce] = l(xe), [we, Te] = Se(xe), Ee = /* @__PURE__ */ Y((e) => {
|
|
431
433
|
let { __scopePopper: t, children: n } = e, [r, i] = T.useState(null), [a, o] = T.useState(void 0);
|
|
432
434
|
return /* @__PURE__ */ k(we, {
|
|
433
435
|
scope: t,
|
|
@@ -438,23 +440,23 @@ var ue = (e) => {
|
|
|
438
440
|
children: n
|
|
439
441
|
});
|
|
440
442
|
}, "Popper"), De = "PopperAnchor", Oe = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
441
|
-
let { __scopePopper: n, virtualRef:
|
|
442
|
-
|
|
443
|
+
let { __scopePopper: n, virtualRef: i, ...o } = e, s = Te(De, n), c = T.useRef(null), l = s.onAnchorChange, u = r(t, T.useCallback((e) => {
|
|
444
|
+
c.current = e, e && l(e);
|
|
443
445
|
}, [l])), d = T.useRef(null);
|
|
444
446
|
T.useEffect(() => {
|
|
445
|
-
if (!
|
|
447
|
+
if (!i) return;
|
|
446
448
|
let e = d.current;
|
|
447
|
-
d.current =
|
|
449
|
+
d.current = i.current, e !== d.current && l(d.current);
|
|
448
450
|
});
|
|
449
|
-
let f =
|
|
450
|
-
return
|
|
451
|
+
let f = s.placementState && X(s.placementState), p = f?.[0], m = f?.[1];
|
|
452
|
+
return i ? null : /* @__PURE__ */ k(a.div, {
|
|
451
453
|
"data-radix-popper-side": p,
|
|
452
454
|
"data-radix-popper-align": m,
|
|
453
|
-
...
|
|
455
|
+
...o,
|
|
454
456
|
ref: u
|
|
455
457
|
});
|
|
456
458
|
}, "PopperAnchor")), ke = "PopperContent", [Ae, je] = Se(ke), Me = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
457
|
-
let { __scopePopper: n, side:
|
|
459
|
+
let { __scopePopper: n, side: i = "bottom", sideOffset: s = 0, align: c = "center", alignOffset: l = 0, arrowPadding: u = 0, avoidCollisions: f = !0, collisionBoundary: m = [], collisionPadding: h = 0, sticky: g = "partial", hideWhenDetached: _ = !1, updatePositionStrategy: v = "optimized", onPlaced: y, ...x } = e, S = Te(ke, n), [C, w] = T.useState(null), E = r(t, w), [D, O] = T.useState(null), A = p(D), j = A?.width ?? 0, M = A?.height ?? 0, N = i + (c === "center" ? "" : "-" + c), P = typeof h == "number" ? h : {
|
|
458
460
|
top: 0,
|
|
459
461
|
right: 0,
|
|
460
462
|
bottom: 0,
|
|
@@ -467,12 +469,12 @@ var ue = (e) => {
|
|
|
467
469
|
}, { refs: R, floatingStyles: z, placement: ee, isPositioned: B, middlewareData: V } = le({
|
|
468
470
|
strategy: "fixed",
|
|
469
471
|
placement: N,
|
|
470
|
-
whileElementsMounted: /* @__PURE__ */ Y((...e) =>
|
|
472
|
+
whileElementsMounted: /* @__PURE__ */ Y((...e) => b(...e, { animationFrame: v === "always" }), "whileElementsMounted"),
|
|
471
473
|
elements: { reference: S.anchor },
|
|
472
474
|
middleware: [
|
|
473
475
|
de({
|
|
474
|
-
mainAxis:
|
|
475
|
-
alignmentAxis:
|
|
476
|
+
mainAxis: s + M,
|
|
477
|
+
alignmentAxis: l
|
|
476
478
|
}),
|
|
477
479
|
f && fe({
|
|
478
480
|
mainAxis: !0,
|
|
@@ -490,7 +492,7 @@ var ue = (e) => {
|
|
|
490
492
|
}),
|
|
491
493
|
D && _e({
|
|
492
494
|
element: D,
|
|
493
|
-
padding:
|
|
495
|
+
padding: u
|
|
494
496
|
}),
|
|
495
497
|
Le({
|
|
496
498
|
arrowWidth: j,
|
|
@@ -503,15 +505,15 @@ var ue = (e) => {
|
|
|
503
505
|
})
|
|
504
506
|
]
|
|
505
507
|
}), H = S.setPlacementState;
|
|
506
|
-
|
|
508
|
+
o(() => (H(ee), () => {
|
|
507
509
|
H(void 0);
|
|
508
510
|
}), [ee, H]);
|
|
509
|
-
let [U, W] = X(ee), te =
|
|
510
|
-
|
|
511
|
+
let [U, W] = X(ee), te = d(y);
|
|
512
|
+
o(() => {
|
|
511
513
|
B && te?.();
|
|
512
514
|
}, [B, te]);
|
|
513
515
|
let ne = V.arrow?.x, re = V.arrow?.y, G = V.arrow?.centerOffset !== 0, [K, ie] = T.useState();
|
|
514
|
-
return
|
|
516
|
+
return o(() => {
|
|
515
517
|
C && ie(window.getComputedStyle(C).zIndex);
|
|
516
518
|
}, [C]), /* @__PURE__ */ k("div", {
|
|
517
519
|
ref: R.setFloating,
|
|
@@ -536,14 +538,14 @@ var ue = (e) => {
|
|
|
536
538
|
arrowX: ne,
|
|
537
539
|
arrowY: re,
|
|
538
540
|
shouldHideArrow: G,
|
|
539
|
-
children: /* @__PURE__ */ k(
|
|
541
|
+
children: /* @__PURE__ */ k(a.div, {
|
|
540
542
|
"data-side": U,
|
|
541
543
|
"data-align": W,
|
|
542
|
-
...
|
|
544
|
+
...x,
|
|
543
545
|
ref: E,
|
|
544
546
|
style: {
|
|
545
|
-
...
|
|
546
|
-
animation: B ?
|
|
547
|
+
...x.style,
|
|
548
|
+
animation: B ? x.style?.animation : "none"
|
|
547
549
|
}
|
|
548
550
|
})
|
|
549
551
|
})
|
|
@@ -627,7 +629,7 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
627
629
|
}), Ue = Object.defineProperty, Z = (e, t) => Ue(e, "name", {
|
|
628
630
|
value: t,
|
|
629
631
|
configurable: !0
|
|
630
|
-
}), [We, Ge] =
|
|
632
|
+
}), [We, Ge] = l("Tooltip", [Ce]), Ke = Ce(), qe = "TooltipProvider", Je = 700, Ye = "tooltip.open", [Xe, Ze] = We(qe), Qe = /* @__PURE__ */ Z((e) => {
|
|
631
633
|
let { __scopeTooltip: t, delayDuration: n = Je, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = T.useRef(!0), s = T.useRef(!1), c = T.useRef(0);
|
|
632
634
|
return T.useEffect(() => {
|
|
633
635
|
let e = c.current;
|
|
@@ -650,11 +652,11 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
650
652
|
children: a
|
|
651
653
|
});
|
|
652
654
|
}, "TooltipProvider"), $e = "Tooltip", [et, Q] = We($e), tt = /* @__PURE__ */ Z((e) => {
|
|
653
|
-
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange:
|
|
655
|
+
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: s } = e, l = Ze($e, e.__scopeTooltip), u = Ke(t), [d, p] = T.useState(null), [m, h] = T.useState(void 0), g = f(), _ = T.useRef(0), v = o ?? l.disableHoverableContent, y = s ?? l.delayDuration, b = T.useRef(!1), [x, S] = c({
|
|
654
656
|
prop: r,
|
|
655
657
|
defaultProp: i ?? !1,
|
|
656
658
|
onChange: /* @__PURE__ */ Z((e) => {
|
|
657
|
-
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Ye))) : l.onClose(),
|
|
659
|
+
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Ye))) : l.onClose(), a?.(e);
|
|
658
660
|
}, "onChange"),
|
|
659
661
|
caller: $e
|
|
660
662
|
}), C = T.useMemo(() => x ? b.current ? "delayed-open" : "instant-open" : "closed", [x]), w = T.useCallback(() => {
|
|
@@ -678,7 +680,7 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
678
680
|
setContentId: h,
|
|
679
681
|
open: x,
|
|
680
682
|
stateAttribute: C,
|
|
681
|
-
trigger:
|
|
683
|
+
trigger: d,
|
|
682
684
|
onTriggerChange: p,
|
|
683
685
|
onTriggerEnter: T.useCallback(() => {
|
|
684
686
|
l.isOpenDelayedRef.current ? D() : w();
|
|
@@ -697,29 +699,29 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
697
699
|
})
|
|
698
700
|
});
|
|
699
701
|
}, "Tooltip"), nt = "TooltipTrigger", rt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
700
|
-
let { __scopeTooltip: n, ...
|
|
702
|
+
let { __scopeTooltip: n, ...i } = e, o = Q(nt, n), c = Ze(nt, n), l = Ke(n), u = r(t, T.useRef(null), o.onTriggerChange), d = T.useRef(!1), f = T.useRef(!1), p = T.useCallback(() => d.current = !1, []);
|
|
701
703
|
return T.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ k(ze, {
|
|
702
704
|
asChild: !0,
|
|
703
|
-
...
|
|
704
|
-
children: /* @__PURE__ */ k(
|
|
705
|
-
"aria-describedby":
|
|
706
|
-
"data-state":
|
|
707
|
-
...
|
|
708
|
-
ref:
|
|
709
|
-
onPointerMove:
|
|
710
|
-
e.pointerType !== "touch" && !
|
|
705
|
+
...l,
|
|
706
|
+
children: /* @__PURE__ */ k(a.button, {
|
|
707
|
+
"aria-describedby": o.open ? o.contentId : void 0,
|
|
708
|
+
"data-state": o.stateAttribute,
|
|
709
|
+
...i,
|
|
710
|
+
ref: u,
|
|
711
|
+
onPointerMove: s(e.onPointerMove, (e) => {
|
|
712
|
+
e.pointerType !== "touch" && !f.current && !c.isPointerInTransitRef.current && (o.onTriggerEnter(), f.current = !0);
|
|
711
713
|
}),
|
|
712
|
-
onPointerLeave:
|
|
713
|
-
|
|
714
|
+
onPointerLeave: s(e.onPointerLeave, () => {
|
|
715
|
+
o.onTriggerLeave(), f.current = !1;
|
|
714
716
|
}),
|
|
715
|
-
onPointerDown:
|
|
716
|
-
|
|
717
|
+
onPointerDown: s(e.onPointerDown, () => {
|
|
718
|
+
o.open && o.onClose(), d.current = !0, document.addEventListener("pointerup", p, { once: !0 });
|
|
717
719
|
}),
|
|
718
|
-
onFocus:
|
|
719
|
-
|
|
720
|
+
onFocus: s(e.onFocus, () => {
|
|
721
|
+
d.current || o.onOpen();
|
|
720
722
|
}),
|
|
721
|
-
onBlur:
|
|
722
|
-
onClick:
|
|
723
|
+
onBlur: s(e.onBlur, o.onClose),
|
|
724
|
+
onClick: s(e.onClick, o.onClose)
|
|
723
725
|
})
|
|
724
726
|
});
|
|
725
727
|
}, "TooltipTrigger")), it = "TooltipPortal", [at, ot] = We(it, { forceMount: void 0 }), st = /* @__PURE__ */ Z((e) => {
|
|
@@ -727,7 +729,7 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
727
729
|
return /* @__PURE__ */ k(at, {
|
|
728
730
|
scope: t,
|
|
729
731
|
forceMount: n,
|
|
730
|
-
children: /* @__PURE__ */ k(
|
|
732
|
+
children: /* @__PURE__ */ k(u, {
|
|
731
733
|
present: n || a.open,
|
|
732
734
|
children: /* @__PURE__ */ k(ae, {
|
|
733
735
|
asChild: !0,
|
|
@@ -738,7 +740,7 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
738
740
|
});
|
|
739
741
|
}, "TooltipPortal"), $ = "TooltipContent", ct = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
740
742
|
let n = ot($, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = Q($, e.__scopeTooltip);
|
|
741
|
-
return /* @__PURE__ */ k(
|
|
743
|
+
return /* @__PURE__ */ k(u, {
|
|
742
744
|
present: r || o.open,
|
|
743
745
|
children: o.disableHoverableContent ? /* @__PURE__ */ k(dt, {
|
|
744
746
|
side: i,
|
|
@@ -751,7 +753,7 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
751
753
|
})
|
|
752
754
|
});
|
|
753
755
|
}, "TooltipContent")), lt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
754
|
-
let n = Q($, e.__scopeTooltip),
|
|
756
|
+
let n = Q($, e.__scopeTooltip), i = Ze($, e.__scopeTooltip), a = T.useRef(null), o = r(t, a), [s, c] = T.useState(null), { trigger: l, onClose: u } = n, d = a.current, { onPointerInTransitChange: f } = i, p = T.useCallback(() => {
|
|
755
757
|
c(null), f(!1);
|
|
756
758
|
}, [f]), m = T.useCallback((e, t) => {
|
|
757
759
|
let n = e.currentTarget, r = {
|
|
@@ -793,35 +795,35 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
793
795
|
...e,
|
|
794
796
|
ref: o
|
|
795
797
|
});
|
|
796
|
-
}, "TooltipContentHoverable")), ut =
|
|
797
|
-
let { __scopeTooltip: n, children: r, "aria-label": i, id: a, onEscapeKeyDown:
|
|
798
|
+
}, "TooltipContentHoverable")), ut = n("TooltipContent"), dt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
799
|
+
let { __scopeTooltip: n, children: r, "aria-label": i, id: a, onEscapeKeyDown: s, onPointerDownOutside: c, ...l } = e, u = Q($, n), d = Ke(n), { onClose: f } = u;
|
|
798
800
|
T.useEffect(() => (document.addEventListener(Ye, f), () => document.removeEventListener(Ye, f)), [f]), T.useEffect(() => {
|
|
799
|
-
if (
|
|
801
|
+
if (u.trigger) {
|
|
800
802
|
let e = /* @__PURE__ */ Z((e) => {
|
|
801
|
-
e.target instanceof Node && e.target.contains(
|
|
803
|
+
e.target instanceof Node && e.target.contains(u.trigger) && f();
|
|
802
804
|
}, "handleScroll");
|
|
803
805
|
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
|
|
804
806
|
}
|
|
805
|
-
}, [
|
|
806
|
-
let { setContentId: p } =
|
|
807
|
-
return
|
|
807
|
+
}, [u.trigger, f]);
|
|
808
|
+
let { setContentId: p } = u;
|
|
809
|
+
return o(() => (p(a), () => {
|
|
808
810
|
p(void 0);
|
|
809
811
|
}), [a, p]), /* @__PURE__ */ k(U, {
|
|
810
812
|
asChild: !0,
|
|
811
813
|
disableOutsidePointerEvents: !1,
|
|
812
|
-
onEscapeKeyDown:
|
|
813
|
-
onPointerDownOutside:
|
|
814
|
+
onEscapeKeyDown: s,
|
|
815
|
+
onPointerDownOutside: c,
|
|
814
816
|
onFocusOutside: (e) => e.preventDefault(),
|
|
815
817
|
onDismiss: f,
|
|
816
818
|
children: /* @__PURE__ */ A(Be, {
|
|
817
|
-
"data-state":
|
|
819
|
+
"data-state": u.stateAttribute,
|
|
818
820
|
role: i ? void 0 : "tooltip",
|
|
819
|
-
id: i ? void 0 :
|
|
821
|
+
id: i ? void 0 : u.contentId,
|
|
820
822
|
...d,
|
|
821
|
-
...
|
|
823
|
+
...l,
|
|
822
824
|
ref: t,
|
|
823
825
|
style: {
|
|
824
|
-
...
|
|
826
|
+
...l.style,
|
|
825
827
|
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
826
828
|
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
827
829
|
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -829,7 +831,7 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
829
831
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
830
832
|
},
|
|
831
833
|
children: [/* @__PURE__ */ k(ut, { children: r }), i ? /* @__PURE__ */ k(I, {
|
|
832
|
-
id:
|
|
834
|
+
id: u.contentId,
|
|
833
835
|
role: "tooltip",
|
|
834
836
|
children: i
|
|
835
837
|
}) : null]
|
|
@@ -988,14 +990,14 @@ function kt({ delayDuration: e = 0, ...t }) {
|
|
|
988
990
|
...t
|
|
989
991
|
});
|
|
990
992
|
}
|
|
991
|
-
function At({ content: e, children:
|
|
993
|
+
function At({ content: e, children: n, className: r, container: i, side: a, ...o }) {
|
|
992
994
|
return /* @__PURE__ */ A(jt, {
|
|
993
995
|
...o,
|
|
994
996
|
children: [/* @__PURE__ */ k(Mt, {
|
|
995
997
|
asChild: !0,
|
|
996
|
-
children:
|
|
998
|
+
children: n
|
|
997
999
|
}), /* @__PURE__ */ k(Nt, {
|
|
998
|
-
className:
|
|
1000
|
+
className: t("max-w-sm text-wrap", r),
|
|
999
1001
|
container: i,
|
|
1000
1002
|
side: a,
|
|
1001
1003
|
children: e
|
|
@@ -1015,8 +1017,8 @@ function Mt({ ...e }) {
|
|
|
1015
1017
|
...e
|
|
1016
1018
|
});
|
|
1017
1019
|
}
|
|
1018
|
-
function Nt({ className: e, sideOffset:
|
|
1019
|
-
let l = Ot(), u = D(null), d =
|
|
1020
|
+
function Nt({ className: e, sideOffset: n = 0, children: i, container: a, ref: o, onEscapeKeyDown: s, ...c }) {
|
|
1021
|
+
let l = Ot(), u = D(null), d = r(u, o);
|
|
1020
1022
|
return /* @__PURE__ */ k(St, {
|
|
1021
1023
|
container: a ?? l,
|
|
1022
1024
|
children: /* @__PURE__ */ A(Ct, {
|
|
@@ -1026,44 +1028,16 @@ function Nt({ className: e, sideOffset: t = 0, children: r, container: a, ref: o
|
|
|
1026
1028
|
},
|
|
1027
1029
|
"data-slot": "tooltip-content",
|
|
1028
1030
|
"data-pw": "tooltip-content",
|
|
1029
|
-
sideOffset:
|
|
1030
|
-
className:
|
|
1031
|
+
sideOffset: n,
|
|
1032
|
+
className: t("bg-tooltip text-tooltip-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded px-3 py-1.5 text-xs text-balance", e),
|
|
1031
1033
|
...c,
|
|
1032
|
-
children: [
|
|
1034
|
+
children: [i, /* @__PURE__ */ k(wt, { className: "bg-tooltip fill-tooltip z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
1033
1035
|
})
|
|
1034
1036
|
});
|
|
1035
1037
|
}
|
|
1036
1038
|
//#endregion
|
|
1037
|
-
//#region
|
|
1038
|
-
var Pt = (
|
|
1039
|
-
if (t?.variants == null) return Ft(e, n?.class, n?.className);
|
|
1040
|
-
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
1041
|
-
let t = n?.[e], a = i?.[e];
|
|
1042
|
-
if (t === null) return null;
|
|
1043
|
-
let o = Pt(t) || Pt(a);
|
|
1044
|
-
return r[e][o];
|
|
1045
|
-
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
1046
|
-
let [n, r] = t;
|
|
1047
|
-
return r === void 0 || (e[n] = r), e;
|
|
1048
|
-
}, {});
|
|
1049
|
-
return Ft(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
1050
|
-
let { class: n, className: r, ...a } = t;
|
|
1051
|
-
return Object.entries(a).every((e) => {
|
|
1052
|
-
let [t, n] = e;
|
|
1053
|
-
return Array.isArray(n) ? n.includes({
|
|
1054
|
-
...i,
|
|
1055
|
-
...o
|
|
1056
|
-
}[t]) : {
|
|
1057
|
-
...i,
|
|
1058
|
-
...o
|
|
1059
|
-
}[t] === n;
|
|
1060
|
-
}) ? [
|
|
1061
|
-
...e,
|
|
1062
|
-
n,
|
|
1063
|
-
r
|
|
1064
|
-
] : e;
|
|
1065
|
-
}, []), n?.class, n?.className);
|
|
1066
|
-
}, Lt = It("transition-all duration-500", {
|
|
1039
|
+
//#region lib/components/ui/feedback/spinner/spinner-variants.ts
|
|
1040
|
+
var Pt = C("transition-all duration-500", {
|
|
1067
1041
|
variants: {
|
|
1068
1042
|
variant: {
|
|
1069
1043
|
1: "",
|
|
@@ -1251,21 +1225,21 @@ var Pt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ft = t, It =
|
|
|
1251
1225
|
});
|
|
1252
1226
|
//#endregion
|
|
1253
1227
|
//#region lib/components/ui/feedback/spinner/spinner.tsx
|
|
1254
|
-
function
|
|
1228
|
+
function Ft({ variant: e = "1", color: n, className: r, ...i }) {
|
|
1255
1229
|
let { t: a } = w();
|
|
1256
1230
|
return e === "4" ? /* @__PURE__ */ k("svg", {
|
|
1257
1231
|
viewBox: "0 0 800 800",
|
|
1258
1232
|
"data-slot": "spinner",
|
|
1259
1233
|
"data-variant": e,
|
|
1260
|
-
"data-color":
|
|
1261
|
-
className:
|
|
1234
|
+
"data-color": n,
|
|
1235
|
+
className: t("size-14", r),
|
|
1262
1236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1263
1237
|
role: "img",
|
|
1264
1238
|
"aria-label": i["aria-label"] ?? a("material.spinner.loading", "Loading..."),
|
|
1265
1239
|
children: /* @__PURE__ */ k("circle", {
|
|
1266
|
-
className:
|
|
1240
|
+
className: t("spin2", Pt({
|
|
1267
1241
|
variant: e,
|
|
1268
|
-
color:
|
|
1242
|
+
color: n
|
|
1269
1243
|
})),
|
|
1270
1244
|
cx: "400",
|
|
1271
1245
|
cy: "400",
|
|
@@ -1278,14 +1252,14 @@ function Rt({ variant: e = "1", color: t, className: r, ...i }) {
|
|
|
1278
1252
|
}) : /* @__PURE__ */ k("div", {
|
|
1279
1253
|
"data-slot": "spinner",
|
|
1280
1254
|
"data-variant": e,
|
|
1281
|
-
"data-color":
|
|
1282
|
-
className:
|
|
1255
|
+
"data-color": n,
|
|
1256
|
+
className: t("size-12 border-[2px] rounded-full animate-spin", Pt({
|
|
1283
1257
|
variant: e,
|
|
1284
|
-
color:
|
|
1258
|
+
color: n,
|
|
1285
1259
|
className: r
|
|
1286
1260
|
})),
|
|
1287
1261
|
...i
|
|
1288
1262
|
});
|
|
1289
1263
|
}
|
|
1290
1264
|
//#endregion
|
|
1291
|
-
export {
|
|
1265
|
+
export { W as C, U as S, de as _, Mt as a, le as b, He as c, Be as d, Re as f, pe as g, ge as h, kt as i, ze as l, me as m, At as n, Ot as o, Ce as p, Nt as r, bt as s, Ft as t, Ve as u, fe as v, F as w, ae as x, he as y };
|