@nxgt/material 3.81.0 → 3.82.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +2 -2
  3. package/dist/{alert-dialog-DOZ0SfQs.js → alert-dialog-DXLJ4AZP.js} +74 -73
  4. package/dist/components/ui/collections/data-table/data-table-items.css +15 -0
  5. package/dist/{components-B00kDHzJ.js → components-BmZk-git.js} +105 -82
  6. package/dist/components.js +4 -4
  7. package/dist/editor.js +973 -966
  8. package/dist/{hooks-DvIsom2p.js → hooks-k8_f3B0k.js} +1 -1
  9. package/dist/hooks.js +2 -2
  10. package/dist/lib/components/ui/fields/inline-edit/inline-edit-display.d.ts +5 -1
  11. package/dist/lib/components/ui/fields/inline-edit/inline-edit-editor.d.ts +6 -1
  12. package/dist/lib/components/ui/fields/inline-edit/inline-edit.d.ts +14 -1
  13. package/dist/lib/components/ui/fields/inline-edit/use-inline-edit.d.ts +4 -1
  14. package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.types.d.ts +6 -1
  15. package/dist/lib/components/ui/layout/dashboard-grid/dashboard-tile.d.ts +1 -1
  16. package/dist/lib/components/ui/media/galleries/gallery.utils.d.ts +14 -0
  17. package/dist/lib/components/ui/media/galleries/partials/gallery-tile-button.d.ts +12 -0
  18. package/dist/lib/components/ui/media/galleries/partials/gallery-tile.d.ts +3 -1
  19. package/dist/lib/illustrations-game/index.d.ts +4 -3
  20. package/dist/main.js +5 -5
  21. package/dist/material.css +1 -1
  22. package/dist/{use-chat-composer-BBF1BI_s.js → use-chat-composer-BfFcmDua.js} +1409 -1365
  23. package/dist/{use-heading-spy-BgyA6SJl.js → use-heading-spy-gDNtK1sU.js} +1 -1
  24. package/docs/README.md +1 -1
  25. package/docs/components/data-display.md +1 -1
  26. package/docs/components/form-fields.md +5 -0
  27. package/docs/components/navigation-and-layout.md +1 -0
  28. package/docs/guides/icon-motifs.md +1 -1
  29. package/docs/guides/illustrations.md +5 -5
  30. package/docs/previews/feedback-status-illustration-game.webp +0 -0
  31. package/lib/components/ui/collections/data-table/data-table-items.css +15 -0
  32. package/package.json +2 -2
@@ -1,5 +1,5 @@
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-DOZ0SfQs.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-DXLJ4AZP.js";
3
3
  import { a as l } from "./button-CSKUtMI3.js";
4
4
  import { i as u } from "./translate-material-D4rn5UaQ.js";
5
5
  import { t as d } from "./use-material-translation-DYrfV_JJ.js";
package/docs/README.md CHANGED
@@ -26,7 +26,7 @@ detail: every option, the second example, and the traps.
26
26
  | [Streaming (HLS)](guides/media-streaming.md) | You play `.m3u8` streams in `MediaPlayer` with `@nxgt/material/media-hls` |
27
27
  | [Maps](guides/maps.md) | You render Leaflet maps or a location field with `@nxgt/material/map` |
28
28
  | [Drawing](guides/drawing.md) | You draw diagrams, badges or illustrations from code with `@nxgt/material/draw`: scenes and JSX primitives, roles and tones, a strict CSP, accessibility and events, sketch, animation, PNG, PDF and e-mail |
29
- | [Illustrations](guides/illustrations.md) | You draw state illustrations from your Font Awesome sprites with `@nxgt/material/illustrations`: the twelve scenes and the health and education sets, `EmptyState` / `ErrorState` / `DataTable` with `illustration`, `IllustrationDefaults` for an app, sizes, motion and CSP |
29
+ | [Illustrations](guides/illustrations.md) | You draw state illustrations from your Font Awesome sprites with `@nxgt/material/illustrations`: the twelve scenes and the health, education and game sets, `EmptyState` / `ErrorState` / `DataTable` with `illustration`, `IllustrationDefaults` for an app, sizes, motion and CSP |
30
30
  | [Icon motifs](guides/icon-motifs.md) | You use icon backgrounds, celestial skies, illustrations or a theme that names a motif: serving your own Font Awesome sprites (the package ships none), `IconSpritesProvider`, `icons` / `iconStyle` / `iconMotif`, `sky`, the health and education sets, Free fallbacks for Pro-only names |
