@astryxdesign/core 0.5.1 → 0.5.2-canary.00477a5

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 (270) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/BottomSheet/BottomSheet.d.ts +3 -1
  3. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  4. package/dist/BottomSheet/BottomSheet.js +4 -3
  5. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts +2 -2
  6. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts.map +1 -1
  7. package/dist/BottomSheet/BottomSheetEdgeTint.js +7 -10
  8. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  9. package/dist/BottomSheet/BottomSheetSwitcher.js +1 -1
  10. package/dist/Button/Button.d.ts +2 -1
  11. package/dist/Button/Button.d.ts.map +1 -1
  12. package/dist/Button/Button.js +11 -4
  13. package/dist/Carousel/Carousel.d.ts.map +1 -1
  14. package/dist/Carousel/Carousel.js +2 -2
  15. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  16. package/dist/Chat/ChatToolCalls.js +34 -17
  17. package/dist/ContextMenu/ContextMenu.d.ts +14 -3
  18. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  19. package/dist/ContextMenu/ContextMenu.js +149 -26
  20. package/dist/ContextMenu/index.d.ts +1 -0
  21. package/dist/ContextMenu/index.d.ts.map +1 -1
  22. package/dist/DropdownMenu/DropdownMenu.d.ts +24 -5
  23. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  24. package/dist/DropdownMenu/DropdownMenu.js +340 -26
  25. package/dist/DropdownMenu/DropdownMenuContext.d.ts +1 -1
  26. package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
  27. package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  28. package/dist/DropdownMenu/DropdownMenuItem.js +1 -1
  29. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +6 -2
  30. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  31. package/dist/DropdownMenu/DropdownMenuSubMenu.js +43 -14
  32. package/dist/DropdownMenu/MenuBottomSheet.d.ts +20 -0
  33. package/dist/DropdownMenu/MenuBottomSheet.d.ts.map +1 -0
  34. package/dist/DropdownMenu/MenuBottomSheet.js +36 -0
  35. package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts +10 -0
  36. package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts.map +1 -0
  37. package/dist/DropdownMenu/MenuBottomSheetActionList.js +111 -0
  38. package/dist/DropdownMenu/index.d.ts +2 -1
  39. package/dist/DropdownMenu/index.d.ts.map +1 -1
  40. package/dist/DropdownMenu/menuWidth.d.ts +14 -0
  41. package/dist/DropdownMenu/menuWidth.d.ts.map +1 -0
  42. package/dist/DropdownMenu/menuWidth.js +35 -0
  43. package/dist/DropdownMenu/useMenuOverflow.d.ts +10 -0
  44. package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -0
  45. package/dist/DropdownMenu/useMenuOverflow.js +60 -0
  46. package/dist/MoreMenu/MoreMenu.d.ts +8 -2
  47. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  48. package/dist/MoreMenu/MoreMenu.js +2 -0
  49. package/dist/MultiSelector/MultiSelector.d.ts +11 -1
  50. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  51. package/dist/MultiSelector/MultiSelector.js +97 -68
  52. package/dist/MultiSelector/index.d.ts +1 -1
  53. package/dist/MultiSelector/index.d.ts.map +1 -1
  54. package/dist/Popover/Popover.d.ts +10 -6
  55. package/dist/Popover/Popover.d.ts.map +1 -1
  56. package/dist/Popover/Popover.js +141 -16
  57. package/dist/Popover/usePopover.d.ts +4 -0
  58. package/dist/Popover/usePopover.d.ts.map +1 -1
  59. package/dist/Popover/usePopover.js +52 -5
  60. package/dist/Selector/Selector.d.ts +10 -0
  61. package/dist/Selector/Selector.d.ts.map +1 -1
  62. package/dist/Selector/Selector.js +106 -80
  63. package/dist/Selector/SelectorBottomSheet.d.ts +21 -0
  64. package/dist/Selector/SelectorBottomSheet.d.ts.map +1 -0
  65. package/dist/Selector/SelectorBottomSheet.js +83 -0
  66. package/dist/Selector/index.d.ts +1 -1
  67. package/dist/Selector/index.d.ts.map +1 -1
  68. package/dist/Selector/selectorPresentation.stylex.d.ts +16 -0
  69. package/dist/Selector/selectorPresentation.stylex.d.ts.map +1 -0
  70. package/dist/Selector/selectorPresentation.stylex.js +21 -0
  71. package/dist/Selector/useSelectorPresentation.d.ts +32 -0
  72. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -0
  73. package/dist/Selector/useSelectorPresentation.js +90 -0
  74. package/dist/Toast/useToastGesture.d.ts.map +1 -1
  75. package/dist/Toast/useToastGesture.js +46 -9
  76. package/dist/astryx.css +19 -1
  77. package/dist/hooks/useAdaptivePresentation.d.ts +5 -0
  78. package/dist/hooks/useAdaptivePresentation.d.ts.map +1 -0
  79. package/dist/hooks/useAdaptivePresentation.js +19 -0
  80. package/dist/hooks/useFocusReturnVisibility.d.ts +7 -0
  81. package/dist/hooks/useFocusReturnVisibility.d.ts.map +1 -0
  82. package/dist/hooks/useFocusReturnVisibility.js +35 -0
  83. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  84. package/dist/hooks/useFocusTrap.js +12 -0
  85. package/dist/i18n/InternationalizationContext.d.ts +2 -0
  86. package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
  87. package/dist/i18n/InternationalizationContext.js +3 -1
  88. package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
  89. package/dist/i18n/InternationalizationProvider.js +3 -1
  90. package/dist/i18n/resolve.d.ts +1 -1
  91. package/dist/i18n/resolve.d.ts.map +1 -1
  92. package/dist/i18n/resolve.js +37 -38
  93. package/dist/i18n/useTranslator.d.ts.map +1 -1
  94. package/dist/i18n/useTranslator.js +2 -3
  95. package/locales/af-ZA.json +0 -4
  96. package/locales/ar-SA.json +0 -4
  97. package/locales/ca-ES.json +0 -4
  98. package/locales/cs-CZ.json +0 -4
  99. package/locales/da-DK.json +0 -4
  100. package/locales/de-DE.json +0 -4
  101. package/locales/el-GR.json +0 -4
  102. package/locales/en.json +20 -0
  103. package/locales/es-ES.json +0 -4
  104. package/locales/fi-FI.json +0 -4
  105. package/locales/fr-FR.json +0 -4
  106. package/locales/he-IL.json +0 -4
  107. package/locales/hu-HU.json +0 -4
  108. package/locales/it-IT.json +0 -4
  109. package/locales/ja-JP.json +0 -4
  110. package/locales/ko-KR.json +0 -4
  111. package/locales/nl-NL.json +0 -4
  112. package/locales/no-NO.json +0 -4
  113. package/locales/pl-PL.json +0 -4
  114. package/locales/pseudo.json +15 -0
  115. package/locales/pt-BR.json +0 -4
  116. package/locales/pt-PT.json +0 -4
  117. package/locales/ro-RO.json +0 -4
  118. package/locales/ru-RU.json +0 -4
  119. package/locales/sr-SP.json +0 -4
  120. package/locales/sv-SE.json +0 -4
  121. package/locales/tr-TR.json +0 -4
  122. package/locales/uk-UA.json +0 -4
  123. package/locales/vi-VN.json +0 -4
  124. package/locales/zh-CN.json +0 -4
  125. package/locales/zh-TW.json +0 -4
  126. package/package.json +3 -3
  127. package/src/BottomSheet/BottomSheet.doc.mjs +37 -0
  128. package/src/BottomSheet/BottomSheet.spec.md +177 -0
  129. package/src/BottomSheet/BottomSheet.test.tsx +29 -0
  130. package/src/BottomSheet/BottomSheet.tsx +7 -4
  131. package/src/BottomSheet/BottomSheetEdgeTint.test.tsx +4 -6
  132. package/src/BottomSheet/BottomSheetEdgeTint.tsx +7 -10
  133. package/src/BottomSheet/BottomSheetSwitcher.tsx +1 -2
  134. package/src/Button/Button.doc.mjs +56 -0
  135. package/src/Button/Button.test.tsx +10 -0
  136. package/src/Button/Button.tsx +13 -5
  137. package/src/ButtonGroup/ButtonGroup.doc.mjs +47 -0
  138. package/src/Calendar/Calendar.doc.mjs +1 -1
  139. package/src/Carousel/Carousel.test.tsx +83 -0
  140. package/src/Carousel/Carousel.tsx +8 -2
  141. package/src/Chat/ChatToolCalls.test.tsx +44 -0
  142. package/src/Chat/ChatToolCalls.tsx +36 -15
  143. package/src/CheckboxInput/CheckboxInput.doc.mjs +1 -1
  144. package/src/CheckboxList/CheckboxList.doc.mjs +173 -32
  145. package/src/CheckboxList/CheckboxList.spec.md +214 -0
  146. package/src/CommandPalette/CommandPalette.doc.mjs +72 -0
  147. package/src/CommandPalette/CommandPalette.spec.md +223 -0
  148. package/src/ComplexSelector/ComplexSelector.doc.mjs +44 -2
  149. package/src/ComplexSelector/ComplexSelector.spec.md +189 -0
  150. package/src/ContextMenu/ContextMenu.doc.mjs +13 -1
  151. package/src/ContextMenu/ContextMenu.test.tsx +131 -1
  152. package/src/ContextMenu/ContextMenu.tsx +199 -32
  153. package/src/ContextMenu/index.ts +1 -0
  154. package/src/DateInput/DateInput.doc.mjs +1 -1
  155. package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
  156. package/src/DateTimeInput/DateTimeInput.doc.mjs +1 -1
  157. package/src/Divider/Divider.doc.mjs +24 -0
  158. package/src/Divider/Divider.spec.md +150 -0
  159. package/src/DropdownMenu/DropdownMenu.doc.mjs +201 -40
  160. package/src/DropdownMenu/DropdownMenu.test.tsx +518 -7
  161. package/src/DropdownMenu/DropdownMenu.tsx +459 -28
  162. package/src/DropdownMenu/DropdownMenuContext.tsx +1 -1
  163. package/src/DropdownMenu/DropdownMenuItem.tsx +2 -0
  164. package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +4 -2
  165. package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +124 -0
  166. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +72 -17
  167. package/src/DropdownMenu/MenuBottomSheet.tsx +46 -0
  168. package/src/DropdownMenu/MenuBottomSheetActionList.tsx +141 -0
  169. package/src/DropdownMenu/index.ts +2 -0
  170. package/src/DropdownMenu/menuWidth.ts +51 -0
  171. package/src/DropdownMenu/useMenuOverflow.ts +77 -0
  172. package/src/Field/Field.doc.mjs +1 -1
  173. package/src/FieldStatus/FieldStatus.doc.mjs +22 -1
  174. package/src/FieldStatus/FieldStatus.spec.md +212 -0
  175. package/src/FileInput/FileInput.doc.mjs +1 -1
  176. package/src/Grid/Grid.doc.mjs +19 -0
  177. package/src/Grid/Grid.spec.md +161 -0
  178. package/src/Icon/Icon.doc.mjs +196 -48
  179. package/src/Icon/Icon.spec.md +191 -0
  180. package/src/IconButton/IconButton.doc.mjs +38 -0
  181. package/src/Indicator/Indicator.doc.mjs +1 -1
  182. package/src/InputGroup/InputGroup.doc.mjs +1 -1
  183. package/src/Kbd/Kbd.doc.mjs +18 -0
  184. package/src/Kbd/Kbd.spec.md +141 -0
  185. package/src/Layout/Layout.doc.mjs +32 -0
  186. package/src/Layout/Layout.spec.md +199 -0
  187. package/src/Lightbox/Lightbox.doc.mjs +149 -33
  188. package/src/Lightbox/Lightbox.spec.md +197 -0
  189. package/src/Markdown/Markdown.doc.mjs +60 -0
  190. package/src/Markdown/Markdown.spec.md +200 -0
  191. package/src/MobileNav/MobileNav.doc.mjs +140 -32
  192. package/src/MobileNav/MobileNav.spec.md +208 -0
  193. package/src/MoreMenu/MoreMenu.doc.mjs +17 -0
  194. package/src/MoreMenu/MoreMenu.test.tsx +47 -0
  195. package/src/MoreMenu/MoreMenu.tsx +13 -1
  196. package/src/MultiSelector/MultiSelector.doc.mjs +129 -1
  197. package/src/MultiSelector/MultiSelector.spec.md +266 -0
  198. package/src/MultiSelector/MultiSelector.test.tsx +127 -0
  199. package/src/MultiSelector/MultiSelector.tsx +121 -73
  200. package/src/MultiSelector/index.ts +1 -0
  201. package/src/NavIcon/NavIcon.doc.mjs +17 -0
  202. package/src/NavIcon/NavIcon.spec.md +133 -0
  203. package/src/NavMenu/NavHeadingMenu.spec.md +205 -0
  204. package/src/NavMenu/NavMenu.doc.mjs +37 -0
  205. package/src/NumberInput/NumberInput.doc.mjs +1 -1
  206. package/src/Outline/Outline.doc.mjs +35 -0
  207. package/src/Outline/Outline.spec.md +161 -0
  208. package/src/OverflowList/OverflowList.doc.mjs +24 -0
  209. package/src/OverflowList/OverflowList.spec.md +156 -0
  210. package/src/Pagination/Pagination.doc.mjs +74 -0
  211. package/src/Pagination/Pagination.spec.md +225 -0
  212. package/src/Popover/Popover.doc.mjs +11 -11
  213. package/src/Popover/Popover.test.tsx +397 -2
  214. package/src/Popover/Popover.tsx +228 -21
  215. package/src/Popover/usePopover.tsx +92 -15
  216. package/src/PowerSearch/PowerSearch.doc.mjs +1 -1
  217. package/src/ProgressBar/ProgressBar.doc.mjs +198 -38
  218. package/src/ProgressBar/ProgressBar.spec.md +260 -0
  219. package/src/RadioList/RadioList.doc.mjs +1 -1
  220. package/src/Resizable/Resizable.doc.mjs +59 -16
  221. package/src/Resizable/Resizable.spec.md +194 -0
  222. package/src/Section/Section.doc.mjs +17 -0
  223. package/src/Section/Section.spec.md +138 -0
  224. package/src/SegmentedControl/SegmentedControl.doc.mjs +83 -0
  225. package/src/SegmentedControl/SegmentedControl.spec.md +151 -0
  226. package/src/Selector/Selector.doc.mjs +13 -1
  227. package/src/Selector/Selector.test.tsx +135 -0
  228. package/src/Selector/Selector.tsx +141 -82
  229. package/src/Selector/SelectorBottomSheet.tsx +97 -0
  230. package/src/Selector/index.ts +1 -0
  231. package/src/Selector/selectorPresentation.stylex.ts +20 -0
  232. package/src/Selector/useSelectorPresentation.ts +147 -0
  233. package/src/Skeleton/Skeleton.doc.mjs +12 -0
  234. package/src/Skeleton/Skeleton.spec.md +126 -0
  235. package/src/Slider/Slider.doc.mjs +186 -32
  236. package/src/Slider/Slider.spec.md +223 -0
  237. package/src/Stack/Stack.doc.mjs +22 -0
  238. package/src/Stack/Stack.spec.md +154 -0
  239. package/src/StatusDot/StatusDot.doc.mjs +17 -0
  240. package/src/StatusDot/StatusDot.spec.md +137 -0
  241. package/src/Switch/Switch.doc.mjs +41 -1
  242. package/src/Switch/Switch.spec.md +174 -0
  243. package/src/Text/Text.doc.mjs +190 -43
  244. package/src/Text/Text.spec.md +205 -0
  245. package/src/TextArea/TextArea.doc.mjs +256 -46
  246. package/src/TextArea/TextArea.spec.md +204 -0
  247. package/src/TextInput/TextInput.doc.mjs +1 -1
  248. package/src/TimeInput/TimeInput.doc.mjs +1 -1
  249. package/src/Toast/ToastViewport.test.tsx +118 -4
  250. package/src/Toast/useToastGesture.ts +61 -8
  251. package/src/ToggleButton/ToggleButton.doc.mjs +56 -0
  252. package/src/Tokenizer/Tokenizer.doc.mjs +1 -1
  253. package/src/Toolbar/Toolbar.doc.mjs +19 -0
  254. package/src/Toolbar/Toolbar.spec.md +173 -0
  255. package/src/Tooltip/Tooltip.doc.mjs +17 -0
  256. package/src/Tooltip/Tooltip.spec.md +141 -0
  257. package/src/TreeList/TreeList.doc.mjs +58 -0
  258. package/src/TreeList/TreeList.spec.md +220 -0
  259. package/src/Typeahead/Typeahead.doc.mjs +84 -2
  260. package/src/Typeahead/Typeahead.spec.md +250 -0
  261. package/src/hooks/useAdaptivePresentation.ts +35 -0
  262. package/src/hooks/useFocusReturnVisibility.ts +45 -0
  263. package/src/hooks/useFocusTrap.test.tsx +40 -0
  264. package/src/hooks/useFocusTrap.ts +13 -0
  265. package/src/i18n/InternationalizationContext.ts +3 -0
  266. package/src/i18n/InternationalizationProvider.tsx +8 -1
  267. package/src/i18n/__tests__/resolve.test.ts +23 -1
  268. package/src/i18n/resolve.ts +46 -49
  269. package/src/i18n/useTranslator.ts +2 -7
  270. package/src/theme/themingTargets.test.ts +91 -25
