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