@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
@@ -1,6 +1,6 @@
1
1
  # RadioGroup
2
2
 
3
- > Choice · @motifx-community/ui 0.1.0-beta.7
3
+ > Choice · @motifx-community/ui 0.1.0-beta.8
4
4
 
5
5
  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.
6
6
 
@@ -303,8 +303,8 @@ The group has no strings of its own. The option text is yours, and functions of
303
303
  | --- | --- | --- |
304
304
  | `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
305
305
  | `isValid, validationMessage, validating` | read-only, reactive | The result of the last validation. |
306
- | `listElement` | read-only | The element with `role="radiogroup"`. |
307
- | `inputs` | read-only | The native radios, in item order. |
306
+ | `listPart` | read-only | The part with `role="radiogroup"`. |
307
+ | `inputParts` | read-only | The native radios as components, in item order. |
308
308
 
309
309
  ### Methods
310
310
 
package/docs/rating.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Rating
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.7
3
+ > Editors · @motifx-community/ui 0.1.0-beta.8
4
4
 
5
5
  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.
6
6
 
package/docs/resizable.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Resizable
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.7
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.8
4
4
 
5
5
  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.
6
6
 
@@ -36,7 +36,7 @@ export default function Basic() {
36
36
 
37
37
  ## Staying within an area and keeping the aspect ratio
38
38
 
39
- `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.
39
+ `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.
40
40
 
41
41
  ```tsx
42
42
  import { Resizable } from '@motifx-community/ui';
