@motifx-community/ui 0.1.0-beta.13 → 0.1.0-beta.14
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.
- package/CHANGELOG.md +379 -0
- package/README.md +2 -0
- package/dist/components/chart/Chart.d.ts +6 -4
- package/dist/components/chart/ChartPlot.d.ts +2 -1
- package/dist/components/chart/plot-view.d.ts +10 -2
- package/dist/components/chat/Chat.d.ts +276 -0
- package/dist/components/chat/ChatComposer.d.ts +172 -0
- package/dist/components/chat/ChatReply.d.ts +53 -0
- package/dist/components/chat/ChatWriter.d.ts +119 -0
- package/dist/components/chat/chat-ask-form.d.ts +64 -0
- package/dist/components/chat/chat-asked-entry.d.ts +21 -0
- package/dist/components/chat/chat-attachment-entry.d.ts +18 -0
- package/dist/components/chat/chat-choices-view.d.ts +40 -0
- package/dist/components/chat/chat-command.d.ts +7 -0
- package/dist/components/chat/chat-compaction-entry.d.ts +19 -0
- package/dist/components/chat/chat-composer-props.d.ts +63 -0
- package/dist/components/chat/chat-context-changed-event-args.d.ts +8 -0
- package/dist/components/chat/chat-context-item.d.ts +14 -0
- package/dist/components/chat/chat-copy-button.d.ts +11 -0
- package/dist/components/chat/chat-entry.d.ts +20 -0
- package/dist/components/chat/chat-flow-view.d.ts +32 -0
- package/dist/components/chat/chat-form-entry.d.ts +24 -0
- package/dist/components/chat/chat-form-view.d.ts +48 -0
- package/dist/components/chat/chat-history-event-args.d.ts +31 -0
- package/dist/components/chat/chat-load-older-event-args.d.ts +17 -0
- package/dist/components/chat/chat-look.d.ts +33 -0
- package/dist/components/chat/chat-mention.d.ts +21 -0
- package/dist/components/chat/chat-message-status.d.ts +2 -0
- package/dist/components/chat/chat-message.d.ts +23 -0
- package/dist/components/chat/chat-notice-entry.d.ts +20 -0
- package/dist/components/chat/chat-option.d.ts +7 -0
- package/dist/components/chat/chat-part.d.ts +110 -0
- package/dist/components/chat/chat-plan-entry.d.ts +25 -0
- package/dist/components/chat/chat-props.d.ts +70 -0
- package/dist/components/chat/chat-question-view.d.ts +41 -0
- package/dist/components/chat/chat-request.d.ts +173 -0
- package/dist/components/chat/chat-role.d.ts +2 -0
- package/dist/components/chat/chat-search-bar.d.ts +27 -0
- package/dist/components/chat/chat-search.d.ts +33 -0
- package/dist/components/chat/chat-send-event-args.d.ts +12 -0
- package/dist/components/chat/chat-sources-entry.d.ts +22 -0
- package/dist/components/chat/chat-text-entry.d.ts +20 -0
- package/dist/components/chat/chat-text-part.d.ts +5 -0
- package/dist/components/chat/chat-thinking-entry.d.ts +32 -0
- package/dist/components/chat/chat-todo-entry.d.ts +15 -0
- package/dist/components/chat/chat-tool-entry.d.ts +66 -0
- package/dist/components/chat/chat-tool-init.d.ts +18 -0
- package/dist/components/chat/chat-turn-view.d.ts +53 -0
- package/dist/components/chat/chat-turn.d.ts +8 -0
- package/dist/components/chat/chat-value-changed-event-args.d.ts +6 -0
- package/dist/components/chat/index.d.ts +22 -0
- package/dist/components/contextmenu/ContextMenu.d.ts +4 -0
- package/dist/components/contextmenu/context-menu-props.d.ts +6 -0
- package/dist/components/datagrid/DataGrid.d.ts +0 -12
- package/dist/components/datagrid/column-type.d.ts +2 -1
- package/dist/components/datagrid/grid-column.d.ts +4 -1
- package/dist/components/datagrid/grid-date-interval.d.ts +2 -1
- package/dist/components/datagrid/grid-filter-value.d.ts +2 -7
- package/dist/components/datagrid/grid-header-filter-interval.d.ts +2 -2
- package/dist/components/datagrid/grid-settings.d.ts +6 -3
- package/dist/components/datagrid/grid-sheet-cell.d.ts +3 -6
- package/dist/components/datagrid/grid-sheet-column.d.ts +2 -9
- package/dist/components/datagrid/grid-sheet-merge.d.ts +2 -7
- package/dist/components/datagrid/grid-sheet-row.d.ts +2 -5
- package/dist/components/datagrid/grid-sheet.d.ts +3 -2
- package/dist/components/datagrid/grid-summary-item.d.ts +5 -2
- package/dist/components/datagrid/grid-summary-texts.d.ts +2 -0
- package/dist/components/datagrid/grid-summary-type.d.ts +5 -2
- package/dist/components/datagrid/grid-summary.d.ts +3 -2
- package/dist/components/datagrid/list-option.d.ts +2 -4
- package/dist/components/datagrid/model/ColumnModel.d.ts +21 -3
- package/dist/components/datagrid/model/FilterValues.d.ts +15 -7
- package/dist/components/datagrid/model/GridExport.d.ts +1 -1
- package/dist/components/datagrid/model/GridModel.d.ts +2 -2
- package/dist/components/datagrid/model/LookupTexts.d.ts +1 -1
- package/dist/components/datagrid/view/CellEditor.d.ts +1 -1
- package/dist/components/datagrid/view/ColumnStyles.d.ts +1 -1
- package/dist/components/datagrid/view/GridBody.d.ts +1 -1
- package/dist/components/datagrid/view/HeaderRow.d.ts +3 -1
- package/dist/components/draggable/Draggable.d.ts +14 -3
- package/dist/components/form/MxForm.d.ts +1 -1
- package/dist/components/markdown/Markdown.d.ts +87 -0
- package/dist/components/markdown/code-block.d.ts +57 -0
- package/dist/components/markdown/code-colorer.d.ts +11 -0
- package/dist/components/markdown/code-highlighter.d.ts +9 -0
- package/dist/components/markdown/code-run.d.ts +6 -0
- package/dist/components/markdown/diagram-renderer.d.ts +21 -0
- package/dist/components/markdown/entities.d.ts +2 -0
- package/dist/components/markdown/index.d.ts +8 -0
- package/dist/components/markdown/inline-writer.d.ts +85 -0
- package/dist/components/markdown/markdown-context.d.ts +53 -0
- package/dist/components/markdown/markdown-link-click-event-args.d.ts +9 -0
- package/dist/components/markdown/markdown-props.d.ts +40 -0
- package/dist/components/markdown/markdown-writer.d.ts +95 -0
- package/dist/components/markdown/math-block.d.ts +22 -0
- package/dist/components/markdown/math-renderer.d.ts +18 -0
- package/dist/components/markdown/safe-href.d.ts +5 -0
- package/dist/components/markdown/text-run.d.ts +7 -0
- package/dist/components/menubar/MenuBar.d.ts +4 -0
- package/dist/components/menubar/menu-bar-props.d.ts +6 -0
- package/dist/components/pivotgrid/PivotGrid.d.ts +415 -0
- package/dist/components/pivotgrid/index.d.ts +44 -0
- package/dist/components/pivotgrid/model/PivotArrangement.d.ts +29 -0
- package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +169 -0
- package/dist/components/pivotgrid/model/PivotCellRanges.d.ts +63 -0
- package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +47 -0
- package/dist/components/pivotgrid/model/PivotChart.d.ts +49 -0
- package/dist/components/pivotgrid/model/PivotDisplay.d.ts +61 -0
- package/dist/components/pivotgrid/model/PivotDrill.d.ts +19 -0
- package/dist/components/pivotgrid/model/PivotExpansion.d.ts +44 -0
- package/dist/components/pivotgrid/model/PivotFields.d.ts +55 -0
- package/dist/components/pivotgrid/model/PivotFilterValues.d.ts +36 -0
- package/dist/components/pivotgrid/model/PivotLayout.d.ts +75 -0
- package/dist/components/pivotgrid/model/PivotLoader.d.ts +29 -0
- package/dist/components/pivotgrid/model/PivotSheet.d.ts +44 -0
- package/dist/components/pivotgrid/model/PivotStateStore.d.ts +19 -0
- package/dist/components/pivotgrid/model/PivotTable.d.ts +78 -0
- package/dist/components/pivotgrid/model/PivotTexts.d.ts +47 -0
- package/dist/components/pivotgrid/model/PivotWindows.d.ts +120 -0
- package/dist/components/pivotgrid/model/pivot-copy.d.ts +26 -0
- package/dist/components/pivotgrid/model/pivot-csv.d.ts +9 -0
- package/dist/components/pivotgrid/model/pivot-header-cell.d.ts +19 -0
- package/dist/components/pivotgrid/model/pivot-line-key.d.ts +17 -0
- package/dist/components/pivotgrid/model/pivot-line.d.ts +14 -0
- package/dist/components/pivotgrid/pivot-grid-area.d.ts +2 -0
- package/dist/components/pivotgrid/pivot-grid-cell-click-event-args.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-cell-context.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-cell-dbl-click-event-args.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-cell-range.d.ts +16 -0
- package/dist/components/pivotgrid/pivot-grid-cell-selection-changed-event-args.d.ts +6 -0
- package/dist/components/pivotgrid/pivot-grid-chart-data.d.ts +15 -0
- package/dist/components/pivotgrid/pivot-grid-chart-options.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-column-resized-event-args.d.ts +8 -0
- package/dist/components/pivotgrid/pivot-grid-column-resizing.d.ts +15 -0
- package/dist/components/pivotgrid/pivot-grid-column.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-content-ready-event-args.d.ts +6 -0
- package/dist/components/pivotgrid/pivot-grid-context-menu-preparing-event-args.d.ts +22 -0
- package/dist/components/pivotgrid/pivot-grid-copying-event-args.d.ts +10 -0
- package/dist/components/pivotgrid/pivot-grid-custom-summary-info.d.ts +15 -0
- package/dist/components/pivotgrid/pivot-grid-data-error-event-args.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-drill-down.d.ts +14 -0
- package/dist/components/pivotgrid/pivot-grid-expanded-event-args.d.ts +6 -0
- package/dist/components/pivotgrid/pivot-grid-expanding-event-args.d.ts +9 -0
- package/dist/components/pivotgrid/pivot-grid-export-cell.d.ts +21 -0
- package/dist/components/pivotgrid/pivot-grid-export-options.d.ts +16 -0
- package/dist/components/pivotgrid/pivot-grid-export.d.ts +17 -0
- package/dist/components/pivotgrid/pivot-grid-exported-event-args.d.ts +9 -0
- package/dist/components/pivotgrid/pivot-grid-exporting-event-args.d.ts +17 -0
- package/dist/components/pivotgrid/pivot-grid-field-chooser.d.ts +20 -0
- package/dist/components/pivotgrid/pivot-grid-field-panel.d.ts +16 -0
- package/dist/components/pivotgrid/pivot-grid-field.d.ts +110 -0
- package/dist/components/pivotgrid/pivot-grid-fields-changed-event-args.d.ts +8 -0
- package/dist/components/pivotgrid/pivot-grid-filter-value.d.ts +4 -0
- package/dist/components/pivotgrid/pivot-grid-group-interval.d.ts +7 -0
- package/dist/components/pivotgrid/pivot-grid-header-filter-items-request.d.ts +9 -0
- package/dist/components/pivotgrid/pivot-grid-header-filter-items.d.ts +7 -0
- package/dist/components/pivotgrid/pivot-grid-load-panel.d.ts +11 -0
- package/dist/components/pivotgrid/pivot-grid-props.d.ts +121 -0
- package/dist/components/pivotgrid/pivot-grid-sheet-options.d.ts +14 -0
- package/dist/components/pivotgrid/pivot-grid-sheet.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-state.d.ts +54 -0
- package/dist/components/pivotgrid/pivot-grid-summary-cell.d.ts +29 -0
- package/dist/components/pivotgrid/pivot-grid-summary-display-mode.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-summary-type.d.ts +5 -0
- package/dist/components/pivotgrid/view/PivotFieldChooser.d.ts +71 -0
- package/dist/components/pivotgrid/view/PivotFieldPanel.d.ts +92 -0
- package/dist/components/pivotgrid/view/PivotView.d.ts +263 -0
- package/dist/components/resizable/Resizable.d.ts +2 -0
- package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +4 -0
- package/dist/components/ribbonmenu/RibbonMenu.d.ts +4 -1
- package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +8 -4
- package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +6 -0
- package/dist/components/scheduler/view/TimeView.d.ts +2 -0
- package/dist/components/scrollview/ScrollView.d.ts +48 -1
- package/dist/components/scrollview/index.d.ts +1 -0
- package/dist/components/scrollview/scroll-end-changed-event-args.d.ts +7 -0
- package/dist/components/scrollview/scroll-view-props.d.ts +9 -0
- package/dist/components/splitter/Splitter.d.ts +1 -3
- package/dist/components/tabdocs/TabDocumentManager.d.ts +3 -2
- package/dist/components/textarea/TextArea.d.ts +11 -0
- package/dist/components/textarea/text-area-props.d.ts +12 -1
- package/dist/components/textbox/TextBox.d.ts +3 -0
- package/dist/components/textbox/text-box-props.d.ts +3 -0
- package/dist/components/toolbar/Toolbar.d.ts +70 -1
- package/dist/components/toolbar/index.d.ts +5 -0
- package/dist/components/toolbar/toolbar-added-item.d.ts +9 -0
- package/dist/components/toolbar/toolbar-custom-menu-opening-event-args.d.ts +23 -0
- package/dist/components/toolbar/toolbar-customization.d.ts +18 -0
- package/dist/components/toolbar/toolbar-customized-event-args.d.ts +7 -0
- package/dist/components/toolbar/toolbar-item-display.d.ts +2 -0
- package/dist/components/toolbar/toolbar-item.d.ts +11 -1
- package/dist/components/toolbar/toolbar-props.d.ts +26 -0
- package/dist/components/toolbar/toolbar-targets.d.ts +22 -0
- package/dist/core/clipboard.d.ts +11 -0
- package/dist/core/enter-key-hint.d.ts +2 -0
- package/dist/core/look-watch.d.ts +2 -2
- package/dist/core/measure/look.d.ts +1 -1
- package/dist/core/measure/on-layout.d.ts +1 -1
- package/dist/core/measure/scroll.d.ts +3 -1
- package/dist/core/save-text.d.ts +2 -0
- package/dist/core/ui-strings.d.ts +190 -0
- package/dist/excel/excel-pivot-customize-cell-args.d.ts +8 -0
- package/dist/excel/excel-pivot-export-options.d.ts +44 -0
- package/dist/excel/excel-pivot-export-result.d.ts +6 -0
- package/dist/excel/export-pivot-grid.d.ts +35 -0
- package/dist/excel/index.d.ts +4 -0
- package/dist/excel/index.js +190 -56
- package/dist/excel/index.js.map +1 -1
- package/dist/excel/write-sheet.d.ts +16 -0
- package/dist/{formula-guard-NYlpoA-t.js → formula-guard-Bx48S0u3.js} +2 -2
- package/dist/formula-guard-Bx48S0u3.js.map +1 -0
- package/dist/generated/tokens.d.ts +7527 -4097
- package/dist/index.d.ts +6 -0
- package/dist/index.js +65982 -49896
- package/dist/index.js.map +1 -1
- package/dist/locales/en.json +179 -1
- package/dist/locales/tr.json +179 -1
- package/dist/parts/customizer/Customizer.d.ts +12 -6
- package/dist/parts/customizer/customizer-display.d.ts +2 -0
- package/dist/parts/customizer/customizer-node.d.ts +5 -0
- package/dist/parts/customizer/customizer-source.d.ts +15 -3
- package/dist/parts/item-layout/layout-added-item.d.ts +2 -2
- package/dist/parts/menu/MenuList.d.ts +5 -0
- package/dist/parts/popup/Popup.d.ts +2 -0
- package/dist/{components/datagrid/model → parts/table}/CellFormatter.d.ts +8 -8
- package/dist/{components/datagrid/view → parts/table}/HeaderFilter.d.ts +16 -11
- package/dist/parts/table/OffsetList.d.ts +21 -0
- package/dist/parts/table/ScaledOffsets.d.ts +32 -0
- package/dist/{components/datagrid/model → parts/table}/ValueIntervals.d.ts +12 -5
- package/dist/{components/datagrid/model → parts/table}/ValueListAdapter.d.ts +4 -4
- package/dist/parts/table/date-interval.d.ts +2 -0
- package/dist/parts/table/date-type.d.ts +3 -0
- package/dist/{components/datagrid/model → parts/table}/filter-tree-node.d.ts +3 -1
- package/dist/parts/table/filter-value.d.ts +9 -0
- package/dist/parts/table/format-column.d.ts +14 -0
- package/dist/parts/table/header-filter-host.d.ts +27 -0
- package/dist/parts/table/option-of.d.ts +6 -0
- package/dist/parts/table/slice-sheet.d.ts +8 -0
- package/dist/parts/table/table-sheet-cell.d.ts +13 -0
- package/dist/parts/table/table-sheet-column.d.ts +11 -0
- package/dist/parts/table/table-sheet-merge.d.ts +9 -0
- package/dist/parts/table/table-sheet-row.d.ts +8 -0
- package/dist/parts/table/table-sheet.d.ts +24 -0
- package/dist/parts/table/value-interval.d.ts +6 -0
- package/dist/{components/datagrid/model → parts/table}/value-list.d.ts +7 -2
- package/dist/parts/table/value-loader.d.ts +8 -0
- package/dist/parts/table/value-option.d.ts +5 -0
- package/dist/parts/table/value-type.d.ts +5 -0
- package/dist/parts/table/values-result.d.ts +6 -0
- package/dist/parts/window/follow-pointer.d.ts +9 -3
- package/dist/parts/window-list/WindowList.d.ts +105 -0
- package/dist/parts/window-list/window-list-source.d.ts +10 -0
- package/dist/pdf/export-pivot-grid.d.ts +21 -0
- package/dist/pdf/index.d.ts +3 -0
- package/dist/pdf/index.js +143 -16
- package/dist/pdf/index.js.map +1 -1
- package/dist/pdf/pdf-customize-cell-args.d.ts +1 -1
- package/dist/pdf/pdf-pivot-cell-args.d.ts +25 -0
- package/dist/pdf/pdf-pivot-export-options.d.ts +61 -0
- package/dist/pdf/pdf-table.d.ts +38 -6
- package/dist/slice-sheet-C116M42H.js +43 -0
- package/dist/slice-sheet-C116M42H.js.map +1 -0
- package/dist/styles.css +4484 -177
- package/dist/tokens/index.d.ts +7527 -4097
- package/dist/tokens/index.js +7527 -4097
- package/dist/tokens/index.js.map +1 -1
- package/dist/{tr-BvKE8jSF.js → tr-BGbF9uCs.js} +359 -3
- package/dist/tr-BGbF9uCs.js.map +1 -0
- package/docs/accordion.md +1 -1
- package/docs/actionsheet.md +1 -1
- package/docs/appbar.md +1 -1
- package/docs/appmenu-api.md +1 -1
- package/docs/appmenu-programmatic.md +1 -1
- package/docs/appmenu-search.md +1 -1
- package/docs/appmenu.md +1 -1
- package/docs/avatar.md +1 -1
- package/docs/badge.md +1 -1
- package/docs/bar-gauge-angles.md +1 -1
- package/docs/bar-gauge-data.md +1 -1
- package/docs/bar-gauge-labels.md +1 -1
- package/docs/bar-gauge.md +1 -1
- package/docs/barcode.md +1 -1
- package/docs/bottomnavigation.md +1 -1
- package/docs/bottomsheet.md +1 -1
- package/docs/breadcrumb.md +1 -1
- package/docs/button.md +1 -1
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/card.md +1 -1
- package/docs/chart-bars.md +1 -1
- package/docs/chart-candles.md +1 -1
- package/docs/chart-funnel.md +1 -1
- package/docs/chart-heatmap.md +1 -1
- package/docs/chart-lines.md +1 -1
- package/docs/chart-live.md +1 -1
- package/docs/chart-pie.md +1 -1
- package/docs/chart-radar.md +1 -1
- package/docs/chart-ranges.md +1 -1
- package/docs/chart-references.md +1 -1
- package/docs/chart-scatter.md +1 -1
- package/docs/chart-waterfall.md +1 -1
- package/docs/chart-zoom.md +1 -1
- package/docs/chart.md +1 -1
- package/docs/chat.md +1512 -0
- package/docs/checkbox.md +1 -1
- package/docs/chip.md +2 -2
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +1 -1
- package/docs/commands.md +1 -1
- package/docs/control.md +1 -1
- package/docs/data.md +1 -1
- package/docs/datagrid-api.md +3 -3
- package/docs/datagrid-bands.md +1 -1
- package/docs/datagrid-drag-select.md +1 -1
- package/docs/datagrid-drag.md +1 -1
- package/docs/datagrid-editing.md +1 -1
- package/docs/datagrid-filtering.md +2 -2
- package/docs/datagrid-forms.md +1 -1
- package/docs/datagrid-grouping.md +7 -7
- package/docs/datagrid-layout.md +2 -2
- package/docs/datagrid-lookups.md +1 -1
- package/docs/datagrid-master-detail.md +1 -1
- package/docs/datagrid-scrolling.md +1 -1
- package/docs/datagrid-selection.md +1 -1
- package/docs/datagrid.md +1 -1
- package/docs/datebox.md +1 -1
- package/docs/daterangebox.md +1 -1
- package/docs/display.md +1 -1
- package/docs/draggable.md +2 -2
- package/docs/drawer.md +1 -1
- package/docs/dropdown.md +1 -1
- package/docs/editors.md +1 -1
- package/docs/feedback.md +1 -1
- package/docs/fileuploader.md +1 -1
- package/docs/filterbuilder.md +1 -1
- package/docs/formlayout.md +1 -1
- package/docs/foundations.md +1 -1
- package/docs/gallery.md +1 -1
- package/docs/gauge-base.md +1 -1
- package/docs/gauge-circular.md +1 -1
- package/docs/gauge-dashboards.md +1 -1
- package/docs/gauge-linear.md +1 -1
- package/docs/gauge-markers.md +1 -1
- package/docs/gauge-marks.md +1 -1
- package/docs/gauge-ranges.md +1 -1
- package/docs/gauge-scales.md +1 -1
- package/docs/gauge.md +1 -1
- package/docs/home.md +1 -1
- package/docs/keyboard.md +1 -1
- package/docs/language.md +1 -1
- package/docs/layout.md +1 -1
- package/docs/listbox.md +1 -1
- package/docs/loadpanel.md +1 -1
- package/docs/lookup.md +1 -1
- package/docs/markdown.md +343 -0
- package/docs/menus-api.md +3 -1
- package/docs/menus-context.md +2 -1
- package/docs/menus-customization.md +5 -1
- package/docs/menus-merging.md +1 -1
- package/docs/menus-programmatic.md +1 -1
- package/docs/menus.md +1 -1
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +1 -1
- package/docs/numberbox.md +1 -1
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/pivotgrid-api.md +180 -0
- package/docs/pivotgrid-chart.md +132 -0
- package/docs/pivotgrid-drilldown.md +142 -0
- package/docs/pivotgrid-export.md +207 -0
- package/docs/pivotgrid-fields.md +245 -0
- package/docs/pivotgrid-keyboard.md +223 -0
- package/docs/pivotgrid-layout.md +663 -0
- package/docs/pivotgrid-panel.md +223 -0
- package/docs/pivotgrid-remote.md +397 -0
- package/docs/pivotgrid-sorting.md +379 -0
- package/docs/pivotgrid-state.md +245 -0
- package/docs/pivotgrid-summaries.md +330 -0
- package/docs/pivotgrid.md +295 -0
- package/docs/popover.md +1 -1
- package/docs/progress.md +1 -1
- package/docs/qrcode.md +1 -1
- package/docs/radiogroup.md +1 -1
- package/docs/rating.md +1 -1
- package/docs/resizable.md +1 -1
- package/docs/ribbonmenu-api.md +2 -1
- package/docs/ribbonmenu-commands.md +1 -1
- package/docs/ribbonmenu-customization.md +3 -2
- package/docs/ribbonmenu-display.md +1 -1
- package/docs/ribbonmenu-layouts.md +1 -1
- package/docs/ribbonmenu-programmatic.md +1 -1
- package/docs/ribbonmenu.md +3 -1
- package/docs/scheduler-agenda.md +1 -1
- package/docs/scheduler-big-data.md +1 -1
- package/docs/scheduler-editing.md +1 -1
- package/docs/scheduler-form.md +1 -1
- package/docs/scheduler-icalendar.md +1 -1
- package/docs/scheduler-mobile.md +1 -1
- package/docs/scheduler-recurrence.md +1 -1
- package/docs/scheduler-resources.md +1 -1
- package/docs/scheduler-timeline.md +1 -1
- package/docs/scheduler.md +1 -1
- package/docs/scrollview.md +1 -1
- package/docs/shortcuteditor.md +1 -1
- package/docs/showcase-home.md +1 -1
- package/docs/showcase-mail.md +39 -0
- package/docs/showcase.md +1 -1
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +1 -1
- package/docs/sortable.md +3 -6
- package/docs/sparkline.md +1 -1
- package/docs/speeddial.md +1 -1
- package/docs/splitter.md +1 -1
- package/docs/stepper.md +1 -1
- package/docs/switch.md +1 -1
- package/docs/tabdocs-dock.md +1 -1
- package/docs/tabdocs-drag.md +1 -1
- package/docs/tabdocs-menus.md +1 -1
- package/docs/tabdocs-mobile.md +1 -1
- package/docs/tabdocs-tabs.md +1 -1
- package/docs/tabdocs-windows.md +1 -1
- package/docs/tabdocs-workspace.md +1 -1
- package/docs/tabdocs.md +1 -1
- package/docs/tabs.md +1 -1
- package/docs/tagbox.md +1 -1
- package/docs/textarea.md +4 -1
- package/docs/textbox.md +2 -1
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +687 -1
- package/docs/toolbar-api.md +80 -0
- package/docs/toolbar-customization.md +261 -0
- package/docs/toolbar.md +4 -52
- package/docs/tooltip.md +1 -1
- package/docs/treeview.md +1 -1
- package/docs/validationsummary.md +1 -1
- package/docs/window.md +1 -1
- package/docs/wizard.md +1 -1
- package/llms-full.txt +18989 -12344
- package/llms.txt +29 -2
- package/package.json +2 -2
- package/dist/components/datagrid/model/date-type.d.ts +0 -3
- package/dist/components/datagrid/model/option-of.d.ts +0 -6
- package/dist/components/datagrid/model/value-loader.d.ts +0 -8
- package/dist/formula-guard-NYlpoA-t.js.map +0 -1
- package/dist/tr-BvKE8jSF.js.map +0 -1
- /package/dist/{components/datagrid/model → core}/text-ranges.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/ExtraHeights.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/ScrollGeometry.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/cell-list.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/date-like.d.ts +0 -0
- /package/dist/{components/datagrid/view → parts/table}/editor-value.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/formula-guard.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/parse-date-text.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/same-value.d.ts +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Toolbar: API reference
|
|
2
|
+
|
|
3
|
+
> Toolbar · @motifx-community/ui 0.1.0-beta.14
|
|
4
|
+
|
|
5
|
+
Every prop, property, method and event of `Toolbar`, and the fields of its items.
|
|
6
|
+
|
|
7
|
+
## Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| `items` | `Bind<readonly ToolbarItem[]>` | `[]` | Items defined as data, drawn before the JSX children. |
|
|
12
|
+
| `label` | `Bind<string>` | `''` | The accessible name of the toolbar (`aria-label`), and its name in the menus that send commands to it. This is the same property as `text`. |
|
|
13
|
+
| `orientation` | `Bind<'horizontal' \| 'vertical'>` | `'horizontal'` | The direction of the toolbar. The arrow keys follow it. |
|
|
14
|
+
| `size` | `Bind<ControlSize>` | `'md'` | Applied to child controls that do not set their own `size`. |
|
|
15
|
+
| `buttonVariant` | `Bind<ButtonVariant>` | `'ghost'` | Applied to child buttons that do not set their own `variant`. |
|
|
16
|
+
| `overflow` | `Bind<'menu' \| 'wrap' \| 'scroll'>` | `'menu'` | `menu` moves items that do not fit into an overflow menu, `wrap` adds a second row, and `scroll` makes the bar scroll. |
|
|
17
|
+
| `customizable` | `Bind<boolean>` | `false` | The user can hide, move and rename the items of `items`, add commands and separators and choose what a button shows, from the menu of a right-click or Shift+F10 and in the customizer. Each item can say otherwise. |
|
|
18
|
+
| `customization` | `Bind<ToolbarCustomization \| null>` | `null` | What the user changed, as `onCustomized` reported it, to restore. |
|
|
19
|
+
| `commands` | `Bind<readonly ToolbarItem[]>` | The app’s commands | The commands the user can add, each with a `key`. |
|
|
20
|
+
| `customizer` | `Bind<boolean>` | `true` | The menu of a right-click offers the customizer when `customizable` is on. |
|
|
21
|
+
| `customizerKeyboard` | `Bind<boolean>` | `true` | The customizer has a Keyboard page ([ShortcutEditor](shortcuteditor.md)). |
|
|
22
|
+
| `acceptCommands` | `Bind<boolean>` | `true` | A customizable toolbar takes commands sent from the menus of the page. |
|
|
23
|
+
| `enabled / disabled, visible, tabStop, tabIndex` | see Control | | `enabled={false}` disables every control inside. |
|
|
24
|
+
|
|
25
|
+
## ToolbarItem
|
|
26
|
+
|
|
27
|
+
| Field | Type | Description |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `key` | `string \| number` | Names the item in `customization`. The default is its position. |
|
|
30
|
+
| `type` | `Bind<'button' \| 'toggle' \| 'separator' \| 'menu'>` | The default is `'button'`. |
|
|
31
|
+
| `command` | `string` | The command of the app the item runs (see [Commands and shortcuts](commands.md)): what the item is not given comes from it. |
|
|
32
|
+
| `text, icon, hint` | `Bind<…>` | The caption (`&Bold` assigns an access key), an icon and a tooltip. An icon-only button is named by its `hint`. |
|
|
33
|
+
| `display` | `Bind<'icon' \| 'text' \| 'both'>` | What the button shows. The default is `'both'`; the user's choice wins. |
|
|
34
|
+
| `pressed` | `Bind<boolean>` | The state of a toggle. As a function, the item tracks application state, and `click` changes the value it reads. |
|
|
35
|
+
| `enabled, visible` | `Bind<boolean>` | Dims the item or removes it. |
|
|
36
|
+
| `menu` | `Bind<readonly MenuItem[]>` | The commands of a `menu` item, including submenus, check and radio items, and shortcuts. |
|
|
37
|
+
| `overflow` | `Bind<'auto' \| 'always' \| 'never'>` | Controls whether the item can move into the overflow menu, and takes precedence over the toolbar. A JSX child sets it with `data-overflow`. |
|
|
38
|
+
| `customizable` | `Bind<boolean>` | `false` keeps the item where it is and shown in a customizable toolbar. |
|
|
39
|
+
| `click` | `(e) => void` | Occurs when the item is pressed, in the bar or in the overflow menu. `e`: `{ item, source, event }`. |
|
|
40
|
+
| `data` | `unknown` | A custom value. |
|
|
41
|
+
|
|
42
|
+
## Properties
|
|
43
|
+
|
|
44
|
+
| Property | Access | Description |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
|
|
47
|
+
| `customization` | read/write | Reading it gives a copy of what the user changed so far, to save. |
|
|
48
|
+
| `overflowed` | read-only, reactive | The controls currently in the overflow menu. |
|
|
49
|
+
|
|
50
|
+
## Methods
|
|
51
|
+
|
|
52
|
+
| Method | Returns | Description |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `controlOf(item)` | `Control \| null` | The control created for an item in `items`. It stays the same while the user moves, renames or changes the item. |
|
|
55
|
+
| `openCustomizer()` | `boolean` | Opens the customizer. Returns `false` when it is already open. |
|
|
56
|
+
| `updateOverflow()` | `void` | Recalculates what fits, for example after a control changes width. |
|
|
57
|
+
| `refresh()` | `void` | Your items can be plain or reactive, and the toolbar reads them as they are. After changing them in place, call `refresh()`. The list and each item's fields are read again, and controls for items that remain are kept. |
|
|
58
|
+
| `focus()` | `boolean` | Sets focus on the control that Tab reaches. |
|
|
59
|
+
|
|
60
|
+
## Events
|
|
61
|
+
|
|
62
|
+
| Event | When |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `onItemClick(e)` | Occurs when an item in `items` is pressed, after its own `click`. `e`: `{ item, source, event }`. |
|
|
65
|
+
| `onCustomized(e)` | Occurs when the user changed the toolbar. `e`: `{ customization, source }`, everything changed so far. |
|
|
66
|
+
| `onCustomMenuOpening(e)` | Occurs before the menu of a right-click opens. `e`: `{ item, path, items, cancel, byKeyboard, event, source }`; change `items` or set `cancel`. |
|
|
67
|
+
|
|
68
|
+
## Types
|
|
69
|
+
|
|
70
|
+
| Type | Shape |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `ToolbarCustomization` | `{ hidden?, order?, texts?, added?, display? }`: what the user changed (see [Customization](toolbar-customization.md#saving)). |
|
|
73
|
+
| `ToolbarAddedItem` | `{ id, command?, separator? }`: a command or a separator the user added. |
|
|
74
|
+
| `ToolbarItemDisplay` | `'icon' \| 'text' \| 'both'` |
|
|
75
|
+
| `ToolbarCustomizedEventArgs` | `{ customization, source }` |
|
|
76
|
+
| `ToolbarCustomMenuOpeningEventArgs` | `{ item, path, items, cancel, byKeyboard, event, source }`: `item` is `null` on the bar outside the items. |
|
|
77
|
+
|
|
78
|
+
## Feedback
|
|
79
|
+
|
|
80
|
+
Loading issues…
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# Toolbar: Customization
|
|
2
|
+
|
|
3
|
+
> Toolbar · @motifx-community/ui 0.1.0-beta.14
|
|
4
|
+
|
|
5
|
+
With `customizable`, the user arranges a toolbar: hides, moves and renames its items, adds commands and separators, chooses what a button shows, sends commands to it from the menus of the page, and changes keyboard shortcuts. The items you give stay as they are; what the user changed is one object for the app to save.
|
|
6
|
+
|
|
7
|
+
## Changes by the user
|
|
8
|
+
|
|
9
|
+
The user right-clicks an item, or presses Shift+F10 or the Menu key on it, and the toolbar’s menu opens with what can be done there. An item with `customizable: false` stays shown and in its place, and nothing moves past it. JSX children (a text field, for example) are not part of the customization: they stay where they are and keep the browser’s own menu. The overflow menu follows the bar as the user arranged it.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
/** A small outline icon drawn from one path. */
|
|
13
|
+
function icon(d: string) {
|
|
14
|
+
return () => (
|
|
15
|
+
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
16
|
+
<path d={d} fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const BoldIcon = icon('M4.5 3h4.25a2.5 2.5 0 0 1 0 5H4.5zM4.5 8h5a2.5 2.5 0 0 1 0 5h-5z');
|
|
22
|
+
export const ItalicIcon = icon('M7 3h5M4 13h5M10 3L6 13');
|
|
23
|
+
export const UnderlineIcon = icon('M4.5 2.5v5a3.5 3.5 0 0 0 7 0v-5M3.5 14h9');
|
|
24
|
+
export const AlignLeftIcon = icon('M2.5 4h11M2.5 8h7M2.5 12h9');
|
|
25
|
+
export const AlignCenterIcon = icon('M2.5 4h11M4.5 8h7M3.5 12h9');
|
|
26
|
+
export const AlignRightIcon = icon('M2.5 4h11M6.5 8h7M4.5 12h9');
|
|
27
|
+
export const UndoIcon = icon('M5.5 3.5L2.5 6.5l3 3M2.5 6.5h7a3.5 3.5 0 0 1 0 7h-2');
|
|
28
|
+
export const RedoIcon = icon('M10.5 3.5l3 3-3 3M13.5 6.5h-7a3.5 3.5 0 0 0 0 7h2');
|
|
29
|
+
export const LinkIcon = icon('M7 9a2.5 2.5 0 0 0 3.5 0l2-2a2.5 2.5 0 0 0-3.5-3.5l-.75.75M9 7a2.5 2.5 0 0 0-3.5 0l-2 2A2.5 2.5 0 0 0 7 12.5l.75-.75');
|
|
30
|
+
export const ImageIcon = icon('M2.5 3.5h11v9h-11zM2.5 10.5l3-3 3 3 2-2 3 3M10 6.25v.1');
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
| Command of the menu | What it does |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `Hide “Bold”` | Hides an item of the app. On a command or separator the user added, “Remove” takes it away instead. |
|
|
36
|
+
| `Move left / Move right` | Moves the item one place along the bar, past hidden items (Move up and Move down in a vertical toolbar; left and right follow the page’s direction). |
|
|
37
|
+
| `Add a separator before` | Puts a separator before the item, unless one is there already. On a separator: “Remove the separator”. |
|
|
38
|
+
| `Display` | Icon only, text only, or icon and text, for a button that has both. |
|
|
39
|
+
| `Show the hidden items` | Shows every item the user hid. |
|
|
40
|
+
| `Customize…` | Opens the customizer (`customizer: false` leaves it out). |
|
|
41
|
+
| `Undo all changes` | Forgets everything the user changed. |
|
|
42
|
+
|
|
43
|
+
“Customize…” in that menu, or `openCustomizer()`, opens the customizer window. On a touch screen the window takes the whole screen.
|
|
44
|
+
|
|
45
|
+
| Page of the window | Content |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `Items` | Every item in a list. Its check box shows or hides it; the toolbar adds a separator after the selected item, renames, deletes what the user added, moves items up and down, chooses what a button shows, and resets. Alt with an arrow moves the selected item, F2 renames it, Delete deletes it. |
|
|
48
|
+
| `Commands` | The commands given as `commands`, or the app’s commands (`commands.add`) that have a text when none are given. “Add” puts the chosen one after the item selected on the first page. |
|
|
49
|
+
| `Keyboard` | A [ShortcutEditor](shortcuteditor.md): the app’s keyboard shortcuts, to assign other keys. `customizerKeyboard: false` leaves the page out. |
|
|
50
|
+
|
|
51
|
+
## What a button shows
|
|
52
|
+
|
|
53
|
+
An item’s `display` says what its button shows: `icon`, `text`, or `both` (the default: whatever it is given). The user’s choice takes its place. A button that shows only its icon is named by its text, which also shows as its tooltip unless the item has a `hint`; in the overflow menu it keeps its text. A choice the button cannot follow (only the icon of a button without one) shows both.
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
{ key: 'bold', type: 'toggle', text: '&Bold', icon: BoldIcon, display: 'icon' }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Saving the changes
|
|
60
|
+
|
|
61
|
+
`onCustomized` reports everything the user changed so far as one plain object; assigning it to `customization` restores the changes, and `null` forgets them. An item of the app is named by its `key`, else by its position in `items`: give items a `key`, so a saved object still applies after the app adds or removes items. How the object is stored is up to the app.
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
bar.customization = JSON.parse(localStorage.getItem('format-bar') ?? 'null');
|
|
65
|
+
bar.onCustomized((e) => localStorage.setItem('format-bar', JSON.stringify(e.customization)));
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| Field | Type | Description |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| `hidden` | `string[]` | The items the user hid. |
|
|
71
|
+
| `order` | `Record<string, string[]>` | The order the user gave, by key, under `''`. |
|
|
72
|
+
| `texts` | `Record<string, string>` | The names the user gave to items. |
|
|
73
|
+
| `added` | `ToolbarAddedItem[]` | The commands (`{ id, command }`) and separators (`{ id, separator: true }`) the user added, each with its `id` (`user:1`). |
|
|
74
|
+
| `display` | `Record<string, 'icon' \| 'text' \| 'both'>` | What the user chose a button shows. |
|
|
75
|
+
|
|
76
|
+
## Sending commands from menus
|
|
77
|
+
|
|
78
|
+
A menu item and a toolbar button that name the same command of the app (`command: 'save'`, see [Commands and shortcuts](commands.md)) are the same command: the button takes its text, icon, state and action from it. A customizable toolbar takes commands from the menus of the page: right-click an item of a [MenuBar](menus.md), a command of a [RibbonMenu](ribbonmenu-customization.md) or an item of an open [ContextMenu](menus-context.md) that names a command, and its menu offers “Add to the “Quick access” toolbar” for every such toolbar, or “Remove from…” where the command is shown already. Adding shows the toolbar’s own item of that command again when the user hid it, else adds the command as an item of the user’s; removing hides an item of the app and takes away one the user added. The saved object keeps only the command’s key, so it does not depend on the menus.
|
|
79
|
+
|
|
80
|
+
`acceptCommands: false` keeps a toolbar out of the menus. On each of the three menus, `toolbarTargets: false` leaves the lines out; on a menu bar and a ribbon menu they are there whether or not the menu itself is `customizable`, and a ribbon menu’s quick commands stay its own. A toolbar takes only commands it could offer in its customizer: those of `commands` when it is given, else the app’s.
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
/** A small outline icon drawn from one path. */
|
|
84
|
+
function icon(d: string) {
|
|
85
|
+
return () => (
|
|
86
|
+
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
87
|
+
<path d={d} fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
88
|
+
</svg>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const BoldIcon = icon('M4.5 3h4.25a2.5 2.5 0 0 1 0 5H4.5zM4.5 8h5a2.5 2.5 0 0 1 0 5h-5z');
|
|
93
|
+
export const ItalicIcon = icon('M7 3h5M4 13h5M10 3L6 13');
|
|
94
|
+
export const UnderlineIcon = icon('M4.5 2.5v5a3.5 3.5 0 0 0 7 0v-5M3.5 14h9');
|
|
95
|
+
export const AlignLeftIcon = icon('M2.5 4h11M2.5 8h7M2.5 12h9');
|
|
96
|
+
export const AlignCenterIcon = icon('M2.5 4h11M4.5 8h7M3.5 12h9');
|
|
97
|
+
export const AlignRightIcon = icon('M2.5 4h11M6.5 8h7M4.5 12h9');
|
|
98
|
+
export const UndoIcon = icon('M5.5 3.5L2.5 6.5l3 3M2.5 6.5h7a3.5 3.5 0 0 1 0 7h-2');
|
|
99
|
+
export const RedoIcon = icon('M10.5 3.5l3 3-3 3M13.5 6.5h-7a3.5 3.5 0 0 0 0 7h2');
|
|
100
|
+
export const LinkIcon = icon('M7 9a2.5 2.5 0 0 0 3.5 0l2-2a2.5 2.5 0 0 0-3.5-3.5l-.75.75M9 7a2.5 2.5 0 0 0-3.5 0l-2 2A2.5 2.5 0 0 0 7 12.5l.75-.75');
|
|
101
|
+
export const ImageIcon = icon('M2.5 3.5h11v9h-11zM2.5 10.5l3-3 3 3 2-2 3 3M10 6.25v.1');
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Commands of your own in the menu
|
|
105
|
+
|
|
106
|
+
`onCustomMenuOpening` occurs before the menu of a right-click opens, with the item, its name in the customization (`path`) and the commands about to be shown: add commands of your own, leave some out, or set `cancel`. It occurs without `customizable` too, with no commands of the toolbar, so a toolbar can have a right-click menu of the app’s own.
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
<Toolbar
|
|
110
|
+
label="Format"
|
|
111
|
+
items={items}
|
|
112
|
+
onCustomMenuOpening={(e) => {
|
|
113
|
+
if (e.path === 'bold') e.items.push({ text: 'Bold settings…', click: () => this.openBoldSettings() });
|
|
114
|
+
}}
|
|
115
|
+
/>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Feedback
|
|
119
|
+
|
|
120
|
+
Loading issues…
|
|
121
|
+
|
|
122
|
+
## Example files
|
|
123
|
+
|
|
124
|
+
`CustomizableToolbar.tsx`
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { reactive } from '@motifx/core';
|
|
128
|
+
import { Button, Stack, Toolbar, type ToolbarCustomization, type ToolbarItem } from '@motifx-community/ui';
|
|
129
|
+
import { BoldIcon, ImageIcon, ItalicIcon, LinkIcon, RedoIcon, UnderlineIcon, UndoIcon } from './icons';
|
|
130
|
+
|
|
131
|
+
/** Right-click an item, or press Shift+F10 on it, to hide, move or rename it; what the user changed is one object to save. */
|
|
132
|
+
export default function CustomizableToolbar() {
|
|
133
|
+
const s = reactive({ saved: null as ToolbarCustomization | null, told: 'Nothing yet.' });
|
|
134
|
+
const run = (what: string) => () => (s.told = what);
|
|
135
|
+
let bar!: Toolbar;
|
|
136
|
+
|
|
137
|
+
const items: ToolbarItem[] = [
|
|
138
|
+
{ key: 'undo', text: '&Undo', icon: UndoIcon, display: 'icon', click: run('Undo') },
|
|
139
|
+
{ key: 'redo', text: '&Redo', icon: RedoIcon, display: 'icon', click: run('Redo') },
|
|
140
|
+
{ key: 'edit-line', type: 'separator' },
|
|
141
|
+
{ key: 'bold', type: 'toggle', text: '&Bold', icon: BoldIcon, display: 'icon' },
|
|
142
|
+
{ key: 'italic', type: 'toggle', text: '&Italic', icon: ItalicIcon, display: 'icon' },
|
|
143
|
+
{ key: 'underline', type: 'toggle', text: 'U&nderline', icon: UnderlineIcon, display: 'icon' },
|
|
144
|
+
{ key: 'insert-line', type: 'separator' },
|
|
145
|
+
{ key: 'link', text: 'Insert &link', icon: LinkIcon, click: run('Insert link') },
|
|
146
|
+
{ key: 'image', text: 'Insert i&mage', icon: ImageIcon, click: run('Insert image') },
|
|
147
|
+
{ key: 'publish', text: '&Publish', tone: 'accent', customizable: false, click: run('Publish') },
|
|
148
|
+
];
|
|
149
|
+
// Commands the user can add from the customizer.
|
|
150
|
+
const offered: ToolbarItem[] = [
|
|
151
|
+
{ key: 'print', text: '&Print', click: run('Print') },
|
|
152
|
+
{ key: 'share', text: 'S&hare', click: run('Share') },
|
|
153
|
+
{ key: 'spelling', text: 'Check &spelling', click: run('Check spelling') },
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<Stack gap="md">
|
|
158
|
+
<Toolbar
|
|
159
|
+
ref={(b: Toolbar) => (bar = b)}
|
|
160
|
+
label="Format"
|
|
161
|
+
items={items}
|
|
162
|
+
commands={offered}
|
|
163
|
+
customizable
|
|
164
|
+
onCustomized={(e) => (s.saved = e.customization)}
|
|
165
|
+
style="inline-size: 100%"
|
|
166
|
+
/>
|
|
167
|
+
<output class="tb-custom-told">{() => s.told}</output>
|
|
168
|
+
<pre class="tb-custom-saved">{() => JSON.stringify(s.saved ?? {}, null, 2)}</pre>
|
|
169
|
+
<Stack orientation="horizontal" gap="sm" wrap>
|
|
170
|
+
<Button text="Customize…" variant="outline" onclick={() => bar.openCustomizer()} />
|
|
171
|
+
<Button text="Forget the changes" variant="outline" onclick={() => (bar.customization = null)} />
|
|
172
|
+
<Button text="Restore the saved changes" variant="outline" onclick={() => (bar.customization = s.saved)} />
|
|
173
|
+
</Stack>
|
|
174
|
+
</Stack>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`icons.tsx`
|
|
180
|
+
|
|
181
|
+
```tsx
|
|
182
|
+
/** A small outline icon drawn from one path. */
|
|
183
|
+
function icon(d: string) {
|
|
184
|
+
return () => (
|
|
185
|
+
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
186
|
+
<path d={d} fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
187
|
+
</svg>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export const BoldIcon = icon('M4.5 3h4.25a2.5 2.5 0 0 1 0 5H4.5zM4.5 8h5a2.5 2.5 0 0 1 0 5h-5z');
|
|
192
|
+
export const ItalicIcon = icon('M7 3h5M4 13h5M10 3L6 13');
|
|
193
|
+
export const UnderlineIcon = icon('M4.5 2.5v5a3.5 3.5 0 0 0 7 0v-5M3.5 14h9');
|
|
194
|
+
export const AlignLeftIcon = icon('M2.5 4h11M2.5 8h7M2.5 12h9');
|
|
195
|
+
export const AlignCenterIcon = icon('M2.5 4h11M4.5 8h7M3.5 12h9');
|
|
196
|
+
export const AlignRightIcon = icon('M2.5 4h11M6.5 8h7M4.5 12h9');
|
|
197
|
+
export const UndoIcon = icon('M5.5 3.5L2.5 6.5l3 3M2.5 6.5h7a3.5 3.5 0 0 1 0 7h-2');
|
|
198
|
+
export const RedoIcon = icon('M10.5 3.5l3 3-3 3M13.5 6.5h-7a3.5 3.5 0 0 0 0 7h2');
|
|
199
|
+
export const LinkIcon = icon('M7 9a2.5 2.5 0 0 0 3.5 0l2-2a2.5 2.5 0 0 0-3.5-3.5l-.75.75M9 7a2.5 2.5 0 0 0-3.5 0l-2 2A2.5 2.5 0 0 0 7 12.5l.75-.75');
|
|
200
|
+
export const ImageIcon = icon('M2.5 3.5h11v9h-11zM2.5 10.5l3-3 3 3 2-2 3 3M10 6.25v.1');
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
`SendToToolbar.tsx`
|
|
204
|
+
|
|
205
|
+
```tsx
|
|
206
|
+
import { reactive, type Component } from '@motifx/core';
|
|
207
|
+
import { ContextMenu, MenuBar, Stack, Toolbar, commands, type ToolbarCustomization } from '@motifx-community/ui';
|
|
208
|
+
import { RedoIcon, UndoIcon } from './icons';
|
|
209
|
+
|
|
210
|
+
const SHEET = 'padding: var(--mx-space-4); border: var(--mx-border-width-1) dashed var(--mx-color-stroke-card); border-radius: var(--mx-radius-lg)';
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Right-click a command in a menu to add it to the “Quick access” toolbar, or to take it away again: in the menu bar, or
|
|
214
|
+
* in the page's own menu, opened with a right-click on the page. The menu items and the toolbar buttons name the same
|
|
215
|
+
* commands of the app; the toolbar keeps only their keys.
|
|
216
|
+
*/
|
|
217
|
+
export default function SendToToolbar() {
|
|
218
|
+
const s = reactive({ told: 'Nothing yet.', saved: null as ToolbarCustomization | null });
|
|
219
|
+
const run = (what: string) => () => (s.told = what);
|
|
220
|
+
let sheet: Component<HTMLDivElement> | null = null;
|
|
221
|
+
|
|
222
|
+
return (
|
|
223
|
+
<Stack
|
|
224
|
+
gap="md"
|
|
225
|
+
ref={(host: Stack) => {
|
|
226
|
+
// Limited to this example (`scope`), and taken away with it.
|
|
227
|
+
commands.add({ key: 'doc.new', text: '&New', scope: host, run: run('New') });
|
|
228
|
+
commands.add({ key: 'doc.open', text: '&Open…', scope: host, run: run('Open') });
|
|
229
|
+
commands.add({ key: 'doc.save', text: '&Save', scope: host, run: run('Save') });
|
|
230
|
+
commands.add({ key: 'doc.print', text: '&Print…', scope: host, run: run('Print') });
|
|
231
|
+
commands.add({ key: 'doc.undo', text: '&Undo', icon: UndoIcon, scope: host, run: run('Undo') });
|
|
232
|
+
commands.add({ key: 'doc.redo', text: '&Redo', icon: RedoIcon, scope: host, run: run('Redo') });
|
|
233
|
+
commands.add({ key: 'doc.find', text: '&Find', scope: host, run: run('Find') });
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
<MenuBar
|
|
237
|
+
label="Document"
|
|
238
|
+
items={[
|
|
239
|
+
{ key: 'file', text: '&File', items: [{ command: 'doc.new' }, { command: 'doc.open' }, { command: 'doc.save' }, { command: 'doc.print', beginGroup: true }] },
|
|
240
|
+
{ key: 'edit', text: '&Edit', items: [{ command: 'doc.undo' }, { command: 'doc.redo' }, { command: 'doc.find', beginGroup: true }] },
|
|
241
|
+
]}
|
|
242
|
+
/>
|
|
243
|
+
<Toolbar
|
|
244
|
+
label="Quick access"
|
|
245
|
+
items={[
|
|
246
|
+
{ key: 'save', command: 'doc.save' },
|
|
247
|
+
{ key: 'undo', command: 'doc.undo', display: 'icon' },
|
|
248
|
+
]}
|
|
249
|
+
customizable
|
|
250
|
+
onCustomized={(e) => (s.saved = e.customization)}
|
|
251
|
+
/>
|
|
252
|
+
<div class="tb-send-sheet" tabindex="0" style={SHEET} ref={(c: Component<HTMLDivElement>) => (sheet = c)}>
|
|
253
|
+
The page: right-click here, then right-click a command of its menu.
|
|
254
|
+
</div>
|
|
255
|
+
<ContextMenu target={() => sheet} label="Page" items={[{ command: 'doc.find' }, { command: 'doc.redo' }, { command: 'doc.new', beginGroup: true }]} />
|
|
256
|
+
<output class="tb-send-told">{() => s.told}</output>
|
|
257
|
+
<pre class="tb-send-saved">{() => JSON.stringify(s.saved ?? {}, null, 2)}</pre>
|
|
258
|
+
</Stack>
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
```
|
package/docs/toolbar.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Toolbar
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Toolbar · @motifx-community/ui 0.1.0-beta.14
|
|
4
4
|
|
|
5
|
-
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.
|
|
5
|
+
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. The user can arrange a toolbar and send commands to it from the menus of the page ([Customization](toolbar-customization.md)); every prop, method and event is in the [API reference](toolbar-api.md).
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -150,6 +150,7 @@ export const ImageIcon = icon('M2.5 3.5h11v9h-11zM2.5 10.5l3-3 3 3 2-2 3 3M10 6.
|
|
|
150
150
|
| `Home / End` | Moves to the first or last control. |
|
|
151
151
|
| `In a text field` | The arrow keys, Home and End move within the text, and Tab leaves the field. |
|
|
152
152
|
| `Down on a menu button` | Opens the menu (horizontal toolbar). |
|
|
153
|
+
| `Shift+F10 / Menu key` | Opens the menu of the right button at the focused item, when the toolbar is `customizable` or the app adds commands to it. |
|
|
153
154
|
|
|
154
155
|
## Accessibility
|
|
155
156
|
|
|
@@ -163,7 +164,7 @@ export const ImageIcon = icon('M2.5 3.5h11v9h-11zM2.5 10.5l3-3 3 3 2-2 3 3M10 6.
|
|
|
163
164
|
|
|
164
165
|
## Localization
|
|
165
166
|
|
|
166
|
-
|
|
167
|
+
A toolbar displays on its own the name of its overflow button, from `uiLocale.strings.moreOptions`. A customizable toolbar also writes the commands of its menu (`toolbarHide`, `toolbarDisplay` and the others) and the customizer’s texts (`customizer…`), and its name in the menus that send commands to it is its `label` (`toolbarUnnamed` without one).
|
|
167
168
|
|
|
168
169
|
```tsx
|
|
169
170
|
import { reactive } from '@motifx/core';
|
|
@@ -204,55 +205,6 @@ export default function Localization() {
|
|
|
204
205
|
| `toolbar.height` | The minimum height of the bar, which uses the density-aware bar height. |
|
|
205
206
|
| `toolbar.bar, toolbar.separator` | Units: the bar (`vertical`: a column of controls) and the separators. |
|
|
206
207
|
|
|
207
|
-
## API reference
|
|
208
|
-
|
|
209
|
-
### Props
|
|
210
|
-
|
|
211
|
-
| Prop | Type | Default | Description |
|
|
212
|
-
| --- | --- | --- | --- |
|
|
213
|
-
| `items` | `Bind<readonly ToolbarItem[]>` | `[]` | Items defined as data, drawn before the JSX children (see Items). |
|
|
214
|
-
| `label` | `Bind<string>` | `''` | The accessible name of the toolbar (`aria-label`). This is the same property as `text`. |
|
|
215
|
-
| `orientation` | `Bind<'horizontal' \| 'vertical'>` | `'horizontal'` | The direction of the toolbar. The arrow keys follow it. |
|
|
216
|
-
| `size` | `Bind<ControlSize>` | `'md'` | Applied to child controls that do not set their own `size`. |
|
|
217
|
-
| `buttonVariant` | `Bind<ButtonVariant>` | `'ghost'` | Applied to child buttons that do not set their own `variant`. |
|
|
218
|
-
| `overflow` | `Bind<'menu' \| 'wrap' \| 'scroll'>` | `'menu'` | `menu` moves items that do not fit into an overflow menu, `wrap` adds a second row, and `scroll` makes the bar scroll. |
|
|
219
|
-
| `enabled / disabled, visible, tabStop, tabIndex` | see Control | | `enabled={false}` disables every control inside. |
|
|
220
|
-
|
|
221
|
-
### ToolbarItem
|
|
222
|
-
|
|
223
|
-
| Field | Type | Description |
|
|
224
|
-
| --- | --- | --- |
|
|
225
|
-
| `type` | `Bind<'button' \| 'toggle' \| 'separator' \| 'menu'>` | The default is `'button'`. |
|
|
226
|
-
| `text, icon, hint` | `Bind<…>` | The caption (`&Bold` assigns an access key), an icon and a tooltip. An icon-only button is named by its `hint`. |
|
|
227
|
-
| `pressed` | `Bind<boolean>` | The state of a toggle. As a function, the item tracks application state, and `click` changes the value it reads. |
|
|
228
|
-
| `enabled, visible` | `Bind<boolean>` | Dims the item or removes it. |
|
|
229
|
-
| `menu` | `Bind<readonly MenuItem[]>` | The commands of a `menu` item, including submenus, check and radio items, and shortcuts. |
|
|
230
|
-
| `overflow` | `Bind<'auto' \| 'always' \| 'never'>` | Controls whether the item can move into the overflow menu, and takes precedence over the toolbar. A JSX child sets it with `data-overflow`. |
|
|
231
|
-
| `click` | `(e) => void` | Occurs when the item is pressed, in the bar or in the overflow menu. `e`: `{ item, source, event }`. |
|
|
232
|
-
| `data` | `unknown` | A custom value. |
|
|
233
|
-
|
|
234
|
-
### Properties
|
|
235
|
-
|
|
236
|
-
| Property | Access | Description |
|
|
237
|
-
| --- | --- | --- |
|
|
238
|
-
| `every prop above` | read/write, reactive | Accepts a value or a function, the same as the prop. |
|
|
239
|
-
| `overflowed` | read-only, reactive | The controls currently in the overflow menu. |
|
|
240
|
-
|
|
241
|
-
### Methods
|
|
242
|
-
|
|
243
|
-
| Method | Returns | Description |
|
|
244
|
-
| --- | --- | --- |
|
|
245
|
-
| `controlOf(item)` | `Control \| null` | The control created for an item in `items`. |
|
|
246
|
-
| `updateOverflow()` | `void` | Recalculates what fits, for example after a control changes width. |
|
|
247
|
-
| `refresh()` | `void` | Your items can be plain or reactive, and the toolbar reads them as they are. After changing them in place, call `refresh()`. The list and each item's fields are read again, and controls for items that remain are kept. |
|
|
248
|
-
| `focus()` | `boolean` | Sets focus on the control that Tab reaches. |
|
|
249
|
-
|
|
250
|
-
### Events
|
|
251
|
-
|
|
252
|
-
| Event | When |
|
|
253
|
-
| --- | --- |
|
|
254
|
-
| `onItemClick(e)` | Occurs when an item in `items` is pressed, after its own `click`. `e`: `{ item, source, event }`. |
|
|
255
|
-
|
|
256
208
|
## Feedback
|
|
257
209
|
|
|
258
210
|
Loading issues…
|
package/docs/tooltip.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tooltip
|
|
2
2
|
|
|
3
|
-
> Feedback · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Feedback · @motifx-community/ui 0.1.0-beta.14
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
package/docs/treeview.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TreeView
|
|
2
2
|
|
|
3
|
-
> Data · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Data · @motifx-community/ui 0.1.0-beta.14
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ValidationSummary
|
|
2
2
|
|
|
3
|
-
> Editors · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Editors · @motifx-community/ui 0.1.0-beta.14
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
package/docs/window.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Window and dialog
|
|
2
2
|
|
|
3
|
-
> Navigation · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Navigation · @motifx-community/ui 0.1.0-beta.14
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
package/docs/wizard.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Wizard
|
|
2
2
|
|
|
3
|
-
> Navigation · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Navigation · @motifx-community/ui 0.1.0-beta.14
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|