@trinityui/design-system 2.11.0 → 2.13.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 (518) hide show
  1. package/CHANGELOG.md +2209 -0
  2. package/CONTRIBUTING.md +180 -69
  3. package/LICENSE +21 -0
  4. package/MIGRATION.md +523 -21
  5. package/README.md +281 -120
  6. package/dist/IllustratedMessage.js +546 -1341
  7. package/dist/accessibility.d.ts +596 -18
  8. package/dist/accessibility.d.ts.map +1 -1
  9. package/dist/accessibility.js +458 -0
  10. package/dist/app-shell.js +17230 -9097
  11. package/dist/assets/index.d.ts +1 -1
  12. package/dist/charts.js +8507 -6059
  13. package/dist/color-contrast.d.ts +35 -0
  14. package/dist/color-contrast.d.ts.map +1 -0
  15. package/dist/commonjs-helpers.js +8 -0
  16. package/dist/component-color-references.d.ts +175 -0
  17. package/dist/component-color-references.d.ts.map +1 -0
  18. package/dist/components/AI/AIActions.d.ts +72 -12
  19. package/dist/components/AI/AIActions.d.ts.map +1 -1
  20. package/dist/components/AI/AIAvatar.d.ts +31 -3
  21. package/dist/components/AI/AIAvatar.d.ts.map +1 -1
  22. package/dist/components/AI/AIChainOfThought.d.ts +192 -72
  23. package/dist/components/AI/AIChainOfThought.d.ts.map +1 -1
  24. package/dist/components/AI/AIChainOfThought.types.d.ts +296 -34
  25. package/dist/components/AI/AIChainOfThought.types.d.ts.map +1 -1
  26. package/dist/components/AI/AIChainOfThought.utils.d.ts +25 -7
  27. package/dist/components/AI/AIChainOfThought.utils.d.ts.map +1 -1
  28. package/dist/components/AI/AIChat.d.ts +12 -0
  29. package/dist/components/AI/AIChat.d.ts.map +1 -1
  30. package/dist/components/AI/AIChatWelcome.d.ts +254 -0
  31. package/dist/components/AI/AIChatWelcome.d.ts.map +1 -0
  32. package/dist/components/AI/AIClarificationPrompt.d.ts +134 -0
  33. package/dist/components/AI/AIClarificationPrompt.d.ts.map +1 -0
  34. package/dist/components/AI/AIConfidenceBadge.d.ts +117 -0
  35. package/dist/components/AI/AIConfidenceBadge.d.ts.map +1 -0
  36. package/dist/components/AI/AIConfigContext.d.ts +100 -0
  37. package/dist/components/AI/AIConfigContext.d.ts.map +1 -0
  38. package/dist/components/AI/AIConfigProvider.d.ts +66 -0
  39. package/dist/components/AI/AIConfigProvider.d.ts.map +1 -0
  40. package/dist/components/AI/AIContainer.d.ts +80 -11
  41. package/dist/components/AI/AIContainer.d.ts.map +1 -1
  42. package/dist/components/AI/AIExplainability.d.ts +39 -5
  43. package/dist/components/AI/AIExplainability.d.ts.map +1 -1
  44. package/dist/components/AI/AIFeedbackControl.d.ts +113 -0
  45. package/dist/components/AI/AIFeedbackControl.d.ts.map +1 -0
  46. package/dist/components/AI/AIFeedbackForm.d.ts +117 -0
  47. package/dist/components/AI/AIFeedbackForm.d.ts.map +1 -0
  48. package/dist/components/AI/AIFeedbackHostContext.d.ts +16 -0
  49. package/dist/components/AI/AIFeedbackHostContext.d.ts.map +1 -0
  50. package/dist/components/AI/AILabel.d.ts +39 -6
  51. package/dist/components/AI/AILabel.d.ts.map +1 -1
  52. package/dist/components/AI/AIMessage.d.ts +337 -42
  53. package/dist/components/AI/AIMessage.d.ts.map +1 -1
  54. package/dist/components/AI/AIPlanReview.d.ts +194 -0
  55. package/dist/components/AI/AIPlanReview.d.ts.map +1 -0
  56. package/dist/components/AI/AIQueryDisclosure.d.ts +119 -0
  57. package/dist/components/AI/AIQueryDisclosure.d.ts.map +1 -0
  58. package/dist/components/AI/AIRelatedQuestions.d.ts +50 -11
  59. package/dist/components/AI/AIRelatedQuestions.d.ts.map +1 -1
  60. package/dist/components/AI/AIResponseRenderer.d.ts +133 -21
  61. package/dist/components/AI/AIResponseRenderer.d.ts.map +1 -1
  62. package/dist/components/AI/AIResponseSourcesContext.d.ts +83 -0
  63. package/dist/components/AI/AIResponseSourcesContext.d.ts.map +1 -0
  64. package/dist/components/AI/AIReviewItem.d.ts +142 -0
  65. package/dist/components/AI/AIReviewItem.d.ts.map +1 -0
  66. package/dist/components/AI/AISourceChip.d.ts +135 -0
  67. package/dist/components/AI/AISourceChip.d.ts.map +1 -0
  68. package/dist/components/AI/AISources.d.ts +91 -13
  69. package/dist/components/AI/AISources.d.ts.map +1 -1
  70. package/dist/components/AI/AISourcesPanel.d.ts +43 -7
  71. package/dist/components/AI/AISourcesPanel.d.ts.map +1 -1
  72. package/dist/components/AI/AITextBlock.d.ts +107 -17
  73. package/dist/components/AI/AITextBlock.d.ts.map +1 -1
  74. package/dist/components/AI/AITextBlock.parser.d.ts +153 -0
  75. package/dist/components/AI/AITextBlock.parser.d.ts.map +1 -0
  76. package/dist/components/AI/AIVerificationBadge.d.ts +94 -0
  77. package/dist/components/AI/AIVerificationBadge.d.ts.map +1 -0
  78. package/dist/components/AI/AIVisuals.d.ts +92 -23
  79. package/dist/components/AI/AIVisuals.d.ts.map +1 -1
  80. package/dist/components/AI/AIVoiceInput.d.ts +42 -11
  81. package/dist/components/AI/AIVoiceInput.d.ts.map +1 -1
  82. package/dist/components/AI/AIVoiceMode.d.ts +16 -2
  83. package/dist/components/AI/AIVoiceMode.d.ts.map +1 -1
  84. package/dist/components/AI/BlockErrorBoundary.d.ts +77 -0
  85. package/dist/components/AI/BlockErrorBoundary.d.ts.map +1 -0
  86. package/dist/components/AI/ChatHeader.d.ts +41 -4
  87. package/dist/components/AI/ChatHeader.d.ts.map +1 -1
  88. package/dist/components/AI/ChatHistoryList.d.ts +25 -12
  89. package/dist/components/AI/ChatHistoryList.d.ts.map +1 -1
  90. package/dist/components/AI/ChatThread.d.ts +263 -13
  91. package/dist/components/AI/ChatThread.d.ts.map +1 -1
  92. package/dist/components/AI/InThreadContext.d.ts +14 -0
  93. package/dist/components/AI/InThreadContext.d.ts.map +1 -0
  94. package/dist/components/AI/InsightEngine.d.ts +270 -46
  95. package/dist/components/AI/InsightEngine.d.ts.map +1 -1
  96. package/dist/components/AI/InsightEngineInput.d.ts +52 -5
  97. package/dist/components/AI/InsightEngineInput.d.ts.map +1 -1
  98. package/dist/components/AI/MessageActionButton.d.ts +72 -0
  99. package/dist/components/AI/MessageActionButton.d.ts.map +1 -0
  100. package/dist/components/AI/QueryInput.d.ts.map +1 -1
  101. package/dist/components/AI/UserAvatar.d.ts +50 -4
  102. package/dist/components/AI/UserAvatar.d.ts.map +1 -1
  103. package/dist/components/AI/UserMessage.d.ts +32 -3
  104. package/dist/components/AI/UserMessage.d.ts.map +1 -1
  105. package/dist/components/AI/blockRendererContext.d.ts +64 -0
  106. package/dist/components/AI/blockRendererContext.d.ts.map +1 -0
  107. package/dist/components/AI/hitlBlockRenderers.d.ts +48 -0
  108. package/dist/components/AI/hitlBlockRenderers.d.ts.map +1 -0
  109. package/dist/components/AI/index.d.ts +23 -6
  110. package/dist/components/AI/index.d.ts.map +1 -1
  111. package/dist/components/AI/moleculeBlockRenderers.d.ts +15 -0
  112. package/dist/components/AI/moleculeBlockRenderers.d.ts.map +1 -0
  113. package/dist/components/AI/planReviewBlockRenderer.d.ts +8 -0
  114. package/dist/components/AI/planReviewBlockRenderer.d.ts.map +1 -0
  115. package/dist/components/AI/strings/defaults.d.ts +31 -0
  116. package/dist/components/AI/strings/defaults.d.ts.map +1 -0
  117. package/dist/components/AI/tokens.d.ts +185 -20
  118. package/dist/components/AI/tokens.d.ts.map +1 -1
  119. package/dist/components/AI/types/hitl.d.ts +2294 -0
  120. package/dist/components/AI/types/hitl.d.ts.map +1 -0
  121. package/dist/components/AI/types/index.d.ts +2 -1
  122. package/dist/components/AI/types/index.d.ts.map +1 -1
  123. package/dist/components/AI/types/response.d.ts +428 -40
  124. package/dist/components/AI/types/response.d.ts.map +1 -1
  125. package/dist/components/AI/useBlockSources.d.ts +67 -0
  126. package/dist/components/AI/useBlockSources.d.ts.map +1 -0
  127. package/dist/components/AI/useBrowserVoiceMode.d.ts +31 -2
  128. package/dist/components/AI/useBrowserVoiceMode.d.ts.map +1 -1
  129. package/dist/components/AI/useWelcomeComposerHandoff.d.ts +30 -0
  130. package/dist/components/AI/useWelcomeComposerHandoff.d.ts.map +1 -0
  131. package/dist/components/AI/utils/alphaIndex.d.ts +19 -0
  132. package/dist/components/AI/utils/alphaIndex.d.ts.map +1 -0
  133. package/dist/components/AI/utils/blockReady.d.ts +54 -0
  134. package/dist/components/AI/utils/blockReady.d.ts.map +1 -0
  135. package/dist/components/AI/utils/blocks.d.ts +28 -0
  136. package/dist/components/AI/utils/blocks.d.ts.map +1 -0
  137. package/dist/components/AI/utils/confidence.d.ts +182 -0
  138. package/dist/components/AI/utils/confidence.d.ts.map +1 -0
  139. package/dist/components/AI/utils/filters.d.ts +31 -0
  140. package/dist/components/AI/utils/filters.d.ts.map +1 -0
  141. package/dist/components/AI/utils/responseText.d.ts +8 -0
  142. package/dist/components/AI/utils/responseText.d.ts.map +1 -0
  143. package/dist/components/AI/utils/sources.d.ts +110 -0
  144. package/dist/components/AI/utils/sources.d.ts.map +1 -0
  145. package/dist/components/AIDigestCard/AIDigestCard.d.ts.map +1 -1
  146. package/dist/components/AIDigestCard/types.d.ts +42 -5
  147. package/dist/components/AIDigestCard/types.d.ts.map +1 -1
  148. package/dist/components/AppLayout/AIFab.d.ts +33 -6
  149. package/dist/components/AppLayout/AIFab.d.ts.map +1 -1
  150. package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts.map +1 -1
  151. package/dist/components/AppLayout/AppLayout.d.ts +135 -7
  152. package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
  153. package/dist/components/AppLayout/InsightEnginePanel.d.ts +315 -21
  154. package/dist/components/AppLayout/InsightEnginePanel.d.ts.map +1 -1
  155. package/dist/components/AppLayout/ResizablePanel.d.ts +145 -8
  156. package/dist/components/AppLayout/ResizablePanel.d.ts.map +1 -1
  157. package/dist/components/AppLayout/ThreadHistorySidebar.d.ts +6 -0
  158. package/dist/components/AppLayout/ThreadHistorySidebar.d.ts.map +1 -1
  159. package/dist/components/AppLayout/index.d.ts +3 -3
  160. package/dist/components/AppLayout/index.d.ts.map +1 -1
  161. package/dist/components/AppLayout/insightEnginePanel.demo.d.ts +32 -0
  162. package/dist/components/AppLayout/insightEnginePanel.demo.d.ts.map +1 -0
  163. package/dist/components/AppLayout/panelPropsPath.d.ts +26 -0
  164. package/dist/components/AppLayout/panelPropsPath.d.ts.map +1 -0
  165. package/dist/components/AppLayout/panelResizeTransition.d.ts +49 -0
  166. package/dist/components/AppLayout/panelResizeTransition.d.ts.map +1 -0
  167. package/dist/components/AppLayout/toChatThreadMessage.d.ts +40 -0
  168. package/dist/components/AppLayout/toChatThreadMessage.d.ts.map +1 -0
  169. package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts +5 -1
  170. package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts.map +1 -1
  171. package/dist/components/AuditDrawer/AuditDrawer.d.ts +4 -3
  172. package/dist/components/AuditDrawer/AuditDrawer.d.ts.map +1 -1
  173. package/dist/components/AuditDrawer/index.d.ts +1 -1
  174. package/dist/components/AuditDrawer/index.d.ts.map +1 -1
  175. package/dist/components/AuditDrawer/types.d.ts +39 -5
  176. package/dist/components/AuditDrawer/types.d.ts.map +1 -1
  177. package/dist/components/Autocomplete/Autocomplete.d.ts +6 -1
  178. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  179. package/dist/components/BulkActionDock/BulkActionDock.d.ts.map +1 -1
  180. package/dist/components/Carousel/Carousel.d.ts +10 -2
  181. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  182. package/dist/components/Charts/AreaChart.d.ts.map +1 -1
  183. package/dist/components/Charts/BarChart.d.ts.map +1 -1
  184. package/dist/components/Charts/ChartWrapper.d.ts.map +1 -1
  185. package/dist/components/Charts/ComposedChart.d.ts.map +1 -1
  186. package/dist/components/Charts/CustomLegend.d.ts +11 -2
  187. package/dist/components/Charts/CustomLegend.d.ts.map +1 -1
  188. package/dist/components/Charts/LineChart.d.ts.map +1 -1
  189. package/dist/components/Charts/PieChart.d.ts.map +1 -1
  190. package/dist/components/Charts/RadialChart.d.ts.map +1 -1
  191. package/dist/components/Charts/ScatterChart.d.ts.map +1 -1
  192. package/dist/components/Charts/Sparkline.d.ts.map +1 -1
  193. package/dist/components/Charts/gaugeGeometry.d.ts +35 -0
  194. package/dist/components/Charts/gaugeGeometry.d.ts.map +1 -0
  195. package/dist/components/Charts/highcharts.d.ts +23 -0
  196. package/dist/components/Charts/highcharts.d.ts.map +1 -0
  197. package/dist/components/Charts/highchartsUtils.d.ts +101 -6
  198. package/dist/components/Charts/highchartsUtils.d.ts.map +1 -1
  199. package/dist/components/Charts/index.d.ts +1 -1
  200. package/dist/components/Charts/index.d.ts.map +1 -1
  201. package/dist/components/Charts/tokens.d.ts +21 -0
  202. package/dist/components/Charts/tokens.d.ts.map +1 -1
  203. package/dist/components/Charts/types.d.ts +7 -7
  204. package/dist/components/Charts/types.d.ts.map +1 -1
  205. package/dist/components/ChipsInput/ChipsInput.d.ts.map +1 -1
  206. package/dist/components/ChoiceChips/ChoiceChips.d.ts +106 -0
  207. package/dist/components/ChoiceChips/ChoiceChips.d.ts.map +1 -0
  208. package/dist/components/ClearableTextField/ClearableTextField.d.ts +23 -2
  209. package/dist/components/ClearableTextField/ClearableTextField.d.ts.map +1 -1
  210. package/dist/components/CodeBlock/CodeBlock.d.ts +80 -0
  211. package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
  212. package/dist/components/Combobox/Combobox.d.ts +3 -2
  213. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  214. package/dist/components/CommandPalette/CommandPalette.d.ts +54 -3
  215. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
  216. package/dist/components/CommandPalette/index.d.ts +1 -1
  217. package/dist/components/CommandPalette/index.d.ts.map +1 -1
  218. package/dist/components/CopyButton/CopyButton.d.ts +80 -0
  219. package/dist/components/CopyButton/CopyButton.d.ts.map +1 -0
  220. package/dist/components/DataCard/DataCard.d.ts +11 -1
  221. package/dist/components/DataCard/DataCard.d.ts.map +1 -1
  222. package/dist/components/DataTable/CellRenderers.d.ts +8 -11
  223. package/dist/components/DataTable/CellRenderers.d.ts.map +1 -1
  224. package/dist/components/DataTable/DataTable.d.ts +1 -1
  225. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  226. package/dist/components/DataTable/InlineAddRow.d.ts.map +1 -1
  227. package/dist/components/DataTable/columnContext.d.ts +8 -0
  228. package/dist/components/DataTable/columnContext.d.ts.map +1 -0
  229. package/dist/components/DataTable/index.d.ts +2 -2
  230. package/dist/components/DataTable/index.d.ts.map +1 -1
  231. package/dist/components/DataTable/labels.d.ts +13 -0
  232. package/dist/components/DataTable/labels.d.ts.map +1 -0
  233. package/dist/components/DataTable/types.d.ts +34 -0
  234. package/dist/components/DataTable/types.d.ts.map +1 -1
  235. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  236. package/dist/components/DetailsPopover/DetailsPopover.d.ts +185 -0
  237. package/dist/components/DetailsPopover/DetailsPopover.d.ts.map +1 -0
  238. package/dist/components/DiffViewer/DiffViewer.d.ts +3 -2
  239. package/dist/components/DiffViewer/DiffViewer.d.ts.map +1 -1
  240. package/dist/components/Disclosure/Disclosure.d.ts +83 -0
  241. package/dist/components/Disclosure/Disclosure.d.ts.map +1 -0
  242. package/dist/components/DockLayout/DockLayout.d.ts +58 -0
  243. package/dist/components/DockLayout/DockLayout.d.ts.map +1 -1
  244. package/dist/components/DockLayout/index.d.ts +1 -1
  245. package/dist/components/DockLayout/index.d.ts.map +1 -1
  246. package/dist/components/DocumentCard/DocumentCard.d.ts +5 -1
  247. package/dist/components/DocumentCard/DocumentCard.d.ts.map +1 -1
  248. package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts +6 -2
  249. package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts.map +1 -1
  250. package/dist/components/FileUpload/FileUpload.d.ts +141 -6
  251. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  252. package/dist/components/FileUpload/index.d.ts +1 -1
  253. package/dist/components/FileUpload/index.d.ts.map +1 -1
  254. package/dist/components/FilterBar/FilterBar.d.ts +27 -1
  255. package/dist/components/FilterBar/FilterBar.d.ts.map +1 -1
  256. package/dist/components/FilterBar/index.d.ts +1 -1
  257. package/dist/components/FilterBar/index.d.ts.map +1 -1
  258. package/dist/components/FlowAutoLayout/useFlowAutoLayout.d.ts.map +1 -1
  259. package/dist/components/GanttView/GanttView.d.ts +24 -0
  260. package/dist/components/GanttView/GanttView.d.ts.map +1 -1
  261. package/dist/components/GanttView/types.d.ts +33 -7
  262. package/dist/components/GanttView/types.d.ts.map +1 -1
  263. package/dist/components/GaugeCard/GaugeCard.d.ts +4 -3
  264. package/dist/components/GaugeCard/GaugeCard.d.ts.map +1 -1
  265. package/dist/components/GaugeCard/geometry.d.ts +59 -0
  266. package/dist/components/GaugeCard/geometry.d.ts.map +1 -0
  267. package/dist/components/GeoStatusMap/GeoStatusMap.d.ts.map +1 -1
  268. package/dist/components/GeoStatusMap/types.d.ts +8 -5
  269. package/dist/components/GeoStatusMap/types.d.ts.map +1 -1
  270. package/dist/components/GoToTop/GoToTop.d.ts +1 -1
  271. package/dist/components/GoToTop/GoToTop.d.ts.map +1 -1
  272. package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts.map +1 -1
  273. package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts.map +1 -1
  274. package/dist/components/HtmlToMui/HtmlToMui.d.ts +32 -2
  275. package/dist/components/HtmlToMui/HtmlToMui.d.ts.map +1 -1
  276. package/dist/components/Icon.d.ts +567 -10
  277. package/dist/components/Icon.d.ts.map +1 -1
  278. package/dist/components/IllustratedMessage.d.ts +52 -3
  279. package/dist/components/IllustratedMessage.d.ts.map +1 -1
  280. package/dist/components/InlineEditableText/InlineEditableText.d.ts +117 -0
  281. package/dist/components/InlineEditableText/InlineEditableText.d.ts.map +1 -0
  282. package/dist/components/InsightCard/InsightCard.d.ts.map +1 -1
  283. package/dist/components/InsightCard/types.d.ts +10 -3
  284. package/dist/components/InsightCard/types.d.ts.map +1 -1
  285. package/dist/components/KeyValueList/KeyValueList.d.ts +94 -0
  286. package/dist/components/KeyValueList/KeyValueList.d.ts.map +1 -0
  287. package/dist/components/LandingPage/FeatureCard.d.ts +4 -0
  288. package/dist/components/LandingPage/FeatureCard.d.ts.map +1 -1
  289. package/dist/components/LandingPage/LandingPage.d.ts +43 -4
  290. package/dist/components/LandingPage/LandingPage.d.ts.map +1 -1
  291. package/dist/components/LandingPage/heroTone.d.ts +54 -0
  292. package/dist/components/LandingPage/heroTone.d.ts.map +1 -0
  293. package/dist/components/MentionsInput/MentionsInput.d.ts.map +1 -1
  294. package/dist/components/MetaChip/MetaChip.d.ts +113 -0
  295. package/dist/components/MetaChip/MetaChip.d.ts.map +1 -0
  296. package/dist/components/Modal/Modal.d.ts +222 -20
  297. package/dist/components/Modal/Modal.d.ts.map +1 -1
  298. package/dist/components/Modal/index.d.ts +1 -1
  299. package/dist/components/Modal/index.d.ts.map +1 -1
  300. package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
  301. package/dist/components/OrgChart/OrgChart.d.ts +5 -0
  302. package/dist/components/OrgChart/OrgChart.d.ts.map +1 -1
  303. package/dist/components/OrgChart/types.d.ts +31 -7
  304. package/dist/components/OrgChart/types.d.ts.map +1 -1
  305. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +1 -1
  306. package/dist/components/OverflowTooltip/OverflowTooltip.d.ts.map +1 -1
  307. package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
  308. package/dist/components/PageTOC/PageTOC.d.ts +2 -1
  309. package/dist/components/PageTOC/PageTOC.d.ts.map +1 -1
  310. package/dist/components/Popper/Popper.d.ts +80 -9
  311. package/dist/components/Popper/Popper.d.ts.map +1 -1
  312. package/dist/components/Popper/index.d.ts +1 -1
  313. package/dist/components/Popper/index.d.ts.map +1 -1
  314. package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts +5 -1
  315. package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts.map +1 -1
  316. package/dist/components/SandboxedIframeRenderer/SandboxedIframeRenderer.d.ts +48 -4
  317. package/dist/components/SandboxedIframeRenderer/SandboxedIframeRenderer.d.ts.map +1 -1
  318. package/dist/components/SearchInput/SearchInput.d.ts +49 -0
  319. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  320. package/dist/components/SearchInput/index.d.ts +1 -1
  321. package/dist/components/SearchInput/index.d.ts.map +1 -1
  322. package/dist/components/SimpleTable/SimpleTable.d.ts +11 -2
  323. package/dist/components/SimpleTable/SimpleTable.d.ts.map +1 -1
  324. package/dist/components/SplitPane/SplitPane.d.ts +2 -1
  325. package/dist/components/SplitPane/SplitPane.d.ts.map +1 -1
  326. package/dist/components/StatusHero/StatusHero.d.ts.map +1 -1
  327. package/dist/components/StatusIndicator/Badge.d.ts +6 -1
  328. package/dist/components/StatusIndicator/Badge.d.ts.map +1 -1
  329. package/dist/components/StatusIndicator/Chip.d.ts +3 -1
  330. package/dist/components/StatusIndicator/Chip.d.ts.map +1 -1
  331. package/dist/components/StatusIndicator/Indicators.d.ts +5 -1
  332. package/dist/components/StatusIndicator/Indicators.d.ts.map +1 -1
  333. package/dist/components/StatusIndicator/Legend.d.ts.map +1 -1
  334. package/dist/components/StatusIndicator/StatusIndicator.d.ts +98 -4
  335. package/dist/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
  336. package/dist/components/StatusIndicator/index.d.ts +2 -2
  337. package/dist/components/StatusIndicator/index.d.ts.map +1 -1
  338. package/dist/components/StatusIndicator/types.d.ts +48 -1
  339. package/dist/components/StatusIndicator/types.d.ts.map +1 -1
  340. package/dist/components/StepList/StepList.d.ts +80 -0
  341. package/dist/components/StepList/StepList.d.ts.map +1 -0
  342. package/dist/components/StepList/StepStatusMarker.d.ts +39 -0
  343. package/dist/components/StepList/StepStatusMarker.d.ts.map +1 -0
  344. package/dist/components/StepList/stepStatus.d.ts +30 -0
  345. package/dist/components/StepList/stepStatus.d.ts.map +1 -0
  346. package/dist/components/SystemBanner/SystemBanner.d.ts.map +1 -1
  347. package/dist/components/Timeline/Timeline.d.ts +57 -3
  348. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  349. package/dist/components/Timeline/index.d.ts +1 -1
  350. package/dist/components/Timeline/index.d.ts.map +1 -1
  351. package/dist/components/Timeline/timelineLabels.d.ts +70 -0
  352. package/dist/components/Timeline/timelineLabels.d.ts.map +1 -0
  353. package/dist/components/Toast/Toast.d.ts.map +1 -1
  354. package/dist/components/TopNavHeader.d.ts +6 -0
  355. package/dist/components/TopNavHeader.d.ts.map +1 -1
  356. package/dist/components/TopNavWithSidebar.d.ts +49 -1
  357. package/dist/components/TopNavWithSidebar.d.ts.map +1 -1
  358. package/dist/components/Tour/Tour.d.ts +18 -1
  359. package/dist/components/Tour/Tour.d.ts.map +1 -1
  360. package/dist/components/TransferList/TransferList.d.ts +123 -4
  361. package/dist/components/TransferList/TransferList.d.ts.map +1 -1
  362. package/dist/components/TransferList/index.d.ts +1 -1
  363. package/dist/components/TransferList/index.d.ts.map +1 -1
  364. package/dist/components/TreeView/TreeView.d.ts +97 -8
  365. package/dist/components/TreeView/TreeView.d.ts.map +1 -1
  366. package/dist/components/TreeView/index.d.ts +1 -1
  367. package/dist/components/TreeView/index.d.ts.map +1 -1
  368. package/dist/components/TrinityLoader.d.ts.map +1 -1
  369. package/dist/components/icons/featherExtensions.d.ts +55 -0
  370. package/dist/components/icons/featherExtensions.d.ts.map +1 -0
  371. package/dist/components/icons/materialExtensions.d.ts +20 -0
  372. package/dist/components/icons/materialExtensions.d.ts.map +1 -0
  373. package/dist/components/internal/index.d.ts +87 -0
  374. package/dist/components/internal/index.d.ts.map +1 -1
  375. package/dist/components/navigation/MenuListWithHeading.d.ts +33 -0
  376. package/dist/components/navigation/MenuListWithHeading.d.ts.map +1 -0
  377. package/dist/components/navigation/clientSelectorLabels.d.ts +13 -0
  378. package/dist/components/navigation/clientSelectorLabels.d.ts.map +1 -0
  379. package/dist/components/navigation/components.d.ts +6 -0
  380. package/dist/components/navigation/components.d.ts.map +1 -1
  381. package/dist/components/shared/AsyncOutcomeAlert.d.ts +91 -0
  382. package/dist/components/shared/AsyncOutcomeAlert.d.ts.map +1 -0
  383. package/dist/components/shared/TrinityIconSvg.d.ts.map +1 -1
  384. package/dist/components/shared/TrinityLogoSvg.d.ts.map +1 -1
  385. package/dist/components/shared/bidi.d.ts +44 -0
  386. package/dist/components/shared/bidi.d.ts.map +1 -0
  387. package/dist/components/shared/bidiText.d.ts +25 -0
  388. package/dist/components/shared/bidiText.d.ts.map +1 -0
  389. package/dist/components/shared/containerQueries.d.ts +73 -0
  390. package/dist/components/shared/containerQueries.d.ts.map +1 -0
  391. package/dist/components/shared/createStringsContext.d.ts +69 -0
  392. package/dist/components/shared/createStringsContext.d.ts.map +1 -0
  393. package/dist/components/shared/direction.d.ts +46 -0
  394. package/dist/components/shared/direction.d.ts.map +1 -0
  395. package/dist/components/shared/focusTrap.d.ts +36 -0
  396. package/dist/components/shared/focusTrap.d.ts.map +1 -0
  397. package/dist/components/shared/getInitials.d.ts +29 -0
  398. package/dist/components/shared/getInitials.d.ts.map +1 -0
  399. package/dist/components/shared/headingLevel.d.ts +69 -0
  400. package/dist/components/shared/headingLevel.d.ts.map +1 -0
  401. package/dist/components/shared/mergeSlotProps.d.ts +50 -0
  402. package/dist/components/shared/mergeSlotProps.d.ts.map +1 -0
  403. package/dist/components/shared/mergeSx.d.ts +26 -0
  404. package/dist/components/shared/mergeSx.d.ts.map +1 -0
  405. package/dist/components/shared/motion.d.ts +110 -0
  406. package/dist/components/shared/motion.d.ts.map +1 -0
  407. package/dist/components/shared/occurrenceKeys.d.ts +23 -0
  408. package/dist/components/shared/occurrenceKeys.d.ts.map +1 -0
  409. package/dist/components/shared/primaryAction.d.ts +89 -0
  410. package/dist/components/shared/primaryAction.d.ts.map +1 -0
  411. package/dist/components/shared/resizeKeyboard.d.ts +68 -0
  412. package/dist/components/shared/resizeKeyboard.d.ts.map +1 -0
  413. package/dist/components/shared/rootProps.d.ts +117 -0
  414. package/dist/components/shared/rootProps.d.ts.map +1 -0
  415. package/dist/components/shared/safeContent.d.ts +136 -0
  416. package/dist/components/shared/safeContent.d.ts.map +1 -0
  417. package/dist/components/shared/targetSize.d.ts +64 -0
  418. package/dist/components/shared/targetSize.d.ts.map +1 -0
  419. package/dist/components/shared/useContainerInlineSize.d.ts +43 -0
  420. package/dist/components/shared/useContainerInlineSize.d.ts.map +1 -0
  421. package/dist/components/shared/useCopyAction.d.ts +35 -0
  422. package/dist/components/shared/useCopyAction.d.ts.map +1 -0
  423. package/dist/components/shared/useOverflow.d.ts +44 -0
  424. package/dist/components/shared/useOverflow.d.ts.map +1 -0
  425. package/dist/components/shared/useResizable.d.ts +106 -7
  426. package/dist/components/shared/useResizable.d.ts.map +1 -1
  427. package/dist/components/shared/warnDeprecated.d.ts +89 -15
  428. package/dist/components/shared/warnDeprecated.d.ts.map +1 -1
  429. package/dist/components/shared/zIndexRoles.d.ts +62 -0
  430. package/dist/components/shared/zIndexRoles.d.ts.map +1 -0
  431. package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts +213 -0
  432. package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts.map +1 -0
  433. package/dist/components/templates/AIReviewQueue/index.d.ts +2 -0
  434. package/dist/components/templates/AIReviewQueue/index.d.ts.map +1 -0
  435. package/dist/components/templates/Auth/AuthTemplate.d.ts.map +1 -1
  436. package/dist/components/templates/Auth/types.d.ts +4 -1
  437. package/dist/components/templates/Auth/types.d.ts.map +1 -1
  438. package/dist/components/templates/Catalog/CatalogTemplate.d.ts.map +1 -1
  439. package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts.map +1 -1
  440. package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts.map +1 -1
  441. package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts.map +1 -1
  442. package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts +168 -10
  443. package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts.map +1 -1
  444. package/dist/components/templates/ListDetail/index.d.ts +1 -1
  445. package/dist/components/templates/ListDetail/index.d.ts.map +1 -1
  446. package/dist/components/templates/ListDetail/listDetailLabels.d.ts +106 -0
  447. package/dist/components/templates/ListDetail/listDetailLabels.d.ts.map +1 -0
  448. package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts.map +1 -1
  449. package/dist/components/templates/Settings/SettingsTemplate.d.ts +0 -3
  450. package/dist/components/templates/Settings/SettingsTemplate.d.ts.map +1 -1
  451. package/dist/components/templates/Wizard/WizardTemplate.d.ts +4 -1
  452. package/dist/components/templates/Wizard/WizardTemplate.d.ts.map +1 -1
  453. package/dist/components/templates/index.d.ts +2 -1
  454. package/dist/components/templates/index.d.ts.map +1 -1
  455. package/dist/data-table.d.ts +1 -1
  456. package/dist/data-table.d.ts.map +1 -1
  457. package/dist/data-table.js +1 -0
  458. package/dist/data-table2.js +13522 -13465
  459. package/dist/data.js +213 -194
  460. package/dist/elk.bundled.js +47371 -0
  461. package/dist/essentials.d.ts +3 -3
  462. package/dist/essentials.d.ts.map +1 -1
  463. package/dist/essentials.js +179 -147
  464. package/dist/focus-on-replace.js +49 -0
  465. package/dist/form.d.ts +26 -4
  466. package/dist/form.d.ts.map +1 -1
  467. package/dist/forms.js +575 -483
  468. package/dist/foundation.js +3704 -0
  469. package/dist/hooks/storageStore.d.ts +51 -0
  470. package/dist/hooks/storageStore.d.ts.map +1 -0
  471. package/dist/hooks/useAsyncAction.d.ts +65 -0
  472. package/dist/hooks/useAsyncAction.d.ts.map +1 -0
  473. package/dist/hooks/useDisclosure.d.ts +190 -0
  474. package/dist/hooks/useDisclosure.d.ts.map +1 -0
  475. package/dist/hooks/useFocusOnReplace.d.ts +95 -0
  476. package/dist/hooks/useFocusOnReplace.d.ts.map +1 -0
  477. package/dist/hooks/useTrinityPalette.d.ts +38 -40
  478. package/dist/hooks/useTrinityPalette.d.ts.map +1 -1
  479. package/dist/hooks.d.ts +44 -6
  480. package/dist/hooks.d.ts.map +1 -1
  481. package/dist/hooks.js +301 -0
  482. package/dist/index.d.ts +71 -26
  483. package/dist/index.d.ts.map +1 -1
  484. package/dist/index.js +13923 -60619
  485. package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts +203 -0
  486. package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts.map +1 -0
  487. package/dist/patterns/AICopilotPattern/index.d.ts +3 -0
  488. package/dist/patterns/AICopilotPattern/index.d.ts.map +1 -0
  489. package/dist/patterns/index.d.ts +15 -0
  490. package/dist/patterns/index.d.ts.map +1 -0
  491. package/dist/presets/analytics.d.ts +8 -1
  492. package/dist/presets/analytics.d.ts.map +1 -1
  493. package/dist/presets/crm.d.ts +8 -1
  494. package/dist/presets/crm.d.ts.map +1 -1
  495. package/dist/presets/index.d.ts +1 -1
  496. package/dist/presets/portal.d.ts +8 -1
  497. package/dist/presets/portal.d.ts.map +1 -1
  498. package/dist/safe-content.js +792 -0
  499. package/dist/theme-augmentation.d.ts +388 -0
  500. package/dist/theme-augmentation.d.ts.map +1 -0
  501. package/dist/theme.d.ts +116 -30
  502. package/dist/theme.d.ts.map +1 -1
  503. package/dist/theme.js +891 -436
  504. package/dist/token-color.d.ts +14 -0
  505. package/dist/token-color.d.ts.map +1 -0
  506. package/dist/token-merge.d.ts +56 -0
  507. package/dist/token-merge.d.ts.map +1 -0
  508. package/dist/token-serialization.d.ts +65 -0
  509. package/dist/token-serialization.d.ts.map +1 -0
  510. package/dist/tokens.d.ts +882 -13
  511. package/dist/tokens.d.ts.map +1 -1
  512. package/dist/tokens.js +21 -19
  513. package/dist/trinity.css +1077 -414
  514. package/package.json +111 -90
  515. package/dist/components/index.d.ts +0 -145
  516. package/dist/components/index.d.ts.map +0 -1
  517. package/dist/components/shared.d.ts +0 -92
  518. package/dist/components/shared.d.ts.map +0 -1
