@astryxdesign/core 0.5.2-canary.2da7a39 → 0.5.2-canary.2e51213

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 (375) 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/Carousel/Carousel.d.ts.map +1 -1
  11. package/dist/Carousel/Carousel.js +2 -2
  12. package/dist/Chat/ChatComposer.d.ts +2 -2
  13. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  14. package/dist/Chat/ChatComposer.js +21 -2
  15. package/dist/Chat/ChatToolCalls.d.ts +1 -1
  16. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  17. package/dist/Chat/ChatToolCalls.js +12 -34
  18. package/dist/Chat/useChatNewMessages.js +3 -3
  19. package/dist/CheckboxList/CheckboxListItem.d.ts +5 -3
  20. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  21. package/dist/DateTimeInput/DateTimeInput.d.ts +47 -13
  22. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  23. package/dist/DateTimeInput/DateTimeInput.js +269 -162
  24. package/dist/DateTimeInput/NativeDateSegment.d.ts +24 -0
  25. package/dist/DateTimeInput/NativeDateSegment.d.ts.map +1 -0
  26. package/dist/DateTimeInput/NativeDateSegment.js +235 -0
  27. package/dist/DateTimeInput/NativeTimeSegment.d.ts +30 -0
  28. package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -0
  29. package/dist/DateTimeInput/NativeTimeSegment.js +248 -0
  30. package/dist/DateTimeInput/index.d.ts +1 -1
  31. package/dist/DateTimeInput/index.d.ts.map +1 -1
  32. package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +95 -0
  33. package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts.map +1 -0
  34. package/dist/DateTimeInput/nativePickerSegmentStyles.js +103 -0
  35. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  36. package/dist/DropdownMenu/DropdownMenu.js +2 -4
  37. package/dist/Field/Field.d.ts.map +1 -1
  38. package/dist/Field/Field.js +10 -4
  39. package/dist/Field/PanelSearchInput.d.ts.map +1 -1
  40. package/dist/Field/PanelSearchInput.js +3 -5
  41. package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
  42. package/dist/FieldStatus/FieldStatus.js +4 -2
  43. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  44. package/dist/Layer/useTouchTrigger.js +2 -4
  45. package/dist/Layout/Layout.d.ts +7 -8
  46. package/dist/Layout/Layout.d.ts.map +1 -1
  47. package/dist/Layout/Layout.js +7 -8
  48. package/dist/MultiSelector/MultiSelector.d.ts +11 -1
  49. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  50. package/dist/MultiSelector/MultiSelector.js +89 -45
  51. package/dist/RadioList/RadioListItem.d.ts +30 -5
  52. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  53. package/dist/RadioList/RadioListItem.js +17 -4
  54. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  55. package/dist/Resizable/ResizeHandle.js +102 -44
  56. package/dist/Resizable/index.d.ts +2 -0
  57. package/dist/Resizable/index.d.ts.map +1 -1
  58. package/dist/Resizable/index.js +1 -0
  59. package/dist/Resizable/useResizable.d.ts +89 -8
  60. package/dist/Resizable/useResizable.d.ts.map +1 -1
  61. package/dist/Resizable/useResizable.js +521 -38
  62. package/dist/Resizable/utils.d.ts +35 -0
  63. package/dist/Resizable/utils.d.ts.map +1 -0
  64. package/dist/Resizable/utils.js +27 -0
  65. package/dist/Selector/Selector.d.ts +10 -0
  66. package/dist/Selector/Selector.d.ts.map +1 -1
  67. package/dist/Selector/Selector.js +105 -57
  68. package/dist/Selector/useSelectorPresentation.d.ts +1 -0
  69. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
  70. package/dist/Selector/useSelectorPresentation.js +17 -2
  71. package/dist/Slider/Slider.d.ts.map +1 -1
  72. package/dist/Slider/Slider.js +3 -5
  73. package/dist/Spinner/Spinner.d.ts.map +1 -1
  74. package/dist/Spinner/Spinner.js +9 -10
  75. package/dist/Stepper/Step.d.ts +2 -1
  76. package/dist/Stepper/Step.d.ts.map +1 -1
  77. package/dist/Stepper/Step.js +75 -11
  78. package/dist/Stepper/Stepper.d.ts.map +1 -1
  79. package/dist/Stepper/Stepper.js +1 -0
  80. package/dist/TabList/TabList.d.ts.map +1 -1
  81. package/dist/TabList/TabList.js +2 -3
  82. package/dist/Table/index.d.ts +16 -1
  83. package/dist/Table/index.d.ts.map +1 -1
  84. package/dist/Table/index.js +4 -0
  85. package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
  86. package/dist/Table/plugins/columnResize/useTableColumnResize.js +8 -9
  87. package/dist/Table/plugins/rowStatus/index.d.ts +1 -1
  88. package/dist/Table/plugins/rowStatus/index.d.ts.map +1 -1
  89. package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +11 -30
  90. package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
  91. package/dist/Table/plugins/rowStatus/useTableRowStatus.js +108 -62
  92. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  93. package/dist/Table/plugins/sortable/useTableSortable.js +9 -1
  94. package/dist/Text/useTruncation.d.ts +1 -1
  95. package/dist/Text/useTruncation.d.ts.map +1 -1
  96. package/dist/Text/useTruncation.js +8 -7
  97. package/dist/TimeInput/TimeInput.d.ts +16 -1
  98. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  99. package/dist/TimeInput/TimeInput.js +98 -60
  100. package/dist/TimeInput/index.d.ts +1 -1
  101. package/dist/TimeInput/index.d.ts.map +1 -1
  102. package/dist/Timestamp/Timestamp.d.ts +2 -2
  103. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  104. package/dist/Timestamp/Timestamp.js +4 -145
  105. package/dist/Timestamp/formatRelativeTime.d.ts +20 -0
  106. package/dist/Timestamp/formatRelativeTime.d.ts.map +1 -0
  107. package/dist/Timestamp/formatRelativeTime.js +81 -0
  108. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  109. package/dist/Toast/ToastViewport.js +125 -77
  110. package/dist/Tokenizer/Tokenizer.d.ts +0 -38
  111. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  112. package/dist/Tokenizer/Tokenizer.js +94 -26
  113. package/dist/Tokenizer/useEndLaneReserve.d.ts +31 -0
  114. package/dist/Tokenizer/useEndLaneReserve.d.ts.map +1 -0
  115. package/dist/Tokenizer/useEndLaneReserve.js +136 -0
  116. package/dist/Tooltip/useTooltip.d.ts +1 -1
  117. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  118. package/dist/Tooltip/useTooltip.js +53 -42
  119. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  120. package/dist/Typeahead/BaseTypeahead.js +85 -30
  121. package/dist/Typeahead/Typeahead.d.ts +0 -21
  122. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  123. package/dist/Typeahead/Typeahead.js +108 -67
  124. package/dist/Typeahead/busyIndicatorLane.d.ts +62 -0
  125. package/dist/Typeahead/busyIndicatorLane.d.ts.map +1 -0
  126. package/dist/Typeahead/busyIndicatorLane.js +98 -0
  127. package/dist/astryx.css +25 -7
  128. package/dist/hooks/useFocusReturnVisibility.d.ts.map +1 -1
  129. package/dist/hooks/useFocusReturnVisibility.js +3 -5
  130. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
  131. package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
  132. package/dist/hooks/useOverflow.js +11 -11
  133. package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
  134. package/dist/hooks/useScrollOverflow.js +7 -4
  135. package/dist/theme/defineTheme.d.ts +13 -0
  136. package/dist/theme/defineTheme.d.ts.map +1 -1
  137. package/dist/theme/defineTheme.js +7 -0
  138. package/dist/theme/generateThemeRules.d.ts.map +1 -1
  139. package/dist/theme/generateThemeRules.js +1 -1
  140. package/dist/theme/localTokens.d.ts +18 -0
  141. package/dist/theme/localTokens.d.ts.map +1 -0
  142. package/dist/theme/localTokens.js +162 -0
  143. package/dist/utils/interactionModality.d.ts +6 -28
  144. package/dist/utils/interactionModality.d.ts.map +1 -1
  145. package/dist/utils/interactionModality.js +72 -37
  146. package/dist/utils/sharedResizeObserver.d.ts +17 -9
  147. package/dist/utils/sharedResizeObserver.d.ts.map +1 -1
  148. package/dist/utils/sharedResizeObserver.js +54 -12
  149. package/locales/en.json +8 -0
  150. package/locales/pseudo.json +6 -0
  151. package/package.json +7 -2
  152. package/src/AlertDialog/useImperativeAlertDialog.test.tsx +163 -0
  153. package/src/AppShell/AppShell.doc.mjs +4 -3
  154. package/src/AppShell/AppShell.test.tsx +21 -0
  155. package/src/AppShell/AppShell.tsx +12 -7
  156. package/src/Banner/Banner.doc.mjs +5 -1
  157. package/src/Banner/Banner.tsx +12 -1
  158. package/src/BottomSheet/BottomSheet.doc.mjs +31 -0
  159. package/src/BottomSheet/BottomSheet.spec.md +178 -0
  160. package/src/Breadcrumbs/BreadcrumbItem.tsx +18 -9
  161. package/src/Breadcrumbs/Breadcrumbs.doc.mjs +4 -1
  162. package/src/Breadcrumbs/Breadcrumbs.test.tsx +12 -0
  163. package/src/Button/Button.doc.mjs +56 -0
  164. package/src/ButtonGroup/ButtonGroup.doc.mjs +47 -0
  165. package/src/Calendar/hooks/useCalendarConstraints.test.ts +153 -0
  166. package/src/Calendar/hooks/useCalendarDays.test.ts +265 -0
  167. package/src/Calendar/hooks/useCalendarNavigation.test.ts +252 -0
  168. package/src/Carousel/Carousel.test.tsx +83 -0
  169. package/src/Carousel/Carousel.tsx +8 -2
  170. package/src/Chat/ChatComposer.doc.mjs +7 -4
  171. package/src/Chat/ChatComposer.test.tsx +84 -2
  172. package/src/Chat/ChatComposer.tsx +45 -3
  173. package/src/Chat/ChatSendButton.test.tsx +189 -0
  174. package/src/Chat/ChatToolCalls.doc.mjs +1 -1
  175. package/src/Chat/ChatToolCalls.test.tsx +33 -1
  176. package/src/Chat/ChatToolCalls.tsx +13 -34
  177. package/src/Chat/useChatNewMessages.ts +3 -3
  178. package/src/Chat/useChatPasteAsToken.test.ts +191 -0
  179. package/src/CheckboxList/CheckboxList.doc.mjs +172 -31
  180. package/src/CheckboxList/CheckboxList.spec.md +215 -0
  181. package/src/CheckboxList/CheckboxList.test.tsx +45 -0
  182. package/src/CheckboxList/CheckboxListItem.doc.mjs +11 -9
  183. package/src/CheckboxList/CheckboxListItem.tsx +5 -3
  184. package/src/Collapsible/useCollapsible.test.tsx +236 -0
  185. package/src/CommandPalette/CommandPalette.doc.mjs +72 -0
  186. package/src/CommandPalette/CommandPalette.spec.md +224 -0
  187. package/src/CommandPalette/CommandPaletteEmpty.test.tsx +101 -0
  188. package/src/ComplexSelector/ComplexSelector.doc.mjs +42 -0
  189. package/src/ComplexSelector/ComplexSelector.spec.md +190 -0
  190. package/src/ContextMenu/ContextMenu.doc.mjs +48 -0
  191. package/src/ContextMenu/ContextMenu.spec.md +207 -0
  192. package/src/DateTimeInput/DateTimeInput.doc.mjs +43 -23
  193. package/src/DateTimeInput/DateTimeInput.tsx +388 -181
  194. package/src/DateTimeInput/DateTimeInputTouch.test.tsx +10 -2
  195. package/src/DateTimeInput/NativeDateSegment.tsx +308 -0
  196. package/src/DateTimeInput/NativePickerSegments.test.tsx +626 -0
  197. package/src/DateTimeInput/NativeTimeSegment.tsx +331 -0
  198. package/src/DateTimeInput/index.ts +1 -0
  199. package/src/DateTimeInput/nativePickerSegmentStyles.ts +120 -0
  200. package/src/Divider/Divider.doc.mjs +24 -0
  201. package/src/Divider/Divider.spec.md +157 -0
  202. package/src/DropdownMenu/DropdownMenu.doc.mjs +104 -0
  203. package/src/DropdownMenu/DropdownMenu.spec.md +246 -0
  204. package/src/DropdownMenu/DropdownMenu.tsx +2 -4
  205. package/src/Field/Field.doc.mjs +1 -0
  206. package/src/Field/Field.test.tsx +39 -0
  207. package/src/Field/Field.tsx +18 -1
  208. package/src/Field/InputClearButton.test.tsx +68 -6
  209. package/src/Field/PanelSearchInput.tsx +3 -5
  210. package/src/FieldStatus/FieldStatus.doc.mjs +21 -0
  211. package/src/FieldStatus/FieldStatus.spec.md +213 -0
  212. package/src/FieldStatus/FieldStatus.test.tsx +17 -0
  213. package/src/FieldStatus/FieldStatus.tsx +7 -2
  214. package/src/Grid/Grid.doc.mjs +19 -0
  215. package/src/Grid/Grid.spec.md +162 -0
  216. package/src/Icon/Icon.doc.mjs +196 -48
  217. package/src/Icon/Icon.spec.md +192 -0
  218. package/src/IconButton/IconButton.doc.mjs +38 -0
  219. package/src/Kbd/Kbd.doc.mjs +18 -0
  220. package/src/Kbd/Kbd.spec.md +142 -0
  221. package/src/Layer/useTouchTrigger.ts +2 -4
  222. package/src/Layout/Layout.doc.mjs +57 -17
  223. package/src/Layout/Layout.spec.md +235 -0
  224. package/src/Layout/Layout.test.tsx +1 -1
  225. package/src/Layout/Layout.tsx +7 -8
  226. package/src/Layout/LayoutHeader.doc.mjs +9 -0
  227. package/src/Layout/LayoutPanel.doc.mjs +4 -3
  228. package/src/Lightbox/Lightbox.doc.mjs +149 -33
  229. package/src/Lightbox/Lightbox.spec.md +198 -0
  230. package/src/Lightbox/useLightbox.test.tsx +263 -0
  231. package/src/Markdown/Markdown.doc.mjs +60 -0
  232. package/src/Markdown/Markdown.spec.md +207 -0
  233. package/src/MobileNav/MobileNav.doc.mjs +140 -32
  234. package/src/MobileNav/MobileNav.spec.md +209 -0
  235. package/src/MoreMenu/MoreMenu.doc.mjs +42 -0
  236. package/src/MoreMenu/MoreMenu.spec.md +222 -0
  237. package/src/MultiSelector/MultiSelector.doc.mjs +124 -1
  238. package/src/MultiSelector/MultiSelector.spec.md +293 -0
  239. package/src/MultiSelector/MultiSelector.test.tsx +305 -2
  240. package/src/MultiSelector/MultiSelector.tsx +124 -55
  241. package/src/NavIcon/NavIcon.doc.mjs +17 -0
  242. package/src/NavIcon/NavIcon.spec.md +134 -0
  243. package/src/NavMenu/NavHeadingMenu.spec.md +210 -0
  244. package/src/NavMenu/NavMenu.doc.mjs +37 -0
  245. package/src/Outline/Outline.doc.mjs +35 -0
  246. package/src/Outline/Outline.spec.md +162 -0
  247. package/src/OverflowList/OverflowList.doc.mjs +24 -0
  248. package/src/OverflowList/OverflowList.spec.md +157 -0
  249. package/src/Pagination/Pagination.doc.mjs +74 -0
  250. package/src/Pagination/Pagination.spec.md +226 -0
  251. package/src/Popover/Popover.doc.mjs +264 -65
  252. package/src/Popover/Popover.spec.md +421 -0
  253. package/src/Popover/usePopover.doc.mjs +208 -33
  254. package/src/PowerSearch/PowerSearch.spec.md +291 -0
  255. package/src/PowerSearch/PowerSearchFilterEditor.test.tsx +253 -0
  256. package/src/PowerSearch/PowerSearchToken.test.tsx +228 -0
  257. package/src/ProgressBar/ProgressBar.doc.mjs +198 -38
  258. package/src/ProgressBar/ProgressBar.spec.md +261 -0
  259. package/src/RadioList/RadioList.test.tsx +136 -2
  260. package/src/RadioList/RadioListItem.doc.mjs +30 -11
  261. package/src/RadioList/RadioListItem.tsx +44 -8
  262. package/src/Resizable/Resizable.doc.mjs +130 -24
  263. package/src/Resizable/Resizable.spec.md +246 -0
  264. package/src/Resizable/ResizeHandle.test.tsx +177 -56
  265. package/src/Resizable/ResizeHandle.tsx +128 -45
  266. package/src/Resizable/index.ts +2 -0
  267. package/src/Resizable/shippedDirections.test.ts +462 -0
  268. package/src/Resizable/useResizable.doc.mjs +124 -29
  269. package/src/Resizable/useResizable.test.ts +1277 -3
  270. package/src/Resizable/useResizable.ts +760 -48
  271. package/src/Resizable/utils.test.ts +74 -0
  272. package/src/Resizable/utils.ts +35 -0
  273. package/src/Section/Section.doc.mjs +17 -0
  274. package/src/Section/Section.spec.md +139 -0
  275. package/src/SegmentedControl/SegmentedControl.doc.mjs +83 -0
  276. package/src/SegmentedControl/SegmentedControl.spec.md +152 -0
  277. package/src/Selector/Selector.doc.mjs +133 -97
  278. package/src/Selector/Selector.spec.md +300 -0
  279. package/src/Selector/Selector.test.tsx +318 -1
  280. package/src/Selector/Selector.tsx +127 -60
  281. package/src/Selector/useSelectorPresentation.ts +24 -4
  282. package/src/SideNav/SideNav.test.tsx +3 -3
  283. package/src/SideNav/SideNavCollapseButton.doc.mjs +8 -0
  284. package/src/SideNav/SideNavItem.doc.mjs +1 -1
  285. package/src/Skeleton/Skeleton.doc.mjs +12 -0
  286. package/src/Skeleton/Skeleton.spec.md +127 -0
  287. package/src/Slider/Slider.doc.mjs +184 -30
  288. package/src/Slider/Slider.spec.md +224 -0
  289. package/src/Slider/Slider.tsx +2 -5
  290. package/src/Spinner/Spinner.doc.mjs +5 -5
  291. package/src/Spinner/Spinner.test.tsx +32 -7
  292. package/src/Spinner/Spinner.tsx +46 -14
  293. package/src/Stack/Stack.doc.mjs +22 -0
  294. package/src/Stack/Stack.spec.md +155 -0
  295. package/src/StatusDot/StatusDot.doc.mjs +17 -0
  296. package/src/StatusDot/StatusDot.spec.md +138 -0
  297. package/src/Stepper/Step.doc.mjs +1 -1
  298. package/src/Stepper/Step.tsx +118 -5
  299. package/src/Stepper/Stepper.doc.mjs +51 -1
  300. package/src/Stepper/Stepper.spec.md +245 -0
  301. package/src/Stepper/Stepper.test.tsx +315 -0
  302. package/src/Stepper/Stepper.tsx +8 -0
  303. package/src/Switch/Switch.doc.mjs +40 -0
  304. package/src/Switch/Switch.spec.md +175 -0
  305. package/src/TabList/TabList.tsx +2 -3
  306. package/src/Table/Table.doc.mjs +102 -24
  307. package/src/Table/Table.perf.test.tsx +51 -1
  308. package/src/Table/Table.spec.md +325 -0
  309. package/src/Table/TableHeaderCell.test.tsx +291 -0
  310. package/src/Table/index.ts +19 -4
  311. package/src/Table/plugins/columnResize/useTableColumnResize.tsx +8 -12
  312. package/src/Table/plugins/filtering/useTableFilterState.test.tsx +143 -0
  313. package/src/Table/plugins/groupedRows/useTableGroupedRows.test.tsx +2 -1
  314. package/src/Table/plugins/rowStatus/index.ts +1 -4
  315. package/src/Table/plugins/rowStatus/useTableRowStatus.public.test.ts +92 -0
  316. package/src/Table/plugins/rowStatus/useTableRowStatus.spec.md +354 -0
  317. package/src/Table/plugins/rowStatus/useTableRowStatus.test.tsx +431 -56
  318. package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +155 -84
  319. package/src/Table/plugins/sortable/useTableSortable.test.tsx +72 -0
  320. package/src/Table/plugins/sortable/useTableSortable.tsx +18 -1
  321. package/src/Table/useTableGroupedRows.doc.mjs +2 -2
  322. package/src/Table/useTableRowStatus.doc.mjs +5 -5
  323. package/src/Text/Text.doc.mjs +190 -43
  324. package/src/Text/Text.spec.md +206 -0
  325. package/src/Text/useTruncation.ts +8 -7
  326. package/src/TextArea/TextArea.doc.mjs +255 -45
  327. package/src/TextArea/TextArea.spec.md +205 -0
  328. package/src/TimeInput/NativeTimeInput.test.tsx +269 -0
  329. package/src/TimeInput/TimeInput.doc.mjs +47 -23
  330. package/src/TimeInput/TimeInput.tsx +109 -50
  331. package/src/TimeInput/index.ts +1 -0
  332. package/src/Timestamp/Timestamp.doc.mjs +2 -2
  333. package/src/Timestamp/Timestamp.test.tsx +75 -3
  334. package/src/Timestamp/Timestamp.tsx +7 -153
  335. package/src/Timestamp/formatRelativeTime.ts +96 -0
  336. package/src/Toast/ToastViewport.test.tsx +194 -0
  337. package/src/Toast/ToastViewport.tsx +136 -58
  338. package/src/ToggleButton/ToggleButton.doc.mjs +56 -0
  339. package/src/Tokenizer/Tokenizer.doc.mjs +2 -0
  340. package/src/Tokenizer/Tokenizer.spec.md +293 -0
  341. package/src/Tokenizer/Tokenizer.test.tsx +335 -1
  342. package/src/Tokenizer/Tokenizer.tsx +129 -46
  343. package/src/Tokenizer/useEndLaneReserve.ts +146 -0
  344. package/src/Toolbar/Toolbar.doc.mjs +19 -0
  345. package/src/Toolbar/Toolbar.spec.md +174 -0
  346. package/src/Tooltip/Tooltip.doc.mjs +17 -0
  347. package/src/Tooltip/Tooltip.spec.md +142 -0
  348. package/src/Tooltip/Tooltip.test.tsx +21 -1
  349. package/src/Tooltip/useTooltip.test.tsx +318 -0
  350. package/src/Tooltip/useTooltip.tsx +60 -39
  351. package/src/TreeList/TreeList.doc.mjs +58 -0
  352. package/src/TreeList/TreeList.spec.md +224 -0
  353. package/src/Typeahead/BaseTypeahead.tsx +96 -25
  354. package/src/Typeahead/Typeahead.doc.mjs +89 -1
  355. package/src/Typeahead/Typeahead.spec.md +257 -0
  356. package/src/Typeahead/Typeahead.test.tsx +502 -1
  357. package/src/Typeahead/Typeahead.tsx +187 -69
  358. package/src/Typeahead/TypeaheadItem.test.tsx +93 -2
  359. package/src/Typeahead/busyIndicatorLane.tsx +109 -0
  360. package/src/__tests__/stylexDeclarations.ts +51 -0
  361. package/src/hooks/useFocusReturnVisibility.ts +3 -5
  362. package/src/hooks/useOverflow.ts +11 -11
  363. package/src/hooks/useScrollLock.test.ts +103 -0
  364. package/src/hooks/useScrollOverflow.ts +7 -4
  365. package/src/i18n/useTranslator.test.tsx +197 -0
  366. package/src/theme/defineTheme.test.ts +227 -0
  367. package/src/theme/defineTheme.ts +30 -0
  368. package/src/theme/derivedVarRegistry.test.ts +6 -0
  369. package/src/theme/generateThemeRules.ts +4 -1
  370. package/src/theme/localTokens.ts +272 -0
  371. package/src/theme/themingTargets.test.ts +126 -28
  372. package/src/utils/interactionModality.test.ts +83 -0
  373. package/src/utils/interactionModality.ts +88 -36
  374. package/src/utils/sharedResizeObserver.test.ts +124 -5
  375. package/src/utils/sharedResizeObserver.ts +60 -14
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @file useTooltip.tsx
7
7
  * @input Uses useLayer, useTouchTrigger, React hooks
