@nxgt/material 3.3.0 → 3.5.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 +29 -0
- package/README.md +5 -5
- package/dist/backgrounds/backgrounds.css +30 -1
- package/dist/backgrounds/css-react/blobs.css +65 -0
- package/dist/backgrounds/css-react/bubbles.css +41 -0
- package/dist/backgrounds/css-react/checker.css +47 -0
- package/dist/backgrounds/css-react/chevrons.css +46 -0
- package/dist/backgrounds/css-react/circuit.css +111 -0
- package/dist/backgrounds/css-react/concrete.css +41 -0
- package/dist/backgrounds/css-react/diagonal-checker.css +48 -0
- package/dist/backgrounds/css-react/glass.css +99 -0
- package/dist/backgrounds/css-react/graph-paper.css +74 -0
- package/dist/backgrounds/css-react/halo.css +66 -0
- package/dist/backgrounds/css-react/hexagons.css +79 -0
- package/dist/backgrounds/css-react/illustrated.css +164 -0
- package/dist/backgrounds/css-react/leaves.css +41 -0
- package/dist/backgrounds/css-react/linen.css +44 -0
- package/dist/backgrounds/css-react/marble.css +55 -0
- package/dist/backgrounds/css-react/music.css +2 -0
- package/dist/backgrounds/css-react/night-sky.css +41 -0
- package/dist/backgrounds/css-react/paper.css +49 -0
- package/dist/backgrounds/css-react/plasma.css +53 -0
- package/dist/backgrounds/css-react/rays.css +67 -0
- package/dist/backgrounds/css-react/ripples.css +68 -0
- package/dist/backgrounds/css-react/school.css +2 -0
- package/dist/backgrounds/css-react/science.css +2 -0
- package/dist/backgrounds/css-react/sport.css +2 -0
- package/dist/backgrounds/css-react/travel.css +2 -0
- package/dist/backgrounds.js +57 -33
- package/dist/components/components.css +1 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +24 -0
- package/dist/{components-p7VoF7gR.js → components-CXpL1zEs.js} +20 -13
- package/dist/components.js +1 -1
- package/dist/lib/backgrounds/background/available.d.ts +3 -3
- package/dist/lib/backgrounds/background/background.d.ts +2 -2
- package/dist/lib/backgrounds/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +23 -1
- package/dist/main.js +1 -1
- package/dist/material.css +1 -1
- package/docs/components/navigation-and-layout.md +2 -1
- package/docs/getting-started.md +1 -1
- package/docs/guides/app-shell.md +47 -0
- package/docs/guides/backgrounds.md +101 -17
- package/docs/previews/backgrounds-geometry-more.webp +0 -0
- package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
- package/docs/previews/backgrounds-light-more.webp +0 -0
- package/docs/previews/backgrounds-material-more.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/backgrounds-motif-shapes.webp +0 -0
- package/docs/roadmap.md +16 -4
- package/docs/troubleshooting.md +20 -2
- package/lib/backgrounds/backgrounds.css +30 -1
- package/lib/backgrounds/css-react/blobs.css +65 -0
- package/lib/backgrounds/css-react/bubbles.css +41 -0
- package/lib/backgrounds/css-react/checker.css +47 -0
- package/lib/backgrounds/css-react/chevrons.css +46 -0
- package/lib/backgrounds/css-react/circuit.css +111 -0
- package/lib/backgrounds/css-react/concrete.css +41 -0
- package/lib/backgrounds/css-react/diagonal-checker.css +48 -0
- package/lib/backgrounds/css-react/glass.css +99 -0
- package/lib/backgrounds/css-react/graph-paper.css +74 -0
- package/lib/backgrounds/css-react/halo.css +66 -0
- package/lib/backgrounds/css-react/hexagons.css +79 -0
- package/lib/backgrounds/css-react/illustrated.css +164 -0
- package/lib/backgrounds/css-react/leaves.css +41 -0
- package/lib/backgrounds/css-react/linen.css +44 -0
- package/lib/backgrounds/css-react/marble.css +55 -0
- package/lib/backgrounds/css-react/music.css +2 -0
- package/lib/backgrounds/css-react/night-sky.css +41 -0
- package/lib/backgrounds/css-react/paper.css +49 -0
- package/lib/backgrounds/css-react/plasma.css +53 -0
- package/lib/backgrounds/css-react/rays.css +67 -0
- package/lib/backgrounds/css-react/ripples.css +68 -0
- package/lib/backgrounds/css-react/school.css +2 -0
- package/lib/backgrounds/css-react/science.css +2 -0
- package/lib/backgrounds/css-react/sport.css +2 -0
- package/lib/backgrounds/css-react/travel.css +2 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +24 -0
- package/package.json +103 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1352](https://github.com/softistx/nxgt-material/pull/1352) [`9327a9f`](https://github.com/softistx/nxgt-material/commit/9327a9f742f66a533a6a5eb1ff8e81d8754fa70e) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ActivityLayout` takes a `backdrop` node, drawn behind the frame in place of its gradient and blobs: a `Background` preset from `@nxgt/material/backgrounds` (`<ActivityLayout backdrop={<Background preset="shapes" motif={{ shapes: MOTIF_SHAPES_ALL }} />}>`). It fills the layout in an `inert`, `aria-hidden` layer that takes no pointer; the root carries `data-backdrop` and plain CSS hides the blobs. Without the prop nothing changes. The `/backgrounds` entry is still never imported by the main one.
|
|
8
|
+
|
|
9
|
+
## 3.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#1331](https://github.com/softistx/nxgt-material/pull/1331) [`4fcec1d`](https://github.com/softistx/nxgt-material/commit/4fcec1df66d8c617cc8a3d26c7c099b6c8421a66) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Add six geometry background presets: `hexagons` (a honeycomb with a seeded tenth of its cells tinted), `circuit` (a printed circuit board of chips, pins, 45 degree traces and pads, seeded), `graph-paper` (a soft 20 px grid, every fifth line barely stronger, fading toward the edges, with fine line doodles near the edges), `checker` (a fine checkerboard of two close tints, fading toward the edges, with small motif shapes on some cells), `diagonal-checker` (the same turned 45 degrees) and `chevrons` (four large, very pale bands with small motifs along them). `BackgroundPreset` and `BACKGROUND_PRESETS` list them. Each follows `tone` and `intensity`, lifts in dark, and with `animated` moves subtly (pausable, off under reduced motion). All six follow `seed`.
|
|
14
|
+
|
|
15
|
+
- [#1333](https://github.com/softistx/nxgt-material/pull/1333) [`1cbc91c`](https://github.com/softistx/nxgt-material/commit/1cbc91cd768177e8de4c442281b8a20e7ab7663d) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Add six light background presets: `rays` (a sunburst, a conic gradient from the top centre), `halo` (a ring of light through the tone's three colours), `plasma` (a seeded soft colour field), `glass` (frosted panes over soft colour blobs; a background has no backdrop to blur, so the frost is faked), `ripples` (rings from three seeded centres) and `blobs` (soft organic blobs in the tone's colours, so the tone colours them). `BackgroundPreset` and `BACKGROUND_PRESETS` list them. Each follows `tone` and `intensity`, adds light in dark, and with `animated` moves slowly (pausable, off under reduced motion). `plasma`, `glass`, `ripples` and `blobs` follow `seed`.
|
|
16
|
+
|
|
17
|
+
- [#1347](https://github.com/softistx/nxgt-material/pull/1347) [`44ca0ee`](https://github.com/softistx/nxgt-material/commit/44ca0eede1e2f15855af962202c5bbb179e34365) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `AVAILABLE_BACKGROUND_PRESETS` lists the 44 ids `@nxgt/material` draws (the 42 new presets, `gradient` and `grain`). The `blobs` preset also honours `--nxgt-bg-blob-1..3`, the variables that recolour the gradient's blobs (any colour; unset keeps the tone's `--nxgt-bg-c1..c3`).
|
|
18
|
+
|
|
19
|
+
- [#1336](https://github.com/softistx/nxgt-material/pull/1336) [`4a53dae`](https://github.com/softistx/nxgt-material/commit/4a53dae5d046f2cdf3a1728486a6a9451c0d378a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Add four texture background presets, discreet enough for body text: `paper` (fibre grain on a warm tint that the tone cools or warms), `linen` (a plain weave of 1 px threads every 4 px, crisp at 1x with no moire, and faint slubs), `concrete` (a soft mottle and small pores on a cool grey) and `marble` (a cloudy body and soft, very low contrast veins). `BackgroundPreset` and `BACKGROUND_PRESETS` list them. Each follows `tone`, `intensity` and the theme (the specks turn white in dark) and `seed`; `intensity` never goes above the default for them (`vivid` draws as the default, so body text stays readable); they are still, so `animated` adds nothing. The noise is an `feTurbulence` filter run once on a seamless tile (400 to 960 px, in screen pixels) that the browser repeats, so the cost does not grow with the page; `marble`'s veins are blurred seeded curves, not cut noise, so they never band.
|
|
20
|
+
|
|
21
|
+
- [#1330](https://github.com/softistx/nxgt-material/pull/1330) [`519adfe`](https://github.com/softistx/nxgt-material/commit/519adfec4eb77a40b86c99af2e93b07ca494614b) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Add 15 motif shapes. `MotifShape` now also takes `star`, `heart`, `hexagon`, `diamond`, `wave`, `zigzag` and `spiral`, and eight Material 3 Expressive shapes from the shapes registry: `m3-cookie-6`, `m3-cookie-9`, `m3-flower`, `m3-clover-4`, `m3-soft-burst`, `m3-sunny`, `m3-gem`, `m3-puffy`. `motif={{ shapes: ['star', 'm3-flower'] }}` works on the `shapes` and `confetti-grid` presets, filled and outlined. The new `MOTIF_SHAPES_ALL` lists all 22 shapes; `MOTIF_SHAPES` and the default stay the first seven, so a background drawn with the same seed and options is unchanged. Nothing breaks: the new shapes are opt-in. The 15 added shapes are drawn once per scene as a pattern in `confetti-grid` and `shapes`, so their tone, fill and (in `confetti-grid`) turn and size are fixed per shape; the first seven are unchanged.
|
|
22
|
+
|
|
23
|
+
- [#1338](https://github.com/softistx/nxgt-material/pull/1338) [`f7eb7f1`](https://github.com/softistx/nxgt-material/commit/f7eb7f113290bd382f1024de67bc360486de7ee3) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Add eight illustrated background presets in the `motif` family: `school`, `night-sky`, `bubbles`, `leaves`, `science`, `music`, `travel` and `sport`. Each draws fine tonal line art of its theme (stroke only, round caps, about 1.5 px at 1440 px wide) in the tone's three colours: pencils and books, a moon and stars, soap bubbles, leaves and a fern, flasks and an atom, notes and a clef, a plane and a globe, balls and a trophy. The drawings are denser toward the edges and thin out and fade around the middle of the frame, where the content sits (a mask keeps it nearly empty), and their placement is seeded, so a scene never looks tiled. They follow `tone`, `intensity` and the theme (`vivid` draws as the default, so body text stays readable), and read `density`, `size`, `opacitySpread` and `rotate` from `motif` (a drawing tilts up to 8 degrees, up to 35 with `rotate`). They are still by default; with `animated` (and no reduced-motion preference) the stars of `night-sky` twinkle, the bubbles rise and the leaves sway, as classes, so no inline style is needed under a strict CSP. Together with the other background changesets of this release, `BackgroundPreset` and the `BACKGROUND_PRESETS` table now list 44 ids, and `MOTIF_SHAPES_ALL` lists 22 motif shapes. The existing presets draw the same as before.
|
|
24
|
+
|
|
25
|
+
Their CSS is in `@nxgt/material` only (`@nxgt/material/backgrounds.css`, or one file such as `@nxgt/material/backgrounds/school.css`); `@nxgt/material-vue` keeps drawing `gradient` and `grain`. The `/backgrounds` entry grows, over the whole effort, to about 23 KB gzipped (budget 24 KB); nothing breaks.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`4fcec1d`](https://github.com/softistx/nxgt-material/commit/4fcec1df66d8c617cc8a3d26c7c099b6c8421a66), [`1cbc91c`](https://github.com/softistx/nxgt-material/commit/1cbc91cd768177e8de4c442281b8a20e7ab7663d), [`4a53dae`](https://github.com/softistx/nxgt-material/commit/4a53dae5d046f2cdf3a1728486a6a9451c0d378a), [`519adfe`](https://github.com/softistx/nxgt-material/commit/519adfec4eb77a40b86c99af2e93b07ca494614b), [`f7eb7f1`](https://github.com/softistx/nxgt-material/commit/f7eb7f113290bd382f1024de67bc360486de7ee3)]:
|
|
30
|
+
- @nxgt/material-core@0.26.0
|
|
31
|
+
|
|
3
32
|
## 3.3.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -161,7 +161,7 @@ into a tarball. A missing sheet renders nothing, with no error and no fallback.
|
|
|
161
161
|
| `@nxgt/material/pdf-reader` | `PdfReader`, the redesigned PDF reader (header, floating page pill, rail and panel; `embedded`, `dialog`, `page` and `fullscreen` modes; single page and two-page layouts; `look="expressive"` by default, `"classic"` to opt out, type `PdfReaderLook`) and `configurePdfReader` for pdf.js's worker and assets. **Its own entry, browser-only** (pdf.js loads on first render); also exported as `PdfReader` from `/components` since 3.0 ([guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/pdf-reader.md)) |
|
|
162
162
|
| `@nxgt/material/charts` | Native SVG charts (d3-scale and d3-shape for the maths only) with keyboard point navigation, a screen-reader summary, a "View data" table and `patterns`: `LineChart` and `AreaChart` (`LineChartProps`, `AreaChartProps`, `ChartCurve`), `BarChart` (`BarChartProps`, `BarLayout`, `BarOrientation`), `PieChart` (`PieChartProps`), `DonutChart` (`DonutChartProps`), `Gauge` (`GaugeProps`, `GaugeSize`), `RadialBarChart` (`RadialBarChartProps`), `FunnelChart` (`FunnelChartProps`), `HeatmapChart` (`HeatmapChartProps`, `HeatColumn`), `RadarChart` (`RadarChartProps`), `ScatterChart` (`ScatterChartProps`, `ScatterSeries`, `ScatterPoint`), `ComboChart` (`ComboChartProps`, `ComboSeries`: bars, areas and lines, each on a left or a right axis), `zoom` (a mini overview with a window and two slider handles that picks the rows shown; `range`, `defaultRange`, `onRangeChange`) and `scroll` (a dense plot scrolls sideways on a phone, the value axis pinned) on the line, area, bar and combo charts (`ChartRangeProps`, `ChartZoomOptions`, `ChartScrollOptions`, `ChartRange`), `onPointClick` on every chart but `Gauge`, `palette` (`'soft'`: the soft palette, or `data-chart-palette="soft"` on an ancestor; `ChartPalette`) on every chart, and the shared types (`ChartSlice`, `ChartRow`, `ChartValue`, `ChartColor`, `ChartShape`, `ChartSeries`, `ChartAxis`, `ChartXAxis`, `ChartPoint`, `ChartBaseProps`). `categoryLabel` names the "View data" table's category column: on Line, Area, Bar and Combo it defaults to the x axis label, on Radar and Heatmap it is always "Category" unless set. **Its own entry, client-only** (import it from a `'use client'` file), not in the barrel above; replaces the Nivo charts (removed in 3.0) of `/components` ([guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/charts.md)) |
|
|
163
163
|
| `@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)) |
|
|
164
|
-
| `@nxgt/material/backgrounds` | Background presets: `Background` (a superset of the `/components` one: `preset`, `animated`, `grain`, `seed`, `fill` and `motif`), `AVAILABLE_BACKGROUND_PRESETS` and `AvailableBackgroundPreset` (the ids `Background` draws), the types and tables (`BACKGROUND_PRESETS`, `BACKGROUND_TONES`, ...) re-exported from `@nxgt/material-core/backgrounds`; its own entry, with an opt-in stylesheet ([backgrounds guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/backgrounds.md)) |
|
|
164
|
+
| `@nxgt/material/backgrounds` | Background presets: `Background` (a superset of the `/components` one: `preset`, `animated`, `grain`, `seed`, `fill` and `motif`), `AVAILABLE_BACKGROUND_PRESETS` and `AvailableBackgroundPreset` (the 44 ids `Background` draws), `MOTIF_SHAPES_ALL` (the 22 motif shapes), the types and tables (`BACKGROUND_PRESETS`, `BACKGROUND_TONES`, ...) re-exported from `@nxgt/material-core/backgrounds`; its own entry, with an opt-in stylesheet ([backgrounds guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/backgrounds.md)) |
|
|
165
165
|
| `@nxgt/material/editor` | The rich text editor: `DocumentEditor` and `DocumentEditorFormField` (with an `outline`, a block handle, focus mode, find and replace, `onUpload`, `onAssist` and `comments`), `CompactEditor` and `CompactEditorFormField`, `RichChatComposer`, `EditorRoot` and the parts (`EditorToolbar`, `EditorContent`, `EditorFooter`, `EditorAssistantPanel`, ...), `useEditor`, the kits (`documentKit`, `compactKit`, `chatKit`, `formNodesKit`), `withFeatures` / `withoutFeatures` and `defineFeature`, and the converters `toHtml`, `toJson`, `toMarkdown`, `fromMarkdown` and `looksLikeMarkdown` — **its own entry, and not in the barrel above**. **Client-only**: import it from a `'use client'` file; `/editor/viewer` is the server-safe one. The `.nxgt-prose` page styles ship in `styles.css` with the component CSS ([DocumentEditor](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/rich-widgets.md#documenteditor)) |
|
|
166
166
|
| `@nxgt/material/editor/viewer` | `RichTextViewer`: shows a saved document (HTML, JSON or Markdown) read-only, **server-safe**, with no editor instance and no `'use client'` ([RichTextViewer](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/rich-widgets.md#richtextviewer)) |
|
|
167
167
|
| `@nxgt/material/code-editor` | `CodeEditor`, `CodeEditorFormField` and `CodeDiff` on Monaco, their theme presets (`theme`: `'app'`, `'moonlight'`, `'soft'`, `CODE_THEMES`), `defineCodeTheme` for your own, the `CodeMarker` and `CodeMarkerSeverity` types of the `markers` prop, `CodeEditorHandle` (its `ref`), `CodeFile` (its `files`), and `configureMonaco` to bundle Monaco instead of loading it from the CDN. **Client-only**: import it from a `'use client'` file. They are no longer exported from the barrels (removed in 3.0; [guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/code-editor.md)) |
|
|
@@ -179,7 +179,7 @@ into a tarball. A missing sheet renders nothing, with no error and no fallback.
|
|
|
179
179
|
| `@nxgt/material/styles.css` | source Tailwind v4 tokens. **This** is the file the app imports |
|
|
180
180
|
| `@nxgt/material/map.css` | leaflet's stylesheet, for the apps that use `./map`. Not part of `styles.css` |
|
|
181
181
|
| `@nxgt/material/galleries.css` | the Gallery's shaped tiles (`shape`, `preset="shaped"`): `clip-path: shape()` for twelve shapes, about 9 KB gzipped. Opt-in, not part of `styles.css`; without it a shaped tile keeps a rounded corner |
|
|
182
|
-
| `@nxgt/material/backgrounds.css` | every background preset's CSS, for the apps that use `./backgrounds`; `@nxgt/material/backgrounds/<preset>.css` loads one. Not part of `styles.css` |
|
|
182
|
+
| `@nxgt/material/backgrounds.css` | every background preset's CSS, for the apps that use `./backgrounds`; `@nxgt/material/backgrounds/<preset>.css` loads one (the illustrated scenes share `backgrounds/illustrated.css`). Not part of `styles.css` |
|
|
183
183
|
|
|
184
184
|
## Usage
|
|
185
185
|
|
|
@@ -309,7 +309,7 @@ Each area a consumer starts from has its own page under `docs/guides/`.
|
|
|
309
309
|
| --- | --- |
|
|
310
310
|
| [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 |
|
|
311
311
|
| [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 |
|
|
312
|
-
| [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), 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), the `<main>` landmark, the `h1` title
|
|
312
|
+
| [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), 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), the `<main>` landmark, the `h1` title, document scrolling, and a background preset behind the shell (`backdrop`) |
|
|
313
313
|
| [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 |
|
|
314
314
|
| [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 |
|
|
315
315
|
| [Maps](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/maps.md) | using `@nxgt/material/map` — browser-only, optional leaflet peers, `map.css` |
|
|
@@ -524,7 +524,7 @@ Not components: what the stylesheet gives any element.
|
|
|
524
524
|
|
|
525
525
|
| Preview | Component | What it does | @nxgt/material-vue |
|
|
526
526
|
| --- | --- | --- | --- |
|
|
527
|
-
| <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. See the [app shell guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md). | `ActivityLayout`, `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb` |
|
|
527
|
+
| <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; `backdrop` puts a `/backgrounds` preset behind it in place of the gradient. See the [app shell guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md). | `ActivityLayout`, `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb` |
|
|
528
528
|
| <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` |
|
|
529
529
|
| <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. | `AuthCard` |
|
|
530
530
|
| <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) |
|
|
@@ -541,7 +541,7 @@ Not components: what the stylesheet gives any element.
|
|
|
541
541
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-steps.webp" width="120" alt="Steps"> | [`Steps`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#steps), `StepsItem` | Numbered editorial steps that stay visible on every breakpoint. | `Steps`, `StepsItem` |
|
|
542
542
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-hero.webp" width="120" alt="Hero"> | [`Hero`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#hero) | Landing band with eyebrow, title, supporting copy and actions. | `Hero` |
|
|
543
543
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-doc.webp" width="120" alt="Doc"> | [`Doc`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#doc), `DocPage`, `DocTopbar`, `DocSidebar`, `DocToc`, `DocPager`, `DocSearch`, `DocChildCards`, `DocSeeAlso`, `DocEmpty`, `DocProgress` | Documentation site shell: sidebar from `md`, TOC rail from `xl`. Reading bar, copy-page / markdown, child cards, see also, and a 404 slot. Storybook `UI/Doc/Api` composes an API page from `DocPage`, `AnchorHeading`, `ApiOperation`, `ParamTable` and `CodeGroup`. | `Doc` (same parts) |
|
|
544
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-background.webp" width="120" alt="Background"> | [`Background`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#background) | Full-viewport gradient with blurred colour blobs; centres its children;
|
|
544
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/navigation-layout-background.webp" width="120" alt="Background"> | [`Background`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#background) | Full-viewport gradient with blurred colour blobs; centres its children; 44 presets on `/backgrounds`. | `Background` |
|
|
545
545
|
| — | [`NavigationRail`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/navigation-and-layout.md#navigationrail) | Placeholder: renders an empty rail container and takes no props yet. | `NavigationRail` |
|
|
546
546
|
|
|
547
547
|
### Overlays & menus
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* Every background preset's CSS, opt-in: `import "@nxgt/material/backgrounds.css"`
|
|
2
|
-
* (
|
|
2
|
+
* (Vue's copy imports only the shared `css/` presets; `css-react/` is React
|
|
3
|
+
* only). Not part of styles.css, which carries
|
|
3
4
|
* only the base, the gradient and the motion `Background` (from /components)
|
|
4
5
|
* needs. One preset alone: `@nxgt/material/backgrounds/<preset>.css`. */
|
|
5
6
|
@import "./css/base.css";
|
|
@@ -20,6 +21,34 @@
|
|
|
20
21
|
@import "./css/low-poly.css";
|
|
21
22
|
@import "./css/topography.css";
|
|
22
23
|
@import "./css/waves.css";
|
|
24
|
+
/* geometry, React only (css-react/: not in scripts/shared-paths.ts, so no Vue copy) */
|
|
25
|
+
@import "./css-react/hexagons.css";
|
|
26
|
+
@import "./css-react/circuit.css";
|
|
27
|
+
@import "./css-react/graph-paper.css";
|
|
28
|
+
@import "./css-react/checker.css";
|
|
29
|
+
@import "./css-react/diagonal-checker.css";
|
|
30
|
+
@import "./css-react/chevrons.css";
|
|
31
|
+
/* light, more (React only) */
|
|
32
|
+
@import "./css-react/rays.css";
|
|
33
|
+
@import "./css-react/halo.css";
|
|
34
|
+
@import "./css-react/plasma.css";
|
|
35
|
+
@import "./css-react/glass.css";
|
|
36
|
+
@import "./css-react/ripples.css";
|
|
37
|
+
@import "./css-react/blobs.css";
|
|
38
|
+
/* textures (React only) */
|
|
39
|
+
@import "./css-react/paper.css";
|
|
40
|
+
@import "./css-react/linen.css";
|
|
41
|
+
@import "./css-react/concrete.css";
|
|
42
|
+
@import "./css-react/marble.css";
|
|
43
|
+
/* illustrated scenes (React only) */
|
|
44
|
+
@import "./css-react/school.css";
|
|
45
|
+
@import "./css-react/night-sky.css";
|
|
46
|
+
@import "./css-react/bubbles.css";
|
|
47
|
+
@import "./css-react/leaves.css";
|
|
48
|
+
@import "./css-react/science.css";
|
|
49
|
+
@import "./css-react/music.css";
|
|
50
|
+
@import "./css-react/travel.css";
|
|
51
|
+
@import "./css-react/sport.css";
|
|
23
52
|
/* motifs */
|
|
24
53
|
@import "./css/motifs.css";
|
|
25
54
|
@import "./css/shapes.css";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* The `blobs` preset: soft organic blobs in the tone's colours. A seeded SVG
|
|
2
|
+
* of smooth shapes in c1, c2 and c3 (`bl1..3`), slightly blurred, over a tint
|
|
3
|
+
* (`wash`). Blended with the page: it adds light in dark. Motion (opt-in,
|
|
4
|
+
* `animated`): each blob drifts at its own pace (`bd1..3`). React only:
|
|
5
|
+
* nothing in the shared `css/` folder. `--nxgt-bg-blob-1..3` recolour the blobs
|
|
6
|
+
* as they do the gradient's; unset, a blob keeps `--nxgt-bg-c1..c3`. */
|
|
7
|
+
@import "../css/scene.css";
|
|
8
|
+
|
|
9
|
+
@layer components {
|
|
10
|
+
[data-background="blobs"] {
|
|
11
|
+
isolation: isolate;
|
|
12
|
+
}
|
|
13
|
+
[data-background="blobs"] > [data-layer="wash"] {
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset: 0;
|
|
16
|
+
background-image: linear-gradient(
|
|
17
|
+
200deg,
|
|
18
|
+
color-mix(in oklab, var(--nxgt-bg-c2) var(--nxgt-bg-a1), transparent),
|
|
19
|
+
transparent 70%
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
[data-background="blobs"] > [data-scene] > svg {
|
|
23
|
+
mix-blend-mode: var(--nxgt-bg-glow-blend);
|
|
24
|
+
}
|
|
25
|
+
[data-background="blobs"] > [data-scene] .bl {
|
|
26
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.42);
|
|
27
|
+
}
|
|
28
|
+
[data-background="blobs"] > [data-scene] .bl1 {
|
|
29
|
+
fill: var(--nxgt-bg-blob-1, var(--nxgt-bg-c1));
|
|
30
|
+
}
|
|
31
|
+
[data-background="blobs"] > [data-scene] .bl2 {
|
|
32
|
+
fill: var(--nxgt-bg-blob-2, var(--nxgt-bg-c2));
|
|
33
|
+
}
|
|
34
|
+
[data-background="blobs"] > [data-scene] .bl3 {
|
|
35
|
+
fill: var(--nxgt-bg-blob-3, var(--nxgt-bg-c3));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
40
|
+
@keyframes nxgt-bg-blobs-drift {
|
|
41
|
+
from {
|
|
42
|
+
transform: translate(-30px, 18px);
|
|
43
|
+
}
|
|
44
|
+
to {
|
|
45
|
+
transform: translate(34px, -26px);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@layer components {
|
|
50
|
+
[data-background="blobs"][data-animated] > [data-scene] .bl-g {
|
|
51
|
+
animation: nxgt-bg-blobs-drift 19s ease-in-out infinite alternate
|
|
52
|
+
var(--nxgt-bg-play, running);
|
|
53
|
+
}
|
|
54
|
+
[data-background="blobs"][data-animated] > [data-scene] .bd1 {
|
|
55
|
+
animation-direction: alternate;
|
|
56
|
+
}
|
|
57
|
+
[data-background="blobs"][data-animated] > [data-scene] .bd2 {
|
|
58
|
+
animation-duration: 26s;
|
|
59
|
+
animation-direction: alternate-reverse;
|
|
60
|
+
}
|
|
61
|
+
[data-background="blobs"][data-animated] > [data-scene] .bd3 {
|
|
62
|
+
animation-duration: 33s;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* The `bubbles` preset: line drawings of one theme (see illustrated.css).
|
|
2
|
+
* Motion (opt-in, `animated`): a bubble rises and sinks back, 14 to 24 s a leg. The builder sets
|
|
3
|
+
* the pace (`p1..p3`) and the delay (`l1..l4`) as classes, so the markup holds
|
|
4
|
+
* no inline style. */
|
|
5
|
+
@import "./illustrated.css";
|
|
6
|
+
|
|
7
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
8
|
+
@keyframes nxgt-bg-bubbles-up {
|
|
9
|
+
to {
|
|
10
|
+
translate: 0 -46px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer components {
|
|
15
|
+
[data-background="bubbles"][data-animated] > [data-scene] .up {
|
|
16
|
+
animation: nxgt-bg-bubbles-up 14s ease-in-out infinite alternate
|
|
17
|
+
var(--nxgt-bg-play, running);
|
|
18
|
+
}
|
|
19
|
+
[data-background="bubbles"][data-animated] > [data-scene] .p1 {
|
|
20
|
+
animation-duration: 14s;
|
|
21
|
+
}
|
|
22
|
+
[data-background="bubbles"][data-animated] > [data-scene] .p2 {
|
|
23
|
+
animation-duration: 19s;
|
|
24
|
+
}
|
|
25
|
+
[data-background="bubbles"][data-animated] > [data-scene] .p3 {
|
|
26
|
+
animation-duration: 24s;
|
|
27
|
+
}
|
|
28
|
+
[data-background="bubbles"][data-animated] > [data-scene] .l1 {
|
|
29
|
+
animation-delay: 0s;
|
|
30
|
+
}
|
|
31
|
+
[data-background="bubbles"][data-animated] > [data-scene] .l2 {
|
|
32
|
+
animation-delay: -3s;
|
|
33
|
+
}
|
|
34
|
+
[data-background="bubbles"][data-animated] > [data-scene] .l3 {
|
|
35
|
+
animation-delay: -7s;
|
|
36
|
+
}
|
|
37
|
+
[data-background="bubbles"][data-animated] > [data-scene] .l4 {
|
|
38
|
+
animation-delay: -11s;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* The `checker` preset: a fine checkerboard of 24 unit cells in two tints of
|
|
2
|
+
* the tone that sit close together, fading out toward the edges (stronger in
|
|
3
|
+
* dark, as the isometric: `--nxgt-bg-iso-k`), with a seeded eighth of the cells
|
|
4
|
+
* near the edges carrying a small tonal motif. One layer, the SVG scene
|
|
5
|
+
* (`ck-a`, `ck-b` the cells, `ck-m` the motifs), with nothing over it; the
|
|
6
|
+
* scene covers the background, so the cells follow the viewport. For the
|
|
7
|
+
* diagonal one, see `diagonal-checker.css`. React only: nothing in the shared
|
|
8
|
+
* `css/` folder. */
|
|
9
|
+
@import "../css/scene.css";
|
|
10
|
+
|
|
11
|
+
@layer components {
|
|
12
|
+
[data-background="checker"] > [data-scene] .fade-1 {
|
|
13
|
+
stop-color: white;
|
|
14
|
+
}
|
|
15
|
+
[data-background="checker"] > [data-scene] .fade-0 {
|
|
16
|
+
stop-color: black;
|
|
17
|
+
}
|
|
18
|
+
[data-background="checker"] > [data-scene] .ck-a {
|
|
19
|
+
fill: var(--nxgt-bg-c1);
|
|
20
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.14 * var(--nxgt-bg-iso-k));
|
|
21
|
+
}
|
|
22
|
+
[data-background="checker"] > [data-scene] .ck-b {
|
|
23
|
+
fill: var(--nxgt-bg-c2);
|
|
24
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.07 * var(--nxgt-bg-iso-k));
|
|
25
|
+
}
|
|
26
|
+
[data-background="checker"] > [data-scene] .ck-m,
|
|
27
|
+
[data-background="checker"] > [data-scene] .ck-p {
|
|
28
|
+
color: var(--nxgt-bg-c1);
|
|
29
|
+
stroke-opacity: 0.85;
|
|
30
|
+
fill-opacity: calc(0.4 * var(--nxgt-bg-iso-k));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
35
|
+
@keyframes nxgt-bg-checker-drift {
|
|
36
|
+
to {
|
|
37
|
+
transform: translate(24px, 24px);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@layer components {
|
|
42
|
+
[data-background="checker"][data-animated] > [data-scene] .ck-drift {
|
|
43
|
+
animation: nxgt-bg-checker-drift 22s ease-in-out infinite alternate
|
|
44
|
+
var(--nxgt-bg-play, running);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* The `chevrons` preset: a few large, very pale chevron bands leaning across
|
|
2
|
+
* the frame, c1 and c2 in turn, over a faint tint. Layers: `wash` (a tint) and
|
|
3
|
+
* the SVG scene (`ch-a`, `ch-b` the bands, in the group `ch-field`). The SVG
|
|
4
|
+
* covers the background, so the bands are sized by the viewport. `animated`
|
|
5
|
+
* drifts the group slowly down and back. `ch-m`: small motifs along the bands. React only: nothing in the shared
|
|
6
|
+
* `css/` folder. */
|
|
7
|
+
@import "../css/scene.css";
|
|
8
|
+
|
|
9
|
+
@layer components {
|
|
10
|
+
[data-background="chevrons"] > [data-layer="wash"] {
|
|
11
|
+
position: absolute;
|
|
12
|
+
inset: 0;
|
|
13
|
+
background-image: linear-gradient(
|
|
14
|
+
0deg,
|
|
15
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
|
|
16
|
+
transparent 65%
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
[data-background="chevrons"] > [data-scene] .ch-a {
|
|
20
|
+
fill: var(--nxgt-bg-c1);
|
|
21
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.16);
|
|
22
|
+
}
|
|
23
|
+
[data-background="chevrons"] > [data-scene] .ch-b {
|
|
24
|
+
fill: var(--nxgt-bg-c2);
|
|
25
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.12);
|
|
26
|
+
}
|
|
27
|
+
[data-background="chevrons"] > [data-scene] .ch-m {
|
|
28
|
+
color: var(--nxgt-bg-c1);
|
|
29
|
+
fill-opacity: 0.55;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
+
@keyframes nxgt-bg-chevrons-drift {
|
|
35
|
+
to {
|
|
36
|
+
transform: translateY(40px);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@layer components {
|
|
41
|
+
[data-background="chevrons"][data-animated] > [data-scene] .ch-field {
|
|
42
|
+
animation: nxgt-bg-chevrons-drift 18s ease-in-out infinite alternate
|
|
43
|
+
var(--nxgt-bg-play, running);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* The `circuit` preset: a printed circuit board. Layers: `wash` (a tint) and
|
|
2
|
+
* the SVG scene (`cb-trace` and `cb-l1..3` the traces, `cb-pin`, `cb-chip`,
|
|
3
|
+
* `cb-pad`, and `cb-sig`, the dash that runs along a trace when `animated`).
|
|
4
|
+
* React only: nothing in the shared `css/` folder. */
|
|
5
|
+
@import "../css/scene.css";
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
[data-background="circuit"] > [data-layer="wash"] {
|
|
9
|
+
position: absolute;
|
|
10
|
+
inset: 0;
|
|
11
|
+
background-image: linear-gradient(
|
|
12
|
+
160deg,
|
|
13
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a2), transparent),
|
|
14
|
+
transparent 65%
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
[data-background="circuit"] > [data-scene] {
|
|
18
|
+
-webkit-mask-image: radial-gradient(
|
|
19
|
+
ellipse 75% 75% at 50% 50%,
|
|
20
|
+
rgb(0 0 0 / 0.4) 0%,
|
|
21
|
+
black 100%
|
|
22
|
+
);
|
|
23
|
+
mask-image: radial-gradient(
|
|
24
|
+
ellipse 75% 75% at 50% 50%,
|
|
25
|
+
rgb(0 0 0 / 0.4) 0%,
|
|
26
|
+
black 100%
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
[data-background="circuit"] > [data-scene] :is(.cb-trace, .cb-pin, .cb-sig) {
|
|
30
|
+
fill: none;
|
|
31
|
+
stroke: var(--nxgt-bg-c1);
|
|
32
|
+
stroke-linecap: round;
|
|
33
|
+
stroke-linejoin: round;
|
|
34
|
+
}
|
|
35
|
+
[data-background="circuit"] > [data-scene] .cb-trace {
|
|
36
|
+
stroke-width: 2.2;
|
|
37
|
+
stroke-opacity: calc(var(--nxgt-bg-op) * 0.85);
|
|
38
|
+
}
|
|
39
|
+
[data-background="circuit"] > [data-scene] .cb-l1 {
|
|
40
|
+
stroke: var(--nxgt-bg-c1);
|
|
41
|
+
}
|
|
42
|
+
[data-background="circuit"] > [data-scene] .cb-l2 {
|
|
43
|
+
stroke: var(--nxgt-bg-c2);
|
|
44
|
+
}
|
|
45
|
+
[data-background="circuit"] > [data-scene] .cb-l3 {
|
|
46
|
+
stroke: var(--nxgt-bg-c3);
|
|
47
|
+
}
|
|
48
|
+
[data-background="circuit"] > [data-scene] .cb-pin {
|
|
49
|
+
stroke-width: 2.2;
|
|
50
|
+
stroke-opacity: calc(var(--nxgt-bg-op) * 0.85);
|
|
51
|
+
}
|
|
52
|
+
[data-background="circuit"] > [data-scene] .cb-chip {
|
|
53
|
+
fill: var(--nxgt-bg-c1);
|
|
54
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.16);
|
|
55
|
+
stroke: var(--nxgt-bg-c1);
|
|
56
|
+
stroke-width: 2.2;
|
|
57
|
+
stroke-opacity: calc(var(--nxgt-bg-op) * 0.7);
|
|
58
|
+
}
|
|
59
|
+
[data-background="circuit"] > [data-scene] .cb-pad {
|
|
60
|
+
fill: var(--nxgt-bg-c1);
|
|
61
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.2);
|
|
62
|
+
stroke: var(--nxgt-bg-c1);
|
|
63
|
+
stroke-width: 2.2;
|
|
64
|
+
stroke-opacity: calc(var(--nxgt-bg-op) * 0.8);
|
|
65
|
+
}
|
|
66
|
+
/* The signals are only drawn while they move (below). */
|
|
67
|
+
[data-background="circuit"] > [data-scene] .cb-signals {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
[data-background="circuit"] > [data-scene] .cb-sig {
|
|
71
|
+
stroke: color-mix(in oklab, var(--nxgt-bg-c2) 55%, white);
|
|
72
|
+
stroke-width: 3.4;
|
|
73
|
+
stroke-opacity: 0.9;
|
|
74
|
+
stroke-dashoffset: 14;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
79
|
+
/* The dash starts 14 units before the trace and runs 540 units, past the
|
|
80
|
+
* end of the longest one. */
|
|
81
|
+
@keyframes nxgt-bg-circuit-signal {
|
|
82
|
+
from {
|
|
83
|
+
stroke-dashoffset: 14;
|
|
84
|
+
}
|
|
85
|
+
to {
|
|
86
|
+
stroke-dashoffset: -540;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@layer components {
|
|
91
|
+
[data-background="circuit"][data-animated] > [data-scene] .cb-signals {
|
|
92
|
+
display: inline;
|
|
93
|
+
}
|
|
94
|
+
[data-background="circuit"][data-animated] > [data-scene] .cb-sig {
|
|
95
|
+
animation: nxgt-bg-circuit-signal 7s linear infinite
|
|
96
|
+
var(--nxgt-bg-play, running);
|
|
97
|
+
}
|
|
98
|
+
[data-background="circuit"][data-animated]
|
|
99
|
+
> [data-scene]
|
|
100
|
+
.cb-sig:nth-child(3n + 1) {
|
|
101
|
+
animation-duration: 9s;
|
|
102
|
+
animation-delay: -2s;
|
|
103
|
+
}
|
|
104
|
+
[data-background="circuit"][data-animated]
|
|
105
|
+
> [data-scene]
|
|
106
|
+
.cb-sig:nth-child(3n + 2) {
|
|
107
|
+
animation-duration: 11s;
|
|
108
|
+
animation-delay: -6s;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* The `concrete` preset: poured concrete. A seeded mottle and small pores (an
|
|
2
|
+
* SVG of `feTurbulence` specks on a seamless 640 px tile: black in light,
|
|
3
|
+
* white in dark) over a cool grey tint that takes a little of the tone
|
|
4
|
+
* (`wash`). Intensity never goes above the default (`vivid` draws as the default). Static: `animated` does nothing. React only: nothing in the
|
|
5
|
+
* shared `css/` folder. */
|
|
6
|
+
@import "../css/scene.css";
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
/* `vivid` is capped at the default strength: a texture under body text
|
|
10
|
+
* never gets stronger (the tint and the specks read these two). */
|
|
11
|
+
[data-background="concrete"][data-intensity="vivid"][data-intensity] {
|
|
12
|
+
--nxgt-bg-a1: 8%;
|
|
13
|
+
--nxgt-bg-op: 0.72;
|
|
14
|
+
}
|
|
15
|
+
[data-background="concrete"] > [data-layer="wash"] {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
background-image: linear-gradient(
|
|
19
|
+
160deg,
|
|
20
|
+
color-mix(
|
|
21
|
+
in oklab,
|
|
22
|
+
var(--nxgt-bg-c1) var(--nxgt-bg-a1),
|
|
23
|
+
color-mix(in oklab, var(--foreground) 5%, transparent)
|
|
24
|
+
),
|
|
25
|
+
color-mix(in oklab, var(--foreground) 3%, transparent)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
[data-background="concrete"] > [data-scene] > svg {
|
|
29
|
+
filter: invert(var(--nxgt-bg-grain-invert));
|
|
30
|
+
opacity: calc(1 - var(--nxgt-bg-grain-invert) * 0.3);
|
|
31
|
+
}
|
|
32
|
+
[data-background="concrete"] > [data-scene] .tx1 {
|
|
33
|
+
opacity: calc(var(--nxgt-bg-op) * 0.12);
|
|
34
|
+
}
|
|
35
|
+
[data-background="concrete"] > [data-scene] .tx2 {
|
|
36
|
+
opacity: calc(var(--nxgt-bg-op) * 0.26);
|
|
37
|
+
}
|
|
38
|
+
[data-background="concrete"] > [data-scene] .tx3 {
|
|
39
|
+
opacity: calc(var(--nxgt-bg-op) * 0.12);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* The `diagonal-checker` preset: the fine checkerboard turned 45 degrees
|
|
2
|
+
* (diamonds of c1 touching at their corners, c2 between them), in two tints
|
|
3
|
+
* that sit close together, fading out toward the edges, with a seeded sixth of
|
|
4
|
+
* the cells near the edges carrying a small tonal motif. One layer, the SVG
|
|
5
|
+
* scene (`dc-a` the diamonds, `dc-b` the corners, `dc-m` the motifs), with
|
|
6
|
+
* nothing over it. The scene covers the background, so the cells follow the
|
|
7
|
+
* viewport. React only: nothing in the shared `css/` folder. */
|
|
8
|
+
@import "../css/scene.css";
|
|
9
|
+
|
|
10
|
+
@layer components {
|
|
11
|
+
[data-background="diagonal-checker"] > [data-scene] .fade-1 {
|
|
12
|
+
stop-color: white;
|
|
13
|
+
}
|
|
14
|
+
[data-background="diagonal-checker"] > [data-scene] .fade-0 {
|
|
15
|
+
stop-color: black;
|
|
16
|
+
}
|
|
17
|
+
[data-background="diagonal-checker"] > [data-scene] .dc-a {
|
|
18
|
+
fill: var(--nxgt-bg-c1);
|
|
19
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.11 * var(--nxgt-bg-iso-k));
|
|
20
|
+
}
|
|
21
|
+
[data-background="diagonal-checker"] > [data-scene] .dc-b {
|
|
22
|
+
fill: var(--nxgt-bg-c2);
|
|
23
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.055 * var(--nxgt-bg-iso-k));
|
|
24
|
+
}
|
|
25
|
+
[data-background="diagonal-checker"] > [data-scene] .dc-m,
|
|
26
|
+
[data-background="diagonal-checker"] > [data-scene] .dc-p {
|
|
27
|
+
color: var(--nxgt-bg-c1);
|
|
28
|
+
stroke-opacity: 0.85;
|
|
29
|
+
fill-opacity: calc(0.4 * var(--nxgt-bg-iso-k));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
+
@keyframes nxgt-bg-diagonal-checker-drift {
|
|
35
|
+
to {
|
|
36
|
+
transform: translate(17px, 17px);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@layer components {
|
|
41
|
+
[data-background="diagonal-checker"][data-animated]
|
|
42
|
+
> [data-scene]
|
|
43
|
+
.dc-drift {
|
|
44
|
+
animation: nxgt-bg-diagonal-checker-drift 22s ease-in-out infinite
|
|
45
|
+
alternate var(--nxgt-bg-play, running);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* The `glass` preset: frosted panes over soft colour. A background layer has
|
|
2
|
+
* no backdrop to blur, so the frost is faked: soft blobs (radial
|
|
3
|
+
* gradients in the tone's three colours, `gl-b`) under a grid of pale panes with a bright edge
|
|
4
|
+
* (`gl-p`, `gl-p1..3` for how frosted), over a tint (`wash`). Motion
|
|
5
|
+
* (opt-in, `animated`): the blobs drift behind the panes. React only: nothing
|
|
6
|
+
* in the shared `css/` folder. */
|
|
7
|
+
@import "../css/scene.css";
|
|
8
|
+
|
|
9
|
+
@layer components {
|
|
10
|
+
[data-background="glass"] > [data-layer="wash"] {
|
|
11
|
+
position: absolute;
|
|
12
|
+
inset: 0;
|
|
13
|
+
background-image: linear-gradient(
|
|
14
|
+
135deg,
|
|
15
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
|
|
16
|
+
color-mix(in oklab, var(--nxgt-bg-c2) var(--nxgt-bg-a1), transparent)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
[data-background="glass"] > [data-scene] .gl-b {
|
|
20
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.8);
|
|
21
|
+
}
|
|
22
|
+
[data-background="glass"] > [data-scene] .gl-p {
|
|
23
|
+
stroke: color-mix(in oklab, white 55%, transparent);
|
|
24
|
+
stroke-width: 1.5;
|
|
25
|
+
}
|
|
26
|
+
[data-background="glass"] > [data-scene] .gl-p1 {
|
|
27
|
+
fill: color-mix(in oklab, white 10%, transparent);
|
|
28
|
+
}
|
|
29
|
+
[data-background="glass"] > [data-scene] .gl-p2 {
|
|
30
|
+
fill: color-mix(in oklab, white 18%, transparent);
|
|
31
|
+
}
|
|
32
|
+
[data-background="glass"] > [data-scene] .gl-p3 {
|
|
33
|
+
fill: color-mix(in oklab, white 26%, transparent);
|
|
34
|
+
}
|
|
35
|
+
:is(.dark, [data-theme="dark"])
|
|
36
|
+
[data-background="glass"]
|
|
37
|
+
> [data-scene]
|
|
38
|
+
.gl-p,
|
|
39
|
+
[data-background="glass"]:is(.dark, [data-theme="dark"])
|
|
40
|
+
> [data-scene]
|
|
41
|
+
.gl-p {
|
|
42
|
+
stroke: color-mix(in oklab, white 22%, transparent);
|
|
43
|
+
}
|
|
44
|
+
:is(.dark, [data-theme="dark"])
|
|
45
|
+
[data-background="glass"]
|
|
46
|
+
> [data-scene]
|
|
47
|
+
.gl-p1,
|
|
48
|
+
[data-background="glass"]:is(.dark, [data-theme="dark"])
|
|
49
|
+
> [data-scene]
|
|
50
|
+
.gl-p1 {
|
|
51
|
+
fill: color-mix(in oklab, white 4%, transparent);
|
|
52
|
+
}
|
|
53
|
+
:is(.dark, [data-theme="dark"])
|
|
54
|
+
[data-background="glass"]
|
|
55
|
+
> [data-scene]
|
|
56
|
+
.gl-p2,
|
|
57
|
+
[data-background="glass"]:is(.dark, [data-theme="dark"])
|
|
58
|
+
> [data-scene]
|
|
59
|
+
.gl-p2 {
|
|
60
|
+
fill: color-mix(in oklab, white 8%, transparent);
|
|
61
|
+
}
|
|
62
|
+
:is(.dark, [data-theme="dark"])
|
|
63
|
+
[data-background="glass"]
|
|
64
|
+
> [data-scene]
|
|
65
|
+
.gl-p3,
|
|
66
|
+
[data-background="glass"]:is(.dark, [data-theme="dark"])
|
|
67
|
+
> [data-scene]
|
|
68
|
+
.gl-p3 {
|
|
69
|
+
fill: color-mix(in oklab, white 12%, transparent);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
74
|
+
@keyframes nxgt-bg-glass-drift {
|
|
75
|
+
from {
|
|
76
|
+
transform: translate(-90px, -40px);
|
|
77
|
+
}
|
|
78
|
+
to {
|
|
79
|
+
transform: translate(90px, 50px);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@layer components {
|
|
84
|
+
[data-background="glass"][data-animated] > [data-scene] .gl-d {
|
|
85
|
+
animation: nxgt-bg-glass-drift 26s ease-in-out infinite alternate
|
|
86
|
+
var(--nxgt-bg-play, running);
|
|
87
|
+
}
|
|
88
|
+
[data-background="glass"][data-animated] > [data-scene] .gl-d1 {
|
|
89
|
+
animation-direction: alternate;
|
|
90
|
+
}
|
|
91
|
+
[data-background="glass"][data-animated] > [data-scene] .gl-d2 {
|
|
92
|
+
animation-duration: 33s;
|
|
93
|
+
animation-direction: alternate-reverse;
|
|
94
|
+
}
|
|
95
|
+
[data-background="glass"][data-animated] > [data-scene] .gl-d3 {
|
|
96
|
+
animation-duration: 41s;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|