@nxgt/material 3.35.0 → 3.36.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 (29) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/components/ui/actions/icon-button/icon-button.css +58 -0
  4. package/dist/{components-C9Zz2dir.js → components-C0WjV2oy.js} +16031 -16021
  5. package/dist/components.js +7 -7
  6. package/dist/{dialog-Cdv9IXVo.js → dialog-DR9rACzY.js} +1 -1
  7. package/dist/dnd.js +1 -1
  8. package/dist/editor.js +4 -4
  9. package/dist/{icon-badge-BFScQnp9.js → icon-badge-DXEBeS1y.js} +2 -2
  10. package/dist/{icon-button-ifTpXt0A.js → icon-button-CN9r5TNE.js} +51 -32
  11. package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +14 -0
  12. package/dist/lib/components/ui/collections/server-table/bulk-action-targets.d.ts +6 -5
  13. package/dist/lib/components/ui/collections/server-table/bulk-action.d.ts +6 -5
  14. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +6 -5
  15. package/dist/lib/components/ui/collections/server-table/selected-rows.d.ts +17 -0
  16. package/dist/lib/components/ui/collections/server-table/use-query-selection.d.ts +6 -1
  17. package/dist/lib/components/ui/collections/server-table/use-server-table-selection.d.ts +3 -1
  18. package/dist/lib/components/ui/collections/server-table/use-server-table.d.ts +1 -0
  19. package/dist/main.js +7 -7
  20. package/dist/map.js +3 -3
  21. package/dist/material.css +1 -1
  22. package/dist/pdf-reader.js +1 -1
  23. package/dist/{public-CYdnlHqA.js → public-f9CBkMZP.js} +2 -2
  24. package/dist/{sortable-provider-CY_YD3Ee.js → sortable-provider-BshacF8v.js} +1 -1
  25. package/dist/{use-chat-composer-CoyqPKbt.js → use-chat-composer-C5g_Va_g.js} +3 -3
  26. package/docs/components/buttons-and-actions.md +10 -0
  27. package/docs/components/data-table-filter-and-lists.md +10 -3
  28. package/lib/components/ui/actions/icon-button/icon-button.css +58 -0
  29. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.36.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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`.
8
+
9
+ ## 3.35.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1739](https://github.com/softistx/nxgt-material/pull/1739) [`a816463`](https://github.com/softistx/nxgt-material/commit/a8164639f08a1667a804ac006e2662b355c1aa94) Thanks [@SteveGT96](https://github.com/SteveGT96)! - fix(server-table): bulk actions count and pass the selected rows across pages ([#1735](https://github.com/softistx/nxgt-material/issues/1735), a gap in [#1717](https://github.com/softistx/nxgt-material/issues/1717)). `ServerTable` keeps the row last seen for each selected id (taken when it was ticked, refreshed each time it is on screen again, dropped when deselected, cleared or on a new query), and `appliesTo`, the "Label (n)" counts and `onClick(ids, selection, rows)` use these rows whatever page is shown: 3 archived rows ticked on page 1 and 2 live ones on page 2 read "Restore (3)" and "Archive (2)". An id selected with no row ever seen does not apply to an action that has `appliesTo`. The server-rendered markup is unchanged.
14
+
3
15
  ## 3.35.0
4
16
 
5
17
  ### Minor 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`). | — |
@@ -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
+ }