@nxgt/material 3.77.0 → 3.78.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 +12 -0
- package/README.md +1 -1
- package/dist/{components-ZJx47chq.js → components-j6sIvxhs.js} +11350 -11335
- package/dist/components.js +1 -1
- package/dist/lib/components/ui/actions/back-link/back-link.d.ts +12 -3
- package/dist/lib/components/ui/collections/server-table/partials/server-table-grid-sorting.d.ts +6 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-passed-through.d.ts +1 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +1 -1
- package/dist/lib/components/ui/feedback/state-frame/scene-registry.d.ts +24 -4
- package/dist/lib/illustrations/index.d.ts +1 -1
- package/dist/main.js +1 -1
- package/docs/components/buttons-and-actions.md +9 -1
- package/docs/components/data-table-filter-and-lists.md +3 -2
- package/docs/guides/illustrations.md +34 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.78.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2381](https://github.com/softistx/nxgt-material/pull/2381) [`e1b6dbe`](https://github.com/softistx/nxgt-material/commit/e1b6dbe608e7fe41796c0bc26c08ec2ef0ce883e) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `BackLink` takes `collapse="phone"`: below 768px it shows only its arrow, the label staying its accessible name and, when it is a string, its tooltip (as `ResponsiveLinkButton` does), with `variant` and `aria-label` kept. Unset, the label always shows, as before. Fixes [#2375](https://github.com/softistx/nxgt-material/issues/2375).
|
|
8
|
+
|
|
9
|
+
- [#2385](https://github.com/softistx/nxgt-material/pull/2385) [`2b2ad61`](https://github.com/softistx/nxgt-material/commit/2b2ad6145dcfe8074677f8c29d832f482fa1abab) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Scenes registered through `IllustrationDefaults` `sets` are now typed. `@nxgt/material/illustrations` exports an empty `RegisteredScenes` interface to augment (`declare module '@nxgt/material/illustrations' { interface RegisteredScenes extends SceneTableIds<typeof MY_SCENES> {} }`) and the helper type `SceneTableIds<T extends SceneTable>`; the keys widen `SceneId` (and `RegisteredScene`), so `<Illustration scene="my-scene" />`, a state's `illustration` and `emptyIllustration` accept them beside the built-in ids, without a cast. The `scenes={T}` overload is unchanged. Nothing to adapt: an app that does not augment keeps today's types, and a `scene={id as SceneId}` cast can go. Fixes [#2384](https://github.com/softistx/nxgt-material/issues/2384).
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#2387](https://github.com/softistx/nxgt-material/pull/2387) [`17e479e`](https://github.com/softistx/nxgt-material/commit/17e479e30265dc30eedd29a46f0866262164760a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ServerTable` now takes `focusRef`, as `DataTable` does, and fills it with the table (or the list of cards or tiles) it renders, beside its own ref. `useRowMenuFocus()`'s `focusRef` given to a `ServerTable` scopes `focusRowMenu(id)` to that table, so two tables on a page may share a row id. Nothing to adapt: pass `focusRef={focusRef}` and drop the wrapper element used as a workaround. Fixes [#2086](https://github.com/softistx/nxgt-material/issues/2086).
|
|
14
|
+
|
|
3
15
|
## 3.77.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -207,7 +207,7 @@ reads `duotone.svg`, the file that exists (it used to ask for the missing
|
|
|
207
207
|
| `@nxgt/material/map` | Leaflet maps, markers, a location field — **its own entry, not in the barrel, and browser-only** ([maps guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/maps.md)) |
|
|
208
208
|
| `@nxgt/material/themes` | `NxgtThemeProvider` (the registry, the persisted theme name, `<html data-nxgt-theme>`, `defaultMode`; renders no element; `useTheme({ defaultMode })` takes the first-visit mode too), `NxgtTheme` (a zone in another theme, `mode`, `asChild`), `useThemeContext`, `defineTheme` (a bad background `motif` key or value is dropped and warned about in development, 4.0: an error; core's own `defineTheme` warns only through `{ warn }`), `ThemeDefinitionError`, `themeBootScript` and `THEME_BOOT_SCRIPT` (with `ThemeBootOptions`), the 14 presets and `THEME_PRESETS`, `ThemeName` and `NxgtThemes` (augmentable), with the `NxgtThemeProps`, `NxgtThemeProviderProps`, `ThemeContextValue`, `Theme`, `ThemeDefinition` and `ThemeBackground` types ([guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/theming.md#the-provider-and-zones)). `Background` and `ActivityLayout` take their background from the nearest theme |
|
|
209
209
|
| `@nxgt/material/theme-picker` | `ThemePicker`, the theme and mode chooser (swatches and a mini background per theme; `themes`, `value`, `onValueChange`, `showMode`, `showBackground`, `layout`) and `ThemePickerProps`; its own entry so `/themes` stays small ([guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/theming.md#let-users-choose)) |
|
|
210
|
-
| `@nxgt/material/illustrations` | State illustrations: `Illustration` (`scene`: `empty`, `no-results`, `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`, `maintenance`, `invitation`, `sign-in`, `empty-inbox`, or an id of the `scenes` table it is given; `size`, `title`, `animated`, `hero`, `satellites`, `iconStyle`, `tone`, `duotone`) draws a hero icon on a Material 3 Expressive plate with satellites, from the Font Awesome sprites your app serves (no icon artwork ships); `IllustrationDefaults` (`icons`: `'suggested'` or a table, `iconStyle`, `sets`) opts a subtree's `EmptyState` and `ErrorState` into them; `ILLUSTRATION_SCENES`, `SUGGESTED_ICONS` and the types re-exported from `@nxgt/material-core/illustrations` (`SceneRow`, `SceneTable`), plus `IconStyleInput` and `IconStyleRef` (the `iconStyle` types: `{ family?, type? }` or one of the 37 sprite file names), `SceneId
|
|
210
|
+
| `@nxgt/material/illustrations` | State illustrations: `Illustration` (`scene`: `empty`, `no-results`, `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`, `maintenance`, `invitation`, `sign-in`, `empty-inbox`, or an id of the `scenes` table it is given; `size`, `title`, `animated`, `hero`, `satellites`, `iconStyle`, `tone`, `duotone`) draws a hero icon on a Material 3 Expressive plate with satellites, from the Font Awesome sprites your app serves (no icon artwork ships); `IllustrationDefaults` (`icons`: `'suggested'` or a table, `iconStyle`, `sets`) opts a subtree's `EmptyState` and `ErrorState` into them; `ILLUSTRATION_SCENES`, `SUGGESTED_ICONS` and the types re-exported from `@nxgt/material-core/illustrations` (`SceneRow`, `SceneTable`), plus `IconStyleInput` and `IconStyleRef` (the `iconStyle` types: `{ family?, type? }` or one of the 37 sprite file names), `SceneId` and `RegisteredScene` (the scene id types: the built-in ids plus those registered through `IllustrationSceneRegistry` by an imported set, or through `RegisteredScenes` by you), `RegisteredScenes` (an interface to augment with the ids of a table of your own registered through `sets`) and `SceneTableIds` (the helper type that gives a table's ids: `interface RegisteredScenes extends SceneTableIds<typeof MY_SCENES> {}`). `unauthorized` and `maintenance` states draw the `forbidden` and `maintenance` scenes. `EmptyState`, `ErrorState` and the `DataTable` empty row (`emptyIllustration`) also take `illustration` as a scene id or `true`. Colours are theme tones in `styles.css`; its own entry ([illustrations guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/illustrations.md)) |
|
|
211
211
|
| `@nxgt/material/illustrations/health` | The health scenes: `HEALTH_SCENES` (`patient-record`, `consultation`, `appointment`, `lab-sample`, `prescription`, `vaccination`, `hospitalisation`, `emergency`, `no-patients`, `lab-results`), `HEALTH_SCENE_IDS`, `HEALTH_SUGGESTED_ICONS`, `HealthScene`; register it with `<IllustrationDefaults sets={[HEALTH_SCENES]}>` so `<Illustration scene="patient-record" />` and `<EmptyState illustration="no-patients" />` work (or pass `scenes={HEALTH_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. An app that does not import it does not carry it |
|
|
212
212
|
| `@nxgt/material/illustrations/education` | The education scenes: `EDUCATION_SCENES` (`classroom`, `homework`, `exam-grades`, `timetable`, `attendance`, `enrolment`, `library`, `graduation`, `no-students`, `report-card`), `EDUCATION_SCENE_IDS`, `EDUCATION_SUGGESTED_ICONS`, `EducationScene`; register it with `<IllustrationDefaults sets={[EDUCATION_SCENES]}>` so `<Illustration scene="classroom" />` and `<EmptyState illustration="no-students" />` work (or pass `scenes={EDUCATION_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. An app that does not import it does not carry it |
|
|
213
213
|
| `@nxgt/material/illustrations/game` | The game scenes, for a game, quiz, community or event app: `GAME_SCENES` (`night-sky`, `dawn`, `village`, `day-village`, `graveyard`, `seer`, `healer`, `archer`, `cupid`, `wolf`, `villager`, `witch`, `victory`, `empty-table`, `waiting-players`, `connection-lost`), `GAME_SCENE_IDS`, `GAME_SUGGESTED_ICONS`, `GameScene`; register it with `<IllustrationDefaults sets={[GAME_SCENES]}>` so `<Illustration scene="village" />` and `<EmptyState illustration="empty-table" />` work (or pass `scenes={GAME_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. Pass `title` for an accessible name, otherwise the picture is decorative (`aria-hidden`). An app that does not import it does not carry it |
|