8
- * @output Exports useTooltip hook for hover/focus/tap triggered tooltips
8
+ * @output Exports useTooltip hook with stable trigger refs for hover/focus/tap tooltips
9
9
  * @position Layer hook; builds on useLayer for tooltip behavior
10
10
  *
11
11
  * SYNC: When modified, update:
@@ -284,6 +284,15 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
284
284
  onShow,
285
285
  onHide,
286
286
  });
287
+ const {
288
+ ref: layerRef,
289
+ anchorId: layerAnchorId,
290
+ show: showLayer,
291
+ hide: hideLayer,
292
+ isOpen: isLayerOpen,
293
+ id: layerId,
294
+ render: renderLayer,
295
+ } = layer;
287
296
 
288
297
  const popoverXstyle = styles.container;
289
298
 
@@ -307,20 +316,26 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
307
316
  // passing across the trigger, and a tap is never that.
308
317
  const showNow = useCallback(() => {
309
318
  clearTimeouts();
310
- layer.show();
311
- }, [clearTimeouts, layer]);
319
+ showLayer();
320
+ }, [clearTimeouts, showLayer]);
312
321
 
313
322
  const hideNow = useCallback(() => {
314
323
  clearTimeouts();
315
- layer.hide();
316
- }, [clearTimeouts, layer]);
324
+ hideLayer();
325
+ }, [clearTimeouts, hideLayer]);
317
326
 
