@motifx-community/ui 0.1.0-beta.7 → 0.1.0-beta.9

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 (595) hide show
  1. package/CHANGELOG.md +310 -0
  2. package/dist/components/accordion/Accordion.d.ts +3 -0
  3. package/dist/components/accordion/AccordionItem.d.ts +9 -7
  4. package/dist/components/appbar/AppBar.d.ts +9 -3
  5. package/dist/components/appbar/app-bar-props.d.ts +2 -2
  6. package/dist/components/appmenu/AppMenu.d.ts +204 -0
  7. package/dist/components/appmenu/app-menu-item-click-event-args.d.ts +11 -0
  8. package/dist/components/appmenu/app-menu-item.d.ts +46 -0
  9. package/dist/components/appmenu/app-menu-items-changed-event-args.d.ts +7 -0
  10. package/dist/components/appmenu/app-menu-props.d.ts +38 -0
  11. package/dist/components/appmenu/app-menu-search-text-changed-event-args.d.ts +5 -0
  12. package/dist/components/appmenu/app-menu-selecting-event-args.d.ts +5 -0
  13. package/dist/components/appmenu/app-menu-selection-changed-event-args.d.ts +13 -0
  14. package/dist/components/appmenu/index.d.ts +8 -0
  15. package/dist/components/avatar/Avatar.d.ts +2 -0
  16. package/dist/components/avatar/AvatarGroup.d.ts +18 -2
  17. package/dist/components/badge/Badge.d.ts +4 -1
  18. package/dist/components/barcode/Barcode.d.ts +7 -1
  19. package/dist/components/bargauge/BarGauge.d.ts +35 -22
  20. package/dist/components/bottomnavigation/BottomNavigation.d.ts +44 -12
  21. package/dist/components/bottomnavigation/bottom-navigation-item.d.ts +1 -1
  22. package/dist/components/bottomnavigation/bottom-navigation-props.d.ts +2 -2
  23. package/dist/components/breadcrumb/Breadcrumb.d.ts +12 -8
  24. package/dist/components/button/Button.d.ts +24 -3
  25. package/dist/components/button/button-props.d.ts +1 -0
  26. package/dist/components/button/menu-item-of.d.ts +4 -0
  27. package/dist/components/buttongroup/ButtonGroup.d.ts +2 -1
  28. package/dist/components/calendar/Calendar.d.ts +11 -3
  29. package/dist/components/calendar/calendar-props.d.ts +2 -0
  30. package/dist/components/card/Card.d.ts +10 -0
  31. package/dist/components/card/card-props.d.ts +1 -1
  32. package/dist/components/chart/Chart.d.ts +30 -17
  33. package/dist/components/chart/ChartLegend.d.ts +10 -7
  34. package/dist/components/chart/ChartPlot.d.ts +40 -31
  35. package/dist/components/chart/ChartTable.d.ts +0 -1
  36. package/dist/components/chart/ChartTooltip.d.ts +23 -4
  37. package/dist/components/chart/PartsPlot.d.ts +19 -7
  38. package/dist/components/chart/RadarPlot.d.ts +23 -9
  39. package/dist/components/chart/chart-export.d.ts +3 -3
  40. package/dist/components/chart/chart-look.d.ts +7 -5
  41. package/dist/components/chart/chart-tooltip-options.d.ts +3 -2
  42. package/dist/components/chart/plot-room.d.ts +9 -0
  43. package/dist/components/chart/plot-view.d.ts +12 -2
  44. package/dist/components/chart/text-parts.d.ts +12 -0
  45. package/dist/components/checkbox/ToggleField.d.ts +6 -4
  46. package/dist/components/chip/Chip.d.ts +16 -7
  47. package/dist/components/chip/ChipGroup.d.ts +14 -1
  48. package/dist/components/chip/chip-props.d.ts +1 -1
  49. package/dist/components/colorbox/ColorBox.d.ts +5 -3
  50. package/dist/components/colorpicker/ColorPicker.d.ts +3 -0
  51. package/dist/components/combobox/ComboBox.d.ts +8 -4
  52. package/dist/components/combobox/combo-box-props.d.ts +2 -2
  53. package/dist/components/contextmenu/ContextMenu.d.ts +26 -15
  54. package/dist/components/contextmenu/attach-context-menu.d.ts +3 -3
  55. package/dist/components/contextmenu/context-menu-opening-event-args.d.ts +8 -4
  56. package/dist/components/contextmenu/context-menu-props.d.ts +2 -2
  57. package/dist/components/contextmenu/context-menu-target.d.ts +2 -2
  58. package/dist/components/datagrid/DataGrid.d.ts +104 -31
  59. package/dist/components/datagrid/filter-editor-context.d.ts +22 -0
  60. package/dist/components/datagrid/grid-action.d.ts +2 -2
  61. package/dist/components/datagrid/grid-cell-click-event-args.d.ts +3 -3
  62. package/dist/components/datagrid/grid-cell-prepared-event-args.d.ts +6 -4
  63. package/dist/components/datagrid/grid-column.d.ts +10 -2
  64. package/dist/components/datagrid/grid-editor-prepared-event-args.d.ts +2 -2
  65. package/dist/components/datagrid/grid-lookup.d.ts +1 -1
  66. package/dist/components/datagrid/grid-master-detail.d.ts +1 -1
  67. package/dist/components/datagrid/grid-row-click-event-args.d.ts +3 -3
  68. package/dist/components/datagrid/grid-row-drag-event-args.d.ts +3 -2
  69. package/dist/components/datagrid/grid-row-dragging.d.ts +8 -8
  70. package/dist/components/datagrid/grid-row-prepared-event-args.d.ts +4 -2
  71. package/dist/components/datagrid/grid-visible-row.d.ts +3 -1
  72. package/dist/components/datagrid/index.d.ts +1 -0
  73. package/dist/components/datagrid/model/CellFormatter.d.ts +8 -1
  74. package/dist/components/datagrid/model/ChoiceListAdapter.d.ts +23 -0
  75. package/dist/components/datagrid/model/GridExport.d.ts +1 -1
  76. package/dist/components/datagrid/model/GridModel.d.ts +3 -0
  77. package/dist/components/datagrid/model/ListChoices.d.ts +28 -0
  78. package/dist/components/datagrid/model/row-dragging-values.d.ts +3 -2
  79. package/dist/components/datagrid/view/ActionWidths.d.ts +16 -4
  80. package/dist/components/datagrid/view/BandRows.d.ts +12 -14
  81. package/dist/components/datagrid/view/CellEditor.d.ts +3 -5
  82. package/dist/components/datagrid/view/CellTip.d.ts +20 -8
  83. package/dist/components/datagrid/view/ColumnMenu.d.ts +4 -2
  84. package/dist/components/datagrid/view/ColumnStyles.d.ts +3 -2
  85. package/dist/components/datagrid/view/DetailRow.d.ts +9 -4
  86. package/dist/components/datagrid/view/DragSelect.d.ts +19 -7
  87. package/dist/components/datagrid/view/EditForm.d.ts +4 -0
  88. package/dist/components/datagrid/view/FilterCell.d.ts +30 -7
  89. package/dist/components/datagrid/view/FilterPanel.d.ts +1 -1
  90. package/dist/components/datagrid/view/FilterRow.d.ts +10 -6
  91. package/dist/components/datagrid/view/GridBody.d.ts +87 -43
  92. package/dist/components/datagrid/view/GridPager.d.ts +8 -1
  93. package/dist/components/datagrid/view/GridRow.d.ts +32 -17
  94. package/dist/components/datagrid/view/GridToolbar.d.ts +6 -5
  95. package/dist/components/datagrid/view/GroupFooterRow.d.ts +7 -1
  96. package/dist/components/datagrid/view/GroupPanel.d.ts +26 -8
  97. package/dist/components/datagrid/view/GroupRow.d.ts +17 -10
  98. package/dist/components/datagrid/view/HeaderFilter.d.ts +2 -1
  99. package/dist/components/datagrid/view/HeaderRow.d.ts +18 -3
  100. package/dist/components/datagrid/view/MenuPopup.d.ts +3 -2
  101. package/dist/components/datagrid/view/RowActions.d.ts +13 -5
  102. package/dist/components/datagrid/view/RowDrag.d.ts +24 -10
  103. package/dist/components/datagrid/view/TotalRow.d.ts +4 -2
  104. package/dist/components/datagrid/view/action-button.d.ts +11 -5
  105. package/dist/components/datagrid/view/cell-tip-target.d.ts +11 -0
  106. package/dist/components/datagrid/view/check-mark.d.ts +4 -3
  107. package/dist/components/datagrid/view/column-fit.d.ts +9 -0
  108. package/dist/components/datagrid/view/drag-handle.d.ts +3 -2
  109. package/dist/components/datagrid/view/drag-select-host.d.ts +5 -5
  110. package/dist/components/datagrid/view/expand-button.d.ts +4 -3
  111. package/dist/components/datagrid/view/group-drop.d.ts +7 -0
  112. package/dist/components/datagrid/view/group-panel-host.d.ts +7 -4
  113. package/dist/components/datagrid/view/header-host.d.ts +3 -2
  114. package/dist/components/datagrid/view/row-drag-host.d.ts +5 -3
  115. package/dist/components/datagrid/view/summary-cell.d.ts +5 -3
  116. package/dist/components/datagrid/view/toolbar-host.d.ts +3 -2
  117. package/dist/components/datebox/DateBox.d.ts +5 -3
  118. package/dist/components/daterangebox/DateRangeBox.d.ts +12 -9
  119. package/dist/components/draggable/Draggable.d.ts +24 -11
  120. package/dist/components/draggable/draggable-props.d.ts +3 -3
  121. package/dist/components/drawer/Drawer.d.ts +18 -10
  122. package/dist/components/drawer/drawer-props.d.ts +2 -2
  123. package/dist/components/dropdown/DropDown.d.ts +12 -3
  124. package/dist/components/dropdown/drop-down-props.d.ts +3 -3
  125. package/dist/components/fileuploader/FileUploader.d.ts +9 -6
  126. package/dist/components/filterbuilder/FilterBuilder.d.ts +42 -13
  127. package/dist/components/form/MxForm.d.ts +33 -12
  128. package/dist/components/form/form-props.d.ts +1 -1
  129. package/dist/components/form/message-box-options.d.ts +1 -1
  130. package/dist/components/formlayout/FormLayout.d.ts +26 -5
  131. package/dist/components/gallery/Gallery.d.ts +30 -17
  132. package/dist/components/gauge/Gauge.d.ts +51 -37
  133. package/dist/components/layout/ChildSettings.d.ts +2 -2
  134. package/dist/components/layout/GroupBox.d.ts +7 -5
  135. package/dist/components/layout/Panel.d.ts +1 -0
  136. package/dist/components/layout/SplitContainer.d.ts +8 -8
  137. package/dist/components/layout/set-padding.d.ts +2 -1
  138. package/dist/components/layout/set-space.d.ts +2 -1
  139. package/dist/components/listbox/ListBox.d.ts +7 -5
  140. package/dist/components/listbox/item-template.d.ts +7 -2
  141. package/dist/components/loadpanel/LoadPanel.d.ts +7 -3
  142. package/dist/components/loadpanel/load-panel-props.d.ts +1 -1
  143. package/dist/components/loadpanel/load-panel-target.d.ts +2 -2
  144. package/dist/components/lookup/Lookup.d.ts +1 -1
  145. package/dist/components/menubar/MenuBar.d.ts +115 -5
  146. package/dist/components/menubar/index.d.ts +7 -0
  147. package/dist/components/menubar/menu-bar-added-item.d.ts +11 -0
  148. package/dist/components/menubar/menu-bar-custom-menu-opening-event-args.d.ts +19 -0
  149. package/dist/components/menubar/menu-bar-customization.d.ts +18 -0
  150. package/dist/components/menubar/menu-bar-customized-event-args.d.ts +7 -0
  151. package/dist/components/menubar/menu-bar-items-changed-event-args.d.ts +7 -0
  152. package/dist/components/menubar/menu-bar-merge-when.d.ts +5 -0
  153. package/dist/components/menubar/menu-bar-merged-event-args.d.ts +7 -0
  154. package/dist/components/menubar/menu-bar-props.d.ts +43 -1
  155. package/dist/components/menubar/menu-merge.d.ts +10 -0
  156. package/dist/components/menubar/menu-node.d.ts +4 -0
  157. package/dist/components/menubar/merge-hosts.d.ts +9 -0
  158. package/dist/components/menubar/merged-item.d.ts +18 -0
  159. package/dist/components/numberbox/NumberBox.d.ts +13 -4
  160. package/dist/components/numberbox/number-box-props.d.ts +1 -1
  161. package/dist/components/otpinput/OtpInput.d.ts +19 -8
  162. package/dist/components/pagination/Pagination.d.ts +9 -4
  163. package/dist/components/popover/Popover.d.ts +24 -7
  164. package/dist/components/popover/popover-props.d.ts +1 -1
  165. package/dist/components/progress/ProgressBar.d.ts +1 -0
  166. package/dist/components/progress/ProgressWave.d.ts +13 -12
  167. package/dist/components/progress/Spinner.d.ts +5 -5
  168. package/dist/components/progress/progress-bar-props.d.ts +1 -1
  169. package/dist/components/qrcode/QRCode.d.ts +5 -1
  170. package/dist/components/radiogroup/RadioGroup.d.ts +8 -6
  171. package/dist/components/rating/Rating.d.ts +2 -2
  172. package/dist/components/resizable/Resizable.d.ts +19 -17
  173. package/dist/components/resizable/resizable-props.d.ts +3 -3
  174. package/dist/components/resizable/resize-start.d.ts +11 -0
  175. package/dist/components/ribbonmenu/RibbonGallery.d.ts +32 -0
  176. package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +61 -0
  177. package/dist/components/ribbonmenu/RibbonMenu.d.ts +419 -0
  178. package/dist/components/ribbonmenu/index.d.ts +22 -0
  179. package/dist/components/ribbonmenu/ribbon-app-button-event-args.d.ts +8 -0
  180. package/dist/components/ribbonmenu/ribbon-command-click-event-args.d.ts +15 -0
  181. package/dist/components/ribbonmenu/ribbon-command-size.d.ts +2 -0
  182. package/dist/components/ribbonmenu/ribbon-command-type.d.ts +7 -0
  183. package/dist/components/ribbonmenu/ribbon-command.d.ts +63 -0
  184. package/dist/components/ribbonmenu/ribbon-gallery-item.d.ts +18 -0
  185. package/dist/components/ribbonmenu/ribbon-group-more-event-args.d.ts +12 -0
  186. package/dist/components/ribbonmenu/ribbon-group.d.ts +31 -0
  187. package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +22 -0
  188. package/dist/components/ribbonmenu/ribbon-menu-customization.d.ts +18 -0
  189. package/dist/components/ribbonmenu/ribbon-menu-customized-event-args.d.ts +7 -0
  190. package/dist/components/ribbonmenu/ribbon-menu-display-changed-event-args.d.ts +8 -0
  191. package/dist/components/ribbonmenu/ribbon-menu-display.d.ts +5 -0
  192. package/dist/components/ribbonmenu/ribbon-menu-items-changed-event-args.d.ts +7 -0
  193. package/dist/components/ribbonmenu/ribbon-menu-layout-changed-event-args.d.ts +8 -0
  194. package/dist/components/ribbonmenu/ribbon-menu-layout.d.ts +2 -0
  195. package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +79 -0
  196. package/dist/components/ribbonmenu/ribbon-quick-bar-position.d.ts +2 -0
  197. package/dist/components/ribbonmenu/ribbon-tab-selecting-event-args.d.ts +5 -0
  198. package/dist/components/ribbonmenu/ribbon-tab-selection-changed-event-args.d.ts +10 -0
  199. package/dist/components/ribbonmenu/ribbon-tab.d.ts +24 -0
  200. package/dist/components/scheduler/AppointmentEditor.d.ts +16 -7
  201. package/dist/components/scheduler/Scheduler.d.ts +23 -9
  202. package/dist/components/scheduler/view/AgendaView.d.ts +7 -2
  203. package/dist/components/scheduler/view/AppointmentDrag.d.ts +26 -3
  204. package/dist/components/scheduler/view/CellAttributes.d.ts +1 -0
  205. package/dist/components/scheduler/view/CellWriter.d.ts +6 -3
  206. package/dist/components/scheduler/view/KeyedParts.d.ts +2 -0
  207. package/dist/components/scheduler/view/MonthView.d.ts +18 -7
  208. package/dist/components/scheduler/view/SchedulerTouch.d.ts +8 -2
  209. package/dist/components/scheduler/view/TimeView.d.ts +23 -11
  210. package/dist/components/scheduler/view/TimelineLine.d.ts +19 -2
  211. package/dist/components/scheduler/view/TimelineView.d.ts +27 -16
  212. package/dist/components/scheduler/view/scheduler-host.d.ts +4 -4
  213. package/dist/components/scheduler/view/shown-view.d.ts +11 -0
  214. package/dist/components/scheduler/view/touch-host.d.ts +6 -2
  215. package/dist/components/scrollview/ScrollView.d.ts +27 -8
  216. package/dist/components/sheet/BottomSheet.d.ts +13 -6
  217. package/dist/components/shortcuteditor/ShortcutEditor.d.ts +82 -0
  218. package/dist/components/shortcuteditor/index.d.ts +3 -0
  219. package/dist/components/shortcuteditor/shortcut-editor-keys-changed-event-args.d.ts +9 -0
  220. package/dist/components/shortcuteditor/shortcut-editor-props.d.ts +21 -0
  221. package/dist/components/signature/Signature.d.ts +18 -13
  222. package/dist/components/slider/Slider.d.ts +7 -6
  223. package/dist/components/slider/slider-props.d.ts +1 -1
  224. package/dist/components/sortable/Sortable.d.ts +24 -12
  225. package/dist/components/sortable/sortable-props.d.ts +1 -1
  226. package/dist/components/sparkline/Sparkline.d.ts +17 -19
  227. package/dist/components/speeddial/SpeedDial.d.ts +8 -2
  228. package/dist/components/speeddial/speed-dial-action.d.ts +1 -1
  229. package/dist/components/splitter/SplitPane.d.ts +3 -0
  230. package/dist/components/splitter/Splitter.d.ts +11 -5
  231. package/dist/components/stepper/Stepper.d.ts +30 -12
  232. package/dist/components/tabdocs/AutoHideStrip.d.ts +10 -4
  233. package/dist/components/tabdocs/DockGuides.d.ts +6 -4
  234. package/dist/components/tabdocs/DocumentList.d.ts +19 -7
  235. package/dist/components/tabdocs/DocumentTab.d.ts +12 -9
  236. package/dist/components/tabdocs/DropMarks.d.ts +8 -3
  237. package/dist/components/tabdocs/MoveByKeys.d.ts +2 -1
  238. package/dist/components/tabdocs/PhoneBar.d.ts +2 -1
  239. package/dist/components/tabdocs/PhoneList.d.ts +14 -4
  240. package/dist/components/tabdocs/PhoneTools.d.ts +8 -1
  241. package/dist/components/tabdocs/SplitSash.d.ts +3 -5
  242. package/dist/components/tabdocs/TabBrowserWindow.d.ts +3 -2
  243. package/dist/components/tabdocs/TabDockArea.d.ts +5 -2
  244. package/dist/components/tabdocs/TabDocumentManager.d.ts +51 -25
  245. package/dist/components/tabdocs/TabDrag.d.ts +27 -12
  246. package/dist/components/tabdocs/TabGroup.d.ts +30 -16
  247. package/dist/components/tabdocs/TabMenus.d.ts +11 -4
  248. package/dist/components/tabdocs/TabPresenter.d.ts +21 -5
  249. package/dist/components/tabdocs/TabSplit.d.ts +10 -4
  250. package/dist/components/tabdocs/TabWindow.d.ts +7 -4
  251. package/dist/components/tabdocs/item-part.d.ts +4 -0
  252. package/dist/components/tabdocs/layout-item.d.ts +4 -1
  253. package/dist/components/tabdocs/place-node.d.ts +11 -4
  254. package/dist/components/tabdocs/strip-room.d.ts +13 -0
  255. package/dist/components/tabdocs/tab-header.d.ts +3 -0
  256. package/dist/components/tabs/PanelContent.d.ts +1 -1
  257. package/dist/components/tabs/Tab.d.ts +4 -4
  258. package/dist/components/tabs/Tabs.d.ts +11 -6
  259. package/dist/components/tagbox/TagBox.d.ts +24 -6
  260. package/dist/components/textarea/TextArea.d.ts +9 -5
  261. package/dist/components/textbox/TextBox.d.ts +13 -4
  262. package/dist/components/tileview/TileView.d.ts +15 -5
  263. package/dist/components/timeline/Timeline.d.ts +11 -0
  264. package/dist/components/toast/Toaster.d.ts +9 -2
  265. package/dist/components/toolbar/Toolbar.d.ts +18 -5
  266. package/dist/components/toolbar/toolbar-item.d.ts +5 -0
  267. package/dist/components/tooltip/Tooltip.d.ts +10 -2
  268. package/dist/components/tooltip/add-tooltip.d.ts +3 -3
  269. package/dist/components/tooltip/tooltip-hub.d.ts +5 -3
  270. package/dist/components/tooltip/tooltip-props.d.ts +1 -1
  271. package/dist/components/tooltip/tooltip-target.d.ts +2 -2
  272. package/dist/components/treeview/TreeView.d.ts +34 -9
  273. package/dist/components/treeview/tree-row-parts.d.ts +13 -0
  274. package/dist/components/treeview/tree-view-item-template.d.ts +7 -2
  275. package/dist/components/treeview/tree-view-props.d.ts +1 -1
  276. package/dist/components/validationsummary/ValidationSummary.d.ts +1 -1
  277. package/dist/core/access-key-entry.d.ts +10 -0
  278. package/dist/core/access-key.d.ts +24 -12
  279. package/dist/core/chord.d.ts +9 -0
  280. package/dist/core/command-fields.d.ts +17 -0
  281. package/dist/core/command-registry.d.ts +37 -0
  282. package/dist/core/command-run-event-args.d.ts +11 -0
  283. package/dist/core/command.d.ts +41 -0
  284. package/dist/core/commands-changed-event-args.d.ts +4 -0
  285. package/dist/core/component-tree.d.ts +10 -0
  286. package/dist/core/container.d.ts +8 -5
  287. package/dist/core/control.d.ts +44 -15
  288. package/dist/core/cover-record.d.ts +9 -0
  289. package/dist/core/cover.d.ts +11 -0
  290. package/dist/core/draw-parts.d.ts +12 -20
  291. package/dist/core/flow-home.d.ts +7 -4
  292. package/dist/core/focus-mark.d.ts +8 -0
  293. package/dist/core/focus.d.ts +109 -10
  294. package/dist/core/glyphs.d.ts +42 -40
  295. package/dist/core/icon-source.d.ts +15 -2
  296. package/dist/core/key-windows.d.ts +8 -0
  297. package/dist/core/keyboard.d.ts +25 -30
  298. package/dist/core/keymap-changed-event-args.d.ts +7 -0
  299. package/dist/core/keymap.d.ts +6 -0
  300. package/dist/core/language-look.d.ts +20 -7
  301. package/dist/core/live-controls.d.ts +12 -0
  302. package/dist/core/look-watch.d.ts +4 -1
  303. package/dist/core/measure/box.d.ts +21 -0
  304. package/dist/core/measure/element-of.d.ts +12 -0
  305. package/dist/core/measure/every-frame.d.ts +8 -0
  306. package/dist/core/measure/hit-cover.d.ts +8 -0
  307. package/dist/core/measure/hit-options.d.ts +12 -0
  308. package/dist/core/measure/hits.d.ts +18 -0
  309. package/dist/core/measure/index.d.ts +27 -0
  310. package/dist/core/measure/job.d.ts +9 -0
  311. package/dist/core/measure/layout-change.d.ts +2 -0
  312. package/dist/core/measure/layout-options.d.ts +11 -0
  313. package/dist/core/measure/lengths.d.ts +13 -0
  314. package/dist/core/measure/look.d.ts +11 -0
  315. package/dist/core/measure/loop.d.ts +10 -0
  316. package/dist/core/measure/media.d.ts +8 -0
  317. package/dist/core/measure/motion.d.ts +10 -0
  318. package/dist/core/measure/observers.d.ts +13 -0
  319. package/dist/core/measure/on-layout.d.ts +23 -0
  320. package/dist/core/measure/page-events.d.ts +6 -0
  321. package/dist/core/measure/page.d.ts +11 -0
  322. package/dist/core/measure/pending-scroll.d.ts +9 -0
  323. package/dist/core/measure/pending-scrolls.d.ts +7 -0
  324. package/dist/core/measure/point.d.ts +5 -0
  325. package/dist/core/measure/probe-set.d.ts +35 -0
  326. package/dist/core/measure/read.d.ts +54 -0
  327. package/dist/core/measure/rect.d.ts +9 -0
  328. package/dist/core/measure/reveal-options.d.ts +20 -0
  329. package/dist/core/measure/reveal-range.d.ts +7 -0
  330. package/dist/core/measure/round-reads.d.ts +14 -0
  331. package/dist/core/measure/rounds.d.ts +36 -0
  332. package/dist/core/measure/scroll-motion.d.ts +5 -0
  333. package/dist/core/measure/scroll-place.d.ts +5 -0
  334. package/dist/core/measure/scroll.d.ts +41 -0
  335. package/dist/core/measure/size-box.d.ts +2 -0
  336. package/dist/core/measure/size.d.ts +5 -0
  337. package/dist/core/measure/text-probes.d.ts +19 -0
  338. package/dist/core/measure/text-widths.d.ts +14 -0
  339. package/dist/core/measure/view.d.ts +2 -0
  340. package/dist/core/measure/viewport-rect.d.ts +10 -0
  341. package/dist/core/measure/viewport.d.ts +12 -0
  342. package/dist/core/measure/watch.d.ts +35 -0
  343. package/dist/core/measure/watcher.d.ts +41 -0
  344. package/dist/core/measure/window-bound.d.ts +11 -0
  345. package/dist/core/measure/window-frame.d.ts +25 -0
  346. package/dist/core/order-controls.d.ts +7 -0
  347. package/dist/core/page-documents.d.ts +13 -0
  348. package/dist/core/page-layer.d.ts +18 -0
  349. package/dist/core/parsed-access-key.d.ts +9 -0
  350. package/dist/core/part-writes.d.ts +25 -0
  351. package/dist/core/press-origin.d.ts +3 -0
  352. package/dist/core/shortcut-conflict.d.ts +12 -0
  353. package/dist/core/shortcut-handler.d.ts +2 -0
  354. package/dist/core/shortcut-info.d.ts +19 -0
  355. package/dist/core/shortcut-options.d.ts +33 -0
  356. package/dist/core/shortcut-registration.d.ts +21 -0
  357. package/dist/core/shortcut-registry.d.ts +46 -0
  358. package/dist/core/shortcut-text.d.ts +2 -0
  359. package/dist/core/show-icon.d.ts +7 -0
  360. package/dist/core/stacked-window.d.ts +9 -0
  361. package/dist/core/ui-locale.d.ts +2 -2
  362. package/dist/core/ui-strings.d.ts +128 -0
  363. package/dist/core/window-events.d.ts +14 -0
  364. package/dist/core/window-stack.d.ts +11 -11
  365. package/dist/generated/tokens.d.ts +1391 -11
  366. package/dist/index.d.ts +16 -1
  367. package/dist/index.js +35219 -22569
  368. package/dist/index.js.map +1 -1
  369. package/dist/locales/en.json +121 -2
  370. package/dist/locales/tr.json +121 -2
  371. package/dist/parts/chart/chart-text.d.ts +29 -5
  372. package/dist/parts/chart/svg-parts.d.ts +11 -7
  373. package/dist/parts/chart/value-motion.d.ts +3 -2
  374. package/dist/parts/code/code-image.d.ts +6 -9
  375. package/dist/parts/customizer/Customizer.d.ts +64 -0
  376. package/dist/parts/customizer/NameForm.d.ts +10 -0
  377. package/dist/parts/customizer/customizer-command.d.ts +5 -0
  378. package/dist/parts/customizer/customizer-names.d.ts +9 -0
  379. package/dist/parts/customizer/customizer-node.d.ts +15 -0
  380. package/dist/parts/customizer/customizer-source.d.ts +27 -0
  381. package/dist/parts/data/KeyedItems.d.ts +1 -1
  382. package/dist/parts/data/empty-key.d.ts +2 -0
  383. package/dist/parts/drag/DragGhost.d.ts +23 -16
  384. package/dist/parts/drag/auto-scroll-options.d.ts +19 -0
  385. package/dist/parts/drag/auto-scroll.d.ts +11 -0
  386. package/dist/parts/drag/drag-boxes.d.ts +33 -0
  387. package/dist/parts/drag/stack-cover.d.ts +7 -0
  388. package/dist/parts/field/Field.d.ts +37 -9
  389. package/dist/parts/field/pressed-focusable.d.ts +3 -0
  390. package/dist/parts/item-layout/ItemLayout.d.ts +61 -0
  391. package/dist/parts/item-layout/item-layout-options.d.ts +17 -0
  392. package/dist/parts/item-layout/layout-added-item.d.ts +13 -0
  393. package/dist/parts/item-layout/layout-customization.d.ts +13 -0
  394. package/dist/parts/item-layout/layout-node.d.ts +24 -0
  395. package/dist/parts/item-tree/ItemTree.d.ts +34 -0
  396. package/dist/parts/item-tree/children-at.d.ts +2 -0
  397. package/dist/parts/item-tree/item-paths.d.ts +18 -0
  398. package/dist/parts/item-tree/ordered.d.ts +2 -0
  399. package/dist/parts/list/OptionList.d.ts +67 -17
  400. package/dist/parts/list/option-parts.d.ts +10 -0
  401. package/dist/parts/mask/InputMask.d.ts +11 -4
  402. package/dist/parts/menu/MenuList.d.ts +35 -11
  403. package/dist/parts/menu/menu-item-merge-at.d.ts +6 -0
  404. package/dist/parts/menu/menu-item-merge.d.ts +6 -0
  405. package/dist/parts/menu/menu-item.d.ts +17 -2
  406. package/dist/parts/overlay/OverlayPanel.d.ts +21 -12
  407. package/dist/parts/overlay/inert-around.d.ts +6 -3
  408. package/dist/parts/overlay/overlay-container.d.ts +2 -2
  409. package/dist/parts/overlay/overlay-panel-props.d.ts +2 -2
  410. package/dist/parts/popup/Popup.d.ts +17 -2
  411. package/dist/parts/popup/place-near.d.ts +10 -0
  412. package/dist/parts/popup/place-options.d.ts +10 -0
  413. package/dist/parts/popup/place-popup.d.ts +4 -1
  414. package/dist/parts/popup/placed.d.ts +7 -0
  415. package/dist/parts/popup/popup-anchor.d.ts +4 -0
  416. package/dist/parts/popup/popup-open-options.d.ts +9 -4
  417. package/dist/parts/slide/slide-track-host.d.ts +3 -2
  418. package/dist/parts/slide/slide-track.d.ts +10 -4
  419. package/dist/parts/validation/validate-fields.d.ts +6 -2
  420. package/dist/parts/validation/validation-target.d.ts +3 -1
  421. package/dist/parts/window/follow-pointer.d.ts +2 -1
  422. package/dist/parts/window/resize-frame-parts.d.ts +7 -0
  423. package/dist/parts/window/resize-frame.d.ts +3 -2
  424. package/dist/styles.css +2144 -12
  425. package/dist/tokens/index.d.ts +14836 -13454
  426. package/dist/tokens/index.js +1397 -12
  427. package/dist/tokens/index.js.map +1 -1
  428. package/dist/{tr-DhIFcH3c.js → tr-BvKE8jSF.js} +241 -3
  429. package/dist/tr-BvKE8jSF.js.map +1 -0
  430. package/docs/accordion.md +2 -2
  431. package/docs/actionsheet.md +4 -3
  432. package/docs/appbar.md +3 -3
  433. package/docs/appmenu-api.md +83 -0
  434. package/docs/appmenu-programmatic.md +76 -0
  435. package/docs/appmenu-search.md +66 -0
  436. package/docs/appmenu.md +150 -0
  437. package/docs/avatar.md +2 -2
  438. package/docs/badge.md +1 -1
  439. package/docs/bar-gauge-angles.md +1 -1
  440. package/docs/bar-gauge-data.md +1 -1
  441. package/docs/bar-gauge-labels.md +1 -1
  442. package/docs/bar-gauge.md +1 -1
  443. package/docs/barcode.md +1 -1
  444. package/docs/bottomnavigation.md +3 -3
  445. package/docs/bottomsheet.md +3 -3
  446. package/docs/breadcrumb.md +1 -1
  447. package/docs/button.md +4 -4
  448. package/docs/buttongroup.md +1 -1
  449. package/docs/buttons.md +1 -1
  450. package/docs/calendar.md +1 -1
  451. package/docs/card.md +2 -2
  452. package/docs/chart-bars.md +1 -1
  453. package/docs/chart-candles.md +1 -1
  454. package/docs/chart-funnel.md +1 -1
  455. package/docs/chart-heatmap.md +1 -1
  456. package/docs/chart-lines.md +1 -1
  457. package/docs/chart-live.md +1 -1
  458. package/docs/chart-pie.md +1 -1
  459. package/docs/chart-radar.md +1 -1
  460. package/docs/chart-ranges.md +1 -1
  461. package/docs/chart-references.md +1 -1
  462. package/docs/chart-scatter.md +1 -1
  463. package/docs/chart-waterfall.md +1 -1
  464. package/docs/chart-zoom.md +1 -1
  465. package/docs/chart.md +1 -1
  466. package/docs/checkbox.md +2 -2
  467. package/docs/chip.md +7 -8
  468. package/docs/choice.md +1 -1
  469. package/docs/colorbox.md +1 -1
  470. package/docs/combobox.md +1 -1
  471. package/docs/control.md +2 -2
  472. package/docs/data.md +1 -1
  473. package/docs/datagrid-api.md +7 -4
  474. package/docs/datagrid-bands.md +1 -1
  475. package/docs/datagrid-drag-select.md +1 -1
  476. package/docs/datagrid-drag.md +4 -4
  477. package/docs/datagrid-editing.md +1 -1
  478. package/docs/datagrid-filtering.md +106 -1
  479. package/docs/datagrid-forms.md +2 -2
  480. package/docs/datagrid-grouping.md +1 -1
  481. package/docs/datagrid-layout.md +7 -7
  482. package/docs/datagrid-lookups.md +2 -2
  483. package/docs/datagrid-master-detail.md +3 -3
  484. package/docs/datagrid-scrolling.md +1 -1
  485. package/docs/datagrid-selection.md +1 -1
  486. package/docs/datagrid.md +1 -1
  487. package/docs/datebox.md +2 -2
  488. package/docs/daterangebox.md +2 -2
  489. package/docs/display.md +1 -1
  490. package/docs/draggable.md +4 -4
  491. package/docs/drawer.md +2 -2
  492. package/docs/dropdown.md +5 -5
  493. package/docs/editors.md +1 -1
  494. package/docs/feedback.md +1 -1
  495. package/docs/fileuploader.md +1 -1
  496. package/docs/filterbuilder.md +2 -2
  497. package/docs/formlayout.md +1 -1
  498. package/docs/foundations.md +1 -1
  499. package/docs/gallery.md +1 -1
  500. package/docs/gauge-base.md +1 -1
  501. package/docs/gauge-circular.md +1 -1
  502. package/docs/gauge-dashboards.md +1 -1
  503. package/docs/gauge-linear.md +1 -1
  504. package/docs/gauge-markers.md +1 -1
  505. package/docs/gauge-marks.md +1 -1
  506. package/docs/gauge-ranges.md +1 -1
  507. package/docs/gauge-scales.md +1 -1
  508. package/docs/gauge.md +1 -1
  509. package/docs/home.md +1 -1
  510. package/docs/keyboard.md +2 -4
  511. package/docs/language.md +2 -2
  512. package/docs/layout.md +3 -3
  513. package/docs/listbox.md +5 -5
  514. package/docs/loadpanel.md +4 -4
  515. package/docs/lookup.md +1 -1
  516. package/docs/menus.md +17 -16
  517. package/docs/multiview.md +1 -1
  518. package/docs/navigation.md +1 -1
  519. package/docs/numberbox.md +5 -4
  520. package/docs/otpinput.md +1 -1
  521. package/docs/pagination.md +1 -1
  522. package/docs/popover.md +10 -9
  523. package/docs/progress.md +5 -5
  524. package/docs/qrcode.md +1 -1
  525. package/docs/radiogroup.md +3 -3
  526. package/docs/rating.md +1 -1
  527. package/docs/resizable.md +4 -4
  528. package/docs/ribbonmenu-api.md +130 -0
  529. package/docs/ribbonmenu-commands.md +118 -0
  530. package/docs/ribbonmenu-customization.md +93 -0
  531. package/docs/ribbonmenu-display.md +96 -0
  532. package/docs/ribbonmenu-layouts.md +59 -0
  533. package/docs/ribbonmenu-programmatic.md +91 -0
  534. package/docs/ribbonmenu.md +233 -0
  535. package/docs/scheduler-agenda.md +1 -1
  536. package/docs/scheduler-big-data.md +1 -1
  537. package/docs/scheduler-editing.md +1 -1
  538. package/docs/scheduler-form.md +1 -1
  539. package/docs/scheduler-icalendar.md +1 -1
  540. package/docs/scheduler-mobile.md +1 -1
  541. package/docs/scheduler-recurrence.md +1 -1
  542. package/docs/scheduler-resources.md +1 -1
  543. package/docs/scheduler-timeline.md +1 -1
  544. package/docs/scheduler.md +1 -1
  545. package/docs/scrollview.md +7 -6
  546. package/docs/showcase-home.md +1 -1
  547. package/docs/showcase.md +2 -2
  548. package/docs/signature.md +1 -1
  549. package/docs/skeleton.md +1 -1
  550. package/docs/slider.md +4 -4
  551. package/docs/sortable.md +2 -2
  552. package/docs/sparkline.md +1 -1
  553. package/docs/speeddial.md +2 -2
  554. package/docs/splitter.md +1 -1
  555. package/docs/stepper.md +6 -8
  556. package/docs/switch.md +2 -2
  557. package/docs/tabdocs-dock.md +2 -2
  558. package/docs/tabdocs-drag.md +1 -1
  559. package/docs/tabdocs-menus.md +1 -1
  560. package/docs/tabdocs-mobile.md +1 -1
  561. package/docs/tabdocs-tabs.md +1 -1
  562. package/docs/tabdocs-windows.md +1 -2
  563. package/docs/tabdocs-workspace.md +1 -1
  564. package/docs/tabdocs.md +1 -1
  565. package/docs/tabs.md +2 -2
  566. package/docs/tagbox.md +9 -10
  567. package/docs/textarea.md +2 -2
  568. package/docs/textbox.md +6 -3
  569. package/docs/tileview.md +1 -1
  570. package/docs/timeline.md +1 -1
  571. package/docs/toast.md +1 -1
  572. package/docs/tokens.md +265 -1
  573. package/docs/toolbar.md +1 -1
  574. package/docs/tooltip.md +3 -3
  575. package/docs/treeview.md +15 -24
  576. package/docs/validationsummary.md +1 -1
  577. package/docs/window.md +3 -3
  578. package/docs/wizard.md +1 -1
  579. package/llms-full.txt +1903 -289
  580. package/llms.txt +18 -1
  581. package/package.json +4 -4
  582. package/dist/components/datagrid/view/next-frame.d.ts +0 -4
  583. package/dist/components/datagrid/view/place-in-order.d.ts +0 -6
  584. package/dist/components/tabdocs/keep-scroll.d.ts +0 -6
  585. package/dist/core/control-map.d.ts +0 -7
  586. package/dist/core/document-watch.d.ts +0 -10
  587. package/dist/core/enable.d.ts +0 -16
  588. package/dist/core/fonts-loaded.d.ts +0 -2
  589. package/dist/core/icon-node.d.ts +0 -10
  590. package/dist/core/next-frame.d.ts +0 -6
  591. package/dist/core/resize-watch.d.ts +0 -21
  592. package/dist/core/scroll-watch.d.ts +0 -13
  593. package/dist/parts/chart/token-lengths.d.ts +0 -16
  594. package/dist/parts/overlay/css-length.d.ts +0 -2
  595. package/dist/tr-DhIFcH3c.js.map +0 -1
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @motifx-community/ui
2
2
 