@@ -0,0 +1,205 @@
1
+ ---
2
+ schema_version: 1
3
+ template_version: 3
4
+ kind: component
5
+ id: component:NavHeadingMenu
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/NavMenu/NavHeadingMenu.test.tsx,
16
+ packages/core/src/Icon/Icon.test.tsx,
17
+ packages/core/src/Text/Text.test.tsx,
18
+ packages/core/src/theme/themingTargets.test.ts,
19
+ scripts/check-knowledge.mjs,
20
+ ]
21
+ families: []
22
+ design_specs: []
23
+ architecture:
24
+ [
25
+ architecture:component-theming-surface,
26
+ architecture:icon-resolution-and-component-slots,
27
+ architecture:layer-runtime,
28
+ architecture:public-component-api,
29
+ ]
30
+ contributing: []
31
+ system_specs: []
32
+ ---
33
+
34
+ # NavHeadingMenu component contract
35
+
36
+ ## Intent
37
+
38
+ NavHeadingMenu presents selectable actions inside a SideNavHeading or
39
+ TopNavHeading popover. This draft records the current consumer anatomy and
40
+ theming ownership without changing rendering, keyboard behavior, layer
41
+ lifecycle, targets, or public API.
42
+
43
+ ## Compatibility and migration
44
+
45
+ - Released default preserved: `yes`
46
+ - Compatibility class: additive documentation only; runtime, DOM, styling,
47
+ targets, and public API remain unchanged
48
+ - Controlled/uncontrolled behavior: unchanged
49
+ - Migration decision: none
50
+
51
+ Consumer migration instructions belong in consumer docs and release notes.
52
+
53
+ ## Ownership boundary
54
+
55
+ **Owns**
56
+
57
+ - The Menu container, menu semantics, keyboard movement, typeahead, and current
58
+ `nav-heading-menu` target.
59
+ - Each Item's action/link row, selection handling, size treatment, and current
60
+ `nav-heading-menu-item` target.
61
+ - The content layout that contains either the text-rendered or caller-rendered
62
+ label path and the optional description.
63
+
64
+ **Does not own / non-goals**
65
+
66
+ - Icon artwork and the `icon` target — delegated to `component:Icon` for values
67
+ rendered through Icon.
68
+ - String label and description typography and their `text` target — delegated to
69
+ `component:Text`.
70
+ - Non-string label content — owned by the caller.
71
+ - The SideNavHeading or TopNavHeading trigger, popup surface, positioning,
72
+ dismissal lifecycle, or close-state ownership.
73
+ - New NavHeadingMenu targets for either label path or Item description, or any
74
+ runtime, API, target, or DOM change.
75
+
76
+ ## Public concepts
77
+
78
+ No new public concept is introduced. The canonical `NavMenu.doc.mjs` continues
79
+ to document NavHeadingMenu and NavHeadingMenuItem together.
80
+
81
+ ## Behavioral and layout contract
82
+
83
+ | ID | Candidate invariant | Basis | Draft review state |
84
+ | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------- |
85
+ | FR1 | NavHeadingMenu renders one Menu carrying `role="menu"` and the current `nav-heading-menu` target. | Current source, docs, and tests | Verified current behavior; no new behavior decided |
86
+ | FR2 | NavHeadingMenuItem renders one Item carrying `role="menuitem"` and the current `nav-heading-menu-item` target as a link when `href` is supplied and a div otherwise. | Current source, docs, and tests | Verified current behavior; no target change |
87
+ | FR3 | An optional Icon-rendered icon delegates to Icon's `icon` target. String labels and all descriptions render through Text's `text` target; non-string labels render directly as caller-owned content. | Current source and target docs | Verified current ownership; focused evidence is partial |
88
+ | FR4 | The parent nav heading supplies the close callback and owns its popup runtime; NavHeadingMenu consumes that callback for Escape and successful Item selection. | Current source and tests | Verified current relationship; no layer change |
89
+
90
+ ### Allowed variation
91
+
92
+ - Items may render as links or callback actions and may be enabled or disabled
93
+ without changing anatomy ownership.
94
+ - Icon may be absent. A label may take the string path rendered through Text or
95
+ the non-string path rendered directly as caller-owned content. Item
96
+ description may be absent and, when present, renders through Text.
97
+ - Menu size and minimum width may vary without creating separate anatomy parts
98
+ or targets.
99
+
100
+ ### Representative states
101
+
102
+ | State | Required invariant | Allowed variation |
103
+ | ----------------- | ----------------------------------------------------------------- | --------------------------------------------------------- |
104
+ | Link Item | Item is an anchor with menuitem semantics and its current target. | Destination, text, description, and icon may vary. |
105
+ | Action Item | Item is a div with menuitem semantics and its current target. | Selection callback may vary. |
106
+ | Disabled Item | Item remains present and reflects disabled semantics. | It is skipped by keyboard navigation and typeahead. |
107
+ | String-label Item | Text-rendered item label delegates to Text's current target. | Label value, destination, description, and icon may vary. |
108
+ | Custom-label Item | Caller-rendered item label remains caller-owned. | Caller controls the non-string label content. |
109
+ | Described Item | Item description delegates to Text's current target. | Description content may vary or be absent. |
110
+
111
+ ### Transformation and precedence order
112
+
113
+ - No new focus, typeahead, activation, close, size, or styling precedence rule
114
+ is introduced.
115
+
116
+ ### Performance and resources
117
+
118
+ - No new performance or resource rule is introduced.
119
+
120
+ ## Accessibility contract
121
+
122
+ This draft does not change or extend the current menu/menuitem roles, disabled
123
+ state, arrow/Home/End/Escape movement, typeahead, keyboard activation, or caller
124
+ labeling behavior.
125
+
126
+ ## Design relationships
127
+
128
+ | Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
129
+ | -------------------------- | ------------------------------------------------------------------------- | ------------------------------ | ----------------- | ------------------ |
130
+ | Menu | Groups nav-heading actions with menu semantics and keyboard navigation. | Current source and public docs | Prominent | FR1, FR4 |
131
+ | Item | Presents one selectable action or navigation destination. | Current source and public docs | Prominent | FR2 |
132
+ | Icon | Presents optional Icon-owned artwork before the label. | `component:Icon` | Supporting | FR3 |
133
+ | Text-rendered item label | Presents a string label through Text's body treatment. | `component:Text` | Prominent | FR2, FR3 |
134
+ | Caller-rendered item label | Presents a non-string label directly through caller-owned content. | Caller-supplied content | Context-dependent | FR2, FR3 |
135
+ | Item description | Presents optional supporting content through Text's supporting treatment. | `component:Text` | Supporting | FR2, FR3 |
136
+
137
+ The menu is popup content, not the popup host. SideNavHeading or TopNavHeading
138
+ owns the layer lifecycle and supplies the close callback through context.
139
+
140
+ ### Theming anatomy
141
+
142
+ <!-- anatomy-theming:v1 -->
143
+
144
+ ```json
145
+ {
146
+ "Menu": {"target": "nav-heading-menu"},
147
+ "Item": {"target": "nav-heading-menu-item"},
148
+ "Icon": {
149
+ "delegatesTo": {"owner": "component:Icon", "target": "icon"}
150
+ },
151
+ "Text-rendered item label": {
152
+ "delegatesTo": {"owner": "component:Text", "target": "text"}
153
+ },
154
+ "Caller-rendered item label": {
155
+ "none": {
156
+ "reason": "intentional: Non-string label content is rendered directly and remains caller-owned"
157
+ }
158
+ },
159
+ "Item description": {
160
+ "delegatesTo": {"owner": "component:Text", "target": "text"}
161
+ }
162
+ }
163
+ ```
164
+
165
+ ## Family and system relationships
166
+
167
+ - `architecture:component-theming-surface` owns anatomy qualification, local
168
+ target mapping, component delegation, and factual `none` dispositions.
169
+ - `architecture:icon-resolution-and-component-slots` owns Icon slot resolution;
170
+ this draft records the current Icon delegation without changing slot behavior.
171
+ - `architecture:layer-runtime` owns the shared popup host lifecycle used by the
172
+ parent nav heading. NavHeadingMenu owns only its menu behavior and consumes the
173
+ heading-provided close callback.
174
+ - `architecture:public-component-api` owns the stable props and subcomponent
175
+ surface; this documentation adds no API.
176
+ - NavHeadingMenu has no current family contract.
177
+
178
+ ## Verification map
179
+
180
+ | Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
181
+ | ------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
182
+ | FR1, FR2 | `NavHeadingMenu.test.tsx` role, render, link, and disabled suites | Menu with link, action, and disabled Items | Removing menu/item semantics, content, or current rendering branches fails existing role, tag, attribute, and text checks. | `audit:NavHeadingMenu/anatomy` |
183
+ | FR3 | NavHeadingMenuItem source inspection plus Icon and Text target metadata | Icon, string label, caller-rendered label, and description paths | Source proves Icon-slot delegation, conditional label rendering, and Text-wrapped description; focused tests assert string and description content but not target placement or custom-label ownership. | `audit:NavHeadingMenu/theming` |
184
+ | FR4 | `NavHeadingMenu.test.tsx` context and keyboard suites | Selection, Escape, arrows, Home/End, typeahead | Breaking close callback consumption or keyboard behavior fails focused interaction assertions. | `audit:NavHeadingMenu/behavior` |
185
+ | Target inventory | Source inspection and `themingTargets.test.ts` | Menu, Item, and delegated Icon targets | Runtime and documented target metadata drift fails target validation. | `audit:NavHeadingMenu/theming` |
186
+ | Theming anatomy map | `scripts/check-knowledge.mjs` | Canonical anatomy and both current local targets | Missing, extra, prefixed, or stale mappings fail repository validation. | `audit:NavHeadingMenu/theming` |
187
+
188
+ Existing tests prove menu/item roles, string-label and description content,
189
+ interaction, and the heading-provided close callback. The conditional non-string
190
+ label path, Icon target placement, Text target placement, and both local target
191
+ placements remain source-inspected rather than pinned by focused assertions.
192
+
193
+ ## Decision log
194
+
195
+ None. This draft records current facts and introduces no component-local design,
196
+ behavior, accessibility, layer, or API decision.
197
+
198
+ ## Open questions
199
+
200
+ None.
201
+
202
+ ## Content boundary
203
+
204
+ This file does not duplicate consumer prop tables, examples, keyboard or layer
205
+ algorithms, implementation steps, or system rules. It links to their owners.
@@ -1,5 +1,40 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentAnatomyElement[]} */
4
+ const anatomy = [
5
+ {
6
+ name: 'Menu',
7
+ required: true,
8
+ description:
9
+ 'Menu container for nav-heading actions, with menu semantics and keyboard navigation.',
10
+ },
11
+ {
12
+ name: 'Item',
13
+ required: true,
14
+ description: 'Selectable action or navigation link inside the Menu.',
15
+ },
16
+ {
17
+ name: 'Icon',
18
+ required: false,
19
+ description: 'Optional Icon-rendered artwork shown before an Item label.',
20
+ },
21
+ {
22
+ name: 'Text-rendered item label',
23
+ required: false,
24
+ description: 'String Item label rendered through Text.',
25
+ },
26
+ {
27
+ name: 'Caller-rendered item label',
28
+ required: false,
29
+ description: 'Non-string Item label content rendered directly by the caller.',
30
+ },
31
+ {
32
+ name: 'Item description',
33
+ required: false,
34
+ description: 'Optional supporting description rendered through Text.',
35
+ },
36
+ ];
37
+
3
38
  /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