318
- const touch = useTouchTrigger({
327
+ const {
328
+ isTouchPointerRef,
329
+ isTouchInteraction,
330
+ handlePointerEnter,
331
+ handlePointerDown: handleTouchPointerDown,
332
+ clearTapOpen,
333
+ } = useTouchTrigger({
319
334
  touchTrigger,
320
335
  isEnabled,
321
336
  isControlled: isOpen !== undefined,
322
- isOpen: layer.isOpen,
323
- layerId: layer.id,
337
+ isOpen: isLayerOpen,
338
+ layerId: layerId,
324
339
  triggerRef,
325
340
  show: showNow,
326
341
  hide: hideNow,
@@ -333,9 +348,9 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
333
348
  }
334
349
  clearTimeouts();
335
350
  showTimeoutRef.current = setTimeout(() => {
336
- layer.show();
351
+ showLayer();
337
352
  }, delay);
338
- }, [isEnabled, isOpen, clearTimeouts, layer, delay]);
353
+ }, [isEnabled, isOpen, clearTimeouts, showLayer, delay]);
339
354
 
340
355
  // Schedule hide with delay (suppressed when isOpen is true).
341
356
  // A small hover bridge (when hideDelay is 0) lets the pointer travel from the
@@ -348,9 +363,9 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
348
363
  clearTimeouts();
