@nxgt/material 3.35.1 → 3.37.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 (55) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/{button-EMWOFSDB.js → button-CB4nSAMd.js} +2 -1
  4. package/dist/charts.js +1 -1
  5. package/dist/components/ui/actions/icon-button/icon-button.css +58 -0
  6. package/dist/{components-jh9l5bIA.js → components-mqgqmfvj.js} +19761 -19742
  7. package/dist/components.js +20 -20
  8. package/dist/{dialog-Cdv9IXVo.js → dialog-DR9rACzY.js} +1 -1
  9. package/dist/dnd.js +1 -1
  10. package/dist/editor.js +906 -907
  11. package/dist/{icon-badge-BFScQnp9.js → icon-badge-DXEBeS1y.js} +2 -2
  12. package/dist/{icon-button-ifTpXt0A.js → icon-button-CN9r5TNE.js} +51 -32
  13. package/dist/lib/components/ui/actions/button/button.d.ts +8 -0
  14. package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +14 -0
  15. package/dist/lib/components/ui/collections/data-table/hooks.d.ts +6 -1
  16. package/dist/lib/components/ui/collections/filter/bar/filter-bar-view.d.ts +1 -1
  17. package/dist/lib/components/ui/collections/filter/facets/filter-facets.d.ts +1 -1
  18. package/dist/lib/components/ui/collections/filter/facets/partials/filter-facets-footer.d.ts +4 -1
  19. package/dist/lib/components/ui/collections/filter/facets/partials/filter-facets-panel.d.ts +3 -1
  20. package/dist/lib/components/ui/collections/filter/filter-presets.d.ts +1 -1
  21. package/dist/lib/components/ui/collections/filter/query/types.d.ts +13 -0
  22. package/dist/lib/components/ui/collections/filter/sections/sheet/filter-sheet-footer.d.ts +3 -1
  23. package/dist/lib/components/ui/collections/filter/sections/sheet/filter-sheet.d.ts +3 -1
  24. package/dist/lib/components/ui/collections/filter/types-props.d.ts +3 -0
  25. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog.d.ts +7 -1
  26. package/dist/lib/components/ui/feedback/confirmation-dialog/confirmation-dialog.d.ts +7 -1
  27. package/dist/lib/components/ui/fields/attributes/attribute-dialog.d.ts +4 -1
  28. package/dist/lib/components/ui/fields/attributes/attributes-field/attributes-dialog-field.d.ts +4 -1
  29. package/dist/lib/components/ui/fields/attributes/attributes-field/attributes-inline-field.d.ts +1 -1
  30. package/dist/lib/components/ui/fields/contacts/contact-dialog.d.ts +4 -1
  31. package/dist/lib/components/ui/fields/contacts/contacts-dialog-form-field.d.ts +4 -1
  32. package/dist/lib/components/ui/fields/contacts/contacts-form-field.d.ts +4 -1
  33. package/dist/lib/components/ui/fields/opening-hours/opening-hours-dialog-form-field.d.ts +4 -1
  34. package/dist/lib/components/ui/fields/opening-hours/opening-hours-dialog.d.ts +4 -1
  35. package/dist/lib/components/ui/fields/opening-hours/opening-hours-form-field.d.ts +4 -1
  36. package/dist/lib/components/ui/fields/postal-address/postal-address-dialog.d.ts +4 -1
  37. package/dist/lib/components/ui/fields/postal-address/postal-address-form-field.d.ts +4 -1
  38. package/dist/lib/components/ui/media/image-cropper/image-cropper.d.ts +4 -1
  39. package/dist/lib/components/ui/widgets/rich-text-editor/types.d.ts +3 -0
  40. package/dist/main.js +32 -32
  41. package/dist/map.js +4 -4
  42. package/dist/material.css +1 -1
  43. package/dist/pdf-reader.js +1 -1
  44. package/dist/{public-CYdnlHqA.js → public-BdJCVnGS.js} +3 -3
  45. package/dist/{sortable-provider-CY_YD3Ee.js → sortable-provider-BshacF8v.js} +1 -1
  46. package/dist/{use-chat-composer-CoyqPKbt.js → use-chat-composer-C82hvxm4.js} +11 -10
  47. package/docs/components/buttons-and-actions.md +29 -1
  48. package/docs/components/data-table-filter-and-lists.md +10 -1
  49. package/docs/components/feedback-and-status.md +3 -1
  50. package/docs/components/form-fields.md +10 -4
  51. package/docs/components/media-and-files.md +1 -0
  52. package/docs/components/primitives.md +1 -1
  53. package/docs/components/rich-widgets.md +2 -2
  54. package/lib/components/ui/actions/icon-button/icon-button.css +58 -0
  55. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.37.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1754](https://github.com/softistx/nxgt-material/pull/1754) [`e6662f1`](https://github.com/softistx/nxgt-material/commit/e6662f19cf969b189b3440a9025262ad0926c548) Thanks [@SteveGT96](https://github.com/SteveGT96)! - feat(buttons): the Cancel / Close secondary button the library draws in its footers is `tonal` by default, under a filled Confirm; a text or outlined Cancel read poorly as a button and its hit area was invisible. It covers `AlertDialogCancel` (so `ConfirmDialog` and the delete confirmation of `useDeleteRowsHandler`), `ConfirmationDialog`, the dialogs of `Contacts`, `PostalAddress`, `OpeningHours` and `Attributes`, `ImageCropper`, the `RichTextEditor` Save / Cancel row, the phone filter sheet's "Clear all", the staged facets panel's "Reset", the `FilterPresets` save dialog, the data grid's save bar "Discard" and paste "Dismiss", and the comment composer and editor of `DocumentEditor`. Icon-only close buttons, toolbar buttons and text links are unchanged. **To restore the earlier look**, pass `cancelVariant` (a `Button` `variant`: `'outlined'` or `'ghost'`) on `ConfirmDialog`, `ConfirmationDialog`, `ContactDialog`, `PostalAddressDialog`, `OpeningHoursDialog`, `AttributeDialog` and their `*FormField` / `*DialogField` wrappers, `ImageCropper`, `Filter` (`variant="bar"` and `"facets"`) and `FilterPresets`; `options.cancelVariant` on `RichTextEditor`; `useDeleteRowsHandler(onDelete, { cancelVariant })`; `variant` on `AlertDialogCancel`. The data grid's save bar and paste panel and the comment forms of `DocumentEditor` are tonal with no option (no caller-facing surface); the comment editor's Save is now filled to keep the hierarchy. `ConfirmationDialog`'s Cancel was already tonal: only its `cancelVariant` is new. New exports: the `ButtonVariant` type and `DEFAULT_CANCEL_VARIANT`. The docs' and recipes' examples now write `variant="tonal"` on their Cancel.
8
+
9
+ ## 3.36.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#1742](https://github.com/softistx/nxgt-material/pull/1742) [`345d1fe`](https://github.com/softistx/nxgt-material/commit/345d1fe493bd8892f1bab2790980502c63774040) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `IconButton` takes `badge`, a count drawn on its top end corner ("99+" past 99, nothing at 0 or unset) ([#1736](https://github.com/softistx/nxgt-material/issues/1736)), in the primary colour by default (`badgeTone`: `primary`, `error` or `neutral`). It takes no room, so the button keeps its size and its 44px hit area, and it is decorative (`aria-hidden`): give the button the full accessible name, e.g. `aria-label="Publish 2 items"`. `Button` does not get one: compose a `CountBadge`.
14
+
3
15
  ## 3.35.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -502,7 +502,7 @@ Not components: what the stylesheet gives any element.
502
502
  | Preview | Component | What it does | @nxgt/material-vue |
503
503
  | --- | --- | --- | --- |
504
504
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-button.webp" width="120" alt="Button"> | [`Button`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#button) | Filled, tonal, outlined, ghost or link button in seven colours, six sizes (24 to 96 px), round or square (`shape`), a `selected` toggle and a loading state. | `Button` |
505
- | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-iconbutton.webp" width="120" alt="IconButton"> | [`IconButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#iconbutton) | Icon-only button in five sizes and three widths, with an optional tooltip; a toggle fills and widens; `shape` draws it as an expressive shape and morphs when it changes. | `IconButton` |
505
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-iconbutton.webp" width="120" alt="IconButton"> | [`IconButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#iconbutton) | Icon-only button in five sizes and three widths, with an optional tooltip; a toggle fills and widens; `shape` draws it as an expressive shape and morphs when it changes; `badge` draws a decorative count ("99+") on its corner. | `IconButton` |
506
506
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-buttongroup.webp" width="120" alt="ButtonGroup"> | [`ButtonGroup`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#buttongroup) | Joins adjacent buttons into one control; `look="standard"` widens the pressed one and `size` is shared. | `ButtonGroup` |
507
507
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-splitbutton.webp" width="120" alt="SplitButton"> | [`SplitButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#splitbutton) | Main action plus a menu of related ones: two halves, five sizes, an open state that morphs. | `SplitButton` |
508
508
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-fab.webp" width="120" alt="Fab"> | [`Fab`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#fab), `FabDock` | The screen's main floating action: four sizes, tonal or filled in three tones or an app tone, extended, folds on scroll (`useScrollAway`). | — |
@@ -323,5 +323,6 @@ function F({ tooltip: e, ...t }) {
323
323
  children: /* @__PURE__ */ S(P, { ...t })
324
324
  }) : /* @__PURE__ */ S(P, { ...t });
