@nxgt/material 3.7.0 → 3.7.2

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 (74) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{button-1Fornjtn.js → button--cF4gY14.js} +1 -1
  3. package/dist/charts.js +1 -1
  4. package/dist/{code-editor-DeZYlIO2.js → code-editor-0CdGwKDg.js} +3 -3
  5. package/dist/code-editor.js +3 -3
  6. package/dist/{code-language-items-Bb7afEj-.js → code-language-items-CGARRbVm.js} +1 -1
  7. package/dist/components/animations/scroll.css +1 -1
  8. package/dist/components/base-content.css +1 -1
  9. package/dist/components/base.css +1 -1
  10. package/dist/components/editor-field-expressive.css +5 -0
  11. package/dist/components/editor-prose.css +1 -1
  12. package/dist/components/theme-tokens.css +8 -0
  13. package/dist/components/ui/display/period-cards/period-cards.css +2 -2
  14. package/dist/components/ui/layout/app-shell/activity-backdrop.css +41 -2
  15. package/dist/components/ui/media/pdf-viewer/pdf-viewer.css +1 -1
  16. package/dist/{components-BX4icy-g.js → components-bsrzppcD.js} +7482 -7480
  17. package/dist/components.js +9 -9
  18. package/dist/{dropdown-menu-DiZvX4tG.js → dropdown-menu-DWtgUVW7.js} +1 -1
  19. package/dist/editor-viewer.js +1 -1
  20. package/dist/editor.js +13 -13
  21. package/dist/{empty-state-Cpvsmk0R.js → empty-state-CRWLQ1sM.js} +2 -2
  22. package/dist/main.js +9 -9
  23. package/dist/map.js +1 -1
  24. package/dist/material.css +1 -1
  25. package/dist/pdf-reader.js +1 -1
  26. package/dist/{public-CBlV2XuA.js → public-SsiazLEv.js} +5 -5
  27. package/dist/{render-json-BwJX1jZ2.js → render-json-DyFYFIkZ.js} +1 -1
  28. package/dist/{rich-code-block-yxMXBuGd.js → rich-code-block-CwNwQs5z.js} +3 -3
  29. package/dist/{rich-text-viewer-Bq-2vTVm.js → rich-text-viewer-LO1IZCWs.js} +1 -1
  30. package/dist/{spinner-D-FE_mTW.js → spinner-CtGCPza-.js} +4 -4
  31. package/dist/styles.css +1 -0
  32. package/dist/{toolbar-items-DnkS3bDY.js → toolbar-items-DsDDD5AY.js} +1 -1
  33. package/dist/{use-chat-composer-BhdPNmYm.js → use-chat-composer-DZ01a16D.js} +13 -13
  34. package/docs/components/navigation-and-layout.md +1 -1
  35. package/docs/guides/app-shell.md +32 -9
  36. package/docs/guides/theming.md +1 -0
  37. package/docs/previews/data-table-filter-lists-datatable.webp +0 -0
  38. package/docs/previews/data-table-filter-lists-servertable.webp +0 -0
  39. package/docs/previews/navigation-layout-accountmenu.webp +0 -0
  40. package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
  41. package/docs/previews/navigation-layout-appshell.webp +0 -0
  42. package/docs/previews/navigation-layout-authcard.webp +0 -0
  43. package/docs/previews/navigation-layout-background.webp +0 -0
  44. package/docs/previews/navigation-layout-bottomappbar.webp +0 -0
  45. package/docs/previews/navigation-layout-breadcrumb.webp +0 -0
  46. package/docs/previews/navigation-layout-doc-api.webp +0 -0
  47. package/docs/previews/navigation-layout-doc-blocks.webp +0 -0
  48. package/docs/previews/navigation-layout-doc.webp +0 -0
  49. package/docs/previews/navigation-layout-hero.webp +0 -0
  50. package/docs/previews/navigation-layout-listdetailslayout.webp +0 -0
  51. package/docs/previews/navigation-layout-pager.webp +0 -0
  52. package/docs/previews/navigation-layout-panelayout.webp +0 -0
  53. package/docs/previews/navigation-layout-resizable.webp +0 -0
  54. package/docs/previews/navigation-layout-responsivegrid.webp +0 -0
  55. package/docs/previews/navigation-layout-seealso.webp +0 -0
  56. package/docs/previews/navigation-layout-sidebar.webp +0 -0
  57. package/docs/previews/navigation-layout-skiplink.webp +0 -0
  58. package/docs/previews/navigation-layout-stepper.webp +0 -0
  59. package/docs/previews/navigation-layout-steps.webp +0 -0
  60. package/docs/previews/navigation-layout-threadlayout.webp +0 -0
  61. package/docs/previews/navigation-layout-toc.webp +0 -0
  62. package/docs/previews/navigation-layout-topappbar.webp +0 -0
  63. package/docs/troubleshooting.md +25 -0
  64. package/lib/components/animations/scroll.css +1 -1
  65. package/lib/components/base-content.css +1 -1
  66. package/lib/components/base.css +1 -1
  67. package/lib/components/editor-field-expressive.css +5 -0
  68. package/lib/components/editor-prose.css +1 -1
  69. package/lib/components/theme-tokens.css +8 -0
  70. package/lib/components/ui/display/period-cards/period-cards.css +2 -2
  71. package/lib/components/ui/layout/app-shell/activity-backdrop.css +41 -2
  72. package/lib/components/ui/media/pdf-viewer/pdf-viewer.css +1 -1
  73. package/lib/styles.css +1 -0
  74. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1361](https://github.com/softistx/nxgt-material/pull/1361) [`4303761`](https://github.com/softistx/nxgt-material/commit/430376168103b49c0213cac6905b5497ef64b4c6) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Fix the chrome of an `ActivityLayout` with a `backdrop` letting the shapes run behind its text ([#1356](https://github.com/softistx/nxgt-material/issues/1356)). Under `data-backdrop`, the sidebar, the app bar, the breadcrumb, the tabs strip and the lists/tables (`DataTable`, `ServerTable`) take an opaque surface, tuned by `--nxgt-backdrop-chrome` (default `var(--background)`) and `--nxgt-backdrop-surface` (default `var(--card)`). Nothing changes without a `backdrop`.
8
+
9
+ The backdrop layer now sits in the content column, and the frame's gutters take the chrome fill, so no shape is cut at the edges. `DataTable` and `ServerTable` keep their look without a backdrop with an equivalent class (`bg-[color:var(--nxgt-backdrop-fill-surface,color-mix(...80%...))]` in place of `bg-background/80`).
10
+
11
+ ## 3.7.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1367](https://github.com/softistx/nxgt-material/pull/1367) [`1c545b2`](https://github.com/softistx/nxgt-material/commit/1c545b2bf839f2793292b9fbcd3b6b195b1224f9) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Dark theme: primary drawn as a non-text mark now reaches 3:1 (WCAG 1.4.11). The dark `--primary` is only 2.1 to 2.5:1 on `--background`, `--card` and `--muted`, so the marks that carried a state with it failed. A new token, `--primary-indicator` (`bg-primary-indicator`, `border-primary-indicator`, `ring-primary-indicator`, `stroke-primary-indicator`), is `--primary` in light and, in dark, `--primary` mixed 25 % with white (4.5, 4.1 and 3.7:1). `@nxgt/material` uses it for the Toc, Stepper and ScrollProgress bars, the Spinner arc, the primary StatusIndicator dot, the carousel and gallery dots, the Alert, pricing, timeline, notice and message cards, the OTP, inline-edit, file-list, upload, image-field, Kanban, sortable-list, PDF thumbnail, image-editor filter and snap-target focus, selection and drag borders and rings, the chat reply quote, the audio frame, the editor comment and suggestion rows and the compact editor focus, the period card and the metric tones. `@nxgt/material-vue` only gains the token (`theme-tokens.css`, shared byte for byte with `@nxgt/material`); its components are unchanged. `--primary` itself is unchanged, as is the dark `--error-text` (76 %: 5.85:1 on `--background`, 5.35:1 on `--card`, 4.80:1 on `--muted`); the Contrast stories now assert it on all three surfaces. Fixes [#1366](https://github.com/softistx/nxgt-material/issues/1366).
16
+
3
17
  ## 3.7.0
4
18
 
5
19
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-Bcd2Z3ea.js";
2
2
  import { F as t, P as n, o as r, t as i } from "./tooltip-tmFoTU_d.js";
3
- import { t as a } from "./spinner-D-FE_mTW.js";
3
+ import { t as a } from "./spinner-CtGCPza-.js";
4
4
  import { i as o, r as s, t as c } from "./button-tones-BgZJ1tkD.js";
5
5
  import { Children as l, Fragment as u, cloneElement as d, isValidElement as f, useCallback as p, useContext as m, useEffect as h, useRef as g, useState as _ } from "react";
6
6
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
package/dist/charts.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./ui.utils-CAnKTCw5.js";
2
2
  import { t } from "./utils-Bcd2Z3ea.js";
3
3
  import { t as n } from "./use-material-translation-hLQzOjF0.js";
4
- import { t as r } from "./button-1Fornjtn.js";
4
+ import { t as r } from "./button--cF4gY14.js";
5
5
  import { t as i } from "./use-ssr-media-query-C6M5m8sf.js";
6
6
  import { i as a, n as o, r as s, t as c } from "./util-4heV2LPI.js";
7
7
  import { t as l } from "./useIsomorphicLayoutEffect-DfgAhWcH.js";
@@ -1,12 +1,12 @@
1
1
  import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
2
  import { t } from "./utils-Bcd2Z3ea.js";
3
3
  import { D as n } from "./tooltip-tmFoTU_d.js";
4
- import { c as r, d as i, f as a, n as o, t as s } from "./dropdown-menu-DiZvX4tG.js";
4
+ import { c as r, d as i, f as a, n as o, t as s } from "./dropdown-menu-DWtgUVW7.js";
5
5
  import { a as c, i as l, n as u } from "./field-blur-context-Dw9ZAgBr.js";
6
- import { a as d, d as f, r as p, t as m, u as h } from "./toolbar-items-DnkS3bDY.js";
6
+ import { a as d, d as f, r as p, t as m, u as h } from "./toolbar-items-DsDDD5AY.js";
7
7
  import { t as g } from "./is-production-GLw59WU8.js";
8
8
  import { t as _ } from "./use-material-translation-hLQzOjF0.js";
9
- import { i as v, n as y, o as b, t as x } from "./code-language-items-Bb7afEj-.js";
9
+ import { i as v, n as y, o as b, t as x } from "./code-language-items-CGARRbVm.js";
10
10
  import { t as S } from "./useIsomorphicLayoutEffect-DfgAhWcH.js";
11
11
  import { n as C, t as w } from "./escape-owner-B8k7DvFa.js";
12
12
  import { t as T } from "./skeleton-Bmp4gWAH.js";
@@ -1,14 +1,14 @@
1
1
  import { t as e } from "./utils-Bcd2Z3ea.js";
2
2
  import { D as t } from "./tooltip-tmFoTU_d.js";
3
- import { d as n, r, t as i, u as a } from "./toolbar-items-DnkS3bDY.js";
3
+ import { d as n, r, t as i, u as a } from "./toolbar-items-DsDDD5AY.js";
4
4
  import { t as o } from "./use-material-translation-hLQzOjF0.js";
5
- import { i as s, n as c, o as l } from "./code-language-items-Bb7afEj-.js";
5
+ import { i as s, n as c, o as l } from "./code-language-items-CGARRbVm.js";
6
6
  import { r as u, t as d } from "./field-blur-DFUazxsL.js";
7
7
  import { t as f } from "./skeleton-Bmp4gWAH.js";
8
8
  import { t as p } from "./live-status-BGPaN8r8.js";
9
9
  import { t as m } from "./use-mobile-BDro060N.js";
10
10
  import { t as h } from "./react-node-text-Crkpfpco.js";
11
- import { a as g, c as _, d as v, f as y, i as b, l as x, m as S, o as C, p as w, r as T, s as E, t as D, u as O } from "./code-editor-DeZYlIO2.js";
11
+ import { a as g, c as _, d as v, f as y, i as b, l as x, m as S, o as C, p as w, r as T, s as E, t as D, u as O } from "./code-editor-0CdGwKDg.js";
12
12
  import { ChevronDown as k, ChevronUp as A, Columns2 as j } from "lucide-react";
13
13
  import { useEffect as M, useRef as N, useState as P } from "react";
14
14
  import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { d as e, f as t } from "./dropdown-menu-DiZvX4tG.js";
1
+ import { d as e, f as t } from "./dropdown-menu-DWtgUVW7.js";
2
2
  import { t as n } from "./use-material-translation-hLQzOjF0.js";
3
3
  import { t as r } from "./live-status-BGPaN8r8.js";
4
4
  import { useEffect as i, useRef as a, useState as o } from "react";
@@ -132,7 +132,7 @@
132
132
  z-index: 50;
133
133
  height: 0.25rem;
134
134
  pointer-events: none;
135
- background-color: var(--primary);
135
+ background-color: var(--primary-indicator);
136
136
  }
