@nxgt/material 3.62.0 → 3.63.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 +14 -0
- package/README.md +1 -1
- package/dist/alert-dialog-RHm6WtQj.js +189 -0
- package/dist/{async-slice-HJY_VJjD.js → async-slice-DmX59NyA.js} +3 -4
- package/dist/{button-7BuUCGRm.js → button-DfS_amfQ.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-kQOrHlDX.js → chip-Cbndukko.js} +2 -2
- package/dist/{code-editor-Ckc9TTCM.js → code-editor-B0tN8Ha_.js} +11 -11
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-rCPB0Xee.js → code-language-items-andgHKrM.js} +2 -2
- package/dist/components/ui/layout/sidebar/sidebar-tokens.css +13 -1
- package/dist/{components-TDDUQ1Y0.js → components-Cm2doOJS.js} +14345 -14224
- package/dist/components.js +28 -26
- package/dist/dialog-Bd7Hid2L.js +219 -0
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CiobN1wi.js → dropdown-menu-_SyVmSuy.js} +1 -1
- package/dist/editor.js +707 -706
- package/dist/{empty-state-DA517HAb.js → empty-state-D-2ZMXXJ.js} +2 -2
- package/dist/escape-owner-DpaP0lm1.js +19 -0
- package/dist/{field-blur-DdvY0NQQ.js → field-blur-DyOByjzw.js} +1 -1
- package/dist/{field-blur-context-DbJQZkEB.js → field-blur-context-DPe5_Nv5.js} +1 -1
- package/dist/hooks-a7_exKWS.js +329 -0
- package/dist/hooks.js +3 -3
- package/dist/{hover-card-DPs9huSs.js → hover-card-D_0smKBQ.js} +2 -2
- package/dist/i18n.js +8 -10
- package/dist/{icon-badge-C646JTOI.js → icon-badge-CBCU3ySF.js} +14 -14
- package/dist/{icon-button-DvP0Gy3j.js → icon-button-hKHsWTAt.js} +1 -1
- package/dist/lib/components/ui/feedback/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/unsaved-dialog/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/unsaved-dialog/unsaved-dialog.d.ts +20 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/textarea-field/textarea-footer.d.ts +2 -1
- package/dist/lib/components/ui/widgets/education/questions/index.d.ts +3 -1
- package/dist/lib/components/ui/widgets/education/questions/partials/question-content.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/partials/question-top.d.ts +6 -0
- package/dist/lib/components/ui/widgets/education/questions/question-long-text.d.ts +5 -0
- package/dist/lib/components/ui/widgets/education/questions/question-media-content.d.ts +24 -0
- package/dist/lib/components/ui/widgets/education/questions/question-media-helpers.d.ts +11 -0
- package/dist/lib/components/ui/widgets/education/questions/question-media-view.d.ts +18 -0
- package/dist/lib/components/ui/widgets/education/questions/question-media-view.types.d.ts +32 -0
- package/dist/lib/components/ui/widgets/education/questions/question-options.d.ts +2 -2
- package/dist/lib/components/ui/widgets/education/questions/question-text.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/question.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/types.d.ts +38 -1
- package/dist/lib/components/ui/widgets/education/questions/use-reload-focus.d.ts +13 -0
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/unsaved-guard-rules.d.ts +30 -0
- package/dist/lib/hooks/use-react-router-block.d.ts +11 -0
- package/dist/lib/hooks/use-unsaved-guard/guard-core.d.ts +30 -0
- package/dist/lib/hooks/use-unsaved-guard/index.d.ts +3 -0
- package/dist/lib/hooks/use-unsaved-guard/types.d.ts +63 -0
- package/dist/lib/hooks/use-unsaved-guard/use-discard-guard.d.ts +15 -0
- package/dist/lib/hooks/use-unsaved-guard/use-unsaved-guard.d.ts +19 -0
- package/dist/lib/i18n/resources/en/en.d.ts +20 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +21 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +20 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +21 -1
- package/dist/lib/i18n/resources/resources.d.ts +40 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +42 -43
- package/dist/map.js +63 -63
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -2
- package/dist/{public-BYsrhyPW.js → public-D8JGp3PH.js} +823 -822
- package/dist/{rich-code-block-WJxDWPPY.js → rich-code-block-0R3bidsM.js} +5 -5
- package/dist/{sortable-provider-oPjlhlZo.js → sortable-provider-B75v53sB.js} +2 -2
- package/dist/{spinner-C5lObWXT.js → spinner-CAnpF3RK.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-CPEq5JG-.js → theme-toggle-pQ5F602V.js} +1 -1
- package/dist/{toolbar-items-ByvXcMHm.js → toolbar-items-_ezD5B0r.js} +4 -4
- package/dist/translate-material-CvZK8_S6.js +96 -0
- package/dist/{stored-language-B-tiWZU2.js → translator-Caf-d96e.js} +2497 -8
- package/dist/{escape-owner-r57kuPjn.js → typography-CEK19bj8.js} +17 -34
- package/dist/{use-chat-composer-CzOVaIed.js → use-chat-composer-Dpvi_-CR.js} +5164 -5338
- package/dist/{use-heading-spy-BOtygPFu.js → use-heading-spy-mmcyEGmm.js} +186 -71
- package/dist/{use-material-translation-B5j3jZs7.js → use-material-translation-C_1cWRzW.js} +1 -2
- package/dist/use-return-focus-1ZIchrBM.js +269 -0
- package/docs/components/feedback-and-status.md +23 -0
- package/docs/components/navigation-and-layout.md +4 -3
- package/docs/components/rich-widgets.md +73 -1
- package/docs/guides/helpers.md +63 -0
- package/docs/guides/theming.md +13 -3
- package/docs/previews/feedback-status-unsaveddialog.webp +0 -0
- package/lib/components/ui/layout/sidebar/sidebar-tokens.css +13 -1
- package/package.json +1 -1
- package/dist/dialog-yfPkLqUQ.js +0 -482
- package/dist/hooks-CGnqFngB.js +0 -187
- package/dist/i18n-provider-BehR6cU7.js +0 -79
- package/dist/translate-material-tUaLZUmT.js +0 -20
- package/dist/translator-B9XjUDRu.js +0 -2451
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as e } from "./spinner-
|
|
2
|
-
import { c as t, n, t as r } from "./dropdown-menu-
|
|
3
|
-
import { t as i } from "./use-material-translation-
|
|
4
|
-
import { a, i as o, n as s, o as c, t as l } from "./code-language-items-
|
|
1
|
+
import { r as e } from "./spinner-CAnpF3RK.js";
|
|
2
|
+
import { c as t, n, t as r } from "./dropdown-menu-_SyVmSuy.js";
|
|
3
|
+
import { t as i } from "./use-material-translation-C_1cWRzW.js";
|
|
4
|
+
import { a, i as o, n as s, o as c, t as l } from "./code-language-items-andgHKrM.js";
|
|
5
5
|
import { i as u, n as d, r as f, s as p } from "./dist-C3GR7kJd.js";
|
|
6
6
|
import { t as m } from "./code-block-spec-CGLKRhwD.js";
|
|
7
7
|
import { Suspense as h, lazy as g, useEffect as _, useRef as v, useState as y } from "react";
|
|
@@ -143,7 +143,7 @@ function M({ node: e, editor: t, updateAttributes: n, editable: r, wrap: a, onWr
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region lib/components/ui/widgets/editor/extensions/code/code-block-open.tsx
|
|
146
|
-
var N = g(() => import("./code-editor-
|
|
146
|
+
var N = g(() => import("./code-editor-B0tN8Ha_.js").then((e) => e.n).then((e) => ({ default: e.CodeEditor })));
|
|
147
147
|
function P() {
|
|
148
148
|
let { t: e } = i();
|
|
149
149
|
return /* @__PURE__ */ b("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { t } from "./dist-DVRQkaTK.js";
|
|
3
|
-
import { t as n } from "./use-material-translation-
|
|
4
|
-
import { t as r } from "./icon-button-
|
|
3
|
+
import { t as n } from "./use-material-translation-C_1cWRzW.js";
|
|
4
|
+
import { t as r } from "./icon-button-hKHsWTAt.js";
|
|
5
5
|
import { t as i } from "./compose-refs-DZ0iIVF-.js";
|
|
6
6
|
import a, { cloneElement as o, createContext as s, forwardRef as c, memo as l, useCallback as u, useContext as d, useEffect as f, useId as p, useLayoutEffect as m, useMemo as h, useReducer as g, useRef as _, useState as v } from "react";
|
|
7
7
|
import { jsx as y } from "react/jsx-runtime";
|
|
@@ -3,7 +3,7 @@ import { n as t, t as n } from "./utils-BLfntITJ.js";
|
|
|
3
3
|
import { i as r, o as i } from "./dist-DVRQkaTK.js";
|
|
4
4
|
import { a, c as o, i as s, l as c, n as l, o as u, r as d, s as f, t as p, u as m } from "./dist-lmHmz_bu.js";
|
|
5
5
|
import { a as h, c as g, d as _, i as v, l as y, o as b, r as x, t as S, u as C } from "./floating-ui.dom-KkZSW8_E.js";
|
|
6
|
-
import { t as w } from "./use-material-translation-
|
|
6
|
+
import { t as w } from "./use-material-translation-C_1cWRzW.js";
|
|
7
7
|
import * as T from "react";
|
|
8
8
|
import { useLayoutEffect as E, useRef as D, useSyncExternalStore as O } from "react";
|
|
9
9
|
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
package/dist/theme-picker.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./bubble-input-B7BVd9fX.js";
|
|
3
3
|
import { a as s, r as c } from "./icon-sprites-CaYXzOL4.js";
|
|
4
|
-
import { t as l } from "./use-material-translation-
|
|
4
|
+
import { t as l } from "./use-material-translation-C_1cWRzW.js";
|
|
5
5
|
import { t as u } from "./use-theme-BCLireTd.js";
|
|
6
6
|
import { a as d, r as f } from "./theme-context-Cofk6vgs.js";
|
|
7
|
-
import { t as p } from "./theme-toggle-
|
|
7
|
+
import { t as p } from "./theme-toggle-pQ5F602V.js";
|
|
8
8
|
import { n as m, t as h } from "./nxgt-theme-DA1IQe0O.js";
|
|
9
9
|
import { useContext as g } from "react";
|
|
10
10
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./use-material-translation-
|
|
1
|
+
import { t as e } from "./use-material-translation-C_1cWRzW.js";
|
|
2
2
|
import { i as t } from "./theme-store-BdPp43cV.js";
|
|
3
3
|
import { n, t as r } from "./use-theme-BCLireTd.js";
|
|
4
4
|
import { r as i } from "./theme-context-Cofk6vgs.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { o as t, r as n, t as r } from "./dist-DVRQkaTK.js";
|
|
3
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 { C as u, S as d, d as f, f as p, m, p as h, r as g, u as _ } from "./spinner-
|
|
4
|
+
import { C as u, S as d, d as f, f as p, m, p as h, r as g, u as _ } from "./spinner-CAnpF3RK.js";
|
|
5
5
|
import { i as v, n as y, r as b, t as x } from "./dist-C4wtXCjf.js";
|
|
6
6
|
import { a as S, c as C, l as w, o as T, r as ee, s as te, t as ne } from "./in-dialog-Vwkyp-M5.js";
|
|
7
|
-
import { A as re, M as ie, N as ae, b as oe, d as se, f as ce, i as le, j as ue, l as de, n as fe, o as pe, r as me, t as he, u as ge, y as _e } from "./dropdown-menu-
|
|
7
|
+
import { A as re, M as ie, N as ae, b as oe, d as se, f as ce, i as le, j as ue, l as de, n as fe, o as pe, r as me, t as he, u as ge, y as _e } from "./dropdown-menu-_SyVmSuy.js";
|
|
8
8
|
import { a as ve, n as ye, r as be, t as xe } from "./dist-B7RjY7SL.js";
|
|
9
9
|
import { t as Se } from "./warn-once-C_e47JM8.js";
|
|
10
|
-
import { t as Ce } from "./use-material-translation-
|
|
11
|
-
import { i as we } from "./escape-owner-
|
|
10
|
+
import { t as Ce } from "./use-material-translation-C_1cWRzW.js";
|
|
11
|
+
import { i as we } from "./escape-owner-DpaP0lm1.js";
|
|
12
12
|
import * as E from "react";
|
|
13
13
|
import { createContext as D, useCallback as Te, useContext as O, useEffect as k, useId as Ee, useLayoutEffect as A, useMemo as j, useReducer as De, useRef as M, useState as N } from "react";
|
|
14
14
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { a as e, l as t, r as n, s as r, t as i, u as a } from "./translator-Caf-d96e.js";
|
|
2
|
+
import { createContext as o, useCallback as s, useContext as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
3
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/i18n/material-resources-registry.ts
|
|
5
|
+
var m = [], h = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
function g(e, t) {
|
|
7
|
+
let n = {
|
|
8
|
+
resources: e,
|
|
9
|
+
language: t
|
|
10
|
+
};
|
|
11
|
+
m.push(n);
|
|
12
|
+
let r = () => {
|
|
13
|
+
let e = m.lastIndexOf(n);
|
|
14
|
+
e !== -1 && m.splice(e, 1);
|
|
15
|
+
};
|
|
16
|
+
return h.set(r, n), r;
|
|
17
|
+
}
|
|
18
|
+
function _(e, t, n) {
|
|
19
|
+
let r = h.get(e);
|
|
20
|
+
r && (r.resources = t, r.language = n);
|
|
21
|
+
}
|
|
22
|
+
function v() {
|
|
23
|
+
return m[m.length - 1];
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region lib/i18n/i18n-provider.tsx
|
|
27
|
+
var y = o(null);
|
|
28
|
+
function b({ children: e, defaultLanguage: n = "en", storageKey: i = t, supportedLanguages: o = a, onLanguageChange: c, initialLanguage: m, resources: h }) {
|
|
29
|
+
let [v, b] = f(() => m && o.includes(m) ? m : r(i, n, o)), x = s((e) => {
|
|
30
|
+
if (!o.includes(e)) {
|
|
31
|
+
console.warn(`[@nxgt/material] Unsupported language: "${e}".`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (typeof localStorage < "u") try {
|
|
35
|
+
localStorage.setItem(i, e);
|
|
36
|
+
} catch {}
|
|
37
|
+
b(e), c?.(e);
|
|
38
|
+
}, [
|
|
39
|
+
i,
|
|
40
|
+
o,
|
|
41
|
+
c
|
|
42
|
+
]), S = d(null), C = d({
|
|
43
|
+
resources: h,
|
|
44
|
+
language: v
|
|
45
|
+
});
|
|
46
|
+
C.current = {
|
|
47
|
+
resources: h,
|
|
48
|
+
language: v
|
|
49
|
+
}, l(() => (S.current = g(C.current.resources, C.current.language), () => {
|
|
50
|
+
S.current?.(), S.current = null;
|
|
51
|
+
}), []), l(() => {
|
|
52
|
+
S.current && _(S.current, h, v);
|
|
53
|
+
}, [h, v]);
|
|
54
|
+
let w = u(() => ({
|
|
55
|
+
language: v,
|
|
56
|
+
changeLanguage: x,
|
|
57
|
+
supportedLanguages: o,
|
|
58
|
+
resources: h
|
|
59
|
+
}), [
|
|
60
|
+
v,
|
|
61
|
+
x,
|
|
62
|
+
o,
|
|
63
|
+
h
|
|
64
|
+
]);
|
|
65
|
+
return /* @__PURE__ */ p(y.Provider, {
|
|
66
|
+
value: w,
|
|
67
|
+
children: e
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function x() {
|
|
71
|
+
let e = c(y);
|
|
72
|
+
if (!e) throw Error("useI18nContext must be used within an I18nProvider");
|
|
73
|
+
return e;
|
|
74
|
+
}
|
|
75
|
+
function S() {
|
|
76
|
+
return c(y);
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region lib/i18n/translate-material.ts
|
|
80
|
+
var C = /* @__PURE__ */ new WeakMap();
|
|
81
|
+
function w(e) {
|
|
82
|
+
let t = C.get(e);
|
|
83
|
+
return t || (t = i(e), C.set(e, t)), t;
|
|
84
|
+
}
|
|
85
|
+
function T(t, r, i, a, o) {
|
|
86
|
+
if (t) {
|
|
87
|
+
let e = o ? [w(o), n] : [n];
|
|
88
|
+
for (let n of /* @__PURE__ */ new Set([t, t.split("-")[0]])) for (let t of e) {
|
|
89
|
+
let e = t(r, a, () => n);
|
|
90
|
+
if (e !== r) return e;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return e(i, t || "en", a);
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { v as a, S as i, b as n, x as r, T as t };
|