@nxgt/material 3.71.0 → 3.72.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 +19 -0
- package/README.md +1 -1
- package/dist/{alert-dialog-y2pbowVh.js → alert-dialog-A8K8zai1.js} +1 -1
- package/dist/{async-slice-CGfWBOaV.js → async-slice-B8933IHY.js} +1 -1
- package/dist/{button-D54Hrjo0.js → button-C8moFnIT.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-B5MhXBfm.js → chip-B6AY1E91.js} +2 -2
- package/dist/{code-editor-mULs4SL8.js → code-editor-DQZIKL54.js} +5 -5
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-BWDnqUqn.js → code-language-items-8VL0aMKG.js} +2 -2
- package/dist/components/ui/fields/attributes/attribute-values-form/attribute-values-form.css +5 -0
- package/dist/{components-B_taYVcd.js → components-EHdmrvV4.js} +16877 -16727
- package/dist/components.js +28 -28
- package/dist/{dialog-AjCYZ2Vz.js → dialog-WuLTwxkr.js} +5 -5
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-LN60hu_3.js → dropdown-menu-tadySeGH.js} +1 -1
- package/dist/editor.js +10 -10
- package/dist/{empty-state-Bo8G8W8G.js → empty-state-ZYiFSSBQ.js} +2 -2
- package/dist/{field-blur-Cnd6FfCH.js → field-blur-BYR0yE5L.js} +1 -1
- package/dist/{field-blur-context-bUFZj8iN.js → field-blur-context-bEhByoK-.js} +1 -1
- package/dist/{hooks-Dt4PkQiZ.js → hooks-GpwD8iDu.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-QtGnvsnc.js → hover-card-BowaI_ra.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-DLbpCQIm.js → icon-badge-B1B0Lg02.js} +3 -3
- package/dist/{icon-button-C59DqL7L.js → icon-button-BbGU17cb.js} +1 -1
- package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +3 -0
- package/dist/lib/components/ui/fields/attributes/attribute-values-form-field-set/attribute-values-form-field-set.d.ts +5 -1
- package/dist/lib/components/ui/fields/contacts/contact-dialog.d.ts +8 -2
- package/dist/lib/components/ui/fields/contacts/contacts-dialog-form-field.d.ts +4 -1
- package/dist/lib/components/ui/fields/contacts/contacts-editor.d.ts +15 -2
- package/dist/lib/components/ui/fields/contacts/contacts-form-field.d.ts +6 -1
- package/dist/lib/components/ui/fields/contacts/logic/offered-types.d.ts +3 -0
- package/dist/lib/components/ui/fields/contacts/models.d.ts +2 -0
- package/dist/lib/components/ui/fields/contacts/partials/contact-fields.d.ts +4 -2
- package/dist/lib/components/ui/fields/contacts/partials/contact-groups.d.ts +4 -2
- package/dist/lib/components/ui/fields/contacts/partials/contact-row.d.ts +4 -2
- package/dist/lib/components/ui/fields/contacts/partials/phone-sheet.d.ts +4 -2
- package/dist/lib/components/ui/fields/contacts/partials/quick-add.d.ts +4 -2
- package/dist/lib/components/ui/fields/contacts/partials/row-actions.d.ts +3 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/media/upload/network-upload-field/network-upload-field.d.ts +5 -0
- package/dist/lib/components/ui/media/upload/network-upload-field/partials/network-upload-field-items.d.ts +2 -1
- package/dist/lib/components/ui/media/upload/network-upload-field/upload-constraints.d.ts +10 -2
- package/dist/lib/components/ui/overlays/dialog/dialog-body-overflow.d.ts +7 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-body.d.ts +10 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +4 -0
- package/dist/lib/components/ui/overlays/dialog/dialog.d.ts +1 -0
- package/dist/lib/i18n/resources/en/en.d.ts +7 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +7 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +7 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -0
- package/dist/lib/i18n/resources/resources.d.ts +14 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +42 -42
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -1
- package/dist/{public-BSaSCwy7.js → public-CFj2qn7l.js} +9 -9
- package/dist/{rich-code-block-BFVj1GWz.js → rich-code-block-B7Teg7-e.js} +5 -5
- package/dist/{sortable-provider-REwyjiOZ.js → sortable-provider-y5sFhRDj.js} +2 -2
- package/dist/{spinner-BFZxqdWC.js → spinner-C5Kb6MWu.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-BHi6miz-.js → theme-toggle-B1JZg7mU.js} +1 -1
- package/dist/{toolbar-items-BTtoKVlx.js → toolbar-items-m_1FTFPQ.js} +3 -3
- package/dist/{translate-material-R-uLthBy.js → translate-material-D1ndrd7a.js} +1 -1
- package/dist/{translator-ClbXOGQO.js → translator-CtEC_AQa.js} +14 -0
- package/dist/{typography-v-PJ4Zco.js → typography-prQHb3gI.js} +1 -1
- package/dist/{use-chat-composer-Rhan4Xv0.js → use-chat-composer-DBiyNXvL.js} +16 -16
- package/dist/{use-heading-spy-CJnBkCY0.js → use-heading-spy-Bzj5mIUZ.js} +4 -4
- package/dist/{use-material-translation-CCWUeiEn.js → use-material-translation-C6H0B4kE.js} +1 -1
- package/dist/{use-return-focus-Duk40DZI.js → use-return-focus-CkUX1HFl.js} +1 -1
- package/docs/components/form-fields.md +63 -3
- package/docs/components/media-and-files.md +4 -1
- package/docs/components/overlays-and-menus.md +20 -1
- package/docs/guides/forms.md +8 -3
- package/docs/guides/i18n.md +1 -1
- package/docs/troubleshooting.md +79 -1
- package/lib/components/ui/fields/attributes/attribute-values-form/attribute-values-form.css +5 -0
- package/package.json +3 -2
package/dist/pdf-reader.js
CHANGED
package/dist/print.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, t } from "./translate-material-
|
|
1
|
+
import { i as e, t } from "./translate-material-D1ndrd7a.js";
|
|
2
2
|
import { Children as n, createContext as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useMemo as c, useState as l } from "react";
|
|
3
3
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
4
4
|
import { resolvePdfFileName as f } from "@nxgt/material-core/pdf-file-name";
|
|
@@ -3,22 +3,22 @@ import { n as t } from "./ui.utils-CAnKTCw5.js";
|
|
|
3
3
|
import { t as n } from "./utils-BLfntITJ.js";
|
|
4
4
|
import { o as r } from "./dist-DVRQkaTK.js";
|
|
5
5
|
import { c as i, i as a, l as o, n as s, o as c, s as l } from "./dist-lmHmz_bu.js";
|
|
6
|
-
import { n as u, s as d } from "./spinner-
|
|
6
|
+
import { n as u, s as d } from "./spinner-C5Kb6MWu.js";
|
|
7
7
|
import { i as f } from "./dist-C4wtXCjf.js";
|
|
8
8
|
import { r as p, t as m } from "./in-dialog-Vwkyp-M5.js";
|
|
9
|
-
import { a as h, c as g, i as _, l as v, n as y, o as b, r as x, s as ee, t as te, u as ne } from "./use-return-focus-
|
|
10
|
-
import { c as S, d as C, f as w, i as T, l as re, n as ie, o as E, t as ae, u as D } from "./dropdown-menu-
|
|
11
|
-
import { S as oe, a as O, d as k, g as se, h as ce, i as le, m as ue, n as A, r as de, t as j, u as fe, w as pe } from "./toolbar-items-
|
|
12
|
-
import { t as me } from "./button-
|
|
13
|
-
import { t as M } from "./use-material-translation-
|
|
14
|
-
import { n as he, t as ge } from "./icon-button-
|
|
9
|
+
import { a as h, c as g, i as _, l as v, n as y, o as b, r as x, s as ee, t as te, u as ne } from "./use-return-focus-CkUX1HFl.js";
|
|
10
|
+
import { c as S, d as C, f as w, i as T, l as re, n as ie, o as E, t as ae, u as D } from "./dropdown-menu-tadySeGH.js";
|
|
11
|
+
import { S as oe, a as O, d as k, g as se, h as ce, i as le, m as ue, n as A, r as de, t as j, u as fe, w as pe } from "./toolbar-items-m_1FTFPQ.js";
|
|
12
|
+
import { t as me } from "./button-C8moFnIT.js";
|
|
13
|
+
import { t as M } from "./use-material-translation-C6H0B4kE.js";
|
|
14
|
+
import { n as he, t as ge } from "./icon-button-BbGU17cb.js";
|
|
15
15
|
import { t as _e } from "./useEvent-2fKq-6w8.js";
|
|
16
16
|
import { n as ve, t as ye } from "./toggle-group-DXXlqid2.js";
|
|
17
17
|
import { i as be } from "./escape-owner-DpaP0lm1.js";
|
|
18
18
|
import { n as xe } from "./use-slice-reducer-BGkeGtML.js";
|
|
19
|
-
import { f as Se, r as Ce, t as we, u as Te } from "./dialog-
|
|
19
|
+
import { f as Se, r as Ce, t as we, u as Te } from "./dialog-WuLTwxkr.js";
|
|
20
20
|
import { r as Ee } from "./use-csp-nonce-ZKs9k-ov.js";
|
|
21
|
-
import { n as De, t as Oe } from "./empty-state-
|
|
21
|
+
import { n as De, t as Oe } from "./empty-state-ZYiFSSBQ.js";
|
|
22
22
|
import { t as ke } from "./client-only.utils-3nHNzCki.js";
|
|
23
23
|
import { t as Ae } from "./use-scroll-away-PQRFZkT2.js";
|
|
24
24
|
import * as N from "react";
|
|
@@ -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-C5Kb6MWu.js";
|
|
2
|
+
import { c as t, n, t as r } from "./dropdown-menu-tadySeGH.js";
|
|
3
|
+
import { t as i } from "./use-material-translation-C6H0B4kE.js";
|
|
4
|
+
import { a, i as o, n as s, o as c, t as l } from "./code-language-items-8VL0aMKG.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-DQZIKL54.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-C6H0B4kE.js";
|
|
4
|
+
import { t as r } from "./icon-button-BbGU17cb.js";
|
|
5
5
|
import { t as i } from "./compose-refs-G4J4kaUA.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-C6H0B4kE.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-C6H0B4kE.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-B1JZg7mU.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-C6H0B4kE.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,13 +1,13 @@
|
|
|
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-C5Kb6MWu.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-tadySeGH.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-
|
|
10
|
+
import { t as Ce } from "./use-material-translation-C6H0B4kE.js";
|
|
11
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, l as t, r as n, s as r, t as i, u as a } from "./translator-
|
|
1
|
+
import { a as e, l as t, r as n, s as r, t as i, u as a } from "./translator-CtEC_AQa.js";
|
|
2
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
3
|
import { jsx as p } from "react/jsx-runtime";
|
|
4
4
|
//#region lib/i18n/material-resources-registry.ts
|
|
@@ -111,6 +111,13 @@ var r = {
|
|
|
111
111
|
},
|
|
112
112
|
toc: { "on-this-page": "On this page" },
|
|
113
113
|
upload: {
|
|
114
|
+
accept: {
|
|
115
|
+
images: "Images",
|
|
116
|
+
audio: "Audio",
|
|
117
|
+
video: "Videos",
|
|
118
|
+
text: "Text files",
|
|
119
|
+
application: "Documents"
|
|
120
|
+
},
|
|
114
121
|
dropzone: {
|
|
115
122
|
idle: "Drag & drop files here, or click to browse",
|
|
116
123
|
"at-capacity": "Maximum number of files reached",
|
|
@@ -3078,6 +3085,13 @@ var r = {
|
|
|
3078
3085
|
},
|
|
3079
3086
|
toc: { "on-this-page": "Sur cette page" },
|
|
3080
3087
|
upload: {
|
|
3088
|
+
accept: {
|
|
3089
|
+
images: "Images",
|
|
3090
|
+
audio: "Audio",
|
|
3091
|
+
video: "Vidéos",
|
|
3092
|
+
text: "Fichiers texte",
|
|
3093
|
+
application: "Documents"
|
|
3094
|
+
},
|
|
3081
3095
|
dropzone: {
|
|
3082
3096
|
idle: "Glissez-déposez des fichiers ici, ou cliquez pour parcourir",
|
|
3083
3097
|
"at-capacity": "Nombre maximum de fichiers atteint",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { t } from "./dist-DVRQkaTK.js";
|
|
3
|
-
import { n } from "./spinner-
|
|
3
|
+
import { n } from "./spinner-C5Kb6MWu.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/components/ui/primitives/typography/typography.variants.ts
|
|
6
6
|
var i = [
|
|
@@ -4,40 +4,40 @@ import { t as n } from "./utils-BLfntITJ.js";
|
|
|
4
4
|
import { n as r } from "./use-shape-morph-BKA_R5P5.js";
|
|
5
5
|
import { n as i, o as a, t as o } from "./dist-DVRQkaTK.js";
|
|
6
6
|
import { a as s, c, i as l, l as u, n as d, o as f, r as p, s as m, t as h } from "./dist-lmHmz_bu.js";
|
|
7
|
-
import { _ as g, a as _, b as v, c as y, g as b, h as x, i as S, n as C, o as w, r as T, s as E, t as D, v as O, x as k, y as A } from "./spinner-
|
|
7
|
+
import { _ as g, a as _, b as v, c as y, g as b, h as x, i as S, n as C, o as w, r as T, s as E, t as D, v as O, x as k, y as A } from "./spinner-C5Kb6MWu.js";
|
|
8
8
|
import { a as ee, i as j, n as M, r as N, t as te } from "./dist-C4wtXCjf.js";
|
|
9
9
|
import { i as ne, n as P } from "./in-dialog-Vwkyp-M5.js";
|
|
10
|
-
import { c as re, l as ie, n as F, r as ae, t as oe } from "./alert-dialog-
|
|
10
|
+
import { c as re, l as ie, n as F, r as ae, t as oe } from "./alert-dialog-A8K8zai1.js";
|
|
11
11
|
import { A as se, C as I, D as ce, E as le, O as ue, S as de, T as fe, _ as pe, a as me, b as he, d as ge, f as _e, g as ve, h as ye, i as be, k as xe, l as Se, m as Ce, n as we, o as Te, p as Ee, r as De, s as Oe, t as ke, u as Ae, v as je, w as Me, x as Ne, y as Pe } from "./floating-ui.dom-KkZSW8_E.js";
|
|
12
|
-
import { D as Fe, E as Ie, N as Le, O as Re, c as ze, d as Be, f as Ve, i as He, k as Ue, m as We, n as Ge, o as Ke, p as qe, t as Je, u as Ye } from "./dropdown-menu-
|
|
13
|
-
import { a as Xe, i as Ze, n as Qe } from "./field-blur-context-
|
|
14
|
-
import { C as $e, S as et, a as tt, c as nt, d as rt, l as it, n as at, o as ot, s as st, u as ct } from "./toolbar-items-
|
|
12
|
+
import { D as Fe, E as Ie, N as Le, O as Re, c as ze, d as Be, f as Ve, i as He, k as Ue, m as We, n as Ge, o as Ke, p as qe, t as Je, u as Ye } from "./dropdown-menu-tadySeGH.js";
|
|
13
|
+
import { a as Xe, i as Ze, n as Qe } from "./field-blur-context-bEhByoK-.js";
|
|
14
|
+
import { C as $e, S as et, a as tt, c as nt, d as rt, l as it, n as at, o as ot, s as st, u as ct } from "./toolbar-items-m_1FTFPQ.js";
|
|
15
15
|
import { a as lt, i as ut, n as dt, o as ft, t as pt } from "./bubble-input-B7BVd9fX.js";
|
|
16
16
|
import { i as mt } from "./dist-B7RjY7SL.js";
|
|
17
17
|
import { o as ht, s as gt, t as _t } from "./use-click-lock-BZYtTmVt.js";
|
|
18
18
|
import { a as vt, r as yt } from "./icon-sprites-CaYXzOL4.js";
|
|
19
19
|
import { t as bt } from "./warn-once-C_e47JM8.js";
|
|
20
|
-
import { r as xt, t as St } from "./button-
|
|
21
|
-
import { a as Ct } from "./translator-
|
|
20
|
+
import { r as xt, t as St } from "./button-C8moFnIT.js";
|
|
21
|
+
import { a as Ct } from "./translator-CtEC_AQa.js";
|
|
22
22
|
import { h as wt } from "./get-CTzJAwfc.js";
|
|
23
23
|
import { t as Tt } from "./isEmpty-F_g3jLf8.js";
|
|
24
|
-
import { t as L } from "./use-material-translation-
|
|
25
|
-
import { t as R } from "./icon-button-
|
|
24
|
+
import { t as L } from "./use-material-translation-C6H0B4kE.js";
|
|
25
|
+
import { t as R } from "./icon-button-BbGU17cb.js";
|
|
26
26
|
import { t as Et } from "./use-ssr-media-query-C6M5m8sf.js";
|
|
27
|
-
import { n as Dt, t as Ot } from "./typography-
|
|
27
|
+
import { n as Dt, t as Ot } from "./typography-prQHb3gI.js";
|
|
28
28
|
import { n as kt, t as At } from "./util-4heV2LPI.js";
|
|
29
29
|
import { t as jt } from "./useEvent-2fKq-6w8.js";
|
|
30
|
-
import { p as Mt } from "./field-blur-
|
|
30
|
+
import { p as Mt } from "./field-blur-BYR0yE5L.js";
|
|
31
31
|
import { c as Nt, i as Pt, l as Ft, o as It, r as Lt, s as Rt, t as zt } from "./dist-C3GR7kJd.js";
|
|
32
32
|
import { a as Bt } from "./toggle-group-DXXlqid2.js";
|
|
33
33
|
import { n as Vt } from "./use-slice-reducer-BGkeGtML.js";
|
|
34
34
|
import { t as Ht } from "./browser-only-DQ94lWF8.js";
|
|
35
35
|
import { t as Ut } from "./compose-refs-G4J4kaUA.js";
|
|
36
|
-
import { n as Wt, r as Gt, t as Kt } from "./chip-
|
|
37
|
-
import { _ as qt, f as Jt, g as Yt, l as Xt, m as Zt, n as Qt, o as $t, r as en, s as tn, t as nn, u as rn, v as an, y as on } from "./dialog-
|
|
38
|
-
import { n as sn, t as cn } from "./icon-badge-
|
|
36
|
+
import { n as Wt, r as Gt, t as Kt } from "./chip-B6AY1E91.js";
|
|
37
|
+
import { _ as qt, f as Jt, g as Yt, l as Xt, m as Zt, n as Qt, o as $t, r as en, s as tn, t as nn, u as rn, v as an, y as on } from "./dialog-WuLTwxkr.js";
|
|
38
|
+
import { n as sn, t as cn } from "./icon-badge-B1B0Lg02.js";
|
|
39
39
|
import { r as ln } from "./use-csp-nonce-ZKs9k-ov.js";
|
|
40
|
-
import { t as un } from "./empty-state-
|
|
40
|
+
import { t as un } from "./empty-state-ZYiFSSBQ.js";
|
|
41
41
|
import { t as dn } from "./skeleton-DSdtr2qc.js";
|
|
42
42
|
import { H as fn, V as pn, X as mn, bt as hn, it as gn, lt as _n, n as vn, t as yn, xt as bn, yt as xn } from "./dist-moutbfbd.js";
|
|
43
43
|
import { t as Sn } from "./markdown-Dw_uH7j7.js";
|
|
@@ -11308,7 +11308,7 @@ var ES = (e = {}) => Cn({
|
|
|
11308
11308
|
let [{ default: t }, { lowlight: n }, { richCodeBlock: r }] = await Promise.all([
|
|
11309
11309
|
import("./dist-CRMFGjng.js"),
|
|
11310
11310
|
import("./lowlight-OtcjU2Sa.js"),
|
|
11311
|
-
import("./rich-code-block-
|
|
11311
|
+
import("./rich-code-block-B7Teg7-e.js")
|
|
11312
11312
|
]);
|
|
11313
11313
|
return [r(t, {
|
|
11314
11314
|
lowlight: n,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { a as t, c as n, d as r, i, n as a, r as o, t as s, u as c } from "./alert-dialog-
|
|
3
|
-
import { a as l } from "./button-
|
|
4
|
-
import { i as u } from "./translate-material-
|
|
5
|
-
import { t as d } from "./use-material-translation-
|
|
2
|
+
import { a as t, c as n, d as r, i, n as a, r as o, t as s, u as c } from "./alert-dialog-A8K8zai1.js";
|
|
3
|
+
import { a as l } from "./button-C8moFnIT.js";
|
|
4
|
+
import { i as u } from "./translate-material-D1ndrd7a.js";
|
|
5
|
+
import { t as d } from "./use-material-translation-C6H0B4kE.js";
|
|
6
6
|
import { _ as f, g as p, h as m, n as h, v as g, y as _ } from "./number.utils-BG_eEt5g.js";
|
|
7
7
|
import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
8
8
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e, r as t } from "./dist-DVRQkaTK.js";
|
|
2
2
|
import { a as n, c as r, i, l as a, o, r as s, s as c } from "./dist-lmHmz_bu.js";
|
|
3
|
-
import { C as l, S as u, w as d } from "./spinner-
|
|
3
|
+
import { C as l, S as u, w as d } from "./spinner-C5Kb6MWu.js";
|
|
4
4
|
import { c as f, i as p, l as m, o as h, r as g, s as ee } from "./in-dialog-Vwkyp-M5.js";
|
|
5
5
|
import { r as _ } from "./escape-owner-DpaP0lm1.js";
|
|
6
6
|
import * as v from "react";
|
|
@@ -1700,6 +1700,37 @@ import { AttributesFormField } from '@nxgt/material/components';
|
|
|
1700
1700
|
<AttributesFormField control={control} name="attributes" label="Attributes" />
|
|
1701
1701
|
```
|
|
1702
1702
|
|
|
1703
|
+
**`AttributeValuesFormFieldSet`** renders one input per attribute and writes
|
|
1704
|
+
`{ [attribute.name]: value }` to the form at `name`:
|
|
1705
|
+
|
|
1706
|
+
```tsx
|
|
1707
|
+
import { AttributeValuesFormFieldSet, FormSection } from '@nxgt/material/components';
|
|
1708
|
+
|
|
1709
|
+
const form = useForm({ defaultValues: { attributes: { color: '#2563eb', size: 'M' } } });
|
|
1710
|
+
|
|
1711
|
+
<FormSection title="Attributes">
|
|
1712
|
+
<AttributeValuesFormFieldSet
|
|
1713
|
+
control={form.control}
|
|
1714
|
+
name="attributes"
|
|
1715
|
+
label="Attributes"
|
|
1716
|
+
hideLabel
|
|
1717
|
+
attributes={[
|
|
1718
|
+
{ name: 'color', label: 'Colour', type: 'COLOR' },
|
|
1719
|
+
{ name: 'size', label: 'Size', type: 'SELECT', options: ['S', 'M', 'L'] },
|
|
1720
|
+
]}
|
|
1721
|
+
/>
|
|
1722
|
+
</FormSection>
|
|
1723
|
+
```
|
|
1724
|
+
|
|
1725
|
+
| Prop | |
|
|
1726
|
+
| --- | --- |
|
|
1727
|
+
| `attributes` | the attributes to fill, one input each |
|
|
1728
|
+
| `control`, `name` | the form and the path of the object it writes |
|
|
1729
|
+
| `label` | the fieldset's accessible name (required) |
|
|
1730
|
+
| `hideLabel` | default `false`. `true` keeps `label` as the name but draws nothing, for a `FormSection` that already has the title |
|
|
1731
|
+
| `defaultValues` | optional fallback, used only while the form value at `name` is empty: `undefined`, `null` or an object with no keys (`{}`). Any other value in the form wins |
|
|
1732
|
+
| `className` | on the `<fieldset>` |
|
|
1733
|
+
|
|
1703
1734
|
**The inline editor** is one row per attribute: a grip, the type's icon, the
|
|
1704
1735
|
label with `name · Type` under it, the unit as a badge and the default value
|
|
1705
1736
|
(a Yes or No, a colour swatch, a number with its unit). A row opens to its
|
|
@@ -1811,7 +1842,10 @@ const schema = z.object({ attributes: attributesListSchema() });
|
|
|
1811
1842
|
|
|
1812
1843
|
**Emits:** `Attribute[]`; the inline editor writes a date as `yyyy-MM-dd`, a
|
|
1813
1844
|
date-time as an ISO instant and a time as `HH:mm`. `AttributeValuesFormFieldSet`
|
|
1814
|
-
writes an object keyed by attribute `name
|
|
1845
|
+
writes an object keyed by attribute `name`, reads the form's value at `name`
|
|
1846
|
+
(`defaultValues` is only the fallback while it holds nothing), fills the row
|
|
1847
|
+
width, and takes `hideLabel` to keep `label` as the fieldset's accessible name
|
|
1848
|
+
without drawing the heading; `AttributeValuesForm` reads a bare
|
|
1815
1849
|
`yyyy-MM-dd` default as that local day.
|
|
1816
1850
|
**Form wrapper:** `AttributesFormField` — `control` and `name`, see
|
|
1817
1851
|
[forms](../guides/forms.md#the-pair), [what each field emits](../guides/forms.md#what-each-field-emits)
|
|
@@ -1863,6 +1897,32 @@ The editor checks the shape of a value, not that the line exists. Below 640px
|
|
|
1863
1897
|
each contact is a summary row; tapping it opens a bottom sheet with the same
|
|
1864
1898
|
fields and actions, and closing it with an empty value drops the contact.
|
|
1865
1899
|
|
|
1900
|
+
**Limit the types, hide the star.** A backend that stores only some types, or
|
|
1901
|
+
no primary flag, says so on `ContactsFormField` and `ContactsEditor` (`primary` is inline only):
|
|
1902
|
+
|
|
1903
|
+
```tsx
|
|
1904
|
+
<ContactsFormField
|
|
1905
|
+
control={control}
|
|
1906
|
+
name="contacts"
|
|
1907
|
+
label="Contacts"
|
|
1908
|
+
types={['EMAIL', 'PHONE', 'FAX', 'WEBSITE']}
|
|
1909
|
+
primary={false}
|
|
1910
|
+
/>
|
|
1911
|
+
```
|
|
1912
|
+
|
|
1913
|
+
`types` (an array of `ContactTypeName`, i.e. `'EMAIL' | 'PHONE' | …` or the
|
|
1914
|
+
`ContactType` values; every type by default) limits the "Add" chips and the
|
|
1915
|
+
type select; list at least one type, since an empty `types={[]}` is not
|
|
1916
|
+
supported. The chips keep the library's order (phone, mobile, email,
|
|
1917
|
+
website, fax); the select follows the order given. With `editing="dialog"`,
|
|
1918
|
+
`types` limits the dialog's type select (`ContactDialog` takes it too, and a
|
|
1919
|
+
new contact starts with the first type); `primary` has no effect there, since
|
|
1920
|
+
the dialog has no star. A contact
|
|
1921
|
+
already in the value with another type is kept and shown, and its own type
|
|
1922
|
+
stays in its select, so nothing is changed silently. `primary={false}` (`true`
|
|
1923
|
+
by default) hides the star and the primary marks; a `primary` flag already in
|
|
1924
|
+
the value is left untouched.
|
|
1925
|
+
|
|
1866
1926
|
`variant="cards"` is the Expressive variant: each contact is its own tinted
|
|
1867
1927
|
card with a round tile for the primary one. The fields keep the library's
|
|
1868
1928
|
field radius in both. `variant` is on `ContactsFormField`, `ContactsEditor`
|
|
@@ -1895,9 +1955,9 @@ only, and a value that fails its check is shown without a link.
|
|
|
1895
1955
|
| `empty` | `ReactNode` | "No contacts" | shown when there is nothing to list; `null` renders nothing |
|
|
1896
1956
|
|
|
1897
1957
|
`ContactsEditor` takes `value`, `onValueChange`, `label`, `headingLevel` (`3`
|
|
1898
|
-
by default; the type headings sit one below it), `variant` and `disabled`. A
|
|
1958
|
+
by default; the type headings sit one below it), `variant`, `types`, `primary` and `disabled`. A
|
|
1899
1959
|
wrong format is said once the field was left, a duplicate at once. `ContactsFormField` takes `editing` (`'inline' \| 'dialog'`,
|
|
1900
|
-
default `'inline'`), `variant` (inline only) and `cancelVariant` (dialog only,
|
|
1960
|
+
default `'inline'`), `variant` (inline only), `types`, `primary` (inline only) and `cancelVariant` (dialog only,
|
|
1901
1961
|
the Cancel button's `Button` variant, default `'tonal'`; `'outlined'` restores
|
|
1902
1962
|
the earlier look). `Contacts` takes `data`, `onAdd`, `onEdit` and `disabled`.
|
|
1903
1963
|
|
|
@@ -78,12 +78,15 @@ function Attachments() {
|
|
|
78
78
|
| `mode` | `'single' \| 'multiple'` | — (required) | `value` is a `string` or a `string[]` |
|
|
79
79
|
| `onUpload` | `(file, onProgress?, signal?) => Promise<string>` | — | `NetworkUploadField` only; the resolved string becomes the value. Removing an uploading row or unmounting the field aborts `signal`: pass it to your request, or the upload still completes (its value is dropped). An abort after the request completed cannot unsend it: the value is dropped and `onRemove` is not called. The S3 fields abort their request themselves and reject with an `UploadError` of kind `aborted` (named `AbortError`, no longer a `DOMException`) |
|
|
80
80
|
| `getPresignedUrl` | `(file) => Promise<PresignedUploadTarget>` | — | `S3UploadField` only; `{ uploadUrl, publicUrl, headers? }` PUTs the file and stores `publicUrl`; `{ method: 'POST', url, fields, value }` posts a form and stores `value` (see [presigned POST](#presigned-post)) |
|
|
81
|
-
| `accept` | `string` | — | file input `accept`,
|
|
81
|
+
| `accept` | `string` | — | file input `accept`; the drop zone's hint shows it as short names (`image/jpeg,image/png` reads `JPEG, PNG`, `.pdf` reads `PDF`, `image/*` reads `Images`; unknown entries stay as given) |
|
|
82
|
+
| `acceptLabel` | `string` | — | replaces those names in the hint (`"Photos only"`); `""` hides the type part. |
|
|
82
83
|
| `maxSize` | `number` (bytes) | — | larger files are rejected before upload |
|
|
83
84
|
| `maxFiles` | `number` | — | `mode="multiple"` only; the drop zone is disabled once reached |
|
|
84
85
|
| `onRemove` | `(value) => void \| Promise<void>` | — | called when a committed file is removed (delete it server-side here) |
|
|
85
86
|
| `resolveUrl` | `(value) => string \| null \| undefined` | — | turns a stored key into an `<img src>` so saved images preview |
|
|
86
87
|
|
|
88
|
+
The drop zone's hint wraps in a narrow dialog instead of being clipped.
|
|
89
|
+
|
|
87
90
|
The field is a `group` named by its `label`. The drop zone is a `button`, which
|
|
88
91
|
may not carry `aria-invalid`: with `error` it is described by `helperText`, or
|
|
89
92
|
without one by a visually hidden "This value is not valid."
|
|
@@ -61,10 +61,27 @@ Your own `onEscapeKeyDown` on the content receives the Escape that only closes a
|
|
|
61
61
|
>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
**A long dialog scrolls its body, not the whole box.** Wrap the fields in `DialogBody` (a direct child of `DialogContent`, between `DialogHeader` and `DialogFooter`): the content becomes a clipped column, the header and the footer stay in view, and only the body scrolls. A hairline shows on the edge where content is hidden beneath the header or the footer. It works the same as a bottom sheet or full screen on a phone, with the safe-area padding kept under the footer. A dialog without `DialogBody` is unchanged and scrolls as a whole. Give the body an `aria-label` (or `aria-labelledby`) to make it a named region; `className` sets its inner layout (`grid gap-3`). It sets `data-overflow-start` and `data-overflow-end` while content is hidden above or below. `DialogScrollContent`, `Sheet`, `Drawer` and `AlertDialog` do not take it yet.
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
<DialogContent>
|
|
68
|
+
<DialogHeader>
|
|
69
|
+
<DialogTitle>New item</DialogTitle>
|
|
70
|
+
</DialogHeader>
|
|
71
|
+
<DialogBody aria-label="Item fields" className="grid gap-3">
|
|
72
|
+
{/* twelve fields */}
|
|
73
|
+
</DialogBody>
|
|
74
|
+
<DialogFooter>
|
|
75
|
+
<Button>Save</Button>
|
|
76
|
+
</DialogFooter>
|
|
77
|
+
</DialogContent>
|
|
78
|
+
```
|
|
79
|
+
|
|
64
80
|
```tsx
|
|
65
81
|
import {
|
|
66
82
|
Button,
|
|
67
83
|
Dialog,
|
|
84
|
+
DialogBody,
|
|
68
85
|
DialogClose,
|
|
69
86
|
DialogContent,
|
|
70
87
|
DialogDescription,
|
|
@@ -94,7 +111,8 @@ import {
|
|
|
94
111
|
```
|
|
95
112
|
|
|
96
113
|
Parts: `Dialog`, `DialogTrigger`, `DialogContent`, `DialogHeader`,
|
|
97
|
-
`DialogTitle`, `DialogDescription`, `DialogFooter`, `
|
|
114
|
+
`DialogTitle`, `DialogDescription`, `DialogFooter`, `DialogBody` (the part
|
|
115
|
+
that scrolls alone), `DialogClose`, plus
|
|
98
116
|
`DialogOverlay` and `DialogPortal`, and `DialogScrollContent`: a content for
|
|
99
117
|
a dialog taller than the screen, which sits in a scrolling overlay with a
|
|
100
118
|
margin instead of being clipped, and renders its own close button. It takes
|
|
@@ -132,6 +150,7 @@ export function Terms() {
|
|
|
132
150
|
| `variant`, `color` (`DialogClose`) | as `IconButton` | `'ghost'` | a top-right X button, named "Close" (`material.buttons.close`, translated) while it shows only the icon; text children or an `aria-label` name it instead, and icon-only children leave it unnamed; children replace the X |
|
|
133
151
|
| `size` (`DialogContent`) | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'` | `'md'` | its width from 640 px up: 384, 512, 672, 896 px, or the screen less 2rem a side |
|
|
134
152
|
| `mobilePresentation` (`DialogContent`) | `'dialog' \| 'bottom-sheet' \| 'top' \| 'fullscreen'` | `'dialog'` | below 640 px: a centred dialog, a sheet that springs up from the bottom edge (rounded top corners), a dialog pinned under the top edge, or the whole screen |
|
|
153
|
+
| `className`, `aria-label` / `aria-labelledby`, `onScroll`, `ref` (`DialogBody`) | `ComponentProps<'div'>` | — | the scroll region: `className` lays out its content (`grid gap-3`); an `aria-label` or `aria-labelledby` makes it a `region` with that name; `onScroll` and `ref` are called after its own overflow flags update. It sets `data-overflow-start` / `data-overflow-end` while content is hidden above / below, and bleeds by `--dialog-px` (1.5rem) so a `DialogContent` with its own padding sets both: `p-4 [--dialog-px:1rem]` |
|
|
135
154
|
| `scrim` (`DialogContent`, `SheetContent`, `DrawerContent`) | `'dim' \| 'blur'` | `'dim'` | the scrim behind; `blur` also blurs the page a little |
|
|
136
155
|
|
|
137
156
|
The look lives in the stylesheet (`nxgt-dialog`, `nxgt-scrim`), under the
|
package/docs/guides/forms.md
CHANGED
|
@@ -279,10 +279,11 @@ the form, on a translucent, blurred background, so Cancel and Save stay in
|
|
|
279
279
|
reach while the fields scroll under them; a form shorter than the screen
|
|
280
280
|
shows them right under its fields.
|
|
281
281
|
|
|
282
|
-
- In a `DialogContent` or a `SheetContent`, which are capped to the screen
|
|
282
|
+
- In a `DialogContent` without a `DialogBody`, or a `SheetContent`, which are capped to the screen
|
|
283
283
|
and scroll themselves, the actions stick to the dialog's or the sheet's
|
|
284
284
|
bottom. A `DrawerContent` does not scroll: a form that is its direct child
|
|
285
285
|
is the scroll box there.
|
|
286
|
+
- A long form in a `Dialog` can pin its own header and `DialogFooter` instead: put the fields in a `DialogBody` and only the body scrolls (see the Dialog section of the overlays page). Do not combine it with `form-actions`: they would stick inside the body, so use a `DialogFooter` for the buttons and `form="id"` on the submit button.
|
|
286
287
|
- In an `AlertDialogContent` (the rich text editor's edit dialogs use one),
|
|
287
288
|
the actions stick to its bottom the same way, over its padding.
|
|
288
289
|
- `ConfirmationDialog` holds a form when you pass it `formOptions` (a schema, its `defaultValues` and `renderForm`): it renders the
|
|
@@ -608,7 +609,7 @@ export function SupplierForm({ onSave }: { onSave: (values: Values) => void }) {
|
|
|
608
609
|
|
|
609
610
|
| Wrapper | Value | Notes |
|
|
610
611
|
| --- | --- | --- |
|
|
611
|
-
| `ContactsFormField` | `Contact[]` | Edited in place by default (one `primary` per type); `editing="dialog"` goes through `ContactDialog`. `ContactType` is `EMAIL`, `FAX`, `MOBILE`, `PHONE`, `WEBSITE` |
|
|
612
|
+
| `ContactsFormField` | `Contact[]` | Edited in place by default (one `primary` per type); `editing="dialog"` goes through `ContactDialog`. `ContactType` is `EMAIL`, `FAX`, `MOBILE`, `PHONE`, `WEBSITE`; `types={['EMAIL', 'PHONE']}` limits the offered types and `primary={false}` hides the star (inline only) |
|
|
612
613
|
| `OpeningHoursFormField` | `OpeningHour[]` | Edits the week inline by default (`weekStartsOn` and `locale` apply there); `editing="dialog"` keeps the list and dialog, where `showAddAllDays` adds Monday–Friday 09:00–17:00 and a closed weekend in one click |
|
|
613
614
|
| `PostalAddressFormField` | `PostalAddressFieldValue` | Deleting the address writes `{}`, not `null` |
|
|
614
615
|
| `AttributesFormField` | `Attribute[]` | A typed attribute editor, in place by default (rows that open, drag and keyboard reorder that sets `priority`, unique names); `editing="dialog"` keeps the list and dialog. Its `label` prop is required |
|
|
@@ -628,7 +629,11 @@ export function SupplierForm({ onSave }: { onSave: (values: Values) => void }) {
|
|
|
628
629
|
`form.setValue()` replace the list it shows.
|
|
629
630
|
- `AttributeValuesFormFieldSet` is the other half: given `attributes`, it
|
|
630
631
|
renders one input per attribute and writes `{ [attribute.name]: value }` to
|
|
631
|
-
its `name`.
|
|
632
|
+
its `name`. It reads the value the form already holds at `name` (and shows
|
|
633
|
+
a `reset()` or `setValue()`), so `defaultValues` is only the fallback while
|
|
634
|
+
the form value is empty (`undefined`, `null` or `{}`). Its fields fill the row, and `hideLabel` keeps
|
|
635
|
+
`label` as the group's accessible name without drawing it, under a
|
|
636
|
+
`FormSection` that already has the title.
|
|
632
637
|
|
|
633
638
|
### Rows a user adds and removes
|
|
634
639
|
|
package/docs/guides/i18n.md
CHANGED
|
@@ -324,7 +324,7 @@ breadcrumb (`material.doc.breadcrumb`); `MessageCard`'s "Unread"
|
|
|
324
324
|
failed", its type, size and count errors (`material.upload.replace-named`,
|
|
325
325
|
`remove-named`, `failed`, `invalid-type`, `too-large`, `max-files`; an error keeps the language
|
|
326
326
|
it was raised in) and the drop zone's "Max {size}" and "Up to {count} files"
|
|
327
|
-
(`material.upload.dropzone.max-size` / `max-files`); the editor's
|
|
327
|
+
(`material.upload.dropzone.max-size` / `max-files`) and the names `accept` wildcards read as (`material.upload.accept.images`, `audio`, `video`, `text`, `application`); the editor's
|
|
328
328
|
placeholder, which follows a language change without rebuilding the editor,
|
|
329
329
|
and its emoji buttons (`material['rich-text-editor'].placeholder` /
|
|
330
330
|
`insert-emoji`); `CircularProgress`'s "Progress: {value}%"
|
package/docs/troubleshooting.md
CHANGED
|
@@ -11,6 +11,7 @@ words in your error.
|
|
|
11
11
|
- [`Cannot find package '@react-pdf/renderer'`](#cannot-find-package-react-pdfrenderer)
|
|
12
12
|
- [`Cannot find package 'react-router'` after upgrading to 3.0](#cannot-find-package-react-router-after-upgrading-to-30) (and `ERESOLVE` on `react` or `react-router`; `Element type is invalid` for `ViewTransition` or `browser is not a function` from a stale Storybook or Vitest pre-bundle)
|
|
13
13
|
- [`Conflicting peer dependency: @react-pdf/renderer` (`ERESOLVE`)](#conflicting-peer-dependency-react-pdfrenderer)
|
|
14
|
+
- [`AttributeValuesFormFieldSet` shows empty fields, or ignores my `defaultValues`](#attributevaluesformfieldset-shows-empty-fields-or-ignores-my-defaultvalues)
|
|
14
15
|
- [`Cannot find package 'leaflet'`](#cannot-find-package-leaflet)
|
|
15
16
|
- [`hls.js could not be loaded. Install it (`npm i hls.js`) to play HLS streams in this browser.`](#hlsjs-could-not-be-loaded-install-it-npm-i-hlsjs-to-play-hls-streams-in-this-browser)
|
|
16
17
|
- [`This browser cannot play HLS streams.`](#this-browser-cannot-play-hls-streams)
|
|
@@ -68,6 +69,8 @@ words in your error.
|
|
|
68
69
|
- [An input now has `placeholder=" "` in the DOM](#an-input-now-has-placeholder--in-the-dom)
|
|
69
70
|
- ["Select all" runs under the sort, "Filters" or the actions in a cards or tiles list on a phone](#select-all-runs-under-the-sort-filters-or-the-actions-in-a-cards-or-tiles-list-on-a-phone)
|
|
70
71
|
- [A dialog or sheet scrolls, or clips a child, after upgrading](#a-dialog-or-sheet-scrolls-or-clips-a-child-after-upgrading)
|
|
72
|
+
- [A `DialogBody`'s header and footer do not stay pinned](#a-dialogbodys-header-and-footer-do-not-stay-pinned)
|
|
73
|
+
- [A form's `form-actions` bar sticks inside a `DialogBody`](#a-forms-form-actions-bar-sticks-inside-a-dialogbody)
|
|
71
74
|
- [A form's fields no longer scroll in their own box after upgrading](#a-forms-fields-no-longer-scroll-in-their-own-box-after-upgrading)
|
|
72
75
|
- [My activity content lost its side padding, or the rail's entries moved up](#my-activity-content-lost-its-side-padding-or-the-rails-entries-moved-up)
|
|
73
76
|
- [axe reports `target-size` on a control under a form's sticky actions](#axe-reports-target-size-on-a-control-under-a-forms-sticky-actions)
|
|
@@ -381,6 +384,7 @@ words in your error.
|
|
|
381
384
|
- [`` [@nxgt/material] DataTable: `tableRef` stays null in the `cards` layout; use `focusRef`. ``](#nxgtmaterial-datatable-tableref-stays-null-in-the-cards-layout-use-focusref)
|
|
382
385
|
- [`defineCodeTheme: "keyword" must be a hex colour`](#definecodetheme-keyword-must-be-a-hex-colour-rgb-or-rrggbb)
|
|
383
386
|
- [A `CodeEditor` shows its code in one colour after another Monaco editor mounts](#a-codeeditor-shows-its-code-in-one-colour-after-another-monaco-editor-mounts)
|
|
387
|
+
- [`primary={false}` has no effect on a `ContactsFormField` with `editing="dialog"`](#primaryfalse-has-no-effect-on-a-contactsformfield-with-editingdialog)
|
|
384
388
|
|
|
385
389
|
**PDF reader**
|
|
386
390
|
|
|
@@ -536,7 +540,28 @@ bun add @react-pdf/renderer@^4.9
|
|
|
536
540
|
`--legacy-peer-deps` silences the error but keeps a renderer the print
|
|
537
541
|
entry is not tested against.
|
|
538
542
|
|
|
539
|
-
### `
|
|
543
|
+
### `AttributeValuesFormFieldSet` shows empty fields, or ignores my `defaultValues`
|
|
544
|
+
|
|
545
|
+
**When:** the set comes up empty although you pass `defaultValues`, or shows
|
|
546
|
+
other values than the ones you passed.
|
|
547
|
+
|
|
548
|
+
**Why:** the set reads the form value at `name` first. `defaultValues`
|
|
549
|
+
is only a fallback while that value is empty: `undefined`, `null` or an object
|
|
550
|
+
with no keys. A form that already holds `{ color: 'red' }` at `name` wins over
|
|
551
|
+
`defaultValues`; a form that holds `{ color: undefined }` has a key, so it is
|
|
552
|
+
not empty either.
|
|
553
|
+
|
|
554
|
+
**Fix:** put the values in the form, where every other field reads them:
|
|
555
|
+
|
|
556
|
+
```tsx
|
|
557
|
+
const form = useForm({ defaultValues: { attributes: { size: 'M' } } });
|
|
558
|
+
// or, for a record loaded later
|
|
559
|
+
form.reset({ attributes: record.attributes });
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
Keep `defaultValues` on the set only for a fallback when the form holds nothing.
|
|
563
|
+
|
|
564
|
+
## `Cannot find package 'leaflet'`
|
|
540
565
|
|
|
541
566
|
**When:** at build or at the first import of `@nxgt/material/map`. The missing
|
|
542
567
|
name may also be `react-leaflet`, `@react-leaflet/core`,
|
|
@@ -614,6 +639,14 @@ never receives the press.
|
|
|
614
639
|
forwards `ref` and `...props` to its root. Or skip `trigger` and open it from
|
|
615
640
|
your own state with `open` / `onOpenChange`.
|
|
616
641
|
|
|
642
|
+
### A test that read the upload hint now sees "JPEG, PNG, WebP" or "Images"
|
|
643
|
+
|
|
644
|
+
**When:** after upgrading, a test or snapshot that matched the drop zone's hint
|
|
645
|
+
(`image/jpeg,image/png · Max 2 MB`, `image/*`) fails.
|
|
646
|
+
**Why:** the hint shows short names derived from `accept` instead of the raw
|
|
647
|
+
list: `JPEG, PNG · Max 2 MB`, `Images`.
|
|
648
|
+
**Fix:** match the names, or pass `acceptLabel="..."` to fix the text.
|
|
649
|
+
|
|
617
650
|
### `This browser cannot play HLS streams.`
|
|
618
651
|
|
|
619
652
|
**When:** an HLS track on a browser without Media Source Extensions where
|
|
@@ -1461,6 +1494,38 @@ with `className="max-h-none overflow-visible"`; to change the cap, pass your own
|
|
|
1461
1494
|
For a dialog that should grow taller than the screen and scroll inside the
|
|
1462
1495
|
overlay instead of capping, use `DialogScrollContent`.
|
|
1463
1496
|
|
|
1497
|
+
With a `DialogBody` as a direct child, the content is `overflow-hidden` (a
|
|
1498
|
+
clipped flex column) and only the body scrolls, so a child that sticks out of
|
|
1499
|
+
the content is clipped there too; keep popovers in a portal.
|
|
1500
|
+
|
|
1501
|
+
### A `DialogBody`'s header and footer do not stay pinned
|
|
1502
|
+
|
|
1503
|
+
**When:** a long dialog with a `DialogBody` still scrolls as a whole, or the
|
|
1504
|
+
footer sits at the end of the fields.
|
|
1505
|
+
**Why:** the content only turns into a column when the `DialogBody` is a
|
|
1506
|
+
*direct* child of `DialogContent` (`has-[>[data-slot=dialog-body]]`). Inside a
|
|
1507
|
+
`<form>` or another wrapper it is not. Another cause: a `max-h-none` or
|
|
1508
|
+
`overflow-visible` in the content's `className`.
|
|
1509
|
+
**Fix:** make the body a direct child, and put the `<form>` around the whole
|
|
1510
|
+
content, or keep the body inside and submit with `form="id"` on the footer button:
|
|
1511
|
+
|
|
1512
|
+
```tsx
|
|
1513
|
+
<DialogContent>
|
|
1514
|
+
<DialogHeader>…</DialogHeader>
|
|
1515
|
+
<DialogBody>…</DialogBody>
|
|
1516
|
+
<DialogFooter>…</DialogFooter>
|
|
1517
|
+
</DialogContent>
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1520
|
+
### A form's `form-actions` bar sticks inside a `DialogBody`
|
|
1521
|
+
|
|
1522
|
+
**When:** a `.form-grid-layout` form with `form-actions` in a `DialogBody` shows
|
|
1523
|
+
its Save bar at the bottom of the body, not of the dialog.
|
|
1524
|
+
**Why:** the bar is sticky at the bottom of whatever scrolls, and the body now
|
|
1525
|
+
scrolls.
|
|
1526
|
+
**Fix:** use the `DialogFooter` for the buttons, with `form="my-form"` on the
|
|
1527
|
+
submit button and `id="my-form"` on the form, and leave `form-actions` out.
|
|
1528
|
+
|
|
1464
1529
|
### A form's fields no longer scroll in their own box after upgrading
|
|
1465
1530
|
|
|
1466
1531
|
**When:** after upgrading, a `.form-grid-layout` form grows with the page
|
|
@@ -6950,6 +7015,19 @@ structural theme back when it mounts, but not while the other editor stays.
|
|
|
6950
7015
|
**Fix:** keep that editor on a page of its own, or stop it calling `setTheme`
|
|
6951
7016
|
(`CodeEditor`'s `ref` handle gives Monaco's editor for the options you need).
|
|
6952
7017
|
|
|
7018
|
+
### `primary={false}` has no effect on a `ContactsFormField` with `editing="dialog"`
|
|
7019
|
+
|
|
7020
|
+
**When:** `<ContactsFormField editing="dialog" primary={false} />` looks the
|
|
7021
|
+
same as without the prop.
|
|
7022
|
+
|
|
7023
|
+
**Why:** `primary` hides the star and the primary marks of the inline editor.
|
|
7024
|
+
The dialog edits `type`, `value` and `label` only; it has no star to hide, and
|
|
7025
|
+
the `primary` flag already in the value is left untouched. `types` does work
|
|
7026
|
+
in both modes.
|
|
7027
|
+
|
|
7028
|
+
**Fix:** use the default `editing="inline"` when the star must go, or drop the
|
|
7029
|
+
`primary` flag from the value before saving.
|
|
7030
|
+
|
|
6953
7031
|
## PDF reader
|
|
6954
7032
|
|
|
6955
7033
|
### PDF text is missing or in the wrong font in `PdfReader` (cMaps and standard fonts)
|