31
31
  | [Backgrounds](guides/backgrounds.md) | You want a gradient or patterned backdrop: tones, intensity, the opt-in `backgrounds.css`, custom colours, motion and CSP |
32
32
  | [SSR](guides/ssr.md) | Your app renders on a server and bundles this package |
@@ -814,7 +814,7 @@ import { TubeCap } from '@nxgt/material/components';
814
814
 
815
815
  `TUBE_CAP_KINDS` lists the kinds. The look is CSS on `data-kind`, with no inline style (strict CSP). The cap is `aria-hidden`.
816
816
 
817
- **Storybook:** `Data display/TubeCap` · **Vue:** not yet (#2470)
817
+ **Storybook:** `Data display/TubeCap` · **Vue:** `TubeCap` (`@nxgt/material-vue/components`)
818
818
 
819
819
  ---
820
820
 
@@ -1348,6 +1348,11 @@ import { InlineEdit } from '@nxgt/material/components';
1348
1348
  | `onSave` | `(value: string) => void` | — | on save (Enter or the check button), not on each key |
1349
1349
  | `placeholder` | `string` | "Click to edit" | shown while empty |
1350
1350
  | `disabled` | `boolean` | `false` | read-only text |
1351
+ | `variant` | Typography step (`headline-lg`, …) | body | the type step of the saved text and of the input, so a title reads as a title |
1352
+ | `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | none | renders the text (and the input while editing) in an `<h1>`…`<h6>`, so the field can be a document's title; the button and input keep their name |
1353
+ | `defaultEditing` | `boolean` | `false` | starts with the input open, and focuses it on mount (a new, untitled document) |
1354
+ | `aria-label` | `string` | — | the input's name when there is no `label`; with `headingLevel`, set `label` or `aria-label` (the heading then reads the value, then the label) |
1355
+ | `editing` / `onEditingChange` | `boolean` / `(editing: boolean) => void` | — | controls whether the input is open (`disabled` keeps it closed) |
1351
1356
 
1352
1357
  Enter, Escape, Save and Cancel return focus to the field, while a click
1353
1358
  elsewhere saves and leaves focus where it went.
@@ -1007,6 +1007,7 @@ const [order, setOrder] = useState(savedLayout); // string[] of tile ids
1007
1007
  | --- | --- | --- | --- |
1008
1008
  | `id` | `string` | required | The tile's name in `order`; unique in the grid |
1009
1009
  | `title` | `ReactNode` | none | An `h3` at the top, the tile's accessible name and its handle's name |
1010
+ | `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `3` | The level of the title (`<h2>`…`<h6>`), to follow the heading above the grid |
1010
1011
  | `span` / `rowSpan` | as `ResponsiveGrid.Item` | 1 | Columns and rows covered, held to the grid's columns at each width |
1011
1012
  | `plain` | `boolean` | `false` | No card of its own (border, background, padding), for a child that is a card already |
1012
1013
  | `label` | `string` | the title, else the id | The name used by the handle and the announcements when `title` is not text |
@@ -138,7 +138,7 @@ An `Illustration` draws a hero icon on a Material 3 Expressive plate, with two
138
138
  to four satellites. There are twelve base scenes (`empty`, `no-results`,
139
139
  `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`,
140
140
  `maintenance`, `invitation`, `sign-in`, `empty-inbox`) and two domain sets of
141
- ten, **health** and **education**, plus **game** (sixteen scenes for games and
141
+ ten, **health** and **education**, plus **game** (twenty-five scenes for games and
142
142
  events), each its own subpath so an app that does not import one does not carry it:
143
143
 
144
144
  <img src="../previews/feedback-status-illustration.webp" width="480" alt="The twelve base illustration scenes">
@@ -5,7 +5,7 @@ on a Material 3 Expressive plate, two to four satellite icons around it, a
5
5
  dashed ring and a few sparkles. There are twelve scenes: `empty`, `no-results`,
6
6
  `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`,
7
7
  `maintenance`, `invitation`, `sign-in` and `empty-inbox`, and two domain sets of
8
- ten more each, health and education, in their own entries ([health](#scene-sets-the-health-scenes) and [education](#scene-sets-the-education-scenes)), and sixteen for games ([game](#scene-sets-the-game-scenes)). The icons are
8
+ ten more each, health and education, in their own entries ([health](#scene-sets-the-health-scenes) and [education](#scene-sets-the-education-scenes)), and twenty-five for games ([game](#scene-sets-the-game-scenes)). The icons are
9
9
  [Font Awesome](https://fontawesome.com) sprites **your app serves** (see
10
10
  [Icons](../getting-started.md#icons)): the package ships no icon artwork, so it
11
11
  works with the sprites your licence covers. The [icon motifs guide](icon-motifs.md) shows them next to the icon backgrounds, the sky and the themes, and lists the suggested names that are Pro only, with Free neighbours.
@@ -148,12 +148,12 @@ icons: serve a Pro sprite, or set `edition="free"` on `IconSpritesProvider`, whi
148
148
 
149
149
  ## Scene sets: the game scenes
150
150
 
151
- `@nxgt/material/illustrations/game` holds sixteen scenes for a game, a quiz, a
151
+ `@nxgt/material/illustrations/game` holds twenty-five scenes for a game, a quiz, a
152
152
  community or an event app: `night-sky`, `dawn`, `village` (night),
153
- `day-village`, `graveyard`, seven character pictograms (`seer`, `healer`,
154
- `archer`, `cupid`, `wolf`, `villager`, `witch`), `victory`, `empty-table`,
153
+ `day-village`, `graveyard`, sixteen character pictograms (`seer`, `healer`,
154
+ `archer`, `cupid`, `wolf`, `villager`, `witch`, `protector`, `elder`, `village-idiot`, `scapegoat`, `raven`, `fox`, `siblings`, `big-bad-wolf`, `wolf-father`), `victory`, `empty-table`,
155
155
  `waiting-players` and `connection-lost`. It works exactly like the other sets,
156
- and they register side by side. Use them where a screen is empty, waiting,
156
+ and they register side by side. The `fox` and `scapegoat` heroes are drawn as vector art, because the icon sprites have no fox or goat; they follow the tone and dark mode like the sprite icons. Use them where a screen is empty, waiting,
157
157
  failed, celebrating or opening: a lobby with no players, a round that waits, a
158
158
  dropped connection, a winner, a night-phase hero. Keep them away from behind
159
159
  data.
@@ -48,6 +48,21 @@
48
48
  gap: var(--nxgt-cards-gap, 0.75rem);
49
49
  grid-template-columns: minmax(0, 1fr);
50
50
  }
51
+ /* The list's 4px of ring room sits inside the scroll box, which clips: the
52
+ * box takes it back on each inline side, so the cards' edges (not the
53
+ * room's) meet the page's edge and the heading above (#2472); the parent needs 4px of inline room. */
54
+ [data-slot="table-wrapper"]:has(> [data-slot="data-table-cards"]) {
55
+ margin-inline: -4px;
56
+ /* `w-full` (utilities layer) would win over this layer. */
57
+ width: calc(100% + 8px) !important;
58
+ }
59
+ /* Tiles keep their own 4px margin, except on a phone (#2292). */
60
+ @media (min-width: 768px) {
61
+ [data-slot="table-wrapper"]:has(> [data-slot="data-table-tiles"]) {
62
+ margin-inline: -4px;
63
+ width: calc(100% + 8px) !important;
64
+ }
65
+ }
51
66
  @container (min-width: 36rem) {
52
67
  [data-slot="data-table-cards"] {
53
68
  grid-template-columns: repeat(2, minmax(0, 1fr));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.81.0",
3
+ "version": "3.82.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -390,7 +390,7 @@
390
390
  "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"
391
391
  },
392
392
  "dependencies": {
393
- "@nxgt/material-core": "^0.49.2",
393
+ "@nxgt/material-core": "^0.50.0",
394
394
  "@base-ui/react": "^1.6.0",
395
395
  "@dnd-kit/core": "^6.3.1",
396
396
  "@dnd-kit/sortable": "^10.0.0",