@nxgt/material 3.22.0 → 3.24.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 +44 -0
- package/README.md +5 -4
- package/dist/backgrounds/css/motifs.css +12 -11
- package/dist/backgrounds/css-react/icons.css +9 -10
- package/dist/components/theme-tokens.css +12 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +3 -16
- package/dist/{components-B0oezhGe.js → components-D2XNfS3c.js} +12872 -12820
- package/dist/components.js +1 -1
- package/dist/lib/components/ui/collections/data-table/partials/data-table-page-control.d.ts +7 -2
- package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +6 -2
- package/dist/lib/components/ui/collections/data-table/types.d.ts +4 -0
- package/dist/lib/components/ui/collections/data-table/use-pager-focus.d.ts +30 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +6 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band.d.ts +3 -1
- package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -0
- package/dist/main.js +1 -1
- package/dist/material.css +1 -1
- package/dist/styles.css +1 -0
- package/docs/components/data-table-filter-and-lists.md +24 -2
- package/docs/components/navigation-and-layout.md +2 -2
- package/docs/guides/app-shell.md +17 -1
- package/docs/guides/theming.md +40 -0
- package/docs/previews/navigation-layout-threadlayout.webp +0 -0
- package/docs/troubleshooting.md +47 -0
- package/lib/backgrounds/css/motifs.css +12 -11
- package/lib/backgrounds/css-react/icons.css +9 -10
- package/lib/components/theme-tokens.css +12 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +3 -16
- package/lib/styles.css +1 -0
- package/lib/themes/ambre.css +3 -1
- package/lib/themes/ardoise.css +3 -1
- package/lib/themes/bleumono.css +3 -1
- package/lib/themes/bluemoon.css +3 -1
- package/lib/themes/corail.css +3 -1
- package/lib/themes/foret.css +3 -1
- package/lib/themes/lavande.css +3 -1
- package/lib/themes/menthe.css +3 -1
- package/lib/themes/ocean.css +3 -1
- package/lib/themes/pink.css +3 -1
- package/lib/themes/prune.css +3 -1
- package/lib/themes/sable.css +3 -1
- package/lib/themes/slate.css +3 -1
- package/lib/themes/teal.css +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1618](https://github.com/softistx/nxgt-material/pull/1618) [`a12222a`](https://github.com/softistx/nxgt-material/commit/a12222abd286b1fc2bccfa4e609f9c3fb8ecfeac) Thanks [@SteveGT96](https://github.com/SteveGT96)! - A tinted page ground under `ActivityLayout`, and the cards on `bg-card`. The page was flat (`--background`, the same colour as a card), so a card had no edge on it; now the page carries a quiet tint and the cards stand on it.
|
|
8
|
+
|
|
9
|
+
**Visual change, by default. Screenshot baselines change** (every screen under `ActivityLayout`, light and dark).
|
|
10
|
+
|
|
11
|
+
- New token `--ground` with the `bg-ground` utility (`--color-ground`). Light: `color-mix(in oklab, var(--primary) 7%, var(--background))`. Dark: `color-mix(in oklab, var(--primary) 6%, color-mix(in oklab, var(--background) 55%, black))`, darker than the page and the cards. The mixes are in `oklab` (never `oklch`, which skews the hue toward white). Every built-in theme and every `defineTheme` / `themeToCss` output writes it for light and dark (`@nxgt/material-core` 0.x: `ground` is a `ThemeToken`, checked for AA text), and a theme overrides it like any token.
|
|
12
|
+
- `ThreadLayout` paints `bg-ground` too (it has no app bar or sidebar, so no flat chrome to add).
|
|
13
|
+
- `ActivityLayout` paints `bg-ground` on its root, with or without a `backdrop`; the frame's `bg-background-paper` is gone. The sidebar and the app bar stay on `--background` (translucent over a backdrop, 90 % without one), **flat: no radius, no shadow**. The gutter mask above the app bar takes the ground.
|
|
14
|
+
- The `ActivityContent` header card is `bg-card` (it was `bg-background`). Cards keep `bg-card`, their hairline and soft shadow.
|
|
15
|
+
- The motif and icons presets' wash is one even, soft top-to-bottom gradient, with no corner hotspot.
|
|
16
|
+
|
|
17
|
+
**Vue.** `@nxgt/material-vue` only receives the shared files (`theme-tokens.css` carries `--ground`, the motif wash is the even gradient); nothing new is implemented there (no `bg-ground` utility, no layout change); tracked in [#1620](https://github.com/softistx/nxgt-material/issues/1620).
|
|
18
|
+
|
|
19
|
+
**Opt out.** `--ground: var(--background)` on the layout or an ancestor makes the page flat as before.
|
|
20
|
+
|
|
21
|
+
**Migration.**
|
|
22
|
+
|
|
23
|
+
- Drop app-level page backgrounds under the layout (`bg-background`, `bg-white`, `bg-muted` on a wrapper, `body` or a route), and app-level card shadows: the cards already carry a hairline and a soft shadow.
|
|
24
|
+
- Set no colours on a backdrop: its colours come from the theme.
|
|
25
|
+
- For a custom tint, set `--ground` (on `:root`, the layout or a zone), or a `tokens` override in `defineTheme`.
|
|
26
|
+
|
|
27
|
+
Docs: the theming guide ("Page ground"), the app shell guide, troubleshooting ("The page and the cards look the same"), the README; the `nxgt-material` plugin's `build-a-theme` skill.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`a12222a`](https://github.com/softistx/nxgt-material/commit/a12222abd286b1fc2bccfa4e609f9c3fb8ecfeac)]:
|
|
32
|
+
- @nxgt/material-core@0.35.0
|
|
33
|
+
|
|
34
|
+
## 3.23.0
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- [#1617](https://github.com/softistx/nxgt-material/pull/1617) [`fe1a728`](https://github.com/softistx/nxgt-material/commit/fe1a728d019f7ce548b238202706e82c9175fe79) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ServerTable` and `DataTable` paging, band and touch fixes ([#1609](https://github.com/softistx/nxgt-material/issues/1609), [#1611](https://github.com/softistx/nxgt-material/issues/1611), [#1612](https://github.com/softistx/nxgt-material/issues/1612), [#1599](https://github.com/softistx/nxgt-material/issues/1599)).
|
|
39
|
+
|
|
40
|
+
- **Focus ([#1609](https://github.com/softistx/nxgt-material/issues/1609)).** Previous / Next keep the focus while the next page loads: the control stays the same element, `aria-disabled` (a click on it does nothing), instead of being swapped for a disabled button that dropped the focus to `<body>`. When a control goes (Next on the last page), the focus moves to its counterpart, or to the pagination `<nav>` (`tabindex="-1"`). The selected count of the server footer is a polite status.
|
|
41
|
+
- **No reserved bulk row ([#1611](https://github.com/softistx/nxgt-material/issues/1611)).** New `DataTable` prop `reserveActions` (default `true`, unchanged); `ServerTable` passes `false`: no empty 68px row under the band while nothing is selected, the bulk bar arrives with the first selection (a short grow, none under reduced motion).
|
|
42
|
+
- **Phone actions ([#1612](https://github.com/softistx/nxgt-material/issues/1612)).** New `ServerTable` prop `bandActions: 'stacked' | 'inline'` (default `'stacked'`, unchanged): `'inline'` keeps a lone icon action on the search's row below 768px.
|
|
43
|
+
- **44px page controls ([#1599](https://github.com/softistx/nxgt-material/issues/1599)).** `pageControls="icon"` Previous / Next are 44x44 boxes on a coarse pointer (painted 32px, layout unchanged).
|
|
44
|
+
|
|
45
|
+
**Visual change:** a `ServerTable` with `bulkActions` no longer shows an empty row under its band; its rows move down by the bar's height on the first selection.
|
|
46
|
+
|
|
3
47
|
## 3.22.0
|
|
4
48
|
|
|
5
49
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -422,9 +422,9 @@ Each area a consumer starts from has its own page under `docs/guides/`.
|
|
|
422
422
|
| --- | --- |
|
|
423
423
|
| [Forms](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/forms.md) | wiring fields to React Hook Form and Zod, composite values (contacts, opening hours), config-driven `Field`, server errors, what each field emits |
|
|
424
424
|
| [i18n](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/i18n.md) | adding your strings next to the package's, switching language, translated Zod messages, SSR without a text mismatch |
|
|
425
|
-
| [App shell](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md) | laying out an app with `ActivityLayout` (route changes cross-fade by default, `routeTransition={false}` opts out; it draws the theme's background, `backdrop` is the exception and `backdrop={false}` a plain page), its `items` (rendered as links; `linkComponent` to pass your own), the brand (`logo`, `name`, and `context` for the phone sheet's tenant line), the header's title, a route's `handle.title` as the page's `h1` in the app bar (`AppShellHandle`, `PageTitle`; it labels `<main>`, and `usePageTitleFocus()` focuses it after a navigation), and `AccountMenu`, the active entry and breadcrumbs (needs a data router; `breadcrumbRoot` replaces the home icon with a text link, `breadcrumb={false}` hides the trail), the `<main>` landmark, the `h1` title, document scrolling,
|
|
425
|
+
| [App shell](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md) | laying out an app with `ActivityLayout` (route changes cross-fade by default, `routeTransition={false}` opts out; it draws the theme's background, `backdrop` is the exception and `backdrop={false}` a plain page), its `items` (rendered as links; `linkComponent` to pass your own), the brand (`logo`, `name`, and `context` for the phone sheet's tenant line), the header's title, a route's `handle.title` as the page's `h1` in the app bar (`AppShellHandle`, `PageTitle`; it labels `<main>`, and `usePageTitleFocus()` focuses it after a navigation), and `AccountMenu`, the active entry and breadcrumbs (needs a data router; `breadcrumbRoot` replaces the home icon with a text link, `breadcrumb={false}` hides the trail), the `<main>` landmark, the `h1` title, document scrolling, a background preset behind the shell (`backdrop`), and the tinted page ground the cards stand on (`--ground`, the opt-out) |
|
|
426
426
|
| [Themes for your app](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/themes.md) | defining app themes, generating their stylesheets and types with the Vite plugin's `themes` option or the `nxgt-theme` command, the CI check |
|
|
427
|
-
| [Theming](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/theming.md) | changing colours, radius or fonts, motion and corner tokens, dark mode, tones (the `data-tone` channel, app tones and the calm zone `data-density="calm"`), touch targets, using the compiled CSS without Tailwind |
|
|
427
|
+
| [Theming](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/theming.md) | changing colours, radius or fonts, motion and corner tokens, the page ground (`--ground`, `bg-ground`: its light and dark values and the opt-out), dark mode, tones (the `data-tone` channel, app tones and the calm zone `data-density="calm"`), touch targets, using the compiled CSS without Tailwind |
|
|
428
428
|
| [Printing](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/printing.md) | producing PDFs with `@nxgt/material/print` and getting the file in one call (download, new tab, preview, server `Response`) — its own entry since 2.0.0, with optional peers, a bundling trap on SSR servers, and the `next.config.ts` a Next.js route handler (and `output: 'standalone'`) needs |
|
|
429
429
|
| [Maps](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/maps.md) | using `@nxgt/material/map` — browser-only, optional leaflet peers, `map.css` |
|
|
430
430
|
| [Charts](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/charts.md) | drawing charts with `@nxgt/material/charts` (client-only): the twelve charts, shared props, legend, View data, `onPointClick`, zoom and phone scroll, right-to-left pages, keyboard and accessibility, theming the `--chart-*` tokens, and migrating from the Nivo charts, removed in 3.0 |
|
|
@@ -627,7 +627,7 @@ Not components: what the stylesheet gives any element.
|
|
|
627
627
|
| Preview | Component | What it does | @nxgt/material-vue |
|
|
628
628
|
| --- | --- | --- | --- |
|
|
629
629
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-datatable.webp" width="120" alt="DataTable"> | [`DataTable`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#datatable), `DataTableColumnHeader`, `DataTablePagination`, `DataTableServerFooter`, `DataTableViewOptions` | TanStack Table v9 with sorting, filtering, selection, expandable rows, pagination or load-more, column visibility, skeleton rows while loading and your own empty state — or one server page at a time, with controlled sorting and selection, cursor Previous / Next links and row links. On a phone it keeps its header row and scrolls sideways in a keyboard-reachable region; the page does not. Or cards and tiles instead of the table (`layout`, `renderCard`, `renderTile`), and `layout={{ phone: 'tiles', wide: 'table' }}` for tiles on a phone ([cards and tiles guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/cards-and-tiles.md)). Long lists render only the rows in view (`virtual`). | `DataTable`, `DataTableColumnHeader`, `DataTablePagination`, `DataTableServerFooter`, `DataTableViewOptions` |
|
|
630
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-servertable.webp" width="120" alt="ServerTable"> | [`ServerTable`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#servertable), `createSorting`, `tableFilters`, `defineFilterModel`, `parseFilterQuery`, `serializeFilterQuery`, `paramsFromQuery`, `serverPagination`… | A server-mode `DataTable` driven by the URL's search params, for any router: the Filter in its top band with the page's title (optional), description and actions, the sort, forward cursor paging, a selection reset on a new query, the empty page (a scene and an action for "nothing yet", the filters as removable chips), a compact band (`bandDensity`), icon-only Previous / Next (`pageControls`), a `filterRef` to focus the Filter, a page past the last (rows deleted) that says so and links back to the first, an error state with Retry for a failed fetch (`error`, `onRetry`), and one count announced. | `ServerTable`, `createSorting`, `tableFilters`, `serverPagination` |
|
|
630
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-servertable.webp" width="120" alt="ServerTable"> | [`ServerTable`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#servertable), `createSorting`, `tableFilters`, `defineFilterModel`, `parseFilterQuery`, `serializeFilterQuery`, `paramsFromQuery`, `serverPagination`… | A server-mode `DataTable` driven by the URL's search params, for any router: the Filter in its top band with the page's title (optional), description and actions, the sort, forward cursor paging, a selection reset on a new query, the empty page (a scene and an action for "nothing yet", the filters as removable chips), a compact band (`bandDensity`), icon-only Previous / Next (`pageControls`, 44px targets on a touch screen, focus kept while a page loads), actions that stay on the search's row on a phone (`bandActions`), a bulk bar that reserves no row until a selection, a `filterRef` to focus the Filter, a page past the last (rows deleted) that says so and links back to the first, an error state with Retry for a failed fetch (`error`, `onRetry`), and one count announced. | `ServerTable`, `createSorting`, `tableFilters`, `serverPagination` |
|
|
631
631
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-listempty.webp" width="120" alt="ListEmpty"> | [`ListEmpty`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#listempty) | A list's empty page: nothing yet (a title, or a scene, a line and an action), or nothing matches with what narrows it and a way out (a button or a link); its title is an `h2` (`headingLevel`). | `ListEmpty` |
|
|
632
632
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-datagrid.webp" width="120" alt="DataGrid"> | [`DataGrid`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#datagrid) | An editable grid over `DataTable`'s columns: spreadsheet keys, a selected range, editors for text, numbers (with codes such as "abs"), options, dates and checkboxes, or your own; paste from Excel or Sheets, a fill handle that continues series, resizable, hideable and reorderable columns, undo, totals, and saving per cell, per row or in a batch with versions and conflicts ([guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/data-grid.md)). Long grids render only what is in view; on a phone it is a list of rows that open a panel. | — (later) |
|
|
633
633
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-daygroupedlist.webp" width="120" alt="DayGroupedList"> | [`DayGroupedList`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#daygroupedlist), `groupByDay` | A list split by day — Today, Yesterday, This week, Earlier — under headings that stick while their items scroll. | — (later) |
|
|
@@ -643,7 +643,7 @@ Not components: what the stylesheet gives any element.
|
|
|
643
643
|
|
|
644
644
|
| Preview | Component | What it does | @nxgt/material-vue |
|
|
645
645
|
| --- | --- | --- | --- |
|
|
646
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-appshell.webp" width="120" alt="ActivityLayout"> | [`ActivityLayout`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#activitylayout), `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb`, `AppBreadcrumbItem`, `AppBreadcrumbSeparator` | App shell: sidebar built from `items`, a header with a mobile sheet, route breadcrumbs and a titled page; entries are real links, and `linkComponent` swaps the link; it draws the theme's background (Lavande's is the gradient), `backdrop` puts a `/backgrounds` preset behind it for one screen, and `backdrop={false}` draws a plain page. `ActivityContent` takes an `aside` side panel (beside the content from 1280px in CSS only, sticky under the app bar, a named `complementary` landmark, stacked below) and `width="form" \| "reading"` to cap the main column with the panel right beside it. See the [app shell guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md). | `ActivityLayout`, `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb` |
|
|
646
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-appshell.webp" width="120" alt="ActivityLayout"> | [`ActivityLayout`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#activitylayout), `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb`, `AppBreadcrumbItem`, `AppBreadcrumbSeparator` | App shell: sidebar built from `items`, a header with a mobile sheet, route breadcrumbs and a titled page; entries are real links, and `linkComponent` swaps the link; it draws the theme's background (Lavande's is the gradient), `backdrop` puts a `/backgrounds` preset behind it for one screen, and `backdrop={false}` draws a plain page. It paints the tinted page ground (`--ground`, `bg-ground`) under the content, with the sidebar and the app bar flat on `--background` and the cards on `bg-card` (`--ground: var(--background)` opts out). `ActivityContent` takes an `aside` side panel (beside the content from 1280px in CSS only, sticky under the app bar, a named `complementary` landmark, stacked below) and `width="form" \| "reading"` to cap the main column with the panel right beside it. See the [app shell guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md). | `ActivityLayout`, `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb` |
|
|
647
647
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-accountmenu.webp" width="120" alt="AccountMenu"> | [`AccountMenu`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#accountmenu) | The app bar's avatar menu: named after the account, the name and e-mail, the app's links, then an optional Theme choice (`themeChoice`) and a destructive Sign out with a busy state. | `AccountMenu` |
|
|
648
648
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-authcard.webp" width="120" alt="AuthCard"> | [`AuthCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#authcard) | The frame of a signed-out page: one `main`, a centred card whose title is the `h1` (focusable on an end state), a status or alert notice, a brand and toolbar row, safe-area padding, an optional backdrop (the theme's by default) that keeps clear of the card. | `AuthCard` |
|
|
649
649
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-sidebar.webp" width="120" alt="Sidebar"> | [`Sidebar`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#sidebar), `SidebarHeader`, `SidebarContent`, `SidebarFooter`, `SidebarMenuItem`, `SidebarMenuLabel` | Collapsible navigation sidebar with icons, tooltips and active items. | `Sidebar` (same parts) |
|
|
@@ -763,6 +763,7 @@ The ones that cost the most time. Every error message, with its fix, is in
|
|
|
763
763
|
| Toast or drawer unstyled | import `@nxgt/material/styles.css` (or `dist/material.css`) |
|
|
764
764
|
| `<Icon>` is blank | serve `public/assets/icons/sprites/<style>.svg` |
|
|
765
765
|
| `Background preset="icons"` draws its shapes but no icons, or `nxgt-backdrop-sprite` fails with `needs the icon packs your backdrops draw` | build the reduced sprite with the packs you draw (`npx nxgt-backdrop-sprite --pack school --out public/sprites/backdrop.svg --base /sprites/`) and pass the printed `backdropSprite` to `IconSpritesProvider`; or serve the per-style sheets ([blank backdrop](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/troubleshooting.md#backdrop-icons-are-blank-with-a-reduced-sprite), [missing packs](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/troubleshooting.md#backdropsprite-needs-the-icon-packs-your-backdrops-draw)) |
|
|
766
|
+
| the page and the cards look the same under `ActivityLayout` | the page ground (`--ground`) is flat: remove the app's own page background under the layout, import `styles.css`, and drop any `--ground: var(--background)` ([troubleshooting](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/troubleshooting.md#the-page-and-the-cards-look-the-same)) |
|
|
766
767
|
| `preset="icons"` looks different after 3.22, or its glyphs vanish near cards | the default is the calm mix (shapes and a few icons, one tint, medium density); for the old look pass `iconStyle="duotone-thin" iconMotif={{ layout: 'scatter', colors: 'classic' }}`; a glyph that meets a card, a list or text is dropped on purpose ([troubleshooting](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/troubleshooting.md#the-icons-backdrop-looks-different-after-322)) |
|
|
767
768
|
| `window is not defined` at server boot | load `@nxgt/material/map` through `import()` + `clientOnly` ([maps](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/maps.md#browser-only)) |
|
|
768
769
|
| `Cannot find package '@nxgt/material-core'` at server boot | add `@nxgt/material-core` wherever `@nxgt/material` is in `ssr.noExternal` or `--external` ([troubleshooting](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/troubleshooting.md#cannot-find-package-nxgtmaterial-core)) |
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
@import "./scene.css";
|
|
8
8
|
|
|
9
9
|
@layer components {
|
|
10
|
-
/* The wash:
|
|
10
|
+
/* The wash: one even, soft gradient over the whole layer, top to bottom, no
|
|
11
|
+
* pool in a corner. It sits in the backdrop layer under the content column, so
|
|
12
|
+
* it never repaints the sidebar or the app bar, and the page ground
|
|
13
|
+
* (--ground) shows through it. */
|
|
11
14
|
:is(
|
|
12
15
|
[data-background="shapes"],
|
|
13
16
|
[data-background="confetti-grid"],
|
|
@@ -18,17 +21,15 @@
|
|
|
18
21
|
) > [data-layer="wash"] {
|
|
19
22
|
position: absolute;
|
|
20
23
|
inset: 0;
|
|
21
|
-
background:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
background: linear-gradient(
|
|
25
|
+
180deg in oklab,
|
|
26
|
+
color-mix(
|
|
27
|
+
in oklab,
|
|
28
|
+
var(--nxgt-bg-c1) calc(var(--nxgt-bg-a1) * 1.75),
|
|
29
|
+
transparent
|
|
26
30
|
),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent),
|
|
30
|
-
transparent 70%
|
|
31
|
-
);
|
|
31
|
+
color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent)
|
|
32
|
+
);
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
/* The scene clips the float, which scales it past the frame. */
|
|
@@ -23,20 +23,19 @@
|
|
|
23
23
|
@import "./icons-tint.css";
|
|
24
24
|
|
|
25
25
|
@layer components {
|
|
26
|
+
/* The wash: one even, soft gradient over the layer (see css/motifs.css). */
|
|
26
27
|
[data-background="icons"] > [data-layer="wash"] {
|
|
27
28
|
position: absolute;
|
|
28
29
|
inset: 0;
|
|
29
|
-
background:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
background: linear-gradient(
|
|
31
|
+
180deg in oklab,
|
|
32
|
+
color-mix(
|
|
33
|
+
in oklab,
|
|
34
|
+
var(--nxgt-bg-c1) calc(var(--nxgt-bg-a1) * 1.75),
|
|
35
|
+
transparent
|
|
34
36
|
),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent),
|
|
38
|
-
transparent 70%
|
|
39
|
-
);
|
|
37
|
+
color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent)
|
|
38
|
+
);
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
:is([data-background="icons"], [data-background="shapes"]) > [data-scene] {
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
--radius: 0.625rem;
|
|
6
6
|
--background: oklch(1 0 0);
|
|
7
7
|
--foreground: oklch(0.227 0.017 290);
|
|
8
|
+
/* The page ground under ActivityLayout (`bg-ground`): the primary at 7 % over the
|
|
9
|
+
page, so the cards (--card, white) stand apart from it. Set here, not on
|
|
10
|
+
`body`, so a zone that sets --primary or --background gets its own. A page
|
|
11
|
+
keeps the flat look with `--ground: var(--background)`. */
|
|
12
|
+
--ground: color-mix(in oklab, var(--primary) 7%, var(--background));
|
|
8
13
|
--card: oklch(1 0 0);
|
|
9
14
|
--card-foreground: oklch(0.227 0.017 290);
|
|
10
15
|
--strix: oklch(45.91% 0.1864 310.75);
|
|
@@ -99,6 +104,13 @@
|
|
|
99
104
|
[data-theme="dark"] {
|
|
100
105
|
--background: oklch(0.15 0.026 273);
|
|
101
106
|
--foreground: oklch(0.943 0.012 291.3);
|
|
107
|
+
/* Darker than --background so the cards (--card) stand apart: the page 55 %
|
|
108
|
+
toward black, the primary at 6 % over it. */
|
|
109
|
+
--ground: color-mix(
|
|
110
|
+
in oklab,
|
|
111
|
+
var(--primary) 6%,
|
|
112
|
+
color-mix(in oklab, var(--background) 55%, black)
|
|
113
|
+
);
|
|
102
114
|
--card: oklch(0.19 0.019 289.4);
|
|
103
115
|
--card-foreground: oklch(0.943 0.012 291.3);
|
|
104
116
|
--popover: oklch(0.19 0.019 289.4);
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Plain CSS, no inline `style`, in `@layer components` like the rest: an app's
|
|
7
7
|
* utilities still win. The layer itself (`data-slot="activity-layout-backdrop"`)
|
|
8
8
|
* is in the content column, positioned by classes in activity-layout.tsx: the
|
|
9
|
-
* frame's padding and gaps
|
|
10
|
-
* else.
|
|
9
|
+
* frame's padding and gaps show the page ground (--ground), so the shapes show
|
|
10
|
+
* nowhere else.
|
|
11
11
|
*
|
|
12
12
|
* The chrome is lightly translucent and frosted: about 80% of the background
|
|
13
13
|
* colour (--nxgt-backdrop-chrome-alpha, the app bar) or 87% (--nxgt-backdrop-nav-alpha,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
display: none;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/* The gutter mask without a backdrop (activity-layout.tsx) has the
|
|
37
|
+
/* The gutter mask without a backdrop (activity-layout.tsx) has the page ground's
|
|
38
38
|
* translucent fill, which the page's top gutter never had: it fades in over
|
|
39
39
|
* the first 8px of scroll, so at scroll top nothing changed. A browser
|
|
40
40
|
* without scroll-driven animations shows it from the start. */
|
|
@@ -60,19 +60,6 @@
|
|
|
60
60
|
background-image: none;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
/* scroll="document": the frame's chrome fill leaves its top gutter to the
|
|
64
|
-
* gutter mask (activity-layout.tsx), a fixed strip with the same fill that
|
|
65
|
-
* hides the scrolled page above the sticky app bar. Painting both would
|
|
66
|
-
* stack two translucent fills there. */
|
|
67
|
-
[data-slot="activity-layout"][data-backdrop][data-scroll="document"]
|
|
68
|
-
[data-slot="activity-layout-frame"] {
|
|
69
|
-
background:
|
|
70
|
-
linear-gradient(
|
|
71
|
-
var(--nxgt-backdrop-fill-chrome),
|
|
72
|
-
var(--nxgt-backdrop-fill-chrome)
|
|
73
|
-
)
|
|
74
|
-
bottom / 100% calc(100% - var(--nxgt-backdrop-top)) no-repeat;
|
|
75
|
-
}
|
|
76
63
|
[data-slot="activity-layout"][data-backdrop] > [data-layer] {
|
|
77
64
|
display: none;
|
|
78
65
|
}
|