@nxgt/material-vue 0.23.4 → 0.25.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 (182) hide show
  1. package/README.md +30 -28
  2. package/dist/{Button-CVIR6uLK.js → Button-C1aaI0Gw.js} +95 -72
  3. package/dist/{HoverCardTrigger-iAL5ALrL.js → HoverCardTrigger-JtHn0IFQ.js} +2 -2
  4. package/dist/{camera-Gvg5N956.js → camera-BacVyXl0.js} +6 -6
  5. package/dist/{components-AScwCcds.js → components-DRBKkOqk.js} +15764 -13833
  6. package/dist/components.js +8 -8
  7. package/dist/composables.js +2 -2
  8. package/dist/dnd.js +1 -1
  9. package/dist/form-scope-VxlJuvFe.js +43 -0
  10. package/dist/{i18n-provider-BqWxpaKu.js → i18n-provider-D0oYv0XS.js} +1 -1
  11. package/dist/i18n.js +4 -4
  12. package/dist/{icon-button-DbEME76t.js → icon-button-B2FQtIHS.js} +34 -37
  13. package/dist/lib/components/ui/actions/button/has-text-content.d.ts +10 -0
  14. package/dist/lib/components/ui/actions/copy-button/copy-value.vue.d.ts +21 -0
  15. package/dist/lib/components/ui/actions/copy-button/index.d.ts +2 -0
  16. package/dist/lib/components/ui/collections/data-table/data-table-context.d.ts +6 -0
  17. package/dist/lib/components/ui/collections/data-table/data-table-pagination.vue.d.ts +2 -0
  18. package/dist/lib/components/ui/collections/data-table/data-table.vue.d.ts +17 -27
  19. package/dist/lib/components/ui/collections/data-table/index.d.ts +1 -1
  20. package/dist/lib/components/ui/collections/data-table/partials/data-table-body.vue.d.ts +10 -1
  21. package/dist/lib/components/ui/collections/data-table/partials/data-table-empty.vue.d.ts +13 -1
  22. package/dist/lib/components/ui/collections/data-table/partials/data-table-head.vue.d.ts +22 -0
  23. package/dist/lib/components/ui/collections/data-table/partials/data-table-skeleton-rows.vue.d.ts +10 -0
  24. package/dist/lib/components/ui/collections/data-table/use-data-table.d.ts +17 -0
  25. package/dist/lib/components/ui/collections/filter/partials/filter-field-slider-range.vue.d.ts +1 -4
  26. package/dist/lib/components/ui/collections/pagination/index.d.ts +5 -0
  27. package/dist/lib/components/ui/collections/pagination/pagination-bar.vue.d.ts +21 -0
  28. package/dist/lib/components/ui/collections/pagination/pagination-items.d.ts +2 -0
  29. package/dist/lib/components/ui/collections/pagination/pagination-link.vue.d.ts +18 -0
  30. package/dist/lib/components/ui/collections/tree/use-tree.d.ts +2 -0
  31. package/dist/lib/components/ui/dates/date-field/date-field.vue.d.ts +10 -1
  32. package/dist/lib/components/ui/dates/date-field/date-form-field.vue.d.ts +3 -1
  33. package/dist/lib/components/ui/dates/date-field/day-matcher.d.ts +26 -0
  34. package/dist/lib/components/ui/dates/date-field/index.d.ts +1 -0
  35. package/dist/lib/components/ui/dates/date-field/partials/date-field-content.vue.d.ts +2 -0
  36. package/dist/lib/components/ui/dates/date-range-field/date-range-field.utils.d.ts +11 -0
  37. package/dist/lib/components/ui/dates/date-range-field/date-range-field.vue.d.ts +26 -1
  38. package/dist/lib/components/ui/dates/date-range-field/date-range-form-field.vue.d.ts +3 -1
  39. package/dist/lib/components/ui/dates/date-range-field/index.d.ts +1 -0
  40. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-calendar.vue.d.ts +5 -0
  41. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-field-trigger.vue.d.ts +2 -0
  42. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-presets.vue.d.ts +12 -0
  43. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-times.vue.d.ts +13 -0
  44. package/dist/lib/components/ui/dates/date-range-field/use-date-range-presets.d.ts +23 -0
  45. package/dist/lib/components/ui/dates/time-picker/time-picker-utils.d.ts +7 -0
  46. package/dist/lib/components/ui/display/accordion-card/accordion-card.vue.d.ts +29 -1
  47. package/dist/lib/components/ui/display/avatar/Avatar.vue.d.ts +14 -3
  48. package/dist/lib/components/ui/display/avatar/index.d.ts +1 -0
  49. package/dist/lib/components/ui/display/cards/cards.gallery.d.ts +5 -9
  50. package/dist/lib/components/ui/display/markdown/index.d.ts +18 -0
  51. package/dist/lib/components/ui/display/qrcode/qrcode.vue.d.ts +5 -3
  52. package/dist/lib/components/ui/display/status-indicator/status-tone.d.ts +3 -0
  53. package/dist/lib/components/ui/feedback/confirmation-dialog/async-form-scope.d.ts +15 -0
  54. package/dist/lib/components/ui/feedback/confirmation-dialog/confirmation-dialog.vue.d.ts +37 -24
  55. package/dist/lib/components/ui/feedback/confirmation-dialog/index.d.ts +1 -1
  56. package/dist/lib/components/ui/feedback/confirmation-dialog/partials/confirmation-dialog-form-error.vue.d.ts +3 -0
  57. package/dist/lib/components/ui/feedback/skeleton/skeleton-text.vue.d.ts +1 -1
  58. package/dist/lib/components/ui/feedback/spinner/spinner.compound-variants.d.ts +4 -0
  59. package/dist/lib/components/ui/fields/attributes/form-schema.d.ts +24 -22
  60. package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
  61. package/dist/lib/components/ui/fields/inline-edit/index.d.ts +1 -0
  62. package/dist/lib/components/ui/fields/inline-edit/inline-edit-form-field.vue.d.ts +7 -0
  63. package/dist/lib/components/ui/fields/number-field/number-field.vue.d.ts +2 -0
  64. package/dist/lib/components/ui/fields/slider/partials/slider-field-row.vue.d.ts +32 -0
  65. package/dist/lib/components/ui/fields/slider/slider-field.vue.d.ts +22 -1
  66. package/dist/lib/components/ui/fields/slider/slider-form-field.vue.d.ts +13 -1
  67. package/dist/lib/components/ui/forms/form-scope-schema.d.ts +43 -0
  68. package/dist/lib/components/ui/forms/form-scope.vue.d.ts +33 -0
  69. package/dist/lib/components/ui/layout/doc/doc.vue.d.ts +5 -5
  70. package/dist/lib/components/ui/layout/doc/index.d.ts +8 -1
  71. package/dist/lib/components/ui/layout/doc/partials/default-doc-link.vue.d.ts +14 -0
  72. package/dist/lib/components/ui/layout/doc/partials/doc-copy-page.vue.d.ts +6 -0
  73. package/dist/lib/components/ui/layout/doc/partials/doc-link.vue.d.ts +3 -7
  74. package/dist/lib/components/ui/layout/doc/types.d.ts +6 -1
  75. package/dist/lib/components/ui/media/file-preview/file-preview-pdf.lazy.d.ts +8 -0
  76. package/dist/lib/components/ui/media/file-preview/file-preview.vue.d.ts +9 -0
  77. package/dist/lib/components/ui/media/file-preview/index.d.ts +3 -0
  78. package/dist/lib/components/ui/media/file-preview/partials/file-preview-body.vue.d.ts +21 -0
  79. package/dist/lib/components/ui/media/file-preview/partials/file-preview-card.vue.d.ts +15 -0
  80. package/dist/lib/components/ui/media/file-preview/partials/file-preview-download.vue.d.ts +11 -0
  81. package/dist/lib/components/ui/media/file-preview/partials/file-preview-media.vue.d.ts +17 -0
  82. package/dist/lib/components/ui/media/file-preview/partials/file-preview-pdf.vue.d.ts +21 -0
  83. package/dist/lib/components/ui/media/file-preview/partials/file-preview-status.vue.d.ts +22 -0
  84. package/dist/lib/components/ui/media/file-preview/partials/file-preview-text.vue.d.ts +16 -0
  85. package/dist/lib/components/ui/media/file-preview/types.d.ts +19 -0
  86. package/dist/lib/components/ui/media/file-preview/use-file-preview.d.ts +21 -0
  87. package/dist/lib/components/ui/media/file-preview/use-text-preview.d.ts +17 -0
  88. package/dist/lib/components/ui/media/files-form-field/files-form-field.vue.d.ts +29 -0
  89. package/dist/lib/components/ui/media/files-form-field/index.d.ts +2 -0
  90. package/dist/lib/components/ui/media/image-cropper/partials/image-cropper-canvas.vue.d.ts +1 -1
  91. package/dist/lib/components/ui/media/index.d.ts +2 -0
  92. package/dist/lib/components/ui/media/pdf-viewer/index.d.ts +6 -6
  93. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-page.vue.d.ts +1 -1
  94. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-reader-body.vue.d.ts +2 -2
  95. package/dist/lib/components/ui/media/pdf-viewer/pdf-reader.vue.d.ts +2 -2
  96. package/dist/lib/components/ui/media/upload/network-upload-field/use-image-preview.d.ts +9 -1
  97. package/dist/lib/components/ui/primitives/icon/icon-context.d.ts +1 -1
  98. package/dist/lib/components/ui/primitives/tabs/Tabs.vue.d.ts +3 -0
  99. package/dist/lib/components/ui/primitives/tabs/index.d.ts +1 -0
  100. package/dist/lib/components/ui/primitives/tabs/tabs-variant.d.ts +9 -0
  101. package/dist/lib/components/ui/selection/autocomplete/autocomplete-form-field.vue.d.ts +31 -5
  102. package/dist/lib/components/ui/selection/autocomplete/autocomplete-items.d.ts +23 -0
  103. package/dist/lib/components/ui/selection/autocomplete/autocomplete.vue.d.ts +48 -13
  104. package/dist/lib/components/ui/selection/autocomplete/filter-options.d.ts +2 -1
  105. package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-box.vue.d.ts +13 -1
  106. package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-list.vue.d.ts +17 -3
  107. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-items.d.ts +15 -0
  108. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-open.d.ts +15 -0
  109. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-texts.d.ts +14 -0
  110. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +34 -0
  111. package/dist/lib/components/ui/selection/checkbox/Checkbox.vue.d.ts +21 -5
  112. package/dist/lib/components/ui/selection/checkbox/checkbox-form-field.vue.d.ts +17 -0
  113. package/dist/lib/components/ui/selection/checkbox/index.d.ts +2 -0
  114. package/dist/lib/components/ui/selection/index.d.ts +1 -0
  115. package/dist/lib/components/ui/selection/select-field/select-field.vue.d.ts +16 -1
  116. package/dist/lib/components/ui/selection/select-field/select-form-field.vue.d.ts +16 -2
  117. package/dist/lib/components/ui/selection/tree-select-field/index.d.ts +3 -0
  118. package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-panel.vue.d.ts +27 -0
  119. package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-trigger.vue.d.ts +28 -0
  120. package/dist/lib/components/ui/selection/tree-select-field/tree-select-field.vue.d.ts +8 -0
  121. package/dist/lib/components/ui/selection/tree-select-field/tree-select-form-field.vue.d.ts +8 -0
  122. package/dist/lib/components/ui/selection/tree-select-field/tree-select.utils.d.ts +29 -0
  123. package/dist/lib/components/ui/selection/tree-select-field/types.d.ts +28 -0
  124. package/dist/lib/components/ui/selection/tree-select-field/use-tree-select-field.d.ts +19 -0
  125. package/dist/lib/components/ui/widgets/charts/chart-container.vue.d.ts +1 -1
  126. package/dist/lib/components/ui/widgets/code-editor/code-editor-form-field.vue.d.ts +13 -0
  127. package/dist/lib/components/ui/widgets/code-editor/code-editor-options.d.ts +4 -1
  128. package/dist/lib/components/ui/widgets/code-editor/code-editor.vue.d.ts +7 -0
  129. package/dist/lib/components/ui/widgets/code-editor/index.d.ts +2 -0
  130. package/dist/lib/components/ui/widgets/code-editor/monaco-editor.vue.d.ts +3 -0
  131. package/dist/lib/i18n/resources/en/en.d.ts +40 -0
  132. package/dist/lib/i18n/resources/en/material.json.d.ts +43 -3
  133. package/dist/lib/i18n/resources/fr/fr.d.ts +40 -0
  134. package/dist/lib/i18n/resources/fr/material.json.d.ts +43 -3
  135. package/dist/lib/i18n/resources/resources.d.ts +80 -0
  136. package/dist/lib/i18n/translator.d.ts +1 -1
  137. package/dist/lib/nuxt/component-names.d.ts +1 -1
  138. package/dist/lib.js +2 -2
  139. package/dist/main.js +17 -17
  140. package/dist/map.js +4 -4
  141. package/dist/material-vue.css +1 -1
  142. package/dist/{pdf-outline-sidebar-oz9wdBhB.js → pdf-outline-sidebar-jJfhNjnN.js} +2 -2
  143. package/dist/{pdf-page-0rlq1Lo6.js → pdf-page-BW1hXzPu.js} +1 -1
  144. package/dist/{pdf-page-list-DfhjNHoI.js → pdf-page-list-D277RtWS.js} +2 -2
  145. package/dist/{pdf-reader-Dr8RVcs4.js → pdf-reader-BReUTsn_.js} +73 -71
  146. package/dist/{pdf-sidebar-VXPQbC_R.js → pdf-sidebar-Bk6PowY1.js} +3 -3
  147. package/dist/{pdf-thumbnail-sidebar-BpgXrVBj.js → pdf-thumbnail-sidebar-BcNDFsks.js} +3 -3
  148. package/dist/{pdf-toolbar-B6gRRcsv.js → pdf-toolbar-CHjaMhH9.js} +4 -4
  149. package/dist/pdf.js +2 -2
  150. package/dist/{sortable-provider-oEVjQiCl.js → sortable-provider-C83VBfGl.js} +2 -2
  151. package/dist/{stored-language-rjOMJkyX.js → stored-language-CC_vdcCN.js} +90 -6
  152. package/dist/{stx-player-DNADkQ31.js → stx-player-BMQ1D2Li.js} +20 -20
  153. package/dist/{translator-BCSJSO1-.js → translator-B-X_1taI.js} +1 -1
  154. package/dist/{use-heading-spy-d50_nxgR.js → use-heading-spy-C_ySuvTl.js} +1 -1
  155. package/dist/{use-material-translation-C5zPFhbk.js → use-material-translation-B6sIk0mF.js} +3 -3
  156. package/docs/components/README.md +2 -1
  157. package/docs/components/buttons-and-actions.md +19 -3
  158. package/docs/components/data-display.md +65 -11
  159. package/docs/components/data-table-filter-and-lists.md +94 -8
  160. package/docs/components/date-and-time.md +116 -9
  161. package/docs/components/feedback-and-status.md +57 -5
  162. package/docs/components/form-fields.md +21 -9
  163. package/docs/components/media-and-files.md +120 -6
  164. package/docs/components/navigation-and-layout.md +68 -7
  165. package/docs/components/primitives.md +25 -6
  166. package/docs/components/rich-widgets.md +21 -3
  167. package/docs/components/selection-and-choice.md +151 -22
  168. package/docs/guides/forms.md +16 -8
  169. package/docs/guides/i18n.md +50 -6
  170. package/docs/guides/ssr.md +2 -0
  171. package/docs/previews/buttons-actions-copybutton.webp +0 -0
  172. package/docs/previews/data-table-filter-lists-pagination.webp +0 -0
  173. package/docs/previews/date-time-daterangefield.webp +0 -0
  174. package/docs/previews/form-fields-slider.webp +0 -0
  175. package/docs/previews/media-files-filepreview.webp +0 -0
  176. package/docs/previews/navigation-layout-stepper.webp +0 -0
  177. package/docs/previews/selection-choice-checkbox.webp +0 -0
  178. package/docs/previews/selection-choice-treeselectfield.webp +0 -0
  179. package/docs/roadmap.md +47 -1
  180. package/docs/troubleshooting.md +213 -0
  181. package/lib/nuxt/component-names.ts +16 -0
  182. package/package.json +2 -2
