@nxgt/material-vue 0.39.0 → 0.40.1

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 (85) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +1 -0
  3. package/dist/{Button-DVeAQorb.js → Button-teS2p_af.js} +2 -2
  4. package/dist/{HoverCardTrigger-VvXPswRz.js → HoverCardTrigger-BEzEsgBo.js} +3 -3
  5. package/dist/{camera-CG6WfZNc.js → camera-1QRTmpnM.js} +4 -4
  6. package/dist/components/theme-tokens.css +7 -2
  7. package/dist/{components-B2kSyBK0.js → components-XJ95qxB1.js} +17628 -17385
  8. package/dist/components.js +8 -8
  9. package/dist/composables.js +3 -3
  10. package/dist/dnd.js +1 -1
  11. package/dist/{form-scope-XhlaF5na.js → form-scope-BtEP6yC2.js} +1 -1
  12. package/dist/{i18n-provider-BBnUUGqM.js → i18n-provider-BpNC9SxV.js} +1 -1
  13. package/dist/i18n.js +4 -4
  14. package/dist/{icon-button-CSPfP615.js → icon-button-Vz4NECf1.js} +30 -30
  15. package/dist/lib/components/ui/collections/data-table/data-table.stories.columns.d.ts +3 -1
  16. package/dist/lib/components/ui/collections/data-table/data-table.stories.template.d.ts +1 -1
  17. package/dist/lib/components/ui/collections/facet-group/facet-group-classes.d.ts +18 -0
  18. package/dist/lib/components/ui/collections/facet-group/facet-group.vue.d.ts +47 -0
  19. package/dist/lib/components/ui/collections/facet-group/index.d.ts +2 -0
  20. package/dist/lib/components/ui/collections/index.d.ts +1 -0
  21. package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
  22. package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item.vue.d.ts +4 -3
  23. package/dist/lib/components/ui/menu-item-loading.d.ts +34 -0
  24. package/dist/lib/components/ui/overlays/context-menu/ContextMenuItem.vue.d.ts +6 -2
  25. package/dist/lib/components/ui/overlays/dropdown-menu/DropdownMenuItem.vue.d.ts +11 -3
  26. package/dist/lib/components/ui/overlays/menubar/MenubarItem.vue.d.ts +6 -2
  27. package/dist/lib/components/ui/{actions/button/prepend-to-child.d.ts → prepend-to-child.d.ts} +5 -4
  28. package/dist/lib/composables/use-hidden-input-name.d.ts +12 -0
  29. package/dist/lib/i18n/resources/en/en.d.ts +6 -0
  30. package/dist/lib/i18n/resources/en/material.json.d.ts +7 -1
  31. package/dist/lib/i18n/resources/fr/fr.d.ts +6 -0
  32. package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -1
  33. package/dist/lib/i18n/resources/resources.d.ts +12 -0
  34. package/dist/lib/i18n/translator.d.ts +1 -1
  35. package/dist/lib/nuxt/component-names.d.ts +1 -1
  36. package/dist/lib.js +3 -3
  37. package/dist/main.js +17 -17
  38. package/dist/map.js +4 -4
  39. package/dist/material-vue.css +1 -1
  40. package/dist/{number.utils-Bpo9tUaJ.js → number.utils-C1eB3GDr.js} +427 -427
  41. package/dist/{pdf-outline-sidebar-aQ5Lhbss.js → pdf-outline-sidebar-DINCjWKk.js} +2 -2
  42. package/dist/{pdf-page-NCmScgMW.js → pdf-page-BLJ0xkS3.js} +1 -1
  43. package/dist/{pdf-page-list-BnvE130d.js → pdf-page-list-BNUPVA9x.js} +2 -2
  44. package/dist/{pdf-reader-CMt9dKZ-.js → pdf-reader-BcB_Kd_F.js} +8 -8
  45. package/dist/{pdf-sidebar-BWzX3e0f.js → pdf-sidebar-B7WgcY77.js} +3 -3
  46. package/dist/{pdf-thumbnail-sidebar-8nbYsI3d.js → pdf-thumbnail-sidebar-BRtyyBPt.js} +3 -3
  47. package/dist/{pdf-toolbar-DpQMG5rv.js → pdf-toolbar-_CBHSMnH.js} +4 -4
  48. package/dist/pdf.js +2 -2
  49. package/dist/{print-format.utils-oj5kle2P.js → print-format.utils-k5W0GBRF.js} +3 -3
  50. package/dist/{sortable-provider-2czx1jSW.js → sortable-provider-Dw9TBAlq.js} +2 -2
  51. package/dist/{stored-language-CKZMMJcz.js → stored-language-DEyPmUzl.js} +14 -2
  52. package/dist/{stx-player-CS1FYHVS.js → stx-player-CgwzX7_k.js} +13 -13
  53. package/dist/{translator-uh5FWiMq.js → translator-B62GlCBp.js} +1 -1
  54. package/dist/{use-heading-spy-CcJfoBA1.js → use-heading-spy-T94lNeNA.js} +21 -21
  55. package/dist/{use-material-translation-C6xccbic.js → use-material-translation-DxU51--g.js} +3 -3
  56. package/docs/components/data-table-filter-and-lists.md +42 -0
  57. package/docs/components/feedback-and-status.md +7 -6
  58. package/docs/components/form-fields.md +1 -1
  59. package/docs/components/navigation-and-layout.md +6 -5
  60. package/docs/components/overlays-and-menus.md +4 -0
  61. package/docs/guides/csp.md +10 -0
  62. package/docs/guides/i18n.md +1 -1
  63. package/docs/guides/ssr.md +8 -0
  64. package/docs/guides/theming.md +29 -6
  65. package/docs/previews/buttons-actions-button.webp +0 -0
  66. package/docs/previews/data-display-avatar.webp +0 -0
  67. package/docs/previews/data-display-badge.webp +0 -0
  68. package/docs/previews/data-display-chip.webp +0 -0
  69. package/docs/previews/data-display-statusindicator.webp +0 -0
  70. package/docs/previews/data-display-timeline.webp +0 -0
  71. package/docs/previews/data-table-filter-lists-facetgroup.webp +0 -0
  72. package/docs/previews/feedback-status-alert.webp +0 -0
  73. package/docs/previews/feedback-status-banner.webp +0 -0
  74. package/docs/previews/feedback-status-circularprogress.webp +0 -0
  75. package/docs/previews/feedback-status-emptystate.webp +0 -0
  76. package/docs/previews/feedback-status-progress.webp +0 -0
  77. package/docs/previews/feedback-status-spinner.webp +0 -0
  78. package/docs/previews/feedback-status-toast.webp +0 -0
  79. package/docs/previews/form-fields-passwordfield.webp +0 -0
  80. package/docs/previews/form-fields-ratingfield.webp +0 -0
  81. package/docs/roadmap.md +5 -0
  82. package/docs/troubleshooting.md +5 -5
  83. package/lib/components/theme-tokens.css +7 -2
  84. package/lib/nuxt/component-names.ts +1 -0
  85. package/package.json +2 -2
