@nxgt/material 3.32.0 → 3.33.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 +20 -0
- package/README.md +1 -0
- package/dist/{components-H9GbNiTr.js → components-1vjs-YVY.js} +15415 -15330
- package/dist/components.js +23 -23
- package/dist/lib/components/ui/collections/data-table/internal.d.ts +1 -0
- package/dist/lib/components/ui/collections/data-table/partials/data-table-pager.d.ts +12 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +5 -6
- package/dist/lib/components/ui/collections/data-table/use-range-label.d.ts +6 -0
- package/dist/lib/components/ui/collections/index.d.ts +1 -0
- package/dist/lib/components/ui/collections/page-footer/index.d.ts +1 -0
- package/dist/lib/components/ui/collections/page-footer/page-footer.d.ts +36 -0
- package/dist/lib/components/ui/layout/app-shell/collect-chrome.d.ts +16 -0
- package/dist/lib/components/ui/layout/app-shell/shape-units.d.ts +4 -0
- package/dist/lib/components/ui/layout/app-shell/shapes-clear-content.d.ts +18 -0
- package/dist/lib/components/ui/layout/app-shell/watch-content.d.ts +11 -1
- package/dist/main.js +40 -40
- package/dist/material.css +1 -1
- package/docs/components/data-table-filter-and-lists.md +42 -0
- package/docs/guides/backgrounds.md +3 -0
- package/docs/guides/cards-and-tiles.md +3 -3
- package/docs/previews/data-table-filter-lists-pagefooter.webp +0 -0
- package/package.json +2 -2
|
@@ -17,6 +17,7 @@ either can be used alone.
|
|
|
17
17
|
| <img src="../previews/data-table-filter-lists-servertable.webp" width="96" alt=""> | [ServerTable](#servertable) | A server-mode `DataTable` driven by the URL, with the Filter in its top band (a title and a description, or neither): sort, cursor paging, the empty page with a scene, an action and removable chips, one count announced |
|
|
18
18
|
| <img src="../previews/data-table-filter-lists-rowmenu.webp" width="96" alt=""> | [RowMenu](#rowmenu) | A row's "..." button named after its row ("Actions for Ada"), its menu aligned to the end with the destructive item last, and `rowMenuColumn` to drop both in a table |
|
|
19
19
|
| <img src="../previews/data-table-filter-lists-listempty.webp" width="96" alt=""> | [ListEmpty](#listempty) | A list's empty page: nothing yet, with a scene and an action, or nothing matches and the way out |
|
|
20
|
+
| <img src="../previews/data-table-filter-lists-pagefooter.webp" width="96" alt=""> | [PageFooter](#pagefooter) | The page footer of a feed that is not a table (cards, a news feed) under a FilterBar: the range and Previous / Next as links from the URL's cursor trail, `pageControls="icon"` |
|
|
20
21
|
| <img src="../previews/data-table-filter-lists-datagrid.webp" width="96" alt=""> | [DataGrid](#datagrid) | An editable grid: spreadsheet keys, paste, a fill handle with series, undo, totals, saving with versions and conflicts (lazy ones fetch theirs on "Keep mine"), `onRefuse` for a refused paste or fill, row selection (`enableRowSelection`), and resizable, hideable and reorderable columns (`columnControls`, `columnLayout`, `DataGridColumnsMenu`) |
|
|
21
22
|
| <img src="../previews/data-table-filter-lists-daygroupedlist.webp" width="96" alt=""> | [DayGroupedList](#daygroupedlist) | A list split by day under sticky Today / Yesterday / Earlier headings |
|
|
22
23
|
| <img src="../previews/data-table-filter-lists-filter.webp" width="96" alt=""> | [Filter](#filter) | Schema-driven filters with chips, presets and persistence |
|
|
@@ -1057,6 +1058,47 @@ import { ListEmpty } from '@nxgt/material/components';
|
|
|
1057
1058
|
|
|
1058
1059
|
---
|
|
1059
1060
|
|
|
1061
|
+
## PageFooter
|
|
1062
|
+
|
|
1063
|
+

|
|
1064
|
+
|
|
1065
|
+
The page footer of a feed that is not a table (a list of cards, a news feed) under a `FilterBar`: the range ("21–40 of 134") and Previous / Next as real links, so paging works with no JavaScript and on the server. It is the footer `ServerTable` draws, taking the same `pageInfo` and `totalCount`, with its hrefs built from the URL's cursor trail by `serverPagination` (`@nxgt/material-core/table-url`). It renders nothing for an empty result. Its props are `PageFooterProps`.
|
|
1066
|
+
|
|
1067
|
+
```tsx
|
|
1068
|
+
import { FilterBar, PageFooter } from '@nxgt/material/components';
|
|
1069
|
+
|
|
1070
|
+
<FilterBar model={model} />
|
|
1071
|
+
<ul>{items.map((item) => <li key={item.id}>{item.title}</li>)}</ul>
|
|
1072
|
+
<PageFooter
|
|
1073
|
+
params={params} // the page's URLSearchParams
|
|
1074
|
+
pageInfo={data.pageInfo} // { hasNextPage, endCursor }
|
|
1075
|
+
totalCount={data.totalCount}
|
|
1076
|
+
pageSize={20}
|
|
1077
|
+
count={items.length} // on a short last page
|
|
1078
|
+
pageControls="icon"
|
|
1079
|
+
/>;
|
|
1080
|
+
```
|
|
1081
|
+
|
|
1082
|
+
Previous exists when the URL has a trail; Next when `pageInfo` has a next page and an `endCursor`. An end with no page is a disabled button with `aria-disabled`, not a link. Previous and Next are named "Previous" / "Next", or "Previous page" / "Next page" with `pageControls="icon"` (`material.table.pagination.*` keys, as the table's).
|
|
1083
|
+
|
|
1084
|
+
| Prop | Type | Default | Effect |
|
|
1085
|
+
| --- | --- | --- | --- |
|
|
1086
|
+
| `params` | `URLSearchParams` | — | the page's search params: the trail is read from them and every other param is kept in the hrefs |
|
|
1087
|
+
| `pageInfo` | `{ hasNextPage, endCursor? }` | — | the connection's page info |
|
|
1088
|
+
| `totalCount` | `number` | — | items matching the query across every page |
|
|
1089
|
+
| `pageSize` | `number` | — | items per page; it places the range from the trail |
|
|
1090
|
+
| `count` | `number` | `pageSize` | items on this page, for a short last page |
|
|
1091
|
+
| `pageHref` | `(params) => string` | ``?${params}`` | a page's href |
|
|
1092
|
+
| `pagingNames` | `{ after?, trail? }` | `after`, `trail` | the cursor's search param names |
|
|
1093
|
+
| `pageControls` | `'labelled' \| 'icon'` | `'labelled'` | icon-only controls with a tooltip; 44x44 boxes on a coarse pointer |
|
|
1094
|
+
| `live` | `boolean` | `true` | `false` renders the range as plain text instead of a polite live region |
|
|
1095
|
+
| `disabled` | `boolean` | `false` | makes Previous and Next inert while the feed loads |
|
|
1096
|
+
| `linkComponent` | `DataTableLinkComponent` | `<a>` | your router's link; it must forward `className` and `ref` |
|
|
1097
|
+
|
|
1098
|
+
**Storybook:** `Data table, filter & lists/PageFooter`
|
|
1099
|
+
|
|
1100
|
+
---
|
|
1101
|
+
|
|
1060
1102
|
## DataGrid
|
|
1061
1103
|
|
|
1062
1104
|

|
|
@@ -553,6 +553,9 @@ good.
|
|
|
553
553
|
it meets a text, a control or the inside of a surface. Use it on a dense page (stat cards, a list and a grid of cards
|
|
554
554
|
24 to 32 px apart), where `true` leaves almost nothing. A glyph wider than the gap is dropped as before. See
|
|
555
555
|
[Keep the backdrop clear of the content](./app-shell.md#keep-the-backdrop-clear-of-the-content).
|
|
556
|
+
- **Control-like glyphs** (a plus, a bar or a triangle shape, an arrow, and icons named plus, minus, cross, arrow, chevron, angle or
|
|
557
|
+
caret) look like a button next to a surface, so in every mode but `false` they are dropped within 48 px of any card,
|
|
558
|
+
list, table, header band, app header or breadcrumb, and never stay in a gap. They still show in open areas, far from the content.
|
|
556
559
|
- See [The theme's background](./app-shell.md#the-themes-background) for the shell and `AuthCard` in
|
|
557
560
|
[navigation and layout](../components/navigation-and-layout.md#authcard) for the sign-in page.
|
|
558
561
|
|
|
@@ -136,9 +136,9 @@ a locked card's checkbox is `aria-disabled`, focusable and described by its
|
|
|
136
136
|
reason (render `item.reason` in the card to show it). A selected card has a tint,
|
|
137
137
|
a start bar and its title in primary text. The checkbox is named by the card's `Title`: a `renderCard` that leaves `Title` out leaves every checkbox named just "Select". The checkbox is a sibling of the
|
|
138
138
|
link, above its hit area: a click on it selects, it never follows the link.
|
|
139
|
-
The list bar
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
The list bar shows a count only while rows are selected: "N rows selected".
|
|
140
|
+
With nothing selected it shows none (a row count beside "Select all on this page"
|
|
141
|
+
would read as its label); the range stays in the footer. While rows are selected, a "Clear selection" button sits at the bar's
|
|
142
142
|
end beside Sort and hands the focus to the list (to "Select all" when the list
|
|
143
143
|
is not `focusable`). On a narrow list (under 30rem) the bar stays on one row and
|
|
144
144
|
Clear shrinks to an icon button; its label stays its accessible name, and it has
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.33.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
"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"
|
|
363
363
|
},
|
|
364
364
|
"dependencies": {
|
|
365
|
-
"@nxgt/material-core": "^0.
|
|
365
|
+
"@nxgt/material-core": "^0.39.0",
|
|
366
366
|
"@base-ui/react": "^1.6.0",
|
|
367
367
|
"@dnd-kit/core": "^6.3.1",
|
|
368
368
|
"@dnd-kit/sortable": "^10.0.0",
|