@nxgt/material 2.4.2 → 2.6.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 (210) hide show
  1. package/README.md +28 -21
  2. package/dist/{_Uint8Array-DEXn42kj.js → _Uint8Array-CDlDeQmw.js} +1 -1
  3. package/dist/_overRest-CWIWQwDJ.js +81 -0
  4. package/dist/{abnfDiagram-O67JEVCF-C7NxOWqd.js → abnfDiagram-O67JEVCF-Cl4ukf6a.js} +4 -4
  5. package/dist/{architectureDiagram-NJMV4G6O-BIvwyzEh.js → architectureDiagram-NJMV4G6O-WmFlBQF5.js} +7 -7
  6. package/dist/{client-only.utils-DhcBUmau.js → async-slice-Qoen0Mqm.js} +164 -93
  7. package/dist/{blockDiagram-BEXU5L5S-CzgMFdtn.js → blockDiagram-BEXU5L5S-_6EVgQ2-.js} +11 -11
  8. package/dist/{c4Diagram-YGBWAQC7-WgqlRIL5.js → c4Diagram-YGBWAQC7-D9xSt2QO.js} +8 -8
  9. package/dist/{channel-Ba8pEAWx.js → channel-Dg92Hoym.js} +1 -1
  10. package/dist/{chunk-3FUC2YCW-DnIzetwB.js → chunk-3FUC2YCW-CRQHl-Jx.js} +8 -8
  11. package/dist/{chunk-5DYCD2WN-Bqi3iL5i.js → chunk-5DYCD2WN-Cja1INgd.js} +3 -3
  12. package/dist/{chunk-6AEJRKK7-DDXoGWDs.js → chunk-6AEJRKK7-3YWRP4aV.js} +2 -2
  13. package/dist/{chunk-742MDFTN-nG_ROTnT.js → chunk-742MDFTN-Cs1qGiTK.js} +2 -2
  14. package/dist/{chunk-7INBJB4K-Dg64CbhT.js → chunk-7INBJB4K-BY5n77ka.js} +6 -6
  15. package/dist/{chunk-7M6MHVWA-CPdb6LVf.js → chunk-7M6MHVWA-DqXpf6CM.js} +9 -9
  16. package/dist/{chunk-7PRAP22T-DIiYRAce.js → chunk-7PRAP22T-_Av9vcXz.js} +1 -1
  17. package/dist/{chunk-GNY47TPC-CxWZwDbp.js → chunk-GNY47TPC-BgMsLbCS.js} +11 -11
  18. package/dist/{chunk-GTNCS2PH-CzDYTYNy.js → chunk-GTNCS2PH-BZ9WMD1v.js} +3 -3
  19. package/dist/{chunk-GWA4HPMP-CmsxMX3A.js → chunk-GWA4HPMP-Co-A6dtV.js} +3 -3
  20. package/dist/{chunk-MBY4JIJT-IA2XBafa.js → chunk-MBY4JIJT-C3RQP_Nk.js} +4 -4
  21. package/dist/{chunk-NETBCI7D-Cq92-0cA.js → chunk-NETBCI7D-CsyH43bj.js} +1 -1
  22. package/dist/{chunk-O7XYJQB3-C87zK8E5.js → chunk-O7XYJQB3-A66QSOPA.js} +1 -1
  23. package/dist/{chunk-UA2S7LBM-B0LGFGu3.js → chunk-UA2S7LBM-BNeHeMx9.js} +6 -6
  24. package/dist/{chunk-WEXAMYUT-C-QP0DFq.js → chunk-WEXAMYUT-CucJfehv.js} +2 -2
  25. package/dist/{chunk-XXDRQBXY-Bq4sFnO2.js → chunk-XXDRQBXY-FgXU14Bh.js} +1 -1
  26. package/dist/{chunk-Z7XXMR3K-vh8Pvgr_.js → chunk-Z7XXMR3K-CoCjTVVx.js} +8 -8
  27. package/dist/{chunk-ZIGJFQKS-HDJ6e6OJ.js → chunk-ZIGJFQKS-C3xUAXJq.js} +3 -3
  28. package/dist/{classDiagram-v2-NBCMYWYE-BSyQx7Df.js → classDiagram-v2-NBCMYWYE-j4vk04t-.js} +14 -14
  29. package/dist/{components-C3jpOwPw.js → components-C3wIUrWw.js} +26931 -25668
  30. package/dist/components.js +6 -6
  31. package/dist/{cose-bilkent-JH36ORCC-11-T1rfk.js → cose-bilkent-JH36ORCC-DRUT3qBb.js} +2 -2
  32. package/dist/{cynefinDiagram-VND7K2PF-1kHi2rGa.js → cynefinDiagram-VND7K2PF-B9HrdQW8.js} +4 -4
  33. package/dist/{dagre-6A5THRUB-BDk37t1_.js → dagre-6A5THRUB-DXq_YBNL.js} +572 -613
  34. package/dist/{diagram-22UHCM2B-BvH24G-C.js → diagram-22UHCM2B-He8NDldw.js} +15 -15
  35. package/dist/{diagram-3UASUU5V-DAKVPT0Q.js → diagram-3UASUU5V-CeILva4U.js} +7 -7
  36. package/dist/{diagram-ATOU4E4O-Clju_0RY.js → diagram-ATOU4E4O-CNY-8kl0.js} +3 -3
  37. package/dist/{diagram-CDSNMT55-w7kkJ6MU.js → diagram-CDSNMT55-C8Mk1smi.js} +5 -5
  38. package/dist/{diagram-MLGK6HIB-mUOtRVmm.js → diagram-MLGK6HIB-CpfeILwW.js} +4 -4
  39. package/dist/{diagram-MPIPVDR6-DEUw58dq.js → diagram-MPIPVDR6-Do7bUnTd.js} +4 -4
  40. package/dist/{dist-gYpAi-su.js → dist-C3YK_ean.js} +1 -1
  41. package/dist/{dist-CeHNxLJG.js → dist-CRbPtqwD.js} +1 -1
  42. package/dist/dnd.js +1 -1
  43. package/dist/{ebnfDiagram-ZINNZB2B-BYfatie5.js → ebnfDiagram-ZINNZB2B-1GewX9Zq.js} +4 -4
  44. package/dist/{elk-276RUBZZ-CtsHzWCy.js → elk-276RUBZZ-DFn4kTey.js} +13 -13
  45. package/dist/{erDiagram-OPXOYQCR-DTrqayuU.js → erDiagram-OPXOYQCR-BzVUcUwh.js} +14 -14
  46. package/dist/{field-blur-EUOqpHbF.js → field-blur-BlrE9fOD.js} +1109 -1083
  47. package/dist/flowDiagram-KWPJA3E3-B4pJCj2Q.js +17 -0
  48. package/dist/{ganttDiagram-FUAMR5RP-DxWSt8R4.js → ganttDiagram-FUAMR5RP-B4A4UFFi.js} +6 -6
  49. package/dist/{gitGraphDiagram-X574FWY7-DcGaPSwy.js → gitGraphDiagram-X574FWY7-80yOq8dE.js} +3 -3
  50. package/dist/{graphlib-BOTXrGOf.js → graphlib-CQ3hLS1N.js} +103 -139
  51. package/dist/hooks.js +2 -2
  52. package/dist/{i18n-provider-XTTU9ArK.js → i18n-provider-CbYD2KxP.js} +1 -1
  53. package/dist/i18n.js +6 -6
  54. package/dist/{icon-button-Dl9PDYCE.js → icon-button-BxySFfrr.js} +581 -581
  55. package/dist/{infoDiagram-VRGFBTTK-Cvj167dl.js → infoDiagram-VRGFBTTK-Cboh-B9n.js} +3 -3
  56. package/dist/isArrayLikeObject-5rnYwEK7.js +28 -0
  57. package/dist/isEmpty-DChvniYe.js +53 -0
  58. package/dist/{ishikawaDiagram-OU5B5YK6-ChBwjCfr.js → ishikawaDiagram-OU5B5YK6-DwTd1YxL.js} +4 -4
  59. package/dist/{journeyDiagram-ZHPQQLJL-BycdRLE6.js → journeyDiagram-ZHPQQLJL-C91SPPkY.js} +4 -4
  60. package/dist/{kanban-definition-PNTS6WVX-BRoa-Yp5.js → kanban-definition-PNTS6WVX-S8plI4wn.js} +10 -10
  61. package/dist/lib/components/ui/actions/button/button.compound-variants.d.ts +114 -0
  62. package/dist/lib/components/ui/actions/button/button.d.ts +4 -7
  63. package/dist/lib/components/ui/actions/button/button.variants.d.ts +7 -0
  64. package/dist/lib/components/ui/actions/button/has-text-content.d.ts +10 -0
  65. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
  66. package/dist/lib/components/ui/collections/data-table/data-table-context.d.ts +4 -0
  67. package/dist/lib/components/ui/collections/data-table/data-table-pagination.d.ts +3 -1
  68. package/dist/lib/components/ui/collections/data-table/data-table.d.ts +12 -2
  69. package/dist/lib/components/ui/collections/data-table/hooks.d.ts +13 -13
  70. package/dist/lib/components/ui/collections/data-table/partials/data-table-body.d.ts +9 -5
  71. package/dist/lib/components/ui/collections/data-table/partials/data-table-empty-row.d.ts +14 -0
  72. package/dist/lib/components/ui/collections/data-table/partials/data-table-skeleton-rows.d.ts +7 -0
  73. package/dist/lib/components/ui/collections/filter/filter-field-number-range.d.ts +15 -0
  74. package/dist/lib/components/ui/collections/pagination/index.d.ts +1 -1
  75. package/dist/lib/components/ui/collections/pagination/pagination.d.ts +9 -1
  76. package/dist/lib/components/ui/collections/tree/use-tree.d.ts +2 -0
  77. package/dist/lib/components/ui/dates/date-range-field/date-range-field-trigger.d.ts +1 -1
  78. package/dist/lib/components/ui/dates/date-range-field/date-range-field.d.ts +10 -1
  79. package/dist/lib/components/ui/dates/date-range-field/date-range-field.utils.d.ts +13 -0
  80. package/dist/lib/components/ui/dates/date-range-field/index.d.ts +1 -0
  81. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-field-content.d.ts +25 -0
  82. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-presets.d.ts +11 -0
  83. package/dist/lib/components/ui/dates/date-range-field/partials/date-range-times.d.ts +11 -0
  84. package/dist/lib/components/ui/dates/date-range-field/use-date-range-presets.d.ts +22 -0
  85. package/dist/lib/components/ui/dates/time-picker/time-picker-utils.d.ts +7 -0
  86. package/dist/lib/components/ui/display/chip/chip.d.ts +1 -1
  87. package/dist/lib/components/ui/feedback/toast/toast.d.ts +9 -4
  88. package/dist/lib/components/ui/fields/number-field/number-field.d.ts +3 -1
  89. package/dist/lib/components/ui/fields/otp-field/index.d.ts +1 -0
  90. package/dist/lib/components/ui/fields/otp-field/input-otp.d.ts +1 -1
  91. package/dist/lib/components/ui/fields/slider/slider-header.d.ts +19 -0
  92. package/dist/lib/components/ui/fields/slider/slider-readout.d.ts +5 -1
  93. package/dist/lib/components/ui/fields/slider/slider.d.ts +7 -0
  94. package/dist/lib/components/ui/fields/switch/switch.d.ts +7 -0
  95. package/dist/lib/components/ui/layout/stepper/stepper-step.d.ts +17 -0
  96. package/dist/lib/components/ui/media/camera/camera-content.d.ts +1 -2
  97. package/dist/lib/components/ui/media/camera/camera-context.d.ts +4 -0
  98. package/dist/lib/components/ui/media/camera/camera-provider.d.ts +2 -0
  99. package/dist/lib/components/ui/media/camera/camera.d.ts +6 -3
  100. package/dist/lib/components/ui/media/camera/capture-photo.d.ts +13 -0
  101. package/dist/lib/components/ui/media/camera/index.d.ts +9 -1
  102. package/dist/lib/components/ui/media/camera/state/camera.reducers.d.ts +1 -1
  103. package/dist/lib/components/ui/media/camera/state/camera.slice.d.ts +4 -9
  104. package/dist/lib/components/ui/media/camera/state/camera.store.d.ts +11 -5
  105. package/dist/lib/components/ui/media/camera/state/camera.thunks.d.ts +4 -4
  106. package/dist/lib/components/ui/media/camera/types.d.ts +19 -9
  107. package/dist/lib/components/ui/media/camera/use-camera.d.ts +5 -11
  108. package/dist/lib/components/ui/media/camera/utils/camera.utils.d.ts +0 -1
  109. package/dist/lib/components/ui/media/file-preview/file-preview-pdf.lazy.d.ts +9 -0
  110. package/dist/lib/components/ui/media/file-preview/file-preview.d.ts +12 -0
  111. package/dist/lib/components/ui/media/file-preview/index.d.ts +3 -0
  112. package/dist/lib/components/ui/media/file-preview/partials/file-preview-body.d.ts +9 -0
  113. package/dist/lib/components/ui/media/file-preview/partials/file-preview-card.d.ts +20 -0
  114. package/dist/lib/components/ui/media/file-preview/partials/file-preview-media.d.ts +11 -0
  115. package/dist/lib/components/ui/media/file-preview/partials/file-preview-pdf.d.ts +10 -0
  116. package/dist/lib/components/ui/media/file-preview/partials/file-preview-status.d.ts +17 -0
  117. package/dist/lib/components/ui/media/file-preview/partials/file-preview-text.d.ts +13 -0
  118. package/dist/lib/components/ui/media/file-preview/types.d.ts +23 -0
  119. package/dist/lib/components/ui/media/file-preview/use-file-preview.d.ts +22 -0
  120. package/dist/lib/components/ui/media/file-preview/use-text-preview.d.ts +15 -0
  121. package/dist/lib/components/ui/media/index.d.ts +2 -0
  122. package/dist/lib/components/ui/media/upload/network-upload-field/use-image-preview.d.ts +6 -0
  123. package/dist/lib/components/ui/overlays/dialog/dialog-outside.d.ts +5 -0
  124. package/dist/lib/components/ui/overlays/dialog/dialog-scroll-content.d.ts +9 -0
  125. package/dist/lib/components/ui/overlays/dialog/index.d.ts +1 -0
  126. package/dist/lib/components/ui/primitives/icon/icon-context.d.ts +1 -1
  127. package/dist/lib/components/ui/primitives/table/table.d.ts +6 -1
  128. package/dist/lib/components/ui/selection/index.d.ts +2 -0
  129. package/dist/lib/components/ui/selection/native-select/index.d.ts +1 -0
  130. package/dist/lib/components/ui/selection/native-select/native-select.d.ts +11 -0
  131. package/dist/lib/components/ui/selection/radio-group/radio-group.d.ts +8 -1
  132. package/dist/lib/components/ui/selection/tree-select-field/index.d.ts +2 -0
  133. package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-content.d.ts +13 -0
  134. package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-panel.d.ts +19 -0
  135. package/dist/lib/components/ui/selection/tree-select-field/partials/tree-select-trigger.d.ts +24 -0
  136. package/dist/lib/components/ui/selection/tree-select-field/tree-select-field.d.ts +9 -0
  137. package/dist/lib/components/ui/selection/tree-select-field/tree-select-form-field.d.ts +8 -0
  138. package/dist/lib/components/ui/selection/tree-select-field/tree-select.utils.d.ts +35 -0
  139. package/dist/lib/components/ui/selection/tree-select-field/types.d.ts +37 -0
  140. package/dist/lib/components/ui/selection/tree-select-field/use-tree-select-field.d.ts +20 -0
  141. package/dist/lib/i18n/resources/en/en.d.ts +40 -0
  142. package/dist/lib/i18n/resources/en/material.json.d.ts +43 -3
  143. package/dist/lib/i18n/resources/fr/fr.d.ts +40 -0
  144. package/dist/lib/i18n/resources/fr/material.json.d.ts +43 -3
  145. package/dist/lib/i18n/resources/resources.d.ts +80 -0
  146. package/dist/lib/i18n/translator.d.ts +1 -1
  147. package/dist/lib/lib/redux/status-slice.d.ts +1 -1
  148. package/dist/lib.js +295 -4
  149. package/dist/main.js +16 -16
  150. package/dist/map.js +5 -5
  151. package/dist/material.css +1 -1
  152. package/dist/merge-_Awk4ywA.js +156 -0
  153. package/dist/{mermaid.core-BGAQ3ZAZ.js → mermaid.core-DciYB1MV.js} +49 -49
  154. package/dist/{mindmap-definition-NLK3R4M7-HIqs4Eil.js → mindmap-definition-NLK3R4M7-Brf_2jIE.js} +13 -13
  155. package/dist/{pegDiagram-GJSIUBJH-Dcm3LCQX.js → pegDiagram-GJSIUBJH-CAO6aYvj.js} +4 -4
  156. package/dist/{pieDiagram-5QR66LMP-DQ6djEkW.js → pieDiagram-5QR66LMP-MPh-EWf-.js} +5 -5
  157. package/dist/print.js +2 -2
  158. package/dist/{quadrantDiagram-O4NWA36T-yUWorB72.js → quadrantDiagram-O4NWA36T-CwDeE9KB.js} +3 -3
  159. package/dist/{railroadDiagram-XR7U4H2S-CzOJlTUA.js → railroadDiagram-XR7U4H2S-DmKDXg8V.js} +4 -4
  160. package/dist/{requirementDiagram-PLB6GJNP-Cs5-8Nro.js → requirementDiagram-PLB6GJNP-CCP3YtvB.js} +13 -13
  161. package/dist/{sankeyDiagram-IPEJSGJF-CCqxyVoj.js → sankeyDiagram-IPEJSGJF-vgVchd2a.js} +3 -3
  162. package/dist/{sequenceDiagram-PO4LG4MO-DMLeIQ03.js → sequenceDiagram-PO4LG4MO-B2qb55A5.js} +5 -5
  163. package/dist/{sortable-provider-DuRzFvwe.js → sortable-provider-CzSnl6It.js} +17 -17
  164. package/dist/{src-CJ8DNrI1.js → src-C9kQSo6K.js} +1 -1
  165. package/dist/{stateDiagram-v2-GCMORJYK-D-8sLHg8.js → stateDiagram-v2-GCMORJYK-T-oIXh-8.js} +14 -14
  166. package/dist/{stored-language-BP90Ydtg.js → stored-language-DmUUhRb5.js} +90 -6
  167. package/dist/{swimlanes-2SLR337P-DM_lDm6v.js → swimlanes-2SLR337P-tW3_wBWO.js} +12 -12
  168. package/dist/swimlanesDiagram-TC7HE7FX-B1lWzHp1.js +28 -0
  169. package/dist/{timeline-definition-EJHVYXUP-D3Tz-JnK.js → timeline-definition-EJHVYXUP-SdA6wt2-.js} +5 -5
  170. package/dist/{translate-material-Ctzt0Y2N.js → translate-material-DuY12xca.js} +2 -2
  171. package/dist/{translator-Cfug7hC5.js → translator-CaIYjyFP.js} +1 -1
  172. package/dist/{use-heading-spy-DtVo2HBk.js → use-heading-spy-Crdz4OH5.js} +2 -2
  173. package/dist/{use-material-translation-CJswHOmK.js → use-material-translation-Od0QsFPA.js} +2 -2
  174. package/dist/{usecaseDiagram-POWQR4AR-Cxx8PDrr.js → usecaseDiagram-POWQR4AR-B3rBcR4E.js} +13 -13
  175. package/dist/{vennDiagram-UO4OBE2U-Aql8mhcy.js → vennDiagram-UO4OBE2U-CO0yFCI8.js} +4 -4
  176. package/dist/{wardleyDiagram-VNRHLVJA-tknlhG_t.js → wardleyDiagram-VNRHLVJA-QkwghAYo.js} +4 -4
  177. package/dist/{xychartDiagram-PMCCYNJV-CM0QlWD5.js → xychartDiagram-PMCCYNJV-stQWLgCx.js} +7 -7
  178. package/docs/components/README.md +2 -1
  179. package/docs/components/buttons-and-actions.md +8 -3
  180. package/docs/components/data-display.md +4 -4
  181. package/docs/components/data-table-filter-and-lists.md +100 -6
  182. package/docs/components/date-and-time.md +106 -6
  183. package/docs/components/feedback-and-status.md +4 -3
  184. package/docs/components/form-fields.md +55 -5
  185. package/docs/components/media-and-files.md +117 -8
  186. package/docs/components/navigation-and-layout.md +6 -1
  187. package/docs/components/overlays-and-menus.md +27 -2
  188. package/docs/components/primitives.md +34 -3
  189. package/docs/components/rich-widgets.md +1 -1
  190. package/docs/components/selection-and-choice.md +111 -8
  191. package/docs/guides/forms.md +2 -1
  192. package/docs/guides/i18n.md +58 -9
  193. package/docs/guides/ssr.md +3 -1
  194. package/docs/previews/date-time-daterangefield.webp +0 -0
  195. package/docs/previews/media-files-camera.webp +0 -0
  196. package/docs/previews/media-files-filepreview.webp +0 -0
  197. package/docs/previews/navigation-layout-stepper.webp +0 -0
  198. package/docs/previews/selection-choice-treeselectfield.webp +0 -0
  199. package/docs/roadmap.md +42 -3
  200. package/docs/troubleshooting.md +167 -0
  201. package/package.json +2 -2
  202. package/dist/flowDiagram-KWPJA3E3-B8Isvcc5.js +0 -17
  203. package/dist/isArrayLikeObject-CCJDO2RL.js +0 -86
  204. package/dist/lib/components/ui/fields/slider/slider-ticks.d.ts +0 -1
  205. package/dist/lib/components/ui/media/camera/camera.provider.d.ts +0 -6
  206. package/dist/lib/components/ui/media/camera/state/index.d.ts +0 -2
  207. package/dist/lib/components/ui/media/camera/utils/index.d.ts +0 -1
  208. package/dist/lib-DIj5dvbb.js +0 -367
  209. package/dist/merge-Dm-kHFxo.js +0 -172
  210. package/dist/swimlanesDiagram-TC7HE7FX-CbV1TsML.js +0 -28
