@astryxdesign/core 0.5.2-canary.236860c → 0.5.2-canary.28ce0ea

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 (414) hide show
  1. package/dist/AppShell/AppShell.d.ts +2 -2
  2. package/dist/AppShell/AppShell.d.ts.map +1 -1
  3. package/dist/AppShell/AppShell.js +10 -7
  4. package/dist/Banner/Banner.d.ts +5 -0
  5. package/dist/Banner/Banner.d.ts.map +1 -1
  6. package/dist/Banner/Banner.js +7 -2
  7. package/dist/Breadcrumbs/BreadcrumbItem.d.ts +3 -2
  8. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  9. package/dist/Breadcrumbs/BreadcrumbItem.js +22 -15
  10. package/dist/Chat/ChatComposer.d.ts +2 -2
  11. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  12. package/dist/Chat/ChatComposer.js +21 -2
  13. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  14. package/dist/Chat/ChatComposerInput.js +84 -6
  15. package/dist/Chat/chatComposerSelection.d.ts +71 -9
  16. package/dist/Chat/chatComposerSelection.d.ts.map +1 -1
  17. package/dist/Chat/chatComposerSelection.js +155 -9
  18. package/dist/Chat/useChatNewMessages.js +3 -3
  19. package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
  20. package/dist/Chat/useChatStreamScroll.js +64 -72
  21. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  22. package/dist/CheckboxInput/CheckboxInput.js +9 -8
  23. package/dist/CheckboxList/CheckboxListItem.d.ts +5 -3
  24. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  25. package/dist/Collapsible/Collapsible.d.ts.map +1 -1
  26. package/dist/Collapsible/Collapsible.js +1 -1
  27. package/dist/DateTimeInput/DateTimeInput.d.ts +47 -13
  28. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  29. package/dist/DateTimeInput/DateTimeInput.js +269 -162
  30. package/dist/DateTimeInput/NativeDateSegment.d.ts +24 -0
  31. package/dist/DateTimeInput/NativeDateSegment.d.ts.map +1 -0
  32. package/dist/DateTimeInput/NativeDateSegment.js +235 -0
  33. package/dist/DateTimeInput/NativeTimeSegment.d.ts +30 -0
  34. package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -0
  35. package/dist/DateTimeInput/NativeTimeSegment.js +248 -0
  36. package/dist/DateTimeInput/index.d.ts +1 -1
  37. package/dist/DateTimeInput/index.d.ts.map +1 -1
  38. package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +95 -0
  39. package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts.map +1 -0
  40. package/dist/DateTimeInput/nativePickerSegmentStyles.js +103 -0
  41. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  42. package/dist/DropdownMenu/DropdownMenu.js +2 -4
  43. package/dist/Field/Field.d.ts.map +1 -1
  44. package/dist/Field/Field.js +10 -4
  45. package/dist/Field/FieldLabel.d.ts.map +1 -1
  46. package/dist/Field/FieldLabel.js +35 -20
  47. package/dist/Field/PanelSearchInput.d.ts.map +1 -1
  48. package/dist/Field/PanelSearchInput.js +3 -5
  49. package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
  50. package/dist/FieldStatus/FieldStatus.js +4 -2
  51. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  52. package/dist/Layer/useTouchTrigger.js +2 -4
  53. package/dist/Layout/Layout.d.ts +7 -8
  54. package/dist/Layout/Layout.d.ts.map +1 -1
  55. package/dist/Layout/Layout.js +7 -8
  56. package/dist/Layout/LayoutHeader.d.ts +10 -1
  57. package/dist/Layout/LayoutHeader.d.ts.map +1 -1
  58. package/dist/Layout/LayoutHeader.js +8 -2
  59. package/dist/Markdown/parser.d.ts +26 -0
  60. package/dist/Markdown/parser.d.ts.map +1 -1
  61. package/dist/Markdown/parser.js +241 -61
  62. package/dist/MultiSelector/MultiSelector.d.ts +11 -1
  63. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  64. package/dist/MultiSelector/MultiSelector.js +89 -45
  65. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  66. package/dist/PowerSearch/PowerSearchValueEditor.js +38 -49
  67. package/dist/PowerSearch/resolveDateTimeRangePart.d.ts +10 -0
  68. package/dist/PowerSearch/resolveDateTimeRangePart.d.ts.map +1 -0
  69. package/dist/PowerSearch/resolveDateTimeRangePart.js +30 -0
  70. package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
  71. package/dist/PowerSearch/usePowerSearchConfig.js +4 -24
  72. package/dist/RadioList/RadioListItem.d.ts +30 -5
  73. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  74. package/dist/RadioList/RadioListItem.js +25 -11
  75. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  76. package/dist/Resizable/ResizeHandle.js +102 -44
  77. package/dist/Resizable/index.d.ts +2 -0
  78. package/dist/Resizable/index.d.ts.map +1 -1
  79. package/dist/Resizable/index.js +1 -0
  80. package/dist/Resizable/useResizable.d.ts +89 -8
  81. package/dist/Resizable/useResizable.d.ts.map +1 -1
  82. package/dist/Resizable/useResizable.js +521 -38
  83. package/dist/Resizable/utils.d.ts +35 -0
  84. package/dist/Resizable/utils.d.ts.map +1 -0
  85. package/dist/Resizable/utils.js +27 -0
  86. package/dist/Selector/Selector.d.ts +10 -0
  87. package/dist/Selector/Selector.d.ts.map +1 -1
  88. package/dist/Selector/Selector.js +105 -57
  89. package/dist/Selector/useSelectorPresentation.d.ts +1 -0
  90. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
  91. package/dist/Selector/useSelectorPresentation.js +17 -2
  92. package/dist/Slider/Slider.d.ts.map +1 -1
  93. package/dist/Slider/Slider.js +3 -5
  94. package/dist/Spinner/Spinner.d.ts.map +1 -1
  95. package/dist/Spinner/Spinner.js +9 -10
  96. package/dist/Stepper/Step.d.ts +2 -1
  97. package/dist/Stepper/Step.d.ts.map +1 -1
  98. package/dist/Stepper/Step.js +75 -11
  99. package/dist/Stepper/Stepper.d.ts.map +1 -1
  100. package/dist/Stepper/Stepper.js +1 -0
  101. package/dist/Switch/Switch.d.ts.map +1 -1
  102. package/dist/Switch/Switch.js +8 -8
  103. package/dist/TabList/TabList.d.ts +19 -1
  104. package/dist/TabList/TabList.d.ts.map +1 -1
  105. package/dist/TabList/TabList.js +28 -5
  106. package/dist/Table/index.d.ts +16 -1
  107. package/dist/Table/index.d.ts.map +1 -1
  108. package/dist/Table/index.js +4 -0
  109. package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
  110. package/dist/Table/plugins/columnResize/useTableColumnResize.js +8 -9
  111. package/dist/Table/plugins/rowStatus/index.d.ts +1 -1
  112. package/dist/Table/plugins/rowStatus/index.d.ts.map +1 -1
  113. package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +11 -33
  114. package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
  115. package/dist/Table/plugins/rowStatus/useTableRowStatus.js +108 -75
  116. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  117. package/dist/Table/plugins/sortable/useTableSortable.js +9 -1
  118. package/dist/Text/useTruncation.d.ts +1 -1
  119. package/dist/Text/useTruncation.d.ts.map +1 -1
  120. package/dist/Text/useTruncation.js +8 -7
  121. package/dist/TimeInput/TimeInput.d.ts +16 -1
  122. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  123. package/dist/TimeInput/TimeInput.js +98 -60
  124. package/dist/TimeInput/index.d.ts +1 -1
  125. package/dist/TimeInput/index.d.ts.map +1 -1
  126. package/dist/Timestamp/Timestamp.d.ts +2 -2
  127. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  128. package/dist/Timestamp/Timestamp.js +4 -145
  129. package/dist/Timestamp/formatRelativeTime.d.ts +20 -0
  130. package/dist/Timestamp/formatRelativeTime.d.ts.map +1 -0
  131. package/dist/Timestamp/formatRelativeTime.js +81 -0
  132. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  133. package/dist/Toast/ToastViewport.js +125 -77
  134. package/dist/Tokenizer/Tokenizer.d.ts +0 -38
  135. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  136. package/dist/Tokenizer/Tokenizer.js +94 -26
  137. package/dist/Tokenizer/useEndLaneReserve.d.ts +31 -0
  138. package/dist/Tokenizer/useEndLaneReserve.d.ts.map +1 -0
  139. package/dist/Tokenizer/useEndLaneReserve.js +136 -0
  140. package/dist/Tooltip/useTooltip.d.ts +1 -1
  141. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  142. package/dist/Tooltip/useTooltip.js +53 -42
  143. package/dist/TreeList/TreeList.d.ts +1 -1
  144. package/dist/TreeList/TreeList.d.ts.map +1 -1
  145. package/dist/TreeList/TreeList.js +11 -1
  146. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  147. package/dist/Typeahead/BaseTypeahead.js +85 -30
  148. package/dist/Typeahead/Typeahead.d.ts +0 -21
  149. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  150. package/dist/Typeahead/Typeahead.js +108 -67
  151. package/dist/Typeahead/busyIndicatorLane.d.ts +62 -0
  152. package/dist/Typeahead/busyIndicatorLane.d.ts.map +1 -0
  153. package/dist/Typeahead/busyIndicatorLane.js +98 -0
  154. package/dist/astryx.css +25 -9
  155. package/dist/hooks/useFocusReturnVisibility.d.ts.map +1 -1
  156. package/dist/hooks/useFocusReturnVisibility.js +3 -5
  157. package/dist/hooks/useFocusTrap.d.ts +3 -1
  158. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  159. package/dist/hooks/useFocusTrap.js +31 -1
  160. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
  161. package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
  162. package/dist/hooks/useOverflow.js +11 -11
  163. package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
  164. package/dist/hooks/useScrollOverflow.js +7 -4
  165. package/dist/theme/defineTheme.d.ts +13 -0
  166. package/dist/theme/defineTheme.d.ts.map +1 -1
  167. package/dist/theme/defineTheme.js +7 -0
  168. package/dist/theme/generateThemeRules.d.ts.map +1 -1
  169. package/dist/theme/generateThemeRules.js +1 -1
  170. package/dist/theme/localTokens.d.ts +18 -0
  171. package/dist/theme/localTokens.d.ts.map +1 -0
  172. package/dist/theme/localTokens.js +162 -0
  173. package/dist/utils/interactionModality.d.ts +6 -28
  174. package/dist/utils/interactionModality.d.ts.map +1 -1
  175. package/dist/utils/interactionModality.js +72 -37
  176. package/dist/utils/sharedResizeObserver.d.ts +17 -9
  177. package/dist/utils/sharedResizeObserver.d.ts.map +1 -1
  178. package/dist/utils/sharedResizeObserver.js +54 -12
  179. package/locales/en.json +8 -0
  180. package/locales/fr-FR.json +12 -0
  181. package/locales/pseudo.json +6 -0
  182. package/package.json +8 -2
  183. package/scripts/agent-doc-state.mjs +137 -0
  184. package/scripts/postinstall.mjs +28 -60
  185. package/src/AlertDialog/useImperativeAlertDialog.test.tsx +163 -0
  186. package/src/AppShell/AppShell.doc.mjs +4 -3
  187. package/src/AppShell/AppShell.test.tsx +21 -0
  188. package/src/AppShell/AppShell.tsx +12 -7
  189. package/src/Banner/Banner.doc.mjs +5 -1
  190. package/src/Banner/Banner.tsx +12 -1
  191. package/src/BottomSheet/BottomSheet.spec.md +2 -1
  192. package/src/Breadcrumbs/BreadcrumbItem.tsx +18 -9
  193. package/src/Breadcrumbs/Breadcrumbs.doc.mjs +4 -1
  194. package/src/Breadcrumbs/Breadcrumbs.test.tsx +12 -0
  195. package/src/Calendar/hooks/useCalendarConstraints.test.ts +153 -0
  196. package/src/Calendar/hooks/useCalendarDays.test.ts +265 -0
  197. package/src/Calendar/hooks/useCalendarNavigation.test.ts +252 -0
  198. package/src/Center/Center.doc.mjs +7 -0
  199. package/src/Chat/ChatComposer.doc.mjs +7 -4
  200. package/src/Chat/ChatComposer.test.tsx +84 -2
  201. package/src/Chat/ChatComposer.tsx +45 -3
  202. package/src/Chat/ChatComposerInput.test.tsx +504 -0
  203. package/src/Chat/ChatComposerInput.tsx +94 -6
  204. package/src/Chat/ChatComposerTokenElement.doc.mjs +5 -0
  205. package/src/Chat/ChatMessage.doc.mjs +17 -0
  206. package/src/Chat/ChatMessageList.doc.mjs +33 -0
  207. package/src/Chat/ChatSendButton.test.tsx +189 -0
  208. package/src/Chat/ChatToolCalls.doc.mjs +9 -0
  209. package/src/Chat/chatComposerSelection.ts +189 -9
  210. package/src/Chat/useChatNewMessages.ts +3 -3
  211. package/src/Chat/useChatPasteAsToken.test.ts +191 -0
  212. package/src/Chat/useChatStreamScroll.test.tsx +168 -5
  213. package/src/Chat/useChatStreamScroll.ts +71 -67
  214. package/src/CheckboxInput/CheckboxInput.test.tsx +53 -0
  215. package/src/CheckboxInput/CheckboxInput.tsx +9 -21
  216. package/src/CheckboxList/CheckboxList.spec.md +2 -1
  217. package/src/CheckboxList/CheckboxList.test.tsx +45 -0
  218. package/src/CheckboxList/CheckboxListItem.doc.mjs +11 -9
  219. package/src/CheckboxList/CheckboxListItem.tsx +5 -3
  220. package/src/Collapsible/Collapsible.tsx +10 -0
  221. package/src/Collapsible/useCollapsible.test.tsx +236 -0
  222. package/src/CommandPalette/CommandPalette.spec.md +2 -1
  223. package/src/CommandPalette/CommandPaletteEmpty.test.tsx +101 -0
  224. package/src/ComplexSelector/ComplexSelector.spec.md +3 -2
  225. package/src/ContextMenu/ContextMenu.spec.md +2 -1
  226. package/src/DateTimeInput/DateTimeInput.doc.mjs +43 -23
  227. package/src/DateTimeInput/DateTimeInput.tsx +388 -181
  228. package/src/DateTimeInput/DateTimeInputTouch.test.tsx +10 -2
  229. package/src/DateTimeInput/NativeDateSegment.tsx +308 -0
  230. package/src/DateTimeInput/NativePickerSegments.test.tsx +626 -0
  231. package/src/DateTimeInput/NativeTimeSegment.tsx +331 -0
  232. package/src/DateTimeInput/index.ts +1 -0
  233. package/src/DateTimeInput/nativePickerSegmentStyles.ts +120 -0
  234. package/src/Divider/Divider.spec.md +16 -9
  235. package/src/DropdownMenu/DropdownMenu.spec.md +2 -1
  236. package/src/DropdownMenu/DropdownMenu.tsx +2 -4
  237. package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +13 -0
  238. package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +31 -0
  239. package/src/Field/Field.doc.mjs +1 -0
  240. package/src/Field/Field.test.tsx +39 -0
  241. package/src/Field/Field.tsx +18 -1
  242. package/src/Field/FieldLabel.test.tsx +15 -0
  243. package/src/Field/FieldLabel.tsx +69 -41
  244. package/src/Field/InputClearButton.test.tsx +68 -6
  245. package/src/Field/PanelSearchInput.tsx +3 -5
  246. package/src/FieldStatus/FieldStatus.spec.md +2 -1
  247. package/src/FieldStatus/FieldStatus.test.tsx +17 -0
  248. package/src/FieldStatus/FieldStatus.tsx +7 -2
  249. package/src/Grid/Grid.doc.mjs +11 -0
  250. package/src/Grid/Grid.spec.md +2 -1
  251. package/src/Grid/GridSpan.doc.mjs +7 -0
  252. package/src/Icon/Icon.spec.md +2 -1
  253. package/src/Indicator/Indicator.doc.mjs +3 -0
  254. package/src/Kbd/Kbd.spec.md +2 -1
  255. package/src/Layer/useTouchTrigger.ts +2 -4
  256. package/src/Layout/Layout.doc.mjs +31 -23
  257. package/src/Layout/Layout.spec.md +96 -60
  258. package/src/Layout/Layout.test.tsx +65 -1
  259. package/src/Layout/Layout.tsx +7 -8
  260. package/src/Layout/LayoutHeader.doc.mjs +23 -0
  261. package/src/Layout/LayoutHeader.tsx +18 -0
  262. package/src/Layout/LayoutPanel.doc.mjs +4 -3
  263. package/src/Lightbox/Lightbox.spec.md +2 -1
  264. package/src/Lightbox/useLightbox.test.tsx +263 -0
  265. package/src/Markdown/Markdown.spec.md +10 -3
  266. package/src/Markdown/Markdown.test.tsx +86 -1
  267. package/src/Markdown/incremental.test.ts +242 -0
  268. package/src/Markdown/parser.perf.test.ts +93 -0
  269. package/src/Markdown/parser.ts +287 -60
  270. package/src/MobileNav/MobileNav.spec.md +2 -1
  271. package/src/MoreMenu/MoreMenu.spec.md +2 -1
  272. package/src/MultiSelector/MultiSelector.doc.mjs +24 -2
  273. package/src/MultiSelector/MultiSelector.spec.md +48 -21
  274. package/src/MultiSelector/MultiSelector.test.tsx +305 -2
  275. package/src/MultiSelector/MultiSelector.tsx +124 -55
  276. package/src/NavIcon/NavIcon.spec.md +2 -1
  277. package/src/NavMenu/NavHeadingMenu.spec.md +9 -4
  278. package/src/Outline/Outline.spec.md +2 -1
  279. package/src/OverflowList/OverflowList.spec.md +2 -1
  280. package/src/Pagination/Pagination.spec.md +2 -1
  281. package/src/Popover/Popover.doc.mjs +264 -65
  282. package/src/Popover/Popover.spec.md +421 -0
  283. package/src/Popover/usePopover.doc.mjs +208 -33
  284. package/src/PowerSearch/PowerSearch.doc.mjs +45 -0
  285. package/src/PowerSearch/PowerSearch.spec.md +291 -0
  286. package/src/PowerSearch/PowerSearchFilterEditor.test.tsx +376 -0
  287. package/src/PowerSearch/PowerSearchToken.test.tsx +228 -0
  288. package/src/PowerSearch/PowerSearchValueEditor.test.tsx +120 -4
  289. package/src/PowerSearch/PowerSearchValueEditor.tsx +48 -63
  290. package/src/PowerSearch/resolveDateTimeRangePart.test.ts +40 -0
  291. package/src/PowerSearch/resolveDateTimeRangePart.ts +37 -0
  292. package/src/PowerSearch/usePowerSearchConfig.test.ts +26 -1
  293. package/src/PowerSearch/usePowerSearchConfig.ts +7 -25
  294. package/src/ProgressBar/ProgressBar.spec.md +2 -1
  295. package/src/RadioList/RadioList.test.tsx +185 -2
  296. package/src/RadioList/RadioListItem.doc.mjs +30 -11
  297. package/src/RadioList/RadioListItem.tsx +53 -28
  298. package/src/Resizable/Resizable.doc.mjs +71 -8
  299. package/src/Resizable/Resizable.spec.md +87 -35
  300. package/src/Resizable/ResizeHandle.test.tsx +177 -56
  301. package/src/Resizable/ResizeHandle.tsx +128 -45
  302. package/src/Resizable/index.ts +2 -0
  303. package/src/Resizable/shippedDirections.test.ts +462 -0
  304. package/src/Resizable/useResizable.doc.mjs +124 -29
  305. package/src/Resizable/useResizable.test.ts +1329 -3
  306. package/src/Resizable/useResizable.ts +760 -48
  307. package/src/Resizable/utils.test.ts +74 -0
  308. package/src/Resizable/utils.ts +35 -0
  309. package/src/Section/Section.spec.md +2 -1
  310. package/src/SegmentedControl/SegmentedControl.spec.md +2 -1
  311. package/src/Selector/Selector.doc.mjs +19 -2
  312. package/src/Selector/Selector.spec.md +57 -35
  313. package/src/Selector/Selector.test.tsx +318 -1
  314. package/src/Selector/Selector.tsx +127 -60
  315. package/src/Selector/useSelectorPresentation.ts +24 -4
  316. package/src/SideNav/SideNav.test.tsx +3 -3
  317. package/src/SideNav/SideNavCollapseButton.doc.mjs +8 -0
  318. package/src/SideNav/SideNavHeading.doc.mjs +3 -0
  319. package/src/SideNav/SideNavItem.doc.mjs +4 -1
  320. package/src/SideNav/SideNavSection.doc.mjs +10 -0
  321. package/src/Skeleton/Skeleton.spec.md +2 -1
  322. package/src/Slider/Slider.spec.md +2 -1
  323. package/src/Slider/Slider.tsx +2 -5
  324. package/src/Spinner/Spinner.doc.mjs +5 -5
  325. package/src/Spinner/Spinner.test.tsx +32 -7
  326. package/src/Spinner/Spinner.tsx +46 -14
  327. package/src/Stack/Stack.doc.mjs +38 -0
  328. package/src/Stack/Stack.spec.md +2 -1
  329. package/src/StatusDot/StatusDot.spec.md +2 -1
  330. package/src/Stepper/Step.doc.mjs +1 -1
  331. package/src/Stepper/Step.tsx +118 -5
  332. package/src/Stepper/Stepper.doc.mjs +51 -1
  333. package/src/Stepper/Stepper.spec.md +245 -0
  334. package/src/Stepper/Stepper.test.tsx +315 -0
  335. package/src/Stepper/Stepper.tsx +8 -0
  336. package/src/Switch/Switch.spec.md +2 -1
  337. package/src/Switch/Switch.test.tsx +53 -0
  338. package/src/Switch/Switch.tsx +9 -21
  339. package/src/TabList/TabList.doc.mjs +10 -1
  340. package/src/TabList/TabList.tsx +53 -3
  341. package/src/TabList/TabMenu.doc.mjs +14 -0
  342. package/src/Table/Table.perf.test.tsx +51 -1
  343. package/src/Table/Table.spec.md +96 -54
  344. package/src/Table/TableHeaderCell.test.tsx +291 -0
  345. package/src/Table/index.ts +19 -4
  346. package/src/Table/plugins/columnResize/useTableColumnResize.tsx +8 -12
  347. package/src/Table/plugins/filtering/useTableFilterState.test.tsx +143 -0
  348. package/src/Table/plugins/groupedRows/useTableGroupedRows.test.tsx +2 -1
  349. package/src/Table/plugins/rowStatus/index.ts +1 -4
  350. package/src/Table/plugins/rowStatus/useTableRowStatus.public.test.ts +92 -0
  351. package/src/Table/plugins/rowStatus/useTableRowStatus.spec.md +354 -0
  352. package/src/Table/plugins/rowStatus/useTableRowStatus.test.tsx +413 -56
  353. package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +155 -102
  354. package/src/Table/plugins/sortable/useTableSortable.test.tsx +72 -0
  355. package/src/Table/plugins/sortable/useTableSortable.tsx +18 -1
  356. package/src/Table/useTableGroupedRows.doc.mjs +2 -2
  357. package/src/Table/useTableRowStatus.doc.mjs +5 -5
  358. package/src/Text/Text.spec.md +2 -1
  359. package/src/Text/useTruncation.ts +8 -7
  360. package/src/TextArea/TextArea.spec.md +3 -2
  361. package/src/TimeInput/NativeTimeInput.test.tsx +269 -0
  362. package/src/TimeInput/TimeInput.doc.mjs +47 -23
  363. package/src/TimeInput/TimeInput.tsx +109 -50
  364. package/src/TimeInput/index.ts +1 -0
  365. package/src/Timestamp/Timestamp.doc.mjs +2 -2
  366. package/src/Timestamp/Timestamp.test.tsx +75 -3
  367. package/src/Timestamp/Timestamp.tsx +7 -153
  368. package/src/Timestamp/formatRelativeTime.ts +96 -0
  369. package/src/Toast/Toast.doc.mjs +4 -0
  370. package/src/Toast/ToastViewport.test.tsx +194 -0
  371. package/src/Toast/ToastViewport.tsx +136 -58
  372. package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
  373. package/src/Tokenizer/Tokenizer.spec.md +293 -0
  374. package/src/Tokenizer/Tokenizer.test.tsx +335 -1
  375. package/src/Tokenizer/Tokenizer.tsx +129 -46
  376. package/src/Tokenizer/useEndLaneReserve.ts +146 -0
  377. package/src/Toolbar/Toolbar.spec.md +2 -1
  378. package/src/Tooltip/Tooltip.spec.md +2 -1
  379. package/src/Tooltip/Tooltip.test.tsx +21 -1
  380. package/src/Tooltip/useTooltip.test.tsx +318 -0
  381. package/src/Tooltip/useTooltip.tsx +60 -39
  382. package/src/TopNav/TopNavHeading.doc.mjs +3 -0
  383. package/src/TopNav/TopNavItem.doc.mjs +3 -0
  384. package/src/TopNav/TopNavMenu.doc.mjs +10 -0
  385. package/src/TreeList/TreeList.spec.md +9 -5
  386. package/src/TreeList/TreeList.test.tsx +94 -0
  387. package/src/TreeList/TreeList.tsx +19 -1
  388. package/src/Typeahead/BaseTypeahead.tsx +96 -25
  389. package/src/Typeahead/Typeahead.doc.mjs +6 -0
  390. package/src/Typeahead/Typeahead.spec.md +10 -3
  391. package/src/Typeahead/Typeahead.test.tsx +502 -1
  392. package/src/Typeahead/Typeahead.tsx +187 -69
  393. package/src/Typeahead/TypeaheadItem.test.tsx +93 -2
  394. package/src/Typeahead/busyIndicatorLane.tsx +109 -0
  395. package/src/__tests__/stylexDeclarations.ts +51 -0
  396. package/src/hooks/useFocusReturnVisibility.ts +3 -5
  397. package/src/hooks/useFocusTrap.doc.mjs +2 -2
  398. package/src/hooks/useFocusTrap.test.tsx +48 -0
  399. package/src/hooks/useFocusTrap.ts +35 -1
  400. package/src/hooks/useOverflow.ts +11 -11
  401. package/src/hooks/useScrollLock.test.ts +103 -0
  402. package/src/hooks/useScrollOverflow.ts +7 -4
  403. package/src/i18n/useTranslator.test.tsx +197 -0
  404. package/src/postinstall.test.mjs +71 -5
  405. package/src/theme/defineTheme.test.ts +227 -0
  406. package/src/theme/defineTheme.ts +30 -0
  407. package/src/theme/derivedVarRegistry.test.ts +6 -0
  408. package/src/theme/generateThemeRules.ts +4 -1
  409. package/src/theme/localTokens.ts +272 -0
  410. package/src/theme/themingTargets.test.ts +39 -7
  411. package/src/utils/interactionModality.test.ts +83 -0
  412. package/src/utils/interactionModality.ts +88 -36
  413. package/src/utils/sharedResizeObserver.test.ts +124 -5
  414. package/src/utils/sharedResizeObserver.ts +60 -14
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  * @file AppShell.tsx
4
4
  * @input Uses React, Layout, LayoutHeader, LayoutPanel, LayoutContent, StyleX
