@nxgt/material 3.12.1 → 3.13.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 +45 -0
- package/README.md +15 -13
- package/dist/{async-slice-4qbER86I.js → async-slice-ChtlTP8W.js} +2 -2
- package/dist/{background-cEqcZQ3v.js → background-Ce7M5V42.js} +2 -1
- package/dist/backgrounds/css-react/icons-quiet.css +43 -0
- package/dist/backgrounds/css-react/icons.css +2 -0
- package/dist/backgrounds.js +1 -1
- package/dist/{button-BNjw-pnE.js → button-BrgyWw7T.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-DLgQTJBZ.js → chip-BZu-bvAJ.js} +1 -1
- package/dist/{code-editor-BZbaYLvo.js → code-editor-DjY7_8TH.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-BT5BO5w6.js → code-language-items-D1lpNQ6J.js} +2 -2
- package/dist/components/components.css +2 -0
- package/dist/components/ui/display/avatar/avatar.css +17 -0
- package/dist/components/ui/feedback/alert/alert.css +16 -0
- package/dist/{components-yx1t_5_P.js → components-BhGc4Bj7.js} +15147 -14990
- package/dist/components.js +26 -26
- package/dist/{dialog-BQp5IdFl.js → dialog-rOMjlKJ7.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/draw-animate.js +1 -1
- package/dist/draw.js +1 -1
- package/dist/{drawing-B8VuG7nx.js → drawing-iP1SDjdL.js} +60 -54
- package/dist/{dropdown-menu-BsH9W_3C.js → dropdown-menu-BEyP-A0J.js} +1 -1
- package/dist/editor.js +527 -527
- package/dist/{empty-state-WaU4-T2c.js → empty-state-ZtqqpX0S.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-C6HhBw34.js → i18n-provider-GV4Ukoe2.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-DUAq9f7H.js → icon-badge-_tY1MwU9.js} +1 -1
- package/dist/lib/backgrounds/background/types.d.ts +2 -1
- package/dist/lib/backgrounds/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/data-table/numeric-class.d.ts +2 -0
- package/dist/lib/components/ui/collections/data-table/table-meta.d.ts +8 -3
- package/dist/lib/components/ui/display/entity-header/entity-header.d.ts +8 -2
- package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +1 -1
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-body.d.ts +2 -1
- package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +43 -8
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +4 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +3 -0
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-toggle.d.ts +20 -0
- package/dist/lib/components/ui/display/stat-card/index.d.ts +2 -0
- package/dist/lib/components/ui/display/stat-card/stat-card-group.d.ts +12 -0
- package/dist/lib/components/ui/feedback/alert/alert-tone-icon.d.ts +9 -0
- package/dist/lib/components/ui/feedback/alert/alert.d.ts +4 -0
- package/dist/lib/components/ui/fields/form-section/form-section-heading-classes.d.ts +4 -0
- package/dist/lib/components/ui/fields/form-section/form-section.d.ts +9 -1
- package/dist/lib/components/ui/layout/app-shell/use-truncated-title.d.ts +11 -1
- package/dist/lib/components/ui/layout/list-details-layout/list-details-layout.d.ts +12 -2
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-back.d.ts +16 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-details.d.ts +11 -3
- package/dist/lib/components/ui/layout/list-details-layout/partials/pane-opener.d.ts +15 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-container-narrow.d.ts +7 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-pane-focus.d.ts +13 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-types.d.ts +6 -0
- package/dist/lib/components/ui/widgets/drawing/partials/drawing-root.d.ts +5 -1
- package/dist/lib/draw-animate/morph-drawing.d.ts +2 -8
- package/dist/lib/i18n/resources/en/en.d.ts +3 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +3 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +3 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +3 -0
- package/dist/lib/i18n/resources/resources.d.ts +6 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/print/components/print-document/print-document.d.ts +12 -2
- package/dist/lib/print/index.d.ts +2 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +43 -43
- package/dist/map.js +4 -4
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +101 -98
- package/dist/{public-B0Nq_yYV.js → public-D_Gz7wgr.js} +6 -6
- package/dist/{rich-code-block-v7WmeZp9.js → rich-code-block-RN-EpeTA.js} +4 -4
- package/dist/{sortable-provider-CgDTolQR.js → sortable-provider-Iej7IS4n.js} +1 -1
- package/dist/{spinner-BtSIYVrC.js → spinner-BwWDXIbg.js} +1 -1
- package/dist/{stored-language-BeIKw3-K.js → stored-language-BAAP7qS3.js} +4 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-B2Pehdhn.js → theme-toggle-8zHeXSD1.js} +1 -1
- package/dist/{toolbar-items-rUHdVqAq.js → toolbar-items-CVQBYp4K.js} +2 -2
- package/dist/{translate-material-Bd_KgfB8.js → translate-material-C0aOnHpZ.js} +2 -2
- package/dist/{translator-Dje8HrNz.js → translator-BU07gNva.js} +1 -1
- package/dist/{use-chat-composer-B0_STpQN.js → use-chat-composer-P4GxmCHa.js} +14 -14
- package/dist/{use-heading-spy-DXo6IOX9.js → use-heading-spy-DETdqnB6.js} +1 -1
- package/dist/{use-material-translation-B3V_bz-5.js → use-material-translation-DGeVp-qP.js} +2 -2
- package/docs/components/data-display.md +60 -8
- package/docs/components/data-table-filter-and-lists.md +1 -1
- package/docs/components/feedback-and-status.md +22 -4
- package/docs/components/form-fields.md +14 -3
- package/docs/components/navigation-and-layout.md +8 -3
- package/docs/guides/backgrounds.md +35 -2
- package/docs/guides/drawing.md +15 -0
- package/docs/guides/printing.md +113 -2
- package/docs/guides/server-lists-url.md +3 -0
- package/docs/previews/feedback-status-alert.webp +0 -0
- package/docs/roadmap.md +5 -3
- package/docs/troubleshooting.md +59 -0
- package/lib/backgrounds/css-react/icons-quiet.css +43 -0
- package/lib/backgrounds/css-react/icons.css +2 -0
- package/lib/components/components.css +2 -0
- package/lib/components/ui/display/avatar/avatar.css +17 -0
- package/lib/components/ui/feedback/alert/alert.css +16 -0
- package/package.json +6 -2
package/docs/troubleshooting.md
CHANGED
|
@@ -2233,6 +2233,20 @@ const query = parseFilterQuery(params, STUDENT_FILTERS, { locked: LOCKED });
|
|
|
2233
2233
|
const asWritten = parseFilterQuery(params, STUDENT_FILTERS);
|
|
2234
2234
|
```
|
|
2235
2235
|
|
|
2236
|
+
### `?archived=0` now shows every row
|
|
2237
|
+
|
|
2238
|
+
**When:** a stored link or bookmark with a `style: 'flag'` alias at `0`
|
|
2239
|
+
(`?archived=0`) used to keep only the rows where the switch is "No"; it now
|
|
2240
|
+
shows every row.
|
|
2241
|
+
**Why:** a flag alias reads `1` as on and `0` as off, and off is no condition
|
|
2242
|
+
(a switch that widens the list was counted as an active filter at `0`).
|
|
2243
|
+
**Fix:** to filter on "No", write the condition under `f=`. The serializer
|
|
2244
|
+
already does, so only a hand-written or stored link needs the change:
|
|
2245
|
+
|
|
2246
|
+
```
|
|
2247
|
+
?f=archived:is:0
|
|
2248
|
+
```
|
|
2249
|
+
|
|
2236
2250
|
### `defineFilterModel: field "level" cannot use "gt" on a select field`
|
|
2237
2251
|
|
|
2238
2252
|
**When:** the module that calls `defineFilterModel` is imported (at boot on a
|
|
@@ -3384,6 +3398,51 @@ renders.
|
|
|
3384
3398
|
**Fix:** build the document with `pdfDocument()` or `definePdfDocument()`,
|
|
3385
3399
|
which stamp `version: 1`, rather than by hand.
|
|
3386
3400
|
|
|
3401
|
+
### A PDF accessibility checker says the PDF is not tagged
|
|
3402
|
+
|
|
3403
|
+
**When:** a checker (Acrobat's accessibility check, PAC, veraPDF with the PDF/UA profile) reports "document is not tagged" or "no structure tree" on a PDF made with `@nxgt/material/print`.
|
|
3404
|
+
**Why:** `@react-pdf/renderer` 4.9 writes no structure tree, so no PDF made here is a tagged PDF, and none claims PDF/UA. This is the renderer's limit, not a missing option. What the library does write is the language, the title (shown as the window title), the outline and the reading order of the nodes.
|
|
3405
|
+
**Fix:** set what can be set, and say the rest in the page: `language` and `meta.title` on the document, `outline: true` for a long one, text beside a drawing or an image. If a tagged PDF is a requirement, offer an accessible HTML version of the same data. See [what is written, and what is not tagged](guides/printing.md#what-is-written-and-what-is-not-tagged).
|
|
3406
|
+
|
|
3407
|
+
```ts
|
|
3408
|
+
pdfDocument({ language: 'fr', meta: { title: 'Facture INV-42' }, outline: true, pages });
|
|
3409
|
+
```
|
|
3410
|
+
|
|
3411
|
+
### The PDF's font is substituted, or a PDF/A validator rejects the file
|
|
3412
|
+
|
|
3413
|
+
**When:** a viewer shows a different Helvetica than the one you designed with (other widths, a missing euro sign, or the narrow no-break space of French thousands drawn as a wrong glyph), or a PDF/A validator reports "font not embedded".
|
|
3414
|
+
**Why:** the default fonts (Helvetica, Times-Roman, Courier) are pdfkit's standard fonts: the file names them and the viewer draws its own.
|
|
3415
|
+
**Fix:** embed a family with `registerPdfFont` and name it in the theme; see [Embedding a font and archiving](guides/printing.md#embedding-a-font-and-archiving).
|
|
3416
|
+
|
|
3417
|
+
```ts
|
|
3418
|
+
const sans = registerPdfFont({ family: 'Inter', regular: interRegular, bold: interBold });
|
|
3419
|
+
pdfDocument({ theme: { fonts: { sans } }, conformance: 'PDF/A-2b', pages });
|
|
3420
|
+
```
|
|
3421
|
+
|
|
3422
|
+
### An embedded font has no bold
|
|
3423
|
+
|
|
3424
|
+
**When:** `registerPdfFont` was given a variable font (`inter-latin-wght-normal.woff2`): bold text looks regular, and in some builds rendering fails while writing the font.
|
|
3425
|
+
**Why:** react-pdf draws a variable font at its default instance, so bold has nothing to switch to (a bold request on a variable woff2 also failed in our tests).
|
|
3426
|
+
**Fix:** give one static file per style (`@fontsource/inter` ships `inter-latin-400-normal.woff` and `inter-latin-700-normal.woff`).
|
|
3427
|
+
|
|
3428
|
+
### A `Drawing` `description` is never read
|
|
3429
|
+
|
|
3430
|
+
**When:** a `Drawing` with `description` writes no `<desc>`, or a screen reader says only the name.
|
|
3431
|
+
**Why:** a description is read after the name, so it needs a `title`; a `decorative` drawing is hidden from assistive technology, and the type refuses `description` on it. `toSVG` takes the same `description` option and throws without a `title` or with `decorative`, so an exported file or an e-mail carries it too.
|
|
3432
|
+
**Fix:** give the drawing a `title`, and keep the title short and the description long (`toSVG(scene, { title, description })` does the same for a file):
|
|
3433
|
+
|
|
3434
|
+
```tsx
|
|
3435
|
+
<Drawing scene={chart} title="Sales by month" description="January 12, February 18, March 25: rising." />
|
|
3436
|
+
```
|
|
3437
|
+
|
|
3438
|
+
### `iconMotif.quiet` changes nothing
|
|
3439
|
+
|
|
3440
|
+
A theme that defines `iconMotif.quiet` with a value other than `start`, `end` or `center` is rejected by `defineTheme`; see the core troubleshooting.
|
|
3441
|
+
|
|
3442
|
+
**When:** text over `<Background preset="icons">` still sits on icons although `iconMotif={{ quiet: 'start' }}` is set.
|
|
3443
|
+
**Why:** `quiet` is a CSS mask the `icons` preset's stylesheet draws: another preset ignores it, the band is `--background-quiet` wide (42% by default) and fades back in over 30% more, and on a phone the text can be wider than the band.
|
|
3444
|
+
**Fix:** use `preset="icons"`, import `@nxgt/material/backgrounds.css`, and widen the band: `className="[--background-quiet:60%]"`. See [Keeping text clear of the icons](guides/backgrounds.md#keeping-text-clear-of-the-icons-quiet).
|
|
3445
|
+
|
|
3387
3446
|
### `'invoice' is of type 'unknown'` in a `definePdfDocument` template
|
|
3388
3447
|
|
|
3389
3448
|
**When:** compiling a template whose data parameter has no type,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* `iconMotif.quiet` of the `icons` preset (React only). */
|
|
2
|
+
@layer components {
|
|
3
|
+
/* `quiet`: the icons fade out over a band, so text can sit on the motif. The
|
|
4
|
+
* band is `--background-quiet` wide (42%), then the icons fade back in over
|
|
5
|
+
* 30%. `start` and `end` follow the reading direction. A mask, not a colour:
|
|
6
|
+
* the text underneath keeps the wash's own contrast. */
|
|
7
|
+
[data-background="icons"] > [data-scene] > :is(.ic-q-start, .ic-q-end) {
|
|
8
|
+
--nxgt-quiet-to: to right;
|
|
9
|
+
-webkit-mask-image: linear-gradient(
|
|
10
|
+
var(--nxgt-quiet-to),
|
|
11
|
+
transparent var(--background-quiet, 42%),
|
|
12
|
+
#000 calc(var(--background-quiet, 42%) + 30%)
|
|
13
|
+
);
|
|
14
|
+
mask-image: linear-gradient(
|
|
15
|
+
var(--nxgt-quiet-to),
|
|
16
|
+
transparent var(--background-quiet, 42%),
|
|
17
|
+
#000 calc(var(--background-quiet, 42%) + 30%)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
[data-background="icons"] > [data-scene] > .ic-q-end,
|
|
21
|
+
[data-background="icons"] > [data-scene]:dir(rtl) > .ic-q-start {
|
|
22
|
+
--nxgt-quiet-to: to left;
|
|
23
|
+
}
|
|
24
|
+
[data-background="icons"] > [data-scene]:dir(rtl) > .ic-q-end {
|
|
25
|
+
--nxgt-quiet-to: to right;
|
|
26
|
+
}
|
|
27
|
+
[data-background="icons"] > [data-scene] > .ic-q-center {
|
|
28
|
+
-webkit-mask-image: linear-gradient(
|
|
29
|
+
to right,
|
|
30
|
+
#000 calc(50% - var(--background-quiet, 42%) / 2 - 30%),
|
|
31
|
+
transparent calc(50% - var(--background-quiet, 42%) / 2),
|
|
32
|
+
transparent calc(50% + var(--background-quiet, 42%) / 2),
|
|
33
|
+
#000 calc(50% + var(--background-quiet, 42%) / 2 + 30%)
|
|
34
|
+
);
|
|
35
|
+
mask-image: linear-gradient(
|
|
36
|
+
to right,
|
|
37
|
+
#000 calc(50% - var(--background-quiet, 42%) / 2 - 30%),
|
|
38
|
+
transparent calc(50% - var(--background-quiet, 42%) / 2),
|
|
39
|
+
transparent calc(50% + var(--background-quiet, 42%) / 2),
|
|
40
|
+
#000 calc(50% + var(--background-quiet, 42%) / 2 + 30%)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -135,6 +135,8 @@
|
|
|
135
135
|
@import "./ui/display/period-cards/period-cards.css";
|
|
136
136
|
@import "./ui/layout/sidebar/sidebar-tokens.css";
|
|
137
137
|
@import "./ui/display/avatar/avatar.css";
|
|
138
|
+
/* Alert and Banner span the row in the form grids (#1497). */
|
|
139
|
+
@import "./ui/feedback/alert/alert.css";
|
|
138
140
|
@import "./ui/display/stat-card/stat-card.css";
|
|
139
141
|
/* The native charts (@nxgt/material/charts): held series colours, grid, marks;
|
|
140
142
|
* then the frame, legend keys, tooltip (float and phone bottom card), table. */
|
|
@@ -10,3 +10,20 @@
|
|
|
10
10
|
--nxgt-tone-ring-share-own: var(--avatar-ring-share);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
/* The initials scale with the avatar (#1492): the avatar is a size container,
|
|
15
|
+
* and its fallback text is 40 % of the diameter (`cqw`), never under 10 px, so
|
|
16
|
+
* two letters keep clear of the edge at 32 px and the text grows with a
|
|
17
|
+
* larger avatar. The share is `--avatar-text-share` (a unitless percentage,
|
|
18
|
+
* 40 by default). The rule reads the avatar's own size, so it only applies to
|
|
19
|
+
* a fallback inside an `avatar` (a bare `AvatarFallback` keeps inheriting).
|
|
20
|
+
* Colours are the tone's, unchanged: the text stays AA on its container. */
|
|
21
|
+
@layer components {
|
|
22
|
+
[data-slot="avatar"] {
|
|
23
|
+
container-type: inline-size;
|
|
24
|
+
}
|
|
25
|
+
[data-slot="avatar"] [data-slot="avatar-fallback"] {
|
|
26
|
+
font-size: max(0.625rem, calc(var(--avatar-text-share, 40) * 1cqw));
|
|
27
|
+
line-height: 1;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* An Alert or a Banner placed in a form's grid takes the whole row (#1497),
|
|
2
|
+
* like a FormSection: no `col-span-full w-full` from the app. Direct children
|
|
3
|
+
* of the form grid's `[data-slot="form-fields"]` (inside `.form-grid-layout`)
|
|
4
|
+
* or of a FormSection's `[data-slot="form-section-fields"]`, so an alert deeper
|
|
5
|
+
* in a field is untouched. In the components layer: a utility class of the
|
|
6
|
+
* app on the alert (`col-span-1`, `w-fit`) still wins. */
|
|
7
|
+
@layer components {
|
|
8
|
+
:is(
|
|
9
|
+
.form-grid-layout [data-slot="form-fields"],
|
|
10
|
+
[data-slot="form-section-fields"]
|
|
11
|
+
)
|
|
12
|
+
> :is([data-slot="alert"], [data-slot="banner"]) {
|
|
13
|
+
grid-column: 1 / -1;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -320,6 +320,10 @@
|
|
|
320
320
|
"style": "./lib/backgrounds/css-react/icons.css",
|
|
321
321
|
"default": "./lib/backgrounds/css-react/icons.css"
|
|
322
322
|
},
|
|
323
|
+
"./backgrounds/icons-quiet.css": {
|
|
324
|
+
"style": "./lib/backgrounds/css-react/icons-quiet.css",
|
|
325
|
+
"default": "./lib/backgrounds/css-react/icons-quiet.css"
|
|
326
|
+
},
|
|
323
327
|
"./backgrounds/illustrated.css": {
|
|
324
328
|
"style": "./lib/backgrounds/css-react/illustrated.css",
|
|
325
329
|
"default": "./lib/backgrounds/css-react/illustrated.css"
|
|
@@ -353,7 +357,7 @@
|
|
|
353
357
|
"docs:previews": "rm -rf node_modules/.cache/nxgt-preview-free/missing && NXGT_PREVIEW_FREE=1 vitest run --project previews && bun .storybook/preview-free-report.ts"
|
|
354
358
|
},
|
|
355
359
|
"dependencies": {
|
|
356
|
-
"@nxgt/material-core": "^0.
|
|
360
|
+
"@nxgt/material-core": "^0.30.1",
|
|
357
361
|
"@base-ui/react": "^1.6.0",
|
|
358
362
|
"@dnd-kit/core": "^6.3.1",
|
|
359
363
|
"@dnd-kit/sortable": "^10.0.0",
|