349
364
  const effectiveHideDelay = hideDelay > 0 ? hideDelay : HOVER_BRIDGE_DELAY;
350
365
  hideTimeoutRef.current = setTimeout(() => {
351
- layer.hide();
366
+ hideLayer();
352
367
  }, effectiveHideDelay);
353
- }, [isOpen, clearTimeouts, layer, hideDelay]);
368
+ }, [isOpen, clearTimeouts, hideLayer, hideDelay]);
354
369
 
355
370
  // Cancel a pending hide (e.g. the pointer entered the tooltip surface).
356
371
  const cancelHide = useCallback(() => {
@@ -365,21 +380,21 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
365
380
  // A tap synthesizes mouseenter. On touch the tap path owns the decision,
366
381
  // so hover must not also fire — including the tap that just opened the
367
382
  // tooltip, which would otherwise be double-handled.
368
- if (touch.isTouchPointerRef.current) {
383
+ if (isTouchPointerRef.current) {
369
384
  return;
370
385
  }
371
386
  scheduleShow();
372
- }, [touch, scheduleShow]);
387
+ }, [isTouchPointerRef, scheduleShow]);
373
388
 
374
389
  const handleMouseLeave = useCallback(() => {
375
390
  // On touch the synthesized mouseleave arrives with the next tap elsewhere,
376
391
  // which the outside-tap dismissal already handles — and handling it here
377
392
  // too would close the tooltip behind the tap-open bookkeeping's back.
378
- if (touch.isTouchPointerRef.current) {
393
+ if (isTouchPointerRef.current) {
379
394
  return;
380
395
  }
381
396
  scheduleHide();
382
- }, [touch, scheduleHide]);
397
+ }, [isTouchPointerRef, scheduleHide]);
383
398
 