@@ -23,6 +23,7 @@ words in your error.
23
23
  - [A `Toc`, `Pager`, `SeeAlso` or `ScrollProgress` inside `Doc` selected by `data-slot` stops matching](#a-toc-pager-seealso-or-scrollprogress-inside-doc-selected-by-data-slot-stops-matching)
24
24
  - [A `ResponsiveButton` selected by `[aria-expanded]` stops matching](#a-responsivebutton-selected-by-aria-expanded-stops-matching)
25
25
  - [A menu item selected by `[data-variant=destructive]` stops matching](#a-menu-item-selected-by-data-variantdestructive-stops-matching)
26
+ - [A `Stepper` step selected by `#step-N` stops matching](#a-stepper-step-selected-by-step-n-stops-matching)
26
27
  - [A test no longer finds a date or time picker by the `button` role, or a slider thumb by the exact name `Minimum`](#a-test-no-longer-finds-a-date-or-time-picker-by-the-button-role-or-a-slider-thumb-by-the-exact-name-minimum)
27
28
  - [An end-to-end test no longer finds a required field by a name ending in `*`](#an-end-to-end-test-no-longer-finds-a-required-field-by-a-name-ending-in-)
28
29
  - [A test no longer finds `aria-invalid` on an upload field's group or drop zone](#a-test-no-longer-finds-aria-invalid-on-an-upload-fields-group-or-drop-zone)
@@ -30,6 +31,7 @@ words in your error.
30
31
  - [A test no longer finds the breadcrumb's home button](#a-test-no-longer-finds-the-breadcrumbs-home-button)
31
32
  - [A `QRCode`'s `aria-label` is no longer on its wrapper](#a-qrcodes-aria-label-is-no-longer-on-its-wrapper)
32
33
  - [A `CheckboxGroup` or `RadioGroupField` option selected by `#<id>-<value>` stops matching](#a-checkboxgroup-or-radiogroupfield-option-selected-by-id-value-stops-matching)
34
+ - [A `Table`'s `id`, `aria-*` or `style` is no longer on its scrolling container](#a-tables-id-aria--or-style-is-no-longer-on-its-scrolling-container)
33
35
 
34
36
  **SSR & build**
35
37
 
@@ -47,6 +49,11 @@ words in your error.
47
49
  - [A `*FormField` is missing from the submitted values, or never shows an error](#a-formfield-is-missing-from-the-submitted-values-or-never-shows-an-error)
48
50
  - [`meta.touched` stays false after leaving a field](#metatouched-stays-false-after-leaving-a-field)
49
51
  - [A multi-step form reopens at a later step](#a-multi-step-form-reopens-at-a-later-step)
52
+ - [The form could not be loaded.](#the-form-could-not-be-loaded)
53
+
54
+ **TypeScript**
55
+
56
+ - [`does not satisfy the constraint 'abstract new (...args: any) => any'`](#does-not-satisfy-the-constraint-abstract-new-args-any--any)
50
57
 
51
58
  **Printing**
52
59
 
@@ -100,6 +107,7 @@ words in your error.
100
107
  - [A test no longer finds a pagination, breadcrumb or other built-in label by its English name](#a-test-no-longer-finds-a-pagination-breadcrumb-or-other-built-in-label-by-its-english-name)
101
108
  - [A test no longer finds a chip's remove button by the exact name `Remove`, or a `LocationPreview` by its place name](#a-test-no-longer-finds-a-chips-remove-button-by-the-exact-name-remove-or-a-locationpreview-by-its-place-name)
102
109
  - [A test no longer finds an icon badge by role `button`, or an `Icon` named "Icon {name}" inside a button](#a-test-no-longer-finds-an-icon-badge-by-role-button-or-an-icon-named-icon-name-inside-a-button)
110
+ - [A button named "Icon plus Add" is now named "Add"](#a-button-named-icon-plus-add-is-now-named-add)
103
111
  - [`An invalid form control with name='…' is not focusable` (an `UploadField`)](#an-invalid-form-control-with-name-is-not-focusable)
104
112
  - [An `id`, `aria-describedby` or `data-testid` on a `DateField`, `DateRangeField` or `TimeField` is nowhere in the page](#an-id-aria-describedby-or-data-testid-on-a-datefield-daterangefield-or-timefield-is-nowhere-in-the-page)
105
113
  - [A test no longer finds the label or helper text inside a date or time picker's trigger](#a-test-no-longer-finds-the-label-or-helper-text-inside-a-date-or-time-pickers-trigger)
@@ -133,6 +141,9 @@ words in your error.
133
141
  - [A PDF page shows sideways in `PdfReader`](#a-pdf-page-shows-sideways-in-pdfreader)
134
142
  - [The zoom changes by itself while a long PDF is open](#the-zoom-changes-by-itself-while-a-long-pdf-is-open)
135
143
  - [`@page-change` is not called when `initialPage` is past the end, or after a new file](#page-change-is-not-called-when-initialpage-is-past-the-end-or-after-a-new-file)
144
+ - [`@page-change` reports another page after opening on `initialPage`](#page-change-reports-another-page-after-opening-on-initialpage)
145
+ - [`FilePreview` shows a file card with a Download link for a PDF](#filepreview-shows-a-file-card-with-a-download-link-for-a-pdf)
146
+ - [`FilePreview` says "This file could not be previewed."](#filepreview-says-this-file-could-not-be-previewed)
136
147
  - [Reporting a bug](#reporting-a-bug)
137
148
 
138
149
  ---
@@ -401,6 +412,30 @@ menubar colour had no token, so Tailwind generated nothing).
401
412
  [data-slot='dropdown-menu-item'][data-variant='error'] { font-weight: 600; }
402
413
  ```
403
414
 
415
+ ### A `Stepper` step selected by `#step-N` stops matching
416
+
417
+ **When:** after upgrading to 0.24.0, a test or a stylesheet that targets a
418
+ step by its id — `#step-0`, `page.locator('#step-1')`,
419
+ `document.getElementById('step-2')` — finds nothing.
420
+ **Why:** every `Stepper` gave its steps the same ids, `step-0`, `step-1`, …,
421
+ so two steppers on one page produced duplicate ids, which is invalid HTML and
422
+ breaks any `aria-*` reference to them. Each id is now prefixed with one
423
+ unique to its stepper (Vue's `useId`). The steps are also an `<ol>` of `<li>`
424
+ now, and the current one carries `aria-current="step"`. A selector
425
+ written against the old markup, such as `div[data-slot="stepper-step"]`,
426
+ stops matching too, since a step is now an `li`: drop the tag
427
+ (`[data-slot="stepper-step"]`).
428
+ **Fix:** select by `data-pw`: `step-N`, or `<name>-step-N` when you passed
429
+ `name` — the same values as in `@nxgt/material`, now on each step here too:
430
+
431
+ ```ts
432
+ await page.locator('[data-pw="step-1"]').click();
433
+ // with <Stepper name="checkout" … />
434
+ await page.locator('[data-pw="checkout-step-1"]').click();
435
+ // or the current step
436
+ await expect(page.locator('[aria-current="step"]')).toContainText('Shipping');
437
+ ```
438
+
404
439
  ### A test no longer finds a date or time picker by the `button` role, or a slider thumb by the exact name `Minimum`
405
440
 
406
441
  **When:** after upgrading to 0.22.0, a spec such as
@@ -535,6 +570,36 @@ which a `group` may not carry: assert its description instead,
535
570
  hidden hint sits inside the helper element, so match its text with
536
571
  `getByText('Pick any.', { exact: false })` or the description with a RegExp.
537
572
 
573
+ ### A `Table`'s `id`, `aria-*` or `style` is no longer on its scrolling container
574
+
575
+ **When:** after upgrading to 0.24.0, either:
576
+
577
+ - a selector or listener aimed at the attributes you put on `<Table>` finds
578
+ nothing on `div[data-slot="table-container"]` (`#orders` matches the
579
+ `<table>` instead, `[data-testid]` / `[aria-label]` queries return the
580
+ table, a `@scroll` listener on `<Table>` never fires); or
581
+ - a `style` such as `max-height` on `<Table>` no longer limits the height,
582
+ and the table stops scrolling.
583
+
584
+ **Why:** `Table` passed every attribute but `class` to its scrolling
585
+ container. It now puts them on the `<table>`, as `@nxgt/material` does, so
586
+ `aria-busy`, `aria-label` or `id` describe the table itself. A
587
+ `max-height` on a `<table>` has no effect: the table grows instead of
588
+ scrolling.
589
+ **Fix:** select the container by its slot, or the table by role, and put a
590
+ height limit on a wrapper of your own:
591
+
592
+ ```vue
593
+ <div class="max-h-96 overflow-auto">
594
+ <Table aria-label="Orders">…</Table>
595
+ </div>
596
+ ```
597
+
598
+ ```ts
599
+ page.getByRole('table', { name: 'Orders' });
600
+ page.locator('[data-slot="table-container"]'); // the scrolling container
601
+ ```
602
+
538
603
  ### An end-to-end test no longer finds a required field by a name ending in `*`
539
604
 
540
605
  **When:** after upgrading to 0.22.0, `getByRole('textbox', { name: 'Email*' })`
@@ -909,6 +974,52 @@ In an SSR app the server renders step 0. A client hydrating that page renders
909
974
  step 0 too and resumes at the stored step once mounted, so hydration matches
910
975
  without `clientOnly`: see [forms](guides/forms.md#a-multi-step-form).
911
976
 
977
+ ### The form could not be loaded.
978
+
979
+ **When:** a `ConfirmationDialog` with `form-options` shows this line
980
+ ("Le formulaire n’a pas pu être chargé." in French,
981
+ `material.confirm-dialog.form-failed`) where its form should be, and its
982
+ confirm button stays disabled. The form's code is a separate chunk, loaded the
983
+ first time such a dialog renders it, and that load failed twice: the browser
984
+ was offline, or a deploy removed the chunk the page still names.
985
+ **Why:** each dialog tries the load once more after a failure, then gives up
986
+ and keeps that result: reopening the same dialog shows the message again
987
+ without a new attempt. A dialog rendered anew (another page, a remounted
988
+ component) tries again from the start.
989
+ **Fix:** reload the page — after a deploy, that fetches the new chunk names.
990
+ If it keeps happening, check that your server or CDN serves the chunk that holds
991
+ the dialog's form (its name usually starts with `form-scope`) with the rest of
992
+ the same build, and keeps the previous build's chunks for pages already open.
993
+
994
+ ## TypeScript
995
+
996
+ ### `does not satisfy the constraint 'abstract new (...args: any) => any'`
997
+
998
+ **When:** `vue-tsc` on code that types a template ref with
999
+ `InstanceType<typeof Autocomplete>` (or `AutocompleteFormField`,
1000
+ `ConfirmationDialog`, `FilesFormField`). The whole message reads:
1001
+
1002
+ ```text
1003
+ error TS2344: Type '<T extends AutocompleteOption = AutocompleteOption>(__VLS_props: …) => …' does not satisfy the constraint 'abstract new (...args: any) => any'.
1004
+ … provides no match for the signature 'new (...args: any): any'.
1005
+ ```
1006
+
1007
+ **Why:** these four components are generic (`<script setup generic>`): your
1008
+ option type, or your form schema, types their props and slots. A generic
1009
+ component's default export is a function, not a component constructor, so
1010
+ `InstanceType` has nothing to read.
1011
+ **Fix:** use `ComponentExposed` from `vue-component-type-helpers` (the helpers
1012
+ `vue-tsc` itself ships; add it as a dev dependency if your app does not list
1013
+ it):
1014
+
1015
+ ```ts
1016
+ import { useTemplateRef } from 'vue';
1017
+ import type { ComponentExposed } from 'vue-component-type-helpers';
1018
+ import { Autocomplete } from '@nxgt/material-vue/components';
1019
+
1020
+ const field = useTemplateRef<ComponentExposed<typeof Autocomplete>>('field');
1021
+ ```
1022
+
912
1023
  ## Printing
913
1024
 
914
1025
  ### The table header and the total row print blank
@@ -1486,6 +1597,26 @@ const filter = useFilterContext(); // fine: this component is below FilterProvid
1486
1597
  </template>
1487
1598
  ```
1488
1599
 
1600
+ For a documentation shell of your own (`DocNav`, `DocArticle`, `DocLink`
1601
+ without `<Doc>`), provide the state yourself in the component that renders
1602
+ the parts:
1603
+
1604
+ ```vue
1605
+ <script setup lang="ts">
1606
+ import { type DocNavItem, provideDoc, useDoc } from '@nxgt/material-vue/components';
1607
+
1608
+ const props = defineProps<{ items: DocNavItem[]; pathname: string }>();
1609
+ provideDoc(
1610
+ useDoc({
1611
+ items: props.items,
1612
+ get pathname() {
1613
+ return props.pathname;
1614
+ },
1615
+ }),
1616
+ );
1617
+ </script>
1618
+ ```
1619
+
1489
1620
  ### `Clipboard is not available`
1490
1621
 
1491
1622
  **When:** calling `copyToClipboard(value)` on a page served over plain `http`
@@ -1728,6 +1859,33 @@ await expect(page.getByRole('img', { name: 'Phone' })).toBeVisible();
1728
1859
  await page.getByRole('button', { name: 'Delete' }).click();
1729
1860
  ```
1730
1861
 
1862
+ ### A button named "Icon plus Add" is now named "Add"
1863
+
1864
+ **When:** after upgrading to 0.24.0, `getByRole('button', { name: 'Icon plus Add' })`
1865
+ (or any name that starts with "Icon {name}") finds nothing, or a
1866
+ `getByRole('img', { name: 'Icon plus' })` inside a `Button` that also has text.
1867
+ **Why:** an `Icon` is named "Icon {name}" by default, and a `Button` takes its
1868
+ name from its content, so a `Button` holding an `Icon` and the text "Add" was
1869
+ announced "Icon plus Add". A `Button` with text, an `aria-label` or an
1870
+ `aria-labelledby` now hides an `Icon` inside it (`aria-hidden="true"`), as a
1871
+ named `IconButton` already did. A `Button` holding only an `Icon` still reads
1872
+ it, since that is the only name it has; give it an `aria-label` instead. Text
1873
+ a component produces from its props (a translation component) is not seen:
1874
+ pass the button an `aria-label` then. Text inside an `aria-hidden` element
1875
+ (a decorative count, `<span aria-hidden="true">3</span>`) does not name the
1876
+ button either, so beside it the `Icon` stays named.
1877
+ **Fix:** select the button by its text:
1878
+
1879
+ ```ts
1880
+ await page.getByRole('button', { name: 'Add' }).click();
1881
+ ```
1882
+
1883
+ and name an icon-only button yourself:
1884
+
1885
+ ```vue
1886
+ <Button aria-label="Add"><Icon name="plus" /></Button>
1887
+ ```
1888
+
1731
1889
  ### `An invalid form control with name='…' is not focusable`
1732
1890
 
1733
1891
  **When:** submitting a form with an empty `required` `UploadField`, with
@@ -2275,6 +2433,61 @@ last page without reporting it; or `file` changes and the reader goes back to
2275
2433
  to itself. Since 0.22.0 both are reported, once.
2276
2434
  **Fix:** update `@nxgt/material-vue`. A page you kept in sync by hand can go.
2277
2435
 
2436
+ ### `@page-change` reports another page after opening on `initialPage`
2437
+
2438
+ **When:** the reader opens on `initialPage` and, without the user scrolling,
2439
+ `@page-change` reports another page, most often the last one, and the page field
2440
+ shows it. Seen on slow devices and busy machines, near the end of a
2441
+ document, with `@nxgt/material-vue` 0.24.0 and earlier.
2442
+ **Why:** after placing the opening page, the reader ignored scrolling for
2443
+ only 150 ms. When the placement scroll landed later (a late frame), it was
2444
+ read as the user's, and at the end of the pages that is the last page.
2445
+ **Fix:** update `@nxgt/material-vue`. The opening page now keeps the page number while
2446
+ the view stays on it; the user's own scroll, find in page or a screen
2447
+ reader moving the view still report the page they reach.
2448
+
2449
+ ### `FilePreview` shows a file card with a Download link for a PDF
2450
+
2451
+ **When:** a PDF given to `FilePreview` shows its name, size and a Download
2452
+ link instead of the reader.
2453
+ **Why:** `FilePreview` imports `PdfReader` the first time it previews a PDF,
2454
+ and falls back to the file card when that import fails: the viewer's chunk
2455
+ could not be fetched (a deploy replaced the chunks the open page was built
2456
+ with, or a network error), or the bundle has no `pdfjs-dist` — they are
2457
+ dependencies of `@nxgt/material-vue`, not optional peers, so this is a bundler
2458
+ configuration that left them out. Nothing is thrown; the next PDF previewed
2459
+ tries again.
2460
+ **Fix:** reload the page after a deploy; otherwise check that your bundler
2461
+ keeps `pdfjs-dist` and pdf.js's worker (see `PdfReader` in
2462
+ [Media & files](components/media-and-files.md#pdfreader)). The same file in a
2463
+ `PdfReader` of its own shows the underlying error. A PDF the reader loaded
2464
+ but cannot open (a corrupt or password-protected file, a URL that answers an
2465
+ error page) is different: the preview stays `ready` and `PdfReader` shows its
2466
+ own error inside it.
2467
+
2468
+ ### `FilePreview` says "This file could not be previewed."
2469
+
2470
+ **When:** a `FilePreview` given a URL, or a file it cannot show, renders that
2471
+ message (and `@error` receives the error).
2472
+ **Why:** a text, JSON, CSV or Markdown URL is fetched with `fetch`: an HTTP
2473
+ error is a `FilePreviewHttpError` with its `status`, and a cross-origin URL
2474
+ without CORS headers is a `TypeError: Failed to fetch`. An image, video or
2475
+ audio file the browser cannot decode (a corrupt file, a codec the browser
2476
+ lacks, a URL that answers an error page) fails in its own element. A URL
2477
+ that is not `http(s):`, relative, `blob:`, or a `data:` URL of an image,
2478
+ video, audio file, plain text, CSV, Markdown, JSON or PDF (`javascript:`,
2479
+ `data:text/html`, and also a `data:` URL of XML, TSV or YAML, though
2480
+ `FilePreview` would show those kinds from a `Blob`) is refused before
2481
+ anything is linked, loaded or fetched: the error is a
2482
+ `FilePreviewUnsafeUrlError`, "Refused to preview a URL with an unsafe scheme", and there is no
2483
+ Download link.
2484
+ **Fix:** serve the file with `Access-Control-Allow-Origin` for your page's
2485
+ origin, or fetch it yourself (with your credentials) and pass the `Blob`;
2486
+ pass `type` when the server answers `application/octet-stream` for a file
2487
+ whose URL has no extension; pass a refused URL's file as a `Blob`, or from
2488
+ an `https:` URL. A text file larger than `max-text-bytes` is not an error: its
2489
+ beginning is shown, with "Showing the first … of this file." below.
2490
+
2278
2491
  ---
2279
2492
 
2280
2493
  ## Reporting a bug
@@ -99,6 +99,7 @@ export const COMPONENT_NAMES = [
99
99
  'CheckCardField',
100
100
  'CheckCardFormField',
101
101
  'Checkbox',
102
+ 'CheckboxFormField',
102
103
  'CheckboxGroup',
103
104
  'CheckboxGroupFormField',
104
105
  'ChecklistCard',
@@ -107,6 +108,7 @@ export const COMPONENT_NAMES = [
107
108
  'CodeBlock',
108
109
  'CodeDiff',
109
110
  'CodeEditor',
111
+ 'CodeEditorFormField',
110
112
  'CodeGroup',
111
113
  'Collapsible',
112
114
  'CollapsibleContent',
@@ -146,6 +148,7 @@ export const COMPONENT_NAMES = [
146
148
  'ContextMenuSubTrigger',
147
149
  'ContextMenuTrigger',
148
150
  'CopyButton',
151
+ 'CopyValue',
149
152
  'CountBadge',
150
153
  'CountryField',
151
154
  'CountryFormField',
@@ -162,6 +165,7 @@ export const COMPONENT_NAMES = [
162
165
  'DateFormField',
163
166
  'DateRangeField',
164
167
  'DateRangeFormField',
168
+ 'DefaultDocLink',
165
169
  'DeltaListCard',
166
170
  'Description',
167
171
  'Dialog',
@@ -177,10 +181,14 @@ export const COMPONENT_NAMES = [
177
181
  'DndOverlay',
178
182
  'DndProvider',
179
183
  'Doc',
184
+ 'DocArticle',
180
185
  'DocChildCards',
181
186
  'DocCopyMarkdown',
187
+ 'DocCopyPage',
182
188
  'DocEmpty',
183
189
  'DocHeader',
190
+ 'DocLink',
191
+ 'DocNav',
184
192
  'DocPage',
185
193
  'DocPager',
186
194
  'DocProgress',
@@ -239,6 +247,8 @@ export const COMPONENT_NAMES = [
239
247
  'FileListFormField',
240
248
  'FileListS3Field',
241
249
  'FileListS3FormField',
250
+ 'FilePreview',
251
+ 'FilesFormField',
242
252
  'Filter',
243
253
  'FilterActions',
244
254
  'FilterChips',
@@ -280,6 +290,7 @@ export const COMPONENT_NAMES = [
280
290
  'ImageS3Field',
281
291
  'ImageS3FormField',
282
292
  'InlineEdit',
293
+ 'InlineEditFormField',
283
294
  'Input',
284
295
  'InputGroup',
285
296
  'InputGroupAddon',
@@ -328,6 +339,7 @@ export const COMPONENT_NAMES = [
328
339
  'MenubarSubContent',
329
340
  'MenubarSubTrigger',
330
341
  'MenubarTrigger',
342
+ 'MermaidDiagram',
331
343
  'MessageCard',
332
344
  'MiniGallery',
333
345
  'NativeSelect',
@@ -351,11 +363,13 @@ export const COMPONENT_NAMES = [
351
363
  'PaceCard',
352
364
  'Pager',
353
365
  'Pagination',
366
+ 'PaginationBar',
354
367
  'PaginationContent',
355
368
  'PaginationEllipsis',
356
369
  'PaginationFirst',
357
370
  'PaginationItem',
358
371
  'PaginationLast',
372
+ 'PaginationLink',
359
373
  'PaginationNext',
360
374
  'PaginationPrevious',
361
375
  'PaneLayout',
@@ -555,6 +569,8 @@ export const COMPONENT_NAMES = [
555
569
  'TransferListFormField',
556
570
  'Tree',
557
571
  'TreeItem',
572
+ 'TreeSelectField',
573
+ 'TreeSelectFormField',
558
574
  'TrendCard',
559
575
  'Typography',
560
576
  'UploadField',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material-vue",
3
- "version": "0.23.4",
3
+ "version": "0.25.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -118,7 +118,7 @@
118
118
  "docs:previews": "vitest run --project previews"
119
119
  },
120
120
  "dependencies": {
121
- "@nxgt/material-core": "^0.2.0",
121
+ "@nxgt/material-core": "^0.3.0",
122
122
  "@floating-ui/dom": "^1.8.0",
123
123
  "@fortawesome/fontawesome-common-types": "7.3.1",
124
124
  "@lucide/vue": "^1.45.0",