39
 
5
40
  export const docs = {
@@ -11,6 +46,7 @@ export const docs = {
11
46
  hidden: false,
12
47
  keywords: ['nav', 'menu', 'navigation', 'heading', 'menu-item', 'popover'],
13
48
  usage: {
49
+ anatomy,
14
50
  description:
15
51
  'Accessible menu container and items for nav heading popovers. ' +
16
52
  'NavHeadingMenu provides role="menu" with keyboard navigation; ' +
@@ -44,6 +80,7 @@ export const docs = {
44
80
  export const docsDense = {
45
81
  description: 'Accessible menu container + items for nav heading popovers. NavHeadingMenu = role="menu" w/ keyboard nav; NavHeadingMenuItem renders selectable items.',
46
82
  usage: {
83
+ anatomy,
47
84
  description:
48
85
  'Accessible menu container + items for nav heading popovers. NavHeadingMenu provides role="menu" w/ keyboard navigation; NavHeadingMenuItem renders individual selectable items. Pass as menu prop of SideNavHeading or TopNavHeading.',
49
86
  },
@@ -5,7 +5,7 @@
5
5
  export const docs = {
6
6
  name: 'NumberInput',
7
7
  displayName: 'Number Input',
8
- category: 'Data Input',
8
+ category: 'Form Controls',
9
9
  keywords: [
10
10
  'numberinput',
11
11
  'numberfield',
@@ -1,5 +1,37 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentAnatomyElement[]} */
4
+ const anatomy = [
5
+ {
6
+ name: 'Outline',
7
+ required: true,
8
+ description:
9
+ 'Navigation container for the same-page heading links and indicator.',
10
+ },
11
+ {
12
+ name: 'Heading link',
13
+ required: true,
14
+ description:
15
+ 'Anchor for one heading, indented by level and marked when active.',
16
+ },
17
+ {
18
+ name: 'Label',
19
+ required: true,
20
+ description: 'Heading text displayed inside its heading link.',
21
+ },
22
+ {
23
+ name: 'Indicator track',
24
+ required: true,
25
+ description: 'Painted vertical rule behind the active indicator.',
26
+ },
27
+ {
28
+ name: 'Active indicator',
29
+ required: true,
30
+ description:
31
+ 'Sliding bar positioned beside the currently active heading link.',
32
+ },
33
+ ];
34
+
3
35
  /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
36
 
5
37
  export const docs = {
@@ -222,6 +254,7 @@ function FlashOnArrival() {
222
254
  },
223
255
  ],
224
256
  usage: {
257
+ anatomy,
225
258
  description:
226
259
  'A table-of-contents sidebar for documentation pages, help centers, wikis, and long settings pages. Use it for navigation within a single page, not for app routes. Features a sliding indicator track that animates to the active heading. The list is a single tab stop: arrow keys move between headings, Home/End jump to the ends, and Enter/Space activate.',
227
260
  bestPractices: [
@@ -323,6 +356,7 @@ export const docsZh = {
323
356
  },
324
357
  ],
325
358
  usage: {
359
+ anatomy,
326
360
  description:
327
361
  'A table-of-contents sidebar for documentation pages, help centers, wikis, and long settings pages. Use it for navigation within a single page, not for app routes.',
328
362
  bestPractices: [
@@ -341,6 +375,7 @@ export const docsDense = {
341
375
  description:
342
376
  'Document outline/table-of-contents nav with sliding indicator track. Flat items array {id,label,level}; anchor links; density variant (default/compact); uncontrolled scroll-spy by scroll position (last heading past its resting line = offset + its own scroll-margin-top; first item at top, last at bottom); controlled with activeId; smooth-scroll on click that pins the active item until the next manual scroll. Single tab stop (roving tabindex): Arrow keys move, Home/End jump, Enter/Space activate. onNavigateStart/onNavigateEnd fire around the scroll. Scroll scoping via offset / scrollContainerRef / hasScrollOnClick.',
343
377
  usage: {
378
+ anatomy,
344
379
  description:
345
380
  'A table-of-contents sidebar for documentation pages, help centers, wikis, and long settings pages. Use it for navigation within a single page, not for app routes.',
346
381
  bestPractices: [
@@ -0,0 +1,161 @@
1
+ ---
2
+ schema_version: 1
3
+ template_version: 3
4
+ kind: component
5
+ id: component:Outline
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: [theming]
13
+ verified_by:
14
+ [packages/core/src/Outline/Outline.test.tsx, scripts/check-knowledge.mjs]
15
+ families: []
16
+ design_specs: []
17
+ architecture: [architecture:component-theming-surface]
18
+ contributing: []
19
+ system_specs: []
20
+ ---
21
+
22
+ # Outline component contract
23
+
24
+ ## Intent
25
+
26
+ Outline presents same-page heading navigation with heading links, labels, a
27
+ vertical indicator track, and a sliding active indicator. This draft records
28
+ current consumer anatomy and theming reachability without changing runtime
29
+ behavior, styling, targets, or public API.
30
+
31
+ ## Compatibility and migration
32
+
33
+ - Released default preserved: `yes`
34
+ - Compatibility class: additive documentation only; runtime, DOM, styling,
35
+ targets, aliases, and public API remain unchanged
36
+ - Controlled/uncontrolled behavior: unchanged
37
+ - Migration decision: none
38
+
39
+ Consumer migration instructions belong in consumer docs and release notes.
40
+
41
+ ## Ownership boundary
42
+
43
+ **Owns**
44
+
45
+ - The outline navigation container and its current `outline` target.
46
+ - The heading links and their current `outline-item` target.
47
+ - The active indicator and its current `outline-indicator` target.
48
+ - The label and indicator-track elements rendered inside that structure.
49
+
50
+ **Does not own / non-goals**
51
+
52
+ - The destination headings or their content — owned by the document or product
53
+ callsite.
54
+ - Whether the Indicator track should gain a public target — unresolved by this
55
+ factual backfill.
56
+
57
+ ## Public concepts
58
+
59
+ No new public concept is introduced. Consumer props and usage remain documented
60
+ in `Outline.doc.mjs`.
61
+
62
+ ## Behavioral and layout contract
63
+
64
+ | ID | Candidate invariant | Basis | Draft review state |
65
+ | --- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------ |
66
+ | FR1 | The current render contains one Outline, one Heading link and Label per item, one Indicator track, and one Active indicator. | Current source and docs; existing link/marker tests | Verified by source; Label-wrapper and Indicator-track identity lack exact assertions |
67
+ | FR2 | Outline, Heading link, and Active indicator carry `outline`, `outline-item`, and `outline-indicator`; Label inherits from `outline-item`. | Current source and target docs; current target tests | Current target facts verified; Label inheritance remains source-inspected |
68
+ | FR3 | Indicator track currently carries no public target. | Current source and target docs | Verified current behavior; theming intent unsettled |
69
+
70
+ ### Allowed variation
71
+
72
+ - Heading count, labels, levels, density, and active item may vary without
73
+ changing the five-part anatomy recorded here.
74
+
75
+ ### Representative states
76
+
77
+ - Controlled and uncontrolled active state use the same anatomy and current
78
+ targets.
79
+ - Default and compact density use the same anatomy and current targets.
80
+ - An empty items array still renders Outline, Indicator track, and Active
81
+ indicator; it renders no Heading link or Label instances.
82
+
83
+ ### Transformation and precedence order
84
+
85
+ - No new navigation, active-state, layout, or styling precedence rule is
86
+ introduced.
87
+
88
+ ### Performance and resources
89
+
90
+ - No new performance or resource rule is introduced.
91
+
92
+ ## Accessibility contract
93
+
94
+ This draft does not change or extend Outline's existing navigation, link,
95
+ current-item, or keyboard behavior.
96
+
97
+ ## Design relationships
98
+
99
+ | Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
100
+ | ---------------- | ------------------------------------------------------------------- | ------------------------------ | -------------- | ------------------ |
101
+ | Outline | Groups same-page heading navigation and the indicator presentation. | Current source and public docs | Supporting | FR1, FR2 |
102
+ | Heading link | Navigates to one heading and carries level and active state. | Current source and public docs | Prominent | FR1, FR2 |
103
+ | Label | Presents heading text inside its Heading link. | Current source and public docs | Prominent | FR1, FR2 |
104
+ | Indicator track | Paints the vertical rule behind the active marker. | Current source and public docs | Supporting | FR1, FR3 |
105
+ | Active indicator | Paints the marker aligned to the current Heading link. | Current source and public docs | Supporting | FR1, FR2 |
106
+
107
+ The Label sits inside the `outline-item` target and receives the link's
108
+ inherited text treatment. Its own StyleX rules only manage truncation. The
109
+ Indicator track's target exposure remains unsettled; its current lack of a
110
+ target does not decide that the part must remain unthemeable.
111
+
112
+ ### Theming anatomy
113
+
114
+ <!-- anatomy-theming:v1 -->
115
+
116
+ ```json
117
+ {
118
+ "Outline": {"target": "outline"},
119
+ "Heading link": {"target": "outline-item"},
120
+ "Label": {"inherits": "outline-item"},
121
+ "Indicator track": {
122
+ "none": {
123
+ "reason": "unsettled: No current public target reaches this part"
124
+ }
125
+ },
126
+ "Active indicator": {"target": "outline-indicator"}
127
+ }
128
+ ```
129
+
130
+ ## Family and system relationships
131
+
132
+ - `architecture:component-theming-surface` owns anatomy qualification, target
133
+ mapping, inherited-part treatment, and explicit unsettled dispositions.
134
+
135
+ ## Verification map
136
+
137
+ | Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
138
+ | ------------------- | -------------------------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
139
+ | FR1 | Source inspection plus existing link/indicator suites | Populated and active outlines | Heading links and the active indicator have regression assertions; Label-wrapper and Indicator-track identity remain source-inspected without exact regression assertions. | `audit:Outline/anatomy` |
140
+ | FR2 | `Outline.test.tsx` stable-target and active-state suites | Root, heading link, active indicator | Removing or renaming a current target fails existing class assertions or target inventories. | `audit:Outline/theming` |
141
+ | FR3 | Source inspection and current target inventories | Indicator track | Adding or documenting a current track target without updating the map fails repository checks. | `audit:Outline/theming` |
142
+ | Theming anatomy map | `scripts/check-knowledge.mjs` | Canonical anatomy and current targets | Missing, extra, prefixed, stale, or alias-backed mappings fail repository validation. | `audit:Outline/theming` |
143
+
144
+ ## Decision log
145
+
146
+ None. This draft records current facts and introduces no component-local design
147
+ or theming decision.
148
+
149
+ ## Open questions
150
+
151
+ - **OQ1 — Should Indicator track gain a stable public theming target?**
152
+ (`human-api`) Target exposure is unsettled; the current lack of reachability
153
+ does not decide the answer.
154
+ - **OQ2 — Add exact regression assertions for the Label wrapper and Indicator
155
+ track identity.** (`checkable`) Current evidence for those two parts is source
156
+ inspection rather than a uniquely identifying test assertion.
157
+
158
+ ## Content boundary
159
+
160
+ This file does not duplicate consumer prop tables/examples, current audit
161
+ results, implementation steps, or system rules. It links to their owners.
@@ -1,5 +1,26 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentAnatomyElement[]} */
4
+ const anatomy = [
5
+ {
6
+ name: 'List',
7
+ required: true,
8
+ description: 'Visible horizontal list container for the currently shown content.',
9
+ },
10
+ {
11
+ name: 'Items',
12
+ required: true,
13
+ description:
14
+ 'Caller-supplied items selected for visible display by the current width and count limits.',
15
+ },
16
+ {
17
+ name: 'Overflow indicator',
18
+ required: false,
19
+ description:
20
+ 'Optional caller-rendered indicator for items collapsed by width or count limits.',
21
+ },
22
+ ];
23
+
3
24
  /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
25
 
5
26
  export const docs = {
@@ -106,6 +127,7 @@ export const docs = {
106
127
  targets: [{className: 'astryx-overflow-list'}],
107
128
  },
108
129
  usage: {
130
+ anatomy,
109
131
  description:
110
132
  'A horizontal list that automatically hides items when they exceed the available width. Use OverflowList for breadcrumbs, toolbars, tag lists, or any row that needs to collapse gracefully at smaller sizes.',
111
133
  bestPractices: [
@@ -209,6 +231,7 @@ export const docsZh = {
209
231
  },
210
232
  ],
211
233
  usage: {
234
+ anatomy,
212
235
  description:
213
236
  'A horizontal list that automatically hides items when they exceed the available width. Use OverflowList for breadcrumbs, toolbars, tag lists, or any row that needs to collapse gracefully at smaller sizes.',
214
237
  bestPractices: [
@@ -246,6 +269,7 @@ export const docsDense = {
246
269
  description:
247
270
  'horizontal list w/ overflow indicator: hides items beyond container width',
248
271
  usage: {
272
+ anatomy,
249
273
  description:
250
274
  'A horizontal list that automatically hides items when they exceed the available width. Use OverflowList for breadcrumbs, toolbars, tag lists, or any row that needs to collapse gracefully at smaller sizes.',
251
275
  bestPractices: [