5
5
  * @output Exports AppShell component and AppShellProps type
6
- * @position Application-level layout shell — the top-level wrapper for any app.
6
+ * @position Page shell for an application — the top-level wrapper for any app.
7
7
  * Composes Layout internally to provide header, sideNav, and main content areas.
8
8
  * Use for any app that needs a top nav, side navigation, and scrollable content.
9
9
  *
@@ -175,7 +175,7 @@ export interface AppShellProps extends BaseProps<HTMLDivElement> {
175
175
  topNav?: ReactNode;
176
176
  }
177
177
  /**
178
- * Application-level layout shell. Provides the structural frame for an app:
178
+ * Page shell for an application. Provides the structural frame for an app:
179
179
  * top navigation, side navigation, and main content area.
180
180
  *
181
181
  * Slot-based API with `topNav`, `sideNav`, `banner`, and `children`.
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AA+BhD;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE7D;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;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AAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,eAAe,GAAG,SAAS,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AA4KD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAoB,EACpB,MAAM,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBAiZf;yBAhae,QAAQ"}
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  * @file AppShell.tsx
9
9
  * @input Uses React, Layout, LayoutHeader, LayoutPanel, LayoutContent, StyleX
10
10
  * @output Exports AppShell component and AppShellProps type
11
- * @position Application-level layout shell — the top-level wrapper for any app.
11
+ * @position Page shell for an application — the top-level wrapper for any app.
12
12
  * Composes Layout internally to provide header, sideNav, and main content areas.
13
13
  * Use for any app that needs a top nav, side navigation, and scrollable content.
14
14
  *
@@ -36,7 +36,7 @@ import { AppShellMobileContext } from "./AppShellMobileContext.js";
36
36
  import { mergeProps, isRenderable } from "../utils/index.js";
37
37
  import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
38
38
  import { useMediaQuery } from "../hooks/useMediaQuery.js";
39
- import { observeResize, unobserveResize } from "../utils/sharedResizeObserver.js";
39
+ import { observeResize } from "../utils/sharedResizeObserver.js";
40
40
  import { themeProps } from "../utils/themeProps.js";
41
41
  import { useTranslator } from "../i18n/index.js";
42
42
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
@@ -105,6 +105,7 @@ const styles = {
105
105
  k1xSpc: "x78zum5",
106
106
  kXwgrk: "xdt5ytf",
107
107
  kVAEAm: "x1n2onr6",
108
+ kVQacm: "x7giv3",
108
109
  $$css: true
109
110
  },
110
111
  variantWash: {
@@ -199,7 +200,7 @@ const styles = {
199
200
  // =============================================================================
200
201
 
201
202
  /**
202
- * Application-level layout shell. Provides the structural frame for an app:
203
+ * Page shell for an application. Provides the structural frame for an app:
203
204
  * top navigation, side navigation, and main content area.
204
205
  *
205
206
  * Slot-based API with `topNav`, `sideNav`, `banner`, and `children`.
@@ -294,6 +295,9 @@ export function AppShell({
294
295
  const navHasDividers = variant === 'section';
295
296
  const isElevated = variant === 'elevated';
296
297
  const navAreaStyle = variant === 'wash' || variant === 'elevated' ? styles.navAreaWash : variant === 'surface' ? styles.navAreaSurface : undefined;
298
+ // Section normally inherits the shell's surface background. Its auto-height
299
+ // header needs to paint that surface itself while content scrolls beneath it.
300
+ const headerAreaStyle = navAreaStyle ?? (isAuto && variant === 'section' ? styles.navAreaSurface : undefined);
297
301
  const contentAreaStyle = variant === 'wash' ? styles.contentBgWash : variant === 'elevated' && hasTopNav && hasSideNav && !isBelowBreakpoint ? styles.contentBgTransparent : variant === 'surface' || variant === 'elevated' ? styles.contentBgSurface : undefined;
298
302
 
299
303
  // Background for sticky elements in auto mode — must be opaque so content
@@ -316,8 +320,7 @@ export function AppShell({
316
320
  const height = headerEl.getBoundingClientRect().height;
317
321
  shellEl.style.setProperty('--_app-shell-header-height', `${height}px`);
318
322
  };
319
- observeResize(headerEl, () => updateHeight());
320
- return () => unobserveResize(headerEl);
323
+ return observeResize(headerEl, () => updateHeight());
321
324
  }, [isAuto]);
322
325
 
323
326
  // =========================================================================
@@ -395,7 +398,7 @@ export function AppShell({
395
398
  role: "banner",
396
399
  ...mergeProps(themeProps('app-shell-header', {
397
400
  variant
398
- }), stylex.props(navAreaStyle, isAuto && styles.headerSticky)),
401
+ }), stylex.props(headerAreaStyle, isAuto && styles.headerSticky)),
399
402
  children: headerInner
400
403
  }) : undefined;
401
404
 
@@ -473,7 +476,7 @@ export function AppShell({
473
476
  role: headerContent == null ? 'banner' : undefined,
474
477
  ...mergeProps(themeProps('app-shell-header', {
475
478
  variant
476
- }), stylex.props(navAreaStyle, isAuto && styles.headerSticky)),
479
+ }), stylex.props(headerAreaStyle, isAuto && styles.headerSticky)),
477
480
  children: /*#__PURE__*/_jsx(LayoutHeader, {
478
481
  padding: 0,
479
482
  hasDivider: navHasDividers,
@@ -11,6 +11,11 @@
11
11
  * - Status icon (themeProps 'banner-icon'): the target rides on the default
12
12
  * <Icon> itself — the element that paints — so 'status:X' overrides reach
13
13
  * the glyph (#4166); for a custom `icon` node it stays on the layout wrapper
14
+ * - Description (themeProps 'banner-description'): the supporting line owns its
15
+ * own colour and type, and the space between it and the title
16
+ * - The end area carries no target: it is a layout row (flex, wrap, edge
17
+ * compensation) rather than a painted surface, and a theme that wants the
18
+ * header to grow around its buttons sets `padding-block` on 'banner'
14
19
  * - No left border accent — color is expressed through the full header background
15
20
  * - Each visual area owns its own border-radius (no overflow:clip on the container)
16
21
  * - Children are collapsible by default: a toggle appears in the header end
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAA0B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgB5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAI9C,OAAO,KAA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G;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAkB,EAClB,SAAkB,EAClB,WAAkB,EAClB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,cAAc,EACd,oBAAoB,EACpB,GAAG,IAAI,EACR,EAAE,WAAW,sCAmPb;yBAvQe,MAAM"}
@@ -15,6 +15,11 @@
15
15
  * - Status icon (themeProps 'banner-icon'): the target rides on the default
16
16
  * <Icon> itself — the element that paints — so 'status:X' overrides reach
17
17
  * the glyph (#4166); for a custom `icon` node it stays on the layout wrapper
18
+ * - Description (themeProps 'banner-description'): the supporting line owns its
19
+ * own colour and type, and the space between it and the title
20
+ * - The end area carries no target: it is a layout row (flex, wrap, edge
21
+ * compensation) rather than a painted surface, and a theme that wants the
22
+ * header to grow around its buttons sets `padding-block` on 'banner'
18
23
  * - No left border accent — color is expressed through the full header background
19
24
  * - Each visual area owns its own border-radius (no overflow:clip on the container)
20
25
  * - Children are collapsible by default: a toggle appears in the header end
@@ -429,9 +434,9 @@ export function Banner({
429
434
  },
430
435
  children: title
431
436
  }), isRenderable(description) && /*#__PURE__*/_jsx("div", {
432
- ...{
437
+ ...mergeProps(themeProps('banner-description'), {
433
438
  className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe"
434
- },
439
+ }),
435
440
  children: description
436
441
  })]
437
442
  }), showEndArea && /*#__PURE__*/_jsxs("div", {
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * @file BreadcrumbItem.tsx
3
3
  * @input Uses React use/useRef/useEffect, stylex, theme tokens, BreadcrumbContext,
4
- * and (for the menu trigger) usePopover + the shared DropdownMenu item API
5
- * (renderDropdownItems, DropdownMenuContext, MENU_ITEM_SELECTOR, useListFocus)
4
+ * rtlStyles for the contextual default slash, and (for the menu trigger)
5
+ * usePopover + the shared DropdownMenu item API (renderDropdownItems,
6
+ * DropdownMenuContext, MENU_ITEM_SELECTOR, useListFocus)
6
7
  * @output Exports BreadcrumbItem component and BreadcrumbItemProps
7
8
  * @position Individual breadcrumb item; used inside Breadcrumbs
8
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/BreadcrumbItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAS5C,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,8BAA8B,CAAC;AAOrE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,SAAS,CAAC,aAAa,CAAC,EACxB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OA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AIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAqID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,mBAAmB,qBAkMrB;yBAjNe,cAAc"}
@@ -5,8 +5,9 @@
5
5
  /**
6
6
  * @file BreadcrumbItem.tsx
7
7
  * @input Uses React use/useRef/useEffect, stylex, theme tokens, BreadcrumbContext,
8
- * and (for the menu trigger) usePopover + the shared DropdownMenu item API
9
- * (renderDropdownItems, DropdownMenuContext, MENU_ITEM_SELECTOR, useListFocus)
8
+ * rtlStyles for the contextual default slash, and (for the menu trigger)
9
+ * usePopover + the shared DropdownMenu item API (renderDropdownItems,
10
+ * DropdownMenuContext, MENU_ITEM_SELECTOR, useListFocus)
10
11
  * @output Exports BreadcrumbItem component and BreadcrumbItemProps
11
12
  * @position Individual breadcrumb item; used inside Breadcrumbs
12
13
  *
@@ -27,7 +28,7 @@ import "../theme/tokens.stylex.js";
27
28
  import { colorVars, spacingVars, typeScaleVars, radiusVars, fontWeightVars } from "../theme/tokens.stylex.js";
28
29
  import { BreadcrumbContext } from "./Breadcrumbs.js";
29
30
  import { useLinkComponent } from "../Link/useLinkComponent.js";
30
- import { mergeProps } from "../utils/index.js";
31
+ import { mergeProps, rtlStyles } from "../utils/index.js";
31
32
  import { themeProps } from "../utils/themeProps.js";
32
33
  import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
33
34
  import { Icon } from "../Icon/index.js";
@@ -99,6 +100,20 @@ const itemStyles = {
99
100
  $$css: true
100
101
  }
101
102
  };
103
+ function BreadcrumbSeparator({
104
+ separator
105
+ }) {
106
+ return /*#__PURE__*/_jsx("span", {
107
+ "aria-hidden": "true",
108
+ ...{
109
+ className: "x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o"
110
+ },
111
+ children: separator === '/' ? /*#__PURE__*/_jsx("span", {
112
+ ...stylex.props(rtlStyles.mirror),
113
+ children: "/"
114
+ }) : separator
115
+ });
116
+ }
102
117
  const menuStyles = {
103
118
  popover: {
104
119
  k7Eaqz: "x5w4yej",
@@ -220,12 +235,8 @@ export function BreadcrumbItem({
220
235
  }), stylex.props(itemStyles.root, isSupporting ? itemStyles.supportingSize : itemStyles.defaultSize, xstyle), className, style),
221
236
  "data-testid": testId,
222
237
  ...rest,
223
- children: [/*#__PURE__*/_jsx("span", {
224
- "aria-hidden": "true",
225
- ...{
226
- className: "x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o"
227
- },
228
- children: ctx.separator
238
+ children: [/*#__PURE__*/_jsx(BreadcrumbSeparator, {
239
+ separator: ctx.separator
229
240
  }), hasMenu ?
230
241
  /*#__PURE__*/
231
242
  // A current crumb can also open a sibling menu — the trigger keeps
@@ -262,12 +273,8 @@ export function BreadcrumbItem({
262
273
  }), stylex.props(itemStyles.root, isSupporting ? itemStyles.supportingSize : itemStyles.defaultSize, xstyle), className, style),
263
274
  "data-testid": testId,
264
275
  ...rest,
265
- children: [/*#__PURE__*/_jsx("span", {
266
- "aria-hidden": "true",
267
- ...{
268
- className: "x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o"
269
- },
270
- children: ctx.separator
276
+ children: [/*#__PURE__*/_jsx(BreadcrumbSeparator, {
277
+ separator: ctx.separator
271
278
  }), hasMenu ? /*#__PURE__*/_jsx(BreadcrumbMenuTrigger, {
272
279
  ref: contentRef,
273
280
  menu: menu,
@@ -46,8 +46,8 @@ export interface ChatComposerProps extends Omit<BaseProps<HTMLDivElement>, 'onCh
46
46
  /**
47
47
  * Resting elevation of the composer body. `low` (the default) keeps today's
48
48
  * raised look — low at rest, bumping to med on hover / focus. `none` flattens
49
- * it and draws a border with the same rest / hover / focus treatment as a
50
- * text input (emphasized border → accent on focus, with matching inset rings).
49
+ * it and draws a border. Keyboard focus in the editor adds the shared focus
50
+ * ring in either presentation; pointer focus does not add that ring.
51
51
  * @default 'low'
52
52
  */
53
53
  elevation?: 'none' | 'low';
@@ -1 +1 @@
1
- {"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA0B5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,GAAG,UAAU,CACxB;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,+CAA+C;IAC/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ChH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,gHAAgH;IAChH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iEAAiE;IACjE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oDAAoD;IACpD,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CACnC;AA8MD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA2MpD;yBA3Me,YAAY"}
@@ -33,6 +33,8 @@ import { ChatComposerContext } from "./ChatContext.js";
33
33
  import { ChatSendButton } from "./ChatSendButton.js";
34
34
  import { themeProps } from "../utils/themeProps.js";
35
35
  import { useTranslator } from "../i18n/index.js";
36
+ import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
37
+ import { getInteractionModality, useInteractionModalityTracking } from "../utils/interactionModality.js";
36
38
 
37
39
  // =============================================================================
38
40
  // Types
@@ -65,7 +67,8 @@ const styles = {
65
67
 
66
68
  // Resting elevation for the composer body, narrowed to two steps.
67
69
  // - `low` (default) preserves today's look: low at rest, bumping to med on
68
- // hover / focus-within (a CSS-only interaction state the component owns).
70
+ // hover / focus-within. The WCAG focus indicator is a separate shared ring,
71
+ // gated to keyboard focus in the editor; the shadow change remains depth.
69
72
  // - `none` is flat; depth comes from a border + inset rings instead. The
70
73
  // border is drawn *inside* the padding — its width is subtracted from every
71
74
  // side (like Card) so total inset (border + padding) equals the elevated
@@ -88,6 +91,9 @@ const elevationStyles = {
88
91
  $$css: true
89
92
  }
90
93
  };
94
+ function isComposerEditor(target) {
95
+ return target instanceof HTMLElement && target.matches('textarea, [contenteditable="true"], [role="textbox"], input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"]');
96
+ }
91
97
 
92
98
  // =============================================================================
93
99
  // Component
@@ -134,6 +140,8 @@ export function ChatComposer(props) {
134
140
  } = props;
135
141
  const placeholder = placeholderFromProps ?? t('@astryx.chat.composer.placeholder');
136
142
  const [internalValue, setInternalValue] = useState('');
143
+ const [hasKeyboardEditorFocus, setHasKeyboardEditorFocus] = useState(false);
144
+ useInteractionModalityTracking();
137
145
  const isControlled = controlledValue !== undefined;
138
146
  const currentValue = isControlled ? controlledValue : internalValue;
139
147
  const updateValue = useCallback(newValue => {
@@ -175,6 +183,14 @@ export function ChatComposer(props) {
175
183
  const editable = bodyRef.current?.querySelector('[contenteditable="true"], textarea');
176
184
  editable?.focus();
177
185
  }, []);
186
+ const handleBodyFocusCapture = useCallback(event => {
187
+ setHasKeyboardEditorFocus(isComposerEditor(event.target) && getInteractionModality() === 'keyboard');
188
+ }, []);
189
+ const handleBodyBlurCapture = useCallback(event => {
190
+ if (!event.currentTarget.contains(event.relatedTarget)) {
191
+ setHasKeyboardEditorFocus(false);
192
+ }
193
+ }, []);
178
194
  const statusEl = status ? /*#__PURE__*/_jsxs("div", {
179
195
  role: status.type === 'error' ? 'alert' : 'status',
180
196
  ...{
@@ -238,7 +254,10 @@ export function ChatComposer(props) {
238
254
  children: [statusPosition === 'top' && statusEl, drawer, /*#__PURE__*/_jsxs("div", {
239
255
  ref: bodyRef,
240
256
  onClick: handleBodyClick,
241
- ...stylex.props(styles.body, elevationStyles[elevation], density === 'compact' && styles.compact, xstyle),
257
+ onPointerDownCapture: () => setHasKeyboardEditorFocus(false),
258
+ onFocusCapture: handleBodyFocusCapture,
259
+ onBlurCapture: handleBodyBlurCapture,
260
+ ...stylex.props(styles.body, elevationStyles[elevation], hasKeyboardEditorFocus && focusOutlineStyles.focusWithin, density === 'compact' && styles.compact, xstyle),
242
261
  children: [(headerActions || headerContext) && /*#__PURE__*/_jsxs("div", {
243
262
  ...{
244
263
  className: "x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg"
@@ -1 +1 @@
1
- {"version":3,"file":"ChatComposerInput.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerInput.tsx"],"names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K,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC5D;AA8FD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,+BAwgB9D;yBAxgBe,iBAAiB;;;AAghBjC,wBAAgB,wBAAwB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAC,+BAc3E;yBAde,wBAAwB"}
@@ -30,7 +30,7 @@ import { colorVars, spacingVars, typeScaleVars, typographyVars } from "../theme/
30
30
  import { mergeProps, isImeKeyEvent } from "../utils/index.js";
31
31
  import { useTriggerMenu } from "./useTriggerMenu.js";
32
32
  import { useChatComposerTokens, isCustomToken } from "./useChatComposerTokens.js";
33
- import { ensureCaretInside, insertTextAtCursor } from "./chatComposerSelection.js";
33
+ import { ensureCaretInside, insertTextAtCursor, isSelectionAtStart, isSelectionAtEnd, placeCaretAtEnd, getSelectionRangeInside, restoreSelectionRange } from "./chatComposerSelection.js";
34
34
  import { ChatPastedTextToken } from "./ChatPastedTextToken.js";
35
35
  import { useChatPasteAsToken } from "./useChatPasteAsToken.js";
36
36
  import { Badge } from "../Badge/index.js";
@@ -182,11 +182,65 @@ export function ChatComposerInput(props) {
182
182
  // when a parent attaches a ref — without this, paste-as-token would
183
183
  // silently no-op whenever `ChatComposerInput` is rendered without
184
184
  // a forwarded ref (e.g. inside `ChatComposer`).
185
+ /**
186
+ * Focus the editable and put the caret after the draft.
187
+ *
188
+ * A bare `focus()` is not enough: Chromium collapses the caret to the
189
+ * start of the content, which is the one position where ArrowUp means
190
+ * "recall history" — so focusing a composer that already holds a draft
191
+ * would arm the next ArrowUp to replace it. Landing after the text is
192
+ * also what a click on the composer's trailing space means.
193
+ */
194
+ /**
195
+ * Focus the editable, keeping a caret or selection the user already has
196
+ * inside it.
197
+ *
198
+ * A bare `focus()` is not enough on its own: Chromium collapses the caret
199
+ * to the start of the content, which is the one position where ArrowUp
200
+ * means "recall history" — so focusing a composer that already holds a
201
+ * draft would arm the next ArrowUp to replace it. But a consumer calling
202
+ * `focus()` to return the user to where they were must not have their
203
+ * caret moved either, so an existing in-editor selection is captured
204
+ * before focusing and restored after. Only when there is none does the
205
+ * caret land after the draft.
206
+ */
207
+ const focusEditable = useCallback(() => {
208
+ const editable = editableRef.current;
209
+ if (!editable) {
210
+ return;
211
+ }
212
+ // Read before focusing: `focus()` itself creates the offset-0 caret, so
213
+ // asking afterwards cannot tell the user's own caret from the engine's.
214
+ const existing = getSelectionRangeInside(editable);
215
+ editable.focus();
216
+ if (existing) {
217
+ restoreSelectionRange(existing);
218
+ return;
219
+ }
220
+ placeCaretAtEnd(editable);
221
+ }, []);
222
+
223
+ /**
224
+ * Focus the editable and put the caret after the draft, whatever the
225
+ * selection was.
226
+ *
227
+ * This is the composer shell's click-to-focus path: clicking the empty
228
+ * space after a draft means "put me after the text", so it overrides a
229
+ * stale caret rather than restoring one.
230
+ */
231
+ const focusEditableAtEnd = useCallback(() => {
232
+ const editable = editableRef.current;
233
+ if (!editable) {
234
+ return;
235
+ }
236
+ editable.focus();
237
+ placeCaretAtEnd(editable);
238
+ }, []);
185
239
  const handle = {
186
240
  insertToken: token => insertTokenRef.current(token),
187
241
  expandToken: id => tokens.expandToken(id),
188
242
  insertText: text => insertTextRef.current(text),
189
- focus: () => editableRef.current?.focus(),
243
+ focus: focusEditable,
190
244
  getValue: () => serialize(editableRef.current ?? document.createElement('div'))
191
245
  };
192
246
  selfRef.current = handle;
@@ -201,12 +255,12 @@ export function ChatComposerInput(props) {
201
255
  return;
202
256
  }
203
257
  inputControlRef.current = {
204
- focus: () => editableRef.current?.focus()
258
+ focus: focusEditableAtEnd
205
259
  };
206
260
  return () => {
207
261
  inputControlRef.current = null;
208
262
  };
209
- }, [inputControlRef]);
263
+ }, [inputControlRef, focusEditableAtEnd]);
210
264
  useEffect(() => {
211
265
  if (controlledValue === undefined || !editableRef.current) {
212
266
  return;
@@ -373,12 +427,36 @@ export function ChatComposerInput(props) {
373
427
  return;
374
428
  }
375
429
 
376
- // History navigation (only when trigger menu is not active)
430
+ // History navigation (only when trigger menu is not active).
431
+ // Recall only at the text boundaries so the caret can still move
432
+ // between lines in a multi-line draft: ArrowUp recalls the
433
+ // previous message when the caret is at the very start, ArrowDown
434
+ // steps forward when it's at the very end. A recalled message is
435
+ // shown fully selected (see `selectAll` below); that spans both
436
+ // boundaries at once, so repeated presses keep stepping through
437
+ // history. Mid-text, we bail before `preventDefault` and let the
438
+ // browser move the caret up/down a line.
377
439
  if (hasHistory && (e.key === 'ArrowUp' || e.key === 'ArrowDown')) {
378
440
  if (!editableRef.current) {
379
441
  return;
380
442
  }
381
- const text = serialize(editableRef.current);
443
+ const editable = editableRef.current;
444
+ // Last-resort fallback for a caret we never placed: an engine that
445
+ // leaves no Range inside the editable on focus, or a consumer that
446
+ // focused the DOM node directly instead of through our focus
447
+ // control. Place it where the focus control would have, so a
448
+ // pending draft is never mistaken for a caret at the start. A no-op
449
+ // whenever a real caret exists — including one the user moved.
450
+ ensureCaretInside(editable);
451
+ const isCollapsed = window.getSelection()?.isCollapsed ?? true;
452
+ const atStart = isSelectionAtStart(editable);
453
+ const atEnd = isSelectionAtEnd(editable);
454
+ const canRecallPrev = atStart && (isCollapsed || atEnd);
455
+ const canRecallNext = atEnd && (isCollapsed || atStart);
456
+ if (e.key === 'ArrowUp' ? !canRecallPrev : !canRecallNext) {
457
+ return;
458
+ }
459
+ const text = serialize(editable);
382
460
  const history = historyRef.current;
383
461
  if (history.length === 0) {
384
462
  return;
@@ -7,31 +7,93 @@
7
7
  * Selection helpers for the contentEditable chat input. Both the
8
8
  * imperative `insertToken` / `insertText` APIs and the paste pipeline
9
9
  * need a valid Range inside the editable before they can mutate the
10
- * DOM. Browsers do NOT create a Selection range when an element is
11
- * programmatically focused — a Range only exists once the user has
12
- * clicked inside the editable or we've created one explicitly.
10
+ * DOM, and history recall needs to know where the caret sits.
13
11
  *
14
- * `ensureCaretInside` centralizes the fallback: if the current
15
- * Selection has no Range inside the given editable, place a collapsed
16
- * caret at the end of the editable. Callers can then read
17
- * `selection.getRangeAt(0)` safely.
12
+ * What a programmatic `focus()` does to the Selection is browser- and
13
+ * state-dependent, and it is never what a click on the composer's padding
14
+ * means. Measured in Chromium: focusing a contentEditable collapses the
15
+ * caret to offset 0 — the *start* of the draft — whether or not a
16
+ * selection existed before, and whether the editable is empty or not.
17
+ * Other engines may instead leave no Range inside the editable at all.
18
+ *
19
+ * So the composer never infers the caret from a bare `focus()`:
20
+ * - `placeCaretAtEnd` states the caret outright, and is what the composer
21
+ * shell's click-to-focus uses, because clicking the space after a draft
22
+ * means "put me after the text" in every chat composer.
23
+ * - `getSelectionRangeInside` + `restoreSelectionRange` let the imperative
24
+ * `focus()` keep a caret or selection the user already had: it is read
25
+ * before focusing, since afterwards the engine's own caret is
26
+ * indistinguishable from theirs.
27
+ * - `ensureCaretInside` is the weaker fallback for callers that only
28
+ * need *a* valid Range (paste, imperative insertion): it respects a
29
+ * caret that already exists and creates one at the end otherwise.
18
30
  *
19
31
  * SYNC: When modified, update:
20
32
  * - /packages/core/src/Chat/ChatComposerInput.tsx (consumer)
21
33
  * - /packages/core/src/Chat/useChatComposerTokens.ts (consumer)
22
34
  */
35
+ /**
36
+ * The current Selection's range when it lies inside `editable`, or `null`.
37
+ *
38
+ * Callers use this to read the caret *before* focusing, because `focus()`
39
+ * creates a caret of its own and afterwards the two are indistinguishable.
40
+ * The range is cloned, so later DOM work cannot mutate the saved position.
41
+ */
42
+ export declare function getSelectionRangeInside(editable: HTMLElement): Range | null;
43
+ /** Make `range` the current Selection again. */
44
+ export declare function restoreSelectionRange(range: Range): void;
45
+ /**
46
+ * Collapse the Selection to the very end of `editable`'s content,
47
+ * replacing whatever the Selection held before.
48
+ *
49
+ * Unlike {@link ensureCaretInside} this is unconditional: a caret the
50
+ * browser placed on `focus()` is overwritten, which is the point — that
51
+ * caret lands at the start of the draft, where ArrowUp means "recall
52
+ * history" and would discard what the user had typed.
53
+ *
54
+ * Returns `true` when the caret was placed, `false` if the Selection API
55
+ * is unavailable (e.g. a detached document).
56
+ */
57
+ export declare function placeCaretAtEnd(editable: HTMLElement): boolean;
23
58
  /**
24
59
  * Ensure the current Selection has a Range inside `editable`.
25
60
  *
26
61
  * If `window.getSelection()` already has a Range whose `startContainer`
27
- * is inside `editable`, this is a no-op. Otherwise a collapsed caret
28
- * is placed at the end of `editable` and the Selection is updated.
62
+ * is inside `editable`, this is a no-op — including the start-of-draft
63
+ * caret a `focus()` leaves behind, which is why callers that care where
64
+ * the caret lands want {@link placeCaretAtEnd} instead. Otherwise a
65
+ * collapsed caret is placed at the end of `editable`.
29
66
  *
30
67
  * Returns the live `Selection` on success, or `null` if no Selection
31
68
  * is available at all (e.g. detached document, JSDOM without selection
32
69
  * support).
33
70
  */
34
71
  export declare function ensureCaretInside(editable: HTMLElement): Selection | null;
72
+ /**
73
+ * Whether the current selection's start boundary sits at the very
74
+ * beginning of `editable`'s content.
75
+ *
76
+ * Used by the composer to decide when ArrowUp should recall message
77
+ * history versus move the caret up a line: history is only recalled
78
+ * when the caret is at the very start of the draft. This handles both
79
+ * the editable root and offset 0 of its leading text node without
80
+ * cloning the draft's contents.
81
+ *
82
+ * Returns `false` when there is no selection, the range is not inside
83
+ * `editable`, or the boundary APIs are unavailable — callers treat
84
+ * that as "not at the boundary" and let the browser move the caret.
85
+ */
86
+ export declare function isSelectionAtStart(editable: HTMLElement): boolean;
87
+ /**
88
+ * Whether the current selection's end boundary sits at the very end of
89
+ * `editable`'s content.
90
+ *
91
+ * The ArrowDown counterpart to {@link isSelectionAtStart}: history is
92
+ * only stepped forward when the caret is at the very end of the draft.
93
+ *
94
+ * Returns `false` under the same conditions as {@link isSelectionAtStart}.
95
+ */
96
+ export declare function isSelectionAtEnd(editable: HTMLElement): boolean;
35
97
  /**
36
98
  * Insert plain text at the current selection, scoped to `editable`.
37
99
  *
@@ -1 +1 @@
1
- {"version":3,"file":"chatComposerSelection.d.ts","sourceRoot":"","sources":["../../src/Chat/chatComposerSelection.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAmBzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,MAAM,GACX,OAAO,CAiBT"}
1
+ {"version":3,"file":"chatComposerSelection.d.ts","sourceRoot":"","sources":["../../src/Chat/chatComposerSelection.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,CAa3E;AAED,gDAAgD;AAChD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAOxD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAW9D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAmBzE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAYjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAO/D;AAiED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,MAAM,GACX,OAAO,CAiBT"}