384
399
  const handleFocusIn = useCallback(
385
400
  (e: Event) => {
@@ -391,7 +406,7 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
391
406
  // matches it. Those are exactly the action triggers `auto` just decided
392
407
  // to keep shut, so without this the focus reopens what the tap
393
408
  // suppressed, over the field the user is trying to type into.
394
- if (touch.isTouchInteraction()) {
409
+ if (isTouchInteraction()) {
395
410
  return;
396
411
  }
397
412
  // Only show tooltip for keyboard focus (:focus-visible),
@@ -401,9 +416,9 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
401
416
  return;
402
417
  }
403
418
  clearTimeouts();
404
- layer.show();
419
+ showLayer();
405
420
  },
406
- [isEnabled, touch, clearTimeouts, layer],
421
+ [isEnabled, isTouchInteraction, clearTimeouts, showLayer],
407
422
  );
408
423
 
409
424
  const handleFocusOut = useCallback(() => {
@@ -414,25 +429,24 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
414
429
  // the hint has served its purpose, and a tooltip lingering over a
415
430
  // just-pressed control reads as stale. Fires on pointerdown so it feels
416
431
  // immediate. Uncontrolled tooltips only — a controlled tooltip's visibility
417
- // is owned by the consumer. `layer.hide()` self-guards when already closed.
432
+ // is owned by the consumer. `hideLayer()` self-guards when already closed.
418
433
  // A touch press is a different gesture (it may be the only way to open the
419
434
  // tooltip at all), so the touch path answers it first.
420
435
  const handlePointerDown = useCallback(
421
436
  (event: PointerEvent) => {
422
- if (touch.handlePointerDown(event)) {
437
+ if (handleTouchPointerDown(event)) {
423
438
  return;
424
439
  }
425
440
  if (isOpen !== undefined) {
426
441
  return;
427
442
  }
428
443
  clearTimeouts();
429
- layer.hide();
444
+ hideLayer();
430
445
  },
431
- [touch, isOpen, clearTimeouts, layer],
446
+ [handleTouchPointerDown, isOpen, clearTimeouts, hideLayer],
432
447
  );
433
448
 
434
449
  // Interaction ref that handles event listeners only
435
- const {handlePointerEnter, clearTapOpen} = touch;
436
450
  const interactionRef: RefCallback<HTMLElement> = useCallback(
437
451
  (el: HTMLElement | null) => {
438
452
  // Cleanup previous element
@@ -488,10 +502,10 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
488
502
  // Combined ref - shorthand for calling both positionRef and interactionRef
489
503
  const ref: RefCallback<HTMLElement> = useCallback(
490
504
  (el: HTMLElement | null) => {
491
- layer.ref(el);
505
+ layerRef(el);
492
506
  interactionRef(el);
493
507
  },
494
- [layer, interactionRef],
508
+ [layerRef, interactionRef],
495
509
  );
496
510
 
497
511
  // Cleanup on unmount
@@ -504,7 +518,7 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
504
518
  // Show on mount when isDefaultOpen is true
505
519
  useEffect(() => {
506
520
  if (isDefaultOpen) {
507
- layer.show();
521
+ showLayer();
508
522
  }
509
523
  // eslint-disable-next-line @eslint-react/exhaustive-deps -- mount-only: isDefaultOpen is not reactive
510
524
  }, []);
@@ -516,12 +530,12 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
516
530
  }
517
531
  if (isOpen) {
518
532
  clearTimeouts();
519
- layer.show();
533
+ showLayer();
520
534
  } else {
521
535
  clearTimeouts();
522
- layer.hide();
536
+ hideLayer();
523
537
  }
524
- }, [isOpen, clearTimeouts, layer]);
538
+ }, [isOpen, clearTimeouts, showLayer, hideLayer]);
525
539
 
