@tanrei/mcp 0.0.0-stage → 0.1.0-next.1

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 (230) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +57 -0
  3. package/README.md +150 -2
  4. package/bin/tanrei-mcp.js +15 -0
  5. package/dist/server.js +4515 -0
  6. package/dist/vocabulary/docs/governance/mimicry-gaps.json +666 -0
  7. package/dist/vocabulary/packages/tokens-build/generated/component-catalog.json +1825 -0
  8. package/dist/vocabulary/specs/accordion.spec.json +1 -0
  9. package/dist/vocabulary/specs/app-bar.spec.json +1 -0
  10. package/dist/vocabulary/specs/app-shell.spec.json +1 -0
  11. package/dist/vocabulary/specs/avatar.spec.json +1 -0
  12. package/dist/vocabulary/specs/badge.spec.json +1 -0
  13. package/dist/vocabulary/specs/bottom-sheet.spec.json +1 -0
  14. package/dist/vocabulary/specs/breadcrumbs.spec.json +1 -0
  15. package/dist/vocabulary/specs/button-group.spec.json +1 -0
  16. package/dist/vocabulary/specs/button-with-menu.spec.json +1 -0
  17. package/dist/vocabulary/specs/button.spec.json +1 -0
  18. package/dist/vocabulary/specs/calendar.spec.json +1 -0
  19. package/dist/vocabulary/specs/callout.spec.json +1 -0
  20. package/dist/vocabulary/specs/card.spec.json +1 -0
  21. package/dist/vocabulary/specs/carousel.spec.json +1 -0
  22. package/dist/vocabulary/specs/chat-composer.spec.json +1 -0
  23. package/dist/vocabulary/specs/checkbox-group.spec.json +1 -0
  24. package/dist/vocabulary/specs/checkbox.spec.json +1 -0
  25. package/dist/vocabulary/specs/chip-field.spec.json +1 -0
  26. package/dist/vocabulary/specs/chip.spec.json +1 -0
  27. package/dist/vocabulary/specs/code-block.spec.json +1 -0
  28. package/dist/vocabulary/specs/color-field.spec.json +1 -0
  29. package/dist/vocabulary/specs/color-input.spec.json +1 -0
  30. package/dist/vocabulary/specs/combobox-field.spec.json +1 -0
  31. package/dist/vocabulary/specs/combobox.spec.json +1 -0
  32. package/dist/vocabulary/specs/component.schema.json +1 -0
  33. package/dist/vocabulary/specs/copy-button.spec.json +1 -0
  34. package/dist/vocabulary/specs/date-time-picker.spec.json +1 -0
  35. package/dist/vocabulary/specs/description-list.spec.json +1 -0
  36. package/dist/vocabulary/specs/dialog.spec.json +1 -0
  37. package/dist/vocabulary/specs/divider.spec.json +1 -0
  38. package/dist/vocabulary/specs/drop-zone.spec.json +1 -0
  39. package/dist/vocabulary/specs/embedded-text-input.spec.json +1 -0
  40. package/dist/vocabulary/specs/empty-state.spec.json +1 -0
  41. package/dist/vocabulary/specs/fab-menu.spec.json +1 -0
  42. package/dist/vocabulary/specs/field-group.spec.json +1 -0
  43. package/dist/vocabulary/specs/field.spec.json +1 -0
  44. package/dist/vocabulary/specs/figure.spec.json +1 -0
  45. package/dist/vocabulary/specs/file-item.spec.json +1 -0
  46. package/dist/vocabulary/specs/file-picker.spec.json +1 -0
  47. package/dist/vocabulary/specs/file-upload.spec.json +1 -0
  48. package/dist/vocabulary/specs/handle.spec.json +1 -0
  49. package/dist/vocabulary/specs/image-preview.spec.json +1 -0
  50. package/dist/vocabulary/specs/inline-code.spec.json +1 -0
  51. package/dist/vocabulary/specs/inventory.json +1 -0
  52. package/dist/vocabulary/specs/keyboard-shortcut.spec.json +1 -0
  53. package/dist/vocabulary/specs/link-card.spec.json +1 -0
  54. package/dist/vocabulary/specs/link.spec.json +1 -0
  55. package/dist/vocabulary/specs/list-row.spec.json +1 -0
  56. package/dist/vocabulary/specs/list.spec.json +1 -0
  57. package/dist/vocabulary/specs/loading-indicator.spec.json +1 -0
  58. package/dist/vocabulary/specs/main-action-button.spec.json +1 -0
  59. package/dist/vocabulary/specs/marquee-text.spec.json +1 -0
  60. package/dist/vocabulary/specs/menu.spec.json +1 -0
  61. package/dist/vocabulary/specs/menubar.spec.json +1 -0
  62. package/dist/vocabulary/specs/meter.spec.json +1 -0
  63. package/dist/vocabulary/specs/modal-layer.spec.json +1 -0
  64. package/dist/vocabulary/specs/navigation-bar.spec.json +1 -0
  65. package/dist/vocabulary/specs/navigation-drawer.spec.json +1 -0
  66. package/dist/vocabulary/specs/number-field.spec.json +1 -0
  67. package/dist/vocabulary/specs/number-input.spec.json +1 -0
  68. package/dist/vocabulary/specs/number-ticker.spec.json +1 -0
  69. package/dist/vocabulary/specs/one-time-code-field.spec.json +1 -0
  70. package/dist/vocabulary/specs/one-time-code-input.spec.json +1 -0
  71. package/dist/vocabulary/specs/page-header.spec.json +1 -0
  72. package/dist/vocabulary/specs/pagination.spec.json +1 -0
  73. package/dist/vocabulary/specs/popover.spec.json +1 -0
  74. package/dist/vocabulary/specs/previous-next-links.spec.json +1 -0
  75. package/dist/vocabulary/specs/progress-indicator.spec.json +1 -0
  76. package/dist/vocabulary/specs/prose.spec.json +1 -0
  77. package/dist/vocabulary/specs/radio-button.spec.json +1 -0
  78. package/dist/vocabulary/specs/radio-group.spec.json +1 -0
  79. package/dist/vocabulary/specs/rating.spec.json +1 -0
  80. package/dist/vocabulary/specs/resizable-frame.spec.json +1 -0
  81. package/dist/vocabulary/specs/scroll-area.spec.json +1 -0
  82. package/dist/vocabulary/specs/search.spec.json +1 -0
  83. package/dist/vocabulary/specs/segmented-button.spec.json +1 -0
  84. package/dist/vocabulary/specs/select-field.spec.json +1 -0
  85. package/dist/vocabulary/specs/select.spec.json +1 -0
  86. package/dist/vocabulary/specs/side-sheet.spec.json +1 -0
  87. package/dist/vocabulary/specs/size-transition.spec.json +1 -0
  88. package/dist/vocabulary/specs/skeleton.spec.json +1 -0
  89. package/dist/vocabulary/specs/slider-field.spec.json +1 -0
  90. package/dist/vocabulary/specs/slider.spec.json +1 -0
  91. package/dist/vocabulary/specs/snackbar.spec.json +1 -0
  92. package/dist/vocabulary/specs/split-view.spec.json +1 -0
  93. package/dist/vocabulary/specs/stepper.spec.json +1 -0
  94. package/dist/vocabulary/specs/steps.spec.json +1 -0
  95. package/dist/vocabulary/specs/swatch.spec.json +1 -0
  96. package/dist/vocabulary/specs/switch.spec.json +1 -0
  97. package/dist/vocabulary/specs/tab-view.spec.json +1 -0
  98. package/dist/vocabulary/specs/table-of-contents.spec.json +1 -0
  99. package/dist/vocabulary/specs/table.spec.json +1 -0
  100. package/dist/vocabulary/specs/tabs.spec.json +1 -0
  101. package/dist/vocabulary/specs/tag-group.spec.json +1 -0
  102. package/dist/vocabulary/specs/tag.spec.json +1 -0
  103. package/dist/vocabulary/specs/text-field.spec.json +1 -0
  104. package/dist/vocabulary/specs/text-input.spec.json +1 -0
  105. package/dist/vocabulary/specs/timeline.spec.json +1 -0
  106. package/dist/vocabulary/specs/toolbar.spec.json +1 -0
  107. package/dist/vocabulary/specs/tooltip.spec.json +1 -0
  108. package/dist/vocabulary/specs/tree-view.spec.json +1 -0
  109. package/dist/vocabulary/tanrei.config.json +24 -0
  110. package/dist/vocabulary/tokens/comp/accordion.tokens.json +459 -0
  111. package/dist/vocabulary/tokens/comp/app-bar.tokens.json +308 -0
  112. package/dist/vocabulary/tokens/comp/app-shell.tokens.json +248 -0
  113. package/dist/vocabulary/tokens/comp/avatar.tokens.json +199 -0
  114. package/dist/vocabulary/tokens/comp/badge.tokens.json +101 -0
  115. package/dist/vocabulary/tokens/comp/bottom-sheet.tokens.json +326 -0
  116. package/dist/vocabulary/tokens/comp/breadcrumbs.tokens.json +253 -0
  117. package/dist/vocabulary/tokens/comp/button-group.tokens.json +140 -0
  118. package/dist/vocabulary/tokens/comp/button-with-menu.tokens.json +810 -0
  119. package/dist/vocabulary/tokens/comp/button.tokens.json +1355 -0
  120. package/dist/vocabulary/tokens/comp/calendar.tokens.json +500 -0
  121. package/dist/vocabulary/tokens/comp/callout.tokens.json +510 -0
  122. package/dist/vocabulary/tokens/comp/card.tokens.json +204 -0
  123. package/dist/vocabulary/tokens/comp/carousel.tokens.json +469 -0
  124. package/dist/vocabulary/tokens/comp/chat-composer.tokens.json +343 -0
  125. package/dist/vocabulary/tokens/comp/checkbox.tokens.json +587 -0
  126. package/dist/vocabulary/tokens/comp/chip.tokens.json +716 -0
  127. package/dist/vocabulary/tokens/comp/code-block.tokens.json +473 -0
  128. package/dist/vocabulary/tokens/comp/color-input.tokens.json +49 -0
  129. package/dist/vocabulary/tokens/comp/combobox.tokens.json +756 -0
  130. package/dist/vocabulary/tokens/comp/copy-button.tokens.json +56 -0
  131. package/dist/vocabulary/tokens/comp/date-time-picker.tokens.json +797 -0
  132. package/dist/vocabulary/tokens/comp/description-list.tokens.json +203 -0
  133. package/dist/vocabulary/tokens/comp/dialog.tokens.json +340 -0
  134. package/dist/vocabulary/tokens/comp/divider.tokens.json +139 -0
  135. package/dist/vocabulary/tokens/comp/drop-zone.tokens.json +151 -0
  136. package/dist/vocabulary/tokens/comp/embedded-text-input.tokens.json +103 -0
  137. package/dist/vocabulary/tokens/comp/empty-state.tokens.json +154 -0
  138. package/dist/vocabulary/tokens/comp/field-group.tokens.json +211 -0
  139. package/dist/vocabulary/tokens/comp/field.tokens.json +308 -0
  140. package/dist/vocabulary/tokens/comp/figure.tokens.json +269 -0
  141. package/dist/vocabulary/tokens/comp/file-item.tokens.json +445 -0
  142. package/dist/vocabulary/tokens/comp/file-picker.tokens.json +282 -0
  143. package/dist/vocabulary/tokens/comp/file-upload.tokens.json +30 -0
  144. package/dist/vocabulary/tokens/comp/handle.tokens.json +343 -0
  145. package/dist/vocabulary/tokens/comp/image-preview.tokens.json +327 -0
  146. package/dist/vocabulary/tokens/comp/inline-code.tokens.json +86 -0
  147. package/dist/vocabulary/tokens/comp/input-box.tokens.json +1073 -0
  148. package/dist/vocabulary/tokens/comp/keyboard-shortcut.tokens.json +194 -0
  149. package/dist/vocabulary/tokens/comp/link-card.tokens.json +321 -0
  150. package/dist/vocabulary/tokens/comp/link.tokens.json +321 -0
  151. package/dist/vocabulary/tokens/comp/list-row.tokens.json +249 -0
  152. package/dist/vocabulary/tokens/comp/list.tokens.json +328 -0
  153. package/dist/vocabulary/tokens/comp/loading-indicator.tokens.json +218 -0
  154. package/dist/vocabulary/tokens/comp/main-action-button.tokens.json +418 -0
  155. package/dist/vocabulary/tokens/comp/marquee-text.tokens.json +110 -0
  156. package/dist/vocabulary/tokens/comp/menu.tokens.json +1124 -0
  157. package/dist/vocabulary/tokens/comp/menubar.tokens.json +279 -0
  158. package/dist/vocabulary/tokens/comp/meter.tokens.json +173 -0
  159. package/dist/vocabulary/tokens/comp/modal-layer.tokens.json +69 -0
  160. package/dist/vocabulary/tokens/comp/navigation-bar.tokens.json +448 -0
  161. package/dist/vocabulary/tokens/comp/navigation-drawer.tokens.json +1126 -0
  162. package/dist/vocabulary/tokens/comp/number-input.tokens.json +75 -0
  163. package/dist/vocabulary/tokens/comp/number-ticker.tokens.json +77 -0
  164. package/dist/vocabulary/tokens/comp/one-time-code-input.tokens.json +246 -0
  165. package/dist/vocabulary/tokens/comp/page-header.tokens.json +247 -0
  166. package/dist/vocabulary/tokens/comp/pagination.tokens.json +233 -0
  167. package/dist/vocabulary/tokens/comp/popover.tokens.json +363 -0
  168. package/dist/vocabulary/tokens/comp/previous-next-links.tokens.json +194 -0
  169. package/dist/vocabulary/tokens/comp/progress-indicator.tokens.json +218 -0
  170. package/dist/vocabulary/tokens/comp/prose.tokens.json +283 -0
  171. package/dist/vocabulary/tokens/comp/radio-button.tokens.json +413 -0
  172. package/dist/vocabulary/tokens/comp/rating.tokens.json +230 -0
  173. package/dist/vocabulary/tokens/comp/resizable-frame.tokens.json +166 -0
  174. package/dist/vocabulary/tokens/comp/scroll-area.tokens.json +99 -0
  175. package/dist/vocabulary/tokens/comp/search.tokens.json +761 -0
  176. package/dist/vocabulary/tokens/comp/segmented-button.tokens.json +414 -0
  177. package/dist/vocabulary/tokens/comp/select.tokens.json +687 -0
  178. package/dist/vocabulary/tokens/comp/side-sheet.tokens.json +332 -0
  179. package/dist/vocabulary/tokens/comp/size-transition.tokens.json +49 -0
  180. package/dist/vocabulary/tokens/comp/skeleton.tokens.json +114 -0
  181. package/dist/vocabulary/tokens/comp/slider.tokens.json +436 -0
  182. package/dist/vocabulary/tokens/comp/snackbar.tokens.json +1160 -0
  183. package/dist/vocabulary/tokens/comp/split-view.tokens.json +52 -0
  184. package/dist/vocabulary/tokens/comp/stepper.tokens.json +538 -0
  185. package/dist/vocabulary/tokens/comp/steps.tokens.json +190 -0
  186. package/dist/vocabulary/tokens/comp/swatch.tokens.json +208 -0
  187. package/dist/vocabulary/tokens/comp/switch.tokens.json +350 -0
  188. package/dist/vocabulary/tokens/comp/tab-view.tokens.json +142 -0
  189. package/dist/vocabulary/tokens/comp/table-of-contents.tokens.json +429 -0
  190. package/dist/vocabulary/tokens/comp/table.tokens.json +553 -0
  191. package/dist/vocabulary/tokens/comp/tabs.tokens.json +1058 -0
  192. package/dist/vocabulary/tokens/comp/tag-group.tokens.json +68 -0
  193. package/dist/vocabulary/tokens/comp/tag.tokens.json +551 -0
  194. package/dist/vocabulary/tokens/comp/text-input.tokens.json +96 -0
  195. package/dist/vocabulary/tokens/comp/timeline.tokens.json +239 -0
  196. package/dist/vocabulary/tokens/comp/toolbar.tokens.json +270 -0
  197. package/dist/vocabulary/tokens/comp/tooltip.tokens.json +391 -0
  198. package/dist/vocabulary/tokens/comp/tree-view.tokens.json +478 -0
  199. package/dist/vocabulary/tokens/dial/dial.tokens.json +137 -0
  200. package/dist/vocabulary/tokens/fidelity/cupertino.fidelity.json +165 -0
  201. package/dist/vocabulary/tokens/fidelity/m3-like.fidelity.json +388 -0
  202. package/dist/vocabulary/tokens/fidelity/reference/androidx-material3.json +144 -0
  203. package/dist/vocabulary/tokens/fidelity/reference/apple-hig.json +196 -0
  204. package/dist/vocabulary/tokens/fidelity/reference/material-web.json +802 -0
  205. package/dist/vocabulary/tokens/generated/cupertino/components.json +1749 -0
  206. package/dist/vocabulary/tokens/generated/cupertino/fidelity.json +162 -0
  207. package/dist/vocabulary/tokens/generated/m3-like/components.json +1761 -0
  208. package/dist/vocabulary/tokens/generated/m3-like/fidelity.json +194 -0
  209. package/dist/vocabulary/tokens/generated/tanrei/components.json +1764 -0
  210. package/dist/vocabulary/tokens/icon-sets/material-symbols.icon-set.json +279 -0
  211. package/dist/vocabulary/tokens/ref/typeface.tokens.json +116 -0
  212. package/dist/vocabulary/tokens/schema/icon-set.schema.json +82 -0
  213. package/dist/vocabulary/tokens/schema/system.schema.json +859 -0
  214. package/dist/vocabulary/tokens/sys/behavior.tokens.json +184 -0
  215. package/dist/vocabulary/tokens/sys/color.vocabulary.json +58 -0
  216. package/dist/vocabulary/tokens/sys/elevation.tokens.json +362 -0
  217. package/dist/vocabulary/tokens/sys/measure.tokens.json +442 -0
  218. package/dist/vocabulary/tokens/sys/motion.tokens.json +1421 -0
  219. package/dist/vocabulary/tokens/sys/scroll-edge.tokens.json +50 -0
  220. package/dist/vocabulary/tokens/sys/shape.tokens.json +169 -0
  221. package/dist/vocabulary/tokens/sys/space.tokens.json +256 -0
  222. package/dist/vocabulary/tokens/sys/state.tokens.json +83 -0
  223. package/dist/vocabulary/tokens/sys/typescale.tokens.json +551 -0
  224. package/dist/vocabulary/tokens/systems/core.system.json +1889 -0
  225. package/dist/vocabulary/tokens/systems/cupertino.system.json +859 -0
  226. package/dist/vocabulary/tokens/systems/m3-like/comp/fab-menu.tokens.json +499 -0
  227. package/dist/vocabulary/tokens/systems/m3-like.system.json +1181 -0
  228. package/dist/vocabulary/tokens/systems/tanrei.system.json +707 -0
  229. package/dist/vocabulary/tokens/tanrei.resolver.json +400 -0
  230. package/package.json +52 -3