325
325
  }
326
+ var I = "tonal";
326
327
  //#endregion
327
- export { w as a, D as i, N as n, A as r, F as t };
328
+ export { D as a, A as i, I as n, w as o, N as r, F as t };
package/dist/charts.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./ui.utils-CAnKTCw5.js";
2
2
  import { t } from "./utils-BLfntITJ.js";
3
3
  import { t as n } from "./use-material-translation-BK2YYCY3.js";
4
- import { t as r } from "./button-EMWOFSDB.js";
4
+ import { t as r } from "./button-CB4nSAMd.js";
5
5
  import { t as i } from "./use-ssr-media-query-C6M5m8sf.js";
6
6
  import { i as a, n as o, r as s, t as c } from "./util-4heV2LPI.js";
7
7
  import { t as l } from "./useIsomorphicLayoutEffect-DfgAhWcH.js";
@@ -113,3 +113,61 @@
113
113
  }
114
114
  }
115
115
  }
116
+
117
+ /* The `badge` count: on the top end corner (logical edges, so a right-to-left
118
+ * page mirrors it), outside the box so the button keeps its size, and
119
+ * `pointer-events: none` so the 44px hit area (button.css) stays the button's.
120
+ * Fill and text follow `badgeTone` (primary by default; error is the menu-item badge's `bg-error` under `text-error-foreground`);
121
+ * a ring in the page background detaches it from the fill of any variant. It
122
+ * does not follow the button's hover, focus, disabled or pressed look. */
123
+ @layer utilities {
124
+ .nxgt-icon-button-badge {
125
+ position: absolute;
126
+ inset-block-start: -0.25rem;
127
+ inset-inline-end: -0.25rem;
128
+ box-sizing: border-box;
129
+ display: inline-flex;
130
+ align-items: center;
131
+ justify-content: center;
132
+ block-size: 1rem;
133
+ min-inline-size: 1rem;
134
+ padding-inline: 0.25rem;
135
+ border-radius: 9999px;
136
+ /* The text-safe primary (AA on the page, light and dark) under the page
137
+ * colour: the plain fill is 2.7:1 against the dark page's ring. */
138
+ background: var(--color-primary-text);
139
+ color: var(--color-background);
140
+ box-shadow: 0 0 0 2px var(--color-background);
141
+ font-size: 10px;
142
+ font-weight: 500;
143
+ line-height: 1;
144
+ font-variant-numeric: tabular-nums;
145
+ white-space: nowrap;
146
+ pointer-events: none;
147
+ z-index: 1;
148
+ }
149
+ .nxgt-icon-button-badge[data-tone="error"] {
150
+ background: var(--color-error);
151
+ color: var(--color-error-foreground);
152
+ }
153
+ .nxgt-icon-button-badge[data-tone="neutral"] {
154
+ background: var(--color-foreground);
155
+ color: var(--color-background);
156
+ }
157
+ /* The 24px button: a smaller badge, further out, so it leaves the icon. */
158
+ [data-size="xs"] > .nxgt-icon-button-badge {
159
+ block-size: 0.875rem;
160
+ min-inline-size: 0.875rem;
161
+ padding-inline: 0.1875rem;
162
+ inset-block-start: -0.4375rem;
163
+ inset-inline-end: -0.4375rem;
164
+ }
165
+ @media (forced-colors: active) {
166
+ .nxgt-icon-button-badge {
167
+ border: 1px solid CanvasText;
168
+ background: Highlight;
169
+ color: HighlightText;
170
+ forced-color-adjust: none;
171
+ }
172
+ }
173
+ }