137
137
  transform-origin: 0 50%;
138
138
  animation: nx-scroll-progress linear both;
@@ -43,7 +43,7 @@
43
43
  }
44
44
 
45
45
  .column-resize-handle {
46
- background-color: var(--color-primary);
46
+ background-color: var(--color-primary-indicator);
47
47
  bottom: -2px;
48
48
  pointer-events: none;
49
49
  position: absolute;
@@ -124,7 +124,7 @@
124
124
  height: 0.55em;
125
125
  transform: scale(0);
126
126
  transition: 120ms transform ease-in-out;
127
- box-shadow: inset 1em 1em var(--color-primary);
127
+ box-shadow: inset 1em 1em var(--color-primary-indicator);
128
128
  }
129
129
  input[type="checkbox"]:checked::before {
130
130
  transform: scale(1);
@@ -37,6 +37,11 @@
37
37
  border-color: color-mix(in oklab, var(--primary) 60%, transparent);
38
38
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 50%, transparent);
39
39
  }
40
+ /* Dark: the 60 % border is under 3:1 on the card (WCAG 1.4.11). */
41
+ :is(.dark, [data-theme="dark"])
42
+ [data-slot="compact-editor"][data-look="expressive"]:focus-within {
43
+ border-color: var(--primary-indicator);
44
+ }
40
45
  [data-slot="editor-field"][data-invalid]