3
- > UI components for MotifJS (@motifx/core) on the MotifJS design system. Version 0.1.0-beta.7: a preview, its API may still change before 1.0.
3
+ > UI components for MotifJS (@motifx/core) on the MotifJS design system. Version 0.1.0-beta.8: a preview, its API may still change before 1.0.
4
4
 
5
5
  Built on MotifJS (`@motifx/core`): a component is an object, made in JSX or with `new`, whose every prop takes a value or a function (`Bind<T>`); `x-model` binds a value two-way. The look is the design system’s (`@motifx-community/design-system`): five design languages (`data-design-language`), light and dark themes, density.
6
6
 
@@ -147,6 +147,23 @@ Built on MotifJS (`@motifx/core`): a component is an object, made in JSX or with
147
147
  - [TagBox](docs/tagbox.md): Selects multiple items. Selected items appear as tags in the field, followed by a text input that searches the list. Items can come from memory or from a…
148
148
  - [FilterBuilder](docs/filterbuilder.md): Lets users build a filter visually, using groups joined by And, Or, Not And or Not Or, and conditions made of a field, an operation and a value. Its value…
149
149
 
150
+ ## RibbonMenu
151
+
152
+ - [RibbonMenu](docs/ribbonmenu.md): The commands of an application in tabs, each tab in named groups of large, medium and small commands. It adapts to the room it has, can show only its tabs…
153
+ - [RibbonMenu: Commands](docs/ribbonmenu-commands.md): A group holds commands of three sizes and eight types. Every field of a command is a value or a function the menu follows, so the commands change with the…
154
+ - [RibbonMenu: Layouts and room](docs/ribbonmenu-layouts.md): The menu has two layouts, and gives way step by step when its room shrinks: commands become smaller, groups fold, and what is left scrolls. Narrow enough,…
155
+ - [RibbonMenu: Showing and keys](docs/ribbonmenu-display.md): The menu can show only its tabs or hide itself to leave the page more room. A button before the tabs opens the app’s main menu, quick commands are at hand…
156
+ - [RibbonMenu: Customization](docs/ribbonmenu-customization.md): Users arrange the menu from its context menu: they hide what they never use, move what they use most, and add commands to the quick commands. Everything…
157
+ - [RibbonMenu: Programmatic changes](docs/ribbonmenu-programmatic.md): Tabs, groups and commands can be added, removed, moved and changed at any time, by their paths. The menu redraws only what changed: groups and commands that…
158
+ - [RibbonMenu: API reference](docs/ribbonmenu-api.md): Everything `RibbonMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
159
+
160
+ ## AppMenu
161
+
162
+ - [AppMenu](docs/appmenu.md): The main menu of an application. It slides in from the start edge with a list of items, and each item shows its own page beside the list or runs a command.…
163
+ - [AppMenu: Slots and search](docs/appmenu-search.md): The list can hold the app’s own content above and under its items, such as the user’s name or the version, and a search that narrows a long list as the user…
164
+ - [AppMenu: Programmatic changes](docs/appmenu-programmatic.md): Items can be added, removed, moved and changed at any time, by their keys. Items that stay keep their place, and pages that were opened keep their state.
165
+ - [AppMenu: API reference](docs/appmenu-api.md): Everything `AppMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
166
+
150
167
  ## TabDocumentManager
151
168
 
152
169
  - [TabDocumentManager](docs/tabdocs.md): A document manager that arranges content the way code editors arrange files: documents in tabs, tabs in groups, and groups split side by side or one above…
@@ -307,7 +324,7 @@ tokens, with examples.
307
324
 
308
325
  # @motifx-community/ui
309
326
 
310
- > Get started · @motifx-community/ui 0.1.0-beta.7
327
+ > Get started · @motifx-community/ui 0.1.0-beta.8
311
328
 
312
329
  Components for MotifJS: objects you create when you need them, show anywhere and dispose when you are done, drawn from the MotifJS design system's tokens.
313
330
 
@@ -377,20 +394,20 @@ Loading issues…
377
394
 
378
395
  # Showcase: an order screen
379
396
 
380
- > Get started · @motifx-community/ui 0.1.0-beta.7
397
+ > Get started · @motifx-community/ui 0.1.0-beta.8
381
398
 
382
399
  An order entry screen built with the kit, structured the way a MotifJS application is normally built: state and operations live in a model (`OrderModel`), and the page binds to it. The customer list is a data source of 5,000 rows that responds like a server.
383
400
 
384
401
  ## Feedback
385
402
 
386
- No open issues for this page.
403
+ Loading issues…
387
404
 
388
405
 
389
406
  ---
390
407
 
391
408
  # Showcase: a smart home
392
409
 
393
- > Get started · @motifx-community/ui 0.1.0-beta.7
410
+ > Get started · @motifx-community/ui 0.1.0-beta.8
394
411
 
395
412
  A smart home panel for a tablet, built with the kit as a MotifJS application of its own: a rail of screens, the day and the home's state at the top, and tiles you can touch. The devices report new values every two seconds.
396
413
 
@@ -425,7 +442,7 @@ Loading issues…
425
442
 
426
443
  # Design tokens
427
444
 
428
- > Get started · @motifx-community/ui 0.1.0-beta.7
445
+ > Get started · @motifx-community/ui 0.1.0-beta.8
429
446
 
430
447
  The token system has five layers. The first four (primitives, design language scales, semantic tokens per theme, and density) come from `@motifx-community/design-system` and are listed here for reference. The fifth layer, component tokens, belongs to this kit: each component has its own tokens, written in `@layer mx.components`, and each one references a design system token. Every design language provides its own value for each component token.
431
448
 
@@ -554,6 +571,84 @@ Source: `tokens/schema/*.json` for names and types, and `tokens/languages/<langu
554
571
  | `app-bar.button.face.ghost.color` | `--mx-app-bar-button-face-ghost-color` | `color.accent.on-solid` | `#ffffff` |
555
572
  | `app-bar.button.face.ghost-hover.bg` | `--mx-app-bar-button-face-ghost-hover-bg` | `` | `rgb(255 255 255 / 0.14)` |
556
573
  | `app-bar.button.face.ghost-pressed.bg` | `--mx-app-bar-button-face-ghost-pressed-bg` | `` | `rgb(255 255 255 / 0.22)` |
574
+ | `app-menu.font-family` | `--mx-app-menu-font-family` | `font.family.sans` | `Archivo, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif` |
575
+ | `app-menu.share` | `--mx-app-menu-share` | `` | `0.5` |
576
+ | `app-menu.min-size` | `--mx-app-menu-min-size` | `` | `22.5rem` |
577
+ | `app-menu.split-size` | `--mx-app-menu-split-size` | `` | `34rem` |
578
+ | `app-menu.nav-size` | `--mx-app-menu-nav-size` | `` | `15rem` |
579
+ | `app-menu.close-button.variant` | `--mx-app-menu-close-button-variant` | `` | `ghost` |
580
+ | `app-menu.close-button.tone` | `--mx-app-menu-close-button-tone` | `` | `standard` |
581
+ | `app-menu.close-button.size` | `--mx-app-menu-close-button-size` | `` | `md` |
582
+ | `app-menu.back-button.variant` | `--mx-app-menu-back-button-variant` | `` | `ghost` |
583
+ | `app-menu.back-button.tone` | `--mx-app-menu-back-button-tone` | `` | `standard` |
584
+ | `app-menu.back-button.size` | `--mx-app-menu-back-button-size` | `` | `md` |
585
+ | `app-menu.scrim.bg` | `--mx-app-menu-scrim-bg` | `color.bg.smoke` | `rgb(0 0 0 / 0.3)` |
586
+ | `app-menu.panel.bg` | `--mx-app-menu-panel-bg` | `color.bg.surface` | `#f8f7f3` |
587
+ | `app-menu.panel.border-color` | `--mx-app-menu-panel-border-color` | `color.stroke.surface` | `rgb(117 117 117 / 0.4)` |
588
+ | `app-menu.panel.shadow` | `--mx-app-menu-panel-shadow` | `elevation.dialog` | `0px 32px 64px 0px rgb(0 0 0 / 0.24), 0px 0px 8px 0px rgb(0 0 0 / 0.2)` |
589
+ | `app-menu.panel.color` | `--mx-app-menu-panel-color` | `color.fg.primary` | `#1d1c1a` |
590
+ | `app-menu.panel.font-size` | `--mx-app-menu-panel-font-size` | `font.size.body` | `0.875rem` |
591
+ | `app-menu.panel.line-height` | `--mx-app-menu-panel-line-height` | `font.line.body` | `1.25rem` |
592
+ | `app-menu.panel.border-end-width` | `--mx-app-menu-panel-border-end-width` | `border.width.1` | `1px` |
593
+ | `app-menu.panel.radius-end` | `--mx-app-menu-panel-radius-end` | `radius.none` | `0px` |
594
+ | `app-menu.panel.full.border-end-width` | `--mx-app-menu-panel-full-border-end-width` | `` | `0px` |
595
+ | `app-menu.panel.full.radius-end` | `--mx-app-menu-panel-full-radius-end` | `` | `initial` |
596
+ | `app-menu.nav.padding` | `--mx-app-menu-nav-padding` | `space.2` | `0.5rem` |
597
+ | `app-menu.nav.gap` | `--mx-app-menu-nav-gap` | `space.1` | `0.25rem` |
598
+ | `app-menu.nav.bg` | `--mx-app-menu-nav-bg` | `color.bg.layer` | `#ebeae5` |
599
+ | `app-menu.list.bottom.padding-top` | `--mx-app-menu-list-bottom-padding-top` | `space.2` | `0.5rem` |
600
+ | `app-menu.list.gap` | `--mx-app-menu-list-gap` | `space.1` | `0.25rem` |
601
+ | `app-menu.separator.height` | `--mx-app-menu-separator-height` | `border.width.1` | `1px` |
602
+ | `app-menu.separator.bg` | `--mx-app-menu-separator-bg` | `color.stroke.divider` | `rgb(0 0 0 / 0.1)` |
603
+ | `app-menu.separator.margin-block` | `--mx-app-menu-separator-margin-block` | `space.2` | `0.5rem` |
604
+ | `app-menu.separator.margin-inline` | `--mx-app-menu-separator-margin-inline` | `space.3` | `0.75rem` |
605
+ | `app-menu.item.height` | `--mx-app-menu-item-height` | `control.height.lg` | `2.5rem` |
606
+ | `app-menu.item.padding-inline` | `--mx-app-menu-item-padding-inline` | `space.3` | `0.75rem` |
607
+ | `app-menu.item.gap` | `--mx-app-menu-item-gap` | `space.3` | `0.75rem` |
608
+ | `app-menu.item.radius` | `--mx-app-menu-item-radius` | `item.radius` | `0.25rem` |
609
+ | `app-menu.item.color` | `--mx-app-menu-item-color` | `color.fg.primary` | `#1d1c1a` |
610
+ | `app-menu.item.font-size` | `--mx-app-menu-item-font-size` | `font.size.body` | `0.875rem` |
611
+ | `app-menu.item.line-height` | `--mx-app-menu-item-line-height` | `font.line.body` | `1.25rem` |
612
+ | `app-menu.item.hover.bg` | `--mx-app-menu-item-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
613
+ | `app-menu.item.pressed.bg` | `--mx-app-menu-item-pressed-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
614
+ | `app-menu.item.selected.bg` | `--mx-app-menu-item-selected-bg` | `color.selection.bg` | `#f5f4f0` |
615
+ | `app-menu.item.selected.color` | `--mx-app-menu-item-selected-color` | `color.selection.fg` | `#1d1c1a` |
616
+ | `app-menu.item.selected.glow` | `--mx-app-menu-item-selected-glow` | `` | `inset 0px 0px 0px 1px rgb(0 0 0 / 0.12)` |
617
+ | `app-menu.item.selected.shadow` | `--mx-app-menu-item-selected-shadow` | `effect.selection` | `inset 0px 1px 0px 0px rgb(255 255 255 / 0.7), 0px 1px 0px 0px rgb(0 0 0 / 0.3)` |
618
+ | `app-menu.item.selected-hover.bg` | `--mx-app-menu-item-selected-hover-bg` | `color.selection.bg` | `#f5f4f0` |
619
+ | `app-menu.item.focus.glow` | `--mx-app-menu-item-focus-glow` | `focus.ring.halo-inset` | `inset 0px 0px 0px 3px rgb(255 255 255 / 0.7)` |
620
+ | `app-menu.item.focus.outline-width` | `--mx-app-menu-item-focus-outline-width` | `focus.ring.width` | `2px` |
621
+ | `app-menu.item.focus.outline-color` | `--mx-app-menu-item-focus-outline-color` | `focus.ring.color` | `#1d1c1a` |
622
+ | `app-menu.item.focus.outline-offset` | `--mx-app-menu-item-focus-outline-offset` | `` | `calc(2px * -1)` |
623
+ | `app-menu.item.disabled.color` | `--mx-app-menu-item-disabled-color` | `color.fg.disabled` | `#a2a098` |
624
+ | `app-menu.icon.size` | `--mx-app-menu-icon-size` | `icon.size.md` | `1rem` |
625
+ | `app-menu.icon.color` | `--mx-app-menu-icon-color` | `color.fg.secondary` | `#5e5c55` |
626
+ | `app-menu.icon.selected.color` | `--mx-app-menu-icon-selected-color` | `color.selection.fg` | `#1d1c1a` |
627
+ | `app-menu.label.font-weight` | `--mx-app-menu-label-font-weight` | `font.weight.regular` | `400` |
628
+ | `app-menu.label.selected.font-weight` | `--mx-app-menu-label-selected-font-weight` | `font.weight.semibold` | `600` |
629
+ | `app-menu.page-head.padding` | `--mx-app-menu-page-head-padding` | `space.2` | `0.5rem` |
630
+ | `app-menu.page-head.gap` | `--mx-app-menu-page-head-gap` | `space.2` | `0.5rem` |
631
+ | `app-menu.view.padding` | `--mx-app-menu-view-padding` | `space.6` | `1.5rem` |
632
+ | `app-menu.view.focus.outline-width` | `--mx-app-menu-view-focus-outline-width` | `focus.ring.width` | `2px` |
633
+ | `app-menu.view.focus.outline-color` | `--mx-app-menu-view-focus-outline-color` | `focus.ring.color` | `#1d1c1a` |
634
+ | `app-menu.view.focus.outline-offset` | `--mx-app-menu-view-focus-outline-offset` | `` | `calc(2px * -1)` |
635
+ | `app-menu.header-slot.padding-inline` | `--mx-app-menu-header-slot-padding-inline` | `space.1` | `0.25rem` |
636
+ | `app-menu.header-slot.padding-bottom` | `--mx-app-menu-header-slot-padding-bottom` | `space.2` | `0.5rem` |
637
+ | `app-menu.search.padding-inline` | `--mx-app-menu-search-padding-inline` | `space.1` | `0.25rem` |
638
+ | `app-menu.search.padding-bottom` | `--mx-app-menu-search-padding-bottom` | `space.2` | `0.5rem` |
639
+ | `app-menu.no-match.padding` | `--mx-app-menu-no-match-padding` | `space.3` | `0.75rem` |
640
+ | `app-menu.no-match.color` | `--mx-app-menu-no-match-color` | `color.fg.secondary` | `#5e5c55` |
641
+ | `app-menu.no-match.font-size` | `--mx-app-menu-no-match-font-size` | `font.size.body` | `0.875rem` |
642
+ | `app-menu.no-match.line-height` | `--mx-app-menu-no-match-line-height` | `font.line.body` | `1.25rem` |
643
+ | `app-menu.footer-slot.padding-inline` | `--mx-app-menu-footer-slot-padding-inline` | `space.1` | `0.25rem` |
644
+ | `app-menu.footer-slot.padding-top` | `--mx-app-menu-footer-slot-padding-top` | `space.2` | `0.5rem` |
645
+ | `app-menu.footer-slot.border-top-width` | `--mx-app-menu-footer-slot-border-top-width` | `border.width.1` | `1px` |
646
+ | `app-menu.footer-slot.border-color` | `--mx-app-menu-footer-slot-border-color` | `color.stroke.divider` | `rgb(0 0 0 / 0.1)` |
647
+ | `app-menu.indicator.width` | `--mx-app-menu-indicator-width` | `` | `initial` |
648
+ | `app-menu.indicator.height` | `--mx-app-menu-indicator-height` | `` | `initial` |
649
+ | `app-menu.indicator.bg` | `--mx-app-menu-indicator-bg` | `` | `initial` |
650
+ | `app-menu.indicator.radius` | `--mx-app-menu-indicator-radius` | `` | `initial` |
651
+ | `app-menu.page.bg` | `--mx-app-menu-page-bg` | `` | `initial` |
557
652
  | `avatar-group.layout` | `--mx-avatar-group-layout` | `` | `stack` |
558
653
  | `avatar-group.overlap.xs` | `--mx-avatar-group-overlap-xs` | `` | `0.25rem` |
559
654
  | `avatar-group.overlap.sm` | `--mx-avatar-group-overlap-sm` | `` | `0.25rem` |
@@ -3102,6 +3197,192 @@ Source: `tokens/schema/*.json` for names and types, and `tokens/languages/<langu
3102
3197
  | `resizable.grip-glyph.size` | `--mx-resizable-grip-glyph-size` | `` | `0.75rem` |
3103
3198
  | `resizable.grip-glyph.bg` | `--mx-resizable-grip-glyph-bg` | `color.fg.tertiary` | `#8c8a82` |
3104
3199
  | `resizable.grip-glyph.icon` | `--mx-resizable-grip-glyph-icon` | `` | `var(--mx-icon-grip)` |
3200
+ | `ribbon-menu.font-family` | `--mx-ribbon-menu-font-family` | `font.family.sans` | `Archivo, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif` |
3201
+ | `ribbon-menu.rows` | `--mx-ribbon-menu-rows` | `` | `3` |
3202
+ | `ribbon-menu.row-height` | `--mx-ribbon-menu-row-height` | `control.height.sm` | `1.5rem` |
3203
+ | `ribbon-menu.indicator-inset` | `--mx-ribbon-menu-indicator-inset` | `control.padding.md` | `0.6875rem` |
3204
+ | `ribbon-menu.large.variant` | `--mx-ribbon-menu-large-variant` | `` | `ghost` |
3205
+ | `ribbon-menu.large.size` | `--mx-ribbon-menu-large-size` | `` | `md` |
3206
+ | `ribbon-menu.large.face.toggled.bg` | `--mx-ribbon-menu-large-face-toggled-bg` | `color.fill.control.tertiary` | `#e1e0da` |
3207
+ | `ribbon-menu.large.face.toggled.color` | `--mx-ribbon-menu-large-face-toggled-color` | `` | `initial` |
3208
+ | `ribbon-menu.large.face.toggled-hover.bg` | `--mx-ribbon-menu-large-face-toggled-hover-bg` | `color.fill.control.secondary` | `#ebeae5` |
3209
+ | `ribbon-menu.large.face.outline-toggled.bg` | `--mx-ribbon-menu-large-face-outline-toggled-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3210
+ | `ribbon-menu.large.face.outline-toggled.color` | `--mx-ribbon-menu-large-face-outline-toggled-color` | `` | `initial` |
3211
+ | `ribbon-menu.large.face.ghost-toggled.bg` | `--mx-ribbon-menu-large-face-ghost-toggled-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3212
+ | `ribbon-menu.large.face.ghost-toggled.color` | `--mx-ribbon-menu-large-face-ghost-toggled-color` | `` | `initial` |
3213
+ | `ribbon-menu.large.face.outline-toggled-hover.bg` | `--mx-ribbon-menu-large-face-outline-toggled-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3214
+ | `ribbon-menu.large.face.outline-toggled-hover.color` | `--mx-ribbon-menu-large-face-outline-toggled-hover-color` | `` | `initial` |
3215
+ | `ribbon-menu.large.face.ghost-toggled-hover.bg` | `--mx-ribbon-menu-large-face-ghost-toggled-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3216
+ | `ribbon-menu.large.face.ghost-toggled-hover.color` | `--mx-ribbon-menu-large-face-ghost-toggled-hover-color` | `` | `initial` |
3217
+ | `ribbon-menu.medium.variant` | `--mx-ribbon-menu-medium-variant` | `` | `ghost` |
3218
+ | `ribbon-menu.medium.size` | `--mx-ribbon-menu-medium-size` | `` | `sm` |
3219
+ | `ribbon-menu.medium.face.toggled.bg` | `--mx-ribbon-menu-medium-face-toggled-bg` | `color.fill.control.tertiary` | `#e1e0da` |
3220
+ | `ribbon-menu.medium.face.toggled.color` | `--mx-ribbon-menu-medium-face-toggled-color` | `` | `initial` |
3221
+ | `ribbon-menu.medium.face.toggled-hover.bg` | `--mx-ribbon-menu-medium-face-toggled-hover-bg` | `color.fill.control.secondary` | `#ebeae5` |
3222
+ | `ribbon-menu.medium.face.outline-toggled.bg` | `--mx-ribbon-menu-medium-face-outline-toggled-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3223
+ | `ribbon-menu.medium.face.outline-toggled.color` | `--mx-ribbon-menu-medium-face-outline-toggled-color` | `` | `initial` |
3224
+ | `ribbon-menu.medium.face.ghost-toggled.bg` | `--mx-ribbon-menu-medium-face-ghost-toggled-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3225
+ | `ribbon-menu.medium.face.ghost-toggled.color` | `--mx-ribbon-menu-medium-face-ghost-toggled-color` | `` | `initial` |
3226
+ | `ribbon-menu.medium.face.outline-toggled-hover.bg` | `--mx-ribbon-menu-medium-face-outline-toggled-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3227
+ | `ribbon-menu.medium.face.outline-toggled-hover.color` | `--mx-ribbon-menu-medium-face-outline-toggled-hover-color` | `` | `initial` |
3228
+ | `ribbon-menu.medium.face.ghost-toggled-hover.bg` | `--mx-ribbon-menu-medium-face-ghost-toggled-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3229
+ | `ribbon-menu.medium.face.ghost-toggled-hover.color` | `--mx-ribbon-menu-medium-face-ghost-toggled-hover-color` | `` | `initial` |
3230
+ | `ribbon-menu.small.variant` | `--mx-ribbon-menu-small-variant` | `` | `ghost` |
3231
+ | `ribbon-menu.small.size` | `--mx-ribbon-menu-small-size` | `` | `sm` |
3232
+ | `ribbon-menu.small.face.toggled.bg` | `--mx-ribbon-menu-small-face-toggled-bg` | `color.fill.control.tertiary` | `#e1e0da` |
3233
+ | `ribbon-menu.small.face.toggled.color` | `--mx-ribbon-menu-small-face-toggled-color` | `` | `initial` |
3234
+ | `ribbon-menu.small.face.toggled-hover.bg` | `--mx-ribbon-menu-small-face-toggled-hover-bg` | `color.fill.control.secondary` | `#ebeae5` |
3235
+ | `ribbon-menu.small.face.outline-toggled.bg` | `--mx-ribbon-menu-small-face-outline-toggled-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3236
+ | `ribbon-menu.small.face.outline-toggled.color` | `--mx-ribbon-menu-small-face-outline-toggled-color` | `` | `initial` |
3237
+ | `ribbon-menu.small.face.ghost-toggled.bg` | `--mx-ribbon-menu-small-face-ghost-toggled-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3238
+ | `ribbon-menu.small.face.ghost-toggled.color` | `--mx-ribbon-menu-small-face-ghost-toggled-color` | `` | `initial` |
3239
+ | `ribbon-menu.small.face.outline-toggled-hover.bg` | `--mx-ribbon-menu-small-face-outline-toggled-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3240
+ | `ribbon-menu.small.face.outline-toggled-hover.color` | `--mx-ribbon-menu-small-face-outline-toggled-hover-color` | `` | `initial` |
3241
+ | `ribbon-menu.small.face.ghost-toggled-hover.bg` | `--mx-ribbon-menu-small-face-ghost-toggled-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3242
+ | `ribbon-menu.small.face.ghost-toggled-hover.color` | `--mx-ribbon-menu-small-face-ghost-toggled-hover-color` | `` | `initial` |
3243
+ | `ribbon-menu.more.variant` | `--mx-ribbon-menu-more-variant` | `` | `ghost` |
3244
+ | `ribbon-menu.more.tone` | `--mx-ribbon-menu-more-tone` | `` | `standard` |
3245
+ | `ribbon-menu.more.size` | `--mx-ribbon-menu-more-size` | `` | `sm` |
3246
+ | `ribbon-menu.switch.variant` | `--mx-ribbon-menu-switch-variant` | `` | `ghost` |
3247
+ | `ribbon-menu.switch.tone` | `--mx-ribbon-menu-switch-tone` | `` | `standard` |
3248
+ | `ribbon-menu.switch.size` | `--mx-ribbon-menu-switch-size` | `` | `sm` |
3249
+ | `ribbon-menu.scroll.variant` | `--mx-ribbon-menu-scroll-variant` | `` | `solid` |
3250
+ | `ribbon-menu.scroll.tone` | `--mx-ribbon-menu-scroll-tone` | `` | `standard` |
3251
+ | `ribbon-menu.scroll.size` | `--mx-ribbon-menu-scroll-size` | `` | `sm` |
3252
+ | `ribbon-menu.bar-start.gap` | `--mx-ribbon-menu-bar-start-gap` | `space.1` | `0.25rem` |
3253
+ | `ribbon-menu.bar-start.padding-end` | `--mx-ribbon-menu-bar-start-padding-end` | `space.2` | `0.5rem` |
3254
+ | `ribbon-menu.bar-end.gap` | `--mx-ribbon-menu-bar-end-gap` | `space.1` | `0.25rem` |
3255
+ | `ribbon-menu.bar-end.padding-start` | `--mx-ribbon-menu-bar-end-padding-start` | `space.2` | `0.5rem` |
3256
+ | `ribbon-menu.drop.padding` | `--mx-ribbon-menu-drop-padding` | `space.1` | `0.25rem` |
3257
+ | `ribbon-menu.root.color` | `--mx-ribbon-menu-root-color` | `color.fg.primary` | `#1d1c1a` |
3258
+ | `ribbon-menu.bar.padding-inline` | `--mx-ribbon-menu-bar-padding-inline` | `space.2` | `0.5rem` |
3259
+ | `ribbon-menu.bar.gap` | `--mx-ribbon-menu-bar-gap` | `space.2` | `0.5rem` |
3260
+ | `ribbon-menu.tabs.gap` | `--mx-ribbon-menu-tabs-gap` | `` | `0px` |
3261
+ | `ribbon-menu.tab.gap` | `--mx-ribbon-menu-tab-gap` | `control.gap` | `0.5rem` |
3262
+ | `ribbon-menu.tab.color` | `--mx-ribbon-menu-tab-color` | `color.fg.secondary` | `#5e5c55` |
3263
+ | `ribbon-menu.tab.font-weight` | `--mx-ribbon-menu-tab-font-weight` | `font.weight.medium` | `500` |
3264
+ | `ribbon-menu.tab.height` | `--mx-ribbon-menu-tab-height` | `control.height.md` | `2rem` |
3265
+ | `ribbon-menu.tab.padding-inline` | `--mx-ribbon-menu-tab-padding-inline` | `control.padding.md` | `0.6875rem` |
3266
+ | `ribbon-menu.tab.font-size` | `--mx-ribbon-menu-tab-font-size` | `font.size.body` | `0.875rem` |
3267
+ | `ribbon-menu.tab.line-height` | `--mx-ribbon-menu-tab-line-height` | `font.line.body` | `1.25rem` |
3268
+ | `ribbon-menu.tab.hover.bg` | `--mx-ribbon-menu-tab-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3269
+ | `ribbon-menu.tab.hover.color` | `--mx-ribbon-menu-tab-hover-color` | `color.fg.primary` | `#1d1c1a` |
3270
+ | `ribbon-menu.tab.pressed.bg` | `--mx-ribbon-menu-tab-pressed-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3271
+ | `ribbon-menu.tab.pressed.color` | `--mx-ribbon-menu-tab-pressed-color` | `color.fg.primary` | `#1d1c1a` |
3272
+ | `ribbon-menu.tab.selected.color` | `--mx-ribbon-menu-tab-selected-color` | `color.fg.primary` | `#1d1c1a` |
3273
+ | `ribbon-menu.tab.disabled.color` | `--mx-ribbon-menu-tab-disabled-color` | `color.fg.disabled` | `#a2a098` |
3274
+ | `ribbon-menu.tab.focus.glow` | `--mx-ribbon-menu-tab-focus-glow` | `focus.ring.halo-inset` | `inset 0px 0px 0px 3px rgb(255 255 255 / 0.7)` |
3275
+ | `ribbon-menu.tab.focus.outline-width` | `--mx-ribbon-menu-tab-focus-outline-width` | `focus.ring.width` | `2px` |
3276
+ | `ribbon-menu.tab.focus.outline-color` | `--mx-ribbon-menu-tab-focus-outline-color` | `focus.ring.color` | `#1d1c1a` |
3277
+ | `ribbon-menu.tab.focus.outline-offset` | `--mx-ribbon-menu-tab-focus-outline-offset` | `` | `calc(2px * -1)` |
3278
+ | `ribbon-menu.tab.context.color` | `--mx-ribbon-menu-tab-context-color` | `color.accent.fg` | `#983318` |
3279
+ | `ribbon-menu.tab.radius` | `--mx-ribbon-menu-tab-radius` | `` | `initial` |
3280
+ | `ribbon-menu.indicator.height` | `--mx-ribbon-menu-indicator-height` | `border.width.2` | `2px` |
3281
+ | `ribbon-menu.indicator.radius` | `--mx-ribbon-menu-indicator-radius` | `radius.full` | `9999px` |
3282
+ | `ribbon-menu.indicator.bg` | `--mx-ribbon-menu-indicator-bg` | `color.accent.solid` | `#c24523` |
3283
+ | `ribbon-menu.context-band.height` | `--mx-ribbon-menu-context-band-height` | `border.width.2` | `2px` |
3284
+ | `ribbon-menu.context-band.bg` | `--mx-ribbon-menu-context-band-bg` | `color.accent.solid` | `#c24523` |
3285
+ | `ribbon-menu.body.bg` | `--mx-ribbon-menu-body-bg` | `color.bg.card` | `#f5f4f0` |
3286
+ | `ribbon-menu.body.border-width` | `--mx-ribbon-menu-body-border-width` | `border.width.1` | `1px` |
3287
+ | `ribbon-menu.body.border-color` | `--mx-ribbon-menu-body-border-color` | `color.stroke.card` | `rgb(0 0 0 / 0.08)` |
3288
+ | `ribbon-menu.body.radius` | `--mx-ribbon-menu-body-radius` | `radius.lg` | `0.625rem` |
3289
+ | `ribbon-menu.body.shadow` | `--mx-ribbon-menu-body-shadow` | `elevation.card` | `0px 1px 2px 0px rgb(0 0 0 / 0.14), 0px 0px 2px 0px rgb(0 0 0 / 0.12)` |
3290
+ | `ribbon-menu.body.margin-inline` | `--mx-ribbon-menu-body-margin-inline` | `space.2` | `0.5rem` |
3291
+ | `ribbon-menu.body.margin-bottom` | `--mx-ribbon-menu-body-margin-bottom` | `space.2` | `0.5rem` |
3292
+ | `ribbon-menu.body.floating.shadow` | `--mx-ribbon-menu-body-floating-shadow` | `elevation.popup` | `0px 8px 16px 0px rgb(0 0 0 / 0.14), 0px 0px 2px 0px rgb(0 0 0 / 0.12)` |
3293
+ | `ribbon-menu.panel.padding` | `--mx-ribbon-menu-panel-padding` | `space.1` | `0.25rem` |
3294
+ | `ribbon-menu.panel.gap` | `--mx-ribbon-menu-panel-gap` | `space.1` | `0.25rem` |
3295
+ | `ribbon-menu.panel.simple.padding-inline` | `--mx-ribbon-menu-panel-simple-padding-inline` | `space.2` | `0.5rem` |
3296
+ | `ribbon-menu.divider.width` | `--mx-ribbon-menu-divider-width` | `border.width.1` | `1px` |
3297
+ | `ribbon-menu.divider.bg` | `--mx-ribbon-menu-divider-bg` | `color.stroke.divider` | `rgb(0 0 0 / 0.1)` |
3298
+ | `ribbon-menu.divider.margin-block` | `--mx-ribbon-menu-divider-margin-block` | `space.2` | `0.5rem` |
3299
+ | `ribbon-menu.group.padding-inline` | `--mx-ribbon-menu-group-padding-inline` | `space.1` | `0.25rem` |
3300
+ | `ribbon-menu.group.gap` | `--mx-ribbon-menu-group-gap` | `space.1` | `0.25rem` |
3301
+ | `ribbon-menu.commands.gap` | `--mx-ribbon-menu-commands-gap` | `space.1` | `0.25rem` |
3302
+ | `ribbon-menu.group-foot.min-height` | `--mx-ribbon-menu-group-foot-min-height` | `control.height.sm` | `1.5rem` |
3303
+ | `ribbon-menu.group-foot.gap` | `--mx-ribbon-menu-group-foot-gap` | `space.1` | `0.25rem` |
3304
+ | `ribbon-menu.group-label.color` | `--mx-ribbon-menu-group-label-color` | `color.fg.secondary` | `#5e5c55` |
3305
+ | `ribbon-menu.group-label.font-size` | `--mx-ribbon-menu-group-label-font-size` | `font.size.caption` | `0.75rem` |
3306
+ | `ribbon-menu.group-label.line-height` | `--mx-ribbon-menu-group-label-line-height` | `font.line.caption` | `1rem` |
3307
+ | `ribbon-menu.separator.width` | `--mx-ribbon-menu-separator-width` | `border.width.1` | `1px` |
3308
+ | `ribbon-menu.separator.bg` | `--mx-ribbon-menu-separator-bg` | `color.stroke.divider` | `rgb(0 0 0 / 0.1)` |
3309
+ | `ribbon-menu.separator.margin-block` | `--mx-ribbon-menu-separator-margin-block` | `space.1` | `0.25rem` |
3310
+ | `ribbon-menu.row.gap` | `--mx-ribbon-menu-row-gap` | `` | `0px` |
3311
+ | `ribbon-menu.large-face.min-width` | `--mx-ribbon-menu-large-face-min-width` | `` | `3.5rem` |
3312
+ | `ribbon-menu.large-face.padding-block` | `--mx-ribbon-menu-large-face-padding-block` | `space.1` | `0.25rem` |
3313
+ | `ribbon-menu.large-face.padding-inline` | `--mx-ribbon-menu-large-face-padding-inline` | `space.2` | `0.5rem` |
3314
+ | `ribbon-menu.large-face.gap` | `--mx-ribbon-menu-large-face-gap` | `space.1` | `0.25rem` |
3315
+ | `ribbon-menu.large-icon.size` | `--mx-ribbon-menu-large-icon-size` | `` | `2rem` |
3316
+ | `ribbon-menu.large-arrow.min-height` | `--mx-ribbon-menu-large-arrow-min-height` | `` | `0px` |
3317
+ | `ribbon-menu.large-arrow.padding-top` | `--mx-ribbon-menu-large-arrow-padding-top` | `` | `0px` |
3318
+ | `ribbon-menu.large-arrow.padding-bottom` | `--mx-ribbon-menu-large-arrow-padding-bottom` | `space.1` | `0.25rem` |
3319
+ | `ribbon-menu.compact-size` | `--mx-ribbon-menu-compact-size` | `` | `30rem` |
3320
+ | `ribbon-menu.picker.variant` | `--mx-ribbon-menu-picker-variant` | `` | `ghost` |
3321
+ | `ribbon-menu.picker.tone` | `--mx-ribbon-menu-picker-tone` | `` | `standard` |
3322
+ | `ribbon-menu.picker.size` | `--mx-ribbon-menu-picker-size` | `` | `sm` |
3323
+ | `ribbon-menu.reveal.height` | `--mx-ribbon-menu-reveal-height` | `space.3` | `0.75rem` |
3324
+ | `ribbon-menu.reveal.bg` | `--mx-ribbon-menu-reveal-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3325
+ | `ribbon-menu.reveal.color` | `--mx-ribbon-menu-reveal-color` | `color.fg.secondary` | `#5e5c55` |
3326
+ | `ribbon-menu.reveal.radius` | `--mx-ribbon-menu-reveal-radius` | `radius.md` | `0.375rem` |
3327
+ | `ribbon-menu.reveal.hover.bg` | `--mx-ribbon-menu-reveal-hover-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3328
+ | `ribbon-menu.reveal.hover.color` | `--mx-ribbon-menu-reveal-hover-color` | `color.fg.primary` | `#1d1c1a` |
3329
+ | `ribbon-menu.reveal.focus.outline-width` | `--mx-ribbon-menu-reveal-focus-outline-width` | `focus.ring.width` | `2px` |
3330
+ | `ribbon-menu.reveal.focus.outline-color` | `--mx-ribbon-menu-reveal-focus-outline-color` | `focus.ring.color` | `#1d1c1a` |
3331
+ | `ribbon-menu.reveal.focus.outline-offset` | `--mx-ribbon-menu-reveal-focus-outline-offset` | `` | `calc(2px * -1)` |
3332
+ | `ribbon-menu.frame.floating.bg` | `--mx-ribbon-menu-frame-floating-bg` | `color.bg.canvas` | `#e1e0da` |
3333
+ | `ribbon-menu.frame.floating.shadow` | `--mx-ribbon-menu-frame-floating-shadow` | `elevation.popup` | `0px 8px 16px 0px rgb(0 0 0 / 0.14), 0px 0px 2px 0px rgb(0 0 0 / 0.12)` |
3334
+ | `ribbon-menu.frame.floating.radius-bottom` | `--mx-ribbon-menu-frame-floating-radius-bottom` | `radius.lg` | `0.625rem` |
3335
+ | `ribbon-menu.app.height` | `--mx-ribbon-menu-app-height` | `control.height.sm` | `1.5rem` |
3336
+ | `ribbon-menu.app.padding-inline` | `--mx-ribbon-menu-app-padding-inline` | `space.3` | `0.75rem` |
3337
+ | `ribbon-menu.app.radius` | `--mx-ribbon-menu-app-radius` | `radius.md` | `0.375rem` |
3338
+ | `ribbon-menu.app.bg` | `--mx-ribbon-menu-app-bg` | `color.accent.solid` | `#c24523` |
3339
+ | `ribbon-menu.app.color` | `--mx-ribbon-menu-app-color` | `color.accent.on-solid` | `#ffffff` |
3340
+ | `ribbon-menu.app.font-weight` | `--mx-ribbon-menu-app-font-weight` | `font.weight.semibold` | `600` |
3341
+ | `ribbon-menu.app.hover.bg` | `--mx-ribbon-menu-app-hover-bg` | `color.accent.solid-hover` | `#b43f20` |
3342
+ | `ribbon-menu.app.pressed.bg` | `--mx-ribbon-menu-app-pressed-bg` | `color.accent.solid-pressed` | `#a1381c` |
3343
+ | `ribbon-menu.app.focus.outline-width` | `--mx-ribbon-menu-app-focus-outline-width` | `focus.ring.width` | `2px` |
3344
+ | `ribbon-menu.app.focus.outline-color` | `--mx-ribbon-menu-app-focus-outline-color` | `focus.ring.color` | `#1d1c1a` |
3345
+ | `ribbon-menu.app.focus.outline-offset` | `--mx-ribbon-menu-app-focus-outline-offset` | `focus.ring.offset` | `1px` |
3346
+ | `ribbon-menu.quick.gap` | `--mx-ribbon-menu-quick-gap` | `` | `0px` |
3347
+ | `ribbon-menu.quick.below.padding-inline` | `--mx-ribbon-menu-quick-below-padding-inline` | `space.2` | `0.5rem` |
3348
+ | `ribbon-menu.quick.below.padding-bottom` | `--mx-ribbon-menu-quick-below-padding-bottom` | `space.1` | `0.25rem` |
3349
+ | `ribbon-menu.hint.bg` | `--mx-ribbon-menu-hint-bg` | `color.bg.surface` | `#f8f7f3` |
3350
+ | `ribbon-menu.hint.border-width` | `--mx-ribbon-menu-hint-border-width` | `border.width.1` | `1px` |
3351
+ | `ribbon-menu.hint.border-color` | `--mx-ribbon-menu-hint-border-color` | `color.stroke.surface` | `rgb(117 117 117 / 0.4)` |
3352
+ | `ribbon-menu.hint.radius` | `--mx-ribbon-menu-hint-radius` | `radius.md` | `0.375rem` |
3353
+ | `ribbon-menu.hint.shadow` | `--mx-ribbon-menu-hint-shadow` | `elevation.tooltip` | `0px 4px 8px 0px rgb(0 0 0 / 0.14), 0px 0px 2px 0px rgb(0 0 0 / 0.12)` |
3354
+ | `ribbon-menu.hint.color` | `--mx-ribbon-menu-hint-color` | `color.fg.primary` | `#1d1c1a` |
3355
+ | `ribbon-menu.hint.font-size` | `--mx-ribbon-menu-hint-font-size` | `font.size.caption` | `0.75rem` |
3356
+ | `ribbon-menu.hint.line-height` | `--mx-ribbon-menu-hint-line-height` | `font.line.caption` | `1rem` |
3357
+ | `ribbon-menu.hint.padding-inline` | `--mx-ribbon-menu-hint-padding-inline` | `space.1` | `0.25rem` |
3358
+ | `ribbon-menu.hint.font-weight` | `--mx-ribbon-menu-hint-font-weight` | `font.weight.semibold` | `600` |
3359
+ | `ribbon-menu.gallery-open.variant` | `--mx-ribbon-menu-gallery-open-variant` | `` | `ghost` |
3360
+ | `ribbon-menu.gallery-open.tone` | `--mx-ribbon-menu-gallery-open-tone` | `` | `standard` |
3361
+ | `ribbon-menu.gallery-open.size` | `--mx-ribbon-menu-gallery-open-size` | `` | `sm` |
3362
+ | `ribbon-menu.gallery.gap` | `--mx-ribbon-menu-gallery-gap` | `space.1` | `0.25rem` |
3363
+ | `ribbon-menu.gallery.padding` | `--mx-ribbon-menu-gallery-padding` | `space.1` | `0.25rem` |
3364
+ | `ribbon-menu.gallery.border-width` | `--mx-ribbon-menu-gallery-border-width` | `border.width.1` | `1px` |
3365
+ | `ribbon-menu.gallery.border-color` | `--mx-ribbon-menu-gallery-border-color` | `color.stroke.divider` | `rgb(0 0 0 / 0.1)` |
3366
+ | `ribbon-menu.gallery.radius` | `--mx-ribbon-menu-gallery-radius` | `item.radius` | `0.25rem` |
3367
+ | `ribbon-menu.gallery-grid.gap` | `--mx-ribbon-menu-gallery-grid-gap` | `space.1` | `0.25rem` |
3368
+ | `ribbon-menu.gallery-grid.padding` | `--mx-ribbon-menu-gallery-grid-padding` | `space.1` | `0.25rem` |
3369
+ | `ribbon-menu.tile.width` | `--mx-ribbon-menu-tile-width` | `` | `4.5rem` |
3370
+ | `ribbon-menu.tile.padding` | `--mx-ribbon-menu-tile-padding` | `space.1` | `0.25rem` |
3371
+ | `ribbon-menu.tile.gap` | `--mx-ribbon-menu-tile-gap` | `space.1` | `0.25rem` |
3372
+ | `ribbon-menu.tile.radius` | `--mx-ribbon-menu-tile-radius` | `radius.md` | `0.375rem` |
3373
+ | `ribbon-menu.tile.color` | `--mx-ribbon-menu-tile-color` | `color.fg.primary` | `#1d1c1a` |
3374
+ | `ribbon-menu.tile.font-size` | `--mx-ribbon-menu-tile-font-size` | `font.size.caption` | `0.75rem` |
3375
+ | `ribbon-menu.tile.line-height` | `--mx-ribbon-menu-tile-line-height` | `font.line.caption` | `1rem` |
3376
+ | `ribbon-menu.tile.hover.bg` | `--mx-ribbon-menu-tile-hover-bg` | `color.fill.subtle.secondary` | `rgb(0 0 0 / 0.0373)` |
3377
+ | `ribbon-menu.tile.pressed.bg` | `--mx-ribbon-menu-tile-pressed-bg` | `color.fill.subtle.tertiary` | `rgb(0 0 0 / 0.0241)` |
3378
+ | `ribbon-menu.tile.selected.bg` | `--mx-ribbon-menu-tile-selected-bg` | `color.selection.bg` | `#f5f4f0` |
3379
+ | `ribbon-menu.tile.selected.color` | `--mx-ribbon-menu-tile-selected-color` | `color.selection.fg` | `#1d1c1a` |
3380
+ | `ribbon-menu.tile.selected.glow` | `--mx-ribbon-menu-tile-selected-glow` | `` | `inset 0px 0px 0px 1px rgb(0 0 0 / 0.12)` |
3381
+ | `ribbon-menu.tile.focus.outline-width` | `--mx-ribbon-menu-tile-focus-outline-width` | `focus.ring.width` | `2px` |
3382
+ | `ribbon-menu.tile.focus.outline-color` | `--mx-ribbon-menu-tile-focus-outline-color` | `focus.ring.color` | `#1d1c1a` |
3383
+ | `ribbon-menu.tile.focus.outline-offset` | `--mx-ribbon-menu-tile-focus-outline-offset` | `` | `calc(2px * -1)` |
3384
+ | `ribbon-menu.tile.disabled.color` | `--mx-ribbon-menu-tile-disabled-color` | `color.fg.disabled` | `#a2a098` |
3385
+ | `ribbon-menu.tile-icon.size` | `--mx-ribbon-menu-tile-icon-size` | `icon.size.lg` | `1.25rem` |
3105
3386
  | `scheduler.height` | `--mx-scheduler-height` | `` | `40rem` |