526
540
  // Dismiss on Escape (WCAG 1.4.13 — dismissible) through the shared layer
527
541
  // stack. A visible tip is the top-most layer, so it takes the press and
@@ -536,7 +550,7 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
536
550
  // consumer's value, so only their update may change it. Same contract as a
537
551
  // controlled Dialog.
538
552
  useLayerDismissal({
539
- // Registered for the hook's lifetime rather than gated on `layer.isOpen`:
553
+ // Registered for the hook's lifetime rather than gated on `isLayerOpen`:
540
554
  // that state can lag a frame behind the DOM, so a press arriving right after
541
555
  // the layer appears would find nothing registered. Because this layer
542
556
  // CONSUMES the press, a stale registration would be worse than a missed one
@@ -547,7 +561,7 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
547
561
  const el =
548
562
  typeof document === 'undefined'
549
563
  ? null
550
- : document.getElementById(layer.id);
564
+ : document.getElementById(layerId);
551
565
  if (el == null) {
552
566
  return false;
553
567
  }
@@ -556,7 +570,7 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
556
570
  } catch {
557
571
  // Browsers without the Popover API (and some test environments) cannot
558
572
  // answer the selector; fall back to the hook's own state.
559
- return layer.isOpen;
573
+ return isLayerOpen;
560
574
  }
561
575
  },
562
576
  onDismiss: () => {
@@ -566,7 +580,7 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
566
580
  onHide?.();
567
581
  return;
568
582
  }
569
- layer.hide();
583
+ hideLayer();
570
584
  },
571
585
  });
572
586
 
@@ -592,20 +606,27 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
592
606
  onMouseLeave: scheduleHide,
593
607
  };
594
608
 
595
- return layer.render(
609
+ return renderLayer(
596
610
  <div {...stylex.props(styles.content)}>{children}</div>,
597
611
  renderProps,
598
612
  );
599
613
  },
600
- [layer, placement, alignment, popoverXstyle, cancelHide, scheduleHide],
614
+ [
615
+ renderLayer,
616
+ placement,
617
+ alignment,
618
+ popoverXstyle,
619
+ cancelHide,
620
+ scheduleHide,
621
+ ],
601
622
  );
602
623
 
603
624
  return {
604
625
  ref,
605
- positionRef: layer.ref,
626
+ positionRef: layerRef,
606
627
  interactionRef,
607
- anchorId: layer.anchorId,
608
- describedBy: layer.id,
628
+ anchorId: layerAnchorId,
629
+ describedBy: layerId,
609
630
  renderTooltip,
610
631
  };
611
632
  }
@@ -1,5 +1,60 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentAnatomyElement[]} */
4
+ const anatomy = [
5
+ {
6
+ name: 'Tree list',
7
+ required: true,
8
+ description: 'Container that presents the hierarchical tree.',
9
+ },
10
+ {
11
+ name: 'Header',
12
+ required: false,
13
+ description: 'Caller-provided content that visibly names the tree.',
14
+ },
15
+ {
16
+ name: 'Item',
17
+ required: true,
18
+ description: 'Painted row for one node in the hierarchy.',
19
+ },
20
+ {
21
+ name: 'Chevron',
22
+ required: false,
23
+ description:
24
+ 'Expand and collapse control rendered for an Item with children.',
25
+ },
26
+ {
27
+ name: 'Chevron glyph',
28
+ required: false,
29
+ description: 'Directional symbol rendered by Icon inside a Chevron.',
30
+ },
31
+ {
32
+ name: 'Item label',
33
+ required: true,
34
+ description: 'Primary content that identifies an Item.',
35
+ },
36
+ {
37
+ name: 'Item description',
38
+ required: false,
39
+ description: 'Secondary text rendered below an Item label.',
40
+ },
41
+ {
42
+ name: 'Start content',
43
+ required: false,
44
+ description: 'Caller-provided content rendered before an Item label.',
45
+ },
46
+ {
47
+ name: 'End content',
48
+ required: false,
49
+ description: 'Caller-provided content rendered after an Item label.',
50
+ },
51
+ {
52
+ name: 'Guide',
53
+ required: false,
54
+ description: 'Connector line that shows parent-child relationships.',
55
+ },
56
+ ];
57
+
3
58
  /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
59
 
5
60
  export const docs = {
@@ -79,6 +134,7 @@ export const docs = {
79
134
  },
80
135
  ],
