@nxgt/material 2.7.1 → 2.8.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/CHANGELOG.md +174 -0
  2. package/README.md +7 -4
  3. package/dist/{_Uint8Array-JRUmWcRr.js → _Uint8Array-CALbCR7W.js} +1 -1
  4. package/dist/{_overRest-DvC5rm5s.js → _overRest-BQ8agsDH.js} +1 -1
  5. package/dist/{abnfDiagram-O67JEVCF-Cl4ukf6a.js → abnfDiagram-O67JEVCF-D-rmT4BY.js} +4 -4
  6. package/dist/{architectureDiagram-NJMV4G6O-WmFlBQF5.js → architectureDiagram-NJMV4G6O-DOc_c_T9.js} +7 -7
  7. package/dist/{async-slice-OftEOtMA.js → async-slice-BHMdvnqm.js} +2 -2
  8. package/dist/{blockDiagram-BEXU5L5S-BM-gkWAO.js → blockDiagram-BEXU5L5S-D4gI6nqs.js} +11 -11
  9. package/dist/{c4Diagram-YGBWAQC7-D9xSt2QO.js → c4Diagram-YGBWAQC7-El4SkIzX.js} +8 -8
  10. package/dist/{channel-Dg92Hoym.js → channel-CnLB6790.js} +1 -1
  11. package/dist/{chunk-3FUC2YCW-Cf18L00V.js → chunk-3FUC2YCW-BLMCnCFE.js} +8 -8
  12. package/dist/{chunk-5DYCD2WN-Cja1INgd.js → chunk-5DYCD2WN-Cd1zazNp.js} +3 -3
  13. package/dist/{chunk-6AEJRKK7-3YWRP4aV.js → chunk-6AEJRKK7-BLBlw8ui.js} +2 -2
  14. package/dist/{chunk-742MDFTN-Cs1qGiTK.js → chunk-742MDFTN-CsUjFyzK.js} +2 -2
  15. package/dist/{chunk-7INBJB4K-BY5n77ka.js → chunk-7INBJB4K-k-I67NSP.js} +6 -6
  16. package/dist/{chunk-7M6MHVWA-C3x6E3yT.js → chunk-7M6MHVWA-CUtKEeuL.js} +9 -9
  17. package/dist/{chunk-7PRAP22T-_Av9vcXz.js → chunk-7PRAP22T-0C6_H8Li.js} +1 -1
  18. package/dist/{chunk-GNY47TPC-D1E6DHDV.js → chunk-GNY47TPC-CB_83G7J.js} +11 -11
  19. package/dist/{chunk-GTNCS2PH-BZ9WMD1v.js → chunk-GTNCS2PH-AJi9PVT7.js} +3 -3
  20. package/dist/{chunk-GWA4HPMP-Co-A6dtV.js → chunk-GWA4HPMP-B8jXI0Tl.js} +3 -3
  21. package/dist/{chunk-MBY4JIJT-C3RQP_Nk.js → chunk-MBY4JIJT-BFIqOe-8.js} +4 -4
  22. package/dist/{chunk-NETBCI7D-DJUuN4EY.js → chunk-NETBCI7D-Cywmx0rz.js} +1 -1
  23. package/dist/{chunk-O7XYJQB3-A66QSOPA.js → chunk-O7XYJQB3-BChweQ_V.js} +1 -1
  24. package/dist/{chunk-UA2S7LBM-BNeHeMx9.js → chunk-UA2S7LBM-ChuksCDg.js} +6 -6
  25. package/dist/{chunk-WEXAMYUT-CucJfehv.js → chunk-WEXAMYUT-CbFOhEve.js} +2 -2
  26. package/dist/{chunk-XXDRQBXY-FgXU14Bh.js → chunk-XXDRQBXY-dKXxu_aj.js} +1 -1
  27. package/dist/{chunk-Z7XXMR3K-DMTBxZxM.js → chunk-Z7XXMR3K-Ccb3Rfjl.js} +8 -8
  28. package/dist/{chunk-ZIGJFQKS-C3xUAXJq.js → chunk-ZIGJFQKS-9VXArDKF.js} +3 -3
  29. package/dist/{classDiagram-v2-NBCMYWYE-BDaxYvDy.js → classDiagram-v2-NBCMYWYE-CRgxPgLD.js} +14 -14
  30. package/dist/clsx-CbxlCXZ3.js +16 -0
  31. package/dist/components/base-content.css +139 -0
  32. package/dist/components/base.css +150 -0
  33. package/dist/components/components.css +2 -0
  34. package/dist/components/reduced-motion.css +56 -0
  35. package/dist/components/theme-tokens.css +116 -0
  36. package/dist/components/ui/actions/button-group/button-group.css +1 -1
  37. package/dist/components/ui/feedback/toast/toast.css +21 -0
  38. package/dist/components/ui/primitives/label/label.css +33 -0
  39. package/dist/{components-DrStgM4J.js → components-Bg1bqGbc.js} +34666 -34274
  40. package/dist/components.js +6 -6
  41. package/dist/{cose-bilkent-JH36ORCC-DRUT3qBb.js → cose-bilkent-JH36ORCC-P94vkHv_.js} +2 -2
  42. package/dist/{cynefinDiagram-VND7K2PF-B9HrdQW8.js → cynefinDiagram-VND7K2PF-EIpXbLXm.js} +4 -4
  43. package/dist/{dagre-6A5THRUB-DZF0nICj.js → dagre-6A5THRUB-c8yG3_vh.js} +20 -20
  44. package/dist/{diagram-22UHCM2B-CVZYpeev.js → diagram-22UHCM2B-C3Xcfy6D.js} +15 -15
  45. package/dist/{diagram-3UASUU5V-D7MmBJbM.js → diagram-3UASUU5V-maEO61Bh.js} +7 -7
  46. package/dist/{diagram-ATOU4E4O-CNY-8kl0.js → diagram-ATOU4E4O-isL7nwg2.js} +3 -3
  47. package/dist/{diagram-CDSNMT55-C8Mk1smi.js → diagram-CDSNMT55-Bnhlo5at.js} +5 -5
  48. package/dist/{diagram-MLGK6HIB-CpfeILwW.js → diagram-MLGK6HIB-DvBcyz8v.js} +4 -4
  49. package/dist/{diagram-MPIPVDR6-Do7bUnTd.js → diagram-MPIPVDR6-iTevwmNE.js} +4 -4
  50. package/dist/{dist-C3YK_ean.js → dist-B6_-RPZ3.js} +1 -1
  51. package/dist/{dist-CRbPtqwD.js → dist-BvUQHUs_.js} +4 -4
  52. package/dist/dnd.js +1 -1
  53. package/dist/{ebnfDiagram-ZINNZB2B-1GewX9Zq.js → ebnfDiagram-ZINNZB2B-RVuQIpm0.js} +4 -4
  54. package/dist/{elk-276RUBZZ-DI4eicFj.js → elk-276RUBZZ-BoWoJr6K.js} +26 -26
  55. package/dist/{erDiagram-OPXOYQCR-CUbpVns3.js → erDiagram-OPXOYQCR-CVvgZCSJ.js} +14 -14
  56. package/dist/field-blur-Bwa48QBk.js +3637 -0
  57. package/dist/flowDiagram-KWPJA3E3-RdU0csul.js +17 -0
  58. package/dist/{ganttDiagram-FUAMR5RP-D3vmspam.js → ganttDiagram-FUAMR5RP-DPLDPJtJ.js} +6 -6
  59. package/dist/{gitGraphDiagram-X574FWY7-80yOq8dE.js → gitGraphDiagram-X574FWY7-DerJL1Q-.js} +3 -3
  60. package/dist/{graphlib-DLJn7qS3.js → graphlib-DHgEBs83.js} +6 -6
  61. package/dist/hooks.js +3 -3
  62. package/dist/{i18n-provider-DBFRz5uH.js → i18n-provider-CA8YAlje.js} +1 -1
  63. package/dist/i18n.js +6 -6
  64. package/dist/icon-button-G9zdQ3Ix.js +2753 -0
  65. package/dist/{infoDiagram-VRGFBTTK-Cboh-B9n.js → infoDiagram-VRGFBTTK-CtVsLyCQ.js} +3 -3
  66. package/dist/{isArrayLikeObject-CO5xeuaJ.js → isArrayLikeObject-BSfDsA7T.js} +3 -3
  67. package/dist/{isEmpty-DOC38Ces.js → isEmpty-BEe-nNXw.js} +3 -3
  68. package/dist/{ishikawaDiagram-OU5B5YK6-DwTd1YxL.js → ishikawaDiagram-OU5B5YK6-D1n8vp8C.js} +4 -4
  69. package/dist/{journeyDiagram-ZHPQQLJL-Dxvl3oeN.js → journeyDiagram-ZHPQQLJL-CTGnr-JY.js} +4 -4
  70. package/dist/{kanban-definition-PNTS6WVX-S8plI4wn.js → kanban-definition-PNTS6WVX-D1-Owjil.js} +10 -10
  71. package/dist/lib/components/ui/actions/button/busy-click-capture.d.ts +11 -0
  72. package/dist/lib/components/ui/actions/button/button-tones.d.ts +36 -0
  73. package/dist/lib/components/ui/actions/button/button.d.ts +19 -0
  74. package/dist/lib/components/ui/actions/button/button.wrap.d.ts +8 -0
  75. package/dist/lib/components/ui/actions/button/label-text.d.ts +10 -0
  76. package/dist/lib/components/ui/actions/button/use-click-lock.d.ts +18 -0
  77. package/dist/lib/components/ui/actions/copy-button/copy-button.d.ts +5 -1
  78. package/dist/lib/components/ui/actions/icon-button/icon-button.compound-variants.d.ts +114 -0
  79. package/dist/lib/components/ui/collections/data-table/hooks.d.ts +13 -13
  80. package/dist/lib/components/ui/collections/data-table/partials/data-table-empty-row.d.ts +5 -1
  81. package/dist/lib/components/ui/collections/data-table/partials/data-table-scroll-region.d.ts +16 -0
  82. package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +24 -0
  83. package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +10 -0
  84. package/dist/lib/components/ui/collections/data-table/types.d.ts +9 -0
  85. package/dist/lib/components/ui/collections/data-table/use-data-table.d.ts +12 -1
  86. package/dist/lib/components/ui/collections/data-table/use-scroll-edges.d.ts +22 -0
  87. package/dist/lib/components/ui/dates/calendar/calendar-day.d.ts +8 -0
  88. package/dist/lib/components/ui/dates/calendar/calendar.d.ts +3 -3
  89. package/dist/lib/components/ui/dates/calendar/calendar.utils.d.ts +8 -0
  90. package/dist/lib/components/ui/dates/calendar/use-calendar-labels.d.ts +22 -0
  91. package/dist/lib/components/ui/display/description/description.d.ts +2 -1
  92. package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +9 -1
  93. package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +11 -0
  94. package/dist/lib/components/ui/display/list-tile/partials/list-tile-classes.d.ts +10 -0
  95. package/dist/lib/components/ui/feedback/alert-dialog/alert-dialog.d.ts +1 -1
  96. package/dist/lib/components/ui/feedback/toast/partials/toast-actions.d.ts +3 -0
  97. package/dist/lib/components/ui/feedback/toast/toast.d.ts +27 -3
  98. package/dist/lib/components/ui/feedback/toast/toaster.d.ts +19 -0
  99. package/dist/lib/components/ui/feedback/toast/toasts.d.ts +3 -0
  100. package/dist/lib/components/ui/forms/field-blur.d.ts +7 -2
  101. package/dist/lib/components/ui/forms/use-field-blur.d.ts +8 -1
  102. package/dist/lib/components/ui/layout/app-shell/activity-content.d.ts +10 -1
  103. package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +26 -2
  104. package/dist/lib/components/ui/layout/app-shell/app-header.d.ts +8 -2
  105. package/dist/lib/components/ui/layout/app-shell/app-sidebar.d.ts +8 -2
  106. package/dist/lib/components/ui/layout/app-shell/types.d.ts +3 -0
  107. package/dist/lib/components/ui/layout/app-shell/use-content-scroll.d.ts +10 -0
  108. package/dist/lib/components/ui/layout/app-shell/use-navigation-sheet.d.ts +19 -0
  109. package/dist/lib/components/ui/layout/sidebar/index.d.ts +5 -0
  110. package/dist/lib/components/ui/layout/sidebar/sidebar-content.d.ts +2 -0
  111. package/dist/lib/components/ui/layout/sidebar/sidebar-context.d.ts +7 -0
  112. package/dist/lib/components/ui/layout/sidebar/sidebar-footer.d.ts +2 -0
  113. package/dist/lib/components/ui/layout/sidebar/sidebar-header.d.ts +2 -0
  114. package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item-tooltip.d.ts +7 -0
  115. package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item.d.ts +31 -0
  116. package/dist/lib/components/ui/layout/sidebar/sidebar-menu-label.d.ts +4 -0
  117. package/dist/lib/components/ui/layout/sidebar/sidebar.d.ts +1 -12
  118. package/dist/lib/components/ui/overlays/context-menu/context-menu-items.d.ts +10 -0
  119. package/dist/lib/components/ui/overlays/context-menu/context-menu-sub.d.ts +8 -0
  120. package/dist/lib/components/ui/overlays/context-menu/context-menu.d.ts +4 -14
  121. package/dist/lib/components/ui/overlays/dialog/dialog-outside.d.ts +6 -0
  122. package/dist/lib/components/ui/overlays/dialog/dialog-scroll-content.d.ts +1 -1
  123. package/dist/lib/components/ui/overlays/dialog/dialog.d.ts +1 -1
  124. package/dist/lib/components/ui/overlays/dialog/use-return-focus.d.ts +3 -2
  125. package/dist/lib/components/ui/overlays/drawer/drawer.d.ts +1 -1
  126. package/dist/lib/components/ui/overlays/dropdown-menu/dropdown-menu-items.d.ts +11 -0
  127. package/dist/lib/components/ui/overlays/dropdown-menu/dropdown-menu-sub.d.ts +8 -0
  128. package/dist/lib/components/ui/overlays/dropdown-menu/dropdown-menu.d.ts +6 -21
  129. package/dist/lib/components/ui/overlays/popover/popover.d.ts +1 -1
  130. package/dist/lib/components/ui/overlays/sheet/sheet.d.ts +1 -1
  131. package/dist/lib/components/ui/primitives/card/card.d.ts +10 -1
  132. package/dist/lib/components/ui/primitives/link/link-component.d.ts +14 -0
  133. package/dist/lib/components/ui/selection/select/select.d.ts +1 -1
  134. package/dist/lib/components/ui/selection/select-chip-field/select-chip-field.d.ts +1 -1
  135. package/dist/lib/i18n/resources/en/en.d.ts +9 -0
  136. package/dist/lib/i18n/resources/en/material.json.d.ts +13 -4
  137. package/dist/lib/i18n/resources/fr/fr.d.ts +9 -0
  138. package/dist/lib/i18n/resources/fr/material.json.d.ts +13 -4
  139. package/dist/lib/i18n/resources/resources.d.ts +18 -0
  140. package/dist/lib/i18n/translator.d.ts +1 -1
  141. package/dist/lib/lib/redux/status-slice.d.ts +1 -1
  142. package/dist/lib.js +39 -55
  143. package/dist/main.js +13 -13
  144. package/dist/map.js +35 -35
  145. package/dist/material.css +1 -1
  146. package/dist/{merge-CuDTNgpm.js → merge-CRXQ4NSv.js} +4 -4
  147. package/dist/{mermaid.core-O7mtb1-p.js → mermaid.core-C_JPRVNa.js} +49 -49
  148. package/dist/{mindmap-definition-NLK3R4M7-CO0E97EZ.js → mindmap-definition-NLK3R4M7-OTZIWZah.js} +13 -13
  149. package/dist/{pegDiagram-GJSIUBJH-CAO6aYvj.js → pegDiagram-GJSIUBJH-CWKobqLl.js} +4 -4
  150. package/dist/{pieDiagram-5QR66LMP-BXxVfv5K.js → pieDiagram-5QR66LMP-BpmwlCYh.js} +5 -5
  151. package/dist/print.js +2 -2
  152. package/dist/{quadrantDiagram-O4NWA36T-BbidZDM8.js → quadrantDiagram-O4NWA36T-CIFt4MgA.js} +3 -3
  153. package/dist/{railroadDiagram-XR7U4H2S-DmKDXg8V.js → railroadDiagram-XR7U4H2S-fsZ7oqPG.js} +4 -4
  154. package/dist/{requirementDiagram-PLB6GJNP-wFvgSWJP.js → requirementDiagram-PLB6GJNP-BJaiDsKj.js} +13 -13
  155. package/dist/rolldown-runtime-BFFgcFxR.js +30 -0
  156. package/dist/{sankeyDiagram-IPEJSGJF-Cka5t09q.js → sankeyDiagram-IPEJSGJF-XDAIB5as.js} +3 -3
  157. package/dist/{sequenceDiagram-PO4LG4MO-B2qb55A5.js → sequenceDiagram-PO4LG4MO-Bgx1kuGA.js} +5 -5
  158. package/dist/{sortable-provider-C5VYhY8u.js → sortable-provider-MCgOzfRp.js} +24 -24
  159. package/dist/{src-C9kQSo6K.js → src-CsLQInsN.js} +1 -1
  160. package/dist/{stateDiagram-v2-GCMORJYK-EMa7q3ju.js → stateDiagram-v2-GCMORJYK-CGo16q99.js} +14 -14
  161. package/dist/{stored-language-B0o4cBh8.js → stored-language-Cz89IYZX.js} +26 -8
  162. package/dist/styles.css +10 -368
  163. package/dist/{swimlanes-2SLR337P-BtZ7Di5u.js → swimlanes-2SLR337P-DXZt0zyd.js} +12 -12
  164. package/dist/swimlanesDiagram-TC7HE7FX-Cno6MSMH.js +28 -0
  165. package/dist/{timeline-definition-EJHVYXUP-2Z6UABw8.js → timeline-definition-EJHVYXUP-CbPIZcT7.js} +5 -5
  166. package/dist/{translate-material-BCwQrt2G.js → translate-material-Caxsy0bp.js} +2 -2
  167. package/dist/{translator-CwpmpI24.js → translator-B85Q_O55.js} +1 -1
  168. package/dist/{use-heading-spy-BtBJiU63.js → use-heading-spy-C4yWEr5c.js} +37 -37
  169. package/dist/{use-material-translation-DG_7z3Q7.js → use-material-translation-Cm3Ej3bT.js} +2 -2
  170. package/dist/{usecaseDiagram-POWQR4AR-DT56cp_B.js → usecaseDiagram-POWQR4AR-D_gyFA3m.js} +13 -13
  171. package/dist/{utils-UBn-46YY.js → utils-DC8bw9A_.js} +346 -360
  172. package/dist/{vennDiagram-UO4OBE2U-CO0yFCI8.js → vennDiagram-UO4OBE2U-BpgP__1T.js} +4 -4
  173. package/dist/{wardleyDiagram-VNRHLVJA-QkwghAYo.js → wardleyDiagram-VNRHLVJA-CYqKMb2f.js} +4 -4
  174. package/dist/{xychartDiagram-PMCCYNJV-B2aZlrno.js → xychartDiagram-PMCCYNJV-W-fXV6iN.js} +7 -7
  175. package/docs/components/buttons-and-actions.md +60 -10
  176. package/docs/components/data-display.md +23 -1
  177. package/docs/components/data-table-filter-and-lists.md +88 -10
  178. package/docs/components/date-and-time.md +24 -0
  179. package/docs/components/feedback-and-status.md +85 -8
  180. package/docs/components/form-fields.md +14 -5
  181. package/docs/components/media-and-files.md +7 -0
  182. package/docs/components/navigation-and-layout.md +21 -3
  183. package/docs/components/overlays-and-menus.md +21 -6
  184. package/docs/components/primitives.md +16 -2
  185. package/docs/components/selection-and-choice.md +13 -2
  186. package/docs/getting-started.md +4 -2
  187. package/docs/guides/app-shell.md +97 -4
  188. package/docs/guides/forms.md +54 -5
  189. package/docs/guides/helpers.md +2 -2
  190. package/docs/guides/i18n.md +5 -2
  191. package/docs/guides/ssr.md +1 -1
  192. package/docs/guides/theming.md +133 -5
  193. package/docs/previews/data-display-description.webp +0 -0
  194. package/docs/previews/feedback-status-toast.webp +0 -0
  195. package/docs/roadmap.md +22 -1
  196. package/docs/troubleshooting.md +902 -11
  197. package/lib/components/base-content.css +139 -0
  198. package/lib/components/base.css +150 -0
  199. package/lib/components/components.css +2 -0
  200. package/lib/components/reduced-motion.css +56 -0
  201. package/lib/components/theme-tokens.css +116 -0
  202. package/lib/components/ui/actions/button-group/button-group.css +1 -1
  203. package/lib/components/ui/feedback/toast/toast.css +21 -0
  204. package/lib/components/ui/primitives/label/label.css +33 -0
  205. package/lib/styles.css +10 -368
  206. package/package.json +2 -2
  207. package/dist/field-blur-DWQtxiAe.js +0 -3483
  208. package/dist/flowDiagram-KWPJA3E3-DZxumFfu.js +0 -17
  209. package/dist/icon-button-BxySFfrr.js +0 -2718
  210. package/dist/swimlanesDiagram-TC7HE7FX-CROh8GTF.js +0 -28