3106
3387
  | `scheduler.ruler-width` | `--mx-scheduler-ruler-width` | `` | `4rem` |
3107
3388
  | `scheduler.slot-height` | `--mx-scheduler-slot-height` | `control.height.md` | `2rem` |
@@ -5349,7 +5630,7 @@ Loading issues…
5349
5630
 
5350
5631
  # Foundations
5351
5632
 
5352
- > Foundations · @motifx-community/ui 0.1.0-beta.7
5633
+ > Foundations · @motifx-community/ui 0.1.0-beta.8
5353
5634
 
5354
5635
  The foundations are what every control of the kit shares: the Control base with its properties, keyboard and focus, and the language of the texts and formats.
5355
5636
 
@@ -5432,7 +5713,7 @@ Loading issues…
5432
5713
 
5433
5714
  # Control
5434
5715
 
5435
- > Foundations · @motifx-community/ui 0.1.0-beta.7
5716
+ > Foundations · @motifx-community/ui 0.1.0-beta.8
5436
5717
 
5437
5718
  `Control` is the base class of every control in the package. It provides the same `text`, `enabled`, `visible` and `tabStop` properties and the same focus methods, whether a control is declared in JSX and bound to state or created with `new` and changed programmatically.
5438
5719
 
@@ -5602,7 +5883,7 @@ class Badge extends Control<HTMLSpanElement, BadgeProps> {
5602
5883
  | Member | Description |
5603
5884
  | --- | --- |
5604
5885
  | `static elementTag` | The root element. It is a `div` unless the subclass specifies another element (`button` for a button). |
5605
- | `focusElement` | Getter for the element that receives focus, which is the root by default. Composite controls override it. It runs from the constructor, so derive it from `this.element`. |
5886
+ | `focusPart` | Getter for the part that receives focus, as a component. It is the control itself by default, or `null` when the control takes no focus. Composite controls override it, and a child control given here answers `focus`, `canFocus` and `focused`. It runs from the constructor, so derive it from parts created on demand. |
5606
5887
  | `observeProperty(name, apply)` | Renders a property without an effect. `apply` runs immediately and on every change, whether the change comes from a getter prop or from code. |
5607
5888
  | `getProperty(name) / setProperty(name, value)` | The storage behind the shared properties, available for your own: a tracked read, and a programmatic set that replaces any bound getter. |
5608
5889
  | `bindProperty(name, prop)` | Binds one of your own props. A getter is read immediately and tracked by a binding on the control, so `reState()` reads it again. A value is stored once. Call it from your constructor. |
@@ -5672,7 +5953,7 @@ Loading issues…
5672
5953
 
5673
5954
  # Keyboard and focus
5674
5955
 
5675
- > Foundations · @motifx-community/ui 0.1.0-beta.7
5956
+ > Foundations · @motifx-community/ui 0.1.0-beta.8
5676
5957
 
5677
5958
  Every control follows the same rules for Tab order, the active control of a container, focus handling, `&File` access keys and application-wide shortcuts.
5678
5959
 
@@ -5731,7 +6012,6 @@ A `FocusContainer` knows which child control holds focus (`activeControl`, react
5731
6012
  <Button text="&Save" onclick={save} /> // Alt+S
5732
6013
  <Button text="Save &as…" onclick={saveAs} /> // Alt+A
5733
6014
  <Button text="Tom && Jerry" /> // a literal &
5734
- <input aria-keyshortcuts="Alt+N" /> // plain elements too
5735
6015
  ```
5736
6016
 
5737
6017
  | Topic | Behavior |
@@ -5744,7 +6024,6 @@ A `FocusContainer` knows which child control holds focus (`activeControl`, react
5744
6024
  | `AltGr` | AltGr (Ctrl+Alt on Windows) is ignored, because it types characters such as `@` on a Turkish keyboard. |
5745
6025
  | `Underline` | Shown while Alt is held (Control + Option on Apple platforms). Tapping Alt keeps the underlines visible until Alt is tapped again, another key is pressed or the pointer is used. While the page has access keys, that tap is not passed to the browser, which would otherwise move keyboard focus to its menu bar. Set `data-mx-access-keys="always"` on `<html>` to show them all the time. |
5746
6026
  | `Accessibility` | The accessible name is the plain text, and the control receives `aria-keyshortcuts="Alt+S"` (`"Control+Alt+S"` on Apple platforms). |
5747
- | `Plain elements` | Any element with `aria-keyshortcuts="Alt+N"` takes part. A button-like element is clicked, an input receives focus, and a `<label>` moves focus to its field. |
5748
6027
 
5749
6028
  ```tsx
5750
6029
  import { reactive } from '@motifx/core';
@@ -5851,7 +6130,7 @@ export default function FocusGuard() {
5851
6130
 
5852
6131
  | Member | Return value / type | Description |
5853
6132
  | --- | --- | --- |
5854
- | `addShortcut(chord, handler, options?)` | `() => void` | Registers a shortcut and returns a function that removes it. `options.scope` limits it to a component, and `options.inEditable` also enables it in text fields. |
6133
+ | `addShortcut(chord, handler, options?)` | `() => void` | Registers a shortcut and returns a function that removes it. `options.scope` limits it to a component, `options.within` further to parts of it (a component, a list of components, or a function that returns them, such as the tabs of a strip: shortcuts of different parts may share keys), and `options.inEditable` also enables it in text fields. |
5855
6134
  | `control.addShortcut(chord, handler, options?)` | `() => void` | Registers a shortcut scoped to the control and removes it when the control is disposed. |
5856
6135
  | `parseAccessKey(text)` | `{ text, key, index }` | Parses `&Text` for your own controls. Render the result with the `mx-access-key` class and call `setAccessKey(key)`. |
5857
6136
  | `tabIndex` | prop / property | The order inside the container. The default is 0. |
@@ -5868,7 +6147,7 @@ Loading issues…
5868
6147
 
5869
6148
  # Language
5870
6149
 
5871
- > Foundations · @motifx-community/ui 0.1.0-beta.7
6150
+ > Foundations · @motifx-community/ui 0.1.0-beta.8
5872
6151
 
5873
6152
  `uiLocale` controls the strings that controls display, the locale used for dates and numbers, and the text direction. The kit has one `uiLocale`, and each language pack is loaded on demand.
5874
6153
 
@@ -6105,7 +6384,7 @@ Loading issues…
6105
6384
 
6106
6385
  # Buttons
6107
6386
 
6108
- > Buttons · @motifx-community/ui 0.1.0-beta.7
6387
+ > Buttons · @motifx-community/ui 0.1.0-beta.8
6109
6388
 
6110
6389
  Buttons start commands. The group covers single buttons, groups of them, toolbars that keep commands in reach at any width, application and context menus, and a floating button for the main action of a screen.
6111
6390
 
@@ -6278,7 +6557,7 @@ Loading issues…
6278
6557
 
6279
6558
  # Button
6280
6559
 
6281
- > Buttons · @motifx-community/ui 0.1.0-beta.7
6560
+ > Buttons · @motifx-community/ui 0.1.0-beta.8
6282
6561
 
6283
6562
  A native `<button>` styled with design tokens. It comes in three variants, three tones and three sizes, and supports an icon and an `&` access key. A button can act as a toggle, indicate that work is in progress, and open a menu or any other content, either from the whole button or from an arrow next to it with `split`, so the button keeps its own action.
6284
6563
 
@@ -6362,7 +6641,7 @@ export default function VariantsTonesSizes() {
6362
6641
 
6363
6642
  ## Text, icons and children
6364
6643
 
6365
- `text` sets the caption, and JSX children follow it. `icon` accepts an image address or any element or component, placed before or after the text with `iconPosition`. A button with only an icon needs an accessible name, so give it a `hint`.
6644
+ `text` sets the caption, and JSX children follow it. `icon` accepts an image address or a component, placed before or after the text with `iconPosition`. A button with only an icon needs an accessible name, so give it a `hint`.
6366
6645
 
6367
6646
  ```tsx
6368
6647
  import { Button } from '@motifx-community/ui';
@@ -6638,7 +6917,7 @@ All of these reference design system tokens (see [Tokens](tokens.md)). Override
6638
6917
  | `variant` | `Bind<ButtonVariant>` | `'solid'` | `solid` (filled and pressable), `outline` (framed) or `ghost` (visible only on hover). |
6639
6918
  | `tone` | `Bind<ButtonTone>` | `'standard'` | `standard`, `accent` for the primary action, or `danger` for a destructive action. |
6640
6919
  | `size` | `Bind<ButtonSize>` | `'md'` | `sm`, `md` or `lg`, which map to the control heights in the density tokens. |
6641
- | `icon` | `Bind<IconSource \| null>` | — | An image address, or any element or component (an `<svg>` in JSX, an icon font tag). It is decorative and hidden from screen readers. |
6920
+ | `icon` | `Bind<IconSource \| null>` | — | An image address or a component (an `<svg>` in JSX, an icon font tag); given as a function, the “more” menu of a toolbar calls it again for its own copy. It is decorative and hidden from screen readers. |
6642
6921
  | `iconPosition` | `Bind<'start' \| 'end'>` | `'start'` | Places the icon before or after the text. |
6643
6922
  | `stretch` | `Bind<boolean>` | `false` | Stretches to the full width of its container. |
6644
6923
  | `type` | `Bind<'button' \| 'submit' \| 'reset'>` | `'button'` | The native type. The default is `button`, so a button inside a form never submits by accident. |
@@ -6702,7 +6981,7 @@ Loading issues…
6702
6981
 
6703
6982
  # ButtonGroup
6704
6983
 
6705
- > Buttons · @motifx-community/ui 0.1.0-beta.7
6984
+ > Buttons · @motifx-community/ui 0.1.0-beta.8
6706
6985
 
6707
6986
  A set of related buttons, used as a segmented selection of one or more options or as a row of actions. The buttons are standard kit buttons and are attached by default.
6708
6987
 
@@ -6851,7 +7130,7 @@ Loading issues…
6851
7130
 
6852
7131
  # Toolbar
6853
7132
 
6854
- > Buttons · @motifx-community/ui 0.1.0-beta.7
7133
+ > Buttons · @motifx-community/ui 0.1.0-beta.8
6855
7134
 
6856
7135
  A command bar that holds buttons, toggle buttons, menus and fields, organized in groups with separators. The toolbar is a single Tab stop, and the arrow keys move between its controls. Items that do not fit move into an overflow menu at the end. You can define items as data, as JSX children, or both.
6857
7136
 
@@ -7321,7 +7600,7 @@ export default function SizeAndOrientation() {
7321
7600
 
7322
7601
  # SpeedDial
7323
7602
 
7324
- > Buttons · @motifx-community/ui 0.1.0-beta.7
7603
+ > Buttons · @motifx-community/ui 0.1.0-beta.8
7325
7604
 
7326
7605
  A floating action button that opens a set of related actions. Place it in a corner, on an edge or inline. Actions appear in a line with labels, or on a full, half or quarter circle around the button with tooltips. If there is only one action, the main button performs it directly.
7327
7606
 
@@ -7606,7 +7885,7 @@ export default function Single() {
7606
7885
  | `onActionClick` | event | Occurs when an action is selected (`index`, `action`). The action's own `click` runs first. |
7607
7886
  | `isOpen` | read-only | Indicates whether the actions are open. |
7608
7887
  | `single` | read-only | The single visible action, or `null` if there is more than one. |
7609
- | `mainElement` | read-only | The main button. |
7888
+ | `main` | read-only | The main button. |
7610
7889
  | `show(), close(), toggle()` | `void` | Opens or closes the actions. |
7611
7890
  | `refresh()` | `void` | Re-reads the actions after they have been changed in place. |
7612
7891
 
@@ -7619,7 +7898,7 @@ Loading issues…
7619
7898
 
7620
7899
  # MenuBar and ContextMenu
7621
7900
 
7622
- > Buttons · @motifx-community/ui 0.1.0-beta.7
7901
+ > Buttons · @motifx-community/ui 0.1.0-beta.8
7623
7902
 
7624
7903
  An application menu bar (File, Edit, View) and a context menu that opens on right-click. Both use the same menu items, which support submenus, check and radio items, shortcuts and access keys.
7625
7904
 
@@ -7733,10 +8012,10 @@ An item with `items` opens a submenu at its side. Right (Left on right-to-left p
7733
8012
 
7734
8013
  ## ContextMenu
7735
8014
 
7736
- A `ContextMenu` opens at the pointer when its target is right-clicked, and at the focused element with the Menu key or Shift+F10. `onOpening` receives the element (`e.target`) and builds the items for it, in this case for a row in a list. Setting `e.cancel = true` leaves the browser's own menu. The menu closes on Escape or a click outside. When the page scrolls, it follows the element it opened on and closes once that element is out of view.
8015
+ A `ContextMenu` opens at the pointer when its target is right-clicked, and at the focused element with the Menu key or Shift+F10. `onOpening` receives the component under the pointer or the focus (`e.part`) and builds the items for it, in this case for a row in a list. Setting `e.cancel = true` leaves the browser's own menu. The menu closes on Escape or a click outside. When the page scrolls, it follows the element it opened on and closes once that element is out of view.
7737
8016
 
7738
8017
  ```tsx
7739
- import { reactive, type Component } from '@motifx/core';
8018
+ import { reactive, type Component, type ComponentBase } from '@motifx/core';
7740
8019
  import { ContextMenu, type MenuItem } from '@motifx-community/ui';
7741
8020
 
7742
8021
  interface FileRow {
@@ -7775,9 +8054,10 @@ export default function FileList() {
7775
8054
  { text: '&Delete', shortcut: 'Del', beginGroup: true, enabled: !row.locked, click: () => (s.files = s.files.filter((f) => f !== row)) },
7776
8055
  ];
7777
8056
 
7778
- const rowOf = (el: Element) => {
7779
- const id = Number(el.closest('[data-id]')?.getAttribute('data-id'));
7780
- return s.files.find((f) => f.id === id);
8057
+ const rowOf = (part: ComponentBase) => {
8058
+ let id: string | null = null;
8059
+ for (let at: ComponentBase | null = part; at && !id; at = at.parent) id = at.attr.get('data-id');
8060
+ return s.files.find((f) => f.id === Number(id));
7781
8061
  };
7782
8062
 
7783
8063
  return (
@@ -7793,7 +8073,7 @@ export default function FileList() {
7793
8073
  target={() => list}
7794
8074
  label="File"
7795
8075
  onOpening={(e) => {
7796
- const row = rowOf(e.target);
8076
+ const row = rowOf(e.part);
7797
8077
  if (row) e.items = rowItems(row);
7798
8078
  else e.cancel = true;
7799
8079
  }}
@@ -7811,13 +8091,13 @@ import { attachContextMenu } from '@motifx-community/ui';
7811
8091
  const START = 'Right-click here, or focus me and press the Menu key.';
7812
8092
  const BOX = 'padding: var(--mx-space-4); background: var(--mx-color-bg-card); border: var(--mx-border-width-1) solid var(--mx-color-stroke-card); border-radius: var(--mx-radius-lg)';
7813
8093
 
7814
- /** A menu given to an element with `attachContextMenu`, its items built from the opening. */
8094
+ /** A menu given to a component with `attachContextMenu`, its items built from the opening. */
7815
8095
  export default function AttachedMenu() {
7816
8096
  const s = reactive({ zone: START });
7817
8097
 
7818
8098
  const attach = (c: Component<HTMLDivElement>) => {
7819
8099
  const remove = attachContextMenu(c, (e) => [
7820
- { text: '&Say where', click: () => (s.zone = `Opened ${e.byKeyboard ? 'from the keyboard' : 'with the pointer'} on <${e.target.tagName.toLowerCase()}>.`) },
8100
+ { text: '&Say where', click: () => (s.zone = `Opened ${e.byKeyboard ? 'from the keyboard' : 'with the pointer'} on ${e.part === c ? 'the zone' : 'its content'}.`) },
7821
8101
  { text: '&Reset', click: () => (s.zone = START) },
7822
8102
  ]);
7823
8103
  c.motif.setDisposable(remove);
@@ -7894,8 +8174,8 @@ Menus have no strings of their own. Every label, shortcut and name comes from yo
7894
8174
 
7895
8175
  | Prop | Type | Default | Description |
7896
8176
  | --- | --- | --- | --- |
7897
- | `items` | `Bind<readonly MenuItem[]>` | `[]` | The commands. `onOpening` can provide different ones for each element. |
7898
- | `target` | `Bind<Element \| Component \| null>` | Its parent | The element the menu belongs to. If not set, this is the element the `ContextMenu` is placed in. |
8177
+ | `items` | `Bind<readonly MenuItem[]>` | `[]` | The commands. `onOpening` can provide different ones for each component. |
8178
+ | `target` | `Bind<Component \| null>` | Its parent | The component the menu belongs to. If not set, this is the component the `ContextMenu` is placed in. |
7899
8179
  | `label` | `Bind<string>` | `''` | The accessible name of the menu. |
7900
8180
  | `keyboard` | `Bind<boolean>` | `true` | The Menu key and Shift+F10 open the menu at the focused element. |
7901
8181
  | `closeOnScroll` | `Bind<boolean>` | `true` | Scrolling the element out of view closes the menu. Until then, the menu follows the element. |
@@ -7908,8 +8188,8 @@ Menus have no strings of their own. Every label, shortcut and name comes from yo
7908
8188
  | --- | --- | --- |
7909
8189
  | `MenuBar.openItem` | read-only, reactive | The top-level item whose menu is open. |
7910
8190
  | `ContextMenu.opened` | read-only, reactive | Indicates whether it is open. |
7911
- | `ContextMenu.targetElement` | read-only, reactive | The element the menu was last opened on. |
7912
- | `ContextMenu.target` | read/write, reactive | The element the menu listens on. |
8191
+ | `ContextMenu.targetPart` | read-only, reactive | The component the menu was last opened on. |
8192
+ | `ContextMenu.target` | read/write, reactive | The component the menu listens on. |
7913
8193
 
7914
8194
  ### Methods
7915
8195
 
@@ -7917,17 +8197,17 @@ Menus have no strings of their own. Every label, shortcut and name comes from yo
7917
8197
  | --- | --- | --- |
7918
8198
  | `MenuBar.open(item \| index)` | `boolean` | Opens a top-level item's menu with focus on its first item. |
7919
8199
  | `MenuBar.close()` | `void` | Closes the open menu. |
7920
- | `ContextMenu.open(at, target?)` | `boolean` | Opens the menu programmatically, at `{ x, y }` or at an element. |
8200
+ | `ContextMenu.open(at, target?)` | `boolean` | Opens the menu programmatically, at `{ x, y }` or at a component. |
7921
8201
  | `ContextMenu.close()` | `void` | Closes it. |
7922
8202
  | `MenuBar.refresh(), ContextMenu.refresh()` | `void` | Your items can be plain or reactive, and the menu reads them as they are. After changing them in place, call `refresh()`. The bar, the open menu and its submenus update. |
7923
- | `attachContextMenu(target, items)` | `() => void` | Attaches a menu to an element or component. `items` can be a function of the opening event (`e.target`). Returns a function that removes the menu. |
8203
+ | `attachContextMenu(target, items)` | `() => void` | Attaches a menu to a component. `items` can be a function of the opening event (`e.part`). Returns a function that removes the menu. |
7924
8204
 
7925
8205
  ### Events
7926
8206
 
7927
8207
  | Event | When |
7928
8208
  | --- | --- |
7929
8209
  | `onItemClick(e)` | On both components, occurs when an item is selected, after its own `click`. |
7930
- | `ContextMenu.onOpening(e)` | Occurs before the menu opens. `e`: `{ target, items, cancel, byKeyboard, event, source }`. Set `e.items` for the element, or set `e.cancel = true`. |
8210
+ | `ContextMenu.onOpening(e)` | Occurs before the menu opens. `e`: `{ part, items, cancel, byKeyboard, event, source }`. Set `e.items` for the component `part`, or set `e.cancel = true`. |
7931
8211
  | `ContextMenu.onClosed(reason)` | `escape`, `outside`, `focus` or `code`. |
7932
8212
 
7933
8213
  ## Feedback
@@ -7939,7 +8219,7 @@ Loading issues…
7939
8219
 
7940
8220
  # Editors
7941
8221
 
7942
- > Editors · @motifx-community/ui 0.1.0-beta.7
8222
+ > Editors · @motifx-community/ui 0.1.0-beta.8
7943
8223
 
7944
8224
  Editors take values: text, numbers, dates and times, ranges, colors, ratings, codes, files and signatures. They share one field model, so a label, help text, validation and binding work the same in all of them.
7945
8225
 
@@ -8100,7 +8380,7 @@ Loading issues…
8100
8380
 
8101
8381
  # TextBox
8102
8382
 
8103
- > Editors · @motifx-community/ui 0.1.0-beta.7
8383
+ > Editors · @motifx-community/ui 0.1.0-beta.8
8104
8384
 
8105
8385
  A single-line text input with a label, help text and error display. It supports a placeholder, a prefix and suffix, buttons inside the box, a clear button, a password reveal button, a character counter, an input mask and validation, either on its own, in a group, or across all fields in a panel.
8106
8386
 
@@ -8345,7 +8625,7 @@ export default function Validation() {
8345
8625
  }
8346
8626
  ```
8347
8627
 
8348
- Without a group, `validateFields(panel)` validates every field inside a component or element, such as a panel, a dialog or a page.
8628
+ Without a group, `validateFields(panel)` validates every field inside a component, such as a panel, a dialog or a page.
8349
8629
 
8350
8630
  ```tsx
8351
8631
  import { reactive } from '@motifx/core';
@@ -8511,7 +8791,7 @@ export default function Localization() {
8511
8791
  | `validationMessage` | read-only, reactive | The error being displayed, or `''` if there is none. |
8512
8792
  | `validating` | read-only, reactive | Indicates that an asynchronous rule is running. |
8513
8793
  | `maskComplete` | read-only | Indicates that every position of the mask is filled. |
8514
- | `inputElement` | read-only | The native `<input>`. |
8794
+ | `inputPart` | read-only | The native `<input>`. |
8515
8795
 
8516
8796
  ### Methods
8517
8797
 
@@ -8557,7 +8837,7 @@ Loading issues…
8557
8837
 
8558
8838
  # TextArea
8559
8839
 
8560
- > Editors · @motifx-community/ui 0.1.0-beta.7
8840
+ > Editors · @motifx-community/ui 0.1.0-beta.8
8561
8841
 
8562
8842
  A multi-line text input. The box can grow with its content or be resized by the user, and it supports a character counter, a clear button and Ctrl+Enter to submit, along with the label, help text and validation common to all fields.
8563
8843
 
@@ -8840,7 +9120,7 @@ TextArea uses the field tokens (`field.*`, see TextBox) and has none of its own,
8840
9120
  | --- | --- | --- |
8841
9121
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
8842
9122
  | `isValid, validationMessage, validating` | read-only, reactive | The validation result. |
8843
- | `textAreaElement` | read-only | The native `<textarea>`. |
9123
+ | `textAreaPart` | read-only | The native `<textarea>`. |
8844
9124
 
8845
9125
  ### Methods
8846
9126
 
@@ -8870,7 +9150,7 @@ Loading issues…
8870
9150
 
8871
9151
  # NumberBox
8872
9152
 
8873
- > Editors · @motifx-community/ui 0.1.0-beta.7
9153
+ > Editors · @motifx-community/ui 0.1.0-beta.8
8874
9154
 
8875
9155
  A numeric input with arrow key support, PageUp and PageDown, spin buttons that repeat while held, min and max limits, exact decimal stepping, display formats such as currency and percent, and locale-aware input.
8876
9156
 
@@ -9157,7 +9437,7 @@ export default function Localization() {
9157
9437
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. `locale` returns the locale in use. |
9158
9438
  | `formattedValue` | read-only, reactive | The value as displayed without focus, or `''` when empty. |
9159
9439
  | `isValid, validationMessage, validating` | read-only, reactive | The validation result. |
9160
- | `inputElement` | read-only | The native `<input>`. |
9440
+ | `inputPart` | read-only | The native `<input>`. |
9161
9441
 
9162
9442
  ### Methods
9163
9443
 
@@ -9187,7 +9467,7 @@ Loading issues…
9187
9467
 
9188
9468
  # DateBox
9189
9469
 
9190
- > Editors · @motifx-community/ui 0.1.0-beta.7
9470
+ > Editors · @motifx-community/ui 0.1.0-beta.8
9191
9471
 
9192
9472
  An input for a date, a time or both. Users can type through a mask in the locale's order, or pick from a calendar and a list of times. `min`, `max` and `disabledDates` apply to both methods.
9193
9473
 
@@ -9382,7 +9662,7 @@ export default function Localization() {
9382
9662
  | `unfinished` | Indicates that the typed text is not yet a complete, valid date. |
9383
9663
  | `opened, open(), close()` | The picker. |
9384
9664
  | `clear()` | Clears the value. |
9385
- | `inputElement` | The native `<input>`. |
9665
+ | `inputPart` | The native `<input>`. |
9386
9666
  | `onValueChanged, onOpened, onClosed, onValidated` | These work the same way as in DropDown and TextBox. |
9387
9667
 
9388
9668
  The date helpers are shared: `datePatternOf(locale, kind)`, `dateToDigits`, `digitsToDate`.
@@ -9396,7 +9676,7 @@ Loading issues…
9396
9676
 
9397
9677
  # DateRangeBox
9398
9678
 
9399
- > Editors · @motifx-community/ui 0.1.0-beta.7
9679
+ > Editors · @motifx-community/ui 0.1.0-beta.8
9400
9680
 
9401
9681
  A single field for a start date and an end date. Users can type through two masks, or pick from two side-by-side months and a list of presets, within the allowed dates and range length. The value is a `[start, end]` pair.
9402
9682
 
@@ -9581,7 +9861,7 @@ export default function DateTime() {
9581
9861
  | Member | Type | Description |
9582
9862
  | --- | --- | --- |
9583
9863
  | `startDate, endDate` | `Date \| null` | The start and end as separate properties. |
9584
- | `inputElement, endInputElement` | read-only | The start and end inputs. |
9864
+ | `inputPart, endInputPart` | read-only | The start and end inputs. |
9585
9865
  | `open(), close(), opened` | `boolean` / `void` | The popup with the calendars, along with `onOpened` and `onClosed`. |
9586
9866
  | `clear()` | `void` | Clears both ends. |
9587
9867
  | `validate(), validationMessage, isValid` | | Works the same way as on all fields. Validation covers incomplete dates, dates outside `min`, `max` or `disabledDates`, a start after the end, and ranges shorter than `minDays` or longer than `maxDays`. |
@@ -9596,7 +9876,7 @@ Loading issues…
9596
9876
 
9597
9877
  # Signature
9598
9878
 
9599
- > Editors · @motifx-community/ui 0.1.0-beta.7
9879
+ > Editors · @motifx-community/ui 0.1.0-beta.8
9600
9880
 
9601
9881
  A pad to sign on with a pen, a finger or a mouse. The value is the strokes themselves, so a signature can be stored as data, drawn again at any size and exported as an image.
9602
9882
 
@@ -9808,7 +10088,7 @@ Loading issues…
9808
10088
 
9809
10089
  # OtpInput
9810
10090
 
9811
- > Editors · @motifx-community/ui 0.1.0-beta.7
10091
+ > Editors · @motifx-community/ui 0.1.0-beta.8
9812
10092
 
9813
10093
  A one-time code in a row of boxes. Typing, pasting a whole code, the code a phone offers from a message and screen readers work as in any text box, because the boxes are drawn over one real input.
9814
10094
 
@@ -10009,7 +10289,7 @@ Loading issues…
10009
10289
 
10010
10290
  # ColorBox and ColorPicker
10011
10291
 
10012
- > Editors · @motifx-community/ui 0.1.0-beta.7
10292
+ > Editors · @motifx-community/ui 0.1.0-beta.8
10013
10293
 
10014
10294
  A color field with a popup picker, or the picker on its own. The picker has a saturation and brightness area, a hue slider, an opacity slider, channel inputs and preset colors.
10015
10295
 
@@ -10170,7 +10450,7 @@ Loading issues…
10170
10450
 
10171
10451
  # Calendar
10172
10452
 
10173
- > Editors · @motifx-community/ui 0.1.0-beta.7
10453
+ > Editors · @motifx-community/ui 0.1.0-beta.8
10174
10454
 
10175
10455
  A month view for selecting a date, with year and decade views for quick navigation. It serves as the DateBox picker and can also be used on its own.
10176
10456
 
@@ -10314,7 +10594,7 @@ Loading issues…
10314
10594
 
10315
10595
  # Slider
10316
10596
 
10317
- > Editors · @motifx-community/ui 0.1.0-beta.7
10597
+ > Editors · @motifx-community/ui 0.1.0-beta.8
10318
10598
 
10319
10599
  Selects a value on a track by dragging a thumb or using the keyboard. It supports a single number or a range with two thumbs, steps, labeled tick marks, a value tooltip, a vertical orientation and number formatting, along with the label, help text and validation common to all fields.
10320
10600
 
@@ -10656,7 +10936,7 @@ export default function Localization() {
10656
10936
  | Property | Access | Description |
10657
10937
  | --- | --- | --- |
10658
10938
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
10659
- | `thumbElements` | read-only | The thumb elements, `[start, end]`. The end thumb is hidden without `range`. |
10939
+ | `thumbParts` | read-only | The thumbs as components, `[start, end]`. The end thumb is hidden without `range`. |
10660
10940
  | `isValid, validationMessage, validating` | read-only, reactive | These work the same way as on all fields. |
10661
10941
 
10662
10942
  ### Methods
@@ -10683,7 +10963,7 @@ Loading issues…
10683
10963
 
10684
10964
  # Rating
10685
10965
 
10686
- > Editors · @motifx-community/ui 0.1.0-beta.7
10966
+ > Editors · @motifx-community/ui 0.1.0-beta.8
10687
10967
 
10688
10968
  A row of stars for entering or displaying a score, in whole or half steps. Rating is a field, so the label, help text, rules and `x-model` work the same way as on any other field.
10689
10969
 
@@ -10815,7 +11095,7 @@ Loading issues…
10815
11095
 
10816
11096
  # ValidationSummary
10817
11097
 
10818
- > Editors · @motifx-community/ui 0.1.0-beta.7
11098
+ > Editors · @motifx-community/ui 0.1.0-beta.8
10819
11099
 
10820
11100
  Lists the invalid fields of a `ValidationGroup` under a header, with each field's label and message on its own line. Clicking a line moves focus to the field. The summary updates whenever a field in the group is validated or reset, and it is hidden when there are no errors.
10821
11101
 
@@ -10938,7 +11218,7 @@ Loading issues…
10938
11218
 
10939
11219
  # FileUploader
10940
11220
 
10941
- > Editors · @motifx-community/ui 0.1.0-beta.7
11221
+ > Editors · @motifx-community/ui 0.1.0-beta.8
10942
11222
 
10943
11223
  Lets users select files with a button or drop them on the box. Files are listed with their size and status, and can upload automatically, on a button click or programmatically, with progress, cancel, retry and remove for each file. Files that exceed the limits are listed with the reason.
10944
11224
 
@@ -11147,7 +11427,7 @@ Loading issues…
11147
11427
 
11148
11428
  # Choice
11149
11429
 
11150
- > Choice · @motifx-community/ui 0.1.0-beta.7
11430
+ > Choice · @motifx-community/ui 0.1.0-beta.8
11151
11431
 
11152
11432
  Choice components let the reader pick: on or off, one of a few, several of a list, or one of many with search.
11153
11433
 
@@ -11302,7 +11582,7 @@ Loading issues…
11302
11582
 
11303
11583
  # CheckBox
11304
11584
 
11305
- > Choice · @motifx-community/ui 0.1.0-beta.7
11585
+ > Choice · @motifx-community/ui 0.1.0-beta.8
11306
11586
 
11307
11587
  A check box with a label that can be checked, unchecked or indeterminate. It supports an optional three-state cycle, read-only and required states, and validation with its group. It is a native check box styled with design tokens.
11308
11588
 
@@ -11616,7 +11896,7 @@ export default function Localization() {
11616
11896
  | --- | --- | --- |
11617
11897
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
11618
11898
  | `isValid, validationMessage, validating` | read-only, reactive | The result of the last validation. |
11619
- | `inputElement` | read-only | The native `<input type="checkbox">`. |
11899
+ | `inputPart` | read-only | The native `<input type="checkbox">`. |
11620
11900
 
11621
11901
  ### Methods
11622
11902
 
@@ -11646,7 +11926,7 @@ Loading issues…
11646
11926
 
11647
11927
  # Switch
11648
11928
 
11649
- > Choice · @motifx-community/ui 0.1.0-beta.7
11929
+ > Choice · @motifx-community/ui 0.1.0-beta.8
11650
11930
 
11651
11931
  An on/off switch with a label. It has a track with a sliding thumb, optional on/off text inside or next to the track, and read-only and required states. It is a native check box with the switch role.
11652
11932
 
@@ -11868,7 +12148,7 @@ A switch has no strings of its own. `onText` and `offText` are yours and can be
11868
12148
  | --- | --- | --- |
11869
12149
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
11870
12150
  | `isValid, validationMessage, validating` | read-only, reactive | The result of the last validation. |
11871
- | `inputElement` | read-only | The native `<input type="checkbox" role="switch">`. |
12151
+ | `inputPart` | read-only | The native `<input type="checkbox" role="switch">`. |
11872
12152
 
11873
12153
  ### Methods
11874
12154
 
@@ -11896,7 +12176,7 @@ Loading issues…
11896
12176
 
11897
12177
  # RadioGroup
11898
12178
 
11899
- > Choice · @motifx-community/ui 0.1.0-beta.7
12179
+ > Choice · @motifx-community/ui 0.1.0-beta.8
11900
12180
 
11901
12181
  A set of mutually exclusive options. Options can come from plain values, custom objects or a live list, and can be arranged vertically, horizontally or in columns. Individual options can be disabled, hidden or given help text. The group is a single Tab stop, and the arrow keys move between options.
11902
12182
 
@@ -12199,8 +12479,8 @@ The group has no strings of its own. The option text is yours, and functions of
12199
12479
  | --- | --- | --- |
12200
12480
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
12201
12481
  | `isValid, validationMessage, validating` | read-only, reactive | The result of the last validation. |
12202
- | `listElement` | read-only | The element with `role="radiogroup"`. |
12203
- | `inputs` | read-only | The native radios, in item order. |
12482
+ | `listPart` | read-only | The part with `role="radiogroup"`. |
12483
+ | `inputParts` | read-only | The native radios as components, in item order. |
12204
12484
 
12205
12485
  ### Methods
12206
12486
 
@@ -12228,7 +12508,7 @@ Loading issues…
12228
12508
 
12229
12509
  # DropDown
12230
12510
 
12231
- > Choice · @motifx-community/ui 0.1.0-beta.7
12511
+ > Choice · @motifx-community/ui 0.1.0-beta.8
12232
12512
 
12233
12513
  Selects one item from a list. The field shows the selected item, and the list opens below it on click or from the keyboard. The list can be searched, grouped and customized, and it stays fast with thousands of items.
12234
12514
 
@@ -12252,7 +12532,7 @@ export const cities = ['Ankara', 'Antalya', 'Bursa', 'İstanbul', 'İzmir', 'Kon
12252
12532
  Custom objects are read through `textField` and `valueField`, each a property name or a function. `groupField` places options under headers, `enabledField` disables specific options, and a template customizes how an option is drawn.
12253
12533
 
12254
12534
  ```tsx
12255
- import { reactive } from '@motifx/core';
12535
+ import { reactive, type ComponentBase } from '@motifx/core';
12256
12536
  import { DropDown } from '@motifx-community/ui';
12257
12537
 
12258
12538
  interface Country {
@@ -12275,8 +12555,8 @@ const countries: Country[] = [
12275
12555
  ];
12276
12556
 
12277
12557
  /** Draws a country as its flag and its name, in the list and in the field. */
12278
- const drawCountry = (c: Country, host: HTMLElement) => {
12279
- host.textContent = `${c.flag} ${c.name}`;
12558
+ const drawCountry = (c: Country, host: ComponentBase) => {
12559
+ host.setText(`${c.flag} ${c.name}`);
12280
12560
  };
12281
12561
 
12282
12562
  /** Objects read through textField and valueField, under group headers, one that cannot be chosen, drawn with templates. */
@@ -12439,7 +12719,7 @@ export default function Localization() {
12439
12719
  | `searchEnabled` | `Bind<boolean>` | `false` | Adds a search box at the top of the list. |
12440
12720
  | `searchMode` | `Bind<'contains' \| 'startswith'>` | `'contains'` | How the search matches option text. |
12441
12721
  | `clearButton` | `Bind<boolean>` | `false` | Shows a button that clears the value. Escape does the same while the list is closed. |
12442
- | `itemTemplate / fieldTemplate` | `Bind<(item, host) => cleanup \| void>` | — | Customizes how an option or the selected item is drawn. |
12722
+ | `itemTemplate / fieldTemplate` | `Bind<(item, host: ComponentBase) => cleanup \| void>` | — | Customizes how an option or the selected item is drawn. |
12443
12723
  | `matchWidth` | `Bind<boolean>` | `true` | The list is at least as wide as the field. |
12444
12724
  | `label, labelMode, helpText, hint, prefix, icon, buttons, readOnly, required, size, variant, stretch, rules, error, validateOn, validationGroup` | see TextBox | | Field props shared by all editors. |
12445
12725
 
@@ -12559,7 +12839,7 @@ export default function Validation() {
12559
12839
 
12560
12840
  # ComboBox and Autocomplete
12561
12841
 
12562
- > Choice · @motifx-community/ui 0.1.0-beta.7
12842
+ > Choice · @motifx-community/ui 0.1.0-beta.8
12563
12843
 
12564
12844
  A text input with a list that filters as the user types. Items can come from memory or from a data layer source that is searched on the server. `Autocomplete` is the free-text variant, where the value is the text itself.
12565
12845
 
@@ -12781,7 +13061,7 @@ export default function CustomValues() {
12781
13061
 
12782
13062
  # Lookup
12783
13063
 
12784
- > Choice · @motifx-community/ui 0.1.0-beta.7
13064
+ > Choice · @motifx-community/ui 0.1.0-beta.8
12785
13065
 
12786
13066
  Selects one row from a table-style list, typically from a data source searched on the server, such as a customer by company, contact and city. The field shows the text of the selected row, and everything else works as in DropDown.
12787
13067
 
@@ -13001,7 +13281,7 @@ export default function ByKey() {
13001
13281
 
13002
13282
  # Feedback
13003
13283
 
13004
- > Feedback · @motifx-community/ui 0.1.0-beta.7
13284
+ > Feedback · @motifx-community/ui 0.1.0-beta.8
13005
13285
 
13006
13286
  Feedback components tell the reader what is happening: how far a task has come, that something is loading, what a control does, and what has just happened.
13007
13287
 
@@ -13143,7 +13423,7 @@ Loading issues…
13143
13423
 
13144
13424
  # ProgressBar and Spinner
13145
13425
 
13146
- > Feedback · @motifx-community/ui 0.1.0-beta.7
13426
+ > Feedback · @motifx-community/ui 0.1.0-beta.8
13147
13427
 
13148
13428
  ProgressBar shows how far an operation has progressed, as a line or a circle, or indicates activity when the progress is unknown. Spinner shows that the system is busy. It is a rotating ring that can stand alone or cover a panel while it loads, and it can wait for a delay so that quick operations do not cause a flash.
13149
13429
 
@@ -13395,7 +13675,7 @@ export default function Delay() {
13395
13675
 
13396
13676
  ## Covering a panel while it loads
13397
13677
 
13398
- `Spinner.cover(target)` places a spinner over a component or element and returns a function that removes it. The content underneath cannot be clicked or focused. If focus was inside, it moves to the spinner and returns afterward.
13678
+ `Spinner.cover(target)` places a spinner over a component and returns a function that removes it. The content underneath cannot be clicked or focused. If focus was inside, it moves to the spinner and returns afterward.
13399
13679
 
13400
13680
  ```tsx
13401
13681
  import { reactive } from '@motifx/core';
@@ -13541,7 +13821,7 @@ export default function Localization() {
13541
13821
  | `ProgressBar: fraction` | read-only, reactive | The completed share from 0 to 1, or `null` while the progress is unknown. |
13542
13822
  | `Spinner: every prop` | read/write, reactive | Accepts a value or a function, the same as the prop. |
13543
13823
  | `Spinner: waiting` | read-only | Indicates that it is still within its delay. |
13544
- | `Spinner.cover(target, props?)` | `() => void` | Covers a component or element with a spinner. Call the returned function to remove it. See Covering a panel. |
13824
+ | `Spinner.cover(target, props?)` | `() => void` | Covers a component with a spinner. Call the returned function to remove it. See Covering a panel. |
13545
13825
 
13546
13826
  ## Feedback
13547
13827
 
@@ -13552,7 +13832,7 @@ Loading issues…
13552
13832
 
13553
13833
  # Tooltip
13554
13834
 
13555
- > Feedback · @motifx-community/ui 0.1.0-beta.7
13835
+ > Feedback · @motifx-community/ui 0.1.0-beta.8
13556
13836
 
13557
13837
  A short description shown next to an element when the pointer rests on it, when it receives keyboard focus, or programmatically. Users can hover over the tooltip, Escape dismisses it, and only one is open at a time on the page.
13558
13838
 
@@ -13773,7 +14053,7 @@ export default function ShowOn() {
13773
14053
 
13774
14054
  ## Tooltips on many elements
13775
14055
 
13776
- `addTooltip(target, text)` gives an element a tooltip that is created only when first needed. All tooltips on the page share one set of document listeners, so hundreds of them have almost no cost. The function returns a remover.
14056
+ `addTooltip(target, text)` gives a component a tooltip that is created only when first needed. All tooltips on the page share one set of document listeners, so hundreds of them have almost no cost. The function returns a remover.
13777
14057
 
13778
14058
  ```tsx
13779
14059
  import { addTooltip, Button, Stack } from '@motifx-community/ui';
@@ -13856,7 +14136,7 @@ export default function ManyElements() {
13856
14136
 
13857
14137
  | Prop | Type | Default | Description |
13858
14138
  | --- | --- | --- | --- |
13859
- | `target` | `Bind<Element \| ComponentBase \| null>` | — | The element it describes. A function works for a component that appears later in the view (`() => this.save`). |
14139
+ | `target` | `Bind<ComponentBase \| null>` | — | The component it describes. A function works for a component that appears later in the view (`() => this.save`). |
13860
14140
  | `text` | `Bind<string>` | `''` | The tooltip text. |
13861
14141
  | `content` | `Bind<ComponentBase \| null>` | — | Any content after the text, created the first time the tooltip appears. JSX children work too. Do not include interactive content. |
13862
14142
  | `placement` | `Bind<PopupPlacement>` | `'top'` | `top`, `bottom`, `start` or `end`, each with `-start` or `-end`. It opens on the opposite side if there is no room, and start and end follow the reading direction. |
@@ -13899,7 +14179,7 @@ Loading issues…
13899
14179
 
13900
14180
  # Popover
13901
14181
 
13902
- > Feedback · @motifx-community/ui 0.1.0-beta.7
14182
+ > Feedback · @motifx-community/ui 0.1.0-beta.8
13903
14183
 
13904
14184
  Displays content next to a related element, such as a title, a close button, a form or a card. It opens on click or on hover, follows its target, and points to it with an arrow where the design language includes one.
13905
14185
 
@@ -13911,17 +14191,17 @@ import { Popover } from '@motifx-community/ui';
13911
14191
 
13912
14192
  ## Declarative and programmatic
13913
14193
 
13914
- JSX children are the content, and `target` specifies the element or component it opens next to. Programmatically, `content` sets the content, and `open()`, `close()` and `toggle()` control it. `value` and `x-model` report whether it is open.
14194
+ JSX children are the content, and `target` specifies the component it opens next to. Programmatically, `content` sets the content, and `open()`, `close()` and `toggle()` control it. `value` and `x-model` report whether it is open.
13915
14195
 
13916
14196
  ```tsx
13917
- import { reactive } from '@motifx/core';
14197
+ import { reactive, type Component } from '@motifx/core';
13918
14198
  import { Button, Popover, Stack, TextBox } from '@motifx-community/ui';
13919
14199
 
13920
- /** A popover with a title, a close button and a small form, and one created programmatically for a plain element. */
14200
+ /** A popover with a title, a close button and a small form, and one created programmatically for a link. */
13921
14201
  export default function Basic() {
13922
14202
  const s = reactive({ open: false, name: 'Ada', saved: '' });
13923
14203
  let button!: Button;
13924
- let link!: HTMLElement;
14204
+ let link!: Component<HTMLAnchorElement>;
13925
14205
  const coded = new Popover({ title: 'Programmatically', content: new Button({ text: 'OK', variant: 'outline', onclick: () => coded.close() }) });
13926
14206
 
13927
14207
  return (
@@ -13937,7 +14217,7 @@ export default function Basic() {
13937
14217
  <a
13938
14218
  href="#from-code"
13939
14219
  class="po-link"
13940
- ref={(c: { element: HTMLElement }) => (link = c.element)}
14220
+ ref={(c: Component<HTMLAnchorElement>) => (link = c)}
13941
14221
  onclick={(e: Event) => {
13942
14222
  e.preventDefault();
13943
14223
  coded.target = link;
@@ -13956,16 +14236,17 @@ export default function Basic() {
13956
14236
  `showOn: 'hover'` opens the popover after `delay` while the pointer rests on the target, and when the target has keyboard focus. The pointer can move onto the popover, which closes `hideDelay` after the pointer leaves both.
13957
14237
 
13958
14238
  ```tsx
14239
+ import type { Component } from '@motifx/core';
13959
14240
  import { Avatar, Popover, Stack } from '@motifx-community/ui';
13960
14241
 
13961
14242
  /** A card that opens while the pointer rests on a name, or when the name has keyboard focus. */
13962
14243
  export default function Hover() {
13963
- let name!: HTMLElement;
14244
+ let name!: Component<HTMLAnchorElement>;
13964
14245
  return (
13965
14246
  <Stack orientation="horizontal" wrap align="center">
13966
14247
  <span>
13967
14248
  Reviewed by{' '}
13968
- <a href="#ada" class="po-person" ref={(c: { element: HTMLElement }) => (name = c.element)} onclick={(e: Event) => e.preventDefault()}>
14249
+ <a href="#ada" class="po-person" ref={(c: Component<HTMLAnchorElement>) => (name = c)} onclick={(e: Event) => e.preventDefault()}>
13969
14250
  Ada Lovelace
13970
14251
  </a>
13971
14252
  </span>
@@ -14094,7 +14375,7 @@ export default function Events() {
14094
14375
 
14095
14376
  | Prop | Type | Default | Description |
14096
14377
  | --- | --- | --- | --- |
14097
- | `target` | `Bind<Element \| ComponentBase \| null>` | `null` | The element or component it opens next to. |
14378
+ | `target` | `Bind<ComponentBase \| null>` | `null` | The component it opens next to. |
14098
14379
  | `title` | `Bind<string>` | `''` | A title in the header. This is the same property as `text`. |
14099
14380
  | `label` | `Bind<string>` | `''` | The accessible name when there is no title. |
14100
14381
  | `content` | `Bind<ComponentBase \| null>` | `null` | Content set programmatically, shown after the JSX children. |
@@ -14128,7 +14409,7 @@ Loading issues…
14128
14409
 
14129
14410
  # LoadPanel
14130
14411
 
14131
- > Feedback · @motifx-community/ui 0.1.0-beta.7
14412
+ > Feedback · @motifx-community/ui 0.1.0-beta.8
14132
14413
 
14133
14414
  A loading overlay for a container or the whole page. It includes a shade, a panel with the kit spinner and a message, and a Cancel button when the operation can be stopped. The content underneath is unavailable while it is shown, and focus returns afterward.
14134
14415
 
@@ -14140,7 +14421,7 @@ import { LoadPanel } from '@motifx-community/ui';
14140
14421
 
14141
14422
  ## Covering a container
14142
14423
 
14143
- `target` specifies the component or element to cover. `value` or `x-model` shows and hides the panel, or you can call `show()` and `hide()`. `delay` keeps it from flashing during quick operations.
14424
+ `target` specifies the component to cover. `value` or `x-model` shows and hides the panel, or you can call `show()` and `hide()`. `delay` keeps it from flashing during quick operations.
14144
14425
 
14145
14426
  ```tsx
14146
14427
  import { reactive } from '@motifx/core';
@@ -14290,7 +14571,7 @@ export default function Options() {
14290
14571
 
14291
14572
  | Prop | Type | Default | Description |
14292
14573
  | --- | --- | --- | --- |
14293
- | `target` | `Bind<ComponentBase \| HTMLElement \| null>` | `null` | The area to cover, a component or element. `null` covers the whole page. |
14574
+ | `target` | `Bind<ComponentBase \| null>` | `null` | The area to cover, a component. `null` covers the whole page. |
14294
14575
  | `message` | `Bind<string>` | The kit string “Loading…” | The message below the indicator. This is the same property as `text`. |
14295
14576
  | `value` | `Bind<boolean>` | `false` | Indicates whether the panel is shown. `x-model` provides two-way binding. |
14296
14577
  | `delay` | `Bind<number>` | `0` | The delay in milliseconds before it appears. Hiding it before then shows nothing. |
@@ -14320,7 +14601,7 @@ Loading issues…
14320
14601
 
14321
14602
  # Toast
14322
14603
 
14323
- > Feedback · @motifx-community/ui 0.1.0-beta.7
14604
+ > Feedback · @motifx-community/ui 0.1.0-beta.8
14324
14605
 
14325
14606
  Brief notifications at the edge of the window, with four tones, an optional action such as Undo, a custom duration or none, six positions and a limit on how many appear at once. Show them programmatically, or place a custom region in JSX.
14326
14607
 
@@ -14641,7 +14922,7 @@ Loading issues…
14641
14922
 
14642
14923
  # Display
14643
14924
 
14644
- > Display · @motifx-community/ui 0.1.0-beta.7
14925
+ > Display · @motifx-community/ui 0.1.0-beta.8
14645
14926
 
14646
14927
  Display components present content: people, counts and labels, cards, pictures, tiles, events in time, codes to scan, and placeholders while content loads.
14647
14928
 
@@ -14793,7 +15074,7 @@ Loading issues…
14793
15074
 
14794
15075
  # QRCode
14795
15076
 
14796
- > Display · @motifx-community/ui 0.1.0-beta.7
15077
+ > Display · @motifx-community/ui 0.1.0-beta.8
14797
15078
 
14798
15079
  A QR code, drawn as vectors so that it stays sharp at any size. It has no dependencies, chooses the smallest version that holds the text, and can carry a logo.
14799
15080
 
@@ -14976,7 +15257,7 @@ Loading issues…
14976
15257
 
14977
15258
  # Barcode
14978
15259
 
14979
- > Display · @motifx-community/ui 0.1.0-beta.7
15260
+ > Display · @motifx-community/ui 0.1.0-beta.8
14980
15261
 
14981
15262
  A linear barcode, drawn as vectors: Code 128, Code 39, EAN-13, EAN-8, UPC-A or Interleaved 2 of 5. It has no dependencies, works out check digits and refuses a value the format cannot hold.
14982
15263
 
@@ -15173,7 +15454,7 @@ Loading issues…
15173
15454
 
15174
15455
  # Badge
15175
15456
 
15176
- > Display · @motifx-community/ui 0.1.0-beta.7
15457
+ > Display · @motifx-community/ui 0.1.0-beta.8
15177
15458
 
15178
15459
  A short text, count or dot, shown inline or on the corner of a button, avatar or icon. A count above its maximum displays as “99+”, and a count of zero is hidden.
15179
15460
 
@@ -15374,7 +15655,7 @@ Loading issues…
15374
15655
 
15375
15656
  # Avatar and AvatarGroup
15376
15657
 
15377
- > Display · @motifx-community/ui 0.1.0-beta.7
15658
+ > Display · @motifx-community/ui 0.1.0-beta.8
15378
15659
 
15379
15660
  Represents a person with a picture, initials or an icon, with an optional presence indicator on its corner. A group stacks or spreads avatars and counts the ones it does not show.
15380
15661
 
@@ -15602,7 +15883,7 @@ Initials use the capitalization rules of the kit language (`uiLocale`), so “il
15602
15883
  | Property | Access | Description |
15603
15884
  | --- | --- | --- |
15604
15885
  | `every prop above` | read/write | Accepts a value or a function, the same as the prop. |
15605
- | `avatars` | read-only | The elements of the provided avatars in order, including those from JSX lists. The `+N` is not included. |
15886
+ | `members` | read-only | The provided avatars in order, including those from JSX lists. The `+N` is not included. |
15606
15887
  | `hiddenCount` | read-only | The number of people counted in the `+N`, or 0 when it is not shown. |
15607
15888
 
15608
15889
  ### Functions
@@ -15620,7 +15901,7 @@ Loading issues…
15620
15901
 
15621
15902
  # Chip and ChipGroup
15622
15903
 
15623
- > Display · @motifx-community/ui 0.1.0-beta.7
15904
+ > Display · @motifx-community/ui 0.1.0-beta.8
15624
15905
 
15625
15906
  A compact element with short text and an optional leading icon or avatar. Use it as a filter, as a choice among a few options, or to represent a selected item that can be removed. A group handles single or multiple selection and arrow key navigation.
15626
15907
 
@@ -15661,12 +15942,11 @@ import { Chip, Stack, type ChipVariant } from '@motifx-community/ui';
15661
15942
  const VARIANTS: ChipVariant[] = ['filled', 'outline'];
15662
15943
 
15663
15944
  // An inline star, so that the example needs no icon set.
15664
- const star = () => {
15665
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
15666
- svg.setAttribute('viewBox', '0 0 16 16');
15667
- svg.innerHTML = '<path d="M8 1.5l1.9 4.1 4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5z" fill="currentColor"/>';
15668
- return svg;
15669
- };
15945
+ const star = () => (
15946
+ <svg viewBox="0 0 16 16">
15947
+ <path d="M8 1.5l1.9 4.1 4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5z" fill="currentColor" />
15948
+ </svg>
15949
+ );
15670
15950
 
15671
15951
  /** Each appearance: at rest, selected, with an icon, with an avatar, removable and disabled. */
15672
15952
  export default function Looks() {
@@ -15849,7 +16129,7 @@ The remove button's name is the `removeItem` kit string (“Remove {text}”) an
15849
16129
  | --- | --- | --- | --- |
15850
16130
  | `text` | `Bind<string>` | `''` | The text. |
15851
16131
  | `value` | `Bind<unknown>` | Its text | The value it represents in a group. |
15852
- | `icon` | `Bind<IconSource \| null>` | `null` | An icon before the text: an image address, an element or a component. |
16132
+ | `icon` | `Bind<IconSource \| null>` | `null` | An icon before the text: an image address or a component. |
15853
16133
  | `avatar` | `Bind<AvatarProps \| null>` | `null` | An avatar before the text (its props; the chip sets the size). |
15854
16134
  | `selectable` | `Bind<boolean>` | `false` | Pressing the chip toggles it, as a filter. In a group with selection, the group controls it. |
15855
16135
  | `selected` | `Bind<boolean>` | `false` | Indicates whether the chip is on. |
@@ -15906,7 +16186,7 @@ Loading issues…
15906
16186
 
15907
16187
  # Card
15908
16188
 
15909
- > Display · @motifx-community/ui 0.1.0-beta.7
16189
+ > Display · @motifx-community/ui 0.1.0-beta.8
15910
16190
 
15911
16191
  A surface for a single subject, with an optional image, a header with an avatar and titles, content and a row of actions. Empty parts are not rendered.
15912
16192
 
@@ -16136,7 +16416,7 @@ export default function Sizes() {
16136
16416
  | `subtitle` | `Bind<string>` | `''` | Text below the title. |
16137
16417
  | `avatar` | `Bind<AvatarProps \| null>` | `null` | An avatar before the titles (its props). |
16138
16418
  | `action` | `Bind<ComponentBase \| null>` | `null` | Content at the end of the header, such as a menu button or a badge. |
16139
- | `media` | `Bind<IconSource \| null>` | `null` | An image that extends to the card edges: an image address, an element or a component. |
16419
+ | `media` | `Bind<IconSource \| null>` | `null` | An image that extends to the card edges: an image address or a component. |
16140
16420
  | `mediaAlt` | `Bind<string>` | `''` | Alternative text for the image when `media` is an image address. Without it, the image is decorative. |
16141
16421
  | `content` | `Bind<ComponentBase \| null>` | `null` | The content, in addition to JSX children. |
16142
16422
  | `footer` | `Bind<ComponentBase \| null>` | `null` | A row of actions below the content. A replaced component is removed from the card and stays under your control. |
@@ -16168,7 +16448,7 @@ Loading issues…
16168
16448
 
16169
16449
  # Gallery
16170
16450
 
16171
- > Display · @motifx-community/ui 0.1.0-beta.7
16451
+ > Display · @motifx-community/ui 0.1.0-beta.8
16172
16452
 
16173
16453
  Displays a horizontal set of slides, one or several at a time. Users navigate with the side buttons, the indicator dots, swipe gestures or the arrow keys, and it can run as an automatic slideshow. A slide can be an image with a caption or any other content.
16174
16454
 
@@ -16420,7 +16700,7 @@ Loading issues…
16420
16700
 
16421
16701
  # TileView
16422
16702
 
16423
- > Display · @motifx-community/ui 0.1.0-beta.7
16703
+ > Display · @motifx-community/ui 0.1.0-beta.8
16424
16704
 
16425
16705
  Arranges tiles of different sizes on a grid of base cells, where each tile spans a set number of cells. Tiles fill the height in columns and scroll horizontally, or fill the width in rows. They can be selected and reordered by dragging.
16426
16706
 
@@ -16634,7 +16914,7 @@ Loading issues…
16634
16914
 
16635
16915
  # Timeline
16636
16916
 
16637
- > Display · @motifx-community/ui 0.1.0-beta.7
16917
+ > Display · @motifx-community/ui 0.1.0-beta.8
16638
16918
 
16639
16919
  Displays events in chronological order. In the vertical layout, each event is a card next to a line with a marker. In the horizontal layout, events appear along a line of dates, and selecting a date shows that event's card below the line. Dates are formatted in the kit language. For scheduling by the hour, see [Scheduler](scheduler.md).
16640
16920
 
@@ -16816,7 +17096,7 @@ Loading issues…
16816
17096
 
16817
17097
  # Skeleton
16818
17098
 
16819
- > Display · @motifx-community/ui 0.1.0-beta.7
17099
+ > Display · @motifx-community/ui 0.1.0-beta.8
16820
17100
 
16821
17101
  A placeholder that matches the shape of content that is loading, so the page keeps its layout while data arrives. If you provide content, it replaces the placeholder in the same place when loading ends.
16822
17102
 
@@ -16955,7 +17235,7 @@ Loading issues…
16955
17235
 
16956
17236
  # Navigation
16957
17237
 
16958
- > Navigation · @motifx-community/ui 0.1.0-beta.7
17238
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
16959
17239
 
16960
17240
  Navigation components move the reader around an application and lay out its screens: bars at the top and bottom, tabs, paths, steps and pages, panels that slide in, and the containers that arrange everything.
16961
17241
 
@@ -17102,7 +17382,7 @@ Loading issues…
17102
17382
 
17103
17383
  # AppBar
17104
17384
 
17105
- > Navigation · @motifx-community/ui 0.1.0-beta.7
17385
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
17106
17386
 
17107
17387
  The top bar of an application, with a navigation button, a logo, a title, a control and commands. The commands are a `Toolbar`, so those that do not fit move into a menu.
17108
17388
 
@@ -17245,7 +17525,7 @@ export default class Programmatic extends Component<HTMLDivElement> {
17245
17525
  | `title, subtitle` | `Bind<string>` | `''` | The title, and a smaller line under it. |
17246
17526
  | `titleAlign` | `Bind<'start' \| 'center'>` | `'start'` | A centered title stays in the middle of the bar whatever lies beside it. |
17247
17527
  | `headingLevel` | `Bind<number \| null>` | `null` | Makes the title a heading of this level. |
17248
- | `logo` | `Bind<IconSource \| null>` | `null` | An image address, an element or a component before the title. |
17528
+ | `logo` | `Bind<IconSource \| null>` | `null` | An image address or a component before the title. |
17249
17529
  | `navigation` | `Bind<'none' \| 'menu' \| 'back'>` | `'none'` | The button at the start of the bar. |
17250
17530
  | `navigationGlyph` | `Bind<string>` | `'menu'`, `'arrow-start'` | The glyph of that button. The back arrow is mirrored in a right-to-left page. |
17251
17531
  | `navigationLabel` | `Bind<string>` | A kit string | The accessible name of that button. |
@@ -17257,7 +17537,7 @@ export default class Programmatic extends Component<HTMLDivElement> {
17257
17537
  | `prominent` | `Bind<boolean>` | `false` | Puts a larger title on a row of its own under the buttons. |
17258
17538
  | `position` | `Bind<'static' \| 'sticky' \| 'fixed'>` | `'sticky'` | How the bar stays on the page. |
17259
17539
  | `scrollBehavior` | `Bind<'none' \| 'lift' \| 'hide'>` | `'none'` | `lift` raises the bar over the content that scrolls under it. `hide` also moves it away while scrolling down, and brings it back while scrolling up. |
17260
- | `scrollTarget` | `Bind<HTMLElement \| null>` | The nearest ancestor that scrolls | What `scrollBehavior` watches. Without a scrolling ancestor, it is the page. |
17540
+ | `scrollTarget` | `Bind<ComponentBase \| null>` | The nearest ancestor that scrolls | What `scrollBehavior` watches. Without a scrolling ancestor, it is the page. |
17261
17541
 
17262
17542
  ### Events
17263
17543
 
@@ -17300,7 +17580,7 @@ Loading issues…
17300
17580
 
17301
17581
  # BottomNavigation
17302
17582
 
17303
- > Navigation · @motifx-community/ui 0.1.0-beta.7
17583
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
17304
17584
 
17305
17585
  The destinations of an application at the bottom of the screen, each an icon with a label. The bar is one Tab stop, marks the selected item for screen readers and keeps clear of the home indicator of a phone.
17306
17586
 
@@ -17489,7 +17769,7 @@ export default class Programmatic extends Component<HTMLDivElement> {
17489
17769
  | `labelMode` | `Bind<'always' \| 'active' \| 'never'>` | `'always'` | When items show their labels. A label out of view stays as the accessible name of the item. |
17490
17770
  | `position` | `Bind<'fixed' \| 'sticky' \| 'static'>` | `'fixed'` | How the bar stays on the page. |
17491
17771
  | `hideOnScroll` | `Bind<boolean>` | `false` | Moves the bar away while scrolling down, and brings it back while scrolling up. |
17492
- | `scrollTarget` | `Bind<HTMLElement \| null>` | The nearest ancestor that scrolls | What `hideOnScroll` watches. Without a scrolling ancestor, it is the page. |
17772
+ | `scrollTarget` | `Bind<ComponentBase \| null>` | The nearest ancestor that scrolls | What `hideOnScroll` watches. Without a scrolling ancestor, it is the page. |
17493
17773
 
17494
17774
  ### Item fields
17495
17775
 
@@ -17498,7 +17778,7 @@ export default class Programmatic extends Component<HTMLDivElement> {
17498
17778
  | `value` | `string \| number` | Its position | What `value` is when this item is selected. |
17499
17779
  | `text` | `Bind<string>` | — | The label, which is also the accessible name. |
17500
17780
  | `glyph, activeGlyph` | `Bind<string>` | `''` | The glyph, and the glyph while selected. |
17501
- | `icon, activeIcon` | `Bind<IconSource \| null>` | `null` | An image, an element or a component, used instead of a glyph. |
17781
+ | `icon, activeIcon` | `Bind<IconSource \| null>` | `null` | An image address or a component, used instead of a glyph. |
17502
17782
  | `href, rel, target` | `Bind<string>` | `''` | Make the item a link. Use `rel: 'router'` for routed pages. |
17503
17783
  | `badge` | `Bind<number \| null>` | `null` | A count in a badge on the icon. |
17504
17784
  | `dot` | `Bind<boolean>` | `false` | A dot on the icon instead of a count. |
@@ -17562,7 +17842,7 @@ Loading issues…
17562
17842
 
17563
17843
  # Tabs
17564
17844
 
17565
- > Navigation · @motifx-community/ui 0.1.0-beta.7
17845
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
17566
17846
 
17567
17847
  Tabs display one panel at a time below a tab strip. You can define them in JSX or programmatically, and they support closable tabs, icons and badges, scroll buttons when tabs overflow, four placements, and panels that are created on first display.
17568
17848
 
@@ -17995,7 +18275,7 @@ export default function Localization() {
17995
18275
  | `selectedTab` | read-only, reactive | The selected `Tab`, or `null` if there is none. |
17996
18276
  | `Tab.isSelected, Tab.isClosable` | read-only, reactive | Indicate whether the tab is selected and whether it shows a close button. |
17997
18277
  | `Tab.contentBuilt` | read-only | Indicates whether its panel has been created. |
17998
- | `Tab.owner, Tab.headerElement` | read-only | Its `Tabs` and its button in the strip. A tab's own element is its panel. |
18278
+ | `Tab.owner, Tab.headerPart` | read-only | Its `Tabs` and its button in the strip. A tab's own element is its panel. |
17999
18279
 
18000
18280
  ### Methods
18001
18281
 
@@ -18026,7 +18306,7 @@ Loading issues…
18026
18306
 
18027
18307
  # Breadcrumb
18028
18308
 
18029
- > Navigation · @motifx-community/ui 0.1.0-beta.7
18309
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
18030
18310
 
18031
18311
  Shows the path to the current page. Each step is a link or button, and the current page comes last. Steps that do not fit move into a menu after the first step.
18032
18312
 
@@ -18159,7 +18439,7 @@ Loading issues…
18159
18439
 
18160
18440
  # Pagination
18161
18441
 
18162
- > Navigation · @motifx-community/ui 0.1.0-beta.7
18442
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
18163
18443
 
18164
18444
  Navigates through pages of items, with page size options, the current position, navigation buttons and a button for each nearby page. It switches to a compact layout when it does not fit, and it looks and works like the DataGrid pager.
18165
18445
 
@@ -18282,7 +18562,7 @@ Loading issues…
18282
18562
 
18283
18563
  # Stepper
18284
18564
 
18285
- > Navigation · @motifx-community/ui 0.1.0-beta.7
18565
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
18286
18566
 
18287
18567
  Shows the steps of a longer task and the user's progress through them. Each step has an indicator and text, with a line between steps, and steps before the current one are marked complete. [Wizard](wizard.md) adds a page and navigation buttons to each step.
18288
18568
 
@@ -18345,13 +18625,11 @@ Steps before the current one are completed automatically. An item can set `statu
18345
18625
  import { reactive } from '@motifx/core';
18346
18626
  import { Button, Stack, Stepper } from '@motifx-community/ui';
18347
18627
 
18348
- const pencil = () => {
18349
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
18350
- svg.setAttribute('viewBox', '0 0 16 16');
18351
- svg.setAttribute('aria-hidden', 'true');
18352
- svg.innerHTML = '<path d="M11.5 2.5l2 2L5 13H3v-2z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/>';
18353
- return svg;
18354
- };
18628
+ const pencil = () => (
18629
+ <svg viewBox="0 0 16 16" aria-hidden="true">
18630
+ <path d="M11.5 2.5l2 2L5 13H3v-2z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" />
18631
+ </svg>
18632
+ );
18355
18633
 
18356
18634
  /** Completed and failed steps set by the items, an optional step, a disabled step, and an icon in place of the number. */
18357
18635
  export default function Statuses() {
@@ -18528,7 +18806,7 @@ Loading issues…
18528
18806
 
18529
18807
  # Wizard
18530
18808
 
18531
- > Navigation · @motifx-community/ui 0.1.0-beta.7
18809
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
18532
18810
 
18533
18811
  Guides the user through a multi-step task. It combines a [Stepper](stepper.md) above or next to one page per step with Back and Next buttons below. Next validates the page first, and on the last step it finishes the wizard.
18534
18812
 
@@ -18776,7 +19054,7 @@ Loading issues…
18776
19054
 
18777
19055
  # Accordion
18778
19056
 
18779
- > Navigation · @motifx-community/ui 0.1.0-beta.7
19057
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
18780
19058
 
18781
19059
  An accordion expands and collapses sections under their headers. It supports one or several open sections, sections that stay open, icons, three appearances and sections that are created when first opened.
18782
19060
 
@@ -19049,7 +19327,7 @@ export default function VariantsAndSizes() {
19049
19327
  | `items` | read-only, reactive | The items in order. |
19050
19328
  | `expandedItems` | read-only, reactive | The open items. |
19051
19329
  | `AccordionItem.contentBuilt` | read-only | Indicates whether its section has been created. |
19052
- | `AccordionItem.owner, headerElement, regionElement` | read-only | Its `Accordion`, its header button and its region. |
19330
+ | `AccordionItem.owner, headerPart, regionPart` | read-only | Its `Accordion`, its header button and its region. |
19053
19331
 
19054
19332
  ### Methods
19055
19333
 
@@ -19079,7 +19357,7 @@ Loading issues…
19079
19357
 
19080
19358
  # MultiView
19081
19359
 
19082
- > Navigation · @motifx-community/ui 0.1.0-beta.7
19360
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
19083
19361
 
19084
19362
  Displays one page at a time from a horizontal set. Users move between pages with a swipe or drag, and you can navigate with `next()`, `previous()` and `goTo()`, or with [Tabs](tabs.md), a [Stepper](stepper.md) or buttons bound to the same value. It works like the panels of a tab control without the tab strip.
19085
19363
 
@@ -19289,7 +19567,7 @@ Loading issues…
19289
19567
 
19290
19568
  # Window and dialog
19291
19569
 
19292
- > Navigation · @motifx-community/ui 0.1.0-beta.7
19570
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
19293
19571
 
19294
19572
  A window or dialog built on the native `<dialog>` element. A single form can be shown as modeless or modal, depending on how you open it. It has a title bar, can be moved, resized, minimized and maximized, and Enter and Escape activate its buttons. Forms can open other forms, and `messageBox` and `confirm` cover common prompts.
19295
19573
 
@@ -19683,7 +19961,7 @@ export default function Localization() {
19683
19961
  | `closeOnEscape` | `Bind<boolean>` | `true` for modal forms, `false` for modeless forms | Closes the form with `cancel` on Escape when there is no `cancelButton`. |
19684
19962
  | `acceptButton` | `Bind<Control \| null>` | — | The button Enter clicks from a single-line field. |
19685
19963
  | `cancelButton` | `Bind<Control \| null>` | — | The button Escape clicks. |
19686
- | `minimizeTarget` | `Bind<HTMLElement \| ComponentBase \| null>` | — | Where a minimized form leaves a chip that restores it. Without it, the form collapses to its title bar. |
19964
+ | `minimizeTarget` | `Bind<ComponentBase \| null>` | — | Where a minimized form leaves a chip that restores it. Without it, the form collapses to its title bar. |
19687
19965
  | `windowState` | `Bind<FormWindowState>` | `'normal'` | `normal`, `minimized`, `maximized`. |
19688
19966
  | `startPosition` | `Bind<FormStartPosition>` | `'center'` | `center`, or `manual` at `left` and `top`. |
19689
19967
  | `left / top` | `Bind<number \| string>` | — | With `manual`, the position from the start edge (the right edge in RTL) and the top. A number is in pixels. |
@@ -19700,7 +19978,7 @@ export default function Localization() {
19700
19978
  | `result` | read/write, reactive | How the form closed, or will close. `close()` without an argument uses this value. It is `cancel` on open. |
19701
19979
  | `isOpen, isModal, isActive` | read-only, reactive | Indicate whether the form is open, whether it is modal, and whether it is the front window of the page. |
19702
19980
  | `activeControl` | read-only, reactive | The child control that has focus, or last had it. |
19703
- | `contentElement` | read-only | The content area element. |
19981
+ | `contentPart` | read-only | The content area. |
19704
19982
 
19705
19983
  ### Methods
19706
19984
 
@@ -19853,7 +20131,7 @@ export default function DefaultButtons() {
19853
20131
 
19854
20132
  # BottomSheet
19855
20133
 
19856
- > Navigation · @motifx-community/ui 0.1.0-beta.7
20134
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
19857
20135
 
19858
20136
  A panel that slides up from the bottom of the page or a container and stops at set heights: peek, half, full, the height of its content, or custom values. Users can drag it by its handle and title, flick it, and swipe down to close it. It can be modal or non-modal, and the back button closes it on phones.
19859
20137
 
@@ -20135,7 +20413,7 @@ export default function Localization() {
20135
20413
  | `detent` | `Bind<BottomSheetDetent>` | The first of `detents` | The height it opens at and its current height. User changes write to it, and setting it moves the sheet. |
20136
20414
  | `modal` | `Bind<boolean>` | `true` | Blocks everything around it, within its container or on the whole page. Tab stays inside. |
20137
20415
  | `scrim` | `Bind<boolean>` | When modal | Shows a dimmed layer behind it. |
20138
- | `container` | `Bind<HTMLElement \| ComponentBase \| null>` | `null` | Opens over this element, which is made `relative` while open if it is static. `null` opens over the page, in the top layer. |
20416
+ | `container` | `Bind<ComponentBase \| null>` | `null` | Opens over this component, which is made `relative` while open if it is static. `null` opens over the page, in the top layer. |
20139
20417
  | `content, footer` | `Bind<ComponentBase \| null>` | — | Content in addition to JSX children, and a non-scrolling row below it. |
20140
20418
  | `showClose` | `Bind<boolean>` | `false` | Shows a close button next to the title. |
20141
20419
  | `showHandle` | `Bind<boolean>` | `true` | Shows the handle at the top, which is a grip for touch and mouse, and a slider for the keyboard. |
@@ -20161,7 +20439,7 @@ export default function Localization() {
20161
20439
  | `snapTo(detent)` | `boolean` | Moves it to a height, and opens it there if closed. |
20162
20440
  | `expand(), collapse()` | `boolean` | Moves to the next taller or shorter height. Returns `false` at the end. |
20163
20441
  | `isOpen, height` | read-only | Indicates whether it is open (reactive), and its current height in pixels. |
20164
- | `panelElement, contentElement` | read-only | The surface with `role="dialog"`, and the scrolling area. |
20442
+ | `panelPart, contentPart` | read-only | The surface with `role="dialog"`, and the scrolling area. |
20165
20443
  | `onOpening / onOpened` | events | `{ cancel, source }` and `{ source }`. `opened` occurs after the slide-in animation. |
20166
20444
  | `onClosing / onClosed` | events | `{ cancel, reason, source }` and `{ reason, source }`, with `'code'`, `'escape'`, `'scrim'`, `'swipe'`, `'back'`, `'button'` or `'owner'`. A close caused by the owner being disposed cannot be canceled. |
20167
20445
  | `onDetentChanging / onDetentChanged` | events | `{ from, to, byUser, cancel, source }`. `to` can be changed, and if canceled the sheet returns to where it was. |
@@ -20177,7 +20455,7 @@ Loading issues…
20177
20455
 
20178
20456
  # Drawer
20179
20457
 
20180
- > Navigation · @motifx-community/ui 0.1.0-beta.7
20458
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
20181
20459
 
20182
20460
  A panel that slides in from an edge of the page or a container, either over the content or pushing it aside. Users can swipe it in from the edge and back out, and Escape, the scrim and the browser's back action close it.
20183
20461
 
@@ -20388,7 +20666,7 @@ Its default name and the close button come from `uiLocale.strings` (`drawerLabel
20388
20666
  | `value` | `Bind<boolean>` | `false` | Indicates whether it is open. `x-model` provides two-way binding. |
20389
20667
  | `side` | `Bind<'start' \| 'end' \| 'left' \| 'right' \| 'top' \| 'bottom'>` | `'start'` | The edge it slides in from. `start` and `end` follow the reading direction, and `left` and `right` do not. |
20390
20668
  | `mode` | `Bind<'over' \| 'push'>` | `'over'` | Over the content, or pushing `pushTarget` aside by its size. |
20391
- | `pushTarget` | `Bind<HTMLElement \| ComponentBase \| null>` | — | The element `push` moves aside. Without it, `push` behaves like `over`. |
20669
+ | `pushTarget` | `Bind<ComponentBase \| null>` | — | The component `push` moves aside. Without it, `push` behaves like `over`. |
20392
20670
  | `size` | `Bind<number \| string \| null>` | `null` | Its width, or its height from the top or bottom, in pixels or as a CSS length. `null` uses `drawer.size`. It never exceeds 85% of the available space. |
20393
20671
  | `edgeSwipe` | `Bind<boolean>` | `false` | A finger swiping in from the edge of the container or page opens it, and it follows the finger. |
20394
20672
  | `edgeSize` | `Bind<number>` | `24` | The distance from the edge, in pixels, where that swipe can start. |
@@ -20414,7 +20692,7 @@ Loading issues…
20414
20692
 
20415
20693
  # ActionSheet
20416
20694
 
20417
- > Navigation · @motifx-community/ui 0.1.0-beta.7
20695
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
20418
20696
 
20419
20697
  A list of commands that slides up from the bottom of the screen, built from the kit's menu items and sized for touch. It supports a title, a message and a separate Cancel button. A context menu uses it on touch screens.
20420
20698
 
@@ -20502,7 +20780,7 @@ export default function InJsx() {
20502
20780
  `ContextMenu` has a `presentation` prop: `'menu'` (the default), `'sheet'`, or `'auto'`, which opens an action sheet when a finger opened the menu with a long press. The items, `onOpening` and `onItemClick` stay the same.
20503
20781
 
20504
20782
  ```tsx
20505
- import { reactive, type Component } from '@motifx/core';
20783
+ import { reactive, type Component, type ComponentBase } from '@motifx/core';
20506
20784
  import { ContextMenu, RadioGroup, Stack, type ContextMenuPresentation, type MenuItem } from '@motifx-community/ui';
20507
20785
 
20508
20786
  const ROWS = ['Invoice 1042', 'Invoice 1043', 'Invoice 1044'];
@@ -20545,7 +20823,8 @@ export default function FromContextMenu() {
20545
20823
  target={() => list}
20546
20824
  presentation={() => s.presentation}
20547
20825
  onOpening={(e) => {
20548
- const row = (e.target as Element).closest('[data-row]')?.getAttribute('data-row');
20826
+ let row: string | null = null;
20827
+ for (let part: ComponentBase | null = e.part; part && !row; part = part.parent) row = part.attr.get('data-row');
20549
20828
  if (row) e.items = items(row);
20550
20829
  else e.cancel = true;
20551
20830
  }}
@@ -20631,7 +20910,7 @@ Loading issues…
20631
20910
 
20632
20911
  # Layout
20633
20912
 
20634
- > Navigation · @motifx-community/ui 0.1.0-beta.7
20913
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
20635
20914
 
20636
20915
  Container controls for arranging other controls: `Stack` (a row or column), `Grid` (rows and columns), `Panel` (a plain box that can scroll), `GroupBox` (a titled frame), `DockPanel` (children docked to its edges) and `SplitContainer` (two panes with a splitter). All of them are controls, so they can disable and hide their content, and they lay out children added at any time.
20637
20916
 
@@ -21190,9 +21469,9 @@ Every container also has the properties shared by `Control`: `enabled` and `disa
21190
21469
  | --- | --- | --- |
21191
21470
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
21192
21471
  | `SplitContainer.first, second` | read-only | The two panes, as `Panel` objects: `split.first.controls.add(…)`, `split.second.scrollable = true`. |
21193
- | `SplitContainer.splitterElement` | read-only | The `role="separator"` element. |
21472
+ | `SplitContainer.splitterPart` | read-only | The `role="separator"` part. |
21194
21473
  | `SplitContainer.value` | read/write | Maps to `position` for `x-model`. |
21195
- | `GroupBox.legendElement` | read-only | The `<legend>` element. |
21474
+ | `GroupBox.legendPart` | read-only | The `<legend>` part. |
21196
21475
 
21197
21476
  ### Methods
21198
21477
 
@@ -21223,7 +21502,7 @@ Loading issues…
21223
21502
 
21224
21503
  # Splitter
21225
21504
 
21226
- > Navigation · @motifx-community/ui 0.1.0-beta.7
21505
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
21227
21506
 
21228
21507
  Divides space into any number of resizable panes, arranged side by side or stacked. A handle between each pair of panes can be dragged or moved with the keyboard, and it resizes the two panes next to it. Panes can be collapsed from their handle and can contain another splitter. For two panes where one has a fixed size, see [SplitContainer](layout.md).
21229
21508
 
@@ -21435,7 +21714,7 @@ Loading issues…
21435
21714
 
21436
21715
  # Resizable
21437
21716
 
21438
- > Navigation · @motifx-community/ui 0.1.0-beta.7
21717
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
21439
21718
 
21440
21719
  A box that users can resize from its edges and corners with the pointer, or with the arrow keys on the grip in its end corner. It respects minimum and maximum sizes, can stay within an area, and can preserve its aspect ratio.
21441
21720
 
@@ -21471,7 +21750,7 @@ export default function Basic() {
21471
21750
 
21472
21751
  ## Staying within an area and keeping the aspect ratio
21473
21752
 
21474
- `area` keeps the box inside its parent or a specified element, and `keepAspectRatio` adjusts the other dimension. In this example, only the end edge, the bottom edge and the corner between them resize the image.
21753
+ `area` keeps the box inside its parent or a specified component, and `keepAspectRatio` adjusts the other dimension. In this example, only the end edge, the bottom edge and the corner between them resize the image.
21475
21754
 
21476
21755
  ```tsx
21477
21756
  import { Resizable } from '@motifx-community/ui';
@@ -21557,7 +21836,7 @@ export default function Programmatic() {
21557
21836
  | `handles` | `Bind<ResizeHandles>` | `'all'` | `all`, `edges`, `corners`, or a list of `top`, `bottom`, `start`, `end`, `top-start`, `top-end`, `bottom-start` and `bottom-end`. |
21558
21837
  | `minWidth, minHeight` | `Bind<number>` | `30` | The minimum width and height, in pixels. |
21559
21838
  | `maxWidth, maxHeight` | `Bind<number \| null>` | `null` | The maximum width and height, in pixels. `null` means no limit. |
21560
- | `area` | `Bind<'parent' \| HTMLElement \| null>` | `null` | The area the box stays inside: its parent, or an element that contains it. |
21839
+ | `area` | `Bind<'parent' \| ComponentBase \| null>` | `null` | The area the box stays inside: its parent, or a component that contains it. |
21561
21840
  | `keepAspectRatio` | `Bind<boolean>` | `false` | Preserves the ratio of width to height. |
21562
21841
  | `step` | `Bind<number>` | `10` | The number of pixels an arrow key changes an edge. |
21563
21842
  | `width, height` | `Bind<number \| string \| null>` | `null` | The initial size, as a CSS length or in pixels. Without it, the content determines the size. |
@@ -21571,7 +21850,7 @@ export default function Programmatic() {
21571
21850
  | `onResizing` | event | Occurs while the box is being resized (`edge`, and the current `width` and `height`). |
21572
21851
  | `onResized` | event | Occurs when a resize ends, either when the pointer is released or when a key moves an edge. |
21573
21852
  | `currentSize` | read-only | The current size in pixels. |
21574
- | `gripElement` | read-only | The grip in the end corner, which is the Tab stop for keyboard resizing. |
21853
+ | `grip` | read-only | The grip in the end corner, which is the Tab stop for keyboard resizing. |
21575
21854
 
21576
21855
  ## Feedback
21577
21856
 
@@ -21582,7 +21861,7 @@ Loading issues…
21582
21861
 
21583
21862
  # Draggable and DropTarget
21584
21863
 
21585
- > Navigation · @motifx-community/ui 0.1.0-beta.7
21864
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
21586
21865
 
21587
21866
  Makes any content movable with the pointer, touch or the arrow keys, optionally along one axis, inside a boundary, by a handle or as a copy. `DropTarget` defines areas that accept it. To reorder items in a list, see [Sortable](sortable.md).
21588
21867
 
@@ -21594,7 +21873,7 @@ import { Draggable, DropTarget } from '@motifx-community/ui';
21594
21873
 
21595
21874
  ## Moving content
21596
21875
 
21597
- JSX children are the movable content. `boundary` keeps it inside its parent or an element, `axis` limits it to one direction, and `handle` sets the only part that responds to the pointer and keyboard. A drag writes the position to `x-model`, `onDragEnded` reports it, and Escape returns the content to its start.
21876
+ JSX children are the movable content. `boundary` keeps it inside its parent or a component, `axis` limits it to one direction, and `handle` sets the only part that responds to the pointer and keyboard. A drag writes the position to `x-model`, `onDragEnded` reports it, and Escape returns the content to its start.
21598
21877
 
21599
21878
  ```tsx
21600
21879
  import { reactive } from '@motifx/core';
@@ -21746,7 +22025,7 @@ export default function Programmatic() {
21746
22025
  | Prop | Type | Default | Description |
21747
22026
  | --- | --- | --- | --- |
21748
22027
  | `axis` | `Bind<DragAxis>` | `'both'` | `both`, `x` or `y`. |
21749
- | `boundary` | `Bind<'parent' \| HTMLElement \| null>` | `null` | The area it stays inside: its parent, or an element that contains it. |
22028
+ | `boundary` | `Bind<'parent' \| ComponentBase \| null>` | `null` | The area it stays inside: its parent, or a component that contains it. |
21750
22029
  | `handle` | `Bind<string \| null>` | `null` | A selector inside the draggable. Only this part starts a drag, and it receives the Tab stop and keyboard input. |
21751
22030
  | `clone` | `Bind<boolean>` | `false` | A copy follows the pointer and the draggable stays in place, ready to be dropped on a target. |
21752
22031
  | `group` | `Bind<string \| null>` | `null` | Drop targets in the same group accept it. |
@@ -21773,7 +22052,7 @@ export default function Programmatic() {
21773
22052
  | `onDragEnded` | event | Occurs when the drag ends (`x`, `y`, `target`, `dropped`). |
21774
22053
  | `currentPosition` | read-only | The current position. |
21775
22054
  | `isDragging` | read-only | Indicates that a drag is in progress. |
21776
- | `handleElement` | read-only | The element that handles the pointer and keyboard: the handle, or the draggable itself. |
22055
+ | `handlePart` | read-only | The handle that `handle` names, which takes the pointer and the keyboard; `null` when the draggable itself takes them. |
21777
22056
 
21778
22057
  ## Feedback
21779
22058
 
@@ -21784,7 +22063,7 @@ Loading issues…
21784
22063
 
21785
22064
  # ScrollView
21786
22065
 
21787
- > Navigation · @motifx-community/ui 0.1.0-beta.7
22066
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
21788
22067
 
21789
22068
  A scrollable container with configurable scrollbars, pull-to-refresh, and load-on-scroll near the end of the content. You can scroll it programmatically to a position or an element.
21790
22069
 
@@ -21799,7 +22078,7 @@ import { ScrollView } from '@motifx-community/ui';
21799
22078
  JSX children are the content. `showScrollbar` sets when scrollbars appear. `scrollTo` and `scrollToElement` scroll programmatically, and `onScrolled` reports the position.
21800
22079
 
21801
22080
  ```tsx
21802
- import { reactive } from '@motifx/core';
22081
+ import { reactive, type Component } from '@motifx/core';
21803
22082
  import { Button, ScrollView, Stack, type ScrollViewBars } from '@motifx-community/ui';
21804
22083
 
21805
22084
  const LINES = Array.from({ length: 40 }, (_, i) => `Line ${i + 1} of a long text that needs a box of its own to scroll in.`);
@@ -21809,19 +22088,20 @@ const MODES: ScrollViewBars[] = ['onScroll', 'onHover', 'always', 'never'];
21809
22088
  export default function Bars() {
21810
22089
  const s = reactive({ bars: 'onScroll' as ScrollViewBars, top: 0 });
21811
22090
  let view!: ScrollView;
22091
+ const lines: Component<HTMLParagraphElement>[] = [];
21812
22092
  return (
21813
22093
  <Stack gap="md" style="inline-size: 100%">
21814
22094
  <Stack orientation="horizontal" wrap align="center">
21815
22095
  {MODES.map(mode => (
21816
22096
  <Button key={mode} text={mode} size="sm" variant={() => (s.bars === mode ? 'solid' : 'outline')} onclick={() => (s.bars = mode)} />
21817
22097
  ))}
21818
- <Button text="Line 20" variant="outline" size="sm" onclick={() => view.scrollToElement(view.content.element.querySelectorAll('p')[19], true)} />
22098
+ <Button text="Line 20" variant="outline" size="sm" onclick={() => view.scrollToElement(lines[19], true)} />
21819
22099
  <Button text="Top" variant="outline" size="sm" onclick={() => view.scrollTo(0, true)} />
21820
22100
  <output class="sv-top">{() => `scrollTop: ${Math.round(s.top)}`}</output>
21821
22101
  </Stack>
21822
22102
  <ScrollView ref={(v: ScrollView) => (view = v)} label="Long text" class="sv-text" showScrollbar={() => s.bars} style="block-size: 12rem" onScrolled={e => (s.top = e.top)}>
21823
- {LINES.map(line => (
21824
- <p key={line}>{line}</p>
22103
+ {LINES.map((line, i) => (
22104
+ <p key={line} ref={(c: Component<HTMLParagraphElement>) => (lines[i] = c)}>{line}</p>
21825
22105
  ))}
21826
22106
  </ScrollView>
21827
22107
  </Stack>
@@ -21961,7 +22241,7 @@ export default function More() {
21961
22241
  | `onScrolled` | event | Occurs when the position changes: `top`, `left`. |
21962
22242
  | `scrollTo(where, smooth?)` | `void` | Scrolls to a top position, or to `{ top, left }`. `smooth` animates the scroll. |
21963
22243
  | `scrollBy({ top, left }, smooth?)` | `void` | Scrolls by a distance. |
21964
- | `scrollToElement(target, smooth?)` | `void` | Scrolls an element or component of the content into view. |
22244
+ | `scrollToElement(target, smooth?)` | `void` | Scrolls a component of the content into view. |
21965
22245
  | `refresh(), release()` | `void` | Starts a refresh as a pull would, or ends it. |
21966
22246
  | `loadMore(), update()` | `boolean` / `void` | Requests more data now, or checks the position again after the content changes. |
21967
22247
  | `scrollTop, scrollLeft` | read-only | The current scroll position. |
@@ -21977,7 +22257,7 @@ Loading issues…
21977
22257
 
21978
22258
  # Sortable
21979
22259
 
21980
- > Navigation · @motifx-community/ui 0.1.0-beta.7
22260
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
21981
22261
 
21982
22262
  Lets users reorder items by dragging them with the pointer or a finger, or with the keyboard. Lists in the same group can exchange items. A drop moves the element and reports the indexes, while your data stays under your control.
21983
22263
 
@@ -22185,7 +22465,7 @@ export default function Handle() {
22185
22465
  | `onReorder` | event | Occurs when an item moves within this sortable (`fromIndex`, `toIndex`, `item`), by a drop or the keyboard. Reorder your data here. |
22186
22466
  | `onRemove, onAdd` | event | Occur when an item leaves for another sortable in the group and when it arrives, with `from`, `to`, the indexes and the item. Move the data between your arrays here. |
22187
22467
  | `move(fromIndex, toIndex)` | `boolean` | Moves an item programmatically as a drop would, and raises `onReorder`. |
22188
- | `elements` | read-only | The item elements, in order. |
22468
+ | `itemParts()` | `ComponentBase[]` | The components of the items, in order: the rows of `items`, or the children. |
22189
22469
  | `isDragging` | read-only | Indicates that an item is being dragged. |
22190
22470
  | `refresh()` | `void` | Re-reads the items after they have been changed in place. |
22191
22471
 
@@ -22198,7 +22478,7 @@ Loading issues…
22198
22478
 
22199
22479
  # FormLayout
22200
22480
 
22201
- > Navigation · @motifx-community/ui 0.1.0-beta.7
22481
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
22202
22482
 
22203
22483
  Arranges the fields of a data object on a grid. Each field gets an editor, chosen by name or by the type of its value, with two-way binding to the object. Groups, column spans and buttons organize the layout, and submitting the form validates every field first.
22204
22484
 
@@ -22324,7 +22604,7 @@ Loading issues…
22324
22604
 
22325
22605
  # Chart
22326
22606
 
22327
- > Charts · @motifx-community/ui 0.1.0-beta.7
22607
+ > Charts · @motifx-community/ui 0.1.0-beta.8
22328
22608
 
22329
22609
  Displays lines, areas, bars, scatter points and bubbles on a shared value axis. The chart has no dependencies, takes its appearance from the design language, and makes every value available through the keyboard and a table view.
22330
22610
 
@@ -22755,7 +23035,7 @@ export default class Programmatic extends Component<HTMLDivElement> {
22755
23035
 
22756
23036
  # Chart: Lines and areas
22757
23037
 
22758
- > Charts · @motifx-community/ui 0.1.0-beta.7
23038
+ > Charts · @motifx-community/ui 0.1.0-beta.8
22759
23039
 
22760
23040
  Lines and areas show how values change along an axis: over time, or from one category to the next.
22761
23041
 
@@ -22887,7 +23167,7 @@ Loading issues…
22887
23167
 
22888
23168
  # Chart: Bars
22889
23169
 
22890
- > Charts · @motifx-community/ui 0.1.0-beta.7
23170
+ > Charts · @motifx-community/ui 0.1.0-beta.8
22891
23171
 
22892
23172
  Bars compare amounts. They stand on a common baseline, so lengths compare exactly, side by side, stacked, or on their side for long names.
22893
23173
 
@@ -23033,7 +23313,7 @@ export const SALES = [
23033
23313
 
23034
23314
  # Chart: Scatter and bubble
23035
23315
 
23036
- > Charts · @motifx-community/ui 0.1.0-beta.7
23316
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23037
23317
 
23038
23318
  Scatter and bubble charts place each row by two numbers, to show how they relate.
23039
23319
 
@@ -23176,7 +23456,7 @@ Loading issues…
23176
23456
 
23177
23457
  # Chart: Pie and donut
23178
23458
 
23179
- > Charts · @motifx-community/ui 0.1.0-beta.7
23459
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23180
23460
 
23181
23461
  A pie or a donut splits one whole into its parts, for a share seen at a glance.
23182
23462
 
@@ -23305,7 +23585,7 @@ Loading issues…
23305
23585
 
23306
23586
  # Chart: Funnel
23307
23587
 
23308
- > Charts · @motifx-community/ui 0.1.0-beta.7
23588
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23309
23589
 
23310
23590
  A funnel follows a quantity through stages in order, and shows how much of it is left at each one.
23311
23591
 
@@ -23424,7 +23704,7 @@ Loading issues…
23424
23704
 
23425
23705
  # Chart: Radar
23426
23706
 
23427
- > Charts · @motifx-community/ui 0.1.0-beta.7
23707
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23428
23708
 
23429
23709
  A radar compares several measures at once, for one or more items.
23430
23710
 
@@ -23552,7 +23832,7 @@ Loading issues…
23552
23832
 
23553
23833
  # Chart: Heat map
23554
23834
 
23555
- > Charts · @motifx-community/ui 0.1.0-beta.7
23835
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23556
23836
 
23557
23837
  A heat map shows a value for each pair of two categories as a color.
23558
23838
 
@@ -23649,7 +23929,7 @@ Loading issues…
23649
23929
 
23650
23930
  # Chart: Ranges
23651
23931
 
23652
- > Charts · @motifx-community/ui 0.1.0-beta.7
23932
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23653
23933
 
23654
23934
  Ranges show a low and a high value for each position, as a band or as floating bars.
23655
23935
 
@@ -23780,7 +24060,7 @@ Loading issues…
23780
24060
 
23781
24061
  # Chart: Candles
23782
24062
 
23783
- > Charts · @motifx-community/ui 0.1.0-beta.7
24063
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23784
24064
 
23785
24065
  Candles show the first, highest, lowest and last price for each position.
23786
24066
 
@@ -23948,7 +24228,7 @@ Loading issues…
23948
24228
 
23949
24229
  # Chart: Waterfall
23950
24230
 
23951
- > Charts · @motifx-community/ui 0.1.0-beta.7
24231
+ > Charts · @motifx-community/ui 0.1.0-beta.8
23952
24232
 
23953
24233
  A waterfall shows how a starting value becomes an end value through changes up and down.
23954
24234
 
@@ -24063,7 +24343,7 @@ Loading issues…
24063
24343
 
24064
24344
  # Chart: Zoom and large data
24065
24345
 
24066
- > Charts · @motifx-community/ui 0.1.0-beta.7
24346
+ > Charts · @motifx-community/ui 0.1.0-beta.8
24067
24347
 
24068
24348
  Large data stays quick: long lines are thinned to the width with their peaks kept, and the reader zooms in for detail.
24069
24349
 
@@ -24162,7 +24442,7 @@ Loading issues…
24162
24442
 
24163
24443
  # Chart: Live data
24164
24444
 
24165
- > Charts · @motifx-community/ui 0.1.0-beta.7
24445
+ > Charts · @motifx-community/ui 0.1.0-beta.8
24166
24446
 
24167
24447
  A chart follows its data: reactive values redraw it, and live data moves along with the latest values.
24168
24448
 
@@ -24228,7 +24508,7 @@ Loading issues…
24228
24508
 
24229
24509
  # Chart: References and selection
24230
24510
 
24231
- > Charts · @motifx-community/ui 0.1.0-beta.7
24511
+ > Charts · @motifx-community/ui 0.1.0-beta.8
24232
24512
 
24233
24513
  Reference lines and bands give the values a target, a limit or a period, and the reader can choose values to act on.
24234
24514
 
@@ -24358,7 +24638,7 @@ export default function Selection() {
24358
24638
 
24359
24639
  # Sparkline
24360
24640
 
24361
- > Charts · @motifx-community/ui 0.1.0-beta.7
24641
+ > Charts · @motifx-community/ui 0.1.0-beta.8
24362
24642
 
24363
24643
  A chart the size of a word, for a trend beside a number, in a sentence or in a row of a table. It draws a line, an area, bars, or wins and losses, and marks the values that matter.
24364
24644
 
@@ -24481,7 +24761,7 @@ Loading issues…
24481
24761
 
24482
24762
  # Gauge
24483
24763
 
24484
- > Gauges · @motifx-community/ui 0.1.0-beta.7
24764
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
24485
24765
 
24486
24766
  Shows a value against its scale, as an arc, a circle or a straight bar. Ranges give stretches of the scale a meaning, markers and marks point at values, and every part takes its look from the design language.
24487
24767
 
@@ -24637,7 +24917,7 @@ Loading issues…
24637
24917
 
24638
24918
  # Gauge: Circular
24639
24919
 
24640
- > Gauges · @motifx-community/ui 0.1.0-beta.7
24920
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
24641
24921
 
24642
24922
  A circular gauge shows its value on an arc or a whole circle, with the value written in the middle. It reads best for one value whose scale the reader knows, such as a speed or a share.
24643
24923
 
@@ -24742,7 +25022,7 @@ Loading issues…
24742
25022
 
24743
25023
  # Gauge: Linear
24744
25024
 
24745
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25025
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
24746
25026
 
24747
25027
  A linear gauge shows its value on a straight bar, across or upright. Bars fit in narrow places, line up in lists, and compare well side by side.
24748
25028
 
@@ -24830,7 +25110,7 @@ Loading issues…
24830
25110
 
24831
25111
  # Gauge: Scales
24832
25112
 
24833
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25113
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
24834
25114
 
24835
25115
  The scale tells the reader how to read the value: its ends, ticks with their values, or nothing at all.
24836
25116
 
@@ -24951,7 +25231,7 @@ Loading issues…
24951
25231
 
24952
25232
  # Gauge: Ranges
24953
25233
 
24954
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25234
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
24955
25235
 
24956
25236
  Ranges give stretches of the scale a meaning, such as normal, high and critical. They show as a band beside the track, and the fill takes the color of the range its value is in.
24957
25237
 
@@ -25088,7 +25368,7 @@ Loading issues…
25088
25368
 
25089
25369
  # Gauge: Markers
25090
25370
 
25091
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25371
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25092
25372
 
25093
25373
  A marker points at the value: a needle from the middle of an arc, a shape on or beside the track, or a callout that writes the value.
25094
25374
 
@@ -25227,7 +25507,7 @@ Loading issues…
25227
25507
 
25228
25508
  # Gauge: Marks
25229
25509
 
25230
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25510
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25231
25511
 
25232
25512
  Marks show other values on the scale besides the gauge's own, such as a target, a limit, or the lowest and highest expected.
25233
25513
 
@@ -25339,7 +25619,7 @@ Loading issues…
25339
25619
 
25340
25620
  # Gauge: Base value
25341
25621
 
25342
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25622
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25343
25623
 
25344
25624
  The fill starts at the start of the scale, or at a base value inside it. A scale with values on both sides of a target then fills from the target, either way.
25345
25625
 
@@ -25421,7 +25701,7 @@ Loading issues…
25421
25701
 
25422
25702
  # Gauge: Dashboards
25423
25703
 
25424
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25704
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25425
25705
 
25426
25706
  Gauges of different kinds put together, all following the same values. Each gauge keeps its own scale, so readers compare values by their meaning, not by size alone.
25427
25707
 
@@ -25559,7 +25839,7 @@ Loading issues…
25559
25839
 
25560
25840
  # BarGauge
25561
25841
 
25562
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25842
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25563
25843
 
25564
25844
  Shows several values side by side as bars bent round one middle, each against the same scale. It compares a few values at a glance, in little room.
25565
25845
 
@@ -25661,7 +25941,7 @@ Loading issues…
25661
25941
 
25662
25942
  # BarGauge: Labels and legend
25663
25943
 
25664
- > Gauges · @motifx-community/ui 0.1.0-beta.7
25944
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25665
25945
 
25666
25946
  Each value can be written at the end of its bar, named in a legend, and shown with its name under the pointer.
25667
25947
 
@@ -25743,7 +26023,7 @@ Loading issues…
25743
26023
 
25744
26024
  # BarGauge: Data
25745
26025
 
25746
- > Gauges · @motifx-community/ui 0.1.0-beta.7
26026
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25747
26027
 
25748
26028
  A bar gauge reads numbers, or rows through their fields, and follows them as they change.
25749
26029
 
@@ -25869,7 +26149,7 @@ Loading issues…
25869
26149
 
25870
26150
  # BarGauge: Angles and size
25871
26151
 
25872
- > Gauges · @motifx-community/ui 0.1.0-beta.7
26152
+ > Gauges · @motifx-community/ui 0.1.0-beta.8
25873
26153
 
25874
26154
  How far the bars go round and which way they face fit a bar gauge to the room it has.
25875
26155
 
@@ -25960,7 +26240,7 @@ Loading issues…
25960
26240
 
25961
26241
  # Data
25962
26242
 
25963
- > Data · @motifx-community/ui 0.1.0-beta.7
26243
+ > Data · @motifx-community/ui 0.1.0-beta.8
25964
26244
 
25965
26245
  Data components show and pick from structured data: hierarchies, lists, sets of tags, and filters that the reader builds. Tables have their own group: see [DataGrid](datagrid.md).
25966
26246
 
@@ -26091,7 +26371,7 @@ Loading issues…
26091
26371
 
26092
26372
  # TreeView
26093
26373
 
26094
- > Data · @motifx-community/ui 0.1.0-beta.7
26374
+ > Data · @motifx-community/ui 0.1.0-beta.8
26095
26375
 
26096
26376
  Displays items in a hierarchy. Rows can be expanded and collapsed, selected individually or in groups, and searched. Check boxes can roll up to parent rows, and children can load on demand when a row is first expanded. Large trees render only the visible rows.
26097
26377
 
@@ -26343,7 +26623,7 @@ export default function Localization() {
26343
26623
  | `size` | `Bind<ControlSize>` | `'md'` | `sm`, `md`, `lg`, from the density tokens. |
26344
26624
  | `label` | `Bind<string>` | `''` | The accessible name of the tree. `aria-label` and `aria-labelledby` on the tag also work. |
26345
26625
  | `virtualFrom` | `Bind<number>` | `500` | When more rows than this are on screen, only the visible rows are rendered. |
26346
- | `itemTemplate` | `Bind<(item, host) => cleanup \| void>` | — | Customizes the content of a row. |
26626
+ | `itemTemplate` | `Bind<(item, host: ComponentBase) => cleanup \| void>` | — | Customizes the content of a row. |
26347
26627
  | `enabled / disabled, visible, tabStop, tabIndex` | see Control | | Properties shared by all controls. |
26348
26628
 
26349
26629
  ### Properties
@@ -26352,7 +26632,7 @@ export default function Localization() {
26352
26632
  | --- | --- | --- |
26353
26633
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
26354
26634
  | `selectedItems, checkedItems` | read-only, reactive | The selected or checked items, in tree order. |
26355
- | `treeElement` | read-only | The element with `role="tree"`. |
26635
+ | `treePart` | read-only | The part with `role="tree"`. |
26356
26636
 
26357
26637
  ### Methods
26358
26638
 
@@ -26546,25 +26826,19 @@ export default function FileExplorer() {
26546
26826
  }
26547
26827
  ```
26548
26828
 
26549
- `icon.ts`
26829
+ `icon.tsx`
26550
26830
 
26551
26831
  ```tsx
26552
- const SVG = 'http://www.w3.org/2000/svg';
26553
-
26554
26832
  export const FOLDER = 'M1.5 3.5h5l1.5 1.5h6.5v8h-13z';
26555
26833
  export const FILE = 'M3.5 1.5h6l3 3v10h-9zM9.5 1.5v3h3';
26556
26834
 
26557
- /** A small outline icon, a new element for each row. */
26558
- export function icon(path: string): SVGSVGElement {
26559
- const svg = document.createElementNS(SVG, 'svg');
26560
- svg.setAttribute('viewBox', '0 0 16 16');
26561
- const line = svg.appendChild(document.createElementNS(SVG, 'path'));
26562
- line.setAttribute('d', path);
26563
- line.setAttribute('fill', 'none');
26564
- line.setAttribute('stroke', 'currentColor');
26565
- line.setAttribute('stroke-width', '1.2');
26566
- line.setAttribute('stroke-linejoin', 'round');
26567
- return svg;
26835
+ /** A small outline icon, a new component for each row. */
26836
+ export function icon(path: string) {
26837
+ return (
26838
+ <svg viewBox="0 0 16 16">
26839
+ <path d={path} fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" />
26840
+ </svg>
26841
+ );
26568
26842
  }
26569
26843
  ```
26570
26844
 
@@ -26726,6 +27000,7 @@ export default function Search() {
26726
27000
  `FlatData.tsx`
26727
27001
 
26728
27002
  ```tsx
27003
+ import type { ComponentBase } from '@motifx/core';
26729
27004
  import { Panel, TreeView } from '@motifx-community/ui';
26730
27005
  import type { Entry } from './entry';
26731
27006
 
@@ -26747,13 +27022,9 @@ const MAIL: Entry[] = [
26747
27022
 
26748
27023
  /** Flat rows that name their parent, a text field given as a function, and rows drawn by a template. */
26749
27024
  export default function FlatData() {
26750
- const withCount = (item: Entry, host: HTMLElement) => {
26751
- host.append(item.text);
26752
- if (item.count) {
26753
- const badge = document.createElement('strong');
26754
- badge.textContent = ` · ${item.count}`;
26755
- host.append(badge);
26756
- }
27025
+ const withCount = (item: Entry, host: ComponentBase) => {
27026
+ host.controls.add(<span>{item.text}</span>);
27027
+ if (item.count) host.controls.add(<strong>{` · ${item.count}`}</strong>);
26757
27028
  };
26758
27029
  return (
26759
27030
  <>
@@ -26862,7 +27133,7 @@ export default function SizesAndLines() {
26862
27133
 
26863
27134
  # ListBox
26864
27135
 
26865
- > Data · @motifx-community/ui 0.1.0-beta.7
27136
+ > Data · @motifx-community/ui 0.1.0-beta.8
26866
27137
 
26867
27138
  A list displayed directly on the page. Users select one or more items with the keyboard or pointer. Items can come from memory or a data source, can be searched and grouped, and long lists render only the visible rows.
26868
27139
 
@@ -26896,7 +27167,7 @@ export const cities = ['Ankara', 'Antalya', 'Bursa', 'İstanbul', 'İzmir', 'Kon
26896
27167
  Custom objects are read through `textField` and `valueField`. `groupField` places items under headers, `enabledField` disables specific items, and `itemTemplate` customizes how an item is drawn.
26897
27168
 
26898
27169
  ```tsx
26899
- import { reactive } from '@motifx/core';
27170
+ import { reactive, type ComponentBase } from '@motifx/core';
26900
27171
  import { ListBox } from '@motifx-community/ui';
26901
27172
 
26902
27173
  interface Country {
@@ -26930,8 +27201,8 @@ export default function Countries() {
26930
27201
  valueField="code"
26931
27202
  groupField="region"
26932
27203
  enabledField={(c: Country) => c.member !== false}
26933
- itemTemplate={(c: Country, host: HTMLElement) => {
26934
- host.textContent = `${c.flag} ${c.name}`;
27204
+ itemTemplate={(c: Country, host: ComponentBase) => {
27205
+ host.setText(`${c.flag} ${c.name}`);
26935
27206
  }}
26936
27207
  height={8}
26937
27208
  x-model={() => form.country}
@@ -27082,7 +27353,7 @@ export default function Localization() {
27082
27353
  | `searchMode` | `Bind<'contains' \| 'startswith'>` | `'contains'` | How the search matches in-memory items. |
27083
27354
  | `searchDelay` | `Bind<number>` | `0` / `250` | The delay, in milliseconds, between the last keystroke and the search (in memory / with a data source). |
27084
27355
  | `height` | `Bind<number \| string \| null>` | — | The height, in rows (`8`) or a CSS length (`"12rem"`). Without it, the list is as tall as its items, up to the `max-height` of the list (`list.container`). |
27085
- | `itemTemplate` | `Bind<(item, host) => cleanup \| void>` | — | Customizes how an item is drawn. |
27356
+ | `itemTemplate` | `Bind<(item, host: ComponentBase) => cleanup \| void>` | — | Customizes how an item is drawn. |
27086
27357
  | `noItemsText` | `Bind<string>` | — | The text for an empty list, which replaces the `uiLocale` “No items” string. |
27087
27358
  | `label, labelMode, helpText, hint, readOnly, required, size, variant, stretch, rules, error, validateOn, validationGroup` | see TextBox | | Field props shared by all editors. |
27088
27359
 
@@ -27244,7 +27515,7 @@ export default function Validation() {
27244
27515
 
27245
27516
  # TagBox
27246
27517
 
27247
- > Data · @motifx-community/ui 0.1.0-beta.7
27518
+ > Data · @motifx-community/ui 0.1.0-beta.8
27248
27519
 
27249
27520
  Selects multiple items. Selected items appear as tags in the field, followed by a text input that searches the list. Items can come from memory or from a data source, and typed text can become a custom tag.
27250
27521
 
@@ -27269,7 +27540,7 @@ export const skills = ['CSS', 'Go', 'HTML', 'Java', 'JavaScript', 'Kotlin', 'Pyt
27269
27540
  The list stays open during selection, shows selected items as checked, and can include a “Select all” row. Each option is a prop you can bind.
27270
27541
 
27271
27542
  ```tsx
27272
- import { reactive } from '@motifx/core';
27543
+ import { reactive, type ComponentBase } from '@motifx/core';
27273
27544
  import { Stack, Switch, TagBox } from '@motifx-community/ui';
27274
27545
 
27275
27546
  interface Person {
@@ -27291,12 +27562,11 @@ const people: Person[] = [
27291
27562
  ];
27292
27563
 
27293
27564
  /** Draws a person as initials and a name. */
27294
- const drawPerson = (p: Person, el: HTMLElement) => {
27295
- const badge = el.appendChild(document.createElement('span'));
27296
- badge.style.color = 'var(--mx-color-accent-fg)';
27297
- badge.style.fontWeight = 'var(--mx-font-weight-semibold)';
27298
- badge.textContent = p.initials;
27299
- el.append(` ${p.name}`);
27565
+ const drawPerson = (p: Person, host: ComponentBase) => {
27566
+ host.controls.add(
27567
+ <span style="color: var(--mx-color-accent-fg); font-weight: var(--mx-font-weight-semibold)">{p.initials}</span>,
27568
+ <span>{` ${p.name}`}</span>,
27569
+ );
27300
27570
  };
27301
27571
 
27302
27572
  /** Objects in groups, items that cannot be chosen, a template, and the switches of the list. */
@@ -27474,7 +27744,7 @@ export const skills = ['CSS', 'Go', 'HTML', 'Java', 'JavaScript', 'Kotlin', 'Pyt
27474
27744
  | `hideSelected` | `Bind<boolean>` | `false` | Removes selected items from the list (in-memory items only). |
27475
27745
  | `openOnFieldClick` | `Bind<boolean>` | `true` | Clicking the field opens the list. |
27476
27746
  | `showDropDownButton, clearButton` | `Bind<boolean>` | `true`, `false` | The arrow that opens all items, and the button that removes all tags. |
27477
- | `itemTemplate, tagTemplate` | `Bind<(item, host) => cleanup \| void>` | — | Customizes how a list item or a tag is drawn. |
27747
+ | `itemTemplate, tagTemplate` | `Bind<(item, host: ComponentBase) => cleanup \| void>` | — | Customizes how a list item or a tag is drawn. |
27478
27748
  | `matchWidth` | `Bind<boolean>` | `true` | The list is at least as wide as the field. |
27479
27749
  | `label, labelMode, helpText, hint, prefix, icon, readOnly, required, size, variant, stretch, rules, error, validateOn, validationGroup` | see TextBox | | Field props shared by all editors. |
27480
27750
 
@@ -27486,7 +27756,7 @@ export const skills = ['CSS', 'Go', 'HTML', 'Java', 'JavaScript', 'Kotlin', 'Pyt
27486
27756
  | `selectedItems` | read-only, reactive | The known items for the selected values. With a data source, the others are looked up by key. |
27487
27757
  | `listItems` | read-only | The `DataItems` shown in the list, which are the results of the last search. |
27488
27758
  | `opened` | read/write, reactive | Indicates whether the list is open. Set it to open or close the list. |
27489
- | `inputElement` | read-only | The text input. |
27759
+ | `inputPart` | read-only | The text input. |
27490
27760
 
27491
27761
  ### Methods
27492
27762
 
@@ -27613,7 +27883,7 @@ export default function Localization() {
27613
27883
 
27614
27884
  # FilterBuilder
27615
27885
 
27616
- > Data · @motifx-community/ui 0.1.0-beta.7
27886
+ > Data · @motifx-community/ui 0.1.0-beta.8
27617
27887
 
27618
27888
  Lets users build a filter visually, using groups joined by And, Or, Not And or Not Or, and conditions made of a field, an operation and a value. Its value is a data layer filter expression, so it works directly with in-memory rows and every adapter. DataGrid opens it from the filter panel, and you can also use it on its own for reports or saved searches.
27619
27889
 
@@ -27973,7 +28243,7 @@ export const saleFields: FilterBuilderField[] = [
27973
28243
  | `root` | read-only | The tree: `{ kind: 'group', operation, items, parent }` containing `{ kind: 'condition', field, operation, value, parent }` items. Change it through the methods. |
27974
28244
  | `filterText` | read-only, reactive | The filter as a single line: `[City] Equals 'Ankara' And [Amount] Is greater than '100'`. |
27975
28245
  | `model` | read-only | The `FilterBuilderModel`, which provides field operations, text, and conversion between expressions and the tree. |
27976
- | `treeElement, editingCondition` | read-only | The `role="treegrid"` element, and the condition whose editor is open. |
28246
+ | `treePart, editingCondition` | read-only | The `role="treegrid"` part, and the condition whose editor is open. |
27977
28247
 
27978
28248
  ### Methods
27979
28249
 
@@ -28218,11 +28488,1250 @@ export default function Localization() {
28218
28488
  ```
28219
28489
 
28220
28490
 
28491
+ ---
28492
+
28493
+ # RibbonMenu
28494
+
28495
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
28496
+
28497
+ The commands of an application in tabs, each tab in named groups of large, medium and small commands. It adapts to the room it has, can show only its tabs or hide itself, and lets users arrange it to their liking. The menu holds nothing of its own: the tabs, the groups and the commands are given by the application.
28498
+
28499
+ ## Import
28500
+
28501
+ ```tsx
28502
+ import { RibbonMenu, type RibbonTab, type RibbonGroup, type RibbonCommand } from '@motifx-community/ui';
28503
+ ```
28504
+
28505
+ ## A document editor
28506
+
28507
+ Each tab has groups, and each group has commands. A tab’s groups are created the first time the tab is shown, and kept. The button before the tabs opens the app’s main menu, the quick commands stand beside it, and the end of the row holds the app’s own search and share button. Choose a picture to see the tab of its context, right-click a command to arrange the menu, and tap Alt to see the key hints.
28508
+
28509
+ ```tsx
28510
+ import { reactive } from '@motifx/core';
28511
+ import { AppMenu, Button, DropDown, NumberBox, RibbonMenu, Stack, Switch, TextBox, type RibbonCommand, type RibbonTab } from '@motifx-community/ui';
28512
+
28513
+ const FONTS = ['Sans', 'Serif', 'Mono'];
28514
+
28515
+ const STYLES = [
28516
+ { key: 'normal', text: 'Normal', look: 'font-size: 0.875rem' },
28517
+ { key: 'heading1', text: 'Heading 1', look: 'font-size: 1.125rem; font-weight: 700' },
28518
+ { key: 'heading2', text: 'Heading 2', look: 'font-size: 1rem; font-weight: 600' },
28519
+ { key: 'title', text: 'Title', look: 'font-size: 1.25rem' },
28520
+ { key: 'quote', text: 'Quote', look: 'font-style: italic' },
28521
+ { key: 'code', text: 'Code', look: 'font-family: monospace' }
28522
+ ];
28523
+
28524
+ const letter = (text: string, style: string) => () => <span class="rb-letter" style={style}>{text}</span>;
28525
+
28526
+ /** The commands of a document editor: every tab, group and command is given by the app. */
28527
+ export default function Editor() {
28528
+ const s = reactive({ style: 'normal', menu: false, tab: 'home', told: 'nothing yet', bold: false, italic: false, underline: false, ruler: true, grid: false, picture: false, font: 'Sans', size: 11 });
28529
+ const run = (what: string) => () => (s.told = what);
28530
+
28531
+ const items: RibbonTab[] = [
28532
+ {
28533
+ key: 'home',
28534
+ text: '&Home',
28535
+ groups: [
28536
+ {
28537
+ text: 'Clipboard',
28538
+ glyph: 'file',
28539
+ more: run('clipboard options'),
28540
+ commands: [
28541
+ { text: 'Paste', glyph: 'file', size: 'large', type: 'split', click: run('paste'), menu: [{ text: 'Keep source look', click: run('paste: keep look') }, { text: 'Keep text only', click: run('paste: text only') }] },
28542
+ { text: 'Cut', glyph: 'trash', click: run('cut') },
28543
+ { text: 'Copy', glyph: 'file', click: run('copy') },
28544
+ { text: 'Copy look', glyph: 'eyedropper', click: run('copy look') }
28545
+ ]
28546
+ },
28547
+ {
28548
+ text: 'Font',
28549
+ glyph: 'pencil',
28550
+ more: run('font options'),
28551
+ commands: [
28552
+ { type: 'content', content: () => <DropDown label="Font" labelMode="hidden" size="sm" style="inline-size: 9rem" items={FONTS} x-model={() => s.font} /> },
28553
+ { type: 'content', content: () => <NumberBox label="Size" labelMode="hidden" size="sm" style="inline-size: 6.5rem" min={6} max={96} x-model={() => s.size} /> },
28554
+ {
28555
+ type: 'row',
28556
+ commands: [
28557
+ { text: 'Bold', icon: letter('B', 'font-weight: 700'), type: 'toggle', pressed: () => s.bold, click: () => (s.bold = !s.bold) },
28558
+ { text: 'Italic', icon: letter('I', 'font-style: italic'), type: 'toggle', pressed: () => s.italic, click: () => (s.italic = !s.italic) },
28559
+ { text: 'Underline', icon: letter('U', 'text-decoration: underline'), type: 'toggle', pressed: () => s.underline, click: () => (s.underline = !s.underline) }
28560
+ ]
28561
+ }
28562
+ ]
28563
+ },
28564
+ {
28565
+ text: 'Styles',
28566
+ glyph: 'star',
28567
+ priority: 2,
28568
+ commands: [
28569
+ {
28570
+ type: 'gallery',
28571
+ text: 'Styles',
28572
+ columns: 3,
28573
+ value: () => s.style,
28574
+ items: STYLES.map(st => ({ key: st.key, text: st.text, icon: () => <span class="rb-style" style={st.look}>Aa</span> })),
28575
+ click: e => {
28576
+ s.style = String(e.item?.key);
28577
+ s.told = `style: ${e.item?.text}`;
28578
+ }
28579
+ }
28580
+ ]
28581
+ },
28582
+ {
28583
+ text: 'Editing',
28584
+ glyph: 'search',
28585
+ priority: 1,
28586
+ commands: [
28587
+ { text: 'Find', glyph: 'search', click: run('find') },
28588
+ { text: 'Replace', glyph: 'pencil', click: run('replace') },
28589
+ { text: 'Select', glyph: 'check', type: 'menu', menu: [{ text: 'Select all', click: run('select all') }, { text: 'Select similar', click: run('select similar') }] }
28590
+ ]
28591
+ }
28592
+ ]
28593
+ },
28594
+ {
28595
+ key: 'insert',
28596
+ text: '&Insert',
28597
+ groups: [
28598
+ {
28599
+ text: 'Tables',
28600
+ commands: [{ text: 'Table', glyph: 'table', size: 'large', type: 'menu', menu: [{ text: 'Insert a table', click: run('insert table') }, { text: 'Draw a table', click: run('draw table') }] }]
28601
+ },
28602
+ {
28603
+ text: 'Illustrations',
28604
+ commands: [
28605
+ { text: 'Chart', glyph: 'chart', size: 'large', click: run('chart') },
28606
+ { type: 'separator' },
28607
+ { text: 'Picture', glyph: 'file', click: run('picture') },
28608
+ { text: 'Date', glyph: 'calendar', click: run('date') },
28609
+ { text: 'Time', glyph: 'clock', click: run('time') }
28610
+ ]
28611
+ }
28612
+ ]
28613
+ },
28614
+ {
28615
+ key: 'view',
28616
+ text: '&View',
28617
+ groups: [
28618
+ {
28619
+ text: 'Show',
28620
+ commands: [
28621
+ { text: 'Ruler', glyph: 'columns', type: 'toggle', pressed: () => s.ruler, click: () => (s.ruler = !s.ruler) },
28622
+ { text: 'Grid', glyph: 'table', type: 'toggle', pressed: () => s.grid, click: () => (s.grid = !s.grid) }
28623
+ ]
28624
+ },
28625
+ { text: 'Zoom', commands: [{ text: 'Zoom out', glyph: 'zoom-out', size: 'large', click: run('zoom out') }] }
28626
+ ]
28627
+ },
28628
+ {
28629
+ key: 'picture',
28630
+ text: 'Picture &format',
28631
+ context: 'Picture',
28632
+ visible: () => s.picture,
28633
+ groups: [
28634
+ {
28635
+ text: 'Adjust',
28636
+ commands: [
28637
+ { text: 'Crop', glyph: 'split', size: 'large', click: run('crop') },
28638
+ { text: 'Rotate', glyph: 'repeat', click: run('rotate') },
28639
+ { text: 'Lock', glyph: 'lock', click: run('lock') }
28640
+ ]
28641
+ }
28642
+ ]
28643
+ }
28644
+ ];
28645
+
28646
+ const quick: RibbonCommand[] = [
28647
+ { key: 'save', text: 'Save', glyph: 'save', click: run('save') },
28648
+ { key: 'undo', text: 'Undo', glyph: 'undo', click: run('undo') }
28649
+ ];
28650
+
28651
+ return (
28652
+ <Stack gap="md" style="inline-size: 100%">
28653
+ <RibbonMenu
28654
+ class="rb-editor"
28655
+ items={items}
28656
+ x-model={() => s.tab}
28657
+ appButton="&File"
28658
+ onAppButton={() => (s.menu = true)}
28659
+ quickCommands={quick}
28660
+ barEnd={
28661
+ <Stack orientation="horizontal" gap="sm" align="center">
28662
+ <TextBox label="Search" labelMode="hidden" placeholder="Search" size="sm" style="inline-size: 12rem" />
28663
+ <Button text="Share" size="sm" onclick={run('share')} />
28664
+ </Stack>
28665
+ }
28666
+ />
28667
+ <Stack orientation="horizontal" gap="md" wrap align="center">
28668
+ <Switch label="A picture is chosen" x-model={() => s.picture} />
28669
+ <output class="rb-editor-told">{() => `Last command: ${s.told}`}</output>
28670
+ </Stack>
28671
+ <AppMenu
28672
+ label="File"
28673
+ x-model={() => s.menu}
28674
+ items={[
28675
+ { key: 'info', text: '&Info', glyph: 'info', page: () => <p>Quarterly report.docx</p> },
28676
+ { key: 'save', text: '&Save', glyph: 'save', click: run('save') }
28677
+ ]}
28678
+ />
28679
+ </Stack>
28680
+ );
28681
+ }
28682
+ ```
28683
+
28684
+ ## Topics
28685
+
28686
+ | Page | What it covers |
28687
+ | --- | --- |
28688
+ | `[Commands](ribbonmenu-commands.md)` | The sizes and types of commands: buttons, toggles, split buttons, menus, rows, the app’s own content and galleries. |
28689
+ | `[Layouts and room](ribbonmenu-layouts.md)` | The classic and the simplified layout, how groups give way in less room, and scrolling. |
28690
+ | `[Showing and keys](ribbonmenu-display.md)` | Showing only the tabs or hiding the menu, the button before the tabs, the quick commands and the key hints. |
28691
+ | `[Customization](ribbonmenu-customization.md)` | What the user can hide, move and add, and how to save it. |
28692
+ | `[Programmatic changes](ribbonmenu-programmatic.md)` | Adding, removing, moving and changing tabs, groups and commands by path. |
28693
+ | `[API reference](ribbonmenu-api.md)` | Props, fields, members, events, styling hooks and tokens. |
28694
+
28695
+ ## Keyboard
28696
+
28697
+ | Key | Action |
28698
+ | --- | --- |
28699
+ | `Arrow Left, Arrow Right` | On the tabs: the previous or the next tab, shown. In the commands: the previous or the next command. |
28700
+ | `Home, End` | The first or the last tab, or command of the tab. |
28701
+ | `Arrow Down` | From the tabs: into the commands of the tab shown, opening them over the page when only the tabs are shown. |
28702
+ | `Tab, Shift+Tab` | The tabs are one stop, each group is one stop. |
28703
+ | `Escape` | From the commands: back to the tab shown. Commands open over the page close. |
28704
+ | `Alt, F10` | Shows the key hints: a letter on each tab, then on each command. See [Showing and keys](ribbonmenu-display.md#keys). |
28705
+ | `Alt + the access key` | Shows the tab whose text marks that letter with `&`, or presses the button before the tabs. |
28706
+ | `Ctrl+F1, a double-click on a tab` | Shows only the tabs, or the commands always again. |
28707
+ | `Shift+F10, the Menu key` | Opens the context menu of the command or group with focus. |
28708
+
28709
+ ## Accessibility
28710
+
28711
+ | Topic | Details |
28712
+ | --- | --- |
28713
+ | `Tabs` | The tabs are a `tablist` named by `label` or by the language pack, each tab a `tab` that controls its `tabpanel`. A tab of a context has the context’s name as its description. |
28714
+ | `Groups` | Each group is a `group` named by its name. The button beside the name names the group in its tooltip. |
28715
+ | `Commands` | A small command is named by its text, shown as its tooltip. A toggle reports `aria-pressed`, a menu its `aria-expanded`. |
28716
+ | `Focus` | The tabs are one Tab stop and each group is one Tab stop. Focus never moves without the user. |
28717
+ | `Motion` | The layouts and the menus open with the motion tokens, and without motion when the user prefers reduced motion. |
28718
+
28719
+ ## Localization
28720
+
28721
+ The menu’s own texts come from `uiLocale.strings`: the name of the tabs (`ribbonMenuLabel`), the buttons it adds (`ribbonMenuMore`, `ribbonMenuSimple`, `ribbonMenuClassic`, `ribbonMenuTabs`, `ribbonMenuReveal`), the quick commands (`ribbonMenuQuick`) and its context menu. They change with the language at once.
28722
+
28723
+ ## Feedback
28724
+
28725
+ Loading issues…
28726
+
28727
+
28728
+ ---
28729
+
28730
+ # RibbonMenu: Commands
28731
+
28732
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
28733
+
28734
+ A group holds commands of three sizes and eight types. Every field of a command is a value or a function the menu follows, so the commands change with the application’s state.
28735
+
28736
+ ## Every command
28737
+
28738
+ This menu does not give way (`adaptive: false`), so every command keeps the size it is given; scroll the commands to see them all.
28739
+
28740
+ ```tsx
28741
+ import { reactive } from '@motifx/core';
28742
+ import { DropDown, RibbonMenu, Stack, type RibbonTab } from '@motifx-community/ui';
28743
+
28744
+ const COLORS = [
28745
+ { key: 'ink', text: 'Ink', color: '#1f2937' },
28746
+ { key: 'sea', text: 'Sea', color: '#0e7490' },
28747
+ { key: 'leaf', text: 'Leaf', color: '#15803d' },
28748
+ { key: 'sun', text: 'Sun', color: '#b45309' },
28749
+ { key: 'rose', text: 'Rose', color: '#be123c' },
28750
+ { key: 'dusk', text: 'Dusk', color: '#6d28d9' }
28751
+ ];
28752
+
28753
+ /** Every size and type of command, in one tab. It does not give way, so every command keeps its size; what does not fit scrolls. */
28754
+ export default function CommandTypes() {
28755
+ const s = reactive({ told: 'nothing yet', bold: false, wrap: true, color: 'sea', zoom: '100%' });
28756
+ const run = (what: string) => () => (s.told = what);
28757
+
28758
+ const items: RibbonTab[] = [
28759
+ {
28760
+ key: 'commands',
28761
+ text: '&Commands',
28762
+ groups: [
28763
+ {
28764
+ text: 'Sizes',
28765
+ commands: [
28766
+ { text: 'Large', glyph: 'star', size: 'large', click: run('large') },
28767
+ { text: 'Medium', glyph: 'star', click: run('medium') },
28768
+ { text: 'Medium too', glyph: 'star', click: run('medium too') },
28769
+ { text: 'Small', glyph: 'star', size: 'small', click: run('small') }
28770
+ ]
28771
+ },
28772
+ {
28773
+ text: 'Types',
28774
+ commands: [
28775
+ { text: 'Split', glyph: 'save', size: 'large', type: 'split', click: run('split'), menu: [{ text: 'Save a copy', click: run('save a copy') }] },
28776
+ { text: 'Bold', glyph: 'pencil', type: 'toggle', pressed: () => s.bold, click: () => (s.bold = !s.bold) },
28777
+ { text: 'Wrap', glyph: 'columns', type: 'toggle', pressed: () => s.wrap, click: () => (s.wrap = !s.wrap) },
28778
+ { text: 'Export', glyph: 'download', type: 'menu', menu: [{ text: 'As a PDF', click: run('pdf') }, { text: 'As a picture', click: run('picture') }] },
28779
+ { type: 'separator' },
28780
+ { type: 'row', commands: [{ text: 'Undo', glyph: 'undo', click: run('undo') }, { text: 'Repeat', glyph: 'repeat', click: run('repeat') }, { text: 'Delete', glyph: 'trash', click: run('delete') }] },
28781
+ { type: 'content', content: () => <DropDown label="Zoom" labelMode="hidden" size="sm" style="inline-size: 7rem" items={['50%', '100%', '200%']} x-model={() => s.zoom} /> }
28782
+ ]
28783
+ },
28784
+ {
28785
+ text: 'Gallery',
28786
+ priority: 1,
28787
+ commands: [
28788
+ {
28789
+ type: 'gallery',
28790
+ text: 'Colors',
28791
+ columns: 3,
28792
+ value: () => s.color,
28793
+ items: COLORS.map(c => ({ key: c.key, text: c.text, icon: () => <span class="rb-swatch" style={`display: block; inline-size: 1.25rem; block-size: 1.25rem; border-radius: 50%; background: ${c.color}`} /> })),
28794
+ click: e => {
28795
+ s.color = String(e.item?.key);
28796
+ s.told = `color: ${e.item?.text}`;
28797
+ }
28798
+ }
28799
+ ]
28800
+ }
28801
+ ]
28802
+ }
28803
+ ];
28804
+
28805
+ return (
28806
+ <Stack gap="md" style="inline-size: 100%">
28807
+ <RibbonMenu class="rb-types" items={items} layoutSwitch={false} adaptive={false} />
28808
+ <output class="rb-types-told">{() => `Last command: ${s.told}`}</output>
28809
+ </Stack>
28810
+ );
28811
+ }
28812
+ ```
28813
+
28814
+ ## Sizes
28815
+
28816
+ | Size | Description |
28817
+ | --- | --- |
28818
+ | ``large`` | The icon above the text, as high as the group. A gallery is large by default. |
28819
+ | ``medium`` | The icon beside the text. Medium and small commands stand three to a column. The default. |
28820
+ | ``small`` | The icon alone. The text names it and appears as its tooltip. |
28821
+
28822
+ Every row has the same height in every tab, whatever stands in it: a field or a button. The menu keeps its height when the user moves between tabs.
28823
+
28824
+ ## Types
28825
+
28826
+ | Type | Description |
28827
+ | --- | --- |
28828
+ | ``button`` | Runs `click`. The default. |
28829
+ | ``toggle`` | Stays pressed while `pressed` is `true`. As a function, `pressed` is followed, and `click` changes the value it reads. |
28830
+ | ``split`` | Runs `click` from its own part, and opens `menu` from the arrow beside it. |
28831
+ | ``menu`` | Opens `menu`. |
28832
+ | ``row`` | A row of small commands (`commands`), such as the commands that style text. |
28833
+ | ``content`` | Any content of the application (`content`), such as a drop-down or a number box. Made once, and kept. Give it the small size of fields, so it fits the row. |
28834
+ | ``gallery`` | Its first choices (`items`) in a row and a button that opens all of them in a grid. `value` marks the chosen one, `columns` sets how many stand in a row, and `click` receives the choice as `e.item`. |
28835
+ | ``separator`` | A line between commands. |
28836
+
28837
+ ## Groups
28838
+
28839
+ A group has a name under its commands. With `more`, a button beside the name opens more options of the group, such as a window; `onGroupMore` reports it too. Its `glyph` or `icon` is shown on the button the group folds into when there is no room.
28840
+
28841
+ ## Tabs of a context
28842
+
28843
+ A tab with `context`, such as one for a picture being edited, is drawn in the context color with a band over it. Show it with `visible` while the context lasts. Its context’s name is told to assistive technology, not shown.
28844
+
28845
+ ## Feedback
28846
+
28847
+ Loading issues…
28848
+
28849
+
28850
+ ---
28851
+
28852
+ # RibbonMenu: Layouts and room
28853
+
28854
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
28855
+
28856
+ The menu has two layouts, and gives way step by step when its room shrinks: commands become smaller, groups fold, and what is left scrolls. Narrow enough, it turns compact.
28857
+
28858
+ ## Less and less room
28859
+
28860
+ Move the slider to narrow the menu. Every group takes a step before any group takes the next. Groups with a lower `priority` give way first, and of equals, the last one first; here Editing has a higher priority. A group with `collapsible: false` never takes the last step, and `adaptive: false` turns giving way off, leaving only the scroll.
28861
+
28862
+ ```tsx
28863
+ import { reactive } from '@motifx/core';
28864
+ import { ButtonGroup, RibbonMenu, Slider, Stack, Switch, type RibbonMenuLayout } from '@motifx-community/ui';
28865
+ import { documentTabs } from './document-tabs';
28866
+
28867
+ /** The same menu in less and less room: the groups give way, then the commands scroll. */
28868
+ export default function Room() {
28869
+ const s = reactive({ width: 720, layout: 'classic' as RibbonMenuLayout, adaptive: true, told: 'nothing yet' });
28870
+ const run = (what: string) => () => (s.told = what);
28871
+
28872
+ return (
28873
+ <Stack gap="md" style="inline-size: 100%">
28874
+ <Stack orientation="horizontal" gap="lg" wrap align="center">
28875
+ <Slider label="Width" min={220} max={900} step={10} x-model={() => s.width} style="inline-size: 16rem" />
28876
+ <ButtonGroup
28877
+ label="Layout"
28878
+ x-model={() => s.layout}
28879
+ items={[
28880
+ { value: 'classic', text: 'Classic' },
28881
+ { value: 'simple', text: 'Simplified' }
28882
+ ]}
28883
+ />
28884
+ <Switch label="Give way" x-model={() => s.adaptive} />
28885
+ </Stack>
28886
+ <RibbonMenu class="rb-room" items={documentTabs(run)} style={() => `inline-size: ${s.width}px`} layout={() => s.layout} adaptive={() => s.adaptive} onLayoutChanged={e => (s.layout = e.layout)} />
28887
+ <output class="rb-room-told">{() => `${s.width} pixels · last command: ${s.told}`}</output>
28888
+ </Stack>
28889
+ );
28890
+ }
28891
+ ```
28892
+
28893
+ | Step | What changes |
28894
+ | --- | --- |
28895
+ | `1` | Large commands become medium. |
28896
+ | `2` | All commands become small: the icon alone, the text as the tooltip. A gallery becomes its button alone. |
28897
+ | `3` | The group folds into one large button with its name and glyph, which opens the group in a popup. In the simplified layout, the group moves into the “more” menu at the end of the row instead. |
28898
+ | `Then` | What still does not fit scrolls: by the buttons over the ends of the commands, the mouse wheel and a finger. |
28899
+
28900
+ ## Classic and simplified
28901
+
28902
+ The classic layout (`layout: 'classic'`) shows the commands in columns under the names of their groups. The simplified layout (`layout: 'simple'`) shows them in a single row, without the names; a command with `simple: false` waits in the “more” menu. The button at the end of the commands switches between them (`layoutSwitch`), and `onLayoutChanged` reports the user’s choice.
28903
+
28904
+ ## Compact
28905
+
28906
+ Narrower than the `ribbon-menu.compact-size` token, the menu shows a tab picker in place of its tabs and its commands in the simplified layout, as on a phone. `isCompact` tells whether it is compact; `layout` keeps the layout the user chose for when there is room again.
28907
+
28908
+ ## Feedback
28909
+
28910
+ Loading issues…
28911
+
28912
+
28913
+ ---
28914
+
28915
+ # RibbonMenu: Showing and keys
28916
+
28917
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
28918
+
28919
+ The menu can show only its tabs or hide itself to leave the page more room. A button before the tabs opens the app’s main menu, quick commands are at hand from every tab, and key hints let the keyboard reach any command in a few letters.
28920
+
28921
+ ## Showing, quick commands and keys
28922
+
28923
+ Choose how the menu is shown and where the quick commands stand. Tap Alt (or press F10) with focus in the menu to see the key hints.
28924
+
28925
+ ```tsx
28926
+ import { reactive } from '@motifx/core';
28927
+ import { ButtonGroup, RibbonMenu, Stack, Switch, type RibbonCommand, type RibbonMenuDisplay, type RibbonQuickBarPosition } from '@motifx-community/ui';
28928
+ import { documentTabs } from './document-tabs';
28929
+
28930
+ /** How the menu is shown, the button before the tabs, the quick commands and the key hints. */
28931
+ export default function Display() {
28932
+ const s = reactive({ display: 'always' as RibbonMenuDisplay, quick: 'start' as RibbonQuickBarPosition, hints: true, told: 'nothing yet' });
28933
+ const run = (what: string) => () => (s.told = what);
28934
+ const quick: RibbonCommand[] = [
28935
+ { key: 'save', text: 'Save', glyph: 'save', click: run('save') },
28936
+ { key: 'undo', text: 'Undo', glyph: 'undo', click: run('undo') }
28937
+ ];
28938
+
28939
+ return (
28940
+ <Stack gap="md" style="inline-size: 100%">
28941
+ <Stack orientation="horizontal" gap="lg" wrap align="center">
28942
+ <ButtonGroup
28943
+ label="Show the commands"
28944
+ x-model={() => s.display}
28945
+ items={[
28946
+ { value: 'always', text: 'Always' },
28947
+ { value: 'tabs', text: 'Only the tabs' },
28948
+ { value: 'auto', text: 'Hide automatically' }
28949
+ ]}
28950
+ />
28951
+ <ButtonGroup
28952
+ label="Quick commands"
28953
+ x-model={() => s.quick}
28954
+ items={[
28955
+ { value: 'start', text: 'In the row of tabs' },
28956
+ { value: 'below', text: 'Under the commands' },
28957
+ { value: 'hidden', text: 'Hidden' }
28958
+ ]}
28959
+ />
28960
+ <Switch label="Key hints" x-model={() => s.hints} />
28961
+ </Stack>
28962
+ <RibbonMenu
28963
+ class="rb-display"
28964
+ items={documentTabs(run)}
28965
+ display={() => s.display}
28966
+ quickBar={() => s.quick}
28967
+ keyHints={() => s.hints}
28968
+ quickCommands={quick}
28969
+ appButton="&File"
28970
+ onAppButton={run('the File button')}
28971
+ onDisplayChanged={e => (s.display = e.display)}
28972
+ />
28973
+ <output class="rb-display-told">{() => `Last command: ${s.told}`}</output>
28974
+ </Stack>
28975
+ );
28976
+ }
28977
+ ```
28978
+
28979
+ ## Showing the commands
28980
+
28981
+ | display | What is shown |
28982
+ | --- | --- |
28983
+ | ``always`` | The tabs and the commands. The default. |
28984
+ | ``tabs`` | Only the tabs. A tab opens its commands over the page; they close after a command, on Escape, on a click elsewhere and when focus leaves. |
28985
+ | ``auto`` | A thin strip. It opens the whole menu over the page, which closes the same way. |
28986
+
28987
+ A double-click on a tab and Ctrl+F1 switch between `always` and `tabs`; the menu’s context menu offers all three. The user’s choice is reported by `onDisplayChanged` and kept in `customization`.
28988
+
28989
+ ## The button before the tabs and the ends of the row
28990
+
28991
+ `appButton` is the text of a button before the tabs, drawn in the accent color, such as one that opens an `AppMenu`; `onAppButton` reports it. `barStart` and `barEnd` hold any content of the app at the ends of the row of tabs: a search field, a button, an editor.
28992
+
28993
+ ## Quick commands
28994
+
28995
+ `quickCommands` are small commands pressed from any tab. The user adds others from a command’s context menu, and removes them the same way. `quickBar` places them in the row of tabs (`start`), under the commands (`below`) or nowhere (`hidden`).
28996
+
28997
+ ## Key hints
28998
+
28999
+ | When | What happens |
29000
+ | --- | --- |
29001
+ | `On the tabs` | Each tab shows its access key (the letter after `&` in its text), else its first letter. The button before the tabs has a letter too, and the quick commands have digits. |
29002
+ | `On the commands` | A command shows its `keyHint`, else its access key, else its first letter. Several commands starting with the same letter have a letter and a digit. |
29003
+ | `Typing` | The letters press what they stand on. A tab goes on to the letters of its commands; a command ends the hints. Typing the first of two letters hides the others. |
29004
+ | `Escape` | Goes back one level: from the commands to the tabs, then ends the hints. Any other key, a click and leaving the page end them too. |
29005
+
29006
+ Alt and F10 reach the menu that has focus, else the first menu of the page. `keyHints: false` turns them off, and `showKeyHints()` shows them programmatically.
29007
+
29008
+ ## Feedback
29009
+
29010
+ Loading issues…
29011
+
29012
+
29013
+ ---
29014
+
29015
+ # RibbonMenu: Customization
29016
+
29017
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
29018
+
29019
+ Users arrange the menu from its context menu: they hide what they never use, move what they use most, and add commands to the quick commands. Everything they change is one plain object, to save and give back.
29020
+
29021
+ ## Arranging and saving
29022
+
29023
+ Right-click a command or a group, or press Shift+F10 on it. Here each change is saved in the browser and given back when the page opens again. Paste is `fixed`: it cannot be hidden or moved.
29024
+
29025
+ ```tsx
29026
+ import { reactive } from '@motifx/core';
29027
+ import { Button, RibbonMenu, Stack, type RibbonMenuCustomization } from '@motifx-community/ui';
29028
+ import { documentTabs } from './document-tabs';
29029
+
29030
+ const KEY = 'docs.ribbon.customization';
29031
+
29032
+ function load(): RibbonMenuCustomization | null {
29033
+ try {
29034
+ return JSON.parse(localStorage.getItem(KEY) ?? 'null') as RibbonMenuCustomization | null;
29035
+ } catch {
29036
+ return null;
29037
+ }
29038
+ }
29039
+
29040
+ /** What the user changes with the context menu is saved, and given back when the page opens again. */
29041
+ export default function Customize() {
29042
+ const s = reactive({ saved: load(), told: 'nothing yet' });
29043
+ const run = (what: string) => () => (s.told = what);
29044
+
29045
+ return (
29046
+ <Stack gap="md" style="inline-size: 100%">
29047
+ <RibbonMenu
29048
+ class="rb-customize"
29049
+ items={documentTabs(run)}
29050
+ customization={() => s.saved}
29051
+ onCustomized={e => {
29052
+ localStorage.setItem(KEY, JSON.stringify(e.customization));
29053
+ s.saved = e.customization;
29054
+ }}
29055
+ />
29056
+ <Stack orientation="horizontal" gap="md" wrap align="center">
29057
+ <Button
29058
+ text="Forget the changes"
29059
+ variant="outline"
29060
+ onclick={() => {
29061
+ localStorage.removeItem(KEY);
29062
+ s.saved = {};
29063
+ }}
29064
+ />
29065
+ <output class="rb-customize-told">{() => `Last command: ${s.told}`}</output>
29066
+ </Stack>
29067
+ <pre class="rb-customize-json" style="margin: 0; white-space: pre-wrap">{() => JSON.stringify(s.saved ?? {}, null, 2)}</pre>
29068
+ </Stack>
29069
+ );
29070
+ }
29071
+ ```
29072
+
29073
+ ## The context menu
29074
+
29075
+ | Where | What the user can do |
29076
+ | --- | --- |
29077
+ | `On a command` | Add it to the quick commands or remove it, hide it, move it earlier or later in its group. |
29078
+ | `On a group` | Hide the group, move it earlier or later in its tab. |
29079
+ | `Always` | Show the hidden commands again, choose the layout, how the commands are shown and where the quick commands stand, and undo all changes. |
29080
+
29081
+ `customizable: false` leaves the browser’s own context menu. A group or a command with `fixed: true` cannot be hidden or moved.
29082
+
29083
+ ## Saving
29084
+
29085
+ `onCustomized` reports everything the user changed so far as a `RibbonMenuCustomization`; give it back with `customization` and the menu starts from it. Groups and commands are named by their keys joined with `/`, so give them keys: a missing key is the position, which changes when the app adds items.
29086
+
29087
+ ```tsx
29088
+ {
29089
+ "hidden": ["home/editing/filter"],
29090
+ "order": { "home/clipboard": ["copy", "cut", "paste"] },
29091
+ "quick": ["home/insert/table"],
29092
+ "display": "tabs"
29093
+ }
29094
+ ```
29095
+
29096
+ | Field | Type | Description |
29097
+ | --- | --- | --- |
29098
+ | `hidden` | `string[]` | The groups and commands the user hid. |
29099
+ | `order` | `Record<string, string[]>` | The order the user gave: a tab’s groups under its key, a group’s commands under its path. |
29100
+ | `quick` | `string[]` | The commands the user added to the quick commands. |
29101
+ | `layout, display, quickBar` | | The layout, the way the commands are shown and the place of the quick commands, as the user chose them. |
29102
+
29103
+ The menu never changes the tabs, groups and commands the app gives: hidden and moved items are drawn from its own copy of the user’s changes. `findCommand(path)` finds a command by its path.
29104
+
29105
+ ## Feedback
29106
+
29107
+ Loading issues…
29108
+
29109
+
29110
+ ---
29111
+
29112
+ # RibbonMenu: Programmatic changes
29113
+
29114
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
29115
+
29116
+ Tabs, groups and commands can be added, removed, moved and changed at any time, by their paths. The menu redraws only what changed: groups and commands that stay keep their buttons, their state and their place.
29117
+
29118
+ ## Changes by path
29119
+
29120
+ ```tsx
29121
+ import { reactive } from '@motifx/core';
29122
+ import { Button, RibbonMenu, Stack } from '@motifx-community/ui';
29123
+ import { documentTabs } from './document-tabs';
29124
+
29125
+ /** Tabs, groups and commands added, removed, moved and changed by path. */
29126
+ export default function Programmatic() {
29127
+ const s = reactive({ told: 'nothing yet', changes: 0, extra: 0, dateShown: true });
29128
+ const run = (what: string) => () => (s.told = what);
29129
+ let menu!: RibbonMenu;
29130
+
29131
+ const addTab = () =>
29132
+ menu.addTab({
29133
+ key: 'review',
29134
+ text: '&Review',
29135
+ groups: [{ key: 'proofing', text: 'Proofing', commands: [{ key: 'spelling', text: 'Spelling', glyph: 'check', size: 'large', click: run('spelling') }] }]
29136
+ });
29137
+ const addCommand = () => {
29138
+ s.extra++;
29139
+ menu.addCommand('home/clipboard', { key: `extra${s.extra}`, text: `Extra ${s.extra}`, glyph: 'star', click: run(`extra ${s.extra}`) });
29140
+ };
29141
+ const toggleDate = () => {
29142
+ s.dateShown = !s.dateShown;
29143
+ menu.update('home/insert/date', { visible: s.dateShown });
29144
+ };
29145
+ const reset = () => {
29146
+ menu.items = documentTabs(run);
29147
+ s.extra = 0;
29148
+ s.dateShown = true;
29149
+ };
29150
+
29151
+ return (
29152
+ <Stack gap="md" style="inline-size: 100%">
29153
+ <Stack orientation="horizontal" gap="sm" wrap>
29154
+ <Button text="Add a tab" variant="outline" onclick={addTab} />
29155
+ <Button text="Add a command" variant="outline" onclick={addCommand} />
29156
+ <Button text="Rename Cut" variant="outline" onclick={() => menu.update('home/clipboard/cut', { text: 'Cut out' })} />
29157
+ <Button text="Hide or show Date" variant="outline" onclick={toggleDate} />
29158
+ <Button text="Move Editing first" variant="outline" onclick={() => menu.move('home/editing', 0)} />
29159
+ <Button text="Remove Insert" variant="outline" onclick={() => menu.remove('home/insert')} />
29160
+ <Button text="Start again" variant="outline" onclick={reset} />
29161
+ </Stack>
29162
+ <RibbonMenu class="rb-programmatic" ref={(m: RibbonMenu) => (menu = m)} items={documentTabs(run)} onItemsChanged={() => s.changes++} />
29163
+ <output class="rb-programmatic-told">{() => `${s.changes} changes · last command: ${s.told}`}</output>
29164
+ </Stack>
29165
+ );
29166
+ }
29167
+ ```
29168
+
29169
+ ## Methods
29170
+
29171
+ | Method | Description |
29172
+ | --- | --- |
29173
+ | `addTab(tab, index?)` | Adds a tab at `index`, the end by default. |
29174
+ | `addGroup(tabPath, group, index?)` | Adds a group to a tab. |
29175
+ | `addCommand(parentPath, command, index?)` | Adds a command to a group (`tab/group`) or to a row (`tab/group/row`). |
29176
+ | `remove(path)` | Removes a tab, a group or a command. |
29177
+ | `move(path, index, toParent?)` | Moves it to `index` in its list, or in the list at `toParent`: a group to another tab, a command to another group or row. |
29178
+ | `update(path, changes)` | Changes some of its fields, such as `text`, `visible`, `enabled` or `glyph`; the others stay as they are. |
29179
+ | `findTab(key), findGroup(path), findCommand(path)` | The tab, group or command as it is now. |
29180
+ | `beginUpdate(), endUpdate()` | Holds the changes until `endUpdate()`, which applies them at once. |
29181
+
29182
+ Each method returns `false` when nothing changed, such as for a path that does not exist.
29183
+
29184
+ ```tsx
29185
+ menu.beginUpdate();
29186
+ menu.addGroup('home', { key: 'styles', text: 'Styles', commands: [] }, 1);
29187
+ menu.addCommand('home/styles', { key: 'normal', text: 'Normal', glyph: 'star' });
29188
+ menu.update('home/clipboard/paste', { enabled: false });
29189
+ menu.endUpdate();
29190
+ ```
29191
+
29192
+ ## Paths
29193
+
29194
+ A path names an item by its keys joined with `/`: `home` is a tab, `home/clipboard` a group, `home/clipboard/paste` a command, and a fourth part a command of a row. A missing key is the position, which changes when items are added or removed before it, so give the items you change keys.
29195
+
29196
+ ## Your data
29197
+
29198
+ The methods never change the tabs, groups and commands you gave. Each change makes a new list, with new objects only along the changed path, and it becomes `items`. `onItemsChanged` reports the new list: keep it in your state when you save the menu or bind `items` to it. When you keep the tabs in reactive state, you can also change that state directly; the menu follows it, and with plain data `refresh()` reads it again.
29199
+
29200
+ ## Feedback
29201
+
29202
+ Loading issues…
29203
+
29204
+
29205
+ ---
29206
+
29207
+ # RibbonMenu: API reference
29208
+
29209
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
29210
+
29211
+ Everything `RibbonMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
29212
+
29213
+ ## Props
29214
+
29215
+ | Prop | Type | Default | Description |
29216
+ | --- | --- | --- | --- |
29217
+ | `items` | `Bind<readonly RibbonTab[]>` | `[]` | The tabs. Nothing is there until they are given. |
29218
+ | `value` | `Bind<string \| number \| null>` | the first tab | The key of the tab shown. `x-model` provides two-way binding. |
29219
+ | `label` | `Bind<string>` | the language pack | Names the tabs for assistive technology. The same property as `text`. |
29220
+ | `layout` | `Bind<'classic' \| 'simple'>` | `'classic'` | The commands in columns under the names of their groups, or in a single row. |
29221
+ | `layoutSwitch` | `Bind<boolean>` | `true` | The button at the end of the commands that switches the layout. |
29222
+ | `adaptive` | `Bind<boolean>` | `true` | Groups give way step by step when the commands do not fit. Off, they only scroll. |
29223
+ | `display` | `Bind<'always' \| 'tabs' \| 'auto'>` | `'always'` | The commands always, only the tabs, or a strip that opens the menu over the page. |
29224
+ | `appButton` | `Bind<string>` | none | The text of the button before the tabs. `&` gives it an access key. |
29225
+ | `quickCommands` | `Bind<readonly RibbonCommand[]>` | `[]` | The quick commands, pressed from any tab. |
29226
+ | `quickBar` | `Bind<'start' \| 'below' \| 'hidden'>` | `'start'` | Where the quick commands stand. |
29227
+ | `barStart, barEnd` | `Bind<ComponentBase \| null>` | none | Any content of the app at the start or the end of the row of tabs. |
29228
+ | `keyHints` | `Bind<boolean>` | `true` | Alt and F10 show the key hints. |
29229
+ | `customizable` | `Bind<boolean>` | `true` | The context menu that lets the user hide, move and add commands. |
29230
+ | `customization` | `Bind<RibbonMenuCustomization \| null>` | none | What the user changed, to give back: the menu starts from it. |
29231
+ | `text, enabled, visible, tabStop, tabIndex` | see Control | | Props shared by all controls. |
29232
+
29233
+ ## RibbonTab
29234
+
29235
+ | Field | Type | Description |
29236
+ | --- | --- | --- |
29237
+ | `key` | `string \| number` | Finds the tab, and is `value` while it is shown. The default is its position. |
29238
+ | `text` | `Bind<string>` | The text. `&` before a letter makes it the access key. |
29239
+ | `hint` | `Bind<string>` | A tooltip. |
29240
+ | `groups` | `Bind<readonly RibbonGroup[]>` | The groups, made the first time the tab is shown. |
29241
+ | `context` | `Bind<string>` | Makes it a tab of a context, drawn in the context color. |
29242
+ | `visible, enabled` | `Bind<boolean>` | `false` removes or dims the tab. |
29243
+ | `data` | `unknown` | A custom application value. |
29244
+
29245
+ ## RibbonGroup
29246
+
29247
+ | Field | Type | Description |
29248
+ | --- | --- | --- |
29249
+ | `key` | `string \| number` | Finds the group. The default is its position. |
29250
+ | `text` | `Bind<string>` | The name under the commands. |
29251
+ | `commands` | `Bind<readonly RibbonCommand[]>` | The commands. |
29252
+ | `glyph, icon` | `Bind<string>`, `Bind<IconSource>` | Shown on the button the group folds into. |
29253
+ | `priority` | `Bind<number>` | Lower gives way first. The default is `0`. |
29254
+ | `collapsible` | `Bind<boolean>` | `false` keeps it from folding or moving into the “more” menu. |
29255
+ | `fixed` | `Bind<boolean>` | `true` keeps the user from hiding or moving it. |
29256
+ | `more, moreHint` | `(e) => void`, `Bind<string>` | The button beside the name, and its tooltip. |
29257
+ | `visible` | `Bind<boolean>` | `false` removes the group. |
29258
+ | `data` | `unknown` | A custom application value. |
29259
+
29260
+ ## RibbonCommand
29261
+
29262
+ | Field | Type | Description |
29263
+ | --- | --- | --- |
29264
+ | `key` | `string \| number` | Finds the command. The default is its position. |
29265
+ | `type` | `Bind<RibbonCommandType>` | `button`, `toggle`, `split`, `menu`, `row`, `content`, `gallery`, `separator`. The default is `'button'`. |
29266
+ | `text, hint` | `Bind<string>` | The text (`&` marks the access key) and a tooltip. |
29267
+ | `glyph, icon` | `Bind<string>`, `Bind<IconSource>` | A glyph name, or an image address or a component. |
29268
+ | `size` | `Bind<'large' \| 'medium' \| 'small'>` | The default is `'medium'` (`'large'` for a gallery). |
29269
+ | `pressed` | `Bind<boolean>` | The state of a toggle. |
29270
+ | `menu` | `Bind<readonly MenuItem[]>` | The menu of a `menu` or `split` command. |
29271
+ | `commands` | `Bind<readonly RibbonCommand[]>` | The commands of a `row`. |
29272
+ | `content` | `() => ComponentBase` | The content of a `content` command, made once. |
29273
+ | `items, value, columns` | `Bind<…>` | The choices of a `gallery`, the one marked as chosen, and how many stand in a row. |
29274
+ | `simple` | `Bind<boolean>` | `false` leaves it out of the simplified row. |
29275
+ | `keyHint` | `Bind<string>` | The letters that press it while key hints are shown. |
29276
+ | `fixed` | `Bind<boolean>` | `true` keeps the user from hiding or moving it. |
29277
+ | `enabled, visible` | `Bind<boolean>` | `false` dims or removes the command. |
29278
+ | `click` | `(e: RibbonCommandClickEventArgs) => void` | Occurs when it is pressed; for a gallery, `e.item` is the choice. |
29279
+ | `data` | `unknown` | A custom application value. |
29280
+
29281
+ A gallery’s `RibbonGalleryItem` has `key`, `text`, `glyph`, `icon`, `hint`, `enabled` and `data`.
29282
+
29283
+ ## Members
29284
+
29285
+ | Member | Returns | Description |
29286
+ | --- | --- | --- |
29287
+ | `select(key)` | `boolean` | Shows a tab, as a click does. `false` when `onSelecting` refused. |
29288
+ | `findTab(key), findGroup(path), findCommand(path)` | the object | Finds a tab by its key, a group or a command by its path (`tab/group/command`), as it is now. |
29289
+ | `addTab, addGroup, addCommand, remove, move, update` | `boolean` | Changes by path; see [Programmatic changes](ribbonmenu-programmatic.md). `false` when nothing changed. |
29290
+ | `beginUpdate(), endUpdate()` | `void` | Holds the changes by path, then applies them at once. |
29291
+ | `controlOf(command)` | `ComponentBase \| null` | The control made for a command, once its tab has been shown. |
29292
+ | `openOver(open)` | `void` | Opens or closes the commands over the page when only the tabs are shown or the menu hides itself. |
29293
+ | `showKeyHints()` | `void` | Shows the key hints, as Alt does. |
29294
+ | `refresh()` | `void` | Reads the tabs, groups and commands again after they were changed in place. |
29295
+ | `shownKey, isOpenOver, isCompact` | read-only | The tab shown, whether the commands are open over the page, whether the menu is compact. |
29296
+ | `customization` | `RibbonMenuCustomization` | What the user changed so far. |
29297
+
29298
+ ## Events
29299
+
29300
+ | Event | Arguments | Description |
29301
+ | --- | --- | --- |
29302
+ | `onSelecting` | `RibbonTabSelectingEventArgs` | Before another tab is shown. Setting `cancel` keeps the tab shown now. |
29303
+ | `onSelectionChanged` | `RibbonTabSelectionChangedEventArgs` | After another tab is shown. |
29304
+ | `onCommandClick` | `RibbonCommandClickEventArgs` | A command was pressed, after its own `click`. |
29305
+ | `onGroupMore` | `RibbonGroupMoreEventArgs` | The button beside a group’s name was pressed. |
29306
+ | `onLayoutChanged` | `RibbonMenuLayoutChangedEventArgs` | The user switched the layout. |
29307
+ | `onDisplayChanged` | `RibbonMenuDisplayChangedEventArgs` | The user chose another way to show the commands. |
29308
+ | `onCustomized` | `RibbonMenuCustomizedEventArgs` | The user hid, moved or added a command, or undid the changes. |
29309
+ | `onItemsChanged` | `RibbonMenuItemsChangedEventArgs` | A change by path made a new list of tabs, to keep. |
29310
+ | `onAppButton` | `RibbonAppButtonEventArgs` | The button before the tabs was pressed. |
29311
+
29312
+ ## Styling
29313
+
29314
+ | Hook | Description |
29315
+ | --- | --- |
29316
+ | `.mx-ribbon-menu` | The menu. `data-layout`, `data-display`, `data-floating`, `data-compact`. |
29317
+ | `__reveal, __frame` | The strip of a menu hidden automatically, and the frame it opens. |
29318
+ | `__bar, __bar-start, __app, __quick, __picker, __tabs, __tab, __bar-end` | The row of tabs and its parts. A tab has `data-key` and, of a context, `data-context`. |
29319
+ | `__body, __stage, __panel, __scroll, __switch` | The surface of the commands, where they scroll, a tab’s groups, the scroll buttons and the layout button. |
29320
+ | `__group, __group-inner, __commands, __group-foot, __group-label, __more, __fold, __drop, __divider` | A group and its parts. `data-folded`, `data-out`. |
29321
+ | `__command, __row, __content, __separator, __gallery, __tile, __overflow` | Commands; `data-ribbon-size` is the size drawn. |
29322
+ | `__hints, __hint` | The key hints. |
29323
+
29324
+ ### Component tokens
29325
+
29326
+ | Token | Description |
29327
+ | --- | --- |
29328
+ | `ribbon-menu.rows, row-height, compact-size, indicator-inset, font-family` | The rows of a group and their height, the width under which the menu is compact, the inset of the mark of the tab shown, the font. |
29329
+ | `ribbon-menu.large, medium, small, more, switch, scroll, picker, gallery-open` | Places: the variant, tone and size of the buttons the menu draws. |
29330
+ | `ribbon-menu.tab, indicator, context-band, app, quick, reveal, frame, body, stage` | Units of the row of tabs and the surfaces. |
29331
+ | `ribbon-menu.panel, group, commands, group-foot, group-label, divider, separator, row, large-face, large-icon` | Units of the groups and commands. |
29332
+ | `ribbon-menu.gallery, gallery-grid, tile, tile-icon, drop, hint` | Units of galleries, folded groups and key hints. |
29333
+
29334
+ ## Feedback
29335
+
29336
+ Loading issues…
29337
+
29338
+
29339
+ ---
29340
+
29341
+ # AppMenu
29342
+
29343
+ > AppMenu · @motifx-community/ui 0.1.0-beta.8
29344
+
29345
+ The main menu of an application. It slides in from the start edge with a list of items, and each item shows its own page beside the list or runs a command. The menu holds nothing of its own: the items, the pages and the commands are given by the application.
29346
+
29347
+ ## Import
29348
+
29349
+ ```tsx
29350
+ import { AppMenu, type AppMenuItem } from '@motifx-community/ui';
29351
+ ```
29352
+
29353
+ ## Pages and commands
29354
+
29355
+ An item with `page` shows that page beside the list. The page is created the first time it is shown, and kept. Any other item is a command (`click`) and closes the menu. Items with the same `group` stand together, and items with `bottom` stand at the bottom of the list.
29356
+
29357
+ ```tsx
29358
+ import { reactive } from '@motifx/core';
29359
+ import { AppMenu, Button, ListBox, Stack, Switch, type AppMenuItem } from '@motifx-community/ui';
29360
+
29361
+ const RECENT = [
29362
+ { id: 'q3', text: 'Quarterly report.docx' },
29363
+ { id: 'budget', text: 'Budget 2027.xlsx' },
29364
+ { id: 'notes', text: 'Meeting notes.docx' },
29365
+ { id: 'plan', text: 'Launch plan.pptx' }
29366
+ ];
29367
+
29368
+ const TEMPLATES = ['Blank document', 'Letter', 'Report', 'Resume'];
29369
+
29370
+ /** The main menu of a document editor: every page and command is given by the app. */
29371
+ export default function FileMenu() {
29372
+ const s = reactive({ open: false, told: 'nothing yet', file: 'q3', autosave: true });
29373
+ const run = (what: string) => () => (s.told = what);
29374
+
29375
+ const items: AppMenuItem[] = [
29376
+ {
29377
+ key: 'home',
29378
+ text: '&Home',
29379
+ glyph: 'star',
29380
+ page: () => (
29381
+ <Stack gap="md">
29382
+ <h2>Good morning</h2>
29383
+ <Stack orientation="horizontal" gap="sm" wrap>
29384
+ {TEMPLATES.map(t => <Button key={t} text={t} variant="outline" onclick={() => { s.told = `new: ${t}`; s.open = false; }} />)}
29385
+ </Stack>
29386
+ <h3>Recent</h3>
29387
+ <ListBox label="Recent files" items={RECENT} itemText="text" itemValue="id" x-model={() => s.file} />
29388
+ </Stack>
29389
+ )
29390
+ },
29391
+ {
29392
+ key: 'new',
29393
+ text: '&New',
29394
+ glyph: 'plus',
29395
+ page: () => (
29396
+ <Stack gap="md">
29397
+ <h2>New</h2>
29398
+ <Stack orientation="horizontal" gap="sm" wrap>
29399
+ {TEMPLATES.map(t => <Button text={t} onclick={() => { s.told = `new: ${t}`; s.open = false; }} />)}
29400
+ </Stack>
29401
+ </Stack>
29402
+ )
29403
+ },
29404
+ {
29405
+ key: 'open',
29406
+ text: '&Open',
29407
+ glyph: 'file',
29408
+ page: () => (
29409
+ <Stack gap="md">
29410
+ <h2>Open</h2>
29411
+ <ListBox label="Files" items={RECENT} itemText="text" itemValue="id" x-model={() => s.file} />
29412
+ <Button text="Open" onclick={() => { s.told = `open: ${s.file}`; s.open = false; }} />
29413
+ </Stack>
29414
+ )
29415
+ },
29416
+ { key: 'info', text: '&Info', glyph: 'info', page: () => <Stack gap="md"><h2>Info</h2><p>{() => `Selected file: ${RECENT.find(r => r.id === s.file)?.text}`}</p></Stack> },
29417
+ { key: 'save', text: '&Save', glyph: 'save', group: 'file', click: run('save') },
29418
+ { key: 'copy', text: 'Save a &copy', group: 'file', page: () => <Stack gap="md"><h2>Save a copy</h2><Button text="Save a copy" onclick={run('save a copy')} /></Stack> },
29419
+ { key: 'export', text: '&Export', glyph: 'download', group: 'file', page: () => <Stack gap="md"><h2>Export</h2><Button text="Export as PDF" onclick={run('export as PDF')} /></Stack> },
29420
+ { key: 'share', text: 'S&hare', glyph: 'upload', group: 'file', click: run('share') },
29421
+ { key: 'account', text: '&Account', glyph: 'person', bottom: true, page: () => <Stack gap="md"><h2>Account</h2><p>Signed in as Ada Lovelace</p></Stack> },
29422
+ {
29423
+ key: 'options',
29424
+ text: 'O&ptions',
29425
+ glyph: 'more',
29426
+ bottom: true,
29427
+ page: () => (
29428
+ <Stack gap="md">
29429
+ <h2>Options</h2>
29430
+ <Switch label="Save automatically" x-model={() => s.autosave} />
29431
+ </Stack>
29432
+ )
29433
+ }
29434
+ ];
29435
+
29436
+ return (
29437
+ <>
29438
+ <Button text="File" variant="outline" onclick={() => (s.open = true)} />
29439
+ <output class="am-file-told">{() => `Last command: ${s.told}`}</output>
29440
+ <AppMenu class="am-file" label="File" items={items} x-model={() => s.open} />
29441
+ </>
29442
+ );
29443
+ }
29444
+ ```
29445
+
29446
+ ## Topics
29447
+
29448
+ | Page | What it covers |
29449
+ | --- | --- |
29450
+ | `[Slots and search](appmenu-search.md)` | The app’s own content above and under the items, and a search over them. |
29451
+ | `[Programmatic changes](appmenu-programmatic.md)` | Adding, removing, moving and changing items by key. |
29452
+ | `[API reference](appmenu-api.md)` | Props, item fields, members, events, styling hooks and tokens. |
29453
+
29454
+ ## Layout
29455
+
29456
+ | Room | Layout |
29457
+ | --- | --- |
29458
+ | `Wide window` | The menu covers half of the window (`app-menu.share`), with the list beside the page. |
29459
+ | `Half the window is too narrow` | When half the window is narrower than `app-menu.min-size`, the menu covers the whole window. |
29460
+ | `The menu is too narrow for both` | When the menu is narrower than `app-menu.split-size`, the list and the page take turns, the one coming in pushing the other out. Choosing a page shows it, and Back or Escape returns to the list. |
29461
+
29462
+ ## Keyboard
29463
+
29464
+ | Key | Action |
29465
+ | --- | --- |
29466
+ | `Arrow Down, Arrow Up` | Moves between the items of both lists, wrapping at the ends. |
29467
+ | `Home, End` | Moves to the first or the last item. |
29468
+ | `Enter, Space` | Shows the page of the item, or runs its command. |
29469
+ | `A letter` | Chooses the item with that access key. Without one, moves to the next item whose text starts with the letters typed. |
29470
+ | `Escape` | Clears the search, returns to the list when the page is shown alone, and otherwise closes the menu. |
29471
+ | `Tab, Shift+Tab` | Moves between the list and the page. Focus stays inside the menu. |
29472
+
29473
+ ## Accessibility
29474
+
29475
+ | Topic | Details |
29476
+ | --- | --- |
29477
+ | `Dialog` | The panel is a modal `dialog` named by `label` or by the language pack; the page around it is `inert`. |
29478
+ | `List` | The list is a `nav` named like the menu. The item whose page is shown has `aria-current="page"`, a disabled one `aria-disabled`. |
29479
+ | `Pages` | Each page is a `region` named by its item. Shown in place of the list, it takes focus. |
29480
+ | `Focus` | It goes to the item shown when the menu opens, and back where it was when the menu closes. |
29481
+ | `Reading direction` | The panel comes from the start edge and the arrows point to it, on the right in right-to-left pages. |
29482
+ | `Motion` | The panel and the turns between list and page move with the motion tokens, and without motion when the user prefers reduced motion. |
29483
+
29484
+ ## Localization
29485
+
29486
+ Its own texts come from `uiLocale.strings`: its name when it has none (`appMenuLabel`), the close and back buttons (`appMenuClose`, `appMenuBack`), the search (`search`) and what it says when nothing matches (`appMenuNoMatch`). They change with the language at once.
29487
+
29488
+ ## Feedback
29489
+
29490
+ Loading issues…
29491
+
29492
+
29493
+ ---
29494
+
29495
+ # AppMenu: Slots and search
29496
+
29497
+ > AppMenu · @motifx-community/ui 0.1.0-beta.8
29498
+
29499
+ The list can hold the app’s own content above and under its items, such as the user’s name or the version, and a search that narrows a long list as the user types.
29500
+
29501
+ ## Slots and search
29502
+
29503
+ ```tsx
29504
+ import { reactive } from '@motifx/core';
29505
+ import { AppMenu, Avatar, Button, Stack, type AppMenuItem } from '@motifx-community/ui';
29506
+
29507
+ const SETTINGS = ['General', 'Display', 'Proofing', 'Save', 'Language', 'Accessibility', 'Advanced', 'Add-ins', 'Trust'];
29508
+
29509
+ /** The user at the top of the list, the version at the bottom, and a search over many items. */
29510
+ export default function SlotsSearch() {
29511
+ const s = reactive({ open: false, search: '' });
29512
+ const items: AppMenuItem[] = SETTINGS.map((name, i) => ({
29513
+ key: name.toLowerCase(),
29514
+ text: name,
29515
+ hint: `${name} settings`,
29516
+ group: i < 3 ? 'main' : 'more',
29517
+ page: () => (
29518
+ <Stack gap="md">
29519
+ <h2>{name}</h2>
29520
+ <p>The {name.toLowerCase()} settings of the app.</p>
29521
+ </Stack>
29522
+ )
29523
+ }));
29524
+
29525
+ return (
29526
+ <>
29527
+ <Button text="Settings" variant="outline" onclick={() => (s.open = true)} />
29528
+ <output class="am-slots-told">{() => (s.search ? `Searching for “${s.search}”` : 'Not searching')}</output>
29529
+ <AppMenu
29530
+ class="am-slots"
29531
+ label="Settings"
29532
+ items={items}
29533
+ x-model={() => s.open}
29534
+ searchEnabled
29535
+ searchText={() => s.search}
29536
+ onSearchTextChanged={e => (s.search = e.text)}
29537
+ listHeader={
29538
+ <Stack orientation="horizontal" gap="sm" align="center">
29539
+ <Avatar name="Ada Lovelace" size="sm" />
29540
+ <span>Ada Lovelace</span>
29541
+ </Stack>
29542
+ }
29543
+ listFooter={<small>Version 2.4.1</small>}
29544
+ />
29545
+ </>
29546
+ );
29547
+ }
29548
+ ```
29549
+
29550
+ ## Above and under the items
29551
+
29552
+ `listHeader` stands under the close button, above the items; `listFooter` stands at the bottom, after the items at the bottom. Each is any component and can be given again at any time.
29553
+
29554
+ ## Search
29555
+
29556
+ `searchEnabled` adds a search field above the items. Typing leaves the items whose text or hint holds what was typed, without case and marks, in the language of the page, and says so when nothing matches. Arrow Down moves to the first item left, Enter presses it, and Escape clears the search before it closes the menu. `searchText` is the text, and `onSearchTextChanged` reports what the user typed.
29557
+
29558
+ ## Feedback
29559
+
29560
+ Loading issues…
29561
+
29562
+
29563
+ ---
29564
+
29565
+ # AppMenu: Programmatic changes
29566
+
29567
+ > AppMenu · @motifx-community/ui 0.1.0-beta.8
29568
+
29569
+ Items can be added, removed, moved and changed at any time, by their keys. Items that stay keep their place, and pages that were opened keep their state.
29570
+
29571
+ ## Changes by key
29572
+
29573
+ ```tsx
29574
+ import { reactive } from '@motifx/core';
29575
+ import { AppMenu, Button, Stack, type AppMenuItem } from '@motifx-community/ui';
29576
+
29577
+ const START: AppMenuItem[] = [
29578
+ { key: 'home', text: '&Home', glyph: 'star', page: () => <h2>Home</h2> },
29579
+ { key: 'open', text: '&Open', glyph: 'file', page: () => <h2>Open</h2> },
29580
+ { key: 'save', text: '&Save', glyph: 'save', group: 'file', click: () => {} },
29581
+ { key: 'account', text: '&Account', glyph: 'person', bottom: true, page: () => <h2>Account</h2> }
29582
+ ];
29583
+
29584
+ /** Items added, removed, moved and changed by key; a page that was opened stays as it was. */
29585
+ export default function Programmatic() {
29586
+ const s = reactive({ open: false, changes: 0, unread: 0 });
29587
+ let menu!: AppMenu;
29588
+
29589
+ return (
29590
+ <Stack gap="md">
29591
+ <Stack orientation="horizontal" gap="sm" wrap>
29592
+ <Button text="Open the menu" onclick={() => (s.open = true)} />
29593
+ <Button text="Add Print" variant="outline" onclick={() => menu.addItem({ key: 'print', text: '&Print', glyph: 'file', group: 'file', page: () => <h2>Print</h2> }, 3)} />
29594
+ <Button
29595
+ text="New message on Account"
29596
+ variant="outline"
29597
+ onclick={() => {
29598
+ s.unread++;
29599
+ menu.updateItem('account', { badge: s.unread });
29600
+ }}
29601
+ />
29602
+ <Button text="Move Save first" variant="outline" onclick={() => menu.moveItem('save', 0)} />
29603
+ <Button text="Remove Open" variant="outline" onclick={() => menu.removeItem('open')} />
29604
+ <Button
29605
+ text="Start again"
29606
+ variant="outline"
29607
+ onclick={() => {
29608
+ menu.items = START;
29609
+ s.unread = 0;
29610
+ }}
29611
+ />
29612
+ </Stack>
29613
+ <output class="am-programmatic-told">{() => `${s.changes} changes`}</output>
29614
+ <AppMenu class="am-programmatic" ref={(m: AppMenu) => (menu = m)} label="File" items={START} x-model={() => s.open} onItemsChanged={() => s.changes++} />
29615
+ </Stack>
29616
+ );
29617
+ }
29618
+ ```
29619
+
29620
+ ## Methods
29621
+
29622
+ | Method | Description |
29623
+ | --- | --- |
29624
+ | `addItem(item, index?)` | Adds an item at `index`, the end by default. |
29625
+ | `removeItem(key)` | Removes the item with `key`; its page goes with it. |
29626
+ | `moveItem(key, index)` | Moves the item to `index`. |
29627
+ | `updateItem(key, changes)` | Changes some of its fields, such as `text`, `badge`, `enabled` or `visible`; the others stay as they are, and its page is kept. |
29628
+ | `findItem(key)` | The item as it is now. |
29629
+ | `beginUpdate(), endUpdate()` | Holds the changes until `endUpdate()`, which applies them at once. |
29630
+ | `select(key), openAt(key), pageOf(key)` | Shows a page, opens the menu on it, and returns its page once it has been shown. |
29631
+
29632
+ Each change method returns `false` when nothing changed, such as for a key that does not exist.
29633
+
29634
+ ## Your data
29635
+
29636
+ The methods never change the items you gave. Each change makes a new list, the item changed a new object and the others the ones given, and it becomes `items`. `onItemsChanged` reports the new list to keep. When the items are in reactive state, you can also change that state directly; the menu follows it, and each item’s fields can be functions it follows.
29637
+
29638
+ ## Feedback
29639
+
29640
+ Loading issues…
29641
+
29642
+
29643
+ ---
29644
+
29645
+ # AppMenu: API reference
29646
+
29647
+ > AppMenu · @motifx-community/ui 0.1.0-beta.8
29648
+
29649
+ Everything `AppMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
29650
+
29651
+ ## Props
29652
+
29653
+ | Prop | Type | Default | Description |
29654
+ | --- | --- | --- | --- |
29655
+ | `items` | `Bind<readonly AppMenuItem[]>` | `[]` | The items. Nothing is there until they are given. |
29656
+ | `value` | `Bind<boolean>` | `false` | Whether the menu is open. `x-model` provides two-way binding. |
29657
+ | `selected` | `Bind<string \| number \| null>` | the first page item | The key of the page item shown. |
29658
+ | `label` | `Bind<string>` | the language pack | Names the menu for assistive technology. |
29659
+ | `closeOnCommand` | `Bind<boolean>` | `true` | A command or a link closes the menu. Each item can say otherwise (`closeOnClick`). |
29660
+ | `listHeader, listFooter` | `Bind<ComponentBase \| null>` | none | Any content of the app above and under the items. |
29661
+ | `searchEnabled` | `Bind<boolean>` | `false` | A search field above the items. |
29662
+ | `searchText` | `Bind<string>` | `''` | The text searched for. |
29663
+ | `modal, scrim, closeOnEscape, closeOnScrim, closeOnBack, focusOnOpen, returnFocus, container, disposeOnClose` | see BottomSheet | | Props shared by all overlay panels, as listed on the [BottomSheet page](bottomsheet.md#api). |
29664
+
29665
+ ## AppMenuItem
29666
+
29667
+ | Field | Type | Description |
29668
+ | --- | --- | --- |
29669
+ | `key` | `string \| number` | Finds the item, and is `selected` while its page is shown. The default is its position. |
29670
+ | `text, hint` | `Bind<string>` | The text (`&` marks the access key) and a tooltip. |
29671
+ | `glyph, icon` | `Bind<string>`, `Bind<IconSource>` | A glyph name, or an image address or a component. |
29672
+ | `page` | `() => ComponentBase` | Makes it a page item. The page is made the first time it is shown, and kept. |
29673
+ | `href, rel, target` | `Bind<string>` | Makes it a link. |
29674
+ | `badge, dot` | `Bind<number \| null>`, `Bind<boolean>` | A count in a badge, or a dot. |
29675
+ | `group` | `Bind<string>` | Items of the same group stand together, with a line between groups. |
29676
+ | `bottom` | `Bind<boolean>` | Puts the item in the list at the bottom. |
29677
+ | `enabled, visible` | `Bind<boolean>` | `false` dims or removes the item. |
29678
+ | `closeOnClick` | `Bind<boolean>` | Whether pressing a command or a link closes the menu. |
29679
+ | `click` | `(e: AppMenuItemClickEventArgs) => void` | Occurs when the item is pressed; `e.keepOpen` keeps the menu open. |
29680
+ | `data` | `unknown` | A custom application value. |
29681
+
29682
+ ## Members
29683
+
29684
+ | Member | Returns | Description |
29685
+ | --- | --- | --- |
29686
+ | `open(), close(reason?), toggle(), show(host)` | `boolean` | As on every overlay panel. |
29687
+ | `select(key), openAt(key)` | `boolean` | Shows a page, as a click does, or opens the menu on it. `false` when `onSelecting` refused. |
29688
+ | `pageOf(key)` | `ComponentBase \| null` | The page of an item, once it has been shown. |
29689
+ | `addItem, removeItem, moveItem, updateItem` | `boolean` | Changes by key; see [Programmatic changes](appmenu-programmatic.md). |
29690
+ | `findItem(key)` | `AppMenuItem \| null` | The item as it is now. |
29691
+ | `beginUpdate(), endUpdate()` | `void` | Holds the changes by key, then applies them at once. |
29692
+ | `isOpen, shownKey` | read-only | Whether it is open, and the key of the page shown. |
29693
+
29694
+ ## Events
29695
+
29696
+ | Event | Arguments | Description |
29697
+ | --- | --- | --- |
29698
+ | `onSelecting` | `AppMenuSelectingEventArgs` | Before another page is shown. Setting `cancel` keeps the page shown now. |
29699
+ | `onSelectionChanged` | `AppMenuSelectionChangedEventArgs` | After another page is shown. |
29700
+ | `onItemClick` | `AppMenuItemClickEventArgs` | An item was pressed, after its own `click`. |
29701
+ | `onSearchTextChanged` | `AppMenuSearchTextChangedEventArgs` | The user typed in the search field. |
29702
+ | `onItemsChanged` | `AppMenuItemsChangedEventArgs` | A change by key made a new list of items, to keep. |
29703
+ | `onOpening, onOpened, onClosing, onClosed` | see BottomSheet | As on every overlay panel. |
29704
+
29705
+ ## Styling
29706
+
29707
+ | Hook | Description |
29708
+ | --- | --- |
29709
+ | `.mx-app-menu` | The layer. `data-full`, `data-stacked`, `data-view` (`list` or `page`), `data-turn` while the list and the page take turns. |
29710
+ | `__panel, __nav, __close` | The panel, the list’s column and its close button. |
29711
+ | `__header-slot, __search, __list, __list--bottom, __no-match, __footer-slot` | The parts of the list’s column, top to bottom. |
29712
+ | `__item, __icon, __label, __badge, __separator` | An item and its parts. `data-selected`, `data-key`. |
29713
+ | `__page, __page-head, __back, __view` | The page area, the row with the back button, and each item’s page. |
29714
+
29715
+ ### Component tokens
29716
+
29717
+ | Token | Description |
29718
+ | --- | --- |
29719
+ | `app-menu.share, min-size, split-size, nav-size, font-family` | The share of the window, the width under which it takes the whole window, the width under which list and page take turns, the list’s width, the font. |
29720
+ | `app-menu.close-button, back-button` | Places: the variant, tone and size of its buttons. |
29721
+ | `app-menu.scrim, panel, nav, list, separator, item, indicator, icon, label` | Units of the panel and the list. |
29722
+ | `app-menu.header-slot, search, no-match, footer-slot` | Units of the parts above and under the items. |
29723
+ | `app-menu.page, page-head, view` | Units of the page area. |
29724
+
29725
+ ## Feedback
29726
+
29727
+ Loading issues…
29728
+
29729
+
28221
29730
  ---
28222
29731
 
28223
29732
  # TabDocumentManager
28224
29733
 
28225
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
29734
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
28226
29735
 
28227
29736
  A document manager that arranges content the way code editors arrange files: documents in tabs, tabs in groups, and groups split side by side or one above the other. A document's content can be any component, such as a form, a grid or plain text, and it is moved rather than recreated when its tab goes to another group. Every user action is also a method, with a cancelable event before it and a notification after it, and the whole layout can be saved to JSON and restored. Preview and pinned tabs, sizes and copies are covered in [Tabs](tabdocs-tabs.md), and context menus, lists and keyboard shortcuts in [Menus and keys](tabdocs-menus.md).
28228
29737
 
@@ -29118,7 +30627,7 @@ export default function SaveRestore() {
29118
30627
 
29119
30628
  # TabDocumentManager: Tabs
29120
30629
 
29121
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
30630
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
29122
30631
 
29123
30632
  Tabs that behave as they do in code editors: preview tabs replaced by the next preview, pinned tabs that stay at the start, tabs that shrink, wrap or scroll, counts and colors, and the same document open in two groups.
29124
30633
 
@@ -29956,7 +31465,7 @@ export default function Duplicates() {
29956
31465
 
29957
31466
  # TabDocumentManager: Menus and keys
29958
31467
 
29959
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
31468
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
29960
31469
 
29961
31470
  The commands around tabs: context menus on tabs and on the empty strip, a searchable list of a group's documents, application toolbar buttons, the recently used list, back and forward, reopening closed documents, locked groups, and keyboard shortcuts for all of them.
29962
31471
 
@@ -30653,7 +32162,7 @@ export function customerCard(customer: Customer): ComponentBase {
30653
32162
 
30654
32163
  # TabDocumentManager: Drag and drop
30655
32164
 
30656
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
32165
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
30657
32166
 
30658
32167
  Drag tabs and whole groups as you would in a code editor: along a strip, to another group, beside a group, along an edge of the layout, or between two managers. The same moves are available from the keyboard, and every drop goes through the methods and events of the action it performs.
30659
32168
 
@@ -31215,7 +32724,7 @@ export default function MoveWithKeys() {
31215
32724
 
31216
32725
  # TabDocumentManager: Dock and floating windows
31217
32726
 
31218
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
32727
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
31219
32728
 
31220
32729
  Documents and whole groups can float in their own windows within the page, and dock again into document groups or into dock areas around them, which can collapse to the edge of the manager. The mouse, the keyboard and the API all perform the same actions through the same events.
31221
32730
 
@@ -31568,7 +33077,7 @@ docs.onWindowClosing((e) => {
31568
33077
  | `hide(doc)` | `boolean` | Removes it from its group without closing it. Its content is kept according to its `contentLifetime`, and a group, area or window it leaves empty is removed. |
31569
33078
  | `show(doc, { group?, side?, index?, active?, focus? })` | `boolean` | Returns it to where it was hidden from: its group, otherwise its dock area (recreated at its size, collapsed if it was), otherwise a window in the same position, otherwise the documents. `group` or `side` names another place. `open(doc)` does the same. |
31570
33079
  | `hiddenDocuments` | read-only, reactive | The hidden documents, in the order they were hidden. `findDocument(id)` also finds them. |
31571
- | `focusWindow(w), focusPart(by?)` | `boolean` | Brings a window to the front with focus where it was, or moves to the next (or with `-1`, previous) part: the documents, each area and each window. |
33080
+ | `focusWindow(w), focusNextPart(by?)` | `boolean` | Brings a window to the front with focus where it was, or moves to the next (or with `-1`, previous) part: the documents, each area and each window. |
31572
33081
  | `resizeDockArea(area, size)` | `boolean` | In pixels, or as a share such as `'25%'`. |
31573
33082
  | `floatingWindows, dockAreas` | read-only, reactive | The windows, with the one at the back first, and the areas, with the outermost first. `dockArea(side)` finds one. |
31574
33083
  | `saveLayout(), loadLayout(layout, factory?)` | `TabLayout` (version 3) | Also includes the areas (`side`, `size`, `autoHide`, their layout), the windows (`rect`, `maximized`, where they dock back, their layout) and the hidden documents (`hidden`, with where they return to). Older layouts still load. |
@@ -32100,7 +33609,7 @@ export function customerCard(customer: Customer): ComponentBase {
32100
33609
 
32101
33610
  # TabDocumentManager: New windows
32102
33611
 
32103
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
33612
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
32104
33613
 
32105
33614
  A document, a group or a floating window can move into its own browser window and back. Its content moves with it without being recreated, and the new window is part of the same manager, so its tabs, menus, keys and dragging work the same way.
32106
33615
 
@@ -32506,7 +34015,6 @@ docs.onError((e) => {
32506
34015
  | --- | --- |
32507
34016
  | `connectDocument(doc), disconnectDocument(doc), pageDocuments()` | The kit's document-level listeners (keys, access keys, tooltips, the focus guard) also work in another same-origin document, and are disconnected when its window closes. |
32508
34017
  | `mirrorPage(source, target)` | Copies the page's style sheets and the attributes of `<html>` and `<body>` into another document and keeps them in sync. Returns a function that stops this. |
32509
- | `ResizeWatch` | A `ResizeObserver` that follows its elements into another window, because a browser's observer only reports elements of its own window. |
32510
34018
 
32511
34019
  See the [overview](tabdocs.md#api), [Tabs](tabdocs-tabs.md), [Menus and keys](tabdocs-menus.md), [Drag and drop](tabdocs-drag.md) and [Dock and floating windows](tabdocs-dock.md) for the rest of the API.
32512
34020
 
@@ -32765,7 +34273,7 @@ export default function WindowLayout() {
32765
34273
 
32766
34274
  # TabDocumentManager: Tablet and phone
32767
34275
 
32768
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
34276
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
32769
34277
 
32770
34278
  On tablets and phones, a layout of groups, splits and dock areas does not fit as designed. The manager keeps the layout and changes how it is presented: the documents, groups, areas and saved JSON stay the same, and content is moved rather than recreated. The presentation depends on the manager's own width rather than the device, and on touch screens its tabs and buttons are larger.
32771
34279
 
@@ -33050,7 +34558,7 @@ Loading issues…
33050
34558
 
33051
34559
  # TabDocumentManager: A whole workspace
33052
34560
 
33053
- > TabDocumentManager · @motifx-community/ui 0.1.0-beta.7
34561
+ > TabDocumentManager · @motifx-community/ui 0.1.0-beta.8
33054
34562
 
33055
34563
  A complete screen built from kit components: a menu bar, the manager, a DataGrid with every feature enabled, forms, and a tool docked at the bottom. Each part is the same component documented on its own page, and the manager simply hosts them.
33056
34564
 
@@ -33467,7 +34975,7 @@ export function customerCard(customer: Customer): ComponentBase {
33467
34975
 
33468
34976
  # Scheduler
33469
34977
 
33470
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
34978
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
33471
34979
 
33472
34980
  A full-featured calendar for appointments across days and hours. It provides day, week, work week and month views, all-day and multi-day bars, side-by-side display of overlapping appointments, and a "+N more" link when a day is full. Appointments can come from an array or a data source, and every setting can change at runtime.
33473
34981
 
@@ -34067,7 +35575,7 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
34067
35575
 
34068
35576
  # Scheduler: Editing
34069
35577
 
34070
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
35578
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
34071
35579
 
34072
35580
  Users can add, move, resize, copy and delete appointments with the pointer and the keyboard, and you can do the same programmatically. Every change raises its event first, can wait for a server, and is reverted if saving fails.
34073
35581
 
@@ -34620,7 +36128,7 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
34620
36128
 
34621
36129
  # Scheduler: Recurrence and time zones
34622
36130
 
34623
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
36131
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
34624
36132
 
34625
36133
  Recurring appointments based on RFC 5545 rules, with exceptions and individually edited occurrences, a prompt that asks what a change should apply to, a recurrence editor, and time zone support that handles daylight saving time.
34626
36134
 
@@ -35048,7 +36556,7 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
35048
36556
 
35049
36557
  # Scheduler: Resources and groups
35050
36558
 
35051
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
36559
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
35052
36560
 
35053
36561
  Resources such as rooms, people and equipment can color appointments, divide columns into groups (nested or under each date), and define when each resource is available and when time is blocked.
35054
36562
 
@@ -35758,7 +37266,7 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
35758
37266
 
35759
37267
  # Scheduler: The appointment form
35760
37268
 
35761
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
37269
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
35762
37270
 
35763
37271
  Configure the appointment form without handling events. You can choose its fields and their order, arrange them in groups and tabs, use custom editors, add validation per field, and show or lock fields for specific appointments. You can also replace the form with your own.
35764
37272
 
@@ -36397,7 +37905,7 @@ export default function OwnForm() {
36397
37905
 
36398
37906
  # Scheduler: Timeline
36399
37907
 
36400
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
37908
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
36401
37909
 
36402
37910
  Displays one row per resource, with time running along the row, for a day, a week, a work week or a month. Appointments at the same time stack within a row, and the row grows to fit them.
36403
37911
 
@@ -37037,7 +38545,7 @@ export default function TimelineTemplates() {
37037
38545
 
37038
38546
  # Scheduler: Agenda
37039
38547
 
37040
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
38548
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
37041
38549
 
37042
38550
  Displays upcoming days as a list, with each day's appointments in time order. Days without appointments are omitted.
37043
38551
 
@@ -37642,7 +39150,7 @@ export default function AgendaTemplates() {
37642
39150
 
37643
39151
  # Scheduler: Big data
37644
39152
 
37645
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
39153
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
37646
39154
 
37647
39155
  Handles thousands of resources and appointments. The scheduler renders only what is visible, and recalculates the layout only for what has changed.
37648
39156
 
@@ -37903,7 +39411,7 @@ export default function BigWeek() {
37903
39411
 
37904
39412
  # Scheduler: Tablet and phone
37905
39413
 
37906
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
39414
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
37907
39415
 
37908
39416
  On tablets and phones, the scheduler keeps its appointments, views and date, and changes how it presents them. On a phone, it shows the agenda, a compact toolbar and bottom sheets. Touch gestures can lift and resize appointments, swipe between days, and pinch to zoom.
37909
39417
 
@@ -38575,7 +40083,7 @@ export default function Touch() {
38575
40083
 
38576
40084
  # Scheduler: iCalendar and print
38577
40085
 
38578
- > Scheduler · @motifx-community/ui 0.1.0-beta.7
40086
+ > Scheduler · @motifx-community/ui 0.1.0-beta.8
38579
40087
 
38580
40088
  Exports appointments to an iCalendar file (RFC 5545) and imports them back, for use with other calendar applications. The scheduler can also be printed.
38581
40089
 
@@ -39174,7 +40682,7 @@ export function sampleAppointments(): Meeting[] {
39174
40682
 
39175
40683
  # DataGrid
39176
40684
 
39177
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
40685
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
39178
40686
 
39179
40687
  A grid for data entry and large data sets. Rows can be in memory or come from any data layer adapter, and can be displayed in a virtual list or in pages. It supports sorting, column layout, editing with kit editors, new rows with Tab navigation, three save modes, row actions, selection, filters, a search panel, grouping, summaries, a toolbar, lookup columns from other services, copy and paste, export, and a persistent layout. Every feature can be disabled for the grid or for a single column.
39180
40688
 
@@ -39544,7 +41052,7 @@ export default function Pager() {
39544
41052
 
39545
41053
  # DataGrid: Editing
39546
41054
 
39547
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
41055
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
39548
41056
 
39549
41057
  ## Editing and save modes
39550
41058
 
@@ -40089,7 +41597,7 @@ export default function BarActions() {
40089
41597
 
40090
41598
  # DataGrid: Edit forms and popups
40091
41599
 
40092
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
41600
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
40093
41601
 
40094
41602
  ## Edit forms and popups
40095
41603
 
@@ -40202,7 +41710,7 @@ Every rule accepts a `message` (`Bind<string>`). Without it, the text comes from
40202
41710
  | --- | --- | --- |
40203
41711
  | `onEditingStart` | `{ field, row, values, getValue, rowIndex, isNew, cancel }` | Occurs before a cell editor or a row's form (`field` `''`) opens. Set `cancel` to leave the row unchanged. `row` is the row itself (a class instance stays one), `values` holds the entered, unsaved values, and `getValue(field)` returns the entered value, otherwise the row's. |
40204
41712
  | `onEditorPreparing` | `{ field, row, values, getValue, isNew, options, cancel }` | Occurs before the editor of a cell or form field is created. Change its props, or set `cancel` to omit a field from the form. |
40205
- | `onEditorPrepared` | `{ field, row, values, getValue, isNew, editor, element, place: 'cell' \| 'form' }` | Occurs after an editor is created. |
41713
+ | `onEditorPrepared` | `{ field, row, values, getValue, isNew, editor, part, place: 'cell' \| 'form' }` | Occurs after an editor is created. |
40206
41714
  | `onRowValidating` | `{ key, row, values, getValue, isNew, changed, errors, isValid, errorText, cancel }` | Occurs when a row is validated before saving, after its cells and their async rules. Add or remove messages in `errors` (by field, with `''` for the row), or set `isValid = false` with `errorText`. Occurs once per validation of the row. |
40207
41715
  | `onInitNewRow, onSaving, onRowInserting, onRowUpdating, onEditCanceling …` | See [Events](datagrid-layout.md#events) | The same in every edit mode: Save in a form is a save, and Cancel is a cancel. |
40208
41716
 
@@ -40499,7 +42007,7 @@ export default function ValidationRules() {
40499
42007
 
40500
42008
  # DataGrid: Filtering and search
40501
42009
 
40502
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
42010
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
40503
42011
 
40504
42012
  ## Filters
40505
42013
 
@@ -40519,6 +42027,42 @@ export interface Order {
40519
42027
  }
40520
42028
  ```
40521
42029
 
42030
+ ## Custom filter editors
42031
+
42032
+ A column's `filterEditor` replaces the filter row's editor of its type. A `Field` it returns, such as a `NumberBox` with a minimum, is bound to the column's filter both ways. Any other component receives a `FilterEditorContext`: it writes the value with `ctx.setValue` (`ctx.clear()` removes it) and hears the filter change elsewhere, such as the filters being cleared, through `ctx.onChanged`. `ctx.operator` is the condition chosen in the cell. The editor for a cell, the column's `editor`, is separate: see [Editing](datagrid-editing.md).
42033
+
42034
+ ```tsx
42035
+ /** An order, as stored by the sample server. */
42036
+ export interface Order {
42037
+ id: number;
42038
+ customer: string;
42039
+ city: string;
42040
+ date: string;
42041
+ status: string;
42042
+ paid: boolean;
42043
+ amount: number;
42044
+ note: string;
42045
+ }
42046
+ ```
42047
+
42048
+ ## List choices from a server
42049
+
42050
+ A list column's `options` can be a function, which can return a promise. In a cell's editor it is called with the row, so the choices can depend on it. Everywhere else (the cell text, the filter row, the search panel, the filter builder and pasted text) it is called once with `row` `null`, returns every choice, and its answer is kept until `refresh()`. Until it arrives, the cells show the values and the filter row's list says it is loading. Here the server is asked once, however many places use the choices.
42051
+
42052
+ ```tsx
42053
+ /** An order, as stored by the sample server. */
42054
+ export interface Order {
42055
+ id: number;
42056
+ customer: string;
42057
+ city: string;
42058
+ date: string;
42059
+ status: string;
42060
+ paid: boolean;
42061
+ amount: number;
42062
+ note: string;
42063
+ }
42064
+ ```
42065
+
40522
42066
  ## Filter panel and builder
40523
42067
 
40524
42068
  `settings.filterPanel` adds a panel below the rows that shows the filter value as text, such as `[City] Equals 'Ankara' And [Amount] Is greater than '900.00'`, using column titles, formats and lookup text. Clicking it opens the kit's [FilterBuilder](filterbuilder.md) in a modal window with every column (`filterBuilder` disables it for a column), and with “is any of” and “is none of” for each one. OK applies the value as the filter value, and Cancel and Escape discard it. The check box turns the filter value off and on, and Clear removes it.
@@ -40720,6 +42264,75 @@ export interface Order {
40720
42264
  }
40721
42265
  ```
40722
42266
 
42267
+ `FilterEditors.tsx`
42268
+
42269
+ ```tsx
42270
+ import { Component } from '@motifx/core';
42271
+ import { ButtonGroup, DataGrid, NumberBox, type FilterEditorContext, type GridColumn } from '@motifx-community/ui';
42272
+ import type { Order } from './order';
42273
+ import { columns, makeOrders } from './orders';
42274
+
42275
+ /** The status chosen from buttons, written to the filter through the context and redrawn when the filter changes. */
42276
+ function statusButtons(ctx: FilterEditorContext<Order>) {
42277
+ const box = new Component<HTMLDivElement>('div');
42278
+ const buttons = new ButtonGroup({
42279
+ label: 'Status',
42280
+ size: 'sm',
42281
+ selection: 'single',
42282
+ allowEmpty: true,
42283
+ items: [
42284
+ { value: 'Approved', text: 'Approved' },
42285
+ { value: 'Shipped', text: 'Shipped' },
42286
+ { value: 'Delivered', text: 'Delivered' }
42287
+ ],
42288
+ value: ctx.value as string,
42289
+ onValueChanged: e => e.byUser && ctx.setValue(e.value)
42290
+ });
42291
+ ctx.onChanged(value => (buttons.value = (value as string) ?? null));
42292
+ box.controls.add(buttons);
42293
+ return box;
42294
+ }
42295
+
42296
+ /** Each column's own filter editor: buttons for the status, a number box that takes no negative amount. */
42297
+ export default function FilterEditors() {
42298
+ const own: GridColumn<Order>[] = columns.map(c =>
42299
+ c.field === 'status'
42300
+ ? { ...c, width: 260, filterEditor: statusButtons }
42301
+ : c.field === 'amount'
42302
+ ? { ...c, filterOperators: ['>=', '<='], filterEditor: () => new NumberBox({ labelMode: 'hidden', size: 'sm', min: 0, step: 100 }) }
42303
+ : c
42304
+ );
42305
+ return <DataGrid class="dg-filter-editors" style="block-size: 24rem" rows={makeOrders(200)} rowKey="id" columns={own} label="Orders with their own filter editors" settings={{ filterRow: true }} />;
42306
+ }
42307
+ ```
42308
+
42309
+ `ServerChoices.tsx`
42310
+
42311
+ ```tsx
42312
+ import { reactive } from '@motifx/core';
42313
+ import { DataGrid, type GridColumn, type ListOption } from '@motifx-community/ui';
42314
+ import type { Order } from './order';
42315
+ import { columns, makeOrders } from './orders';
42316
+
42317
+ const PLATES: Record<string, string> = { Ankara: '06', Antalya: '07', Bursa: '16', İstanbul: '34', İzmir: '35', Konya: '42', Trabzon: '61' };
42318
+
42319
+ /** The city choices come from a pretend server: asked once with no row, they write the cells, the filter row and the search. */
42320
+ export default function ServerChoices() {
42321
+ const s = reactive({ asked: 0 });
42322
+ const cities = (): Promise<readonly ListOption[]> => {
42323
+ s.asked++;
42324
+ return new Promise(done => setTimeout(() => done(Object.entries(PLATES).map(([city, plate]) => ({ value: city, label: `${city} (${plate})` }))), 800));
42325
+ };
42326
+ const own: GridColumn<Order>[] = columns.map(c => (c.field === 'city' ? { ...c, width: 150, options: cities } : c));
42327
+ return (
42328
+ <>
42329
+ <DataGrid class="dg-server-choices" style="block-size: 24rem" rows={makeOrders(200)} rowKey="id" columns={own} label="Orders with cities from a server" settings={{ filterRow: true, searchPanel: true }} />
42330
+ <output class="dg-server-choices-asked">{() => `The server was asked ${s.asked} times`}</output>
42331
+ </>
42332
+ );
42333
+ }
42334
+ ```
42335
+
40723
42336
  `FilterPanel.tsx`
40724
42337
 
40725
42338
  ```tsx
@@ -40962,7 +42575,7 @@ export function makeCustomers(n: number): Customer[] {
40962
42575
 
40963
42576
  # DataGrid: Lookup columns
40964
42577
 
40965
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
42578
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
40966
42579
 
40967
42580
  ## Lookup columns
40968
42581
 
@@ -41055,7 +42668,7 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
41055
42668
  | `searchLimit` | The maximum number of items containing the search panel's text that the search converts to keys. The default is 100. |
41056
42669
  | `filterSearchLimit` | The same for the header filter's search box. The default is 1000. |
41057
42670
  | `pageSize` | The number of items the editor's list loads per request while scrolling (with a data source). The default is 50. |
41058
- | `parallelRequests` | With `'byKey'`, the number of simultaneous requests. The default is 6. |
42671
+ | `parallelRequests` | The number of simultaneous requests: of keys with `'byKey'`, of batches with `'batch'`. The default is 6. |
41059
42672
  | `pasteSearchLimit` | The number of items searched for pasted text. The default is 50. |
41060
42673
 
41061
42674
  ## Feedback
@@ -41333,7 +42946,7 @@ export default function TextFrom() {
41333
42946
 
41334
42947
  # DataGrid: Grouping and summaries
41335
42948
 
41336
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
42949
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
41337
42950
 
41338
42951
  ## Grouping
41339
42952
 
@@ -41820,7 +43433,7 @@ export default function SummariesServer() {
41820
43433
 
41821
43434
  # DataGrid: Master-detail
41822
43435
 
41823
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
43436
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
41824
43437
 
41825
43438
  ## Master-detail
41826
43439
 
@@ -41851,7 +43464,7 @@ export function makeCustomers(n: number): Customer[] {
41851
43464
  | Option | Type | Default | Description |
41852
43465
  | --- | --- | --- | --- |
41853
43466
  | `masterDetail.enabled` | `Bind<boolean>` | `false` | The expand column, after the status and check box columns and pinned with them, lets the user open and close details. When disabled, they can be opened only programmatically. |
41854
- | `masterDetail.template` | `(ctx: DetailContext<T>) => unknown` | — | The content of a row's details: a component (another `DataGrid`, a `FormLayout`, `Tabs` …), an element or text. It is created the first time the details are shown. `ctx` provides `row` (the row itself) and `rowIndex`, both getters that are read again when the row shows another one and on `grid.repaint()` or `grid.repaintRows(keys)`, plus `key`, `grid` and `collapse()`. |
43467
+ | `masterDetail.template` | `(ctx: DetailContext<T>) => unknown` | — | The content of a row's details: a component (another `DataGrid`, a `FormLayout`, `Tabs` …) or text. It is created the first time the details are shown. `ctx` provides `row` (the row itself) and `rowIndex`, both getters that are read again when the row shows another one and on `grid.repaint()` or `grid.repaintRows(keys)`, plus `key`, `grid` and `collapse()`. |
41855
43468
  | `masterDetail.autoExpandAll` | `Bind<boolean>` | `false` | Every row starts open. Changing this setting, `enabled` or `template` opens or closes every row again. |
41856
43469
  | `masterDetail.canExpand` | `Bind<boolean> \| (row) => boolean` | `true` | Whether a row has details. A row without details has no arrow, and `expandRow` leaves it closed. Unsaved new rows have no details. |
41857
43470
  | `masterDetail.keepDetails` | `Bind<boolean>` | `true` | A closed row keeps the content of its details and shows it unchanged when it reopens. When disabled, closing disposes the content. |
@@ -41911,7 +43524,7 @@ The arrow is a button with `aria-expanded` and `aria-controls`, and the row also
41911
43524
  | --- | --- | --- |
41912
43525
  | `onRowExpanding / onRowCollapsing` | `{ kind: 'detail', key, row, cancel }` | Occurs before a row's details open or close, from the user or programmatically. Set `cancel` to keep them as they are. These are the same events as for groups (`kind: 'group'`). |
41913
43526
  | `onRowExpanded / onRowCollapsed` | `{ kind: 'detail', key, row }` | Occurs after they open or close. |
41914
- | `onRowPrepared` | `{ rowType: 'detail', row, rowIndex, element }` | Occurs when a row's details have been rendered for a row. |
43527
+ | `onRowPrepared` | `{ rowType: 'detail', row, rowIndex, part }` | Occurs when a row's details have been rendered for a row. |
41915
43528
  | `onOptionChanged` | `{ name: 'masterDetail.enabled', value, previous }` | Occurs when a `masterDetail` option is assigned through `grid.masterDetail`. |
41916
43529
 
41917
43530
  | Member | Returns | Description |
@@ -42154,7 +43767,7 @@ export default function DetailTabs() {
42154
43767
 
42155
43768
  # DataGrid: Bands and adaptive columns
42156
43769
 
42157
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
43770
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
42158
43771
 
42159
43772
  ## Band headers
42160
43773
 
@@ -42479,7 +44092,7 @@ export default function AdaptiveColumns() {
42479
44092
 
42480
44093
  # DataGrid: Selection and export
42481
44094
 
42482
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
44095
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
42483
44096
 
42484
44097
  ## Selection
42485
44098
 
@@ -43086,7 +44699,7 @@ export default function PdfExport() {
43086
44699
 
43087
44700
  # DataGrid: Row drag and drop
43088
44701
 
43089
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
44702
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
43090
44703
 
43091
44704
  ## Reorder rows
43092
44705
 
@@ -43154,9 +44767,9 @@ export interface Task {
43154
44767
  | `handle` | `Bind<string>` | `''` | A CSS selector for the part of a row used for dragging, instead of the icon or the whole row. |
43155
44768
  | `group, data` | `Bind<string>`, `Bind<unknown>` | — | Grids in the same group accept each other's rows. `data` is passed to the events as `fromData` and `toData`. |
43156
44769
  | `dragDirection` | `Bind<'both' \| 'vertical' \| 'horizontal'>` | `'both'` | Where the copy of the row can go. |
43157
- | `boundary, container` | `Bind<string \| HTMLElement>` | None, and the grid | The element the dragged row stays inside, and the element that displays its copy. |
44770
+ | `boundary, container` | `Bind<string \| ComponentBase>` | None, and the grid | The component the dragged row stays inside, and the component that displays its copy, or a selector of each. |
43158
44771
  | `cursorOffset` | `Bind<{ x, y } \| string>` | Where the row was grabbed | The offset of the copy from the pointer. |
43159
- | `dragTemplate` | `({ itemData, itemElement }) => unknown` | A copy of the row | Custom content under the pointer: a component, an element or text. |
44772
+ | `dragTemplate` | `({ itemData, itemPart }) => ComponentBase \| string` | A copy of the row | Custom content under the pointer: a component or text. |
43160
44773
  | `autoScroll, scrollSpeed, scrollSensitivity` | `Bind<boolean>`, `Bind<number>`, `Bind<number>` | `true`, `30`, `60` | The rows scroll while the pointer is near their top or bottom edge: the speed in pixels per frame at the edge, and the distance at which it starts. |
43161
44774
  | `keyboard, moveUpKeys, moveDownKeys` | `Bind<boolean>`, `Bind<string[]>` | `true`, `['Ctrl+Shift+ArrowUp']`, `['Ctrl+Shift+ArrowDown']` | Moves the active row one position up or down with these keys (any combination, such as `Mod+Alt+Up`), with the same events as a drop. The move is announced. |
43162
44775
  | `columnWidth` | `Bind<number>` | `36` | The width of the drag icon column, in pixels. |
@@ -43183,7 +44796,7 @@ export interface Task {
43183
44796
  | Event field | Value |
43184
44797
  | --- | --- |
43185
44798
  | `component, fromComponent, toComponent` | The grid raising the event, the grid the row comes from, and the grid under the pointer (the same while reordering, or `null` when over none). |
43186
- | `itemData, itemKey, itemElement` | The dragged row, its key and its element. |
44799
+ | `itemData, itemKey, itemPart` | The dragged row, its key and its part. |
43187
44800
  | `fromIndex, toIndex` | The grid's row indexes (as counted by `focusedRowIndex` and `getVisibleRows()`, also across pages): the current position, and the position after the drop. |
43188
44801
  | `toItemData` | The row at `toIndex` before the drop, which is where to insert the row. It is `undefined` at the end of the other grid or on a group row. |
43189
44802
  | `dropInsideItem, fromData, toData, event` | Whether it was dropped onto the row at `toIndex`, the grids' `rowDragging.data`, and the pointer or key event. |
@@ -43435,7 +45048,7 @@ export default function RowDragBetween() {
43435
45048
 
43436
45049
  # DataGrid: Selecting by dragging
43437
45050
 
43438
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
45051
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
43439
45052
 
43440
45053
  ## Rows
43441
45054
 
@@ -43769,7 +45382,7 @@ export default function CellRanges() {
43769
45382
 
43770
45383
  # DataGrid: Scrolling
43771
45384
 
43772
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
45385
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
43773
45386
 
43774
45387
  ## Scrolling modes
43775
45388
 
@@ -44125,7 +45738,7 @@ export default function InfiniteGroups() {
44125
45738
 
44126
45739
  # DataGrid: Layout and events
44127
45740
 
44128
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
45741
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
44129
45742
 
44130
45743
  ## Toolbar
44131
45744
 
@@ -44305,14 +45918,14 @@ export interface Order {
44305
45918
 
44306
45919
  | Event | Parameters | Cancel | When |
44307
45920
  | --- | --- | --- | --- |
44308
- | `onCellClick / onCellDblClick` | `{ field, row, rowIndex, rowType, groupKey?, element, event }` | yes | Occurs when a cell is clicked or double-clicked (also in a group footer, `rowType: 'groupFooter'`, and in the totals row, `'totalFooter'`). Canceling prevents selection, the group toggle and the editor. |
44309
- | `onRowClick / onRowDblClick` | `{ row, rowIndex, rowType, groupKey?, element, event }` | yes | The same for the row, after its cell's event. |
44310
- | `onCellPrepared` | `{ field, row, rowIndex, value, isNew, element }` | | Occurs when a cell is rendered for a row, so that you can style it. Cells are reused while scrolling, so set and clear what you change. It has no cost when there are no listeners. |
44311
- | `onRowPrepared` | `{ row, rowIndex, rowType, groupKey?, isSelected, element }` | | Occurs when a data row, group row, group footer (`groupFooter`) or the totals row (`totalFooter`) is rendered. The same rule applies. |
45921
+ | `onCellClick / onCellDblClick` | `{ field, row, rowIndex, rowType, groupKey?, part, event }` | yes | Occurs when a cell is clicked or double-clicked (also in a group footer, `rowType: 'groupFooter'`, and in the totals row, `'totalFooter'`). Canceling prevents selection, the group toggle and the editor. |
45922
+ | `onRowClick / onRowDblClick` | `{ row, rowIndex, rowType, groupKey?, part, event }` | yes | The same for the row, after its cell's event. |
45923
+ | `onCellPrepared` | `{ field, row, rowIndex, value, isNew, part }` | | Occurs when a cell is rendered for a row, so that you can style it. Cells are reused while scrolling, so set and clear what you change. It has no cost when there are no listeners. |
45924
+ | `onRowPrepared` | `{ row, rowIndex, rowType, groupKey?, isSelected, part }` | | Occurs when a data row, group row, group footer (`groupFooter`) or the totals row (`totalFooter`) is rendered. The same rule applies. |
44312
45925
  | `onContentReady` | `{ total }` | | Occurs when rows have arrived and been laid out (after a load, a filter, a sort, a page change or a resize). |
44313
45926
  | `onDataErrorOccurred` | `{ error, operation, row? }` | | Occurs when a load (`operation: 'load'`) or the save of a row (`'save'`, with `row`) fails. |
44314
45927
  | `onEditingStart` | `{ field, row, rowIndex, isNew }` | yes | Occurs before a cell editor or a row's edit form (`field` `''`) opens. |
44315
- | `onEditorPreparing / onEditorPrepared` | `{ field, row, isNew, options }` / `{ field, row, isNew, editor, element, place }` | yes / — | Occur before and after the editor of a cell or form field is created. Change its props in `options` in the first event. |
45928
+ | `onEditorPreparing / onEditorPrepared` | `{ field, row, isNew, options }` / `{ field, row, isNew, editor, part, place }` | yes / — | Occur before and after the editor of a cell or form field is created. Change its props in `options` in the first event. |
44316
45929
  | `onRowValidating` | `{ key, row, isNew, changed, errors, isValid, errorText }` | yes | Occurs when a row is validated before saving, after its cells. Add messages to `errors`, or set `isValid = false` (or cancel) with `errorText`. |
44317
45930
  | `onInitNewRow` | `{ data, values }` | yes | Occurs before a new row opens. `data` is its initial content, and `values` is what counts as entered. Canceling opens no row. |
44318
45931
  | `onSaving / onSaved` | `{ changes }` / `{ changes, saved, failed }` | yes / — | Occur before changes are sent (leaving a row, the background queue or “Save changes”) and after the response arrives. |
@@ -44643,7 +46256,7 @@ export default function Events() {
44643
46256
  settings={{ editable: true }}
44644
46257
  onCellPrepared={(e) => {
44645
46258
  // The cell is reused for other rows: set and clear.
44646
- if (e.field === 'amount') e.element.style.fontWeight = (e.value as number) > 900 ? 'bold' : '';
46259
+ if (e.field === 'amount') e.part.style({ 'font-weight': (e.value as number) > 900 ? 'bold' : '' });
44647
46260
  }}
44648
46261
  onContextMenuPreparing={(e) => {
44649
46262
  if (e.target === 'row' && e.row) e.items.push({ text: `Log order ${e.row.id}`, click: () => log(`Order ${e.row!.id} from the row menu`) });
@@ -44673,7 +46286,7 @@ export default function Events() {
44673
46286
 
44674
46287
  # DataGrid: API reference
44675
46288
 
44676
- > DataGrid · @motifx-community/ui 0.1.0-beta.7
46289
+ > DataGrid · @motifx-community/ui 0.1.0-beta.8
44677
46290
 
44678
46291
  ## Columns
44679
46292
 
@@ -44687,7 +46300,8 @@ export default function Events() {
44687
46300
  | `value, format, compare` | Customizes how the value is read, how it is displayed (`Intl` options for a number or date column, such as `{ style: 'currency', currency: 'EUR' }`, which an Excel export also converts to a number format, or a function that returns the text), and how it is sorted (in-memory rows). |
44688
46301
  | `cell` | `(ctx) => component`: custom content, created once per pooled cell. Read `ctx.row` and `ctx.value` in getters. |
44689
46302
  | `editor` | `(ctx) => Field \| component`: a custom editor. A `Field` is read through its value, and any other component calls `ctx.setValue`. |
44690
- | `required, validate, options` | An empty value is not accepted, `(value, row, context) => message`, and the choices of a list (an array, or a function `(row, context)`, which can be async). `row` is the row itself, `context.values` holds the entered values, and `context.getValue(field)` returns the entered value, otherwise the row's. |
46303
+ | `filterEditor` | `(ctx: FilterEditorContext) => Field \| component`: a custom editor of the filter row’s value. A `Field` is bound to the filter both ways, and any other component calls `ctx.setValue` and hears `ctx.onChanged`. |
46304
+ | `required, validate, options` | An empty value is not accepted, `(value, row, context) => message`, and the choices of a list (an array, or a function `(row, context)`, which can be async; outside a row, for the cell text, the filter row, the search, the filter builder and pasted text, it is called once with `row` `null` and returns every choice, kept until `refresh()`). `row` is the row itself, `context.values` holds the entered values, and `context.getValue(field)` returns the entered value, otherwise the row's. |
44691
46305
  | `validationRules` | Validation rules (`required`, `numeric`, `range`, `stringLength`, `pattern`, `email`, `compare`, `custom`, `async`), checked after `required` and `validate`. See [Validation rules](datagrid-forms.md#rules). |
44692
46306
  | `formItem` | The column in the edit form: `visible`, `colSpan`, `label`, `helpText`, `editorOptions`, `order`. |
44693
46307
  | `filterOperators, filterOperator` | The conditions the filter row offers for the column, and the initial condition. |
@@ -44949,8 +46563,8 @@ export interface Order {
44949
46563
  | `cancelExport()` | `void` | Stops the export shown by the load panel. Its promise rejects with an `AbortError`. |
44950
46564
  | `getTotalSummaryValue(name)` | `unknown` | A totals value by the item's `name`, its position in `totalItems`, its type, its column or `type_column` (`'sum_amount'`). Reactive. |
44951
46565
  | `getGroupSummaryValue(key, name)` | `unknown` | A group summary value, with the group by its key (as in `expandGroup`) and the item as above. Reactive. |
44952
- | `getVisibleRows()` | `GridVisibleRow[]` | The currently rendered rows: `{ rowIndex, rowType, row, key, groupKey?, element }`. |
44953
- | `getRowElement(i) / getCellElement(i, field)` | `HTMLElement \| undefined` | The element of a rendered row or cell. |
46566
+ | `getVisibleRows()` | `GridVisibleRow[]` | The currently rendered rows: `{ rowIndex, rowType, row, key, groupKey?, part }`. |
46567
+ | `getRowPart(i) / getCellPart(i, field)` | `ComponentBase \| undefined` | The part of a rendered row or cell. |
44954
46568
  | `getKeyByRowIndex(i) / getRowIndexByKey(key)` | `unknown` / `number` | A row's key by its index, and the index of a loaded row by its key (-1 when it is not loaded). |
44955
46569
  | `byKey(key)` | `Promise<T \| undefined>` | The row with this key: loaded, previously found, or requested from the data source. |
44956
46570
  | `cellValue(i, field, value?)` | `unknown` | The value displayed in a cell. With `value`, writes it as the user would (validated, and saved according to the save mode). |