@@ -122,7 +122,7 @@ export default function Programmatic() {
122
122
  | `handles` | `Bind<ResizeHandles>` | `'all'` | `all`, `edges`, `corners`, or a list of `top`, `bottom`, `start`, `end`, `top-start`, `top-end`, `bottom-start` and `bottom-end`. |
123
123
  | `minWidth, minHeight` | `Bind<number>` | `30` | The minimum width and height, in pixels. |
124
124
  | `maxWidth, maxHeight` | `Bind<number \| null>` | `null` | The maximum width and height, in pixels. `null` means no limit. |
125
- | `area` | `Bind<'parent' \| HTMLElement \| null>` | `null` | The area the box stays inside: its parent, or an element that contains it. |
125
+ | `area` | `Bind<'parent' \| ComponentBase \| null>` | `null` | The area the box stays inside: its parent, or a component that contains it. |
126
126
  | `keepAspectRatio` | `Bind<boolean>` | `false` | Preserves the ratio of width to height. |
127
127
  | `step` | `Bind<number>` | `10` | The number of pixels an arrow key changes an edge. |
128
128
  | `width, height` | `Bind<number \| string \| null>` | `null` | The initial size, as a CSS length or in pixels. Without it, the content determines the size. |
@@ -136,7 +136,7 @@ export default function Programmatic() {
136
136
  | `onResizing` | event | Occurs while the box is being resized (`edge`, and the current `width` and `height`). |
137
137
  | `onResized` | event | Occurs when a resize ends, either when the pointer is released or when a key moves an edge. |
138
138
  | `currentSize` | read-only | The current size in pixels. |
139
- | `gripElement` | read-only | The grip in the end corner, which is the Tab stop for keyboard resizing. |
139
+ | `grip` | read-only | The grip in the end corner, which is the Tab stop for keyboard resizing. |
140
140
 
141
141
  ## Feedback
142
142
 
@@ -0,0 +1,130 @@
1
+ # RibbonMenu: API reference
2
+
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
4
+
5
+ Everything `RibbonMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
6
+
7
+ ## Props
8
+
9
+ | Prop | Type | Default | Description |
10
+ | --- | --- | --- | --- |
11
+ | `items` | `Bind<readonly RibbonTab[]>` | `[]` | The tabs. Nothing is there until they are given. |
12
+ | `value` | `Bind<string \| number \| null>` | the first tab | The key of the tab shown. `x-model` provides two-way binding. |
13
+ | `label` | `Bind<string>` | the language pack | Names the tabs for assistive technology. The same property as `text`. |
14
+ | `layout` | `Bind<'classic' \| 'simple'>` | `'classic'` | The commands in columns under the names of their groups, or in a single row. |
15
+ | `layoutSwitch` | `Bind<boolean>` | `true` | The button at the end of the commands that switches the layout. |
16
+ | `adaptive` | `Bind<boolean>` | `true` | Groups give way step by step when the commands do not fit. Off, they only scroll. |
17
+ | `display` | `Bind<'always' \| 'tabs' \| 'auto'>` | `'always'` | The commands always, only the tabs, or a strip that opens the menu over the page. |
18
+ | `appButton` | `Bind<string>` | none | The text of the button before the tabs. `&` gives it an access key. |
19
+ | `quickCommands` | `Bind<readonly RibbonCommand[]>` | `[]` | The quick commands, pressed from any tab. |
20
+ | `quickBar` | `Bind<'start' \| 'below' \| 'hidden'>` | `'start'` | Where the quick commands stand. |
21
+ | `barStart, barEnd` | `Bind<ComponentBase \| null>` | none | Any content of the app at the start or the end of the row of tabs. |
22
+ | `keyHints` | `Bind<boolean>` | `true` | Alt and F10 show the key hints. |
23
+ | `customizable` | `Bind<boolean>` | `true` | The context menu that lets the user hide, move and add commands. |
24
+ | `customization` | `Bind<RibbonMenuCustomization \| null>` | none | What the user changed, to give back: the menu starts from it. |
25
+ | `text, enabled, visible, tabStop, tabIndex` | see Control | | Props shared by all controls. |
26
+
27
+ ## RibbonTab
28
+
29
+ | Field | Type | Description |
30
+ | --- | --- | --- |
31
+ | `key` | `string \| number` | Finds the tab, and is `value` while it is shown. The default is its position. |
32
+ | `text` | `Bind<string>` | The text. `&` before a letter makes it the access key. |
33
+ | `hint` | `Bind<string>` | A tooltip. |
34
+ | `groups` | `Bind<readonly RibbonGroup[]>` | The groups, made the first time the tab is shown. |
35
+ | `context` | `Bind<string>` | Makes it a tab of a context, drawn in the context color. |
36
+ | `visible, enabled` | `Bind<boolean>` | `false` removes or dims the tab. |
37
+ | `data` | `unknown` | A custom application value. |
38
+
39
+ ## RibbonGroup
40
+
41
+ | Field | Type | Description |
42
+ | --- | --- | --- |
43
+ | `key` | `string \| number` | Finds the group. The default is its position. |
44
+ | `text` | `Bind<string>` | The name under the commands. |
45
+ | `commands` | `Bind<readonly RibbonCommand[]>` | The commands. |
46
+ | `glyph, icon` | `Bind<string>`, `Bind<IconSource>` | Shown on the button the group folds into. |
47
+ | `priority` | `Bind<number>` | Lower gives way first. The default is `0`. |
48
+ | `collapsible` | `Bind<boolean>` | `false` keeps it from folding or moving into the “more” menu. |
49
+ | `fixed` | `Bind<boolean>` | `true` keeps the user from hiding or moving it. |
50
+ | `more, moreHint` | `(e) => void`, `Bind<string>` | The button beside the name, and its tooltip. |
51
+ | `visible` | `Bind<boolean>` | `false` removes the group. |
52
+ | `data` | `unknown` | A custom application value. |
53
+
54
+ ## RibbonCommand
55
+
56
+ | Field | Type | Description |
57
+ | --- | --- | --- |
58
+ | `key` | `string \| number` | Finds the command. The default is its position. |
59
+ | `type` | `Bind<RibbonCommandType>` | `button`, `toggle`, `split`, `menu`, `row`, `content`, `gallery`, `separator`. The default is `'button'`. |
60
+ | `text, hint` | `Bind<string>` | The text (`&` marks the access key) and a tooltip. |
61
+ | `glyph, icon` | `Bind<string>`, `Bind<IconSource>` | A glyph name, or an image address or a component. |
62
+ | `size` | `Bind<'large' \| 'medium' \| 'small'>` | The default is `'medium'` (`'large'` for a gallery). |
63
+ | `pressed` | `Bind<boolean>` | The state of a toggle. |
64
+ | `menu` | `Bind<readonly MenuItem[]>` | The menu of a `menu` or `split` command. |
65
+ | `commands` | `Bind<readonly RibbonCommand[]>` | The commands of a `row`. |
66
+ | `content` | `() => ComponentBase` | The content of a `content` command, made once. |
67
+ | `items, value, columns` | `Bind<…>` | The choices of a `gallery`, the one marked as chosen, and how many stand in a row. |
68
+ | `simple` | `Bind<boolean>` | `false` leaves it out of the simplified row. |
69
+ | `keyHint` | `Bind<string>` | The letters that press it while key hints are shown. |
70
+ | `fixed` | `Bind<boolean>` | `true` keeps the user from hiding or moving it. |
71
+ | `enabled, visible` | `Bind<boolean>` | `false` dims or removes the command. |
72
+ | `click` | `(e: RibbonCommandClickEventArgs) => void` | Occurs when it is pressed; for a gallery, `e.item` is the choice. |
73
+ | `data` | `unknown` | A custom application value. |
74
+
75
+ A gallery’s `RibbonGalleryItem` has `key`, `text`, `glyph`, `icon`, `hint`, `enabled` and `data`.
76
+
77
+ ## Members
78
+
79
+ | Member | Returns | Description |
80
+ | --- | --- | --- |
81
+ | `select(key)` | `boolean` | Shows a tab, as a click does. `false` when `onSelecting` refused. |
82
+ | `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. |
83
+ | `addTab, addGroup, addCommand, remove, move, update` | `boolean` | Changes by path; see [Programmatic changes](ribbonmenu-programmatic.md). `false` when nothing changed. |
84
+ | `beginUpdate(), endUpdate()` | `void` | Holds the changes by path, then applies them at once. |
85
+ | `controlOf(command)` | `ComponentBase \| null` | The control made for a command, once its tab has been shown. |
86
+ | `openOver(open)` | `void` | Opens or closes the commands over the page when only the tabs are shown or the menu hides itself. |
87
+ | `showKeyHints()` | `void` | Shows the key hints, as Alt does. |
88
+ | `refresh()` | `void` | Reads the tabs, groups and commands again after they were changed in place. |
89
+ | `shownKey, isOpenOver, isCompact` | read-only | The tab shown, whether the commands are open over the page, whether the menu is compact. |
90
+ | `customization` | `RibbonMenuCustomization` | What the user changed so far. |
91
+
92
+ ## Events
93
+
94
+ | Event | Arguments | Description |
95
+ | --- | --- | --- |
96
+ | `onSelecting` | `RibbonTabSelectingEventArgs` | Before another tab is shown. Setting `cancel` keeps the tab shown now. |
97
+ | `onSelectionChanged` | `RibbonTabSelectionChangedEventArgs` | After another tab is shown. |
98
+ | `onCommandClick` | `RibbonCommandClickEventArgs` | A command was pressed, after its own `click`. |
99
+ | `onGroupMore` | `RibbonGroupMoreEventArgs` | The button beside a group’s name was pressed. |
100
+ | `onLayoutChanged` | `RibbonMenuLayoutChangedEventArgs` | The user switched the layout. |
101
+ | `onDisplayChanged` | `RibbonMenuDisplayChangedEventArgs` | The user chose another way to show the commands. |
102
+ | `onCustomized` | `RibbonMenuCustomizedEventArgs` | The user hid, moved or added a command, or undid the changes. |
103
+ | `onItemsChanged` | `RibbonMenuItemsChangedEventArgs` | A change by path made a new list of tabs, to keep. |
104
+ | `onAppButton` | `RibbonAppButtonEventArgs` | The button before the tabs was pressed. |
105
+
106
+ ## Styling
107
+
108
+ | Hook | Description |
109
+ | --- | --- |
110
+ | `.mx-ribbon-menu` | The menu. `data-layout`, `data-display`, `data-floating`, `data-compact`. |
111
+ | `__reveal, __frame` | The strip of a menu hidden automatically, and the frame it opens. |
112
+ | `__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`. |
113
+ | `__body, __stage, __panel, __scroll, __switch` | The surface of the commands, where they scroll, a tab’s groups, the scroll buttons and the layout button. |
114
+ | `__group, __group-inner, __commands, __group-foot, __group-label, __more, __fold, __drop, __divider` | A group and its parts. `data-folded`, `data-out`. |
115
+ | `__command, __row, __content, __separator, __gallery, __tile, __overflow` | Commands; `data-ribbon-size` is the size drawn. |
116
+ | `__hints, __hint` | The key hints. |
117
+
118
+ ### Component tokens
119
+
120
+ | Token | Description |
121
+ | --- | --- |
122
+ | `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. |
123
+ | `ribbon-menu.large, medium, small, more, switch, scroll, picker, gallery-open` | Places: the variant, tone and size of the buttons the menu draws. |
124
+ | `ribbon-menu.tab, indicator, context-band, app, quick, reveal, frame, body, stage` | Units of the row of tabs and the surfaces. |
125
+ | `ribbon-menu.panel, group, commands, group-foot, group-label, divider, separator, row, large-face, large-icon` | Units of the groups and commands. |
126
+ | `ribbon-menu.gallery, gallery-grid, tile, tile-icon, drop, hint` | Units of galleries, folded groups and key hints. |
127
+
128
+ ## Feedback
129
+
130
+ Loading issues…
@@ -0,0 +1,118 @@
1
+ # RibbonMenu: Commands
2
+
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
4
+
5
+ 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.
6
+
7
+ ## Every command
8
+
9
+ This menu does not give way (`adaptive: false`), so every command keeps the size it is given; scroll the commands to see them all.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { DropDown, RibbonMenu, Stack, type RibbonTab } from '@motifx-community/ui';
14
+
15
+ const COLORS = [
16
+ { key: 'ink', text: 'Ink', color: '#1f2937' },
17
+ { key: 'sea', text: 'Sea', color: '#0e7490' },
18
+ { key: 'leaf', text: 'Leaf', color: '#15803d' },
19
+ { key: 'sun', text: 'Sun', color: '#b45309' },
20
+ { key: 'rose', text: 'Rose', color: '#be123c' },
21
+ { key: 'dusk', text: 'Dusk', color: '#6d28d9' }
22
+ ];
23
+
24
+ /** 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. */
25
+ export default function CommandTypes() {
26
+ const s = reactive({ told: 'nothing yet', bold: false, wrap: true, color: 'sea', zoom: '100%' });
27
+ const run = (what: string) => () => (s.told = what);
28
+
29
+ const items: RibbonTab[] = [
30
+ {
31
+ key: 'commands',
32
+ text: '&Commands',
33
+ groups: [
34
+ {
35
+ text: 'Sizes',
36
+ commands: [
37
+ { text: 'Large', glyph: 'star', size: 'large', click: run('large') },
38
+ { text: 'Medium', glyph: 'star', click: run('medium') },
39
+ { text: 'Medium too', glyph: 'star', click: run('medium too') },
40
+ { text: 'Small', glyph: 'star', size: 'small', click: run('small') }
41
+ ]
42
+ },
43
+ {
44
+ text: 'Types',
45
+ commands: [
46
+ { text: 'Split', glyph: 'save', size: 'large', type: 'split', click: run('split'), menu: [{ text: 'Save a copy', click: run('save a copy') }] },
47
+ { text: 'Bold', glyph: 'pencil', type: 'toggle', pressed: () => s.bold, click: () => (s.bold = !s.bold) },
48
+ { text: 'Wrap', glyph: 'columns', type: 'toggle', pressed: () => s.wrap, click: () => (s.wrap = !s.wrap) },
49
+ { text: 'Export', glyph: 'download', type: 'menu', menu: [{ text: 'As a PDF', click: run('pdf') }, { text: 'As a picture', click: run('picture') }] },
50
+ { type: 'separator' },
51
+ { type: 'row', commands: [{ text: 'Undo', glyph: 'undo', click: run('undo') }, { text: 'Repeat', glyph: 'repeat', click: run('repeat') }, { text: 'Delete', glyph: 'trash', click: run('delete') }] },
52
+ { type: 'content', content: () => <DropDown label="Zoom" labelMode="hidden" size="sm" style="inline-size: 7rem" items={['50%', '100%', '200%']} x-model={() => s.zoom} /> }
53
+ ]
54
+ },
55
+ {
56
+ text: 'Gallery',
57
+ priority: 1,
58
+ commands: [
59
+ {
60
+ type: 'gallery',
61
+ text: 'Colors',
62
+ columns: 3,
63
+ value: () => s.color,
64
+ 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}`} /> })),
65
+ click: e => {
66
+ s.color = String(e.item?.key);
67
+ s.told = `color: ${e.item?.text}`;
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ ]
73
+ }
74
+ ];
75
+
76
+ return (
77
+ <Stack gap="md" style="inline-size: 100%">
78
+ <RibbonMenu class="rb-types" items={items} layoutSwitch={false} adaptive={false} />
79
+ <output class="rb-types-told">{() => `Last command: ${s.told}`}</output>
80
+ </Stack>
81
+ );
82
+ }
83
+ ```
84
+
85
+ ## Sizes
86
+
87
+ | Size | Description |
88
+ | --- | --- |
89
+ | ``large`` | The icon above the text, as high as the group. A gallery is large by default. |
90
+ | ``medium`` | The icon beside the text. Medium and small commands stand three to a column. The default. |
91
+ | ``small`` | The icon alone. The text names it and appears as its tooltip. |
92
+
93
+ 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.
94
+
95
+ ## Types
96
+
97
+ | Type | Description |
98
+ | --- | --- |
99
+ | ``button`` | Runs `click`. The default. |
100
+ | ``toggle`` | Stays pressed while `pressed` is `true`. As a function, `pressed` is followed, and `click` changes the value it reads. |
101
+ | ``split`` | Runs `click` from its own part, and opens `menu` from the arrow beside it. |
102
+ | ``menu`` | Opens `menu`. |
103
+ | ``row`` | A row of small commands (`commands`), such as the commands that style text. |
104
+ | ``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. |
105
+ | ``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`. |
106
+ | ``separator`` | A line between commands. |
107
+
108
+ ## Groups
109
+
110
+ 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.
111
+
112
+ ## Tabs of a context
113
+
114
+ 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.
115
+
116
+ ## Feedback
117
+
118
+ Loading issues…
@@ -0,0 +1,93 @@
1
+ # RibbonMenu: Customization
2
+
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
4
+
5
+ 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.
6
+
7
+ ## Arranging and saving
8
+
9
+ 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.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { Button, RibbonMenu, Stack, type RibbonMenuCustomization } from '@motifx-community/ui';
14
+ import { documentTabs } from './document-tabs';
15
+
16
+ const KEY = 'docs.ribbon.customization';
17
+
18
+ function load(): RibbonMenuCustomization | null {
19
+ try {
20
+ return JSON.parse(localStorage.getItem(KEY) ?? 'null') as RibbonMenuCustomization | null;
21
+ } catch {
22
+ return null;
23
+ }
24
+ }
25
+
26
+ /** What the user changes with the context menu is saved, and given back when the page opens again. */
27
+ export default function Customize() {
28
+ const s = reactive({ saved: load(), told: 'nothing yet' });
29
+ const run = (what: string) => () => (s.told = what);
30
+
31
+ return (
32
+ <Stack gap="md" style="inline-size: 100%">
33
+ <RibbonMenu
34
+ class="rb-customize"
35
+ items={documentTabs(run)}
36
+ customization={() => s.saved}
37
+ onCustomized={e => {
38
+ localStorage.setItem(KEY, JSON.stringify(e.customization));
39
+ s.saved = e.customization;
40
+ }}
41
+ />
42
+ <Stack orientation="horizontal" gap="md" wrap align="center">
43
+ <Button
44
+ text="Forget the changes"
45
+ variant="outline"
46
+ onclick={() => {
47
+ localStorage.removeItem(KEY);
48
+ s.saved = {};
49
+ }}
50
+ />
51
+ <output class="rb-customize-told">{() => `Last command: ${s.told}`}</output>
52
+ </Stack>
53
+ <pre class="rb-customize-json" style="margin: 0; white-space: pre-wrap">{() => JSON.stringify(s.saved ?? {}, null, 2)}</pre>
54
+ </Stack>
55
+ );
56
+ }
57
+ ```
58
+
59
+ ## The context menu
60
+
61
+ | Where | What the user can do |
62
+ | --- | --- |
63
+ | `On a command` | Add it to the quick commands or remove it, hide it, move it earlier or later in its group. |
64
+ | `On a group` | Hide the group, move it earlier or later in its tab. |
65
+ | `Always` | Show the hidden commands again, choose the layout, how the commands are shown and where the quick commands stand, and undo all changes. |
66
+
67
+ `customizable: false` leaves the browser’s own context menu. A group or a command with `fixed: true` cannot be hidden or moved.
68
+
69
+ ## Saving
70
+
71
+ `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.
72
+
73
+ ```tsx
74
+ {
75
+ "hidden": ["home/editing/filter"],
76
+ "order": { "home/clipboard": ["copy", "cut", "paste"] },
77
+ "quick": ["home/insert/table"],
78
+ "display": "tabs"
79
+ }
80
+ ```
81
+
82
+ | Field | Type | Description |
83
+ | --- | --- | --- |
84
+ | `hidden` | `string[]` | The groups and commands the user hid. |
85
+ | `order` | `Record<string, string[]>` | The order the user gave: a tab’s groups under its key, a group’s commands under its path. |
86
+ | `quick` | `string[]` | The commands the user added to the quick commands. |
87
+ | `layout, display, quickBar` | | The layout, the way the commands are shown and the place of the quick commands, as the user chose them. |
88
+
89
+ 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.
90
+
91
+ ## Feedback
92
+
93
+ Loading issues…
@@ -0,0 +1,96 @@
1
+ # RibbonMenu: Showing and keys
2
+
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
4
+
5
+ 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.
6
+
7
+ ## Showing, quick commands and keys
8
+
9
+ 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.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { ButtonGroup, RibbonMenu, Stack, Switch, type RibbonCommand, type RibbonMenuDisplay, type RibbonQuickBarPosition } from '@motifx-community/ui';
14
+ import { documentTabs } from './document-tabs';
15
+
16
+ /** How the menu is shown, the button before the tabs, the quick commands and the key hints. */
17
+ export default function Display() {
18
+ const s = reactive({ display: 'always' as RibbonMenuDisplay, quick: 'start' as RibbonQuickBarPosition, hints: true, told: 'nothing yet' });
19
+ const run = (what: string) => () => (s.told = what);
20
+ const quick: RibbonCommand[] = [
21
+ { key: 'save', text: 'Save', glyph: 'save', click: run('save') },
22
+ { key: 'undo', text: 'Undo', glyph: 'undo', click: run('undo') }
23
+ ];
24
+
25
+ return (
26
+ <Stack gap="md" style="inline-size: 100%">
27
+ <Stack orientation="horizontal" gap="lg" wrap align="center">
28
+ <ButtonGroup
29
+ label="Show the commands"
30
+ x-model={() => s.display}
31
+ items={[
32
+ { value: 'always', text: 'Always' },
33
+ { value: 'tabs', text: 'Only the tabs' },
34
+ { value: 'auto', text: 'Hide automatically' }
35
+ ]}
36
+ />
37
+ <ButtonGroup
38
+ label="Quick commands"
39
+ x-model={() => s.quick}
40
+ items={[
41
+ { value: 'start', text: 'In the row of tabs' },
42
+ { value: 'below', text: 'Under the commands' },
43
+ { value: 'hidden', text: 'Hidden' }
44
+ ]}
45
+ />
46
+ <Switch label="Key hints" x-model={() => s.hints} />
47
+ </Stack>
48
+ <RibbonMenu
49
+ class="rb-display"
50
+ items={documentTabs(run)}
51
+ display={() => s.display}
52
+ quickBar={() => s.quick}
53
+ keyHints={() => s.hints}
54
+ quickCommands={quick}
55
+ appButton="&File"
56
+ onAppButton={run('the File button')}
57
+ onDisplayChanged={e => (s.display = e.display)}
58
+ />
59
+ <output class="rb-display-told">{() => `Last command: ${s.told}`}</output>
60
+ </Stack>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ## Showing the commands
66
+
67
+ | display | What is shown |
68
+ | --- | --- |
69
+ | ``always`` | The tabs and the commands. The default. |
70
+ | ``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. |
71
+ | ``auto`` | A thin strip. It opens the whole menu over the page, which closes the same way. |
72
+
73
+ 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`.
74
+
75
+ ## The button before the tabs and the ends of the row
76
+
77
+ `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.
78
+
79
+ ## Quick commands
80
+
81
+ `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`).
82
+
83
+ ## Key hints
84
+
85
+ | When | What happens |
86
+ | --- | --- |
87
+ | `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. |
88
+ | `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. |
89
+ | `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. |
90
+ | `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. |
91
+
92
+ 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.
93
+
94
+ ## Feedback
95
+
96
+ Loading issues…
@@ -0,0 +1,59 @@
1
+ # RibbonMenu: Layouts and room
2
+
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
4
+
5
+ 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.
6
+
7
+ ## Less and less room
8
+
9
+ 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.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { ButtonGroup, RibbonMenu, Slider, Stack, Switch, type RibbonMenuLayout } from '@motifx-community/ui';
14
+ import { documentTabs } from './document-tabs';
15
+
16
+ /** The same menu in less and less room: the groups give way, then the commands scroll. */
17
+ export default function Room() {
18
+ const s = reactive({ width: 720, layout: 'classic' as RibbonMenuLayout, adaptive: true, told: 'nothing yet' });
19
+ const run = (what: string) => () => (s.told = what);
20
+
21
+ return (
22
+ <Stack gap="md" style="inline-size: 100%">
23
+ <Stack orientation="horizontal" gap="lg" wrap align="center">
24
+ <Slider label="Width" min={220} max={900} step={10} x-model={() => s.width} style="inline-size: 16rem" />
25
+ <ButtonGroup
26
+ label="Layout"
27
+ x-model={() => s.layout}
28
+ items={[
29
+ { value: 'classic', text: 'Classic' },
30
+ { value: 'simple', text: 'Simplified' }
31
+ ]}
32
+ />
33
+ <Switch label="Give way" x-model={() => s.adaptive} />
34
+ </Stack>
35
+ <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)} />
36
+ <output class="rb-room-told">{() => `${s.width} pixels · last command: ${s.told}`}</output>
37
+ </Stack>
38
+ );
39
+ }
40
+ ```
41
+
42
+ | Step | What changes |
43
+ | --- | --- |
44
+ | `1` | Large commands become medium. |
45
+ | `2` | All commands become small: the icon alone, the text as the tooltip. A gallery becomes its button alone. |
46
+ | `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. |
47
+ | `Then` | What still does not fit scrolls: by the buttons over the ends of the commands, the mouse wheel and a finger. |
48
+
49
+ ## Classic and simplified
50
+
51
+ 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.
52
+
53
+ ## Compact
54
+
55
+ 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.
56
+
57
+ ## Feedback
58
+
59
+ Loading issues…
@@ -0,0 +1,91 @@
1
+ # RibbonMenu: Programmatic changes
2
+
3
+ > RibbonMenu · @motifx-community/ui 0.1.0-beta.8
4
+
5
+ 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.
6
+
7
+ ## Changes by path
8
+
9
+ ```tsx
10
+ import { reactive } from '@motifx/core';
11
+ import { Button, RibbonMenu, Stack } from '@motifx-community/ui';
12
+ import { documentTabs } from './document-tabs';
13
+
14
+ /** Tabs, groups and commands added, removed, moved and changed by path. */
15
+ export default function Programmatic() {
16
+ const s = reactive({ told: 'nothing yet', changes: 0, extra: 0, dateShown: true });
17
+ const run = (what: string) => () => (s.told = what);
18
+ let menu!: RibbonMenu;
19
+
20
+ const addTab = () =>
21
+ menu.addTab({
22
+ key: 'review',
23
+ text: '&Review',
24
+ groups: [{ key: 'proofing', text: 'Proofing', commands: [{ key: 'spelling', text: 'Spelling', glyph: 'check', size: 'large', click: run('spelling') }] }]
25
+ });
26
+ const addCommand = () => {
27
+ s.extra++;
28
+ menu.addCommand('home/clipboard', { key: `extra${s.extra}`, text: `Extra ${s.extra}`, glyph: 'star', click: run(`extra ${s.extra}`) });
29
+ };
30
+ const toggleDate = () => {
31
+ s.dateShown = !s.dateShown;
32
+ menu.update('home/insert/date', { visible: s.dateShown });
33
+ };
34
+ const reset = () => {
35
+ menu.items = documentTabs(run);
36
+ s.extra = 0;
37
+ s.dateShown = true;
38
+ };
39
+
40
+ return (
41
+ <Stack gap="md" style="inline-size: 100%">
42
+ <Stack orientation="horizontal" gap="sm" wrap>
43
+ <Button text="Add a tab" variant="outline" onclick={addTab} />
44
+ <Button text="Add a command" variant="outline" onclick={addCommand} />
45
+ <Button text="Rename Cut" variant="outline" onclick={() => menu.update('home/clipboard/cut', { text: 'Cut out' })} />
46
+ <Button text="Hide or show Date" variant="outline" onclick={toggleDate} />
47
+ <Button text="Move Editing first" variant="outline" onclick={() => menu.move('home/editing', 0)} />
48
+ <Button text="Remove Insert" variant="outline" onclick={() => menu.remove('home/insert')} />
49
+ <Button text="Start again" variant="outline" onclick={reset} />
50
+ </Stack>
51
+ <RibbonMenu class="rb-programmatic" ref={(m: RibbonMenu) => (menu = m)} items={documentTabs(run)} onItemsChanged={() => s.changes++} />
52
+ <output class="rb-programmatic-told">{() => `${s.changes} changes · last command: ${s.told}`}</output>
53
+ </Stack>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ## Methods
59
+
60
+ | Method | Description |
61
+ | --- | --- |
62
+ | `addTab(tab, index?)` | Adds a tab at `index`, the end by default. |
63
+ | `addGroup(tabPath, group, index?)` | Adds a group to a tab. |
64
+ | `addCommand(parentPath, command, index?)` | Adds a command to a group (`tab/group`) or to a row (`tab/group/row`). |
65
+ | `remove(path)` | Removes a tab, a group or a command. |
66
+ | `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. |
67
+ | `update(path, changes)` | Changes some of its fields, such as `text`, `visible`, `enabled` or `glyph`; the others stay as they are. |
68
+ | `findTab(key), findGroup(path), findCommand(path)` | The tab, group or command as it is now. |
69
+ | `beginUpdate(), endUpdate()` | Holds the changes until `endUpdate()`, which applies them at once. |
70
+
71
+ Each method returns `false` when nothing changed, such as for a path that does not exist.
72
+
73
+ ```tsx
74
+ menu.beginUpdate();
75
+ menu.addGroup('home', { key: 'styles', text: 'Styles', commands: [] }, 1);
76
+ menu.addCommand('home/styles', { key: 'normal', text: 'Normal', glyph: 'star' });
77
+ menu.update('home/clipboard/paste', { enabled: false });
78
+ menu.endUpdate();
79
+ ```
80
+
81
+ ## Paths
82
+
83
+ 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.
84
+
85
+ ## Your data
86
+
87
+ 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.
88
+
89
+ ## Feedback
90
+
91
+ Loading issues…