@@ -134,7 +134,7 @@ import { Button } from '@nxgt/material-vue/components';
134
134
 
135
135
  **Contrast.** The shipped light palette keeps the text of every filled status
136
136
  colour at 4.5:1 or more (WCAG 1.4.3): `--secondary` 5.7:1, `--success` 5.6:1,
137
- `--info` 5.8:1 and `--warning` 5.3:1 against their `-foreground`, and
137
+ `--info` 5.8:1 and `--warning` 5.5:1 against their `-foreground`, and
138
138
  `--secondary` as text (a `tonal`, `outlined` or `link` `Button`) 6.0:1 on
139
139
  `--background`, 4.8:1 on its own 15 % `tonal` tint.
140
140
 
@@ -144,8 +144,8 @@ and 5.8:1 on `--card` (a `tonal` secondary `Button` 5.4:1 and 4.6:1). Under
144
144
  near-white text those brights are too light, so every filled surface built on
145
145
  them is tinted in the dark theme: a filled `secondary` `Button`, `IconButton`
146
146
  or `Badge` at 70 % (5.2:1 on `--background`, 4.9:1 on `--card`), a filled
147
- `success`, `info` or `warning` one at 60 % (7.3:1, 5.7:1 and 7.5:1 on
148
- `--background`; 6.7:1, 5.3:1 and 7.0:1 on `--card`). Their hover, focus and
147
+ `success`, `info` or `warning` one at 60 % (7.3:1, 5.7:1 and 6.0:1 on
148
+ `--background`; 6.7:1, 5.3:1 and 5.6:1 on `--card`; the `warning` `Button` 6.5:1). Their hover, focus and
149
149
  pressed states are tinted further down, so they only gain contrast.
150
150
 
151
151
  In the light theme the filled `primary`, `secondary`, `success`, `info`,
@@ -161,9 +161,9 @@ their text and icon in one tone per colour, read on `--background`, on
161
161
  `--card` and on the variant's own tint (15 % at most, at rest or focused). In
162
162
  the light theme `primary`, `secondary`, `info` and `success` use the token
163
163
  itself (5.8, 4.8, 4.9 and 4.7:1 at their lowest) and `warning` and `error` the