41
46
  :is(
42
47
  [data-slot="compact-editor"],
@@ -115,7 +115,7 @@
115
115
  }
116
116
 
117
117
  blockquote {
118
- border-inline-start: 3px solid var(--primary);
118
+ border-inline-start: 3px solid var(--primary-indicator);
119
119
  padding-inline-start: 1.1em;
120
120
  color: var(--muted-foreground);
121
121
  font-family: var(--nxgt-prose-heading-font);
@@ -17,6 +17,11 @@
17
17
  the violet page (7.9:1 on a Card; the colour itself gives 6.8:1 on the
18
18
  page); the dark theme lifts it. */
19
19
  --primary-text: color-mix(in oklab, var(--primary) 96%, black);
20
+ /* Primary drawn as a non-text mark (WCAG 1.4.11, 3:1): an indicator bar or dot,
21
+ a selected or focused border, a ring, a spinner arc, a progress fill
22
+ (`bg-primary-indicator`, `border-primary-indicator`...). Light is --primary;
23
+ the dark theme lifts it. */
24
+ --primary-indicator: var(--primary);
20
25
  /* --secondary, --success and --info are 0.02 darker than before: on the
21
26
  violet page tint (--background, 97.3 %) their own 15 % tonal tint gave the
22
27
  text 4.3 to 4.5:1; now 4.7:1 or more on the page and on a Card. */
@@ -104,6 +109,9 @@
104
109
  /* Mixed 60 % toward white (the tonal Button labels' recipe): readable as text
105
110
  on --background and --card. */
106
111
  --primary-text: color-mix(in oklab, var(--primary) 40%, white);
112
+ /* --primary itself is 2.5:1 on --background, 2.3:1 on --card and 2.1:1 on
113
+ --muted. Mixed 25 % toward white: 4.5:1, 4.1:1 and 3.7:1. */
114
+ --primary-indicator: color-mix(in oklab, var(--primary) 75%, white);
107
115
  /* Brighter than the light one: it is read as text on the dark surfaces (6.3:1
108
116
  on --background, 5.8:1 on --card; 4.6:1 on its own 15 % tonal tint over a
109
117
  Card). A filled secondary surface mixes it toward --background (the opaque
@@ -49,8 +49,8 @@
49
49
  pointer-events: none;
50
50
  }
51
51
  [data-slot="period-card"][data-state="current"] {
52
- --card-bar: var(--primary);
53
- border-color: var(--primary);
52
+ --card-bar: var(--primary-indicator);
53
+ border-color: var(--primary-indicator);
54
54
  background: color-mix(in oklab, var(--primary) 7%, var(--card));
55
55
  }
56
56
  [data-slot="period-card"][data-state="past"] {
@@ -1,11 +1,24 @@
1
1
  /* ActivityLayout's `backdrop` prop: a node (a `Background` preset from
2
- * `@nxgt/material/backgrounds`) drawn behind the frame instead of the built-in
2
+ * `@nxgt/material/backgrounds`) drawn behind the content column instead of the built-in
3
3
  * gradient. `data-backdrop` is on the layout's root only while one is given, so
4
4
  * without it nothing here matches and the gradient is unchanged.
5
5
  *
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
- * is positioned by classes in activity-layout.tsx. */
8
+ * is in the content column, positioned by classes in activity-layout.tsx: the
9
+ * frame's padding and gaps take the chrome fill, so the shapes show nowhere
10
+ * else.
11
+ *
12
+ * The shapes show in the free content area only: every surface of the chrome and
13
+ * of the lists is opaque, so none runs behind a text, an icon or a control. Two
14
+ * tokens, set on the layout (or any ancestor), tune them:
15
+ * --nxgt-backdrop-chrome the sidebar, the app bar, the breadcrumb, the tabs
16
+ * strip (default: var(--background))
17
+ * --nxgt-backdrop-surface the lists and tables, their band and rows
18
+ * (default: var(--card))
19
+ * The sidebar, the app bar and the tables take theirs from a class whose
20
+ * fallback is their usual surface, through `--nxgt-backdrop-fill-*`: a utility
21
+ * class outranks any rule in a layer, so a rule here could not set them. */
9
22
  @layer components {
10
23
  /* The gradient's own tint and blobs give way to the backdrop. */
11
24
  [data-slot="activity-layout"][data-backdrop] {
@@ -21,4 +34,30 @@
21
34
  width: 100%;
22
35
  height: 100%;
23
36
  }
37
+
38
+ [data-slot="activity-layout"][data-backdrop] {
39
+ --nxgt-backdrop-fill-chrome: var(--nxgt-backdrop-chrome, var(--background));
40
+ --nxgt-backdrop-fill-surface: var(--nxgt-backdrop-surface, var(--card));
41
+ }
42
+
43
+ /* The breadcrumb trail: a pill under the app bar, as wide as its crumbs. */
44
+ [data-slot="activity-layout"][data-backdrop]
45
+ [data-slot="activity-layout-frame"]
46
+ > *
47
+ > [data-slot="breadcrumb"] {
48
+ width: fit-content;
49
+ max-width: 100%;
50
+ padding-block: 0.25rem;
51
+ padding-inline-end: 0.75rem;
52
+ border-radius: 999px;
53
+ background: var(--nxgt-backdrop-fill-chrome);
54
+ }
55
+
56
+ /* Tabs: the strip is a band, its top corners rounded. (The segmented look
57
+ * has its own track.) */
58
+ [data-slot="activity-layout"][data-backdrop] [data-slot="tabs-list"] {
59
+ border-start-start-radius: var(--radius);
60
+ border-start-end-radius: var(--radius);
61
+ background: var(--nxgt-backdrop-fill-chrome);
62
+ }
24
63
  }
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .pdf-highlight[data-current] {
12
- outline: 2px solid var(--color-primary);
12
+ outline: 2px solid var(--color-primary-indicator);
13
13
  outline-offset: 1px;
14
14
  }
15
15