@nxgt/material 3.7.5 → 3.8.1
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 +26 -0
- 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-CDrQCOsU.js → components-DNUYg8QM.js} +18625 -18532
- 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/account-menu/account-menu-avatar.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 +41 -6
- 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 +26 -0
- 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
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { r as e } from "./dist-DVRQkaTK.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import * as r from "react-dom";
|
|
5
|
+
//#region ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
6
|
+
var i = Object.defineProperty, a = (e, t) => i(e, "name", {
|
|
7
|
+
value: t,
|
|
8
|
+
configurable: !0
|
|
9
|
+
}), o = [
|
|
10
|
+
"a",
|
|
11
|
+
"button",
|
|
12
|
+
"div",
|
|
13
|
+
"form",
|
|
14
|
+
"h2",
|
|
15
|
+
"h3",
|
|
16
|
+
"img",
|
|
17
|
+
"input",
|
|
18
|
+
"label",
|
|
19
|
+
"li",
|
|
20
|
+
"nav",
|
|
21
|
+
"ol",
|
|
22
|
+
"p",
|
|
23
|
+
"select",
|
|
24
|
+
"span",
|
|
25
|
+
"svg",
|
|
26
|
+
"ul"
|
|
27
|
+
].reduce((r, i) => {
|
|
28
|
+
let a = e(`Primitive.${i}`), o = t.forwardRef((e, t) => {
|
|
29
|
+
let { asChild: r, ...o } = e, s = r ? a : i;
|
|
30
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, {
|
|
31
|
+
...o,
|
|
32
|
+
ref: t
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return o.displayName = `Primitive.${i}`, {
|
|
36
|
+
...r,
|
|
37
|
+
[i]: o
|
|
38
|
+
};
|
|
39
|
+
}, {});
|
|
40
|
+
function s(e, t) {
|
|
41
|
+
e && r.flushSync(() => e.dispatchEvent(t));
|
|
42
|
+
}
|
|
43
|
+
a(s, "dispatchDiscreteCustomEvent");
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../../node_modules/@radix-ui/react-context/dist/index.mjs
|
|
46
|
+
var c = Object.defineProperty, l = (e, t) => c(e, "name", {
|
|
47
|
+
value: t,
|
|
48
|
+
configurable: !0
|
|
49
|
+
});
|
|
50
|
+
// @__NO_SIDE_EFFECTS__
|
|
51
|
+
function u(e, r) {
|
|
52
|
+
let i = t.createContext(r);
|
|
53
|
+
i.displayName = e + "Context";
|
|
54
|
+
let a = /* @__PURE__ */ l((e) => {
|
|
55
|
+
let { children: r, ...a } = e, o = t.useMemo(() => a, Object.values(a));
|
|
56
|
+
return /* @__PURE__ */ n(i.Provider, {
|
|
57
|
+
value: o,
|
|
58
|
+
children: r
|
|
59
|
+
});
|
|
60
|
+
}, "Provider");
|
|
61
|
+
a.displayName = e + "Provider";
|
|
62
|
+
function o(n, a = {}) {
|
|
63
|
+
let { optional: o = !1 } = a, s = t.useContext(i);
|
|
64
|
+
if (s) return s;
|
|
65
|
+
if (r !== void 0) return r;
|
|
66
|
+
if (!o) throw Error(`\`${n}\` must be used within \`${e}\``);
|
|
67
|
+
}
|
|
68
|
+
return l(o, "useContext"), [a, o];
|
|
69
|
+
}
|
|
70
|
+
l(u, "createContext");
|
|
71
|
+
// @__NO_SIDE_EFFECTS__
|
|
72
|
+
function d(e, r = []) {
|
|
73
|
+
let i = [];
|
|
74
|
+
function a(r, a) {
|
|
75
|
+
let o = t.createContext(a);
|
|
76
|
+
o.displayName = r + "Context";
|
|
77
|
+
let s = i.length;
|
|
78
|
+
i = [...i, a];
|
|
79
|
+
let c = /* @__PURE__ */ l((r) => {
|
|
80
|
+
let { scope: i, children: a, ...c } = r, l = i?.[e]?.[s] || o, u = t.useMemo(() => c, Object.values(c));
|
|
81
|
+
return /* @__PURE__ */ n(l.Provider, {
|
|
82
|
+
value: u,
|
|
83
|
+
children: a
|
|
84
|
+
});
|
|
85
|
+
}, "Provider");
|
|
86
|
+
c.displayName = r + "Provider";
|
|
87
|
+
function u(n, i, c = {}) {
|
|
88
|
+
let { optional: l = !1 } = c, u = i?.[e]?.[s] || o, d = t.useContext(u);
|
|
89
|
+
if (d) return d;
|
|
90
|
+
if (a !== void 0) return a;
|
|
91
|
+
if (!l) throw Error(`\`${n}\` must be used within \`${r}\``);
|
|
92
|
+
}
|
|
93
|
+
return l(u, "useContext"), [c, u];
|
|
94
|
+
}
|
|
95
|
+
l(a, "createContext");
|
|
96
|
+
let o = /* @__PURE__ */ l(() => {
|
|
97
|
+
let n = i.map((e) => t.createContext(e));
|
|
98
|
+
return /* @__PURE__ */ l(function(r) {
|
|
99
|
+
let i = r?.[e] || n;
|
|
100
|
+
return t.useMemo(() => ({ [`__scope${e}`]: {
|
|
101
|
+
...r,
|
|
102
|
+
[e]: i
|
|
103
|
+
} }), [r, i]);
|
|
104
|
+
}, "useScope");
|
|
105
|
+
}, "createScope");
|
|
106
|
+
return o.scopeName = e, [a, f(o, ...r)];
|
|
107
|
+
}
|
|
108
|
+
l(d, "createContextScope");
|
|
109
|
+
function f(...e) {
|
|
110
|
+
let n = e[0];
|
|
111
|
+
if (e.length === 1) return n;
|
|
112
|
+
let r = /* @__PURE__ */ l(() => {
|
|
113
|
+
let r = e.map((e) => ({
|
|
114
|
+
useScope: e(),
|
|
115
|
+
scopeName: e.scopeName
|
|
116
|
+
}));
|
|
117
|
+
return /* @__PURE__ */ l(function(e) {
|
|
118
|
+
let i = r.reduce((t, { useScope: n, scopeName: r }) => {
|
|
119
|
+
let i = n(e)[`__scope${r}`];
|
|
120
|
+
return {
|
|
121
|
+
...t,
|
|
122
|
+
...i
|
|
123
|
+
};
|
|
124
|
+
}, {});
|
|
125
|
+
return t.useMemo(() => ({ [`__scope${n.scopeName}`]: i }), [i]);
|
|
126
|
+
}, "useComposedScopes");
|
|
127
|
+
}, "createScope");
|
|
128
|
+
return r.scopeName = n.scopeName, r;
|
|
129
|
+
}
|
|
130
|
+
l(f, "composeContextScopes");
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
133
|
+
var p = Object.defineProperty, m = (e, t) => p(e, "name", {
|
|
134
|
+
value: t,
|
|
135
|
+
configurable: !0
|
|
136
|
+
}), h = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
137
|
+
function g(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
138
|
+
return /* @__PURE__ */ m(function(r) {
|
|
139
|
+
if (e?.(r), n === !1 || !r || !r.defaultPrevented) return t?.(r);
|
|
140
|
+
}, "handleEvent");
|
|
141
|
+
}
|
|
142
|
+
m(g, "composeEventHandlers");
|
|
143
|
+
function _(e) {
|
|
144
|
+
if (!h) throw Error("Cannot access window outside of the DOM");
|
|
145
|
+
return e?.ownerDocument?.defaultView ?? window;
|
|
146
|
+
}
|
|
147
|
+
m(_, "getOwnerWindow");
|
|
148
|
+
function v(e) {
|
|
149
|
+
if (!h) throw Error("Cannot access document outside of the DOM");
|
|
150
|
+
return e?.ownerDocument ?? document;
|
|
151
|
+
}
|
|
152
|
+
m(v, "getOwnerDocument");
|
|
153
|
+
function y(e, t = !1) {
|
|
154
|
+
let { activeElement: n } = v(e);
|
|
155
|
+
if (!n?.nodeName) return null;
|
|
156
|
+
if (b(n) && n.contentDocument) return y(n.contentDocument.body, t);
|
|
157
|
+
if (t) {
|
|
158
|
+
let e = n.getAttribute("aria-activedescendant");
|
|
159
|
+
if (e) {
|
|
160
|
+
let t = v(n).getElementById(e);
|
|
161
|
+
if (t) return t;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return n;
|
|
165
|
+
}
|
|
166
|
+
m(y, "getActiveElement");
|
|
167
|
+
function b(e) {
|
|
168
|
+
return e.tagName === "IFRAME";
|
|
169
|
+
}
|
|
170
|
+
m(b, "isFrame");
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region ../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
173
|
+
var x = globalThis?.document ? t.useLayoutEffect : () => {}, S = Object.defineProperty, C = (e, t) => S(e, "name", {
|
|
174
|
+
value: t,
|
|
175
|
+
configurable: !0
|
|
176
|
+
}), w = t.useEffectEvent, T = t.useInsertionEffect;
|
|
177
|
+
function E(e) {
|
|
178
|
+
if (typeof w == "function") return w(e);
|
|
179
|
+
let n = t.useRef(() => {
|
|
180
|
+
throw Error("Cannot call an event handler while rendering.");
|
|
181
|
+
});
|
|
182
|
+
return typeof T == "function" ? T(() => {
|
|
183
|
+
n.current = e;
|
|
184
|
+
}) : x(() => {
|
|
185
|
+
n.current = e;
|
|
186
|
+
}), t.useMemo(() => ((...e) => n.current?.(...e)), []);
|
|
187
|
+
}
|
|
188
|
+
C(E, "useEffectEvent");
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region ../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
191
|
+
var D = Object.defineProperty, O = (e, t) => D(e, "name", {
|
|
192
|
+
value: t,
|
|
193
|
+
configurable: !0
|
|
194
|
+
}), k = t.useInsertionEffect || x;
|
|
195
|
+
function A({ prop: e, defaultProp: n, onChange: r = /* @__PURE__ */ O(() => {}, "onChange"), caller: i }) {
|
|
196
|
+
let [a, o, s] = j({
|
|
197
|
+
defaultProp: n,
|
|
198
|
+
onChange: r
|
|
199
|
+
}), c = e !== void 0;
|
|
200
|
+
return [c ? e : a, t.useCallback((t) => {
|
|
201
|
+
if (c) {
|
|
202
|
+
let n = M(t) ? t(e) : t;
|
|
203
|
+
n !== e && s.current?.(n);
|
|
204
|
+
} else o(t);
|
|
205
|
+
}, [
|
|
206
|
+
c,
|
|
207
|
+
e,
|
|
208
|
+
o,
|
|
209
|
+
s
|
|
210
|
+
])];
|
|
211
|
+
}
|
|
212
|
+
O(A, "useControllableState");
|
|
213
|
+
function j({ defaultProp: e, onChange: n }) {
|
|
214
|
+
let [r, i] = t.useState(e), a = t.useRef(r), o = t.useRef(n);
|
|
215
|
+
return k(() => {
|
|
216
|
+
o.current = n;
|
|
217
|
+
}, [n]), t.useEffect(() => {
|
|
218
|
+
a.current !== r && (o.current?.(r), a.current = r);
|
|
219
|
+
}, [r, a]), [
|
|
220
|
+
r,
|
|
221
|
+
i,
|
|
222
|
+
o
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
O(j, "useUncontrolledState");
|
|
226
|
+
function M(e) {
|
|
227
|
+
return typeof e == "function";
|
|
228
|
+
}
|
|
229
|
+
O(M, "isFunction");
|
|
230
|
+
var N = Symbol("RADIX:SYNC_STATE");
|
|
231
|
+
function P(e, n, r, i) {
|
|
232
|
+
let { prop: a, defaultProp: o, onChange: s, caller: c } = n, l = a !== void 0, u = E(s), d = [{
|
|
233
|
+
...r,
|
|
234
|
+
state: o
|
|
235
|
+
}];
|
|
236
|
+
i && d.push(i);
|
|
237
|
+
let [f, p] = t.useReducer((t, n) => {
|
|
238
|
+
if (n.type === N) return {
|
|
239
|
+
...t,
|
|
240
|
+
state: n.state
|
|
241
|
+
};
|
|
242
|
+
let r = e(t, n);
|
|
243
|
+
return l && !Object.is(r.state, t.state) && u(r.state), r;
|
|
244
|
+
}, ...d), m = f.state, h = t.useRef(m);
|
|
245
|
+
t.useEffect(() => {
|
|
246
|
+
h.current !== m && (h.current = m, l || u(m));
|
|
247
|
+
}, [
|
|
248
|
+
m,
|
|
249
|
+
h,
|
|
250
|
+
l
|
|
251
|
+
]);
|
|
252
|
+
let g = t.useMemo(() => a === void 0 ? f : {
|
|
253
|
+
...f,
|
|
254
|
+
state: a
|
|
255
|
+
}, [f, a]);
|
|
256
|
+
return t.useEffect(() => {
|
|
257
|
+
l && !Object.is(a, f.state) && p({
|
|
258
|
+
type: N,
|
|
259
|
+
state: a
|
|
260
|
+
});
|
|
261
|
+
}, [
|
|
262
|
+
a,
|
|
263
|
+
f.state,
|
|
264
|
+
l
|
|
265
|
+
]), [g, p];
|
|
266
|
+
}
|
|
267
|
+
O(P, "useControllableStateReducer");
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region ../../node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
270
|
+
var F = Object.defineProperty, I = (e, t) => F(e, "name", {
|
|
271
|
+
value: t,
|
|
272
|
+
configurable: !0
|
|
273
|
+
});
|
|
274
|
+
function L(e, n) {
|
|
275
|
+
return t.useReducer((e, t) => n[e][t] ?? e, e);
|
|
276
|
+
}
|
|
277
|
+
I(L, "useStateMachine");
|
|
278
|
+
var R = /* @__PURE__ */ I((e) => {
|
|
279
|
+
let { present: n, children: r } = e, i = z(n), a = typeof r == "function" ? r({ present: i.isPresent }) : t.Children.only(r), o = V(i.ref, U(a));
|
|
280
|
+
return typeof r == "function" || i.isPresent ? t.cloneElement(a, { ref: o }) : null;
|
|
281
|
+
}, "Presence");
|
|
282
|
+
function z(e) {
|
|
283
|
+
let [n, r] = t.useState(), i = t.useRef(null), a = t.useRef(e), o = t.useRef("none"), s = t.useRef(void 0), [c, l] = L(e ? "mounted" : "unmounted", {
|
|
284
|
+
mounted: {
|
|
285
|
+
UNMOUNT: "unmounted",
|
|
286
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
287
|
+
},
|
|
288
|
+
unmountSuspended: {
|
|
289
|
+
MOUNT: "mounted",
|
|
290
|
+
ANIMATION_END: "unmounted"
|
|
291
|
+
},
|
|
292
|
+
unmounted: { MOUNT: "mounted" }
|
|
293
|
+
});
|
|
294
|
+
return t.useEffect(() => {
|
|
295
|
+
c === "mounted" ? (o.current = s.current ?? H(i.current), s.current = void 0) : o.current = "none";
|
|
296
|
+
}, [c]), x(() => {
|
|
297
|
+
let t = i.current, n = a.current;
|
|
298
|
+
if (n !== e) {
|
|
299
|
+
let r = o.current, i = H(t);
|
|
300
|
+
e ? (s.current = i, l("MOUNT")) : i === "none" || t?.display === "none" ? l("UNMOUNT") : l(n && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
301
|
+
}
|
|
302
|
+
}, [e, l]), x(() => {
|
|
303
|
+
if (n) {
|
|
304
|
+
let e, t = n.ownerDocument.defaultView ?? window, r = /* @__PURE__ */ I((r) => {
|
|
305
|
+
let o = H(i.current).includes(CSS.escape(r.animationName));
|
|
306
|
+
if (r.target === n && o && (l("ANIMATION_END"), !a.current)) {
|
|
307
|
+
let r = n.style.animationFillMode;
|
|
308
|
+
n.style.animationFillMode = "forwards", e = t.setTimeout(() => {
|
|
309
|
+
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = r);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}, "handleAnimationEnd"), s = /* @__PURE__ */ I((e) => {
|
|
313
|
+
e.target === n && (o.current = H(i.current));
|
|
314
|
+
}, "handleAnimationStart");
|
|
315
|
+
return n.addEventListener("animationstart", s), n.addEventListener("animationcancel", r), n.addEventListener("animationend", r), () => {
|
|
316
|
+
t.clearTimeout(e), n.removeEventListener("animationstart", s), n.removeEventListener("animationcancel", r), n.removeEventListener("animationend", r);
|
|
317
|
+
};
|
|
318
|
+
} else l("ANIMATION_END");
|
|
319
|
+
}, [n, l]), {
|
|
320
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
321
|
+
ref: t.useCallback((e) => {
|
|
322
|
+
if (e) {
|
|
323
|
+
let t = getComputedStyle(e);
|
|
324
|
+
i.current = t, s.current = H(t);
|
|
325
|
+
} else i.current = null;
|
|
326
|
+
r(e);
|
|
327
|
+
}, [])
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
I(z, "usePresence");
|
|
331
|
+
function B(e, t) {
|
|
332
|
+
if (typeof e == "function") return e(t);
|
|
333
|
+
e != null && (e.current = t);
|
|
334
|
+
}
|
|
335
|
+
I(B, "setRef");
|
|
336
|
+
function V(...e) {
|
|
337
|
+
let n = t.useRef(e);
|
|
338
|
+
return n.current = e, t.useCallback((e) => {
|
|
339
|
+
let t = n.current, r = !1, i = t.map((t) => {
|
|
340
|
+
let n = B(t, e);
|
|
341
|
+
return !r && typeof n == "function" && (r = !0), n;
|
|
342
|
+
});
|
|
343
|
+
if (r) return () => {
|
|
344
|
+
for (let e = 0; e < i.length; e++) {
|
|
345
|
+
let n = i[e];
|
|
346
|
+
typeof n == "function" ? n() : B(t[e], null);
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}, []);
|
|
350
|
+
}
|
|
351
|
+
I(V, "useStableComposedRefs");
|
|
352
|
+
function H(e) {
|
|
353
|
+
return e?.animationName || "none";
|
|
354
|
+
}
|
|
355
|
+
I(H, "getAnimationName");
|
|
356
|
+
function U(e) {
|
|
357
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
358
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
359
|
+
}
|
|
360
|
+
I(U, "getElementRef");
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region ../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
363
|
+
var W = Object.defineProperty, G = (e, t) => W(e, "name", {
|
|
364
|
+
value: t,
|
|
365
|
+
configurable: !0
|
|
366
|
+
}), K = t.useId || (() => void 0), q = 0;
|
|
367
|
+
function J(e) {
|
|
368
|
+
let [n, r] = t.useState(K());
|
|
369
|
+
return x(() => {
|
|
370
|
+
e || r((e) => e ?? String(q++));
|
|
371
|
+
}, [e]), e || (n ? `radix-${n}` : "");
|
|
372
|
+
}
|
|
373
|
+
G(J, "useId");
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region ../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
376
|
+
var Y = Object.defineProperty, X = (e, t) => Y(e, "name", {
|
|
377
|
+
value: t,
|
|
378
|
+
configurable: !0
|
|
379
|
+
});
|
|
380
|
+
function Z(e) {
|
|
381
|
+
let n = t.useRef(e);
|
|
382
|
+
return t.useEffect(() => {
|
|
383
|
+
n.current = e;
|
|
384
|
+
}), t.useMemo(() => ((...e) => n.current?.(...e)), []);
|
|
385
|
+
}
|
|
386
|
+
X(Z, "useCallbackRef");
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region ../../node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
389
|
+
var Q = Object.defineProperty, ee = (e, t) => Q(e, "name", {
|
|
390
|
+
value: t,
|
|
391
|
+
configurable: !0
|
|
392
|
+
});
|
|
393
|
+
function $(e) {
|
|
394
|
+
let [n, r] = t.useState(void 0);
|
|
395
|
+
return x(() => {
|
|
396
|
+
if (e) {
|
|
397
|
+
r({
|
|
398
|
+
width: e.offsetWidth,
|
|
399
|
+
height: e.offsetHeight
|
|
400
|
+
});
|
|
401
|
+
let t = new ResizeObserver((t) => {
|
|
402
|
+
if (!Array.isArray(t) || !t.length) return;
|
|
403
|
+
let n = t[0], i, a;
|
|
404
|
+
if ("borderBoxSize" in n) {
|
|
405
|
+
let e = n.borderBoxSize, t = Array.isArray(e) ? e[0] : e;
|
|
406
|
+
i = t.inlineSize, a = t.blockSize;
|
|
407
|
+
} else i = e.offsetWidth, a = e.offsetHeight;
|
|
408
|
+
r({
|
|
409
|
+
width: i,
|
|
410
|
+
height: a
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
return t.observe(e, { box: "border-box" }), () => t.unobserve(e);
|
|
414
|
+
} else r(void 0);
|
|
415
|
+
}, [e]), n;
|
|
416
|
+
}
|
|
417
|
+
ee($, "useSize");
|
|
418
|
+
//#endregion
|
|
419
|
+
export { A as a, d as c, R as i, o as l, Z as n, x as o, J as r, g as s, $ as t, s as u };
|
package/dist/dnd.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as e } from "./compose-refs-DZ0iIVF-.js";
|
|
2
|
-
import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v } from "./sortable-provider-
|
|
2
|
+
import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v } from "./sortable-provider-pVaEZzty.js";
|
|
3
3
|
export { r as CSS, u as DndOverlay, i as DndProvider, g as DragHandle, p as Draggable, n as DraggableDroppable, l as Droppable, f as Sortable, _ as SortableProvider, o as arrayMove, c as closestCenter, e as composeRefs, m as horizontalListSortingStrategy, h as insertIds, s as pointerWithin, t as rectIntersection, v as useDndActiveId, a as useDndItem, d as verticalListSortingStrategy };
|