@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,79 +0,0 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "./stored-language-B-tiWZU2.js";
|
|
2
|
-
import { createContext as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
3
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
4
|
-
//#region lib/i18n/material-resources-registry.ts
|
|
5
|
-
var d = [], f = /* @__PURE__ */ new WeakMap();
|
|
6
|
-
function p(e, t) {
|
|
7
|
-
let n = {
|
|
8
|
-
resources: e,
|
|
9
|
-
language: t
|
|
10
|
-
};
|
|
11
|
-
d.push(n);
|
|
12
|
-
let r = () => {
|
|
13
|
-
let e = d.lastIndexOf(n);
|
|
14
|
-
e !== -1 && d.splice(e, 1);
|
|
15
|
-
};
|
|
16
|
-
return f.set(r, n), r;
|
|
17
|
-
}
|
|
18
|
-
function m(e, t, n) {
|
|
19
|
-
let r = f.get(e);
|
|
20
|
-
r && (r.resources = t, r.language = n);
|
|
21
|
-
}
|
|
22
|
-
function h() {
|
|
23
|
-
return d[d.length - 1];
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region lib/i18n/i18n-provider.tsx
|
|
27
|
-
var g = r(null);
|
|
28
|
-
function _({ children: r, defaultLanguage: a = "en", storageKey: d = t, supportedLanguages: f = e, onLanguageChange: h, initialLanguage: _, resources: v }) {
|
|
29
|
-
let [y, b] = l(() => _ && f.includes(_) ? _ : n(d, a, f)), x = i((e) => {
|
|
30
|
-
if (!f.includes(e)) {
|
|
31
|
-
console.warn(`[@nxgt/material] Unsupported language: "${e}".`);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (typeof localStorage < "u") try {
|
|
35
|
-
localStorage.setItem(d, e);
|
|
36
|
-
} catch {}
|
|
37
|
-
b(e), h?.(e);
|
|
38
|
-
}, [
|
|
39
|
-
d,
|
|
40
|
-
f,
|
|
41
|
-
h
|
|
42
|
-
]), S = c(null), C = c({
|
|
43
|
-
resources: v,
|
|
44
|
-
language: y
|
|
45
|
-
});
|
|
46
|
-
C.current = {
|
|
47
|
-
resources: v,
|
|
48
|
-
language: y
|
|
49
|
-
}, o(() => (S.current = p(C.current.resources, C.current.language), () => {
|
|
50
|
-
S.current?.(), S.current = null;
|
|
51
|
-
}), []), o(() => {
|
|
52
|
-
S.current && m(S.current, v, y);
|
|
53
|
-
}, [v, y]);
|
|
54
|
-
let w = s(() => ({
|
|
55
|
-
language: y,
|
|
56
|
-
changeLanguage: x,
|
|
57
|
-
supportedLanguages: f,
|
|
58
|
-
resources: v
|
|
59
|
-
}), [
|
|
60
|
-
y,
|
|
61
|
-
x,
|
|
62
|
-
f,
|
|
63
|
-
v
|
|
64
|
-
]);
|
|
65
|
-
return /* @__PURE__ */ u(g.Provider, {
|
|
66
|
-
value: w,
|
|
67
|
-
children: r
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function v() {
|
|
71
|
-
let e = a(g);
|
|
72
|
-
if (!e) throw Error("useI18nContext must be used within an I18nProvider");
|
|
73
|
-
return e;
|
|
74
|
-
}
|
|
75
|
-
function y() {
|
|
76
|
-
return a(g);
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
export { h as i, v as n, y as r, _ as t };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "./stored-language-B-tiWZU2.js";
|
|
2
|
-
import { a as e, r as t, t as n } from "./translator-B9XjUDRu.js";
|
|
3
|
-
//#region lib/i18n/translate-material.ts
|
|
4
|
-
var r = /* @__PURE__ */ new WeakMap();
|
|
5
|
-
function i(e) {
|
|
6
|
-
let t = r.get(e);
|
|
7
|
-
return t || (t = n(e), r.set(e, t)), t;
|
|
8
|
-
}
|
|
9
|
-
function a(n, r, a, o, s) {
|
|
10
|
-
if (n) {
|
|
11
|
-
let e = s ? [i(s), t] : [t];
|
|
12
|
-
for (let t of /* @__PURE__ */ new Set([n, n.split("-")[0]])) for (let n of e) {
|
|
13
|
-
let e = n(r, o, () => t);
|
|
14
|
-
if (e !== r) return e;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return e(a, n || "en", o);
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { a as t };
|