81
136
  usage: {
137
+ anatomy,
82
138
  description:
83
139
  'An expandable tree structure for displaying hierarchical data with branch connector lines. Use it for file explorers, nested category browsers, or any interface that visualizes parent-child relationships.',
84
140
  bestPractices: [
@@ -158,6 +214,7 @@ export const docsZh = {
158
214
  },
159
215
  ],
160
216
  usage: {
217
+ anatomy,
161
218
  description:
162
219
  'An expandable tree structure for displaying hierarchical data with branch connector lines. Use it for file explorers, nested category browsers, or any interface that visualizes parent-child relationships.',
163
220
  bestPractices: [
@@ -175,6 +232,7 @@ export const docsDense = {
175
232
  description:
176
233
  'Data-driven tree list for hierarchical data w/ expand/collapse, branch lines, interactive items. Flat items array w/ recursive children, no composition, no cloneElement.',
177
234
  usage: {
235
+ anatomy,
178
236
  description:
179
237
  'An expandable tree structure for displaying hierarchical data with branch connector lines. Use it for file explorers, nested category browsers, or any interface that visualizes parent-child relationships.',
180
238
  bestPractices: [
@@ -0,0 +1,224 @@
1
+ ---
2
+ schema_version: 3
3
+ template_version: 3
4
+ kind: component
5
+ id: component:TreeList
6
+ authority: draft
7
+ archive_reason: null
8
+ superseded_by: null
9
+ approved_by: null
10
+ approved_at: null
11
+ owners: [cixzhang]
12
+ review_triggers: [behavior, theming, accessibility]
13
+ verified_by:
14
+ [
15
+ packages/core/src/TreeList/TreeList.test.tsx,
16
+ packages/core/src/theme/themingTargets.test.ts,
17
+ scripts/check-knowledge.mjs,
18
+ ]
19
+ modules: []
20
+ families: [family:navigation-destinations]
21
+ design_specs: []
22
+ architecture:
23
+ [
24
+ architecture:component-theming-surface,
25
+ architecture:interaction-modality,
26
+ architecture:public-component-api,
27
+ ]
28
+ contributing: []
29
+ system_specs: [spec:AST-005/DEC-1]
30
+ ---
31
+
32
+ # TreeList component contract
33
+
34
+ ## Intent
35
+
36
+ TreeList presents hierarchical data as expandable tree rows. This draft records
37
+ its current consumer anatomy, target ownership, delegated Icon glyph, and
38
+ unreached stable parts without changing runtime behavior, styling, targets, or
39
+ public API.
40
+
41
+ ## Compatibility and migration
42
+
43
+ - Released default preserved: `yes`
44
+ - Compatibility class: additive documentation only; runtime, DOM, styling,
45
+ targets, aliases, and public API remain unchanged
46
+ - Controlled/uncontrolled behavior: unchanged
47
+ - Migration decision: none
48
+
49
+ Consumer migration instructions belong in consumer docs and release notes.
50
+
51
+ ## Ownership boundary
52
+
53
+ **Owns**
54
+
55
+ - The Tree list, Item, Chevron, Item label, and Guide parts and their five current
56
+ targets.
57
+ - The stable Item description rendered below an Item label.
58
+ - Hierarchical placement, indentation, expansion, selection, and tree semantics.
59
+
60
+ **Does not own / non-goals**
61
+
62
+ - The Chevron glyph artwork and Icon target — owned by `component:Icon`.
63
+ - Header, Start content, and End content supplied through consumer slots — owned
64
+ by the product callsite.
65
+ - New targets for Item description or caller-provided slots — unresolved by this
66
+ factual backfill.
67
+
68
+ ## Public concepts
69
+
70
+ No new public concept is introduced. Consumer data, props, slots, and usage
71
+ remain documented in `TreeList.doc.mjs`.
72
+
73
+ ## Behavioral and layout contract
74
+
75
+ | ID | Candidate invariant | Basis | Draft review state |
76
+ | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------- | ------------------------------------------------------------------------- |
77
+ | FR1 | The current render contains one Tree list, one Item and Item label per rendered node, optional Header, Chevron, Item description, Start content, End content, and Guide parts, and delegated Chevron glyphs. | Current source, docs, and tests | Verified current behavior; no new behavior decided |
78
+ | FR2 | Tree list, Item, Chevron, Item label, and Guide carry the five current `tree-list*` targets documented below. | Current source and target docs | Verified current inventory; focused placement coverage is partial |
79
+ | FR3 | Chevron glyph delegates to Icon's `icon` target. Header, Start content, and End content are consumer-owned and have no TreeList target. | Current source and component docs | Verified current ownership; no target change |
80
+ | FR4 | Item description is a stable library-rendered part below Item label and currently has no public target. It does not inherit through `tree-list-item-label`; both spans are siblings inside the row content. | Current source and target docs | Verified current reachability; long-term theming intent remains unsettled |
81
+
82
+ ### Allowed variation
83
+
84
+ - **AV1 — Hierarchy.** Item count, depth, expansion, selection, density, and guide
85
+ visibility may vary without changing the anatomy ownership recorded here.
86
+ - **AV2 — Consumer content.** Header, Start content, End content, Item label
87
+ values, and descriptions may vary without making caller-owned slot content a
88
+ TreeList target.
89
+ - **AV3 — Delegated glyph.** Icon may change the Chevron glyph's internal element
90
+ shape while preserving its own public contract.
91
+
92
+ ### Representative states
93
+
94
+ | State | Required invariant | Allowed variation |
95
+ | ------------------------ | ----------------------------------------------------- | --------------------------------------------- |
96
+ | Empty tree | Tree list remains; no Item instances render. | Optional Header content. |
97
+ | Flat items | Each Item contains an Item label. | Description and consumer slots may be absent. |
98
+ | Expandable item | Item may contain Chevron and delegated Chevron glyph. | Expanded or collapsed state. |
99
+ | Nested `lineGuides` tree | Guide instances show parent-child relationships. | Count and position follow hierarchy. |
100
+ | `noGuides` tree | Guide instances are absent; indentation remains. | All other anatomy remains unchanged. |
101
+ | Described item | Item description renders below Item label. | Caller-provided description text. |
102
+
103
+ ### Transformation and precedence order
104
+
105
+ - No new hierarchy, focus, expansion, layout, or styling precedence rule is
106
+ introduced.
107
+
108
+ ### Performance and resources
109
+
110
+ - No new performance or resource rule is introduced.
111
+
112
+ ## Accessibility contract
113
+
114
+ This draft does not change or extend TreeList's current tree, treeitem, group,
115
+ roving-focus, expansion, selection, disabled, or activation behavior.
116
+
117
+ ## Design relationships
118
+
119
+ | Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
120
+ | ---------------- | -------------------------------------------------------------------- | ------------------------------ | ----------------- | ------------------ |
121
+ | Tree list | Groups the hierarchical tree and owns its density and guide variant. | Current source and public docs | Supporting | FR1, FR2 |
122
+ | Header | Visibly names the tree with caller-provided content. | Caller-supplied content | Prominent | FR1, FR3 |
123
+ | Item | Paints one row and reflects density, selection, and disabled state. | Current source and public docs | Prominent | FR1, FR2 |
124
+ | Chevron | Provides the expand and collapse control for an Item with children. | Current source and public docs | Supporting | FR1, FR2 |
125
+ | Chevron glyph | Presents the current directional symbol inside Chevron. | `component:Icon` | Supporting | FR1, FR3 |
126
+ | Item label | Presents the primary content that identifies an Item. | Current source and public docs | Prominent | FR1, FR2 |
127
+ | Item description | Presents stable secondary text below Item label. | Current source and public docs | Supporting | FR1, FR4 |
128
+ | Start content | Presents caller-provided content before Item label. | Caller-supplied content | Context-dependent | FR1, FR3 |
129
+ | End content | Presents caller-provided content after Item label. | Caller-supplied content | Context-dependent | FR1, FR3 |
130
+ | Guide | Paints a connector between related hierarchy levels. | Current source and public docs | Supporting | FR1, FR2 |
131
+
132
+ Item description is stable TreeList-rendered anatomy, not consumer-owned slot
133
+ structure. Its current lack of a target is observed reachability, not a decision
134
+ that it must remain unthemeable. Header, Start content, and End content remain
135
+ caller-owned even though TreeList positions their slot wrappers.
136
+
137
+ ### Theming anatomy
138
+
139
+ <!-- anatomy-theming:v1 -->
140
+
141
+ ```json
142
+ {
143
+ "Tree list": {"target": "tree-list"},
144
+ "Header": {
145
+ "none": {
146
+ "reason": "intentional: Header is caller-provided content outside TreeList's public theming ownership"
147
+ }
148
+ },
149
+ "Item": {"target": "tree-list-item"},
150
+ "Chevron": {"target": "tree-list-chevron"},
151
+ "Chevron glyph": {
152
+ "delegatesTo": {"owner": "component:Icon", "target": "icon"}
153
+ },
154
+ "Item label": {"target": "tree-list-item-label"},
155
+ "Item description": {
156
+ "none": {
157
+ "reason": "unsettled: No current public target reaches the stable Item description; future exposure still needs an owner decision"
158
+ }
159
+ },
160
+ "Start content": {
161
+ "none": {
162
+ "reason": "intentional: Start content is caller-provided content outside TreeList's public theming ownership"
163
+ }
164
+ },
165
+ "End content": {
166
+ "none": {
167
+ "reason": "intentional: End content is caller-provided content outside TreeList's public theming ownership"
168
+ }
169
+ },
170
+ "Guide": {"target": "tree-list-guide"}
171
+ }
172
+ ```
173
+
174
+ The five local targets are current public seams. The Chevron glyph retains Icon
175
+ ownership. Consumer-slot `none` dispositions are ownership boundaries; Item
176
+ description's `none` disposition records a current audit gap and does not
177
+ authorize a new target.
178
+
179
+ ## Family and system relationships
180
+
181
+ - `architecture:component-theming-surface` owns anatomy qualification, target
182
+ mapping, delegation, and factual `none` dispositions.
183
+ - `architecture:public-component-api` owns the stable data, props, and slot
184
+ surface; this documentation adds no API.
185
+ - `architecture:interaction-modality` owns shared keyboard and pointer modality;
186
+ TreeList continues to own its existing tree focus and activation behavior.
187
+ - `family:navigation-destinations` owns the shared accept/block result for a
188
+ TreeListItem `href`; `spec:AST-005/DEC-1` requires native and custom-router
189
+ item paths to preserve that result.
190
+ - TreeList's current custom-router path inherits the `useLinkComponent` adoption
191
+ gap recorded by the family until the accepted implementation lands.
192
+
193
+ ## Verification map
194
+
195
+ | Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
196
+ | ------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
197
+ | FR1 | `TreeList.test.tsx` rendering, hierarchy, slot, and accessibility suites plus source inspection | Flat, nested, described, headed, and slotted items | Removing asserted Tree list, Header, Item, Chevron, Item label, Item description, Start content, End content, or Guide behavior fails existing role, content, hierarchy, or state assertions; Chevron glyph presence remains source-inspected only. | `audit:TreeList/anatomy` |
198
+ | FR2 | `TreeList.test.tsx` and `themingTargets.test.ts` | Five local targets and their documented states | Removing or moving any current local target fails focused class assertions or the global inventory. | `audit:TreeList/theming` |
199
+ | FR3 | Source inspection plus Icon public target metadata | Expandable rows and caller-provided slots | Existing focused tests do not assert the composed Icon instance; changing glyph or slot ownership requires this map and the relevant owner metadata to change. | `audit:TreeList/theming` |
200
+ | FR4 | `TreeList.test.tsx` description rendering test and source inspection | Item with description | Removing description fails content coverage; adding a target requires an explicit map update. | `audit:TreeList/anatomy` |
201
+ | Theming anatomy map | `scripts/check-knowledge.mjs` | Canonical anatomy and five current local targets | Missing, extra, prefixed, stale, or alias-backed mappings fail repository validation. | `audit:TreeList/theming` |
202
+
203
+ Focused target-placement assertions cover all five local targets: Tree list,
204
+ Item, Chevron, Item label, and Guide. Existing tests do not assert the Icon
205
+ instance that renders Chevron glyph.
206
+
207
+ ## Decision log
208
+
209
+ None. This draft records current facts and introduces no component-local design,
210
+ API, behavior, or theming decision.
211
+
212
+ ## Open questions
213
+
214
+ - **OQ1 — Should Item description gain a stable public theming target?**
215
+ (`human-api`) Its current lack of reachability is an audit gap, not settled
216
+ intent.
217
+ - **OQ2 — Should a focused test pin the delegated Chevron glyph's Icon
218
+ instance?** (`checkable`) Its presence is currently source-inspected rather
219
+ than asserted.
220
+
221
+ ## Content boundary
222
+
223
+ This file does not duplicate consumer prop tables/examples, shared modality
224
+ rules, current audit results, or implementation steps. It links to their owners.