164
- token mixed with 15 % black (6.0 and 5.4:1). In the dark theme `primary` is
164
+ token mixed with 15 % black (6.4 and 5.4:1). In the dark theme `primary` is
165
165
  mixed with 60 % white (8.1:1 on `--card`: the token itself is a dark indigo,
166
- 2.2:1), `success` and `warning` with 15 % white (5.0 and 5.4:1), `error` with
166
+ 2.2:1), `success` and `warning` with 15 % white (5.0 and 6.3:1), `error` with
167
167
  30 % white (5.9:1), and `secondary` and `info` use the token (4.6 and 5.3:1).
168
168
  The tones are mixed from the tokens (`color-mix(in oklab, var(--color-error)
169
169
  85%, black)`), so an override of a token moves its tone with it; a text colour
@@ -179,6 +179,29 @@ darker than the dark theme's: a filled `error` button's near-white text reaches
179
179
  4.8:1 (it was 4.6:1). The dark `--error` keeps `0.577`: a lighter value drops
180
180
  the filled surface's near-white text below 4.5:1 (`0.62` gives 3.85:1).
181
181
 
182
+ **`--warning` is amber**, a hue apart from `--error` (62 against 27 degrees in
183
+ the light theme, 70 in the dark one), so a warning `Alert`, `Banner`, `Badge`
184
+ or toast does not read as a failure. Light `oklch(0.52 0.13 62)` is 5.5:1
185
+ under its near-white `-foreground`; dark `oklch(0.7 0.15 70)` reads as text at
186
+ 7.3:1 on `--background` and 6.5:1 on `--card` (6.6 and 5.8:1 on its 10 % tint). An app that overrides `--warning` keeps its own
187
+ value; one that keeps the shipped value sees its `bg-warning` and
188
+ `text-warning` surfaces change hue, and re-checks its custom pairs.
189
+
190
+ **A selected `DataTable` row** (`TableRow`, `data-state="selected"`) is a 15 %
191
+ primary tint with `foreground` text, a bar on the inline-start edge of its
192
+ first cell (`before:`, primary in the light theme, primary mixed with 60 %
193
+ white in the dark one: 5.9:1 in light and 8.2:1 or more in dark against the
194
+ row), and the checkbox, drawn in the same dark colour (8.2:1 or more). The
195
+ tint is too light to be told from its neighbour alone (1.2:1 in light, 1.06 to
196
+ 1.11:1 in dark), which is what keeps the text at 4.5:1 or more on a page and on
197
+ a `Card`: 15.9:1 in light, and in dark 17.5:1 on a page, 17.1:1 in a `DataTable`
198
+ on a `Card` and 15.4:1 for a bare `TableRow` on a `Card`. Links and
199
+ `text-muted-foreground` texts (drawn as `foreground` at 70 %) are 7.0:1 in
200
+ light and 8.15:1 in dark for a bare row on a `Card`. A `text-error-text` text
201
+ keeps its colour. Do not
202
+ put `text-primary-foreground` in a cell for a selected row: it is near-white
203
+ on that tint.
204
+
182
205
  **Error text has a token of its own**, `--error-text` (`text-error-text`), so
183
206
  the fill can stay dark while the text is light enough to read. The light value
184
207
  is `color-mix(in oklab, var(--error) 94%, black)` (5.7:1 on `--background`
@@ -212,7 +235,7 @@ the surfaces' text, the error text (`HelperText` and a field's message on
212
235
  `--background` and `--card`), the `Alert`s and the `Timeline`, `Button` and
213
236
  `IconButton` in every variant and colour, and a `Badge` link in every colour,
214
237
  at rest, hovered, focused and pressed, the tracks and the tabs;
215
- `Data display/ListTile` measures the selected tile. Run them against your own
238
+ `Data display/ListTile` measures the selected tile, `Data table, filter & lists/DataTable/On a card` the header, the cells, the links and the selected rows on a page and on a `Card` (also right-to-left), and `Feedback & status/Alert/Tones contrast` the warning, error and success alerts there. Run them against your own
216
239
  tokens after an override.
217
240
 
218
241
  **Tabs.** An `underline` tab's active label is `--primary` in the light
package/docs/roadmap.md CHANGED
@@ -90,9 +90,14 @@ version they shipped in, and planned entries may name the major they target.
90
90
  Vue only: `@nxgt/material`'s print blocks already produce a PDF.
91
91
  - **`StepperIndicator`, as in `@nxgt/material`** — the step markers on their
92
92
  own, for a stepper laid out your way.
93
+ - **Facets panel: `Filter variant="facets"`** — collapsible FacetGroups sharing the filter bar's state, a sheet on a phone
93
94
 
94
95
  ## Later
95
96
 