@@ -0,0 +1 @@
1
+ {"name":"menubar","title":"Menubar","summary":"Keeps an application's commands within reach in one persistent row of named menus (File, Edit, View…), each opening a menu below its title, with the arrow keys moving along the row and into each menu; beside the menus the row may hold a few entries that act by themselves — an action or a link.","level":"composed","listing":"default","builtFrom":["menu"],"anatomy":[{"id":"bar","description":"The row itself: its fill (transparent in the default system, so the chrome it stands on shows through), its paddings and the gap between titles. It spans the inline size its parent gives it and is placed by the product."},{"id":"container","description":"One entry's container — a menu's title or a bar item: the part that is pressed and that carries hover, focus and press, and the fill of the title whose menu is open."},{"id":"label","description":"An entry's text and accessible name: a menu's label for its title, a bar item's own label, on one line, never cut."},{"id":"menu","description":"The surface a title opens: a Tanrei Menu below the title, drawn from the menu's own tokens and holding the menu's own items — actions, link items, checkbox and radio items, groups, submenus and shortcuts.","optional":true},{"id":"overflow-item","description":"The last title of a row that cannot hold every title: the glyph more_horiz of the system's icon set in a title's container. Its menu holds the menus that were folded out of the row, each as a submenu. Drawn only while something is folded.","optional":true},{"id":"icon","description":"The overflow item's glyph, the one entry that is not a word.","optional":true},{"id":"mark","description":"The glyph open_in_new of the system's icon set after the label of a link item that opens a new context (MBR-37). Hidden from assistive technology; the link item's targetLabel says what it shows.","optional":true},{"id":"indicator","description":"The glyph expand_more of the system's icon set after a menu's title while the bar also holds bar items (MBR-47): it tells an entry that opens a menu from one that acts at once. Hidden from assistive technology, which is told by the title's own popup state.","optional":true},{"id":"focus-ring","description":"The system's keyboard focus indicator around a title's container."}],"props":[{"name":"label","type":"string","default":"","description":"Names the bar for assistive technology (\"Application menu\"), in the product's language. Never drawn. Required. It is this bar's own name and is not read from the product's words."},{"name":"overflowLabel","type":"string","default":"","description":"The accessible name of the overflow item (\"More menus\", or \"More\" where bar items may fold into it too), in the product's language. Never drawn. Needed whenever the bar may be narrower than its entries, which on the web is always.","words":"menubarOverflowLabel"}],"items":[{"name":"menu","summary":"One menu of the bar: its title in the row and the items that open below it. Its items are the menu component's own item kinds (item, checkbox-item, radio-item, submenu and group, as the menu spec defines them), which the bar presents in a Tanrei Menu; a fixture cannot fill them.","props":[{"name":"label","type":"string","default":"","description":"The title's text, and the name of the title and of the menu it opens (\"File\"). Required. One or two words."},{"name":"open","type":"boolean","default":false,"description":"Whether this menu is shown. It is the menu's own, as a submenu item's is: the bar sets it when the menu is opened or closed and emits toggle; the product may set it to open or close the menu itself. At most one menu of a bar is open."},{"name":"disabled","type":"boolean","default":false,"description":"Prevents the menu from opening. The title stays in the row and reachable with the arrow keys."}],"events":[{"name":"toggle","description":"The menu was opened or closed by the person — from its title, by the arrow keys from a neighbouring menu, by a pointer moving along the bar, by Escape, Tab, a press outside or an item's activation, or as a submenu of the overflow item. Carries the new open value. Not emitted for a change the product made to open."}]},{"name":"item","summary":"A bar item: an entry of the bar that acts by itself instead of opening a menu. It is an action, run at once; with an href it is a link, which goes somewhere. It is the menu's own item kind brought up to the row, with a title's look and none of a row's columns.","props":[{"name":"label","type":"string","default":"","description":"The bar item's text and its accessible name (\"Run\", \"Documentation\"). Required. One or two words that say what it does at once — a verb for an action, the place for a link — because nothing in its look tells it from a title that opens a menu."},{"name":"disabled","type":"boolean","default":false,"description":"Prevents activation. The bar item stays in the row and reachable with the arrow keys, as a disabled title does; a disabled link item cannot be followed (MBR-39)."},{"name":"href","type":"string","default":"","description":"The destination: an address as the platform's links take one (a URL; on the web a path or a fragment as well). Not empty, it makes the bar item a link item (a control with a destination is a link): the platform's own link, exposed as a menu item, drawn exactly as an action is and reached with the same keys; a plain activation emits click and opens the destination (MBR-35, MBR-36). Empty, the bar item is an action and the product acts on click. As the menu item's href (MNU-53)."},{"name":"target","type":"enum","values":["same","new"],"default":"same","description":"Where the destination opens, as the Button's target. same: where the person is. new: a new context — a new tab or window on the web, outside the current screen elsewhere — which the bar item marks with the glyph open_in_new after its label and says through targetLabel (MBR-37). Ignored without href."},{"name":"targetLabel","type":"string","default":"","description":"What assistive technology reads after the link item's name while target is new (\"opens in a new tab\"), as the Button's targetLabel: Tanrei ships no words of its own. Required while target is new; ignored otherwise.","words":"targetLabel"},{"name":"current","type":"boolean","default":false,"description":"The link item names the place the person is already at (the current page), as the Link's current. It is exposed as the current item, drawn with the fill of the menu's row the person is on (comp.menubar.selected.container.color, which aliases comp.menu.current.container.color) at its label's own weight, and stays a link (MBR-38). The product sets it; the bar never does, and at most one bar item of a bar is current. Ignored without href."}],"events":[{"name":"click","description":"The bar item was activated by pointer, touch, Enter, Space or assistive technology — in the row or, while it is folded, in the overflow item's menu. A link item emits it before its destination opens; a product that takes the navigation itself (a client-side router) cancels it (MBR-36)."}]}],"states":["enabled","disabled","hovered","focused","pressed"],"behavior":[{"id":"MBR-1","text":"THE menubar SHALL draw one row across the full inline size its parent gives it: comp.menubar.bar.color behind the whole row, and on it the titles of its menus, one for each menu in the order given, from the start edge, comp.menubar.bar.gap apart, inset by comp.menubar.bar.padding-inline from the row's start and end edges and by comp.menubar.bar.padding-block above and below. It SHALL NOT position itself, stick to an edge, raise itself or draw an edge of its own: the product places it, normally at the top of its window or in the chrome that is already there, and the bar stays in view because that chrome does."},{"id":"MBR-2","text":"THE menubar SHALL draw each title as a container at least comp.menubar.container.height tall and as wide as its label with comp.menubar.container.padding-inline on each side, with corners comp.menubar.container.shape, each at most half the container's height, and its label centered in it on one line in comp.menubar.label.typescale; it SHALL NOT wrap, shrink or truncate a title's label: a title that the row has no room for is folded whole (MBR-21)."},{"id":"MBR-3","text":"THE menubar SHALL draw a title from the condition it is in: expanded while its menu is open, otherwise unselected; a bar item from the unselected condition, and a link item that is current from the selected one (MBR-38). WHILE a title is at rest its container SHALL take the container color of its condition (comp.menubar.unselected.container.color, comp.menubar.selected.container.color, comp.menubar.expanded.container.color) drawn over the bar, and its label the label color of its condition (comp.menubar.unselected.label.color, comp.menubar.selected.label.color, comp.menubar.expanded.label.color). No title is selected: the expanded condition says which menu is shown now and ends when that menu closes, and the selected condition is the current page's alone (MBR-38)."},{"id":"MBR-4","text":"WHILE a title is hovered, keyboard-focused or pressed THE menubar SHALL render its container, label, the overflow item's glyph and opacity from the component tokens of its condition in the highest-precedence active state, with precedence pressed over focused over hovered; focus gained by pointer or touch SHALL NOT select the focused state."},{"id":"MBR-5","text":"WHEN a title receives keyboard focus THE menubar SHALL show the focus ring around the title's container without animation; focus gained by pointer or touch SHALL NOT show it. The bar SHALL leave room for the ring: it SHALL NOT clip it at its own edges."},{"id":"MBR-6","text":"WHEN the menubar title is pressed by pointer, touch, Enter or Space THE menubar title SHALL show the pressed state without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner."},{"id":"MBR-7","text":"WHILE pressed THE menubar title SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole container at once; ripple grows the pressed state layer from the point of contact (from the center for keyboard activation); dim applies the pressed opacity to the whole control and draws no state layer; none draws no answer to the press. Under ripple and dim only the container color stays with the state under the press; label, icon, opacity and shape still come from the pressed tokens. Under none every part stays with the state under the press. The ripple grows over comp.menubar.motion.feedback-duration with motion.state-easing, fades over motion.state-duration with motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced."},{"id":"MBR-8","text":"THE menubar title SHALL ease its container corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show its keyboard focus as sys.behavior.focus-style names (ring or glow); a platform that cannot draw a choice SHALL fall back to the first value and state that in its README."},{"id":"MBR-9","text":"WHEN the user activates an enabled title whose menu is closed — by a press with a pointer, a tap, Enter, Space, Down Arrow or Up Arrow while the title has focus — THE menubar SHALL open that title's menu without delay, close any other open menu of the bar (MBR-10), set the menu's open to true and emit the menu's toggle once with true. The open menu SHALL be a Tanrei Menu anchored to the title, below it with the start edges aligned, comp.menu.surface.offset from it, flipping above and shifting along the title as MNU-2 says, drawn from the menu's own tokens and holding the menu's own item kinds (actions, link items, checkbox and radio items, groups, submenus, shortcuts), every one of which SHALL behave as the menu's spec says except where MBR-13 to MBR-15 say otherwise. Focus SHALL move into the menu as MNU-1 says — to its first enabled item, or to its last enabled item when the key was Up Arrow, and to its first or last item where none is enabled (MNU-43) — showing the focus ring only when the input was a key. WHILE its menu is open THE menubar SHALL draw the title in the expanded condition (MBR-3) in whatever interaction state it is in."},{"id":"MBR-10","text":"THE menubar SHALL show at most one of its menus at a time. WHEN a menu opens while another menu of the bar is open THE menubar SHALL close the other first, every submenu of it with it, set its open to false and emit its toggle once with false. WHEN the user presses the title of the open menu with a pointer or taps it THE menubar SHALL close that menu, set its open to false, emit its toggle once with false and keep focus on the title. WHEN the product sets a menu's open THE menubar SHALL open or close that menu as an activation would, without emitting that menu's toggle for the product's own change; IF the product sets open on more than one menu THE menubar SHALL show the first of them in the order given, and in debug builds report it."},{"id":"MBR-11","text":"WHILE a menu of the bar is open, WHEN a pointer that can hover moves onto another enabled title THE menubar SHALL open that title's menu at once, with no delay, and close the one that was open (MBR-10), moving focus into the new menu as MNU-1 says without showing a focus ring; a pointer on a disabled title, or on the bar between titles, SHALL leave the open menu open. WHILE no menu of the bar is open a pointer on a title SHALL only render it hovered and SHALL open nothing. Touch has no hover: a tap on another title opens its menu (MBR-9)."},{"id":"MBR-12","text":"THE menubar SHALL be one Tab stop: the title that had keyboard focus last or whose menu was opened last, by any input, whichever came later, or else its first title. WHILE a title has keyboard focus and no menu is open, the arrow key that points to the inline end (Right Arrow in a left-to-right layout, Left Arrow in a right-to-left one) and the one that points to the inline start SHALL move focus to the next and the previous title, wrapping at the ends, Home and End SHALL move it to the first and the last title, and a printable character typed with no modifier but Shift SHALL move it to the next title after the focused one, wrapping, whose label begins with that character, compared without regard to case, to the width of a character or to the marks on a letter, as the label's language compares (as the combobox compares, CMB-25), and nowhere when no label does; none of these keys SHALL open a menu. A disabled title and the overflow item (MBR-21) SHALL be reached by these keys like any other title, so that a person hears every menu the bar has. Tab and Shift+Tab SHALL move focus out of the bar, to what follows and what precedes it. Beyond these keys and those of MBR-9 THE menubar SHALL handle no key while no menu is open, and SHALL NOT let a key it handles scroll or act on what is around the bar."},{"id":"MBR-13","text":"WHILE a menu of the bar is open and focus is inside it, at any level, WHEN the user presses the arrow key that points to the inline end on an item that is not a submenu item THE menubar SHALL close that menu and every submenu of it, open the menu of the next enabled title, wrapping at the ends and passing over disabled titles, and move focus to that menu's first enabled item with the focus ring shown; WHEN the user presses the arrow key that points to the inline start while focus is in the menu's own surface, not in a submenu, THE menubar SHALL do the same towards the previous enabled title. These two keys replace what MNU-51 says for a menu that stands alone; on a submenu item the inline-end key still opens its submenu (MNU-43), and in a submenu the inline-start key still closes that submenu alone (MNU-48). WHERE the bar has one enabled title only, these keys SHALL do nothing and SHALL NOT let the key scroll or act on what is behind the menu. Each menu closed and opened this way SHALL have its open set and its toggle emitted once (MBR-9, MBR-10)."},{"id":"MBR-14","text":"WHEN the user presses Escape or the platform's back while a menu of the bar is open and no submenu of it is open THE menubar SHALL close that menu, set its open to false, emit its toggle once with false and return focus to its title, showing the focus ring when the input was a key, so that the arrow keys go on along the bar. WHEN the user presses Tab or Shift+Tab while a menu of the bar is open, at any level, THE menubar SHALL close it the same way and SHALL let focus move on out of the bar, to what follows the bar for Tab and to what precedes it for Shift+Tab, never to another title. WHEN the user presses outside every surface of the open menu and outside the bar, or focus leaves the bar and the open menu, THE menubar SHALL close the menu the same way and SHALL NOT take focus back. WHILE no menu is open THE menubar SHALL NOT handle Escape."},{"id":"MBR-15","text":"WHEN the user activates an item of an open menu that closes its menu (an action or a link item, at any level: MNU-6, MNU-54) THE menubar SHALL close the menu, every submenu with it, set its open to false, emit its toggle once with false after the item's own event, and return focus to the menu's title, unless the product moved focus elsewhere while handling the item's event, in which case THE menubar SHALL leave focus where the product put it. A checkbox or radio item activated with Space leaves its menu open, as MNU-6 says."},{"id":"MBR-16","text":"THE menubar SHALL add no event to an item of its menus and take none away: an item's click, a checkbox item's change, a group's change and a submenu item's toggle are emitted as the menu's spec says, by the item or the group. THE menubar SHALL NOT listen for a keyboard shortcut that an item shows, nor run an item when its shortcut is pressed: the menu draws the shortcut and exposes it (MNU-31), and binding the keys is the product's. THE menubar SHALL define no access key of its own — no underlined letter in a title, no key that moves focus to the bar from elsewhere — and SHALL leave a product free to add one by moving focus to a title or setting a menu's open."},{"id":"MBR-17","text":"WHERE a title's visual size is below the minimum target THE menubar SHALL extend its hit area on both axes to sys.target.touch for touch input and sys.target.pointer for fine pointers, without changing its visual size; a platform that cannot tell the input type SHALL use sys.target.touch. Between two neighbouring titles the hit areas SHALL meet at the middle of comp.menubar.bar.gap and SHALL never overlap; a title narrower than the target SHALL be given the room its target needs by moving its neighbours apart, not by overlapping them."},{"id":"MBR-18","text":"WHILE a menu's disabled is true THE menubar SHALL render its title's container, label and opacity from the disabled component tokens of the unselected condition, SHALL NOT open its menu by any input or by the product's open, SHALL close it if it is open (MBR-10), SHALL NOT emit its toggle for an activation, SHALL keep the title reachable by the keys of MBR-12, and SHALL expose the title as a menu item that opens a menu, with the disabled state."},{"id":"MBR-19","text":"THE menubar SHALL expose itself with the menubar role, named by label, with a horizontal orientation; each title as a menu item that opens a menu, named by its menu's label, with whether that menu is open, the disabled state where it has it, and its position among the bar's titles and their number; and each open menu as a menu named by its title, its items exposed as the menu's spec says (MNU-24). The overflow item SHALL be one such title, named by overflowLabel (MBR-22). WHERE a platform has no menubar role THE menubar SHALL expose a group named by label that holds, in order, one button for each title, each saying that it opens a menu and whether that menu is open, and SHALL say so in its README."},{"id":"MBR-20","text":"WHILE label is empty THE menubar SHALL still render and work, and in debug builds report that it has no accessible name; WHILE a menu's label is empty THE menubar SHALL still draw its title, as an empty container of the title's height and paddings, keep it reachable and operable, and in debug builds report that the title has no name. IF the menubar holds neither a menu nor a bar item THE menubar SHALL draw the bar with nothing on it, take no focus, and in debug builds report it. IF a menu holds no item THE menubar SHALL still draw its title and open its surface, empty, on an activation, SHALL keep focus on the title while that menu is open, SHALL answer the inline arrow keys on that title as MBR-13 says for a menu's own surface and Escape and Tab as MBR-14 says, and in debug builds report it; WHILE such a menu is folded into the overflow item (MBR-22) it SHALL be a submenu item that draws its row, takes focus and opens nothing, as MNU-52 says of a submenu with no item. IF it holds something that is neither a menu nor a bar item (MBR-32) THE menubar SHALL give it no title, no key and no place in the row, and in debug builds report it: a field, a control of the product's own or an entry that holds a state would take the keys the bar moves focus with and would not be a menu item."},{"id":"MBR-21","text":"IF the titles need more inline size than the row has THE menubar SHALL keep every title at its own size, SHALL NOT wrap the row onto a second line, scroll it, shrink it or cut a label, and SHALL fold menus out of the row from its end, as few as make the rest fit, into one overflow item drawn as the last title of the row: the glyph more_horiz of the system's icon set at comp.menubar.icon.size, in the icon color of its condition and state (comp.menubar.unselected.icon.color at rest, comp.menubar.expanded.icon.color while its menu is open), drawn through the icon helper with sys.icon.family.unselected, sys.icon.fill.unselected, sys.icon.weight and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max, centered in a container at least comp.menubar.container.height wide and tall with the corners of MBR-2. IF the first title does not fit beside the overflow item THE menubar SHALL fold every menu, so that the row is the overflow item alone. WHILE every title fits THE menubar SHALL draw no overflow item. THE menubar SHALL decide again what fits, at once and without a motion, whenever its inline size, its menus, a label, the text size or the layout direction changes."},{"id":"MBR-22","text":"THE menubar SHALL treat the overflow item as a title in every respect — its conditions, states, target, keys and hover (MBR-3 to MBR-17) — and SHALL open from it a Tanrei Menu that lists the folded menus in the order given, each as a submenu item named by that menu's label and holding that menu's items unchanged, a disabled menu as a disabled submenu item; these SHALL behave as MNU-42 to MNU-52 say, and the level the fold adds SHALL NOT count towards the depth MNU-52 reports. WHEN a folded menu's submenu opens or closes THE menubar SHALL set that menu's open and emit its toggle once, as it does for a menu opened from its own title, so that open and toggle mean the same wherever the menu is shown. WHEN a change of MBR-21 folds or unfolds the menu that is open THE menubar SHALL close it first (MBR-10) and, if focus was inside it, move focus to the title it is now reached from: its own, or the overflow item. WHILE overflowLabel is empty and the product's words do not give it THE menubar SHALL still draw the overflow item and let it work, SHALL expose it without a name, and in debug builds report the missing word once."},{"id":"MBR-23","text":"THE menubar SHALL supply no word of its own: its name is label and each title is its menu's label, given on the instance; the overflow item's name is overflowLabel, read from the instance and, where that is empty, from the product's words under the key menubarOverflowLabel; the words of every item are the menu's own props. A word nobody gave SHALL NOT be replaced by one in any language."},{"id":"MBR-24","text":"THE menubar SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the menubar is shown THE menubar SHALL draw itself for the new direction at once, without a motion of its own, keeping its focus, the title its Tab stop stands on and which menu is open, the open menu placed again by the new direction (MNU-2) and what fits decided again (MBR-21)."},{"id":"MBR-25","text":"WHERE the layout direction is right-to-left THE menubar SHALL lay out its titles from the right edge in the order given, fold menus from the left end of the row and draw the overflow item at the left end, open each menu below its title with their right edges aligned, and move focus along the bar with Left Arrow to the next title and Right Arrow to the previous one (MBR-12, MBR-13); the order of focus and of reading SHALL stay the order given. The overflow item's glyph SHALL be mirrored exactly when the system's icon set marks its name as mirrored, by the icon helper and not by the bar."},{"id":"MBR-26","text":"THE menubar SHALL lay out each title's label as text of its own direction, isolated from the text around it: it takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right word keeps its own order in a right-to-left layout and reorders nothing beside it; THE menubar SHALL still place each title by the layout direction, not by the text's own."},{"id":"MBR-27","text":"WHILE the text size is enlarged THE menubar SHALL grow each title with its label — the container's height is a minimum, and its width follows the label — and the row with its titles, keeping comp.menubar.bar.gap, comp.menubar.bar.padding-inline, comp.menubar.bar.padding-block and comp.menubar.container.padding-inline as they are, and SHALL decide again what fits (MBR-21), so that at twice the text size in a window 320 wide every menu is still reached, from its title or through the overflow item, with nothing cut and no scrolling sideways."},{"id":"MBR-28","text":"WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE menubar SHALL draw each title's label and the overflow item's glyph in the platform's button text color, a disabled title in its disabled text color, the focus ring in its highlight color, and SHALL mark the title whose menu is open, and a hovered or pressed title, by the platform's highlight colors or by an outline of sys.border.hairline or more around the title's container, never by a fill the platform may remove; it SHALL draw no fill for the bar."},{"id":"MBR-29","text":"WHEN the colors of a title change between states or conditions THE menubar SHALL animate them over comp.menubar.motion.state-duration with comp.menubar.motion.state-easing, and SHALL change them at once where motion is reduced. WHEN one menu of the bar takes the place of another (MBR-11, MBR-13) THE menubar SHALL remove the one and show the other at once, with neither the close nor the open motion of MNU-4, so that moving along the bar does not flicker; the menu that opens from a bar with no menu open, and the last one to close, SHALL move as MNU-4 says."},{"id":"MBR-30","text":"WHEN a menu is added to the bar, removed from it, reordered or given another label or disabled value while the bar is shown THE menubar SHALL lay the row out again at once, without a motion; a menu that is removed while open SHALL be closed without emitting its toggle; WHEN the title that holds focus or the Tab stop is removed THE menubar SHALL move it to the title that followed, or to the one before where none follows, and SHALL NOT let focus fall out of the bar while a title remains."},{"id":"MBR-31","text":"WHILE a menu of the bar is open THE menubar SHALL NOT trap focus, SHALL NOT make the rest of the screen inert and SHALL draw no scrim: its menus are operated overlays that are not modal (MNU-25), and the bar itself is part of the page, not an overlay. A press outside that closes a menu SHALL also reach what is under it where the menu's own platform form lets it (MNU-5)."},{"id":"MBR-32","text":"THE menubar SHALL take two kinds of entry in its row, in the order given and mixed freely: a menu, whose title opens it (MBR-9), and a bar item, which acts by itself — an action that is run at once or, WHILE its href is not empty, a link that goes somewhere (MBR-35). THE menubar SHALL give a bar item its place in the row among the titles and SHALL treat it as a title in every respect but one, that it has no menu: it is drawn as MBR-2 draws a title, from its own label; it is in the unselected condition, or in the selected one while it is a link item that is current (MBR-38), and never in the expanded one (MBR-3); it takes a title's states, focus ring, press answer, corners and target (MBR-4 to MBR-8, MBR-17), its hit area meeting its neighbours' as theirs meet; it is counted with the titles wherever this spec orders, measures, folds or mirrors them or lays them out again (MBR-1, MBR-21, MBR-24 to MBR-27, MBR-30); and it is one of the stops of the bar's one Tab stop, reached by the inline arrow keys, Home, End and a typed character exactly as a title is, a disabled one included, and it is where the Tab stop stands when it had keyboard focus or was activated last (MBR-12). WHILE the bar holds both menus and bar items THE menubar SHALL tell a menu's title from a bar item at rest by the indicator MBR-47 draws after each menu's title, and assistive technology by what MBR-42 says; WHILE every entry is a menu it SHALL draw none, the titles needing nothing to be told from each other."},{"id":"MBR-33","text":"WHEN the user activates an enabled bar item that is not a link item — by a press with a pointer, a tap, Enter or Space while it has focus, or the default action of assistive technology — THE menubar SHALL first close the menu of the bar that is open, if one is, as MBR-10 says, and SHALL then emit the bar item's click exactly once; it SHALL open nothing, and SHALL keep focus on the bar item, moved there without a focus ring when the input was a pointer or a touch, unless the product moved focus elsewhere while handling click, in which case it SHALL leave focus where the product put it. THE menubar SHALL activate a bar item for nothing else: not for focus arriving on it, not for a pointer over it, and not for the arrow keys, Home, End or a typed character that reach it, so that moving along the bar runs no command."},{"id":"MBR-34","text":"WHILE a bar item has keyboard focus THE menubar SHALL do nothing for Down Arrow and Up Arrow, which open a menu from a title and have none to open here, and SHALL NOT let them scroll or act on what is around the bar, so that the same two keys never open a menu on one entry of the row and move the page on the next; it SHALL NOT handle Escape (MBR-14), and Tab and Shift+Tab SHALL leave the bar as MBR-12 says."},{"id":"MBR-35","text":"WHILE a bar item's href is not empty THE menubar SHALL make it a link item, as MNU-53 makes an item of a menu one: the platform's own link to href (the web's anchor element; SwiftUI's Link; on Compose, Flutter and React Native an element with the platform's link semantics whose address is opened by the platform's opener), as BTN-22 says for a link button, so that whatever the platform gives a link is the platform's, and not the bar's to draw or to take over. WHERE the platform has a menubar role THE menubar SHALL expose a link item with the menu item role, on the link itself, and not with the link role, for the reason MNU-53 gives for a menu: the bar's role, an entry's position in it and its keys hold only while everything in the row is a menu item. THE menubar SHALL draw a link item exactly as it draws an action, from the same tokens in every state, with no look of its own for a link and none for a destination already visited, SHALL give the bar item's whole container and its hit area (MBR-17) to the link, and SHALL keep it one stop of the bar's Tab stop like any entry, never a Tab stop of its own."},{"id":"MBR-36","text":"WHEN the user activates an enabled link item as an entry of the bar is activated — by a click with the primary button and no modifier key, a touch, Enter or Space with no modifier key, or the default action of assistive technology — THE menubar SHALL close the menu of the bar that is open, if one is (MBR-10), emit the bar item's click exactly once, and then open href where target names, unless the product cancelled that click, in which case it SHALL open nothing: the product's own router has taken the navigation, as MNU-54 says of a menu's link item. It SHALL show the pressed state as MBR-6 and MBR-7 say and SHALL NOT hold the navigation back for sys.motion.duration.press-hold. Space SHALL activate a link item exactly as Enter does and SHALL scroll nothing, as MNU-54 says and for its reasons: a link item is exposed and operated as a menu item, nothing in its look tells it from the action beside it, and Space activates every other entry of the row. For every other activation the platform gives a link — on the web a click or Enter with a modifier key, a middle click and the link's context menu, on Apple platforms a long press that previews — THE menubar SHALL leave the link to the platform, SHALL prevent, replace or imitate none of it, and SHALL close no menu for it."},{"id":"MBR-37","text":"WHILE a bar item is a link item and its target is new THE menubar SHALL open href in a new context, as BTN-24 says for a link button (on the web a new tab or window that is given no handle to the page that opened it), and SHALL draw the glyph open_in_new of the system's icon set after the label, comp.menubar.container.gap from it and inside the container's paddings, at comp.menubar.icon.size, in the icon color of the bar item's state (comp.menubar.unselected.icon.color at rest), through the icon helper as MBR-21 draws the overflow item's glyph — the helper mirrors it in a right-to-left layout because the icon set marks its name — and hidden from assistive technology; the bar item SHALL then be as wide as its label, the gap and the glyph need. THE menubar SHALL expose targetLabel as the bar item's description — read from the bar item and, where that is empty, from the product's words under the key targetLabel — and WHILE neither gives it SHALL still render and in debug builds report that a link that opens a new context does not say so. WHILE target is same THE menubar SHALL draw no mark and SHALL ignore targetLabel."},{"id":"MBR-38","text":"WHILE a link item's current is true THE menubar SHALL expose it as the current item of its set (on the web the current page; on a platform without that state, the selected state), SHALL keep it a link that takes focus and can be followed, and SHALL draw it from the selected condition (MBR-3): its container in comp.menubar.selected.container.color, which is the fill of the menu's row the person is on (comp.menu.current.container.color), in every contrast scheme, and its label and mark in that condition's colors, in every state, at its label's own weight, so that the place the person is on is drawn in the bar as a menu draws it (MNU-58). It is never mistaken for the title of an open menu: the expanded condition has colors of its own, and the current page is a fact about where the person is, not a menu that is shown. THE menubar SHALL NOT set current itself on any activation: where the product is, is the product's to say (NVB-31). IF more than one bar item is current THE menubar SHALL draw and expose each as given and in debug builds report it; WHILE a bar item's href is empty THE menubar SHALL ignore its current and in debug builds report it."},{"id":"MBR-39","text":"WHILE a bar item's disabled is true THE menubar SHALL render its container, label, mark and opacity from the disabled component tokens of the unselected condition, SHALL NOT emit its click or act on any input, SHALL keep it reachable by the keys of MBR-12 as MBR-18 keeps a disabled title, and SHALL expose it with the disabled state; a disabled link item SHALL NOT be a link that can be followed, as MNU-56 says of a menu's: it SHALL keep the exposure MBR-35 gives it, with the disabled state and no destination, and SHALL open nothing by any means the platform gives a link (on the web the anchor carries no href, so there is no context menu entry, no drag and no new tab for it)."},{"id":"MBR-40","text":"WHEN an inline arrow key of MBR-13 is pressed in an open menu and the next enabled entry in that direction — wrapping at the ends, and passing over disabled bar items as it passes over disabled titles — is a bar item THE menubar SHALL close the open menu and every submenu of it, set its open to false and emit its toggle once with false, and SHALL move focus to that bar item with the focus ring shown; it SHALL open nothing and SHALL NOT activate the bar item. No menu is then open, so the keys that follow are those of MBR-12 and MBR-34 and open nothing: THE menubar SHALL keep no memory that a menu was open, and moving on from the bar item SHALL NOT open the next title's menu — a menu follows focus along the bar only while a menu is shown (MBR-11, MBR-13). WHERE the open menu's title is the bar's only enabled entry these keys SHALL do nothing, as MBR-13 says."},{"id":"MBR-41","text":"WHILE a menu of the bar is open, WHEN a pointer that can hover moves onto a bar item THE menubar SHALL render the bar item hovered and SHALL leave the open menu open and focus where it is, as MBR-11 says of a disabled title: a bar item has no menu to show in the other's place, and a menu that closed under a pointer on its way along the row would have to be opened again with a press at the next title. A press on the bar item then activates it (MBR-33, MBR-36), which closes the open menu first. WHILE no menu of the bar is open a pointer on a bar item SHALL only render it hovered."},{"id":"MBR-42","text":"THE menubar SHALL expose each bar item as a menu item named by its label, which SHALL NOT say that it opens a menu and SHALL carry no expanded state (on the web neither aria-haspopup nor aria-expanded, in any value), with the disabled state where it has it and with its position among the bar's entries and their number, the titles, the bar items and the overflow item counted together in the order drawn; a link item as MBR-35 says, with its description where it opens a new context (MBR-37) and with whether it is current (MBR-38). WHERE a platform has no menubar role and exposes the group of MBR-19 instead THE menubar SHALL put in that group, in the order given among the titles' buttons, a button for an action and, for a link item, the platform's link with its link role or trait in place of the button's."},{"id":"MBR-43","text":"WHEN MBR-21 folds entries out of the row THE menubar SHALL fold bar items as it folds menus — whole, from the end, in the order given, whatever their kind — and SHALL list a folded bar item in the overflow item's menu (MBR-22) at its place in that order among the folded menus' submenu items, not as a submenu but as an item of that menu: an action as the menu's own item (MNU-6) and a link item as the menu's own link item, with the same href, target and targetLabel (MNU-53 to MNU-56), each named by the bar item's label and disabled while the bar item is. WHEN the user activates a folded bar item THE menubar SHALL emit the bar item's own click exactly once — the same event of the same bar item, which a product cancels for a link item as MBR-36 says — so that click means the same wherever the bar item is shown, and SHALL then close the overflow item's menu and return focus to the overflow item as MBR-15 says, unless the product moved focus elsewhere while handling click, a link item opening its destination after that; the activations MNU-54 leaves to the platform SHALL leave the overflow item's menu open. The click comes before the closing here and after it in the row (MBR-33, MBR-36), and each is the order its place already has: in the row the menu that is open is another entry's, and an entry of the row that is pressed has the other's menu closed before it answers, as a pressed title does (MBR-10); in the fold the bar item is an item of the menu that is open, and an item's own event comes before its menu closes (MNU-6, MBR-15). In both places THE menubar SHALL emit click before it settles where focus rests, so that focus the product moved while handling click is left where the product put it. A folded link item whose target is new SHALL be marked and described as the menu marks and describes its own (MNU-55), and a folded link item that is current SHALL be the menu's own current link item (MNU-58): exposed as current, and filled as the menu fills the row the person is on (MBR-38). THE menubar SHALL keep the overflow item a title that opens a menu, whatever is folded into it, so that it never acts by itself: WHERE everything folded is bar items its menu holds items and no submenu, and WHERE the row is the overflow item alone the bar is that one menu."},{"id":"MBR-44","text":"WHEN a bar item's target names a value the menubar does not define THE menubar SHALL treat it as same, and in debug builds report the unknown value. IF a bar item's href is only white space, or names a script to run rather than a place to go (the web's javascript: scheme), or cannot be read as an address by the platform, THE menubar SHALL make the bar item an action without a destination, and in the last two cases report it in debug builds, as BTN-26 says for a button. WHILE a bar item's href is empty THE menubar SHALL ignore its target and targetLabel. WHILE a bar item's label is empty THE menubar SHALL still draw it as an empty container of a title's height and paddings, keep it reachable and operable, and in debug builds report that it has no name, as MBR-20 says of a title. THE menubar SHALL give a destination to a bar item alone: WHERE a platform lets one be written on a menu THE menubar SHALL ignore it, keep the menu what it is, and in debug builds report it. THE menubar SHALL take no entry that holds a state: a checkbox or a radio entry directly in the row is refused as MBR-20 says, because a choice that is switched needs a mark a title has no place for, and it belongs in a menu of the bar, where the menu's checkbox and radio items mark it. IF the menubar holds bar items and no menu THE menubar SHALL still render and work, and in debug builds report it: a row of actions alone is a toolbar, and a row of links alone is navigation."},{"id":"MBR-45","text":"WHERE the platform shows the product's own markup before the component runs (the web, before its elements are defined and where scripting is off) THE menubar SHALL leave every link item a link that works: its anchor is the product's own element in the document, shown in the bar's place in the order given and followed by the browser as any link is, with no menubar role, no menu item role and no roving focus on anything until the bar runs. WHEN the bar begins to run THE menubar SHALL take those anchors as its link items where they stand, SHALL add to them the role and the focus order MBR-35 and MBR-12 give, and SHALL NOT copy, move or replace them; a link item that is folded (MBR-43) SHALL keep its anchor in the document, not displayed. A menu and an action SHALL show nothing there: their words are the bar's to draw and their work is the product's script."},{"id":"MBR-46","text":"WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE menubar SHALL draw an action and its states as MBR-28 draws a title, and a link item's label and mark in the platform's link color, a disabled one in its disabled text color: the colors are then the person's and not the design system's, and what they chose for a link holds for a link in a bar as it does anywhere. A current link item, whose fill the mode removes, SHALL be marked by a line of sys.border.thick inside its container's edge in the platform's link color."},{"id":"MBR-47","text":"WHILE the menubar holds at least one bar item and at least one menu THE menubar SHALL end the title of each menu (not a bar item's, and not the overflow item, which is a glyph of its own, MBR-21) with the glyph expand_more of the system's icon set, comp.menubar.container.gap after its label and inside the container's paddings, at comp.menubar.indicator.size, in the icon color of the title's condition and state (comp.menubar.unselected.icon.color at rest, comp.menubar.expanded.icon.color while its menu is open), drawn through the icon helper with sys.icon.family.unselected, sys.icon.fill.unselected, sys.icon.weight and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max, never mirrored and not turned while the menu is open, and hidden from assistive technology, so that a person sees before pressing which entries open a menu and which act at once; the title SHALL then be as wide as its label, the gap and the glyph need, and MBR-21 SHALL measure it so. WHILE every entry of the bar is a menu THE menubar SHALL draw no indicator. Whether the bar mixes the two kinds SHALL be decided from all its entries, folded or not, so that folding never adds or takes away an indicator; WHEN entries are added or removed so that this changes THE menubar SHALL draw or remove the indicators at once, without a motion, and decide again what fits (MBR-21, MBR-30). A menu folded into the overflow item is its submenu item and draws that item's indicator (MNU-46), not this one. IF the icon set cannot draw the glyph yet THE menubar SHALL draw nothing in its place, never its name, and keep its room."},{"id":"MBR-48","text":"WHERE the platform has ARIA attributes (the web), the menubar's host and an action bar item's host carries its role (MBR-19, MBR-42) itself, so what the product writes on it is not moved, but for a name: WHILE label is not empty THE menubar SHALL hold the product's aria-label and aria-labelledby on that host as their data-aria- twins, so that label is its whole name although the platform gives aria-labelledby the precedence, and WHEN label is emptied SHALL give them back as they were written; WHILE label is empty a name the product gives so — aria-label, or aria-labelledby naming an element — SHALL be its name and SHALL NOT be reported as having none in debug builds (MBR-20, MBR-44). WHILE a bar item is folded into the overflow item, or holds the product's own anchor (MBR-35), its host is nothing, and THE menubar SHALL hold them as well, giving them back when the item is an action in the row again. WHEN the product removes one, or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaLabelledByElements) to null, THE menubar SHALL take it away."},{"id":"MBR-49","text":"WHILE a menu of the row has never been shown THE menubar SHALL NOT build its surface, nor the surfaces of its submenus: a closed menu draws nothing and is exposed as nothing (MBR-19), its title, its name, its place among the titles and the typed characters of MBR-12 are the title's own, and a bar of many menus costs at mount what its titles cost. WHEN a menu is shown for the first time — by any input of MBR-9, MBR-11 and MBR-13, or by the product's open (MBR-10) — THE menubar SHALL build its surface in the same turn as that input, and that first showing SHALL be indistinguishable from every later one: placed as MBR-9 places it, appearing with the motion MBR-29 gives it (MNU-4's, or none where it takes another menu's place), with focus moved as MBR-9 says, in every frame. A menu once built SHALL be kept while its title is in the row, so that it closes with its motion (MBR-29) and opens again without being built again. A menu folded into the overflow item is that item's submenu (MBR-22), which the overflow item's menu builds as it builds any submenu."}],"accessibility":{"role":"menubar","keyboard":[{"keys":"Tab / Shift+Tab","action":"Moves focus into the bar, to the entry focused last or else the first entry, and out of it: the bar is one Tab stop. With a menu open, closes it and moves focus on out of the bar."},{"keys":"Right Arrow / Left Arrow on a title or a bar item (mirrored in a right-to-left layout)","action":"Moves focus to the next or previous entry of the row, wrapping at the ends. Disabled entries and the overflow item are reached too. Opens nothing and runs nothing."},{"keys":"Home / End on a title or a bar item","action":"Moves focus to the first or last entry."},{"keys":"Printable character on a title or a bar item","action":"Moves focus to the next entry whose label begins with it, whatever its letter case. Opens nothing and runs nothing."},{"keys":"Enter, Space or Down Arrow on a title","action":"Opens its menu and moves focus to the menu's first enabled item."},{"keys":"Up Arrow on a title","action":"Opens its menu and moves focus to the menu's last enabled item."},{"keys":"Enter or Space on a bar item","action":"An action: runs it (click); focus stays on the bar item unless the product moved it. A link item: follows the link, Space as Enter does. With a modifier key, Enter on a link item is the platform's (another tab or window)."},{"keys":"Down Arrow / Up Arrow on a bar item","action":"Nothing: there is no menu to open. The keys are still taken, so the page does not scroll."},{"keys":"Down Arrow / Up Arrow, Home / End, printable characters in a menu","action":"The menu's own keys, within the level that holds focus (MNU-7)."},{"keys":"Right Arrow in a menu (Left Arrow in a right-to-left layout)","action":"On a submenu item, opens its submenu. On any other item, at any level, closes the menu and moves to the next enabled entry: a title's menu is opened, with focus on its first enabled item; a bar item takes focus, and nothing opens or runs (MBR-40)."},{"keys":"Left Arrow in a menu (Right Arrow in a right-to-left layout)","action":"In a submenu, closes that submenu and returns focus to its item. In the menu's own surface, closes the menu and moves to the previous enabled entry: a title's menu is opened, with focus on its first enabled item; a bar item takes focus, and nothing opens or runs (MBR-40)."},{"keys":"Enter / Space on an item of a menu","action":"Activates it as the menu says; an action or a link item closes the menu and focus returns to the title."},{"keys":"Escape","action":"Closes the innermost open submenu; with none open, closes the menu and returns focus to its title. Does nothing while no menu is open."}],"labeling":"label names the bar; it is never drawn. Each title is a menu item named by its menu's label, which also names the menu it opens; it says that it opens a menu, whether that menu is open, whether it is disabled, and where it stands among the bar's titles. A bar item is a menu item named by its own label; it does not say that it opens a menu and has no expanded state, and says whether it is disabled and where it stands among the bar's entries, which are counted together. A link item is the platform's link exposed as a menu item (MBR-35); while its target is new its targetLabel is its description, and while it is current it says so. The overflow item is named by overflowLabel, and the menus folded into it keep their labels as its submenu items, the bar items folded into it as its items. Everything inside a menu is named as the menu's spec says. The overflow item's glyph is decorative.","minimumTarget":true,"notes":["What it is for: the commands of an application — an editor, a spreadsheet, a drawing or planning tool — in a window wide enough to show several named menus. It is not a site's main navigation with drop-downs: a row of links to pages, always in view, is navigation and belongs in a navigation landmark of links (the menu's own note on link items says the same). A menubar tells assistive technology that the arrow keys, and not Tab, move through everything in it and that every entry is a command; a person who meets that on a set of page links is misled.","It follows the WAI-ARIA menubar pattern in full: one Tab stop, the horizontal arrow keys along the bar, the vertical ones into and inside a menu, the horizontal ones from inside a menu on to the neighbouring entry, Escape back to the title, type-ahead at both levels, and an entry of the bar that acts by itself — an action or a link. What it leaves out of that pattern: a checkbox or a radio entry directly in the bar. A choice that is switched needs a mark for its state, a title has no place for one, and the menus of the same bar already have it. Exploring the bar still runs nothing: focus arriving, the arrow keys, a typed character and a pointer over an entry never activate it; only a press, Enter or Space does (MBR-33).","A bar item is for the one or two commands or places that belong beside the menus and are wanted in one press (\"Run\", \"Share\", \"Documentation\"). Nothing in its look tells it from a title that opens a menu, so its label says what it does at once: a verb for an action, the name of the place for a link. A command that deletes something or cannot be undone does not belong on the bar: a bar item has no destructive look and asks nothing before it runs; put it in a menu. A row of bar items with no menu is not a menubar — actions alone are a toolbar, links alone are navigation — and is reported (MBR-44).","A link item is the platform's own link exposed as a menu item, exactly as the menu's own link item is and for the same reason (MNU-53): a menubar is read by its entries — how many, which one, the arrow keys — and that reading holds only while everything in the row is a menu item; so the role stays, and what makes the entry a link stays underneath it: its address, the browser's context menu and new-tab gestures, a crawler that follows it. Like the menu's, it is a link that Space activates. On the web it is the product's own anchor in the document, so it is a working link before the bar runs and where script does not (MBR-45). current marks the page the person is on among the bar's link items; the product sets it and the bar draws it with the fill a menu draws for the row the person is on, the same in both: it is where the person is, not a menu that is shown, so it never takes the expanded condition's colors.","A link item that opens a new context is marked by the one rule every link form follows: the glyph open_in_new stands at the control's trailing glyph place, where the control lays out its own content and has such a place. A title's container has one — the overflow item's glyph stands in it — as a button's label has (BTN-24) and a menu's row has in its trailing icon column (MNU-55), which is where a folded link item's mark is drawn; the navigation bar draws none because its cell, an icon over a label, has no such place (NVB-32). Whether a mark is drawn or not, targetLabel says it (MBR-37).","A bar item's click and the closing of an open menu come in one of two orders, by where the bar item is activated (MBR-33, MBR-36, MBR-43). In the row, the menu that is open belongs to another entry and is closed first, as it is when another title is pressed (MBR-10): the product's handler runs with no menu shown. Folded, the bar item is an item of the overflow item's menu, and its click comes first and the menu closes after it, as for every item of a menu (MNU-6, MBR-15). What a product can rely on in both: one click, on the bar item's own element, before the bar decides where focus rests.","A bar's menu is to the bar what a submenu item is to a menu: a label, an open value of its own, a disabled value, and a toggle event. The surface it opens is a Tanrei Menu with the menu's own item kinds and tokens. The item kind menu of this spec has no items of its own in the schema because they are another spec's kinds; a fixture therefore draws an open menu empty, as a button with menu's fixtures do, and the tests fill it.","Focus: the bar is part of the page and a Tab stop like a toolbar. A menu it opens takes focus and returns it to its title when it closes by Escape or by an item; Tab leaves the bar altogether. A bar item opens nothing, so it takes no focus away: after it runs, focus is still on it (MBR-33). After a command the product may move focus to what the command acts on (the document, a dialog it opened) in its handler, and the bar does not take it back (MBR-15).","Disabled titles stay reachable along the bar with no menu open, so that a screen reader user hears that the menu exists and is unavailable; with a menu open, the horizontal arrow keys pass over them, because those keys then mean 'show me the next menu' and a disabled title has none to show (MBR-13). A disabled bar item is reached and passed over the same way. An enabled bar item is not passed over: the keys land on it, the open menu closes, and from there they go on along the bar without opening anything, because a menu follows focus only while one is shown (MBR-40).","Keyboard shortcuts shown in the menus are drawn and exposed by the menu through the keyboard shortcut component; the bar binds none (MBR-16). Access keys — an underlined letter per title, a key that jumps to the bar — are left out: they differ by platform, collide with the browser's own on the web, and a letter is chosen per language, which a component that ships no words cannot do. Type-ahead on the bar gives the first-letter jump once focus is there.","A compact window: the bar folds what does not fit into one overflow item at its end, whose menu holds the folded menus as submenus and the folded bar items as items (MBR-43); when nothing fits it is that one item alone (MBR-21, MBR-22). The keys, the roles and the order are the same at every width, and no command is lost. A product that would rather not show a menubar at all on a phone — commands in an app bar's actions and its 'more' menu are the touch idiom — does not render it there; that is the product's layout and needs nothing from the bar.","Where the platform has a menu bar of its own outside the window (a desktop system's global bar, a tablet's bar for a hardware keyboard), the product should give its commands to that bar with the platform's own API as well: people look for them there, and its keys are the platform's. Tanrei's menubar is drawn inside the product's window from Tanrei's tokens; it does not fill or replace the system's.","Contrast: a title's or a bar item's label keeps at least 4.5:1 on the bar in every state of both conditions. The open title's fill supports the open menu beneath it, which is what says a menu is open; the fill is not held to a contrast of its own. The focus ring is the system's and keeps 3:1 against what it is drawn on.","minimumTarget: a title is 36 high, the minimum target, in a bar 44 high in the default system, so its touch target lies inside the bar; under a larger target (48, a platform guideline's) a short title ('Go') is narrower than the target and gets the room MBR-17 gives it."]},"tokens":"comp.menubar","fixtures":[{"id":"default","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Insert"}},{"kind":"menu","props":{"label":"Format"}},{"kind":"menu","props":{"label":"Tools"}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"open","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File","open":true}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Insert"}},{"kind":"menu","props":{"label":"Format"}},{"kind":"menu","props":{"label":"Tools"}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"open-middle","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Insert","open":true}},{"kind":"menu","props":{"label":"Format"}},{"kind":"menu","props":{"label":"Tools"}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"disabled-menu","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Insert"}},{"kind":"menu","props":{"label":"Format","disabled":true}},{"kind":"menu","props":{"label":"Tools"}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"two-menus","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"single","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File"}}]},{"id":"short-titles","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"Go"}},{"kind":"menu","props":{"label":"Do"}},{"kind":"menu","props":{"label":"Run"}}]},{"id":"many","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Insert"}},{"kind":"menu","props":{"label":"Format"}},{"kind":"menu","props":{"label":"Slide"}},{"kind":"menu","props":{"label":"Arrange"}},{"kind":"menu","props":{"label":"Tools"}},{"kind":"menu","props":{"label":"Extensions"}},{"kind":"menu","props":{"label":"Window"}},{"kind":"menu","props":{"label":"Account"}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"long-labels","props":{"label":"Application","overflowLabel":"More menus"},"items":[{"kind":"menu","props":{"label":"Document and page settings"}},{"kind":"menu","props":{"label":"Selection and arrangement"}},{"kind":"menu","props":{"label":"Review, comments and history"}},{"kind":"menu","props":{"label":"Accessibility and language tools"}}]},{"id":"ja","props":{"label":"アプリケーション","overflowLabel":"その他のメニュー"},"items":[{"kind":"menu","props":{"label":"ファイル"}},{"kind":"menu","props":{"label":"編集"}},{"kind":"menu","props":{"label":"表示"}},{"kind":"menu","props":{"label":"挿入"}},{"kind":"menu","props":{"label":"書式"}},{"kind":"menu","props":{"label":"ツール"}},{"kind":"menu","props":{"label":"ヘルプ"}}]},{"id":"rtl","props":{"label":"التطبيق","overflowLabel":"قوائم أخرى"},"direction":"rtl","items":[{"kind":"menu","props":{"label":"ملف"}},{"kind":"menu","props":{"label":"تحرير"}},{"kind":"menu","props":{"label":"عرض"}},{"kind":"menu","props":{"label":"إدراج"}},{"kind":"menu","props":{"label":"تنسيق"}},{"kind":"menu","props":{"label":"أدوات"}},{"kind":"menu","props":{"label":"مساعدة"}}]},{"id":"rtl-open","props":{"label":"التطبيق","overflowLabel":"قوائم أخرى"},"direction":"rtl","items":[{"kind":"menu","props":{"label":"ملف","open":true}},{"kind":"menu","props":{"label":"تحرير"}},{"kind":"menu","props":{"label":"عرض"}},{"kind":"menu","props":{"label":"إدراج"}},{"kind":"menu","props":{"label":"تنسيق"}},{"kind":"menu","props":{"label":"أدوات"}},{"kind":"menu","props":{"label":"مساعدة"}}]},{"id":"many-rtl","props":{"label":"التطبيق","overflowLabel":"قوائم أخرى"},"direction":"rtl","items":[{"kind":"menu","props":{"label":"ملف"}},{"kind":"menu","props":{"label":"تحرير"}},{"kind":"menu","props":{"label":"عرض"}},{"kind":"menu","props":{"label":"إدراج"}},{"kind":"menu","props":{"label":"تنسيق"}},{"kind":"menu","props":{"label":"أدوات"}},{"kind":"menu","props":{"label":"مساعدة"}},{"kind":"menu","props":{"label":"نافذة"}},{"kind":"menu","props":{"label":"حساب"}},{"kind":"menu","props":{"label":"إضافات"}},{"kind":"menu","props":{"label":"ترتيب"}},{"kind":"menu","props":{"label":"شريحة"}}]},{"id":"ltr-titles-rtl","props":{"label":"التطبيق","overflowLabel":"قوائم أخرى"},"direction":"rtl","items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"تحرير"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Tanrei 2.0"}},{"kind":"menu","props":{"label":"مساعدة"}}]},{"id":"mixed","props":{"label":"Application","overflowLabel":"More"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"item","props":{"label":"Run"}},{"kind":"item","props":{"label":"Documentation","href":"/docs/"}}]},{"id":"mixed-open","props":{"label":"Application","overflowLabel":"More"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit","open":true}},{"kind":"menu","props":{"label":"View"}},{"kind":"item","props":{"label":"Run"}},{"kind":"item","props":{"label":"Documentation","href":"/docs/"}}]},{"id":"link-new","props":{"label":"Application","overflowLabel":"More"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"Help"}},{"kind":"item","props":{"label":"Source","href":"https://example.com/tanrei","target":"new","targetLabel":"opens in a new tab"}}]},{"id":"link-current","props":{"label":"Application","overflowLabel":"More"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"item","props":{"label":"Preview","href":"/preview/"}},{"kind":"item","props":{"label":"History","href":"/history/","current":true}}]},{"id":"disabled-item","props":{"label":"Application","overflowLabel":"More"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"item","props":{"label":"Run","disabled":true}},{"kind":"item","props":{"label":"Share"}},{"kind":"item","props":{"label":"Documentation","href":"/docs/","disabled":true}}]},{"id":"mixed-many","props":{"label":"Application","overflowLabel":"More"},"items":[{"kind":"menu","props":{"label":"File"}},{"kind":"menu","props":{"label":"Edit"}},{"kind":"menu","props":{"label":"View"}},{"kind":"menu","props":{"label":"Insert"}},{"kind":"menu","props":{"label":"Format"}},{"kind":"item","props":{"label":"Run"}},{"kind":"menu","props":{"label":"Tools"}},{"kind":"menu","props":{"label":"Extensions"}},{"kind":"item","props":{"label":"Share"}},{"kind":"menu","props":{"label":"Window"}},{"kind":"item","props":{"label":"Documentation","href":"/docs/"}},{"kind":"item","props":{"label":"Source","href":"https://example.com/tanrei","target":"new","targetLabel":"opens in a new tab"}},{"kind":"item","props":{"label":"History","href":"/history/","current":true}},{"kind":"menu","props":{"label":"Help"}}]},{"id":"mixed-rtl","props":{"label":"التطبيق","overflowLabel":"المزيد"},"direction":"rtl","items":[{"kind":"menu","props":{"label":"ملف"}},{"kind":"menu","props":{"label":"تحرير"}},{"kind":"menu","props":{"label":"عرض"}},{"kind":"item","props":{"label":"تشغيل"}},{"kind":"item","props":{"label":"المستندات","href":"/docs/"}},{"kind":"item","props":{"label":"المصدر","href":"https://example.com/tanrei","target":"new","targetLabel":"يفتح في علامة تبويب جديدة"}}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-menubar","props":{"label":"label","overflowLabel":"overflowLabel"},"items":{"menu":{"name":"tanrei-menubar-menu","props":{"label":"label","open":"open","disabled":"disabled"},"events":{"toggle":"toggle"},"notes":"`<tanrei-menubar-menu label=\"File\">` holds the menu's item elements as its children (`tanrei-menu-item`, `tanrei-menu-checkbox-item`, `tanrei-menu-radio-item`, `tanrei-submenu`, `tanrei-menu-group`), as `tanrei-menu` holds its own; it forwards them into a `tanrei-menu` in its shadow root, anchored to itself, and moves none of them; that `tanrei-menu` is created when the menu is first shown (MBR-49), and until then the items stay in the light tree, assigned to no slot. `open` reflects; `toggle` is a CustomEvent whose `detail.open` is the new value, fired on the element, and bubbles. The items' own `click`, `change` and `toggle` bubble through it, so one listener on the bar takes them all (a submenu's `toggle` and a bar menu's are told apart by their target)."},"item":{"name":"tanrei-menubar-item","props":{"label":"label","disabled":"disabled","href":"href","target":"target","targetLabel":"targetLabel","current":"current"},"events":{"click":"click"},"notes":"An action is `<tanrei-menubar-item label=\"Run\"></tanrei-menubar-item>`: the host is the entry — `role=\"menuitem\"` with neither `aria-haspopup` nor `aria-expanded`, `aria-disabled`, and the bar's roving `tabindex` — and draws its label in its shadow root as `tanrei-menubar-menu` does; `click` is the host's own click, which Enter and Space produce through `click()` and a disabled host swallows. A link item is the same element around the product's own anchor, which stays in the document (as the breadcrumbs' levels do): `<tanrei-menubar-item><a href=\"/docs/\">Documentation</a></tanrei-menubar-item>`. The anchor is the entry: the element writes `role=\"menuitem\"` and the roving `tabindex` on it and `role=\"none\"` on the host, slots it into the title's container so that the whole container is the link, and draws the state layer, the focus ring and the mark around it in its shadow root. A link item's props are the anchor's own, as the Link's are: its text is `label`; `href`; `target` in HTML's spelling (`_blank` is `new`, to which the element adds `noopener` in `rel`; anything else is `same`); `aria-current=\"page\"` is `current`; `rel` and `download` are the anchor's and web-only. The host's properties of the same names read the anchor and, when the product sets one, write it there, so that the address is held in one place; a `label` attribute on a host that holds an anchor is ignored. `targetLabel` is the host's `target-label` attribute, else the product's words; the element writes it as the anchor's `aria-description` unless the product wrote one there. `disabled` is the host's attribute in both forms, and for a link item it is the one statement that the entry is disabled: `<tanrei-menubar-item disabled><a>Documentation</a></tanrei-menubar-item>`. The product writes that anchor without `href`, as the Link's disabled anchor is written: only an anchor with no address is one the browser cannot follow by a modified click, its context menu or a drag, and the element never takes away or puts back an address the product wrote. On it the element writes `aria-disabled=\"true\"` beside `role=\"menuitem\"` and keeps it in the roving order, so that the arrow keys still reach it (MBR-39); before the bar runs it is plain text in the row, which is what a link that cannot be followed is. The two mismatches are defined and reported in debug builds. A disabled host whose anchor still has an `href` is drawn and exposed disabled, emits no `click` and has its plain activation prevented, but what the browser itself gives an address is still there, and the report says to take the `href` away. An anchor without `href` under a host that is not disabled is an entry without a destination — an action (MBR-44) whose entry is still the anchor and whose `click` is the anchor's — and the report says to write an action with `label`. `click` is the anchor's own click and bubbles through the host: cancelling it (`preventDefault()`) cancels the navigation, a router's own link component rendered as the child needs nothing more, a click with a modifier key or the middle button is the browser's, Enter with a modifier key is passed to the anchor, and Space calls the anchor's `click()`. An `href` attribute on a host that holds no anchor is ignored and reported: the destination is the anchor's, so that the link exists before the element is defined (MBR-45). An `href` on `tanrei-menubar-menu` is ignored and reported (MBR-44). React: `MenubarItem` renders the element around its children and adds nothing; a router's link is the child."}},"parts":{"bar":"bar","container":"tanrei-menubar-menu container","label":"tanrei-menubar-menu label","menu":"tanrei-menubar-menu tanrei-menu surface","overflow-item":"overflow-item","icon":"icon","mark":"tanrei-menubar-item mark","indicator":"tanrei-menubar-menu indicator","focus-ring":"tanrei-menubar-menu container@focus-ring"},"notes":"The shadow-root form: the bar is a control whose parts the product does not write. `<tanrei-menubar label=\"Application menu\" overflow-label=\"More menus\">` holds `tanrei-menubar-menu` children in its default slot. The host has `role=\"menubar\"` and `aria-label`; each `tanrei-menubar-menu` host is its title — `role=\"menuitem\"`, `aria-haspopup=\"menu\"`, `aria-expanded`, `aria-disabled`, and the roving `tabindex` (0 on the Tab stop, -1 on the others), as the toolbar sets it on its items — and draws its label in its shadow root. The menu it opens is a `tanrei-menu` in that shadow root (a manual popover in the top layer, named by `aria-label` from the title's label, since `aria-controls` cannot cross a shadow root), opened with placement `bottom-start`; the bar tells it through an internal channel, not part of the public surface, to hand the inline arrow keys of MBR-13 back, to skip its open and close motion when it replaces a neighbour (MBR-29), and not to report the fold's level (MBR-22). The overflow item and its `tanrei-menu` are in the bar's shadow root. A folded `tanrei-menubar-menu` is assigned to a slot of that menu and draws itself there as a `tanrei-submenu` in its own shadow root, with its children forwarded into it one slot each: a slot of the bar's shadow root can hold only the bar's own children, so a submenu drawn there could show no divider and no gap between a folded menu's groups (MNU-23, MNU-36). The product's elements stay where the product wrote them, and `open` and `toggle` mean what they mean in the row. A folded menu with no item is a submenu item that opens nothing (MBR-20, MNU-52). What fits is measured with a `ResizeObserver` on the row, on a hidden copy of every title and of the overflow item drawn from the tokens, and on the gap, so that deciding it asks for no layout of its own (MBR-21). Hover switching listens for `pointerenter` with `pointerType` `mouse` or `pen`. In forced-colors mode the open title is drawn with `Highlight` and `HighlightText` (MBR-28). Without script, and before the elements are defined, a menu and an action draw nothing — their words are attributes and their work is the product's script — and a link item's anchor is a plain link that works (MBR-45): a rule of the package's stylesheet for `tanrei-menubar:not(:defined)` lays those anchors out as one row in a title's text style, color and paddings, with no underline; a product reserves the bar's block size (`tanrei-menubar:not(:defined) { display: block; min-block-size: … }`, from the tokens' custom properties) to keep the page from moving. The `inline` attribute, for tests, draws an open menu in place below its title, as the menu's does. The host is `display: block`. Bar items: `tanrei-menubar-item` children take their places in the default slot among the menus, in document order. The roving `tabindex` stands on whichever element is the entry — a menu's host, an action's host, or a link item's anchor — and the bar's keys, type-ahead and Tab stop read them as one list. The fold measures and folds a bar item as it does a menu, and shows a folded one as it shows a folded menu: the `tanrei-menubar-item` is assigned to a slot of the overflow `tanrei-menu`, at its place in document order among the folded menus, and draws itself there as a `tanrei-menu-item` in its own shadow root (with `href`, `target` and `target-label` for a link item, and through the internal channel the current state and weight of MBR-43). The product's anchor of a folded link item stays where it is in the document, a child of the host that nothing displays. A plain activation of that row becomes one `click` on the product's own element — the host for an action; for a link item the anchor, whose `click()` is called after the row's own navigation is prevented — and the row's own click does not reach the page as a second one: a listener on the product's element, or above it, hears the activation once, and cancelling it there cancels the navigation. It is heard while the overflow menu is still shown, which closes after it (MBR-43); in the row a menu that is open is closed, with its `toggle`, before the click is delivered (MBR-33, MBR-36). A click with a modifier key or the middle button on that row is the browser's, on the row's own anchor, which has the same address. Hover while a menu is open ignores `pointerenter` on a bar item (MBR-41). In forced-colors mode a link item's anchor keeps `LinkText` (MBR-46). While the bar holds both kinds of entry, each `tanrei-menubar-menu` title ends in the `indicator` part, the icon set's `expand_more` (MBR-47); a current link item is drawn from the selected condition (MBR-38)."},"swiftui":{"status":"planned","name":"TanreiMenubar","props":{"label":"label","overflowLabel":"overflowLabel"},"items":{"menu":{"name":"TanreiMenubarMenu","props":{"label":"title","open":"isPresented","disabled":"disabled"},"events":{"toggle":"isPresented"},"notes":"`TanreiMenubarMenu(_ title:, isPresented:) { TanreiMenuItem(…) … }`: the content builder takes the menu's item views; the binding is optional, and writing it is toggle. `disabled` follows `.disabled(_:)`."},"item":{"name":"TanreiMenubarItem","props":{"label":"title","disabled":"disabled","href":"destination","target":"target","targetLabel":"targetLabel","current":"isCurrent"},"events":{"click":"action"},"notes":"`TanreiMenubarItem(_ title:, action:)` is an action. `destination: URL? = nil` makes it a SwiftUI `Link` (the link trait in place of the button's), opened by the environment's `openURL` after `action`, which an app that routes addresses itself answers with its own `OpenURLAction`; `target: TanreiLinkTarget = .same` and `targetLabel` (the accessibility hint), as `TanreiMenuItem`'s. `isCurrent: Bool = false` adds the selected trait and the emphasized weight. `disabled` follows `.disabled(_:)`."}},"notes":"`TanreiMenubar(_ label: String = \"\", overflowLabel: String = \"\") { TanreiMenubarMenu(\"File\") { … } … }`, drawn in the window: a custom `Layout` that measures the titles and folds from the end (MBR-21), each title presenting its items with `.tanreiMenu`. Focus along the bar uses `@FocusState` with `.onKeyPress` (and `.onMoveCommand` where key presses are not delivered); hover switching uses `.onContinuousHover`. SwiftUI has no menubar trait: the bar is `.accessibilityElement(children: .contain)` named by the label, and each title a button with the expanded state (MBR-19's fallback). An empty `overflowLabel` reads the product's words from the environment. It does not fill the system's own menu bar: on macOS and on iPadOS with a hardware keyboard the product also declares its commands with `.commands { CommandMenu … }`, and on an iPhone it normally shows no menubar at all. `TanreiMenubarItem` stands in the same builder among the menus and is laid out, focused and folded as a title is; a folded one is a `TanreiMenuItem` of the overflow menu. SwiftUI has no menubar trait, so in MBR-19's group an action is a button and a link item carries the link trait (MBR-42). Where the system has a bar of its own the product declares an action there too, as it does its menus' commands."},"compose":{"status":"planned","name":"TanreiMenubar","props":{"label":"contentDescription","overflowLabel":"overflowContentDescription"},"items":{"menu":{"name":"TanreiMenubarMenu","props":{"label":"text","open":"expanded","disabled":"enabled"},"events":{"toggle":"onExpandedChange"},"notes":"`TanreiMenubarMenu(text, expanded, onExpandedChange, enabled) { TanreiMenuItem(…) … }` in the bar's content: the caller keeps `expanded` (state hoisting), and an overload without the pair keeps it itself. `enabled` is the inverse flag."},"item":{"name":"TanreiMenubarItem","props":{"label":"text","disabled":"enabled","href":"href","target":"target","targetLabel":"targetLabel","current":"current"},"events":{"click":"onClick"},"notes":"`TanreiMenubarItem(text, onClick, enabled = true, href: String? = null, target: TanreiLinkTarget = TanreiLinkTarget.Same, targetLabel: String = \"\", current: Boolean = false)`. With `href` it is a link: opened through `LocalUriHandler.current` after `onClick` (an app that routes addresses itself provides its own `UriHandler`); Compose has no link role for a clickable element, so the node drops `Role.Button` and carries none; `targetLabel` is appended to the state description, as `TanreiMenuItem`'s. `current` sets `selected` in the semantics and the emphasized weight. `enabled` is the inverse flag."}},"notes":"`TanreiMenubar(contentDescription = \"Application menu\", overflowContentDescription = \"More menus\") { TanreiMenubarMenu(\"File\") { … } … }`: a `Layout` that measures the titles and folds from the end, each title showing its items in a `TanreiMenu`. One focus group (`Modifier.focusGroup()`), moved with `onPreviewKeyEvent` and `FocusRequester`s; hover switching uses `PointerEventType.Enter` for a mouse or stylus. Compose semantics have no menubar role: the bar is a traversal group named by `contentDescription`, each title `Role.Button` with `expand` / `collapse` actions and its state (MBR-19's fallback). An empty `overflowContentDescription` reads the product's words from the composition local. `TanreiMenubarItem` stands in the same content among the menus and is measured, focused and folded as a title is; a folded one is a `TanreiMenuItem` of the overflow menu. In MBR-19's group an action is `Role.Button` and a link item drops the role, as every Compose link form does (MBR-42)."},"flutter":{"status":"planned","name":"TanreiMenubar","props":{"label":"semanticLabel","overflowLabel":"overflowSemanticLabel"},"items":{"menu":{"name":"TanreiMenubarMenu","props":{"label":"label","open":"controller","disabled":"enabled"},"events":{"toggle":"onOpenChanged"},"notes":"`TanreiMenubarMenu(label:, menuChildren: […], controller:, onOpenChanged:, enabled: true)`, as a `SubmenuButton` in a `MenuBar`: the optional `MenuController` opens and closes it; `enabled` is the inverse flag."},"item":{"name":"TanreiMenubarItem","props":{"label":"label","disabled":"enabled","href":"href","target":"target","targetLabel":"targetSemanticLabel","current":"isCurrent"},"events":{"click":"onPressed"},"notes":"`TanreiMenubarItem(label:, onPressed:, enabled: true, href: Uri? = null, target: TanreiLinkTarget.same, targetSemanticLabel:, isCurrent: false)`. With `href` it is a link (`Semantics(link: true)` with the address as its `linkUrl`), opened by the nearest `TanreiLinkOpener` after `onPressed`; `targetSemanticLabel` is the semantics hint, as `TanreiMenuItem`'s. `isCurrent` sets `selected` in the semantics and the emphasized weight. `enabled` is the inverse flag."}},"notes":"`TanreiMenubar(semanticLabel:, overflowSemanticLabel:, entries: [TanreiMenubarMenu(…), TanreiMenubarItem(…)])`, built with the widgets library on `TanreiMenuAnchor`, not on Material's `MenuBar`: a `RenderBox` that measures the titles and folds from the end. Focus is a `FocusTraversalGroup` with `Shortcuts` and `Actions` for the keys; hover switching uses a `MouseRegion` and ignores touch. Semantics: `SemanticsRole.menuBar` and `menuItem` where the SDK has them, otherwise a container named by the label with buttons that expose their expanded state. An empty `overflowSemanticLabel` reads the product's words from the inherited widget. A desktop product also gives its commands to `PlatformMenuBar` where the system has a bar of its own. A `TanreiMenubarItem` in `entries` is measured, focused and folded as a title is; a folded one is a `TanreiMenuItem` of the overflow menu. Semantics: `SemanticsRole.menuItem` where the SDK has it, with `link: true` and the address for a link item; otherwise a button, or a link, in the named container (MBR-42)."},"react-native":{"status":"planned","name":"Menubar","props":{"label":"accessibilityLabel","overflowLabel":"overflowAccessibilityLabel"},"items":{"menu":{"name":"MenubarMenu","props":{"label":"label","open":"open","disabled":"disabled"},"events":{"toggle":"onToggle"},"notes":"An entry of the bar's `menus` array: `{ label, items: […], open?, disabled?, onToggle? }`, where `items` is the menu's own array of entries, told apart by their `kind` field as in `<Menu>`."},"item":{"name":"MenubarItem","props":{"label":"label","disabled":"disabled","href":"href","target":"target","targetLabel":"targetLabel","current":"current"},"events":{"click":"onPress"},"notes":"An entry of the bar's `menus` array whose `kind` is `'item'`: `{ kind: 'item', label, onPress?, href?, target?, targetLabel?, current?, disabled? }`. With `href` it is a link: `onPress` receives an event whose `preventDefault()` keeps the bar from calling `Linking.openURL(href)`; `target` is `\"same\" | \"new\"` and `targetLabel` the `accessibilityHint`, as `<Menu>`'s item. `current` sets `aria-current=\"page\"` where the platform has it and the selected state elsewhere."}},"notes":"`<Menubar accessibilityLabel=\"Application menu\" overflowAccessibilityLabel=\"More menus\" menus={[{ label: 'File', items: […] }, …]} />`: `role=\"menubar\"` with `role=\"menuitem\"` titles that carry `aria-expanded`; titles are measured with `onLayout` and folded from the end; each menu is shown on the overlay layer that `TanreiProvider` renders, as `<Menu>` is. Keys reach it where the platform delivers them (a hardware keyboard on a tablet, react-native-web, desktop targets); hover switching uses `onHoverIn` where the platform has a pointer. An empty `overflowAccessibilityLabel` reads the product's words from the context. The app-wide direction is followed, as the README says for every component. The `menus` array also takes bar items — entries whose `kind` is `'item'`; an entry without a `kind` is a menu. A bar item is `role=\"menuitem\"` without `aria-expanded`, measured and folded as a title is; a folded one is an entry of the overflow `<Menu>`."}}}
@@ -0,0 +1 @@
1
+ {"name":"meter","title":"Meter","summary":"Shows where a known value stands in a known range — storage used, a battery's charge, a quota, the strength of a password — as a bar or a ring that looks like the progress indicator, without saying that anything is under way.","level":"base","listing":"default","anatomy":[{"id":"track","description":"The full length of the bar, or the full circle of the ring: the whole range from min to max."},{"id":"indicator","description":"The part of the track drawn in the indicator color of the meter's status: the fraction of the range up to the value. It meets the rest of the track, or stands a gap from it (separation)."},{"id":"stop-indicator","description":"A dot at the end of a bar's track that marks where the range ends, drawn whenever its size is above 0.","optional":true}],"props":[{"name":"variant","type":"enum","values":["linear","circular"],"default":"linear","description":"Linear is a bar that fills the width its layout gives it; circular is a ring of a fixed size, for tight places and beside text. A structural choice drawn by code, not a token axis, as the progress indicator's is."},{"name":"size","type":"enum","values":["small","medium","large"],"default":"medium","axis":"tanrei.comp.meter.size","description":"The bar's thickness or the ring's box, the progress indicator's three sizes by default (2 / 4 / 8 and 16 / 24 / 40). A design system may add values."},{"name":"separation","type":"enum","values":["auto","divider","gap"],"default":"auto","description":"How the indicator is told from the rest of its track. divider: drawn on the track with no space between them. gap: empty space between them. Auto takes comp.meter.track.separation, which follows the design system's choice."},{"name":"value","type":"number","default":0,"description":"Where the measured quantity stands, between min and max. Always a number: a meter has no unknown value, and a task under way is a progress indicator."},{"name":"min","type":"number","default":0,"description":"The low end of the range."},{"name":"max","type":"number","default":1,"description":"The high end of the range."},{"name":"status","type":"enum","values":["default","info","success","warning","error"],"default":"default","description":"What the product says the value means, in the names the tag and the snackbar use: default draws the indicator in the meter's own color; info, success, warning and error in that status's color. The product decides it — the meter has no thresholds of its own — and it changes colors only: the words that say so are valueText's and the product's."},{"name":"label","type":"string","default":"","description":"The accessible name: what is measured (\"Storage used\"). Required: a bar alone is not a name."},{"name":"valueText","type":"string","default":"","description":"How assistive technology reads the value when a percentage is not the natural reading (\"12.4 GB of 15 GB\", \"Strong\"). Empty reads the platform's percentage. Where status means something, say it here too (\"Almost full: 14.2 GB of 15 GB\")."}],"states":["enabled"],"behavior":[{"id":"MTR-1","text":"THE meter SHALL draw the indicator over the fraction (value − min) / (max − min) of the track, from the track's start: the inline-start of a bar, the top of a ring, turning clockwise."},{"id":"MTR-2","text":"THE meter SHALL draw a bar comp.meter.linear.thickness.medium high for medium (and so on for each size) across the full inline size its layout gives it, and a ring whose outer edge fills a comp.meter.circular.size.medium square with a stroke of comp.meter.circular.thickness.medium for medium (and so on for each size)."},{"id":"MTR-3","text":"THE meter SHALL draw the track in comp.meter.track.color and the indicator over it in the indicator color of its status — comp.meter.indicator.color WHILE status is default, comp.meter.info.indicator.color WHILE it is info, comp.meter.success.indicator.color WHILE it is success, comp.meter.warning.indicator.color WHILE it is warning and comp.meter.error.indicator.color WHILE it is error; the ends of a bar's track and indicator SHALL be rounded by comp.meter.track.shape, clamped to half the thickness, and a ring's arcs SHALL have round caps unless comp.meter.track.shape is sys.shape.corner.none."},{"id":"MTR-4","text":"THE meter SHALL tell the indicator from the rest of its track as its separation names — WHILE separation is auto, as comp.meter.track.separation names; WHILE it is divider or gap, as that value names — and WHILE the separation is gap and value lies strictly between min and max SHALL leave comp.meter.track.gap of empty space, measured along the track, between the indicator and the rest of the track (on a ring, at both ends of the indicator's arc); WHILE it is divider THE meter SHALL draw the indicator on the track with nothing between them."},{"id":"MTR-5","text":"WHILE comp.meter.stop-indicator.size is above 0 THE meter SHALL draw at the end of a bar's track a round dot of that size, centred across the track, in the indicator color of its status; a ring SHALL draw none."},{"id":"MTR-6","text":"WHEN value, min, max or status changes after the first frame THE meter SHALL move the indicator's end to the new fraction over comp.meter.motion.value-duration with comp.meter.motion.value-easing, and change the indicator's color over the same duration; WHEN it changes again during that motion THE meter SHALL go on from the place and the color then shown. THE meter SHALL draw its first frame at its value and in its status's color without a motion, and WHERE reduced motion is requested SHALL move the end at once and keep the change of color as a fade over the same duration."},{"id":"MTR-7","text":"THE meter SHALL expose to assistive technology a meter — the platform's own meter where it has one, and otherwise an element with a value range and no busy state — named by label, with min and max as its range, the clamped value as its current value, and valueText as the value's text WHILE valueText is not empty; it SHALL NOT expose the progressbar role or a busy state, because nothing is under way."},{"id":"MTR-8","text":"THE meter SHALL NOT be focusable, SHALL take no input and SHALL NOT announce a change of its value or its status by itself; assistive technology SHALL read the current value when it reaches the meter."},{"id":"MTR-9","text":"THE meter SHALL expose nothing of status by itself: status SHALL change the indicator's color and nothing else, so that what the color means reaches every person only through the words the product gives in valueText, label or the text beside the meter."},{"id":"MTR-10","text":"IF value is below min or above max THE meter SHALL draw and expose it clamped to that range; IF value is not a finite number THE meter SHALL draw and expose min; IF max is not greater than min THE meter SHALL draw the track with no indicator and expose a current value of 0 in a range of 0 to 1; in each case debug builds SHALL report the values."},{"id":"MTR-11","text":"WHEN size names a value that the active design system does not have, or variant, separation or status a value the meter does not define, THE meter SHALL render with the default value's tokens (medium, linear, auto, default), and in debug builds report the unknown value."},{"id":"MTR-12","text":"WHERE the layout direction is right-to-left THE meter SHALL fill a bar from the right and draw its stop indicator at the left; a ring SHALL NOT be mirrored: it starts at the top and turns clockwise in every direction, as a clock does."},{"id":"MTR-13","text":"THE meter SHALL take its layout direction from where it is used and SHALL have no direction setting of its own; WHEN that direction changes while the meter is shown THE meter SHALL draw itself for the new direction at once, without a motion of its own, keeping its value."},{"id":"MTR-14","text":"WHILE label is empty THE meter SHALL still render, and in debug builds report that it has no accessible name."},{"id":"MTR-15","text":"WHERE the platform draws with a person's own forced colors THE meter SHALL draw its track as an edge sys.border.hairline wide in the platform's text color and its indicator filled in the platform's text color, whatever its status, so that the value is still read from where the indicator ends."},{"id":"MTR-16","text":"WHERE the platform has ARIA attributes (the web), the host carries its meter role (MTR-7) itself, so what the product writes on it is not moved, but for a name: WHILE label is not empty THE meter SHALL hold the product's aria-label and aria-labelledby on that host as their data-aria- twins, so that label is its whole name although the platform gives aria-labelledby the precedence, and WHEN label is emptied SHALL give them back as they were written; WHILE label is empty a name the product gives so — aria-label, or aria-labelledby naming an element — SHALL be its name and SHALL NOT be reported as having none in debug builds (MTR-14). WHEN the product removes one, or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaLabelledByElements) to null, THE meter SHALL take it away."}],"accessibility":{"role":"meter","keyboard":[],"labeling":"label is the accessible name. valueText, when given, replaces the platform's percentage as the spoken value. A visible caption beside the meter is the product's composition; when it exists, use the same words as label. status is never announced: say in valueText what it means.","minimumTarget":true,"notes":["Not interactive: the meter takes no input and is never focusable (MTR-8), so the minimum target holds without extending anything.","A meter shows where a value stands in a known range; it is not progress (WAI-ARIA APG, Meter: not for loading or percent completion) and not for a value without a meaningful maximum. A task under way is a progress indicator.","The value is read from the boundary between indicator and track, so every indicator color — default and the four statuses — must stay at least 3:1 against comp.meter.track.color and the surface behind it (WCAG 1.4.11). In the default system each is above 4.6:1 in light and 7.3:1 in dark.","Color is never the only sign of a status (WCAG 1.4.1): MTR-9.","Web: the host carries role=\"meter\" and the aria-value attributes; the native <meter> element is not drawn, because its look cannot be styled in every engine."]},"tokens":"comp.meter","fixtures":[{"id":"linear","props":{"value":0.62,"label":"Storage used","valueText":"9.3 GB of 15 GB"}},{"id":"linear-info","props":{"value":0.4,"status":"info","label":"Monthly quota"}},{"id":"linear-success","props":{"value":0.9,"status":"success","label":"Password strength","valueText":"Strong"}},{"id":"linear-warning","props":{"value":0.85,"status":"warning","label":"Storage used","valueText":"Almost full: 12.8 GB of 15 GB"}},{"id":"linear-error","props":{"value":0.98,"status":"error","label":"Storage used","valueText":"Full: 14.7 GB of 15 GB"}},{"id":"linear-small","props":{"value":0.62,"size":"small","label":"Storage used"}},{"id":"linear-large","props":{"value":0.62,"size":"large","label":"Storage used"}},{"id":"linear-empty","props":{"value":0,"label":"Storage used"}},{"id":"linear-full","props":{"value":1,"label":"Storage used"}},{"id":"linear-range","props":{"value":37,"min":0,"max":50,"label":"Seats taken","valueText":"37 of 50 seats"}},{"id":"linear-gap","props":{"value":0.62,"separation":"gap","label":"Storage used"}},{"id":"linear-divider","props":{"value":0.62,"separation":"divider","label":"Storage used"}},{"id":"linear-on-container-highest","props":{"value":0.62,"label":"Storage used"},"surface":"surface-container-highest"},{"id":"linear-rtl","props":{"value":0.62,"label":"Storage used"},"direction":"rtl"},{"id":"circular","props":{"variant":"circular","value":0.62,"label":"Battery"}},{"id":"circular-warning","props":{"variant":"circular","value":0.15,"status":"warning","label":"Battery","valueText":"Low: 15%"}},{"id":"circular-small","props":{"variant":"circular","value":0.62,"size":"small","label":"Battery"}},{"id":"circular-large","props":{"variant":"circular","value":0.62,"size":"large","label":"Battery"}}],"platforms":{"web":{"status":"alpha","name":"tanrei-meter","props":{"variant":"variant","size":"size","separation":"separation","value":"value","min":"min","max":"max","status":"status","label":"label","valueText":"valueText"},"parts":{"track":"track","indicator":"indicator","stop-indicator":"stop-indicator"},"notes":"Drawn as the progress indicator is (the two share the drawing code; the meter never runs the indeterminate animation). The host carries `role=\"meter\"`, `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, `aria-label` and `aria-valuetext` while `value-text` is set. `separation` and `status` are attributes; `auto` reads the name in `--tanrei-comp-meter-track-separation`."},"swiftui":{"status":"planned","name":"TanreiMeter","props":{"variant":"variant","size":"size","separation":"separation","value":"value","min":"bounds.lowerBound","max":"bounds.upperBound","status":"status","label":"label","valueText":"valueText"},"notes":"`TanreiMeter(\"Storage used\", value: 9.3, in: 0...15)`. Exposed as SwiftUI exposes a `Gauge`: an element with the label and an accessibility value, `accessibilityValue(valueText)` while it is set; no updates-frequently trait."},"compose":{"status":"planned","name":"TanreiMeter","props":{"variant":"variant","size":"size","separation":"separation","value":"value","min":"valueRange.start","max":"valueRange.endInclusive","status":"status","label":"label","valueText":"valueText"},"notes":"Semantics `progressBarRangeInfo` with the range (Android has no separate meter role) and `stateDescription` from valueText; never the indeterminate range info."},"flutter":{"status":"planned","name":"TanreiMeter","props":{"variant":"variant","size":"size","separation":"separation","value":"value","min":"min","max":"max","status":"status","label":"label","valueText":"valueText"},"notes":"`Semantics(label:, value:)` with the value text or the percentage; on the web renderer the role is meter."},"react-native":{"status":"planned","name":"Meter","props":{"variant":"variant","size":"size","separation":"separation","value":"value","min":"min","max":"max","status":"status","label":"label","valueText":"valueText"},"notes":"`accessibilityRole=\"progressbar\"` is not used; the view carries `accessibilityValue={{ min, max, now, text }}` with `role=\"meter\"` where React Native passes it through (web), and the label."}}}
@@ -0,0 +1 @@
1
+ {"name":"modal-layer","title":"Modal layer","summary":"The layer under every modal surface: it dims the window behind what it presents, makes everything there inert, moves focus in, keeps it there and gives it back, and asks to close on Escape, the platform's back or a press on the dim — so that every modal surface of a product behaves as one and is restyled in one place.","level":"base","listing":"advanced","anatomy":[{"id":"scrim","description":"The dim over the whole window behind the container, to every edge and under every system inset. It blocks presses and, while the layer is dismissible, a press on it asks the layer to close. Not drawn while scrim is false.","optional":true},{"id":"container","description":"The box the content is in, placed in the window's safe area. It draws nothing of its own — no color, edge, shadow, shape or padding — takes focus when nothing in the content is marked for it, and is the modal dialog assistive technology reads."}],"props":[{"name":"open","type":"boolean","default":false,"description":"Whether the layer is presented. The product opens it, and closes it in answer to close (or from its content's own controls); on SwiftUI, where it is a binding, the layer writes false itself."},{"name":"dismissible","type":"boolean","default":true,"description":"Whether Escape, the platform's back and a press on the scrim ask the layer to close (MDL-6). Set it to false only when the person must finish with one of the content's own controls, and give the content one."},{"name":"scrim","type":"boolean","default":true,"description":"Whether the layer dims what lies behind its container. False for content that covers the whole window with a fill of its own (a full-window preview): the layer then draws nothing behind it and still blocks everything there (MDL-2)."},{"name":"label","type":"string","default":"","description":"Names the container for assistive technology (\"Export photos\"): the modal dialog's name. Never drawn. Required."}],"slots":[{"name":"default","description":"The content: the surface the product presents modally (a panel, a card, a view over the whole window). The layer places its container (MDL-11) and draws, styles and sizes nothing of the content. A fixture's content string is plain text."}],"events":[{"name":"close","description":"The layer asks to be closed: Escape, the platform's back or a press on the scrim. Carries which of these it was, named escape, back or scrim (in the platform's casing). Emitted only while dismissible is true."}],"states":["enabled"],"behavior":[{"id":"MDL-1","text":"WHEN open becomes true THE modal layer SHALL present its container above everything in its window — every region, every overlay not opened from inside it (MDL-9) and every modal layer opened before it (MDL-8) — and, WHILE scrim is true, SHALL draw its scrim over the whole window behind the container, to every edge and under every system inset, filled with comp.modal-layer.scrim.color (its alpha is the dim) and, WHILE comp.modal-layer.scrim.blur is above 0, with what lies behind it blurred by a Gaussian blur of that radius (the radius of CSS's blur()); WHERE the platform cannot blur what lies behind a window it SHALL draw the color alone. WHILE scrim is false it SHALL draw nothing behind the container and SHALL still block what is behind as MDL-2 says. A component built from the modal layer draws the scrim from its own scrim tokens, which alias these two (comp.dialog.scrim.color and comp.dialog.scrim.blur, and so on)."},{"id":"MDL-2","text":"WHILE open is true THE modal layer SHALL make everything outside its container inert — not focusable, not pressable, hidden from assistive technology — and SHALL keep the content behind it from scrolling without moving it (where a scroll bar takes room, that room stays while the scroll is held), so that a press, a scroll or a key anywhere outside the container reaches nothing behind it; WHERE the platform cannot keep that room for what is placed against the window itself (the window widens while the scroll is held), THE modal layer SHALL give the product the room the window gained on each side, for as long as the scroll is held, and every Tanrei part placed against the window SHALL add it to its insets on that side, so that it stays where it was, as the product's own such elements do that add it to theirs; WHEN the window is resized while the scroll is held THE modal layer SHALL measure that room, and the room the window gained, again for the window as it now is (a bar that would come back once the scroll is let go, or would not), so that nothing behind moves when the scroll is let go; WHEN it closes THE modal layer SHALL restore what is behind to what it was before: its scroll position, and what was focusable, pressable and exposed."},{"id":"MDL-3","text":"WHEN open changes from false to true, and WHEN the layer is mounted with open true, THE modal layer SHALL move focus to the element in its content that the product marked for initial focus (the platform's own mark, named in the platform notes) or, without one, to the element the component built from it names (the navigation drawer's selected destination, NVD-19) or else to its container, so that assistive technology reads its name first and the next Tab reaches the first focusable element. Focus SHALL move when the layer opens, not when its motion ends."},{"id":"MDL-4","text":"WHILE open is true THE modal layer SHALL keep focus inside its container: Tab from the last focusable element in it SHALL move to the first, Shift+Tab from the first (or from the container itself) SHALL move to the last, the container SHALL keep focus WHILE nothing in it is focusable, and screen-reader navigation SHALL NOT leave it."},{"id":"MDL-5","text":"WHEN the layer closes THE modal layer SHALL return focus to the element that had it when the layer opened or, where that element no longer exists, cannot take focus or is inert, to the platform's default for a closed overlay; focus SHALL move when the layer closes, not when its motion ends."},{"id":"MDL-6","text":"WHILE dismissible is true and open is true, WHEN the user presses Escape, uses the platform's back (Android's back gesture or button, the iOS accessibility escape gesture) or presses the scrim — a press that starts and ends outside the container — THE modal layer SHALL emit close exactly once with the reason escape, back or scrim, and SHALL stay open until open becomes false: the product sets it from close (through the binding where open is one, SwiftUI), unless the component built from the modal layer closes itself as its own spec says (DLG-5, NVD-20). Escape SHALL reach the layer only after everything inside its container has heard it: a key an element inside takes (a field clearing its text, a menu closing) SHALL NOT also ask the layer to close. WHILE dismissible is false THE modal layer SHALL ignore these inputs and emit nothing, and a press on the scrim SHALL still reach nothing behind it."},{"id":"MDL-7","text":"WHEN the layer opens THE modal layer SHALL fade its scrim and its container in from transparent over comp.modal-layer.motion.enter-duration with comp.modal-layer.motion.enter-easing, and WHEN it closes SHALL take its scrim away at once (MOT-8) and fade its container out over comp.modal-layer.motion.exit-duration with comp.modal-layer.motion.exit-easing, keeping the container drawn until the fade ends, WHILE it fades out neither the container nor the scrim taking pointer input and what the layer made inert no longer inert, so that a press reaches the page (MOT-7); WHEN it is mounted with open true it SHALL appear without its motion while the document has not yet been first painted, and with it when it is mounted after that. A component built from the modal layer SHALL fade the scrim in in step with its own surface, over its own enter motion, and take it away at once as it begins to close (MOT-8), and moves its surface as its own spec says (a dialog grows, a sheet slides). The enter and exit tokens of a surface that takes the modal role (a dialog, a modal picker, an image preview) alias these four, so that one value sets the tempo of every such surface of a product; a sheet (a bottom sheet, a side sheet, a modal navigation drawer) takes the sheet role (tanrei.sys.motion.role.appear.sheet.enter and .exit) instead, so that one value sets the tempo of every sheet. WHERE motion is reduced THE modal layer SHALL fade without moving or growing anything, or SHALL appear and disappear at once WHERE the component built from it says so or on a platform whose reduced-motion setting removes every animation (Android's)."},{"id":"MDL-8","text":"WHEN a modal layer opens while another is open THE modal layer SHALL stack above it with its own scrim, make the first one inert with the rest of the window, and WHEN it closes return focus to the element inside the first one that had it; Escape, the platform's back and a press on the scrim SHALL reach only the topmost layer. WHEN two modal layers open in the same update, one after the other, THE modal layer SHALL stack them in the order they open, as if the later had opened from the earlier: focus SHALL go into the later one only, the later SHALL return focus on closing to the element the earlier moves focus to as it opens (MDL-3), and the earlier, closed after it, SHALL return focus to the element that had it before either opened."},{"id":"MDL-9","text":"WHEN an overlay that is not modal opens from an element inside the container — a menu, a tooltip, a popover, a select's list, a docked picker — THE modal layer SHALL let it be presented above the layer and operated while the rest of the window is inert, and SHALL NOT count a press inside it as a press on the scrim: the overlay belongs to the layer as POP-25 says."},{"id":"MDL-10","text":"THE modal layer SHALL expose its container as a modal dialog named by label, everything outside it being hidden (MDL-2); a component built from it names the dialog by its own headline or label and may expose it as an alert dialog (DLG-14). WHILE label is empty THE modal layer SHALL still open, and in debug builds SHALL report that it has no accessible name."},{"id":"MDL-11","text":"THE modal layer SHALL draw nothing of its own but the scrim: its container has no color, edge, shadow, shape or padding and hands its content no color or text style, so that plain text given as content takes what the window around it gives. It SHALL lay the container out at the size of its content, centred in the window's safe area and above the on-screen keyboard while one is shown, and never larger than that area, the content scrolling inside it where it is larger; the product places or sizes the container otherwise in the platform's own way (named in the platform notes). A component built from the modal layer places and draws its own surface (DLG-7, SSH-7, BSH-6, IMP-1)."},{"id":"MDL-12","text":"THE modal layer SHALL take its layout direction from where it is used and SHALL have no direction setting of its own; it SHALL mirror nothing itself, and its content follows the direction."},{"id":"MDL-13","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the host, by the attribute or by the ARIA property that reflects it, THE modal layer SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on its dialog (MDL-10) — an id reference by the elements it names in the host's tree or a tree around it, a description after its own. WHILE label is not empty it is the dialog's name, over a name given so; WHILE label is empty, a name given so is the dialog's name and SHALL NOT be reported as having none in debug builds. WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE modal layer SHALL take it off that element."}],"accessibility":{"role":"dialog","keyboard":[{"keys":"Tab / Shift+Tab","action":"Move focus through the focusable elements in the container, wrapping from the last to the first and back; focus never leaves the layer."},{"keys":"Escape","action":"Asks the layer to close (close, reason escape) while dismissible is true; with stacked layers, only the topmost. A key an element inside takes first goes no further."}],"labeling":"The container is a modal dialog named by label; everything outside it is hidden from assistive technology while the layer is open. The scrim is not exposed. A component built from the modal layer names the dialog by its own headline or label, and the dialog may be an alert dialog.","minimumTarget":true,"notes":["The modal layer is what every modal surface of Tanrei has in common: the dialog, the modal side sheet, the modal bottom sheet, the modal navigation drawer, the image preview, the modal date-time picker and the search's modal views are each built from it and cite its rules. Restyle their scrim and their tempo once, through comp.modal-layer.*.","Use it alone for a modal surface Tanrei does not have — a command palette, a takeover over the whole window, a viewer of your own. For a decision use the Dialog; for a panel, the modal side sheet or bottom sheet: they already hold focus, name themselves and place their actions.","Give the content a way out of its own (a Close, Cancel or Done button). Escape, back and the scrim are not found by everyone, and with dismissible false they do nothing.","The layer has no target of its own; what the product puts in it meets the minimum target itself.","Inert, focus moved in, kept and given back: the WAI-ARIA Authoring Practices' modal dialog pattern and HTML's modal dialog. The web presents the container with a modal <dialog> element (showModal gives the top layer and inertness); the other platforms present it in a window or a route of its own with the system's dim switched off, so that every platform draws the layer's own scrim."]},"tokens":"comp.modal-layer","fixtures":[{"id":"open","props":{"open":true,"label":"Export photos"},"content":"Exporting 24 photos…"},{"id":"no-scrim","props":{"open":true,"scrim":false,"label":"Export photos"},"content":"Exporting 24 photos…"}],"platforms":{"web":{"status":"alpha","name":"tanrei-modal-layer","props":{"open":"open","dismissible":"closedby","scrim":"noScrim","label":"label"},"events":{"close":"close"},"notes":"`dismissible` is HTML's own `closedby` attribute, as on `<tanrei-dialog>` and `<tanrei-bottom-sheet>`: `any` (the default) or `none`. `scrim` is its inverse, the boolean property `noScrim` (attribute `no-scrim`), false by default: an HTML boolean attribute cannot default to true, and a property has its attribute's name. `close` is a CustomEvent whose `detail.reason` is `escape`, `scrim` or `back` (`back` when the native `cancel` arrives without an Escape key, as Android's back gesture sends it); the product sets `open` to false from it. The content is the default slot. The container is a native `<dialog>` in the shadow root opened with `showModal()`, in the top layer over `::backdrop`, the scrim (`backdrop-filter` blurs what is behind it); it is the `container` part, which a product places or sizes with `::part(container)` (MDL-11). The fade out (MDL-7) keeps the closed `<dialog>` in the top layer in every browser, as it does every Tanrei modal overlay: closing closes the modal `<dialog>` at once (focus goes back, nothing is inert any more) and shows it as a manual popover, inert and taking no pointer, marked `data-tanrei-leaving`, until its fade and its scrim's have finished. The `autofocus` attribute on a slotted element marks initial focus. Debug builds (`import.meta.env.DEV` or the package's dev export) report an empty label (MDL-10). The page's scroll is held by `overflow: hidden` on the root (MDL-2); where a classic scroll bar took room, the room stays as `scrollbar-gutter: stable` (unless the root keeps a stable gutter of its own) and, where the engine keeps no gutter for the bar (WebKit, and Chromium over overlay scroll bars, under a bar styled with `::-webkit-scrollbar`: neither the hold's nor the root's own), as padding on the root on the bar's side. The room is measured when the hold begins and again on each `resize` of the window while it lasts (MDL-2). Padding does not keep the window's own box, the containing block of what is `position: fixed` or in the top layer, which then widens by the bar's width: the room it gained on each side is set on the root as `--tanrei-scroll-hold-inset-left` and `--tanrei-scroll-hold-inset-right`, only while the scroll is held and only on a side that gained room (read with a fallback: `var(--tanrei-scroll-hold-inset-right, 0px)`). A product's element fixed against the window's edge adds them to its insets; the snackbar's host box does. Snapshot harness: a 640 × 640 viewport with a `surface` page, the layer opened by `open`; the screenshot is the viewport."},"swiftui":{"status":"planned","name":"tanreiModalLayer","props":{"open":"isPresented","dismissible":"dismissible","scrim":"scrim","label":"accessibilityLabel"},"events":{"close":"onClose"},"notes":"Planned: a view modifier, as `.sheet` is: `.tanreiModalLayer(isPresented: Binding<Bool>, dismissible:, scrim:, accessibilityLabel:, onClose:, content:)`, presented as `tanreiDialog` is (on iOS `.fullScreenCover` with a clear presentation background and the system transition off; Tanrei draws the scrim and the fade; on macOS an overlay of the modified view with the modal trait). Closing writes false to `isPresented` and then calls `onClose` with the reason. Initial focus is `.defaultFocus`; Escape is `.onKeyPress(.escape)` and the escape gesture `.accessibilityAction(.escape)`. The blur is a material behind the scrim where the radius is above 0. The container is placed with the content's own frame and alignment."},"compose":{"status":"planned","name":"TanreiModalLayer","props":{"open":"visible","dismissible":"dismissible","scrim":"scrim","label":"contentDescription"},"events":{"close":"onCloseRequest"},"notes":"Planned: `TanreiModalLayer(visible, onCloseRequest: (TanreiModalLayerCloseReason) -> Unit, dismissible, scrim, contentDescription, content)`, drawn in a `Dialog` window of its own (as `TanreiDialog` and the modal sheets are) with the window's own dim off and `usePlatformDefaultWidth = false`; the window traps focus, answers back and hides what is behind from TalkBack. The blur is the window's blur-behind radius on Android 12 and later, and none before (MDL-1). The caller sets `visible` to false from `onCloseRequest`. The container is placed with a `Modifier` on the content."},"flutter":{"status":"planned","name":"TanreiModalLayer","props":{"open":"open","dismissible":"dismissible","scrim":"scrim","label":"semanticLabel"},"events":{"close":"onClose"},"notes":"Planned: `TanreiModalLayer(open:, onClose:, dismissible:, scrim:, semanticLabel:, child:)`, a controlled overlay in the `Overlay` over the page with a `ModalBarrier` drawn in the layer's color and a `BackdropFilter` for the blur, a `FocusScope` that traps focus, `BlockSemantics` behind it and a `PopScope` for back. The container is placed with the child's own `Align`."},"react-native":{"status":"planned","name":"ModalLayer","props":{"open":"visible","dismissible":"dismissible","scrim":"scrim","label":"accessibilityLabel"},"events":{"close":"onClose"},"notes":"Planned: `<ModalLayer visible onClose dismissible scrim accessibilityLabel>{content}</ModalLayer>`, presented in a transparent `Modal` with `animationType=\"none\"`, `statusBarTranslucent` and `navigationBarTranslucent`; `onRequestClose` (Android's back, and Escape on a hardware keyboard) is close with the reason back or escape. React Native cannot blur what is behind a window without a native module of its own, so the scrim is the color alone (MDL-1). The container is placed with the content's own style."}}}
@@ -0,0 +1 @@
1
+ {"name":"navigation-bar","title":"Navigation bar","summary":"Moves between three to five top-level destinations from the bottom edge of a compact screen, and shows which one is current with an indicator that slides between them and follows a finger dragged across the bar.","level":"base","listing":"default","anatomy":[{"id":"container","description":"The bar along the bottom edge, and the ground the active indicator moves on: one constant color, whichever destination is selected. Its color reaches under the system inset below it (home indicator, gesture bar)."},{"id":"outline","description":"The bar's top edge, which sets it apart from the content above."},{"id":"item","description":"One destination (an item of the destination kind): an equal share of the bar's width, less the bar's inset at its two ends, and its full height. The whole cell is the hit area."},{"id":"item.container","description":"The destination's box: its cell, held in from the bar's top and bottom edges by the bar's inset. It is as wide as the destination's share of the bar, not as wide as its icon and label, so every destination of a bar has the same box. It carries hover, focus and press for every destination, which are therefore drawn where the active indicator is or would be, and it is filled as the active indicator while the destination is selected. When the selection changes the filled box slides from the previous destination to the new one, and it follows a finger dragged across the bar."},{"id":"item.icon-indicator","description":"The box behind the icon alone, the icon centered in it. The default system leaves it transparent; a system that marks the selection behind the glyph only (Material's navigation bar) fills it and leaves the item container clear. It grows in from its center rather than sliding."},{"id":"item.icon","description":"The destination's glyph (its icon). Outlined when unselected, filled when selected."},{"id":"item.label","description":"The destination's name under the icon indicator, inside the item container, on one line. Always its accessible name, drawn or not.","optional":true},{"id":"item.covered-content","description":"A second, decorative copy of the icon and label in the covered colors, clipped to the active indicator wherever it is drawn, so that the content inverts where the indicator covers it and the inversion travels with the indicator, in a slide and under a finger alike. Hidden from assistive technology."},{"id":"item.badge","description":"A Tanrei badge anchored to the icon, drawn from the destination's badge, badgeCount and badgeLabel: a dot or a count (the badge component). It is drawn above both copies of the icon.","optional":true},{"id":"focus-ring","description":"Gap-then-ring indicator around the item container, concentric with it and in its shape, held inside the bar, shown for keyboard focus."}],"props":[{"name":"value","type":"string","default":"","description":"The value of the selected destination (selection is the bar's, by a destination's value). Empty selects none (the current screen is not one of the bar's destinations)."},{"name":"variant","type":"enum","values":["tonal","filled"],"default":"tonal","description":"How the active indicator is filled. Tonal: a soft container with the content in that container's own color. Filled: the strong color, with the content inverted on it, for a bar that must stand out from a busy screen. Tonal destinations are drawn from the unselected and selected conditions, filled ones from filled-unselected and filled-selected. The indicator's size and place are the same in both."},{"name":"labelVisibility","type":"enum","values":["always","selected","never"],"default":"always","description":"Which destinations draw their label: all of them, only the selected one, or none. A label that is not drawn is still the destination's accessible name, and no item container changes size with it."},{"name":"label","type":"string","default":"","description":"Names the bar itself for assistive technology (\"Main\"); on the web it names the navigation landmark."}],"items":[{"name":"destination","summary":"One top-level destination of the bar: an icon, a label under the icon, and optionally a badge on the icon.","props":[{"name":"value","type":"string","default":"","description":"What identifies the destination. The bar's value selects the destination whose value equals it; change and reselect carry it. Unique within the bar. Empty on a link, its href stands as its value."},{"name":"href","type":"string","default":"","description":"The address the destination leads to. Not empty, the destination is a link and not a button (NVB-30): it is followed as the platform follows a link, and the bar does not select it by itself (NVB-31). Empty, the destination is a button and the product moves on change. As the Button's href (a control with a destination is a link)."},{"name":"target","type":"enum","values":["same","new"],"default":"same","description":"Where a link opens, as the Button's target. same: where the person is. new: a new context — a new tab or window on the web, outside the current screen elsewhere — which a bar's cell has no place to mark and says through targetLabel (NVB-32). A link that opens elsewhere is never selected by a press (NVB-31). Ignored without href."},{"name":"targetLabel","type":"string","default":"","description":"What assistive technology reads after the link's name while target is new (\"opens in a new tab\"), as the Button's targetLabel: Tanrei ships no words of its own. Required while target is new; ignored otherwise.","words":"targetLabel"},{"name":"label","type":"string","default":"","description":"Its name, drawn under the icon (see the bar's labelVisibility) and always its accessible name. Required."},{"name":"icon","type":"string","default":"","description":"The name of its glyph in the system's icon set, drawn in the destination's own icon style: outlined while unselected, filled while selected. Required."},{"name":"disabled","type":"boolean","default":false,"description":"Makes it unavailable. It keeps its place, draws its disabled look, cannot be activated and leaves the focus order."},{"name":"badge","type":"boolean","default":false,"description":"Draws a Tanrei badge (the badge component) on the icon, from badgeCount and badgeLabel."},{"name":"badgeCount","type":"number","default":null,"description":"The badge's count, as the badge component's count: null draws the dot, 0 draws nothing, above 0 the number (above 999 as 999+). Ignored while badge is false."},{"name":"badgeLabel","type":"string","default":"","description":"The badge's label, as the badge component's: what assistive technology reads after the destination's name and state (\"3 unread\"). A dot needs one. Ignored while badge is false."}]}],"events":[{"name":"change","description":"The user activated a destination that is not the selected one, or released a drag of the active indicator on one; carries its value and, for a link, its href. For a link it comes before the link is followed, only for an activation that follows it in place (NVB-31), and a product that cancels it follows the link itself."},{"name":"reselect","description":"The user activated the destination that is already selected (a product may scroll that screen to its top); carries its value and, for a link, its href, as change does. A drag that returns the indicator to it does not emit it."}],"states":["enabled","disabled","hovered","focused","pressed","selected"],"behavior":[{"id":"NVB-1","text":"WHEN the user activates a destination by pointer, touch, Enter or Space (Enter only for a destination that is a link, and for a link only an activation that NVB-31 counts) THE navigation bar SHALL emit change exactly once with the destination's value WHILE it is not the selected destination, and reselect exactly once with its value WHILE it is."},{"id":"NVB-2","text":"WHILE a destination's disabled is true THE navigation bar SHALL NOT emit change or reselect for it, SHALL NOT make it focusable and SHALL expose it as disabled to assistive technology."},{"id":"NVB-3","text":"THE navigation bar SHALL draw the destination whose value equals the bar's value from its variant's selected condition and every other destination from its variant's unselected condition: WHILE variant is tonal the selected condition is selected (comp.navigation-bar.selected.item.container.color, comp.navigation-bar.selected.item.icon-indicator.color, comp.navigation-bar.selected.item.icon.color, comp.navigation-bar.selected.item.label.color, comp.navigation-bar.selected.item.covered-icon.color, comp.navigation-bar.selected.item.covered-label.color) and the unselected condition is unselected; WHILE variant is filled they are filled-selected (comp.navigation-bar.filled-selected.item.container.color and the same parts) and filled-unselected. IF no destination's value equals a value that is not empty THE navigation bar SHALL draw every destination from its variant's unselected condition, and in debug builds report the value."},{"id":"NVB-4","text":"WHILE a destination is hovered, keyboard-focused or pressed THE navigation bar SHALL render its item container, icon indicator, icon, label, covered icon and label, and opacity from the component tokens of its condition in the highest-precedence active state, with precedence pressed over focused over hovered; focus gained by pointer or touch SHALL NOT select the focused state."},{"id":"NVB-5","text":"WHEN a destination receives keyboard focus THE navigation bar SHALL show the focus indicator (the ring or the glow, NVB-10) around its item container (NVB-12), concentric with it and in its shape, with its inner edge sys.focus.offset outside the container's edge, and SHALL hold it inside the bar: WHERE the space between the item container and the bar's edges (comp.navigation-bar.container.padding) is less than the indicator reaches, it SHALL be drawn further in by the difference, on every side alike, keeping the container's shape. THE indicator SHALL be drawn above the neighbouring destinations and the active indicator, without animation; focus gained by pointer or touch SHALL NOT show it."},{"id":"NVB-6","text":"THE navigation bar SHALL make each destination's hit area its whole cell, the bar's full height above the system inset and its share of the bar's width (NVB-11), the first and the last cell reaching the bar's start and end edges, and SHALL NOT let a cell's hit area fall below sys.target.touch in either direction; hover and press over any part of the cell SHALL answer on the item container. WHERE an equal share of the bar's width is narrower than sys.target.touch (more destinations than the width holds), the cells SHALL still share the bar's width and narrow below the target rather than make the bar wider than the space it is given."},{"id":"NVB-7","text":"WHILE a destination's disabled is true THE navigation bar SHALL render its item container, icon indicator, icon, label, covered icon and label, and opacity from the disabled component tokens of its condition."},{"id":"NVB-8","text":"WHEN a destination is pressed by pointer, touch, Enter or Space THE navigation bar SHALL show its pressed state without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner."},{"id":"NVB-9","text":"WHILE a destination is pressed THE navigation bar SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole item container at once; ripple grows the pressed state layer, clipped to the item container, from the point of contact (from the center for keyboard activation); dim applies the pressed opacity to the whole destination and draws no state layer; none draws no answer to the press. Under ripple and dim only the item container color stays with the state under the press; icon indicator, icon, label, covered icon and label, and opacity still come from the pressed tokens. Under none every part stays with the state under the press. The ripple grows over comp.navigation-bar.motion.feedback-duration with comp.navigation-bar.motion.state-easing, fades over comp.navigation-bar.motion.state-duration with comp.navigation-bar.motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced."},{"id":"NVB-10","text":"THE navigation bar SHALL ease its item container and icon indicator corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show its keyboard focus as sys.behavior.focus-style names (ring or glow); a platform that cannot draw a choice SHALL fall back to the first value and state that in its README."},{"id":"NVB-11","text":"THE navigation bar SHALL span the full width of its parent, at least comp.navigation-bar.container.height high above the system inset, filled with comp.navigation-bar.container.color, raised by comp.navigation-bar.container.elevation and edged at the top by comp.navigation-bar.outline.width of comp.navigation-bar.outline.color, and SHALL divide its width, less comp.navigation-bar.container.padding at its start and at its end, into equal cells, one per destination, in reading order from the start edge; right-to-left layouts SHALL mirror the order. THE bar's container SHALL be the same whichever destination is selected, whatever state a destination is in and while the active indicator moves: only the active indicator marks the selection."},{"id":"NVB-12","text":"THE navigation bar SHALL draw each destination's item container as wide as its cell and as tall as the bar above the system inset less comp.navigation-bar.container.padding above and below, the same size for every destination of the bar whatever each holds, with its four corners rounded by comp.navigation-bar.item.container.shape, each at most half its height, and SHALL NOT size it to the destination's content. Inside it THE navigation bar SHALL lay out the destination as a column centered in the item container: the icon indicator, comp.navigation-bar.item.icon-indicator.width wide and comp.navigation-bar.item.icon-indicator.height high with corners comp.navigation-bar.item.icon-indicator.shape, its icon centered in it; and WHILE the label is drawn, the label below it, comp.navigation-bar.item.gap away, centered, on one line in comp.navigation-bar.item.label.typescale. THE column SHALL keep comp.navigation-bar.item.container.padding-block between itself and the item container's top and bottom edges, the bar growing in height to keep it (NVB-21), and a label wider than the item container less comp.navigation-bar.item.container.padding-inline on each side SHALL be truncated at its end with an ellipsis. THE navigation bar SHALL NOT draw hover, focus or press on the part of the cell outside the item container. Every part is laid out in every system; a transparent color hides a part without changing the layout."},{"id":"NVB-13","text":"WHILE labelVisibility is always THE navigation bar SHALL draw every destination's label; WHILE it is selected it SHALL draw only the selected destination's label; WHILE it is never it SHALL draw none. A destination that draws no label SHALL center its icon indicator in its item container, whose size does not change with the label, and every destination's label SHALL remain its accessible name."},{"id":"NVB-14","text":"THE navigation bar SHALL draw each icon at comp.navigation-bar.item.icon.size with the family and fill of its condition (selected for the selected destination, unselected for every other), sys.icon.weight, and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max."},{"id":"NVB-15","text":"WHEN the selected destination changes while no drag is followed (NVB-27) THE navigation bar SHALL slide the active indicator (the fill of the selected condition's item container) from the previous destination's item container to the new one's, at its full size throughout and drawn in the new destination's colors, every frame of the slide being the in-between look of NVB-27 (the indicator as a drag would draw it at that place, each icon and label in its covered color exactly where it is covered); SHALL grow the new destination's icon indicator in width from its center to its full width, at its full height throughout, and fade the previous one out; and SHALL change icon and label colors and icon fill; all over comp.navigation-bar.motion.selection-duration with comp.navigation-bar.motion.selection-easing. WHERE no destination was selected before, the active indicator SHALL fade in on the new item container at its full size, and WHERE none is selected after, it SHALL fade out, over the same time; it SHALL NOT grow or shrink in width to appear or disappear. WHILE labelVisibility is selected the labels SHALL appear and disappear over the same time, without resizing or moving any item container. WHERE motion is reduced it SHALL show the new selection at once. WHEN the bar first appears, or the selected destination changes size or place without a new selection (a font arriving, the text size changing, the bar resizing), THE navigation bar SHALL put the active indicator on it at once, without a slide."},{"id":"NVB-16","text":"WHILE a destination's badge is true THE navigation bar SHALL draw a Tanrei badge anchored to its icon as the badge component draws one whose count is the destination's badgeCount and whose label is its badgeLabel, SHALL keep it while the destination is disabled, and SHALL expose the badge's description (badgeLabel, or the displayed count when it is empty) as part of the destination's own description, after its name and state."},{"id":"NVB-17","text":"IF the navigation bar holds fewer than three or more than five destinations THE navigation bar SHALL still render them, and in debug builds report the count."},{"id":"NVB-18","text":"THE navigation bar SHALL extend its container under the bottom system inset (home indicator, gesture bar, taskbar) and SHALL place its destinations above that inset and inside the left and right insets."},{"id":"NVB-19","text":"THE navigation bar SHALL expose each destination as one element named by its label, with its selected state and its position in the set (for example 2 of 4), and its icon hidden: a link WHILE its href is not empty (NVB-30) and a button otherwise. On the web it is an anchor or a button inside a navigation landmark named by the bar's label, the selected destination carrying aria-current=\"page\"; on Apple platforms, Android, Flutter and React Native a tab of a tab bar, with the selected state, a link destination included: there the tab is what carries the position and the selection a bar is read by, and a link destination adds the link trait to it where the platform lets one element carry both. The selected destination is the place the product is showing, in a product of one screen and in a site of many pages alike: THE navigation bar SHALL have no second state and no second mark for a current page, and SHALL expose exactly one destination, or none, as current."},{"id":"NVB-20","text":"WHILE a destination's label is not empty THE navigation bar SHALL expose it as the destination's accessible name, over a name the product gives the destination on the element (aria-label or aria-labelledby); WHILE a destination's label is empty and the product gives the destination a name of its own on the element — aria-label, or aria-labelledby naming an element — THE navigation bar SHALL expose that name as its accessible name; WHILE a destination's label is empty and the product gives it none THE navigation bar SHALL still render it, and in debug builds report that it has no accessible name."},{"id":"NVB-21","text":"WHILE the text size is enlarged THE navigation bar SHALL grow its height to hold its labels on one line inside their item containers (NVB-12), every item container growing with the bar alike, and SHALL NOT scale its icon indicators or icons; WHERE the platform offers a large-content viewer for bar items (iOS) a long press SHALL show the destination's icon and label enlarged."},{"id":"NVB-22","text":"IF two destinations have the same value THE navigation bar SHALL treat the first of them as the one the bar's value selects, and in debug builds report the repeated value."},{"id":"NVB-23","text":"THE navigation bar SHALL draw each destination's icon and label a second time, over the first, in the covered colors of its condition (comp.navigation-bar.unselected.item.covered-icon.color and comp.navigation-bar.unselected.item.covered-label.color for a tonal destination that is not selected, comp.navigation-bar.selected.item.covered-icon.color and comp.navigation-bar.selected.item.covered-label.color for the tonal selected one, comp.navigation-bar.filled-unselected.item.covered-icon.color, comp.navigation-bar.filled-unselected.item.covered-label.color, comp.navigation-bar.filled-selected.item.covered-icon.color and comp.navigation-bar.filled-selected.item.covered-label.color for a filled bar), clipped to the active indicator's current shape, its corners included, wherever the indicator is drawn; WHILE the indicator slides (NVB-15) or follows a drag (NVB-27) the clip SHALL move with it in the same frame, so that a destination it passes over changes where it is covered and the newly selected destination's icon and label are wholly in their covered colors when it lands, neither before nor after. THE navigation bar SHALL NOT approximate the covered colors with a blend mode, SHALL draw the badge above both copies, and SHALL expose each destination to assistive technology once."},{"id":"NVB-24","text":"THE navigation bar SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the navigation bar is shown THE navigation bar SHALL draw itself for the new direction at once, without a motion of its own, keeping the selected destination and its focus; a drag (NVB-27) SHALL carry the active indicator to where the pointer is in either direction."},{"id":"NVB-25","text":"WHERE the layout direction is right-to-left THE navigation bar SHALL draw a destination's icon, in both of its copies (NVB-23) mirrored left to right exactly when the system's icon set marks that glyph's name as mirrored or the product forces mirroring for that use, and unmirrored when the product forbids it: the icon helper mirrors the glyph inside its own box, about the box's vertical centre line, changing neither its place, size, color and fill nor the order NVB-11 gives. THE navigation bar SHALL NOT mirror a glyph itself, and SHALL NOT mirror content the product gives as an image or a view of its own rather than by a glyph's name."},{"id":"NVB-26","text":"THE navigation bar SHALL lay out a destination's label, in both of its copies (NVB-23) as text of its own direction, isolated from the text around it: each takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right word, a number with its sign or unit, a telephone number and an address keep their own order in a right-to-left layout and reorder nothing beside them; THE navigation bar SHALL still place each label and align its lines by the layout direction, not by the text's own, and SHALL cut a label that does not fit (NVB-12) at the end of its own direction, so that a left-to-right label in a right-to-left layout loses its right end and never its beginning."},{"id":"NVB-27","text":"WHEN the user presses the bar with touch, a pen or a mouse and drags past the platform's touch slop (8 points where the platform names none), further sideways than up or down, WHILE a destination is selected, THE navigation bar SHALL take the drag: the press SHALL activate no destination when it ends (NVB-1), the destination under it SHALL leave its pressed state as it does when a press ends (NVB-8), and from then until the drag ends THE navigation bar SHALL draw the active indicator where the pointer is along the bar — on an enabled destination's item container while the pointer is at that cell's center, halfway between two neighbouring enabled destinations while the pointer is where their cells meet (the middle of any disabled destinations between them), at the linear interpolation in between, and on the first or last enabled destination while the pointer is before or beyond its center — at its full size, in the selected destination's colors. Everything that differs between the indicator on the one destination and on the other SHALL change continuously with the pointer, with no threshold: its place, and the color of each icon and label, which is its covered color exactly where the indicator covers it and its own color elsewhere, the clip of NVB-23 moving with the indicator in the same frame. The icon indicator, each icon's fill and, WHILE labelVisibility is selected, the label that is drawn SHALL stay with the selected destination until the release (NVB-28). THE navigation bar SHALL place the indicator in the frame the pointer moves, without a motion of its own; WHEN the drag is taken with the pointer away from where the indicator rests THE navigation bar SHALL bring it to the pointer's place over comp.navigation-bar.motion.state-duration with comp.navigation-bar.motion.state-easing instead of at once, following the pointer meanwhile. A drag that is further up or down than sideways when it passes the slop SHALL be left to the page and to the system's gestures at the bottom edge for its whole length, a wheel or a trackpad SHALL move nothing, and WHILE no destination is selected THE navigation bar SHALL take no drag."},{"id":"NVB-28","text":"WHEN the user releases a drag the navigation bar has taken THE navigation bar SHALL choose one enabled destination: the one the active indicator is nearer to of the two it lies between (the one after it from halfway on), or, WHEN the release is a fling along the bar, the one of those two that the fling is toward; a fling is a release faster than the platform's minimum fling velocity (Android's ViewConfiguration.getScaledMinimumFlingVelocity, Flutter's kMinFlingVelocity) or, where the platform names none (the web, SwiftUI, React Native), 0.5 points per millisecond. A release's velocity is the pointer's over its last moves: WHERE the pointer has not moved for longer than the time after which the platform's velocity tracker takes a pointer as stopped (40 milliseconds in Android's VelocityTracker, Jetpack Compose's VelocityTracker and Flutter's VelocityTracker) or, where the platform names none (the web, SwiftUI, React Native), 40 milliseconds before the release THE navigation bar SHALL take the release as having no velocity, so that a drag that stops where it is wanted and is let go there is no fling, however fast it moved before it stopped. WHERE the chosen destination is not the selected one and is not a link THE navigation bar SHALL activate it as NVB-1 does — emit change exactly once with its value — and SHALL slide the active indicator from where the release left it onto that destination over comp.navigation-bar.motion.selection-duration with comp.navigation-bar.motion.selection-easing, as NVB-15 does from a destination; WHERE the chosen destination is not the selected one and is a link THE navigation bar SHALL treat the release as a plain press on that link — emitting change and following the link as NVB-31 says, or only opening it where NVB-31 does not count it — SHALL NOT write value, and SHALL return the active indicator to the destination that value selects as NVB-29 returns it, the indicator going on to the chosen destination when the product sets value (NVB-15); WHERE it is the selected destination THE navigation bar SHALL return the indicator to it over the same motion and SHALL emit neither change nor reselect. The place where two cells meet decides only what a release chooses; nothing drawn changes at it. The release SHALL NOT also activate the destination under the pointer."},{"id":"NVB-29","text":"WHEN a drag the navigation bar has taken is cancelled — the platform cancels the pointer (a system gesture, a lost capture), Escape is pressed while it lasts, or the product sets value or removes or disables a destination the indicator lies between — THE navigation bar SHALL return the active indicator to the selected destination (the one the product has just set, where it set one) over comp.navigation-bar.motion.selection-duration with comp.navigation-bar.motion.selection-easing and emit nothing. WHILE a drag lasts THE navigation bar SHALL NOT change value, keyboard focus, or the selected state that each destination exposes to assistive technology, whatever the indicator covers, and SHALL announce nothing: the selection is made, and announced, by the release alone (NVB-28). WHERE motion is reduced THE navigation bar SHALL still draw the active indicator where the pointer is, which the person's own finger moves, taking the drag without the catch-up motion of NVB-27, and SHALL put it on its destination at once when the drag is released or cancelled."},{"id":"NVB-30","text":"WHILE a destination's href is not empty THE navigation bar SHALL make it a link to that address and not a button. On the web it SHALL be an anchor element with that address, whose behaviours are the browser's own — following it on a plain click, a touch or Enter; opening it in another tab or window by a modified click or a middle click; the link's context menu; copying its address; showing its address on hover — and THE navigation bar SHALL NOT prevent, replace or imitate any of them, with one exception: a sideways drag that begins on a link destination moves the active indicator (NVB-27) and does not drag the link's address, because one gesture cannot do both and the drag is the bar's own way of moving its selection; Space SHALL NOT activate a link. On other platforms it SHALL be the platform's own link (SwiftUI's Link; on Compose, Flutter and React Native an element with the platform's link semantics whose address is opened by the platform's opener), as BTN-22 says for a link button. THE navigation bar SHALL draw a link exactly as it draws a button destination, from the same tokens in every state and both variants (NVB-3, NVB-4, NVB-7 to NVB-9, NVB-12, NVB-23), SHALL draw no look of its own for a link the user has visited, and SHALL give its hit area (NVB-6) to the link. WHILE a link's value is empty THE navigation bar SHALL take its href as its value, for value, change, reselect and NVB-22. WHILE a link's disabled is true it SHALL keep the link role with the disabled state and no destination, and SHALL open nothing by any means the platform gives a link (NVB-2; on the web the anchor carries no address)."},{"id":"NVB-31","text":"WHEN the user activates a link destination THE navigation bar SHALL count it as an activation (NVB-1) only WHILE it follows the link in the place where the product is shown: a click with the primary button and no modifier key, a touch, Enter, or the default action of assistive technology, on a link whose target is same and that asks for no download. It SHALL then emit change or reselect exactly once, carrying the destination's value and its href, before the link is followed, and SHALL NOT hold the link back for sys.motion.duration.press-hold; SHALL NOT write value itself on any platform, because where the product is, is the product's to say, and the page or the route shown next sets value; SHALL keep the active indicator on the destination that value selects, moving it as NVB-15 says only when value changes; and SHALL let the link be followed unless the product cancels the event (preventDefault on the web), as a product does that moves between its pages without loading a document. For every other activation of a link — a modified or a middle click, a link whose target is new, a download — THE navigation bar SHALL emit neither change nor reselect, and SHALL keep value and the drawn selection as they are."},{"id":"NVB-32","text":"WHILE a destination is a link and its target is new THE navigation bar SHALL open its href in a new context, as BTN-24 says for a link button (on the web a new tab or window that is given no handle to the page that opened it), and SHALL draw no mark for it: a destination's cell is an icon over a label and has no trailing glyph place for a mark to stand in, as an icon-only button has none, and a second glyph beside the icon would be read as its badge. It SHALL expose targetLabel as part of the destination's description, after its badge's description (NVB-16), and WHILE targetLabel is empty SHALL still render and in debug builds report that a link that opens a new context does not say so. WHILE target is same THE navigation bar SHALL ignore targetLabel."},{"id":"NVB-33","text":"WHEN a destination's target names a value the navigation bar does not define THE navigation bar SHALL treat it as same, and in debug builds report the unknown value. IF a destination's href is only white space, or names a script to run rather than a place to go (the web's javascript: scheme), or cannot be read as an address by the platform, THE navigation bar SHALL make the destination a button without a destination, and in the last two cases report it in debug builds, as BTN-26 says for a button. WHILE a destination's href is empty THE navigation bar SHALL ignore its target and targetLabel."},{"id":"NVB-34","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on a destination's host, by the attribute or by the ARIA property that reflects it, THE navigation bar SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on the element that carries the destination's role (its link or its button) — an id reference by the elements it names in the host's tree or a tree around it, an error message as part of the description while the destination is invalid — except those a destination owns (aria-current, aria-disabled), which it SHALL move and not expose. WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE navigation bar SHALL take it off that element. WHEN the product sets an aria- attribute a destination owns THE navigation bar SHALL report it in debug builds. The bar's host carries its navigation landmark itself (NVB-19), so what the product writes on it is not moved, but for a name: WHILE the bar's label is not empty THE navigation bar SHALL hold the product's aria-label and aria-labelledby on that host as their data-aria- twins, so that label is the landmark's whole name although the platform gives aria-labelledby the precedence, and WHEN label is emptied SHALL give them back as they were written, so that a name the product gives names the landmark; WHEN the product removes one, or its data-aria- twin, or sets the ARIA property that reflects it to null, THE navigation bar SHALL take it away."}],"accessibility":{"role":"navigation","keyboard":[{"keys":"Tab","action":"Moves focus to the next destination that is not disabled: each destination is a tab stop, as the links of a navigation region are."},{"keys":"Enter or Space","action":"Activates the focused destination (Enter only for a destination that is a link: it follows the link, and Space is left to the platform)."},{"keys":"Enter with a modifier key, on a link (the web)","action":"What the browser does with a link: another tab or window, a download. The bar emits nothing and selects nothing (NVB-31)."},{"keys":"Escape","action":"Cancels a pointer drag of the active indicator in progress: the indicator returns and nothing is selected. Otherwise it does nothing."}],"labeling":"Each destination is named by its label, drawn or not; its icon is decorative, and so is the covered copy of its icon and label. A badge adds its description (badgeLabel, or the displayed count) after the name, and a link that opens a new context its targetLabel after that. The bar's label names the bar itself.","minimumTarget":true,"notes":["The semantics follow each platform's idiom for a bar of top-level destinations. On the web it is a navigation landmark whose destinations are links (or buttons in an app that does not change the URL) with aria-current=\"page\" on the current one: that is how a web user recognises site navigation, and the tablist pattern would promise tab panels and arrow-key movement that a switch of whole screens does not have. On iOS, Android, Flutter and React Native the same bar is the platform's tab bar (UITabBar, BottomNavigationView and Material's NavigationBar all expose their items as tabs), so each destination is announced as a tab with its selected state and position.","Selected and the current page are one thing. The bar lists the product's top-level places and the selected one is the place being shown, which the web exposes as aria-current=\"page\" on a button and on a link alike. A site of separate pages changes who says which it is — the page, through value, not a press — and nothing else: a link destination is followed, the bar never selects it by itself, and no destination is ever selected and another current.","Screen readers announce, for example, \"Inbox, tab, 1 of 4, selected, 3 unread\": name, role, position, state, then the badge's description.","Labels do not wrap: a bar's height is part of the screen's layout. A label longer than its item container allows is truncated, and stays whole as the destination's name. At 200% text size the bar and its item containers grow, and iOS shows the large-content viewer on a long press, as its own tab bar does.","The variant changes how strongly the selection is drawn, not what is announced: a tonal and a filled bar expose the same names, roles and states.","The drag is never the only way to choose (WCAG 2.5.7): a tap, a click, Enter and Space remain, and the keyboard is unchanged. While a drag lasts nothing a destination exposes changes and nothing is announced; the release announces once, as an activation does. With a screen reader running a one-finger drag is the reader's, and activation works as before.","How a state looks is a value decision of the active design system; components read the state's tokens and never compute the effect themselves."]},"tokens":"comp.navigation-bar","fixtures":[{"id":"four-destinations","props":{"value":"inbox","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"three-destinations","props":{"value":"search","label":"Main"},"items":[{"kind":"destination","props":{"value":"home","label":"Home","icon":"home"}},{"kind":"destination","props":{"value":"search","label":"Search","icon":"search"}},{"kind":"destination","props":{"value":"profile","label":"Profile","icon":"person"}}]},{"id":"five-destinations","props":{"value":"library","label":"Main"},"items":[{"kind":"destination","props":{"value":"home","label":"Home","icon":"home"}},{"kind":"destination","props":{"value":"explore","label":"Explore","icon":"explore"}},{"kind":"destination","props":{"value":"create","label":"Create","icon":"add_circle"}},{"kind":"destination","props":{"value":"library","label":"Library","icon":"video_library"}},{"kind":"destination","props":{"value":"profile","label":"Profile","icon":"person"}}]},{"id":"labels-selected","props":{"value":"sent","labelVisibility":"selected","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"labels-never","props":{"value":"inbox","labelVisibility":"never","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"badges","props":{"value":"inbox","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox","badge":true,"badgeCount":3,"badgeLabel":"3 unread"}},{"kind":"destination","props":{"value":"chat","label":"Chat","icon":"chat","badge":true,"badgeLabel":"New"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"disabled","props":{"value":"inbox","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star","disabled":true}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"none-selected","props":{"label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"selected-disabled","props":{"value":"starred","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star","disabled":true}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"long-labels","props":{"value":"subscriptions","label":"Main"},"items":[{"kind":"destination","props":{"value":"home","label":"Home","icon":"home"}},{"kind":"destination","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"destination","props":{"value":"subscriptions","label":"Subscriptions","icon":"subscriptions"}},{"kind":"destination","props":{"value":"library","label":"Library","icon":"video_library"}},{"kind":"destination","props":{"value":"downloads","label":"Downloads","icon":"download"}}]},{"id":"filled","props":{"value":"sent","variant":"filled","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"filled-labels-selected","props":{"value":"starred","variant":"filled","labelVisibility":"selected","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"filled-badges","props":{"value":"inbox","variant":"filled","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox","badge":true,"badgeCount":3,"badgeLabel":"3 unread"}},{"kind":"destination","props":{"value":"chat","label":"Chat","icon":"chat","badge":true,"badgeLabel":"New"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star"}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"filled-selected-disabled","props":{"value":"starred","variant":"filled","label":"Main"},"items":[{"kind":"destination","props":{"value":"inbox","label":"Inbox","icon":"inbox"}},{"kind":"destination","props":{"value":"sent","label":"Sent","icon":"send"}},{"kind":"destination","props":{"value":"starred","label":"Starred","icon":"star","disabled":true}},{"kind":"destination","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"links","props":{"value":"/search/","label":"Main"},"items":[{"kind":"destination","props":{"href":"/","label":"Home","icon":"home"}},{"kind":"destination","props":{"href":"/search/","label":"Search","icon":"search"}},{"kind":"destination","props":{"href":"/library/","label":"Library","icon":"video_library"}},{"kind":"destination","props":{"href":"https://example.com/tanrei/help","label":"Help","icon":"help","target":"new","targetLabel":"opens in a new tab"}}]},{"id":"links-rtl","props":{"value":"/search/","label":"Main"},"items":[{"kind":"destination","props":{"href":"/","label":"Home","icon":"home"}},{"kind":"destination","props":{"href":"/search/","label":"Search","icon":"search"}},{"kind":"destination","props":{"href":"/library/","label":"Library","icon":"video_library"}},{"kind":"destination","props":{"href":"https://example.com/tanrei/help","label":"Help","icon":"help","target":"new","targetLabel":"opens in a new tab"}}],"direction":"rtl"},{"id":"links-disabled","props":{"value":"/","label":"Main"},"items":[{"kind":"destination","props":{"href":"/","label":"Home","icon":"home"}},{"kind":"destination","props":{"href":"/search/","label":"Search","icon":"search","disabled":true}},{"kind":"destination","props":{"href":"/library/","label":"Library","icon":"video_library"}}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-navigation-bar","props":{"value":"value","variant":"variant","labelVisibility":"labelVisibility","label":"label"},"events":{"change":"change","reselect":"reselect"},"parts":{"container":"container","outline":"outline","item":"tanrei-navigation-bar-item cell","item.container":"tanrei-navigation-bar-item container","item.icon-indicator":"tanrei-navigation-bar-item icon-indicator","item.icon":"tanrei-navigation-bar-item icon","item.label":"tanrei-navigation-bar-item label","item.covered-content":"tanrei-navigation-bar-item covered-content","item.badge":"tanrei-navigation-bar-item tanrei-badge","focus-ring":"tanrei-navigation-bar-item container@focus-ring"},"notes":"Destinations are `<tanrei-navigation-bar-item>` children, in order. The bar selects the activated destination itself (sets `value`) before firing `change`, as a native control does, unless the destination is a link. For a link destination `change` and `reselect` are cancelable, carry `detail.href` beside `detail.value`, and are fired from the anchor's `click` only when `event.button` is 0, no modifier key is down, the click was not already cancelled, and the item's `target` is `same` and it has no `download`; cancelling one calls `preventDefault()` on that click. The bar does not set `value` for a link. `variant` is the `variant` attribute (`tonal`, `filled`) and `labelVisibility` the `label-visibility` attribute. The host is a navigation landmark (`role=\"navigation\"`, `aria-label` from `label`); the selected destination has `aria-current=\"page\"`. The active indicator is one layer of the bar that slides between the destinations' item containers; the covered copy of every icon and label (NVB-23) is an `aria-hidden` layer clipped with `clip-path` to the indicator's box, animated with it. A drag (NVB-27 to NVB-29) is followed with Pointer Events, as `tanrei-tabs` follows its own: `pointerdown` on the bar, `setPointerCapture` once the drag is taken, `pointermove` placing the indicator through the same custom properties a slide transitions, `pointerup` choosing the destination, and `pointercancel`, `lostpointercapture` or Escape cancelling; the `click` that follows a taken drag is swallowed, `aria-current` is written only on the release, a destination that is a link is not draggable as a link (`draggable=\"false\"`, the one behaviour of a link the bar takes, NVB-30) and is followed with its own `click()` when a release chooses it, the indicator then returning to the destination `value` selects (NVB-28), and `touch-action: pan-y` leaves vertical drags to the page. The bottom inset is `env(safe-area-inset-bottom)`. It does not yet follow NVB-30 to NVB-33, nor the parts of NVB-1, NVB-19 and NVB-28 that concern links: a pressed link destination is selected like a button, `change` is not cancelable and carries no `href`, and the destination writes the link rules itself instead of using the shared link primitive (`packages/web/src/primitives/link.ts`).","items":{"destination":{"name":"tanrei-navigation-bar-item","props":{"value":"value","href":"href","target":"target","targetLabel":"targetLabel","label":"label","icon":"icon","disabled":"disabled","badge":"badge","badgeCount":"badgeCount","badgeLabel":"badgeLabel"},"notes":"`icon` is the glyph's name, as `<tanrei-tab>`'s, and `data-mirror` (`auto`, the default; `always`; `never`) on the item is the product's word on mirroring it, in both of its copies (NVB-25), as on a glyph the product places itself. `badgeCount` and `badgeLabel` are the `badge-count` and `badge-label` attributes; the element draws a `<tanrei-badge>` around the glyph from them. `href` is the spec's own prop: the cell is an `<a href>` in the item's shadow root. `target` is the `target` attribute with the values `same` and `new` (the HTML spellings `_self` and `_blank` are read as those two), `targetLabel` the `target-label` attribute, and `rel` (to which `new` adds `noopener`) and `download` are web-only and forwarded to the anchor, all as `<tanrei-button>`'s. Space is not handled on it. With no `value` attribute the item's `value` property reads its `href` attribute as written (not the resolved URL)."}}},"swiftui":{"status":"lagging","name":"TanreiNavigationBar","props":{"value":"selection","variant":"variant","labelVisibility":"labelVisibility","label":"accessibilityLabel"},"events":{"change":"selection","reselect":"onReselect"},"notes":"`TanreiNavigationBar(selection: Binding<Value>, variant:, labelVisibility:, onReselect:) { TanreiNavigationBarItem(…) … }`, placed with `.safeAreaInset(edge: .bottom)`. A bar of its own rather than a restyled `TabView`, whose bar the tokens cannot reach (indicator, geometry, colors). Activation writes the binding (change); activating the selected item calls `onReselect`. The bar is exposed as a tab bar and each item as a button with the selected trait; each item supports the large-content viewer. It lags the spec: it has no `variant`, and draws the active indicator behind the icon alone (the item container at its least size), growing in from its center instead of sliding, with the label outside it. Not built on this platform yet: the item container as wide as the destination's cell and held in by `container.padding`, hover, focus and press drawn in that box, and the drag of the active indicator (NVB-27 to NVB-29): a `DragGesture(minimumDistance:)` beside each item's tap, `predictedEndTranslation` for the fling, the binding written in `onEnded`. Link destinations are not built yet either (NVB-30 to NVB-33 and the parts of NVB-1, NVB-19 and NVB-28 that concern links, with the fixtures links, links-rtl and links-disabled).","items":{"destination":{"name":"TanreiNavigationBarItem","props":{"value":"value","href":"destination","target":"target","targetLabel":"targetLabel","label":"title","icon":"icon","disabled":"disabled","badge":"badge","badgeCount":"count","badgeLabel":"label"},"notes":"`TanreiNavigationBarItem(_ title: String, icon: String, value: Value, badge: TanreiNavigationBadge? = nil)`, where `icon` is the glyph's name and `TanreiNavigationBadge(count: Int? = nil, label: String = \"\")` is drawn with `.tanreiBadge(…)` on the glyph (no badge is `nil`). `disabled` follows `.disabled(_:)` on the item. `destination: URL? = nil` makes it a link (the link trait beside the item's selected trait), opened by the environment's `openURL` after the selection callback, which an app that routes addresses itself answers with its own `OpenURLAction`; the binding is not written for it. `target: TanreiLinkTarget = .same` and `targetLabel` (the accessibility hint), as the Button's."}}},"compose":{"status":"lagging","name":"TanreiNavigationBar","props":{"value":"selected","variant":"variant","labelVisibility":"labelVisibility","label":"contentDescription"},"events":{"change":"onClick","reselect":"onClick"},"notes":"Compose idiom (as `NavigationBar`): `TanreiNavigationBar(variant, labelVisibility, contentDescription) { TanreiNavigationBarItem(…) … }`. There is no bar-level value: the caller marks the selected item with `selected = (current == value)`, so the bar's `value` and a destination's `value` both map to the item's `selected`, and one `onClick` per item covers change and reselect (the caller knows which item is selected). The bar draws the sliding active indicator behind its items, from the bounds of the selected item. Insets follow `WindowInsets.navigationBars` plus the horizontal display cutout, as a `windowInsets` parameter. Items have `Role.Tab` in a `selectableGroup()`. It lags the spec: it has no `variant`, and draws the active indicator behind the icon alone (the item container at its least size), growing in from its center instead of sliding, with the label outside it. Not built on this platform yet: the item container as wide as the destination's cell and held in by `container.padding`, hover, focus and press drawn in that box, and the drag of the active indicator (NVB-27 to NVB-29): `pointerInput` with `detectHorizontalDragGestures` on the bar and a `VelocityTracker` for the fling; the release calls the chosen item's `onClick`. Link destinations are not built yet either (NVB-30 to NVB-33 and the parts of NVB-1, NVB-19 and NVB-28 that concern links, with the fixtures links, links-rtl and links-disabled).","items":{"destination":{"name":"TanreiNavigationBarItem","props":{"value":"selected","href":"href","target":"target","targetLabel":"targetLabel","label":"label","icon":"icon","disabled":"enabled","badge":"badge","badgeCount":"count","badgeLabel":"contentDescription"},"notes":"`TanreiNavigationBarItem(selected, onClick, icon = \"inbox\", label = \"…\", enabled = true, badge = null)` in the bar's `RowScope` content lambda. `enabled` is the inverse flag. `badge: TanreiNavigationBadge?` with `TanreiNavigationBadge(count: Int? = null, contentDescription: String = \"\")`; the item draws a `TanreiBadge` around its icon from it. `icon` is the glyph's name; the item draws it in the selection's icon style. `href: String? = null` makes it a link: opened through `LocalUriHandler.current` after `onClick` (an app that routes addresses itself provides its own `UriHandler`); the item keeps `Role.Tab`, which Compose cannot join with a link role. `target: TanreiLinkTarget = TanreiLinkTarget.Same`, and `targetLabel` is appended to the state description, as the Button's."}}},"flutter":{"status":"lagging","name":"TanreiNavigationBar","props":{"value":"selectedIndex","variant":"variant","labelVisibility":"labelBehavior","label":"semanticLabel"},"events":{"change":"onDestinationSelected","reselect":"onDestinationSelected"},"notes":"Flutter idiom (as `NavigationBar`): `TanreiNavigationBar(selectedIndex:, onDestinationSelected:, variant:, labelBehavior:, destinations: [TanreiNavigationDestination(…), …])`. A destination's value is its index in `destinations`; a `selectedIndex` of null selects none. `onDestinationSelected` is called for the selected destination too (reselect); the caller compares. `variant` is `TanreiNavigationBarVariant.tonal` or `.filled`; `labelBehavior` is `alwaysShow`, `onlyShowSelected` or `alwaysHide`. Bottom inset from `MediaQuery.padding` via `SafeArea`. It lags the spec: it has no `variant`, and draws the active indicator behind the icon alone (the item container at its least size), growing in from its center instead of sliding, with the label outside it. Not built on this platform yet: the item container as wide as the destination's cell and held in by `container.padding`, hover, focus and press drawn in that box, and the drag of the active indicator (NVB-27 to NVB-29): a `GestureDetector`'s horizontal drag callbacks on the bar, `DragEndDetails.primaryVelocity` for the fling; the release calls `onDestinationSelected`. Link destinations are not built yet either (NVB-30 to NVB-33 and the parts of NVB-1, NVB-19 and NVB-28 that concern links, with the fixtures links, links-rtl and links-disabled).","items":{"destination":{"name":"TanreiNavigationDestination","props":{"value":"destinations","href":"href","target":"target","targetLabel":"targetSemanticLabel","label":"label","icon":"icon","disabled":"enabled","badge":"badge","badgeCount":"count","badgeLabel":"semanticLabel"},"notes":"`TanreiNavigationDestination(icon:, label:, enabled: true, badge: null)` in the bar's `destinations:` list; its value is its index there. `icon` is the glyph's name. `badge: TanreiNavigationBadge(count:, semanticLabel:)`, drawn as a `TanreiBadge` around the icon. `enabled: false` disables it. `href: Uri? = null` makes it a link (`Semantics(link: true)` with the address as its `linkUrl`, beside the tab semantics), opened by the nearest `TanreiLinkOpener` after `onDestinationSelected`; `target` is a `TanreiLinkTarget` and `targetSemanticLabel` the semantics hint, as the Button's."}}},"react-native":{"status":"lagging","name":"NavigationBar","props":{"value":"value","variant":"variant","labelVisibility":"labelVisibility","label":"accessibilityLabel"},"events":{"change":"onValueChange","reselect":"onReselect"},"notes":"Controlled, in React Native's `value` / `onValueChange` idiom, with a `destinations` data array; `variant` is `'tonal'` or `'filled'`. The bar has the `tablist` role and each destination the `tab` role with `accessibilityState.selected`; the covered copy is hidden with `importantForAccessibility=\"no-hide-descendants\"` and `accessibilityElementsHidden`. Insets come from the bar's own `insets` prop, side by side, falling back to `TanreiProvider`'s `insets`; the package takes no safe-area dependency, and a product that uses `react-native-safe-area-context` passes its `useSafeAreaInsets()` to either. It lags the spec: it has no `variant`, and draws the active indicator behind the icon alone (the item container at its least size), growing in from its center instead of sliding, with the label outside it. Not built on this platform yet: the item container as wide as the destination's cell and held in by `container.padding`, hover, focus and press drawn in that box, and the drag of the active indicator (NVB-27 to NVB-29): a `PanResponder` on the bar (or React Native Gesture Handler's `Gesture.Pan()` where the product has it), the release's `vx` for the fling; the release calls `onValueChange`. Link destinations are not built yet either (NVB-30 to NVB-33 and the parts of NVB-1, NVB-19 and NVB-28 that concern links, with the fixtures links, links-rtl and links-disabled).","items":{"destination":{"name":"NavigationBarDestination","props":{"value":"value","href":"href","target":"target","targetLabel":"targetLabel","label":"label","icon":"icon","disabled":"disabled","badge":"badge","badgeCount":"count","badgeLabel":"label"},"notes":"An entry of `destinations: NavigationBarDestination[]`: `{ value, label, icon, disabled?, badge? }`, where `icon` is the glyph's name and `badge?: { count?: number | null; label?: string }` (absent is no badge) is drawn as a `Badge` around the icon. `href?: string` makes it a link: the destination keeps the `tab` role (React Native gives an element one role), `onValueChange` receives the value and the href, and `Linking.openURL(href)` follows it unless the product handles it; `target` is `\"same\" | \"new\"` and `targetLabel` the `accessibilityHint`, as the Button's."}}}}}