@@ -33,8 +33,9 @@ at the top are needed is in [getting started](../getting-started.md#styles).
33
33
  highlight.js (`RichTextEditor` code blocks), react-easy-crop
34
34
  (`ImageCropper`), the `CodeBlock` theme, and the `nxgt-*` classes of
35
35
  `ButtonGroup`, `BottomAppBar`, `ContactItem`, `OpeningHoursItem`,
36
- `AttributeForm` and `AttributeValuesForm` (the first three are
37
- dependencies, the rest ship in `lib/components/`);
36
+ `AttributeForm` and `AttributeValuesForm`, and the required-field mark drawn
37
+ after a `Label` (the first three are dependencies, the rest ship in
38
+ `lib/components/`);
38
39
  - the **tokens**: CSS variables on `:root`, and their dark values on `.dark`
39
40
  and `[data-theme="dark"]`;
40
41
  - a `@theme` block that maps each token to a Tailwind colour, so `bg-primary`,
@@ -51,9 +52,11 @@ at the top are needed is in [getting started](../getting-started.md#styles).
51
52
  | `--primary`, `--primary-foreground` | `bg-primary`, `text-primary-foreground` | filled buttons, active states, focus |
52
53
  | `--secondary`, `--secondary-foreground` | `bg-secondary`, … | the secondary colour |
53
54
  | `--muted`, `--muted-foreground` | `bg-muted`, `text-muted-foreground` | quiet surfaces, hints, placeholders |
55
+ | `--track`, `--track-fill` | `bg-track`, `bg-track-fill`, `border-track-fill` | the empty part of a slider or meter, the drawer handle; the slider range and thumb |
54
56
  | `--accent`, `--accent-foreground` | `bg-accent`, … | hover surfaces |
55
57
  | `--error`, `--success`, `--info`, `--warning` (+ `-foreground`) | `bg-error`, `text-success`, … | the status colours of `Button`, `Alert`, `Badge`, toasts |
56
- | `--destructive` | `bg-destructive`, `text-destructive` | destructive menu items and actions |
58
+ | `--error-text` | `text-error-text` | error drawn as text: field messages, `HelperText` in its error state, form and dialog errors, `variant="error"` menu items |
59
+ | `--destructive` | `bg-destructive`, `text-destructive` | deprecated alias of `--error`: the light theme sets it to `var(--error)`, the dark theme keeps its own value; use `--error` |
57
60
  | `--card`, `--popover`, `--tooltip` (+ `-foreground`) | `bg-card`, `bg-popover`, `bg-tooltip` | surfaces |
58
61
  | `--border`, `--input`, `--ring` | `border-border`, `border-input`, `ring-ring` | outlines |
59
62
  | `--chart-1` … `--chart-5` | `bg-chart-1`, … | chart series (the charts read them at runtime) |
@@ -90,20 +93,145 @@ Redefine the variables **after** the import, for light and dark separately:
90
93
  Override the variable, not the `@theme` entry: `--color-primary` is defined as
91
94
  `var(--primary)`, so one change reaches both modes and every derived colour.
92
95
 
93
- For a single area of the page, set the variables on a wrapper:
96
+ For a single area of the page, set the `--color-*` variables on a wrapper
97
+ (the `@theme` entries are resolved on the root, so setting `--primary` on an
98
+ element below it changes nothing):
94
99
 
95
100
  ```tsx
96
101
  import { Button } from '@nxgt/material/components';
97
102
 
98
103
  export function DangerZone() {
99
104
  return (
100
- <section style={{ ['--primary' as string]: 'var(--error)' }}>
105
+ <section style={{ ['--color-primary' as string]: 'var(--error)' }}>
101
106
  <Button>Delete workspace</Button>
102
107
  </section>
103
108
  );
104
109
  }
105
110
  ```
106
111
 
112
+ ## Contrast and reduced motion
113
+
114
+ **Contrast.** The shipped light palette keeps the text of every filled status
115
+ colour at 4.5:1 or more (WCAG 1.4.3): `--secondary` 5.7:1, `--success` 5.6:1,
116
+ `--info` 5.8:1 and `--warning` 5.3:1 against their `-foreground`, and
117
+ `--secondary` as text (a `tonal`, `outlined` or `link` `Button`) 6.0:1 on
118
+ `--background`, 4.8:1 on its own 15 % `tonal` tint.
119
+
120
+ The dark theme keeps brighter values, read as text on the dark surfaces: the
121
+ dark `--secondary` (`oklch(0.66 0.1135 245.65)`) is 6.5:1 on `--background`
122
+ and 5.8:1 on `--card` (a `tonal` secondary `Button` 5.4:1 and 4.6:1). Under
123
+ near-white text those brights are too light, so every filled surface built on
124
+ them is tinted in the dark theme: a filled `secondary` `Button`, `IconButton`
125
+ or `Badge` at 70 % (5.2:1 on `--background`, 4.9:1 on `--card`), a filled
126
+ `success`, `info` or `warning` one at 60 % (7.3:1, 5.7:1 and 7.5:1 on
127
+ `--background`; 6.7:1, 5.3:1 and 7.0:1 on `--card`). Their hover, focus and
128
+ pressed states are tinted further down, so they only gain contrast.
129
+
130
+ In the light theme the filled `primary`, `secondary`, `success`, `info`,
131
+ `warning` and `error` buttons darken when hovered, focused or pressed (mixed
132
+ with 10, 15 and 20 % black) rather than fading toward the page, so their
133
+ near-white text only gains contrast (the filled `default` variant's states are
134
+ unchanged); a `tonal` button's focus tint is 10 %
135
+ (lighter than its 15 % rest), an `outlined` one's 15 %, and its hover keeps the
136
+ text colour.
137
+
138
+ The `tonal`, `outlined` and `link` variants of `Button` and `IconButton` draw
139
+ their text and icon in one tone per colour, read on `--background`, on
140
+ `--card` and on the variant's own tint (15 % at most, at rest or focused). In
141
+ the light theme `primary`, `secondary`, `info` and `success` use the token
142
+ itself (5.8, 4.8, 4.9 and 4.7:1 at their lowest) and `warning` and `error` the
143
+ token mixed with 15 % black (6.0 and 5.4:1). In the dark theme `primary` is
144
+ mixed with 60 % white (8.1:1 on `--card`: the token itself is a dark indigo,
145
+ 2.2:1), `success` and `warning` with 15 % white (5.0 and 5.4:1), `error` with
146
+ 30 % white (5.9:1), and `secondary` and `info` use the token (4.6 and 5.3:1).
147
+ The tones are mixed from the tokens (`color-mix(in oklab, var(--color-error)
148
+ 85%, black)`), so an override of a token moves its tone with it; a text colour
149
+ of your own on one of those buttons (`className="text-primary"`) replaces the tone
150
+ and is yours to check.
151
+
152
+ A `Badge` used as a link (`asChild` around an `<a>`) darkens on hover like a filled
153
+ button (mixed with 10 % black; in the dark theme its tint drops by ten
154
+ points) rather than fading toward the page. A selected `ListTile` draws its
155
+ subtitle in `text-foreground/70` (7.0:1 on the selected tint, where the muted
156
+ colour gave 4.4:1). The light `--error` is `oklch(0.56 0.245 27.325)`, a shade
157
+ darker than the dark theme's: a filled `error` button's near-white text reaches
158
+ 4.8:1 (it was 4.6:1). The dark `--error` keeps `0.577`: a lighter value drops
159
+ the filled surface's near-white text below 4.5:1 (`0.62` gives 3.85:1).
160
+
161
+ **Error text has a token of its own**, `--error-text` (`text-error-text`), so
162
+ the fill can stay dark while the text is light enough to read. The light value
163
+ is `color-mix(in oklab, var(--error) 94%, black)` (5.7:1 on `--background`
164
+ and `--card`, 4.8:1 on the `bg-error/10` tint of a focused menu item, where
165
+ `--error` gives 5.0 and 4.2:1); the dark one is
166
+ `color-mix(in oklab, var(--error) 80%, white)`, 5.9:1 on `--background` and
167
+ 5.3:1 on `--card`, where `--error` itself gives 4.2 and 3.8:1. Field messages,
168
+ `HelperText` in its error state, form, dialog and upload errors, a textarea's
169
+ counter over its limit, the error lines of `Terminal`, a
170
+ `variant="error"` menu item and the falling values of the metric cards use it.
171
+
172
+ Which one to use:
173
+
174
+ - **`text-error-text`** for an error written as text on a page, card or
175
+ popover surface (your own validation message, a failed row, an inline
176
+ error), and for an icon drawn beside that text, so the two match.
177
+ - **`text-error`** (with `bg-error`, `border-error`, `ring-error`,
178
+ `stroke-error`) for fills, borders, rings and icons that stand alone: those
179
+ need 3:1 (WCAG 1.4.11), which `--error` reaches in both themes. Text on a
180
+ filled error surface is `text-error-foreground`.
181
+
182
+ `--error-text` is computed where it is declared, on the root, and `@theme`
183
+ resolves `--color-error-text` there too: an override of `--error` under `:root`
184
+ and `.dark, [data-theme="dark"]` moves it, but setting `--error-text` or
185
+ `--error` on an element below the root changes nothing. Below the root, set
186
+ `--color-error-text` (and `--color-error` for fills) on that element, or put
187
+ the override on the root.
188
+
189
+ Storybook's `Guides/Theming/Contrast` measures all of this in both themes:
190
+ the surfaces' text, the error text (`HelperText` and a field's message on
191
+ `--background` and `--card`), the `Alert`s and the `Timeline`, `Button` and
192
+ `IconButton` in every variant and colour, and a `Badge` link in every colour,
193
+ at rest, hovered, focused and pressed, and the tracks; `Data display/ListTile`
194
+ measures the selected tile. Run them against your own tokens after an
195
+ override.
196
+
197
+ `--muted-foreground` is 5.5:1 on `--background` and `--card`, 5.1:1 on the
198
+ "paper" tint (`bg-background-paper`, 5 % primary) and 5.0:1 on `--muted` in
199
+ the light theme; in the dark theme it is 6.4:1 on `--background`, 5.7:1 on
200
+ `--card`, 6.3:1 on the paper tint and 4.7:1 on `--muted`. The dark `--muted`
201
+ is a dark surface (`oklch(0.279 0.041 260.031)`, it was the light value, a
202
+ near-white block on a dark page) and `--foreground` on it reaches 14.0:1.
203
+
204
+ **Tracks.** The empty part of a `Slider`, of the password strength meter and
205
+ the `Drawer` handle use `--track` (`bg-track`), and the `Slider`'s range and
206
+ thumb border `--track-fill` (`bg-track-fill`, `border-track-fill`). In the
207
+ dark theme the track reaches 3.6:1 on `--background` and 3.2:1 on `--card`
208
+ (WCAG 1.4.11; `bg-muted`, a dark surface now, gave 1.4:1 and 1.2:1), and the
209
+ fill 3.4:1 on the track. The light theme keeps a pale track (`--track` is the
210
+ light `--muted`) and `--track-fill` is `--primary`: the thumb, 7.3:1 on the
211
+ page, shows the value. A track, bar, handle or divider of your own drawn with
212
+ `bg-muted` is near invisible in the dark theme now that `--muted` is a dark
213
+ surface: draw it with `bg-track`.
214
+
215
+ When you override one of these tokens, keep its pair at 4.5:1 (3:1 for an
216
+ icon or a border), or the `Badge`, `Button`, `Alert` and toast text built on it fails
217
+ an accessibility audit. The muted text of a highlighted menu entry (a
218
+ `DropdownMenuShortcut`, the code in `LanguageSwitcher`) switches to
219
+ `--accent-foreground` while the entry is highlighted, so a `--muted-foreground`
220
+ of your own does not have to pass on the highlight colour.
221
+
222
+ **Reduced motion.** `styles.css` imports `components/reduced-motion.css`: one
223
+ `@media (prefers-reduced-motion: reduce)` rule that turns off the transitions
224
+ and animations of every catalogue component (everything under a `data-slot`,
225
+ and the toasts): dialogs, sheets and menus appear without sliding or fading,
226
+ buttons and toasts without transitions. The `Spinner` and any `animate-spin` element (a spinning
227
+ loading icon) keep turning: they are the only sign that something is loading.
228
+ The rule is `!important` but unlayered and with a specificity of 0, so a
229
+ component's own `duration-*` utility does not outrank it, and your own
230
+ `!important` rule on a class does; to keep one motion for everyone, override it
231
+ on that element with that rule inside `@media (prefers-reduced-motion: reduce)`.
232
+ Your own components outside a `data-slot` are yours: use Tailwind's
233
+ `motion-reduce:` variant on them.
234
+
107
235
  ## Dark mode
108
236
 
109
237
  Dark values apply under a `.dark` class **or** a `data-theme="dark"`
package/docs/roadmap.md CHANGED
@@ -18,6 +18,9 @@ Nothing in progress right now; see Next.
18
18
 
19
19
  ## Later
20
20
 
21
+ - **Next major: `ListTile`'s `data-slot` becomes `list-tile`** — it is
22
+ `item-detail` today, so the name matches the component like every other
23
+ slot. Breaking for a selector or a test that looks for `item-detail`.
21
24
  - **3.0: the same amounts and dates on every machine** — `formatAmount` and
22
25
  `formatDate` stop falling back to the runtime's locale when you pass none, so
23
26
  a server and a browser always print the same string.
@@ -85,6 +88,24 @@ Nothing in progress right now; see Next.
85
88
 
86
89
  ## Shipped
87
90
 
91
+ - **Accessible by default** — error text in its own `--error-text` colour that
92
+ reads 4.5:1 in both themes, the empty part of sliders and meters in a
93
+ `--track` colour that reads 3:1, buttons, badges and status colours that
94
+ reach WCAG contrast, animations that honour `prefers-reduced-motion`, the
95
+ page behind a modal layer made `inert`, focus on the first invalid field
96
+ after a failed submit, Escape that reaches the layer below while one
97
+ closes, and a `Toaster` at the top of a phone whose toasts a tap does not
98
+ pause and whose actions work over a dialog. 2.8.0.
99
+ - **Fits a phone** — `DataTable` with no height cap by default (`maxHeight`
100
+ when it should scroll in a box), a header row at every width, and wide
101
+ columns that scroll sideways in one region a keyboard can reach; a `Button`
102
+ never wider than its container (a long label ends in "…", or wraps with
103
+ `wrap`); `OtpField` slots that shrink to fit a narrow card. 2.8.0.
104
+ - **App shell links, landmarks and scrolling** — menu entries that are real
105
+ links (middle-click, before hydration, `aria-current="page"`, your router's
106
+ link through `linkComponent`), one `<main>` landmark, and a shell
107
+ that lets the document scroll, with `scroll="container"` for a full-height
108
+ screen. 2.8.0.
88
109
  - **DataTable server-side data** — hand the table one page from your loader
89
110
  (`manual`): no client paging or sorting, controlled sorting and selection by
90
111
  row id (`sorting`, `rowSelection`, `getRowId`), a footer with "41–60 of 133"
@@ -146,7 +167,7 @@ Nothing in progress right now; see Next.
146
167
  - **Accessible names, ids and focus across the catalogue** — every field is
147
168
  named by its label and says it is required on the element a screen reader
148
169
  lands on (the input, the picker's `combobox`, the slider thumbs, the
149
- group), with the asterisk hidden from it; groups are named by their question
170
+ group), with the asterisk drawn by CSS, so in no name or label text; groups are named by their question
150
171
  and describe their error instead of carrying `aria-invalid` where ARIA does
151
172
  not allow it; ids are generated rather than taken from a field's `name` or
152
173
  an option's `value`, so two forms on one page no longer collide; icon