97
+ - **A CSP without `style-src-attr 'unsafe-inline'`** — the four form controls'
98
+ hidden inputs no longer need it; the checked `Checkbox` indicator,
99
+ `SelectValue`, the `RadioGroup` root, `Slider` and popper positioning still
100
+ do. Inventory: softistx/nxgt-material#596.
96
101
  - **Next major: an error `Banner` interrupts** — `tone="error"` becomes
97
102
  `role="alert"` `aria-live="assertive"`, so a screen reader reads it out at
98
103
  once. Every tone is `role="status"` `aria-live="polite"` today; pass
@@ -1345,12 +1345,12 @@ no `position`; it still covers the bottom when the app mounts vue-sonner's own
1345
1345
  `position`, which applies on every screen.
1346
1346
  **Fix:** mount the `Toaster` from `@nxgt/material-vue/components`, and drop a
1347
1347
  bottom `position` unless the bottom is what you want on phones too. When a
1348
- sticky header must stay visible above the toasts, raise the phone offset's
1349
- `top`:
1348
+ sticky header is taller than the app shell's (72px with its margin), raise the
1349
+ phone offset's `top` (80 by default, so toasts start below that bar):
1350
1350
 
1351
1351
  ```vue
1352
1352
  <Toaster /> <!-- top-center on a phone -->
1353
- <Toaster :mobile-offset="{ top: 72 }" />
1353
+ <Toaster :mobile-offset="{ top: 96 }" />
1354
1354
  <Toaster position="bottom-center" /> <!-- bottom-center on every screen -->
1355
1355
  ```
1356
1356
 
@@ -3333,8 +3333,8 @@ while a `Switch`, `SwitchField` or `SwitchFormField` with `required` and a
3333
3333
  proceed".
3334
3334
  **Why:** `required` used to draw only the label's asterisk. It now reaches the
3335
3335
  switch, which is announced as required (`aria-required`), and its hidden input
3336
- is `required`, so the browser's native validation blocks the submit, as for a
3337
- required checkbox.
3336
+ is `required`, so once hydrated the browser's native validation blocks the
3337
+ submit, as for a required checkbox.
3338
3338
  **Fix:** leave `required` on a switch that must be on (an agreement); drop it
3339
3339
  from one that may stay off. A form that validates itself (vee-validate) can
3340
3340
  turn native validation off with `novalidate`:
@@ -38,7 +38,9 @@
38
38
  --success-foreground: oklch(0.984 0.003 247.858);
39
39
  --info: oklch(0.5 0.165 254.624);
40
40
  --info-foreground: oklch(0.984 0.003 247.858);
41
- --warning: oklch(0.54 0.222 41.116);
41
+ /* Amber, a hue apart from --error (27): a warning must not read as a
42
+ failure. 5.7:1 as text on white, 5.0:1 on its 10% tint, 5.5:1 under near-white text. */
43
+ --warning: oklch(0.52 0.13 62);
42
44
  --warning-foreground: oklch(0.984 0.003 247.858);
43
45
  --destructive: var(--error);
44
46
  --border: oklch(0.929 0.013 255.508);
@@ -94,7 +96,10 @@
94
96
  --success-foreground: oklch(0.984 0.003 247.858);
95
97
  --info: oklch(0.707 0.165 254.624);
96
98
  --info-foreground: oklch(0.984 0.003 247.858);
97
- --warning: oklch(0.646 0.222 41.116);
99
+ /* Amber too, as text: 7.3:1 on --background and 6.5:1 on --card, 6.6:1 and
100
+ 5.8:1 on its 10% tint; the badge's 60% fill under near-white text is
101
+ 6.0:1 on a page and 5.6:1 on a Card. */
102
+ --warning: oklch(0.7 0.15 70);
98
103
  --warning-foreground: oklch(0.984 0.003 247.858);
99
104
  --destructive: oklch(0.704 0.191 22.216);
100
105
  --border: oklch(1 0 0 / 10%);
@@ -241,6 +241,7 @@ export const COMPONENT_NAMES = [
241
241
  'EventCard',
242
242
  'EventChip',
243
243
  'ExtendedLabel',
244
+ 'FacetGroup',
244
245
  'FeatureCard',
245
246
  'Field',
246
247
  'Figure',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material-vue",
3
- "version": "0.39.0",
3
+ "version": "0.40.1",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -124,7 +124,7 @@
124
124
  "docs:previews": "vitest run --project previews"
125
125
  },
126
126
  "dependencies": {
127
- "@nxgt/material-core": "^0.11.0",
127
+ "@nxgt/material-core": "^0.11.1",
128
128
  "@floating-ui/dom": "^1.8.0",
129
129
  "@fortawesome/fontawesome-common-types": "7.3.1",
130
130
  "@lucide/vue": "^1.45.0",