@nxgt/material 3.53.0 → 3.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/theme-tokens.css +19 -15
  3. package/dist/components/ui/overlays/dialog/dialog.css +2 -1
  4. package/dist/components/ui/overlays/popover/popover.css +3 -2
  5. package/dist/{components-DZPMvc1w.js → components-DFG2mgsM.js} +11222 -11215
  6. package/dist/components.js +1 -1
  7. package/dist/lib/components/ui/collections/data-grid/columns/row-meta.d.ts +2 -0
  8. package/dist/lib/components/ui/collections/data-grid/grid-meta.d.ts +10 -4
  9. package/dist/lib/components/ui/selection/switcher/partials/switcher-tooltip.d.ts +10 -2
  10. package/dist/main.js +1 -1
  11. package/dist/material.css +1 -1
  12. package/dist/styles.css +1 -0
  13. package/docs/components/navigation-and-layout.md +1 -1
  14. package/docs/components/selection-and-choice.md +1 -1
  15. package/docs/guides/data-grid.md +39 -2
  16. package/docs/guides/theming.md +8 -0
  17. package/docs/roadmap.md +3 -2
  18. package/docs/troubleshooting.md +15 -0
  19. package/lib/components/theme-tokens.css +19 -15
  20. package/lib/components/ui/overlays/dialog/dialog.css +2 -1
  21. package/lib/components/ui/overlays/popover/popover.css +3 -2
  22. package/lib/styles.css +1 -0
  23. package/lib/themes/ambre.css +8 -6
  24. package/lib/themes/ardoise.css +8 -6
  25. package/lib/themes/bleumono.css +8 -6
  26. package/lib/themes/bluemoon.css +8 -6
  27. package/lib/themes/corail.css +8 -6
  28. package/lib/themes/foret.css +8 -6
  29. package/lib/themes/lavande.css +8 -6
  30. package/lib/themes/menthe.css +8 -6
  31. package/lib/themes/ocean.css +8 -6
  32. package/lib/themes/pink.css +8 -6
  33. package/lib/themes/prune.css +8 -6
  34. package/lib/themes/sable.css +8 -6
  35. package/lib/themes/slate.css +8 -6
  36. package/lib/themes/teal.css +8 -6
  37. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.54.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1909](https://github.com/softistx/nxgt-material/pull/1909) [`6ffea13`](https://github.com/softistx/nxgt-material/commit/6ffea13d8897bfa87dac21a49e2dc244d3d90c6e) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Dark theme: cards, popovers and dialogs now lift off the page ground. The dark `--card`, `--popover`, `--muted`, `--accent`, `--border` and `--input` are 0.03 of lightness higher (same hue and chroma; Lavande's card goes from `oklch(0.19 0.019 289.4)` to `oklch(0.22 0.019 289.4)`), in `theme-tokens.css`, every shipped theme stylesheet and the `defineTheme` generator; the sidebar keeps its former surface. A new `--card-edge` token (`var(--border)` in light, so light does not change; `color-mix(in oklab, white 8%, var(--card))` in dark, also `border-card-edge`) draws the edge of `Card`, `Popover` and `Dialog`, with a faint top highlight in dark. An app with a custom theme regenerates it to get the new values and the token; an app that overrides `--card` in dark keeps its colour.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#1905](https://github.com/softistx/nxgt-material/pull/1905) [`0855c07`](https://github.com/softistx/nxgt-material/commit/0855c07bac2aa042e61de09f03e4892954277469) Thanks [@SteveGT96](https://github.com/SteveGT96)! - docs(data-grid): the guide says a column's `cell` renders a node on read-only and computed columns, and that `meta.format` and the built-in editors replace it with text [#1905](https://github.com/softistx/nxgt-material/pull/1905)
12
+
13
+ - [#1908](https://github.com/softistx/nxgt-material/pull/1908) [`976a84b`](https://github.com/softistx/nxgt-material/commit/976a84bba04d3ee44a26575a7387c2e0aaf89d38) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `DataGrid`: a number column whose `meta.number.decimals` is a function of the row now shows exactly that many fraction digits (a saved 2.50 reads `2,50`, not `2,5`), in the cell, the editor and a copy. `meta.format` receives the cell's row as `ctx.row` (absent for a total). `numberCodes` gains `fixed` to write exactly `decimals` fraction digits ([#1903](https://github.com/softistx/nxgt-material/issues/1903)).
14
+
15
+ - [#1907](https://github.com/softistx/nxgt-material/pull/1907) [`32a5103`](https://github.com/softistx/nxgt-material/commit/32a5103570bab504bbc3d276420c8accd80eb3ca) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Switcher: the tooltip that shows the full title (clipped title, or `size="compact"`) is visual only; the trigger no longer gets an `aria-describedby` to it, so a screen reader no longer reads the title and subtitle twice.
16
+ - Updated dependencies [[`6ffea13`](https://github.com/softistx/nxgt-material/commit/6ffea13d8897bfa87dac21a49e2dc244d3d90c6e), [`976a84b`](https://github.com/softistx/nxgt-material/commit/976a84bba04d3ee44a26575a7387c2e0aaf89d38)]:
17
+ - @nxgt/material-core@0.42.0
18
+
3
19
  ## 3.53.0
4
20
 
5
21
  ### Minor Changes
@@ -11,6 +11,9 @@
11
11
  keeps the flat look with `--ground: var(--background)`. */
12
12
  --ground: color-mix(in oklab, var(--primary) 7%, var(--background));
13
13
  --card: oklch(1 0 0);
14
+ /* The card's edge (Card, Popover, Dialog): the border in light; dark draws it a
15
+ hairline lighter than the card. */
16
+ --card-edge: var(--border);
14
17
  --card-foreground: oklch(0.227 0.017 290);
15
18
  --strix: oklch(45.91% 0.1864 310.75);
16
19
  --popover: oklch(1 0 0);
@@ -111,38 +114,39 @@
111
114
  var(--primary) 6%,
112
115
  color-mix(in oklab, var(--background) 55%, black)
113
116
  );
114
- --card: oklch(0.19 0.019 289.4);
117
+ --card: oklch(0.22 0.019 289.4);
118
+ --card-edge: color-mix(in oklab, white 8%, var(--card));
115
119
  --card-foreground: oklch(0.943 0.012 291.3);
116
- --popover: oklch(0.19 0.019 289.4);
120
+ --popover: oklch(0.22 0.019 289.4);
117
121
  --popover-foreground: oklch(0.943 0.012 291.3);
118
122
  --primary: oklch(46% 0.1135 276.35);
119
123
  --primary-foreground: oklch(0.995 0.002 291.3);
120
124
  /* Mixed 60 % toward white (the tonal Button labels' recipe): readable as text
121
125
  on --background and --card. */
122
126
  --primary-text: color-mix(in oklab, var(--primary) 40%, white);
123
- /* --primary itself is 2.7:1 on --background, 2.5:1 on --card and 2.3:1 on
124
- --muted. Mixed 25 % toward white: 4.8:1, 4.5:1 and 4.2:1. */
127
+ /* --primary itself is 2.7:1 on --background, 2.4:1 on --card and 2.1:1 on
128
+ --muted. Mixed 25 % toward white: 4.8:1, 4.2:1 and 3.8:1. */
125
129
  --primary-indicator: color-mix(in oklab, var(--primary) 75%, white);
126
130
  /* Brighter than the light one: it is read as text on the dark surfaces (6.8:1
127
- on --background, 6.4:1 on --card; 5.1:1 on its own 15 % tonal tint over a
131
+ on --background, 6.0:1 on --card; 4.8:1 on its own 15 % tonal tint over a
128
132
  Card). A filled secondary surface mixes it toward --background (the opaque
129
133
  70 % mix) to keep 5.4:1 under its near-white text (4.9:1 over a Card). */
130
134
  --secondary: oklch(0.675 0.1135 245.65);
131
135
  --secondary-foreground: oklch(0.995 0.002 291.3);
132
- --muted: oklch(0.228 0.022 290);
136
+ --muted: oklch(0.258 0.022 290);
133
137
  --muted-foreground: oklch(0.725 0.03 292.2);
134
- /* 3.7:1 on --background, 3.5:1 on --card; the fill 3.3:1 on the track. */
138
+ /* 3.7:1 on --background, 3.3:1 on --card; the fill 3.3:1 on the track. */
135
139
  --track: oklch(0.53 0.03 290);
136
140
  --track-fill: oklch(0.85 0.09 276.35);
137
141
  --tooltip: oklch(0.925 0.012 291.3);
138
142
  --tooltip-foreground: oklch(0.446 0.043 291);
139
- --accent: oklch(0.25 0.022 290);
143
+ --accent: oklch(0.28 0.022 290);
140
144
  --accent-foreground: oklch(0.943 0.012 291.3);
141
145
  --error: oklch(0.577 0.245 27.325);
142
146
  --error-foreground: oklch(0.995 0.002 291.3);
143
147
  /* --error stays the fill under near-white text; as text it would give only
144
148
  4.0:1 on --background and 3.8:1 on --card. Lightened (76 % --error), 6.25
145
- and 5.9:1, and 5.2:1 on a focused error menu item (bg-error/20 over the
149
+ and 5.5:1, and 4.9:1 on a focused error menu item (bg-error/20 over the
146
150
  popover; the former 80 % missed 4.5:1 once rendered). */
147
151
  --error-text: color-mix(in oklab, var(--error) 76%, white);
148
152
  /* The light brights: on the dark surfaces they read as text and as the
@@ -152,15 +156,15 @@
152
156
  --success-foreground: oklch(0.995 0.002 291.3);
153
157
  --info: oklch(0.707 0.165 254.624);
154
158
  --info-foreground: oklch(0.995 0.002 291.3);
155
- /* Amber too, as text: 7.2:1 on --background and 6.7:1 on --card, 6.4:1 and
156
- 5.9:1 on its 10% tint; the badge's 60% fill under near-white text is
157
- 6.1:1 on a page and 5.8:1 on a Card. */
159
+ /* Amber too, as text: 7.2:1 on --background and 6.3:1 on --card, 6.4:1 and
160
+ 5.5:1 on its 10% tint; the badge's 60% fill under near-white text is
161
+ 6.1:1 on a page and 5.6:1 on a Card. */
158
162
  --warning: oklch(0.7 0.15 70);
159
163
  --warning-foreground: oklch(0.995 0.002 291.3);
160
164
  --destructive: oklch(0.704 0.191 22.216);
161
- --border: oklch(0.259 0.025 291.4);
162
- --input: oklch(0.298 0.027 291.4);
163
- /* 4.05:1 on --background, 3.80:1 on --card, 3.50:1 on --muted. */
165
+ --border: oklch(0.289 0.025 291.4);
166
+ --input: oklch(0.328 0.027 291.4);
167
+ /* 4.05:1 on --background, 3.57:1 on --card, 3.22:1 on --muted. */
164
168
  --ring: oklch(0.551 0.03 290);
165
169
  --chart-1: oklch(0.488 0.243 264.376);
166
170
  --chart-2: oklch(0.696 0.17 162.48);
@@ -39,7 +39,8 @@
39
39
  --dialog-bg: color-mix(in oklab, var(--primary) 18%, var(--card));
40
40
  box-shadow:
41
41
  var(--nxgt-elevation-3),
42
- inset 0 0 0 1px rgb(255 255 255 / 0.07);
42
+ inset 0 0 0 1px var(--card-edge),
43
+ inset 0 1px 0 rgb(255 255 255 / 0.03);
43
44
  }
44
45
  .nxgt-dialog[data-state="open"] {
45
46
  animation:
@@ -30,13 +30,14 @@
30
30
  --popover-bg: var(--popover);
31
31
  --popover-lift:
32
32
  0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
33
- border: 1px solid var(--border);
33
+ border: 1px solid var(--card-edge);
34
34
  border-radius: var(--radius-md);
35
35
  }
36
36
  :where(.dark, [data-theme="dark"]) .nxgt-popover {
37
37
  --popover-bg: color-mix(in oklab, var(--primary) 16%, var(--popover));
38
38
  --popover-lift:
39
- var(--nxgt-elevation-2), inset 0 0 0 1px rgb(255 255 255 / 0.07);
39
+ var(--nxgt-elevation-2), inset 0 0 0 1px var(--card-edge),
40
+ inset 0 1px 0 rgb(255 255 255 / 0.03);
40
41
  }
41
42
  :where(.dark, [data-theme="dark"]) .nxgt-popover[data-variant="tonal"] {
42
43
  --popover-bg: color-mix(in oklab, var(--primary) 34%, var(--popover));