@@ -77,6 +77,7 @@ words in your error.
77
77
  **Runtime**
78
78
 
79
79
  - [`must be used within` / `must be used inside` (context providers)](#must-be-used-within--must-be-used-inside)
80
+ - [`Camera components must be used inside <Camera>`](#camera-components-must-be-used-inside-camera)
80
81
  - [`Clipboard is not available`](#clipboard-is-not-available)
81
82
  - [`Upload failed with status 403`](#upload-failed-with-status-403)
82
83
  - [`Network error during upload`](#network-error-during-upload)
@@ -94,6 +95,7 @@ words in your error.
94
95
  - [A test no longer finds a chip's remove button by the exact name `Remove`](#a-test-no-longer-finds-a-chips-remove-button-by-the-exact-name-remove)
95
96
  - [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)
96
97
  - [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)
98
+ - [A button named "Icon plus Add" is now named "Add"](#a-button-named-icon-plus-add-is-now-named-add)
97
99
  - [`An invalid form control with name='…' is not focusable` (an `UploadField`)](#an-invalid-form-control-with-name-is-not-focusable)
98
100
  - [A `DateField` or `DateRangeField` with `disabled` still opens](#a-datefield-or-daterangefield-with-disabled-still-opens)
99
101
  - [An `id`, `aria-describedby` or `data-testid` on a `DateField`, `DateRangeField` or `TimeField` is not on the trigger](#an-id-aria-describedby-or-data-testid-on-a-datefield-daterangefield-or-timefield-is-not-on-the-trigger)
@@ -109,6 +111,7 @@ words in your error.
109
111
  - [`ConfirmDialog` buttons stay in English](#confirmdialog-buttons-stay-in-english)
110
112
  - [A `ConfirmationDialog` opened with `open` no longer closes](#a-confirmationdialog-opened-with-open-no-longer-closes)
111
113
  - [A menu item selected by `[data-variant=destructive]` stops matching](#a-menu-item-selected-by-data-variantdestructive-stops-matching)
114
+ - [A `Stepper` step selected by `#step-N` stops matching](#a-stepper-step-selected-by-step-n-stops-matching)
112
115
  - [Keys typed right after opening a dialog, sheet or drawer land inside it](#keys-typed-right-after-opening-a-dialog-sheet-or-drawer-land-inside-it)
113
116
 
114
117
  **PDF reader**
@@ -135,6 +138,9 @@ words in your error.
135
138
  - [The zoom changes by itself while a long PDF is open](#the-zoom-changes-by-itself-while-a-long-pdf-is-open)
136
139
  - [A link in a PDF replaces the page the reader is on](#a-link-in-a-pdf-replaces-the-page-the-reader-is-on)
137
140
  - [`onPageChange` is not called when `initialPage` is past the end, or after a new file](#onpagechange-is-not-called-when-initialpage-is-past-the-end-or-after-a-new-file)
141
+ - [`onPageChange` reports another page after opening on `initialPage`](#onpagechange-reports-another-page-after-opening-on-initialpage)
142
+ - [`FilePreview` shows a file card with a Download link for a PDF](#filepreview-shows-a-file-card-with-a-download-link-for-a-pdf)
143
+ - [`FilePreview` says "This file could not be previewed."](#filepreview-says-this-file-could-not-be-previewed)
138
144
  - [Reporting a bug](#reporting-a-bug)
139
145
 
140
146
  ---
@@ -1213,6 +1219,61 @@ function ActiveCount() {
1213
1219
  </FilterProvider>;
1214
1220
  ```
1215
1221
 
1222
+ ### `Camera components must be used inside <Camera>`
1223
+
1224
+ **When:** on render, from `useCamera()` or `useCameraContext()` called in a
1225
+ component of yours.
1226
+ **Why:** both read the context `Camera` provides to its own parts (the video,
1227
+ the capture button, the toggle). `Camera` renders those parts itself and takes
1228
+ no children, so no component of yours is ever below its provider: the hooks
1229
+ serve its internals, and throw anywhere else. A second copy of
1230
+ `@nxgt/material` gives the same message (see
1231
+ [Invalid hook call](#invalid-hook-call-hooks-can-only-be-called-inside-of-the-body-of-a-function-component)).
1232
+ **Fix:** render `<Camera />` as it is, or build your own webcam UI on the
1233
+ helpers, which need no provider:
1234
+
1235
+ ```tsx
1236
+ import { capturePhotoFromVideo, isCameraSupported } from '@nxgt/material/components';
1237
+ import { useEffect, useRef, useState } from 'react';
1238
+
1239
+ const SETTINGS = { resolution: { width: 1280, height: 720 }, quality: 0.9, format: 'jpeg' as const, mirror: false };
1240
+
1241
+ export function Snapshot() {
1242
+ const video = useRef<HTMLVideoElement>(null);
1243
+ const [photo, setPhoto] = useState<string | null>(null);
1244
+
1245
+ useEffect(() => {
1246
+ if (!isCameraSupported()) return;
1247
+ let stream: MediaStream | undefined;
1248
+ let cancelled = false;
1249
+ const stop = (s: MediaStream) => s.getTracks().forEach((track) => track.stop());
1250
+ navigator.mediaDevices.getUserMedia({ video: true }).then((s) => {
1251
+ // Unmounted before the permission prompt resolved: release the camera.
1252
+ if (cancelled) return stop(s);
1253
+ stream = s;
1254
+ if (video.current) video.current.srcObject = s;
1255
+ });
1256
+ return () => {
1257
+ cancelled = true;
1258
+ if (stream) stop(stream);
1259
+ };
1260
+ }, []);
1261
+
1262
+ const capture = () => {
1263
+ const result = capturePhotoFromVideo(video.current, { isStreaming: true, captureSettings: SETTINGS });
1264
+ if (result?.capturedImage) setPhoto(result.capturedImage);
1265
+ };
1266
+
1267
+ return (
1268
+ <>
1269
+ <video ref={video} autoPlay playsInline muted />
1270
+ <button type="button" onClick={capture}>Capture</button>
1271
+ {photo && <img src={photo} alt="Captured" />}
1272
+ </>
1273
+ );
1274
+ }
1275
+ ```
1276
+
1216
1277
  ### `Clipboard is not available`
1217
1278
 
1218
1279
  **When:** calling `copyToClipboard(value)` on a page served over plain `http`
@@ -1629,6 +1690,33 @@ If you passed an `IconButton` as `ConfirmationDialog`'s `icon`, pass the glyph
1629
1690
  alone and style the badge with `iconProps={{ variant, color }}`: the dialog
1630
1691
  already wraps it in a badge, and yours is now a button inside a `<span>`.
1631
1692
 
1693
+ ### A button named "Icon plus Add" is now named "Add"
1694
+
1695
+ **When:** after upgrading to 2.5.0, `getByRole('button', { name: 'Icon plus Add' })`
1696
+ (or any name that starts with "Icon {name}") finds nothing, or a
1697
+ `getByRole('img', { name: 'Icon plus' })` inside a `Button` that also has text.
1698
+ **Why:** an `Icon` is named "Icon {name}" by default, and a `Button` takes its
1699
+ name from its content, so a `Button` holding an `Icon` and the text "Add" was
1700
+ announced "Icon plus Add". A `Button` with text, an `aria-label` or an
1701
+ `aria-labelledby` now hides an `Icon` inside it (`aria-hidden="true"`), as a
1702
+ named `IconButton` already did. A `Button` holding only an `Icon` still reads
1703
+ it, since that is the only name it has; give it an `aria-label` instead. Text
1704
+ a component produces from its props (a translation component) is not seen:
1705
+ pass the button an `aria-label` then. Text inside an `aria-hidden` element
1706
+ (a decorative count, `<span aria-hidden="true">3</span>`) does not name the
1707
+ button either, so beside it the `Icon` stays named.
1708
+ **Fix:** select the button by its text:
1709
+
1710
+ ```ts
1711
+ await page.getByRole('button', { name: 'Add' }).click();
1712
+ ```
1713
+
1714
+ and name an icon-only button yourself:
1715
+
1716
+ ```tsx
1717
+ <Button aria-label="Add"><Icon name="plus" /></Button>
1718
+ ```
1719
+
1632
1720
  ### `An invalid form control with name='…' is not focusable`
1633
1721
 
1634
1722
  **When:** submitting a form with an empty `required` `UploadField`, before
@@ -1930,6 +2018,30 @@ render `data-variant="error"`, and both use the `error` colour.
1930
2018
  [data-slot='menubar-item'][data-variant='error'] { font-weight: 600; }
1931
2019
  ```
1932
2020
 
2021
+ ### A `Stepper` step selected by `#step-N` stops matching
2022
+
2023
+ **When:** after upgrading to 2.5.0, a test or a stylesheet that targets a
2024
+ step by its id — `#step-0`, `page.locator('#step-1')`,
2025
+ `document.getElementById('step-2')` — finds nothing.
2026
+ **Why:** every `Stepper` gave its steps the same ids, `step-0`, `step-1`, …,
2027
+ so two steppers on one page produced duplicate ids, which is invalid HTML and
2028
+ breaks any `aria-*` reference to them. Each id is now prefixed with one
2029
+ unique to its stepper (React's `useId`). The steps are also an `<ol>` of
2030
+ `<li>` now, and the current one carries `aria-current="step"`. A selector
2031
+ written against the old markup, such as `div[data-slot="stepper-step"]`,
2032
+ stops matching too, since a step is now an `li`: drop the tag
2033
+ (`[data-slot="stepper-step"]`).
2034
+ **Fix:** select by `data-pw`, which did not change — `step-N`, or
2035
+ `<name>-step-N` when you passed `name`:
2036
+
2037
+ ```ts
2038
+ await page.locator('[data-pw="step-1"]').click();
2039
+ // with <Stepper name="checkout" … />
2040
+ await page.locator('[data-pw="checkout-step-1"]').click();
2041
+ // or the current step
2042
+ await expect(page.locator('[aria-current="step"]')).toContainText('Shipping');
2043
+ ```
2044
+
1933
2045
  ### Keys typed right after opening a dialog, sheet or drawer land inside it
1934
2046
 
1935
2047
  **When:** after upgrading, a test (or code of yours) that opens a `Dialog`,
@@ -2321,6 +2433,61 @@ before 2.2.0.
2321
2433
  to itself. Since 2.2.0 both are reported, once.
2322
2434
  **Fix:** update `@nxgt/material`. A page you kept in sync by hand can go.
2323
2435
 
2436
+ ### `onPageChange` reports another page after opening on `initialPage`
2437
+
2438
+ **When:** the reader opens on `initialPage` and, without the user scrolling,
2439
+ `onPageChange` 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` 2.5.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`. 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 `react-pdf` and `pdfjs-dist` — they are
2457
+ dependencies of `@nxgt/material`, 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 `react-pdf` and `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 `onError` 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 `maxTextBytes` is not an error: its
2489
+ beginning is shown, with "Showing the first … of this file." below.
2490
+
2324
2491
  ---
2325
2492
 
2326
2493
  ## Reporting a bug
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "2.4.2",
3
+ "version": "2.6.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -113,7 +113,7 @@
113
113
  "docs:previews": "vitest run --project previews"
114
114
  },
115
115
  "dependencies": {
116
- "@nxgt/material-core": "^0.2.0",
116
+ "@nxgt/material-core": "^0.3.0",
117
117
  "@base-ui/react": "^1.6.0",
118
118
  "@dnd-kit/core": "^6.3.1",
119
119
  "@dnd-kit/sortable": "^10.0.0",
@@ -1,17 +0,0 @@
1
- import "./src-CJ8DNrI1.js";
2
- import "./chunk-ZIGJFQKS-HDJ6e6OJ.js";
3
- import "./chunk-O7XYJQB3-C87zK8E5.js";
4
- import "./chunk-742MDFTN-nG_ROTnT.js";
5
- import "./chunk-MBY4JIJT-IA2XBafa.js";
6
- import "./chunk-7PRAP22T-DIiYRAce.js";
7
- import "./chunk-7INBJB4K-Dg64CbhT.js";
8
- import "./chunk-5DYCD2WN-Bqi3iL5i.js";
9
- import "./chunk-Z7XXMR3K-vh8Pvgr_.js";
10
- import "./chunk-GWA4HPMP-CmsxMX3A.js";
11
- import "./chunk-XXDRQBXY-Bq4sFnO2.js";
12
- import "./chunk-WEXAMYUT-C-QP0DFq.js";
13
- import "./chunk-UA2S7LBM-B0LGFGu3.js";
14
- import "./chunk-GNY47TPC-CxWZwDbp.js";
15
- import "./chunk-LNGE3PJU-DJjGTS7O.js";
16
- import { n as e } from "./chunk-7M6MHVWA-CPdb6LVf.js";
17
- export { e as diagram };
@@ -1,86 +0,0 @@
1
- import { m as e, x as t } from "./translator-Cfug7hC5.js";
2
- import { d as n } from "./_Uint8Array-DEXn42kj.js";
3
- //#region ../../node_modules/lodash-es/identity.js
4
- function r(e) {
5
- return e;
6
- }
7
- //#endregion
8
- //#region ../../node_modules/lodash-es/_apply.js
9
- function i(e, t, n) {
10
- switch (n.length) {
11
- case 0: return e.call(t);
12
- case 1: return e.call(t, n[0]);
13
- case 2: return e.call(t, n[0], n[1]);
14
- case 3: return e.call(t, n[0], n[1], n[2]);
15
- }
16
- return e.apply(t, n);
17
- }
18
- //#endregion
19
- //#region ../../node_modules/lodash-es/_shortOut.js
20
- var a = 800, o = 16, s = Date.now;
21
- function c(e) {
22
- var t = 0, n = 0;
23
- return function() {
24
- var r = s(), i = o - (r - n);
25
- if (n = r, i > 0) {
26
- if (++t >= a) return arguments[0];
27
- } else t = 0;
28
- return e.apply(void 0, arguments);
29
- };
30
- }
31
- //#endregion
32
- //#region ../../node_modules/lodash-es/constant.js
33
- function l(e) {
34
- return function() {
35
- return e;
36
- };
37
- }
38
- //#endregion
39
- //#region ../../node_modules/lodash-es/_defineProperty.js
40
- var u = function() {
41
- try {
42
- var t = e(Object, "defineProperty");
43
- return t({}, "", {}), t;
44
- } catch {}
45
- }(), d = c(u ? function(e, t) {
46
- return u(e, "toString", {
47
- configurable: !0,
48
- enumerable: !1,
49
- value: l(t),
50
- writable: !0
51
- });
52
- } : r), f = Math.max;
53
- function p(e, t, n) {
54
- return t = f(t === void 0 ? e.length - 1 : t, 0), function() {
55
- for (var r = arguments, a = -1, o = f(r.length - t, 0), s = Array(o); ++a < o;) s[a] = r[t + a];
56
- a = -1;
57
- for (var c = Array(t + 1); ++a < t;) c[a] = r[a];
58
- return c[t] = n(s), i(e, this, c);
59
- };
60
- }
61
- //#endregion
62
- //#region ../../node_modules/lodash-es/_baseRest.js
63
- function m(e, t) {
64
- return d(p(e, t, r), e + "");
65
- }
66
- //#endregion
67
- //#region ../../node_modules/lodash-es/_createBaseFor.js
68
- function h(e) {
69
- return function(t, n, r) {
70
- for (var i = -1, a = Object(t), o = r(t), s = o.length; s--;) {
71
- var c = o[e ? s : ++i];
72
- if (n(a[c], c, a) === !1) break;
73
- }
74
- return t;
75
- };
76
- }
77
- //#endregion
78
- //#region ../../node_modules/lodash-es/_baseFor.js
79
- var g = h();
80
- //#endregion
81
- //#region ../../node_modules/lodash-es/isArrayLikeObject.js
82
- function _(e) {
83
- return t(e) && n(e);
84
- }
85
- //#endregion
86
- export { d as a, r as c, p as i, g as n, u as o, m as r, l as s, _ as t };
@@ -1 +0,0 @@
1
- export declare function tickValues(min: number, max: number, ticks: boolean | number, step?: number): number[];
@@ -1,6 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { CameraContextValue } from './types';
3
- export declare const CameraContext: import('react').Context<CameraContextValue>;
4
- type CameraProviderProps = PropsWithChildren;
5
- export declare function CameraProvider({ children }: CameraProviderProps): import("react").JSX.Element;
6
- export {};
@@ -1,2 +0,0 @@
1
- export * from './camera.slice';
2
- export * from './camera.store';
@@ -1 +0,0 @@
1
- export * from './camera.utils';