@@ -4,6 +4,9 @@
4
4
  *
5
5
  * @module accessibility
6
6
  */
7
+ /**
8
+ * @deprecated since 2.13.0; removed in v3.0 with `useFocusTrap`. See MIGRATION.md.
9
+ */
7
10
  export interface UseFocusTrapOptions {
8
11
  /** Whether the focus trap is active */
9
12
  enabled?: boolean;
@@ -14,6 +17,9 @@ export interface UseFocusTrapOptions {
14
17
  /** Whether to include tab navigation wrapping */
15
18
  wrapFocus?: boolean;
16
19
  }
20
+ /**
21
+ * @deprecated since 2.13.0; removed in v3.0 with `useFocusTrap`. See MIGRATION.md.
22
+ */
17
23
  export interface UseFocusTrapReturn {
18
24
  /** Ref to attach to the container element */
19
25
  containerRef: React.RefObject<HTMLDivElement | null>;
@@ -27,11 +33,51 @@ export interface UseFocusTrapReturn {
27
33
  /**
28
34
  * Hook to trap focus within a container element.
29
35
  * Useful for modals, dialogs, and dropdown menus.
36
+ *
37
+ * @deprecated since 2.13.0; removed in v3.0. MUI's focus trap is the one to
38
+ * use: `Dialog`, `Popover`, `Menu` and a temporary `Drawer` trap focus
39
+ * themselves, and `FocusTrap` from `@mui/material/Unstable_TrapFocus` covers
40
+ * a custom surface. This hook only traps after an imperative `activate()`,
41
+ * and it skips `position: fixed` elements. In development it warns once per
42
+ * session, from a mount effect. See MIGRATION.md.
30
43
  */
31
44
  export declare const useFocusTrap: ({ enabled, initialFocus, returnFocus, wrapFocus, }?: UseFocusTrapOptions) => UseFocusTrapReturn;
45
+ /**
46
+ * The CSS media query for users who prefer reduced motion. Use it as a key in
47
+ * `sx` or `styled` styles to stop an animation or transition:
48
+ *
49
+ * ```tsx
50
+ * import { REDUCED_MOTION_QUERY } from '@trinityui/design-system';
51
+ *
52
+ * <Box
53
+ * sx={(theme) => ({
54
+ * animation: `${pulse} ${theme.transitions.duration.complex}ms infinite alternate`,
55
+ * [REDUCED_MOTION_QUERY]: { animation: 'none' },
56
+ * })}
57
+ * />
58
+ * ```
59
+ *
60
+ * It tests the same media feature as `useReducedMotion`. Prefer it for CSS
61
+ * motion: the browser applies it from the first paint, also in
62
+ * server-rendered markup, while the hook returns `false` until hydration has
63
+ * finished.
64
+ *
65
+ * @since 2.13.0
66
+ */
67
+ export declare const REDUCED_MOTION_QUERY: "@media (prefers-reduced-motion: reduce)";
32
68
  /**
33
69
  * Hook to detect user's reduced motion preference.
34
70
  * Use this to disable animations for users who have requested reduced motion.
71
+ * For CSS animations and transitions, prefer `REDUCED_MOTION_QUERY` in `sx`.
72
+ *
73
+ * Safe for server rendering and hydration (ADR-27). The server render and the
74
+ * hydration render return `false`, so the hydrated markup matches the server's;
75
+ * React then re-renders straight after hydration with the user's preference.
76
+ * A render on the client without server markup returns the preference on its
77
+ * first render. Later changes of the preference re-render the component.
78
+ *
79
+ * @returns `true` when the user prefers reduced motion
80
+ * (`prefers-reduced-motion: reduce`), otherwise `false`.
35
81
  */
36
82
  export declare const useReducedMotion: () => boolean;
37
83
  import React from 'react';
@@ -41,14 +87,171 @@ export interface SkipLinkProps {
41
87
  targetId: string;
42
88
  /** Link text */
43
89
  label?: string;
44
- /** Custom styles */
90
+ /**
91
+ * Custom styles, merged after the skip link's own. The object, array and
92
+ * function forms all work (array and function since 2.13.0).
93
+ */
45
94
  sx?: SxProps<Theme>;
46
95
  }
47
96
  /**
48
97
  * Skip Link - Provides keyboard users a way to skip navigation.
49
98
  * Should be the first focusable element on the page.
99
+ *
100
+ * Hidden until it receives focus; then it shows at the inline start of the
101
+ * viewport (the left in LTR, the right in RTL), above app chrome and every
102
+ * overlay on the theme's `skipLink` layer role (`zIndex.tooltip + 1`, ADR-03-R12). Activating it (click, Enter or Space) moves
103
+ * focus to the element with `targetId`.
50
104
  */
51
105
  export declare const SkipLink: React.FC<SkipLinkProps>;
106
+ /**
107
+ * How urgently a screen reader reads an announcement: `'polite'` waits until
108
+ * the user is idle, `'assertive'` interrupts.
109
+ *
110
+ * @since 2.13.0
111
+ */
112
+ export type AnnouncePoliteness = 'polite' | 'assertive';
113
+ /**
114
+ * Announces a short message to screen readers, for example "Saved" or
115
+ * "3 results". `politeness` defaults to `'polite'`. An empty message clears
116
+ * the region and cancels a pending message of that politeness.
117
+ *
118
+ * @since 2.13.0
119
+ */
120
+ export type AnnounceFn = (message: string, politeness?: AnnouncePoliteness) => void;
121
+ /**
122
+ * Props for `LiveRegionProvider`.
123
+ *
124
+ * @since 2.13.0
125
+ */
126
+ export interface LiveRegionProviderProps {
127
+ /** The content whose announcements this provider reads out. */
128
+ children?: React.ReactNode;
129
+ /**
130
+ * Milliseconds after which an announced message is removed from its
131
+ * region, so a screen reader that revisits the page does not find stale
132
+ * text. Pass `Infinity` to keep each message until the next one.
133
+ * @default 7000
134
+ */
135
+ clearAfterMs?: number;
136
+ }
137
+ /**
138
+ * Mounts one polite and one assertive live region, visually hidden, after its
139
+ * children. `useAnnounce` inside it announces through these regions; nested
140
+ * providers work, and the nearest one wins.
141
+ *
142
+ * The regions are siblings after the children, never inside them, so the
143
+ * provider can wrap a live container (a `role="log"` chat thread) without
144
+ * nesting live regions. Wrap overlay content in its own provider: MUI hides
145
+ * everything outside an open modal with `aria-hidden`, including the
146
+ * document-level regions `useAnnounce` falls back to, and screen readers may
147
+ * ignore content outside an `aria-modal` dialog.
148
+ *
149
+ * A message is written 50 ms after the call (the region is emptied first, so
150
+ * a repeated message is read again), the latest message per politeness wins,
151
+ * and it is cleared after `clearAfterMs`. Every timer is cleared on unmount.
152
+ * The provider renders no text of its own.
153
+ *
154
+ * ```tsx
155
+ * <LiveRegionProvider>
156
+ * <SaveButton />
157
+ * </LiveRegionProvider>
158
+ *
159
+ * function SaveButton() {
160
+ * const announce = useAnnounce();
161
+ * return <Button onClick={() => save().then(() => announce('Saved'))}>Save</Button>;
162
+ * }
163
+ * ```
164
+ *
165
+ * @since 2.13.0
166
+ */
167
+ export declare function LiveRegionProvider({ children, clearAfterMs, }: LiveRegionProviderProps): React.JSX.Element;
168
+ /**
169
+ * @internal Test-only: cancels the document-level timers and removes the
170
+ * document-level regions, so the next announcement starts fresh (mirrors
171
+ * `__resetDevWarnings` in warnDeprecated.ts). Not exported from any package entry.
172
+ */
173
+ export declare function __resetDocumentLiveRegion(): void;
174
+ /**
175
+ * Returns a stable function that announces a message to screen readers
176
+ * through the nearest `LiveRegionProvider`.
177
+ *
178
+ * Without a provider it uses a pair of document-level regions, created at
179
+ * the end of `document.body` on the first call (never during render, and
180
+ * never on a server). Their timers belong to the page, not to the calling
181
+ * component, so a message announced just before the component unmounts (a
182
+ * deleted row announcing "Deleted") is still read. Inside an open MUI modal
183
+ * these regions are hidden by `aria-hidden`, so overlay content needs its own
184
+ * `LiveRegionProvider`.
185
+ *
186
+ * ```tsx
187
+ * const announce = useAnnounce();
188
+ * announce('Copied');
189
+ * announce('Upload failed', 'assertive');
190
+ * ```
191
+ *
192
+ * The toolkit has no built-in strings: pass text from your own strings or
193
+ * `labels` prop.
194
+ *
195
+ * @since 2.13.0
196
+ */
197
+ export declare function useAnnounce(): AnnounceFn;
198
+ /**
199
+ * Options for `liveRegionProps`.
200
+ *
201
+ * @since 2.13.0
202
+ */
203
+ export interface LiveRegionPropsOptions {
204
+ /**
205
+ * The container's role. `'log'` for a chat thread or activity feed,
206
+ * `'status'` for a status message, `'alert'` for an urgent message.
207
+ * `'alert'` implies `politeness: 'assertive'` (ADR-32 (3)).
208
+ */
209
+ role?: 'log' | 'status' | 'alert';
210
+ /**
211
+ * `aria-live`. Defaults to `'assertive'` with `role: 'alert'`, else
212
+ * `'polite'`. With `role: 'alert'` it is always `'assertive'`.
213
+ */
214
+ politeness?: AnnouncePoliteness;
215
+ /** `aria-relevant`: which changes are read, for example `'additions'` for a log. */
216
+ relevant?: React.AriaAttributes['aria-relevant'];
217
+ /** `aria-atomic`: read the whole container on a change (`true`) or only the change (`false`). */
218
+ atomic?: boolean;
219
+ /** `aria-busy`: `true` while the content is still arriving (streaming); emitted only when `true`. */
220
+ busy?: boolean;
221
+ }
222
+ /**
223
+ * The attributes `liveRegionProps` returns, ready to spread on an element.
224
+ *
225
+ * @since 2.13.0
226
+ */
227
+ export interface LiveRegionAttributes {
228
+ role?: 'log' | 'status' | 'alert';
229
+ 'aria-live': AnnouncePoliteness;
230
+ 'aria-relevant'?: React.AriaAttributes['aria-relevant'];
231
+ 'aria-atomic'?: boolean;
232
+ 'aria-busy'?: true;
233
+ }
234
+ /**
235
+ * Attributes for a live *container*: an element whose own content changes
236
+ * and should be read, such as a chat log or a streaming answer. For a short
237
+ * transient message ("Saved"), use `useAnnounce` instead.
238
+ *
239
+ * `aria-live` is always set. Every other attribute appears only when its
240
+ * option is passed, so replacing hand-written attributes keeps the DOM
241
+ * identical:
242
+ *
243
+ * ```tsx
244
+ * <Box {...liveRegionProps({ role: 'log', politeness: 'polite', relevant: 'additions' })}>
245
+ * {messages.map((message) => <Message key={message.id} {...message} />)}
246
+ * </Box>
247
+ * ```
248
+ *
249
+ * Do not nest live containers, and do not put a `LiveRegionProvider` inside
250
+ * one: wrap the container with the provider instead.
251
+ *
252
+ * @since 2.13.0
253
+ */
254
+ export declare function liveRegionProps(options?: LiveRegionPropsOptions): LiveRegionAttributes;
52
255
  export interface UseAriaLiveOptions {
53
256
  /** Politeness level */
54
257
  politeness?: 'polite' | 'assertive' | 'off';
@@ -57,44 +260,182 @@ export interface UseAriaLiveOptions {
57
260
  /** Relevance filter */
58
261
  relevant?: 'additions' | 'removals' | 'text' | 'all';
59
262
  }
263
+ /**
264
+ * Options for one `useAriaLive` announcement.
265
+ *
266
+ * @since 2.13.0
267
+ */
268
+ export interface UseAriaLiveAnnounceOptions {
269
+ /** Read this message with this politeness instead of the hook's. */
270
+ politeness?: AnnouncePoliteness;
271
+ }
60
272
  export interface UseAriaLiveReturn {
61
- /** Announce a message */
62
- announce: (message: string) => void;
63
- /** Clear the current announcement */
273
+ /**
274
+ * Announce a message.
275
+ *
276
+ * When `ariaProps` is spread on a mounted element (your own region), the
277
+ * message is written there: `message` empties at once and takes the new
278
+ * text 50 ms later, so a repeated message is read again. Otherwise the
279
+ * message goes through `useAnnounce` (the nearest `LiveRegionProvider`, or
280
+ * the document-level regions), and `message` still follows it.
281
+ *
282
+ * Only one announcement is pending at a time: a newer call replaces a
283
+ * pending one (the last call wins), and a pending update of `message` is
284
+ * dropped when the component unmounts. With `politeness: 'off'` nothing is
285
+ * announced.
286
+ *
287
+ * `options.politeness` (since 2.13.0) reads this message with another
288
+ * politeness. When it differs from your region's, the message goes through
289
+ * `useAnnounce` and your region is left as it is.
290
+ */
291
+ announce: (message: string, options?: UseAriaLiveAnnounceOptions) => void;
292
+ /**
293
+ * Clear the current announcement and cancel a pending one. When the hook
294
+ * announces through `useAnnounce`, the region it uses is emptied too.
295
+ */
64
296
  clear: () => void;
65
297
  /** Current message */
66
298
  message: string;
67
- /** ARIA attributes to spread */
299
+ /**
300
+ * ARIA attributes to spread on the element that renders `message`. The
301
+ * `ref` (since 2.13.0) tells the hook that you render the region; keep it
302
+ * (merge your own ref with `useForkRef` from `@mui/utils`), or messages
303
+ * are announced twice. `role` is omitted when `politeness` is `'off'`.
304
+ */
68
305
  ariaProps: {
69
- role: 'status' | 'alert';
306
+ role?: 'status' | 'alert';
70
307
  'aria-live': 'polite' | 'assertive' | 'off';
71
308
  'aria-atomic': boolean;
72
309
  'aria-relevant'?: 'additions' | 'removals' | 'text' | 'all';
310
+ ref: React.RefCallback<HTMLElement>;
73
311
  };
74
312
  }
75
313
  /**
76
314
  * Hook for managing ARIA live regions.
77
315
  * Useful for announcing dynamic content changes to screen readers.
316
+ *
317
+ * Two ways to use it:
318
+ *
319
+ * - Call `announce` and render nothing: the message is read through the
320
+ * nearest `LiveRegionProvider`, or the document-level regions
321
+ * (`useAnnounce`). For new code, prefer `useAnnounce` itself.
322
+ * - Render `message` inside an element that spreads `ariaProps` and stays
323
+ * mounted: that element is the live region, and nothing else announces the
324
+ * message.
325
+ *
326
+ * At most one update of `message` is pending at a time: `announce` and
327
+ * `clear` cancel the pending one, and unmounting cancels it, so no state
328
+ * update runs after unmount.
78
329
  */
79
330
  export declare const useAriaLive: ({ politeness, atomic, relevant, }?: UseAriaLiveOptions) => UseAriaLiveReturn;
80
- export interface VisuallyHiddenProps {
81
- /** Content to hide visually but keep accessible */
82
- children: React.ReactNode;
83
- /** HTML element to render as */
331
+ /**
332
+ * The visually-hidden styles: the content stays in the accessibility tree and
333
+ * in the tab order, but takes no space and paints nothing. This object is the
334
+ * single source of these styles. `VisuallyHidden` renders them, and you can
335
+ * apply them to an element that cannot be a `VisuallyHidden`, for example a
336
+ * native radio input inside a styled label:
337
+ *
338
+ * ```tsx
339
+ * import { visuallyHiddenSx } from '@trinityui/design-system';
340
+ *
341
+ * <Box
342
+ * component="label"
343
+ * sx={{ '&:has(input:focus-visible)': { outline: '2px solid', outlineColor: 'primary.main', outlineOffset: 2 } }}
344
+ * >
345
+ * <Box component="input" type="radio" name="size" value="m" sx={visuallyHiddenSx} />
346
+ * Medium
347
+ * </Box>
348
+ * ```
349
+ *
350
+ * The object is frozen. Spread it, or pass it first in an `sx` array, to add
351
+ * styles: `sx={[visuallyHiddenSx, { zIndex: 1 }]}`. Overriding a hiding
352
+ * property (`position`, `width`, `height`, `margin`, `overflow`, `clip`,
353
+ * `whiteSpace`) can make the content visible.
354
+ *
355
+ * The values are byte-identical to the inline `sx` `VisuallyHidden` used
356
+ * before 2.13.0, so its generated class has not changed.
357
+ *
358
+ * @since 2.13.0
359
+ */
360
+ export declare const visuallyHiddenSx: Readonly<React.CSSProperties>;
361
+ /**
362
+ * Props for `VisuallyHidden`. Every standard HTML attribute (`className`,
363
+ * `style`, `role`, `aria-*`, `data-*`, event handlers, …) is forwarded to the
364
+ * rendered element. Attribute forwarding, the optional `children`, `id` and
365
+ * `sx` are available since 2.13.0.
366
+ */
367
+ export interface VisuallyHiddenProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children'> {
368
+ /**
369
+ * Content to hide visually but keep accessible. Optional, so a void
370
+ * element such as `as="input"` can be rendered.
371
+ */
372
+ children?: React.ReactNode;
373
+ /**
374
+ * HTML element to render as.
375
+ * @default 'span'
376
+ */
84
377
  as?: React.ElementType;
378
+ /**
379
+ * Id of the rendered element. Set it to make the hidden text the target of
380
+ * `aria-describedby` or `aria-labelledby` on another element.
381
+ * @since 2.13.0
382
+ */
383
+ id?: string;
384
+ /**
385
+ * Extra styles, merged after the visually-hidden styles. The object, array
386
+ * and function forms all work. Overriding a hiding property (`position`,
387
+ * `width`, `height`, `margin`, `overflow`, `clip`, `whiteSpace`) can make
388
+ * the content visible.
389
+ * @since 2.13.0
390
+ */
391
+ sx?: SxProps<Theme>;
85
392
  }
86
393
  /**
87
394
  * Visually Hidden - Hides content visually while keeping it accessible.
88
- * Useful for providing additional context to screen readers.
395
+ * Useful for providing additional context to screen readers. Its styles are
396
+ * `visuallyHiddenSx`.
397
+ *
398
+ * The ref and all other props are forwarded to the rendered element, so it
399
+ * can be the target of an ARIA relationship:
400
+ *
401
+ * ```tsx
402
+ * const hintId = React.useId();
403
+ * <Button aria-describedby={hintId}>Delete</Button>
404
+ * <VisuallyHidden id={hintId}>Deletes the file permanently</VisuallyHidden>
405
+ * ```
406
+ *
407
+ * The ref is typed `HTMLSpanElement`, the default element. With `as` set to
408
+ * another element, the ref receives that element, so cast it as needed. Ref
409
+ * forwarding is available since 2.13.0.
89
410
  */
90
- export declare const VisuallyHidden: React.FC<VisuallyHiddenProps>;
411
+ export declare const VisuallyHidden: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLSpanElement>>;
91
412
  export type NavigationDirection = 'horizontal' | 'vertical' | 'both';
92
413
  export interface UseRovingTabIndexOptions {
93
- /** List of item refs */
414
+ /**
415
+ * List of item refs, in order. An item whose element is `disabled` or
416
+ * `aria-disabled="true"` is skipped by the arrow keys, Home and End, and
417
+ * never keeps the tab stop: right after each commit of the component that
418
+ * calls the hook, a tab stop on a disabled item passes to the nearest
419
+ * enabled one (forward first), before the browser paints. The server render
420
+ * and the first client render cannot see the elements, so they use
421
+ * `currentIndex` as given.
422
+ */
94
423
  items: React.RefObject<HTMLElement | null>[];
95
- /** Current focused index */
424
+ /**
425
+ * Index of the item that owns the tab stop. Whenever this value changes,
426
+ * the tab stop moves to that item (focus does not move). It is clamped to
427
+ * the list. The arrow keys also move the tab stop; to control it, pass
428
+ * `onIndexChange` and feed the reported index back, otherwise setting the
429
+ * value it already had (after the arrow keys moved away) changes nothing.
430
+ * @default 0
431
+ */
96
432
  currentIndex?: number;
97
- /** Navigation direction */
433
+ /**
434
+ * Navigation axis: `'vertical'` uses ArrowUp and ArrowDown, `'horizontal'`
435
+ * ArrowLeft and ArrowRight (swapped when the theme direction is `'rtl'`),
436
+ * `'both'` uses all four.
437
+ * @default 'vertical'
438
+ */
98
439
  direction?: NavigationDirection;
99
440
  /** Whether navigation wraps */
100
441
  wrap?: boolean;
@@ -112,8 +453,245 @@ export interface UseRovingTabIndexReturn {
112
453
  getTabIndex: (index: number) => 0 | -1;
113
454
  }
114
455
  /**
115
- * Hook for implementing roving tabindex keyboard navigation.
116
- * Useful for lists, tabs, and other navigable components.
456
+ * Options for the registry form of {@link useRovingTabIndex}: the form you get
457
+ * when you pass no `items` array. Items register themselves through
458
+ * `getItemProps(id)`, so the hook tracks them by id rather than by index.
459
+ *
460
+ * @typeParam Id - The type of the item ids, `string` by default.
461
+ * @since 2.13.0
462
+ */
463
+ export interface UseRovingTabIndexRegistryOptions<Id extends string | number = string> {
464
+ /**
465
+ * Not part of the registry form. An options object with a defined `items`
466
+ * selects the legacy refs-array form, at runtime and in the types, so the
467
+ * registry options never carry one. An explicit `items: undefined` is the
468
+ * registry form.
469
+ */
470
+ items?: never;
471
+ /**
472
+ * The axis the arrow keys move along. `'vertical'` uses ArrowUp and
473
+ * ArrowDown, `'horizontal'` uses ArrowLeft and ArrowRight. Home and End
474
+ * always move to the first and last enabled item. The other arrow pair is
475
+ * left to the consumer (a tree uses it to expand and collapse).
476
+ */
477
+ orientation: 'horizontal' | 'vertical';
478
+ /**
479
+ * The id that should own the tab stop. Whenever this value changes, the tab
480
+ * stop moves to that item. Focus does not move; call `focusItem` for that.
481
+ * Keyboard and pointer focus still move the tab stop, and every such move is
482
+ * reported through `onActiveIdChange`, a move back onto this item included;
483
+ * pass the reported id back to keep the two in sync.
484
+ * Once items have registered, an id that is not registered falls back to the
485
+ * first enabled item, and a disabled one to the next enabled item after it;
486
+ * `defaultActiveId` and the selected item are not consulted. If the item
487
+ * this id names registers or becomes enabled later, and the user has not
488
+ * moved the tab stop in the meantime, the tab stop moves to it then.
489
+ * Before any item has registered (the server render and the first client
490
+ * render), this id owns the tab stop only if it names an enabled item that
491
+ * is rendered; otherwise the markup has no tab stop until the items
492
+ * register. A disabled or unrendered id does not fall back to
493
+ * `defaultActiveId` there.
494
+ * Omit it, or pass `null`, to let the hook choose (see `defaultActiveId`).
495
+ */
496
+ activeId?: Id | null;
497
+ /**
498
+ * The item that owns the tab stop until the user or `activeId` moves it. It
499
+ * applies only while `activeId` is omitted or `null`. When it is omitted, or
500
+ * names an item that is missing or disabled, the first enabled item
501
+ * registered with `selected: true` owns the tab stop, otherwise the first
502
+ * enabled item.
503
+ * Before any item has registered (the server render and the first client
504
+ * render) there is no such fallback: `activeId`, else this id, owns the tab
505
+ * stop only if it names an enabled item that is rendered, and otherwise the
506
+ * markup has no tab stop until the items register (a disabled `activeId`
507
+ * does not fall back to this id). For exactly one tab stop in the server
508
+ * markup, pass an id that names an enabled, rendered item.
509
+ */
510
+ defaultActiveId?: Id | null;
511
+ /**
512
+ * Called after the tab stop moves from one item to another: through the
513
+ * arrow keys, Home or End, focus (click or Tab), `setActiveId`, `focusItem`,
514
+ * because the active item was removed or disabled, or because the item that
515
+ * `activeId` names registered or became enabled after the option changed.
516
+ * A move onto the item `activeId` names is reported too when the user made
517
+ * it. It is not called for the first tab stop after the items register, or
518
+ * for a move in the same render as a change of the `activeId` option (you
519
+ * made that change, so you already know the id).
520
+ */
521
+ onActiveIdChange?: (id: Id) => void;
522
+ /**
523
+ * Whether the arrow keys wrap from the last item to the first and back.
524
+ * @default true
525
+ */
526
+ wrap?: boolean;
527
+ /**
528
+ * Text direction. With `'rtl'` and `orientation: 'horizontal'`, ArrowLeft
529
+ * moves to the next item and ArrowRight to the previous one. Defaults to
530
+ * the theme's `direction`, so a theme created with `'rtl'` needs nothing
531
+ * more.
532
+ * @default theme.direction
533
+ */
534
+ direction?: 'ltr' | 'rtl';
535
+ }
536
+ /**
537
+ * Options for one item in the registry form of {@link useRovingTabIndex},
538
+ * passed as the second argument of `getItemProps`.
539
+ *
540
+ * @since 2.13.0
541
+ */
542
+ export interface UseRovingTabIndexItemOptions {
543
+ /**
544
+ * The item is skipped by the arrow keys, Home and End, and never owns the
545
+ * tab stop. A `disabled` attribute or `aria-disabled="true"` on the item
546
+ * element counts as well once the item has registered; before that (the
547
+ * server render and the first client render) only this option is seen.
548
+ * @default false
549
+ */
550
+ disabled?: boolean;
551
+ /**
552
+ * The item is selected in your own state. When `defaultActiveId` is not
553
+ * given, the first enabled selected item is the default tab stop (the APG
554
+ * rule for listboxes, trees and tabs).
555
+ * @default false
556
+ */
557
+ selected?: boolean;
558
+ /**
559
+ * Your own ref to the item element. It is merged into the returned `ref`,
560
+ * so do not also pass it to the element.
561
+ */
562
+ ref?: React.Ref<HTMLElement>;
563
+ }
564
+ /**
565
+ * What the registry form of {@link useRovingTabIndex} returns.
566
+ *
567
+ * @typeParam Id - The type of the item ids, `string` by default.
568
+ * @since 2.13.0
569
+ */
570
+ export interface UseRovingTabIndexRegistryReturn<Id extends string | number = string> {
571
+ /**
572
+ * The id of the item that owns the tab stop (`tabIndex` 0) in this render,
573
+ * or `null` when no enabled item is registered and no fallback applies.
574
+ */
575
+ activeId: Id | null;
576
+ /**
577
+ * Moves the tab stop to `id` without moving focus. With `{ focus: true }`
578
+ * it behaves like `focusItem`.
579
+ */
580
+ setActiveId: (id: Id, options?: {
581
+ focus?: boolean;
582
+ }) => void;
583
+ /**
584
+ * Props for the container element (the `toolbar`, `listbox`, `tree`, ...).
585
+ * They handle the arrow keys, Home and End for this container's items, and
586
+ * keep the tab stop on the item that receives focus. Pass your own
587
+ * `onKeyDown`, `onFocus` and `ref` through here rather than on the element:
588
+ * your handlers run first, and calling `event.preventDefault()` in your
589
+ * `onKeyDown` stops the hook from handling that key. Inline handlers get
590
+ * their parameter types from here (`onKeyDown: (event) => ...`). Every other
591
+ * prop you pass is returned unchanged.
592
+ */
593
+ getContainerProps: <P extends object = Record<never, never>>(userProps?: P & {
594
+ /** Runs before the hook's own focus handling. */
595
+ onFocus?: React.FocusEventHandler<HTMLElement>;
596
+ /** Runs before the hook's own key handling; `event.preventDefault()` opts the key out. */
597
+ onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
598
+ /** Your container ref, merged with the hook's own. */
599
+ ref?: React.Ref<HTMLElement>;
600
+ }) => Omit<P, 'onFocus' | 'onKeyDown' | 'ref'> & {
601
+ /** Moves the tab stop to the registered item that receives focus. */
602
+ onFocus: React.FocusEventHandler<HTMLElement>;
603
+ /** Handles the arrow keys of `orientation`, Home and End. Keys pressed with Alt, Ctrl, Meta or Shift are ignored. */
604
+ onKeyDown: React.KeyboardEventHandler<HTMLElement>;
605
+ /** Merges your container ref with the hook's own. */
606
+ ref: React.RefCallback<HTMLElement>;
607
+ };
608
+ /**
609
+ * Props for one item. Spread both on the item element: the `ref` registers
610
+ * it, and `tabIndex` is 0 for the tab stop and -1 for every other item.
611
+ * Calling it for each item while rendering is safe; no hook runs per item.
612
+ * Each `id` must be unique within this hook and render on one element.
613
+ * Items are ordered by their position in the document, and must not contain
614
+ * one another (render a nested group next to its parent item, not inside
615
+ * it).
616
+ */
617
+ getItemProps: (id: Id, options?: UseRovingTabIndexItemOptions) => {
618
+ /** Registers the element under `id` while it is mounted. */
619
+ ref: React.RefCallback<HTMLElement>;
620
+ /** 0 for the item that owns the tab stop, -1 for the others. */
621
+ tabIndex: 0 | -1;
622
+ };
623
+ /**
624
+ * Moves focus to the item `id` and makes it the tab stop. Does nothing when
625
+ * the item is not mounted or is disabled.
626
+ */
627
+ focusItem: (id: Id) => void;
628
+ }
629
+ /**
630
+ * Roving tabindex for composite widgets (toolbar, listbox, tree, grid, radio
631
+ * group): the group is one Tab stop, and the arrow keys move focus inside it
632
+ * (WAI-ARIA APG, "Keyboard Navigation Inside Components"). Prefer a native or
633
+ * MUI widget that already does this (`RadioGroup`, `MenuList`, `Tabs`).
634
+ *
635
+ * **Registry form** (since 2.13.0; no `items`, or `items: undefined`): spread
636
+ * `getContainerProps()` on the container and
637
+ * `getItemProps(id, { disabled, selected })` on each item.
638
+ * Arrow keys along `orientation`, Home and End move focus between the enabled
639
+ * items in document order; disabled items are skipped. The tab stop follows
640
+ * focus. Before the user moves it, it is the item `activeId` names (an id
641
+ * that is not registered falls back to the first enabled item, a disabled one
642
+ * to the next enabled item after it); without `activeId`, it is
643
+ * `defaultActiveId`, otherwise the first enabled selected item, otherwise the
644
+ * first enabled item. Before any item has registered (the server render and
645
+ * the first client render), `activeId`, else `defaultActiveId`, is the tab
646
+ * stop only if it names an enabled, rendered item; otherwise the markup has
647
+ * no tab stop until the items register. Built on `useRovingTabIndexRoot` from
648
+ * `@mui/utils`.
649
+ *
650
+ * ```tsx
651
+ * const roving = useRovingTabIndex({ orientation: 'horizontal' });
652
+ * <div role="toolbar" aria-label="Formatting" {...roving.getContainerProps()}>
653
+ * {tools.map((tool) => (
654
+ * <button key={tool.id} type="button" disabled={tool.disabled}
655
+ * {...roving.getItemProps(tool.id, { disabled: tool.disabled })}>
656
+ * {tool.label}
657
+ * </button>
658
+ * ))}
659
+ * </div>
660
+ * ```
661
+ *
662
+ * Horizontal arrows follow the text direction: `direction` (registry form),
663
+ * else the theme's `direction`.
664
+ *
665
+ * **Legacy form** (`items`, an array of refs): the same signature as earlier
666
+ * releases. You attach `handleKeyDown` and read `getTabIndex(index)`. Since
667
+ * 2.13.0 it skips disabled items (also at Home and End), moves the tab stop
668
+ * when `currentIndex` changes, clamps it when the list shrinks, and swaps
669
+ * ArrowLeft and ArrowRight in an RTL theme. Prefer the registry form for new
670
+ * code.
671
+ *
672
+ * The form is fixed on the first render. Switching between them on a mounted
673
+ * component throws; remount it (change its `key`) instead.
674
+ *
675
+ * Types: the id type comes from the options only. It is `string` unless they
676
+ * say otherwise: a number in `activeId` or `defaultActiveId` gives `number`,
677
+ * string and number ids together give `string | number`, and an
678
+ * `onActiveIdChange` that accepts only a narrower type (a `number` handler,
679
+ * an `(id: TabId) => void` handler, or the setter of `useState<TabId>` passed
680
+ * with `activeId: tab`) gives that type. A value alone does not narrow them:
681
+ * a literal such as `defaultActiveId: 'apple'`, or `activeId: tab` typed
682
+ * `TabId` with no callback, gives `string`. Ids passed only to
683
+ * `getItemProps`, `focusItem` or `setActiveId` do not count, so pass the
684
+ * type: `useRovingTabIndex<number>({ orientation: 'horizontal' })`. A type
685
+ * argument also narrows, for example `useRovingTabIndex<TabId>(...)`; pass
686
+ * one when a literal default meets a narrower handler, which otherwise types
687
+ * the ids as that literal. The legacy signature is declared last, so
688
+ * `ReturnType<typeof useRovingTabIndex>` and
689
+ * `Parameters<typeof useRovingTabIndex>` still describe the legacy form; name
690
+ * the registry types (`UseRovingTabIndexRegistryReturn`, ...) directly.
117
691
  */
118
- export declare const useRovingTabIndex: ({ items, currentIndex, direction, wrap, onIndexChange, }: UseRovingTabIndexOptions) => UseRovingTabIndexReturn;
692
+ export declare function useRovingTabIndex(options: UseRovingTabIndexRegistryOptions<string>): UseRovingTabIndexRegistryReturn<string>;
693
+ export declare function useRovingTabIndex(options: UseRovingTabIndexRegistryOptions<number>): UseRovingTabIndexRegistryReturn<number>;
694
+ export declare function useRovingTabIndex<Id extends string | number>(options: UseRovingTabIndexRegistryOptions<Id>): UseRovingTabIndexRegistryReturn<Id>;
695
+ export declare function useRovingTabIndex<Id extends string | number>(options: UseRovingTabIndexRegistryOptions<NoInfer<Id>>): UseRovingTabIndexRegistryReturn<Id>;
696
+ export declare function useRovingTabIndex(options: UseRovingTabIndexOptions): UseRovingTabIndexReturn;
119
697
  //# sourceMappingURL=accessibility.d.ts.map