@motifx-community/ui 0.1.0-beta.10 → 0.1.0-beta.11
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 +10 -0
- package/dist/components/toolbar/Toolbar.d.ts +2 -2
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- 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 +2 -2
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +3 -5
- 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/checkbox.md +1 -1
- package/docs/chip.md +1 -1
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +1 -1
- package/docs/commands.md +126 -0
- 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 +107 -1
- package/docs/datagrid-filtering.md +11 -3
- package/docs/datagrid-forms.md +1 -1
- package/docs/datagrid-grouping.md +1 -1
- 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 +1 -1
- package/docs/drawer.md +1 -1
- package/docs/dropdown.md +1 -1
- package/docs/editors.md +3 -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 +2 -2
- package/docs/keyboard.md +5 -3
- package/docs/language.md +2 -2
- package/docs/layout.md +1 -1
- package/docs/listbox.md +1 -1
- package/docs/loadpanel.md +2 -2
- package/docs/lookup.md +1 -1
- package/docs/menus-api.md +142 -0
- package/docs/menus-context.md +126 -0
- package/docs/menus-customization.md +138 -0
- package/docs/menus-merging.md +208 -0
- package/docs/menus-programmatic.md +74 -0
- package/docs/menus.md +22 -179
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +7 -2
- package/docs/numberbox.md +3 -3
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/popover.md +1 -1
- package/docs/progress.md +3 -3
- 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 +1 -1
- package/docs/ribbonmenu-commands.md +1 -1
- package/docs/ribbonmenu-customization.md +1 -1
- 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 +1 -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 +248 -0
- package/docs/showcase-home.md +1 -1
- package/docs/showcase.md +1 -1
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +3 -3
- package/docs/sortable.md +1 -1
- 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 +1 -1
- package/docs/textbox.md +1 -1
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +13 -1
- package/docs/toolbar.md +1 -1
- 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 +3774 -2692
- package/llms.txt +16 -6
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# MenuBar: Programmatic changes
|
|
2
|
+
|
|
3
|
+
> MenuBar · @motifx-community/ui 0.1.0-beta.10
|
|
4
|
+
|
|
5
|
+
The items of a bar can be changed while it runs: by path, without building the whole list again, or in place followed by `refresh()`. Items can also name app commands, which give them their text, keys, state and action.
|
|
6
|
+
|
|
7
|
+
## Changes by path
|
|
8
|
+
|
|
9
|
+
An item is named by the keys along the way, joined with `/`: `file/save`; an item without a `key` is named by its position. Each change makes a new list, in which the items along the changed path are new objects and the others are the ones given, and `onItemsChanged` reports it. An open menu stays open with its new items.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { reactive } from '@motifx/core';
|
|
13
|
+
import { Button, MenuBar, Stack, type MenuItem } from '@motifx-community/ui';
|
|
14
|
+
|
|
15
|
+
const START: MenuItem[] = [
|
|
16
|
+
{ key: 'file', text: '&File', items: [{ key: 'new', text: '&New' }, { key: 'save', text: '&Save' }] },
|
|
17
|
+
{ key: 'edit', text: '&Edit', items: [{ key: 'undo', text: '&Undo' }, { key: 'paste', text: '&Paste' }] },
|
|
18
|
+
{ key: 'help', text: '&Help', items: [{ key: 'about', text: '&About' }] },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
/** Items added, removed, moved and changed by path; the list given is never changed. */
|
|
22
|
+
export default function MenuChanges() {
|
|
23
|
+
const s = reactive({ changes: 0 });
|
|
24
|
+
let bar!: MenuBar;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Stack gap="md">
|
|
28
|
+
<MenuBar ref={(b: MenuBar) => (bar = b)} class="mb-changes" label="Changes" items={START} onItemsChanged={() => s.changes++} />
|
|
29
|
+
<Stack orientation="horizontal" gap="sm" wrap>
|
|
30
|
+
<Button text="Add Print to File" variant="outline" onclick={() => bar.addItem('file', { key: 'print', text: '&Print', shortcut: 'Ctrl+P' })} />
|
|
31
|
+
<Button text="Turn Save off" variant="outline" onclick={() => bar.updateItem('file/save', { enabled: false })} />
|
|
32
|
+
<Button text="Move Paste to File" variant="outline" onclick={() => bar.moveItem('edit/paste', 0, 'file')} />
|
|
33
|
+
<Button text="Move Help first" variant="outline" onclick={() => bar.moveItem('help', 0)} />
|
|
34
|
+
<Button text="Remove Edit" variant="outline" onclick={() => bar.removeItem('edit')} />
|
|
35
|
+
<Button text="Start again" variant="outline" onclick={() => (bar.items = START)} />
|
|
36
|
+
</Stack>
|
|
37
|
+
<output class="mb-changes-told">{() => `${s.changes} changes`}</output>
|
|
38
|
+
</Stack>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Method | Returns | Description |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| `findItem(path)` | `MenuItem \| null` | The item at the path, as it is now. |
|
|
46
|
+
| `addItem(parentPath, item, index?)` | `boolean` | Adds an item to the menu at `parentPath` (the bar when empty), at the end by default. |
|
|
47
|
+
| `removeItem(path)` | `boolean` | Removes the item with its menu. |
|
|
48
|
+
| `moveItem(path, index, toParent?)` | `boolean` | Moves the item to `index` in its menu, or in the menu at `toParent`. |
|
|
49
|
+
| `updateItem(path, changes)` | `boolean` | Changes fields of the item; the others stay as they are. |
|
|
50
|
+
| `beginUpdate(), endUpdate()` | `void` | Applies the changes made between them at once, with one `onItemsChanged`. |
|
|
51
|
+
| `refresh()` | `void` | Reads items changed in place again: the bar, the open menu and its submenus update. |
|
|
52
|
+
|
|
53
|
+
## Changes in place
|
|
54
|
+
|
|
55
|
+
Your items can be plain objects or reactive ones, and the bar reads them as they are. A field given as a function is followed by itself; after changing plain items in place, call `refresh()`.
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
const items = [{ key: 'file', text: '&File', items: [{ key: 'save', text: '&Save', enabled: () => doc.dirty }] }];
|
|
59
|
+
items[0].items.push({ key: 'print', text: '&Print' });
|
|
60
|
+
bar.refresh();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Items that name commands
|
|
64
|
+
|
|
65
|
+
An item with `command: 'save'` takes what it is not given from the app command with that key: its text, icon, hint, the keys shown at its end, its state and its action. The command’s keys run it, and the user can assign other keys to them. See [Commands and shortcuts](commands.md).
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
commands.add({ key: 'save', text: '&Save', shortcut: 'Mod+S', enabled: () => doc.dirty, run: () => doc.save() });
|
|
69
|
+
<MenuBar items={[{ key: 'file', text: '&File', items: [{ command: 'save' }] }]} />
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Feedback
|
|
73
|
+
|
|
74
|
+
Loading issues…
|
package/docs/menus.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# MenuBar and ContextMenu
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> MenuBar · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
|
-
An application menu bar (File, Edit, View) and a context menu that opens on right-click. Both use the same menu items, which support submenus, check and radio items, shortcuts and access keys.
|
|
5
|
+
An application menu bar (File, Edit, View) and a context menu that opens on right-click. Both use the same menu items, which support submenus, check and radio items, shortcuts and access keys. The bar can be customized by the user, changed by path and merged with the bars of documents and windows.
|
|
6
6
|
|
|
7
7
|
## Import
|
|
8
8
|
|
|
@@ -95,123 +95,37 @@ export default function MainMenu() {
|
|
|
95
95
|
|
|
96
96
|
## Submenus, check items, radio items and shortcuts
|
|
97
97
|
|
|
98
|
-
An item with `items` opens a submenu at its side. Right (Left on right-to-left pages), Enter or Space opens it, Left and Escape close it, and hovering opens it after a short delay. `checked` creates a check item, and `checked` with a `group` creates one choice in a set, shown with a dot. `shortcut` is displayed at the end of the item
|
|
98
|
+
An item with `items` opens a submenu at its side. Right (Left on right-to-left pages), Enter or Space opens it, Left and Escape close it, and hovering opens it after a short delay. `checked` creates a check item, and `checked` with a `group` creates one choice in a set, shown with a dot. `shortcut` is displayed at the end of the item; an item that names a [command](commands.md) shows and runs the command’s keys. The same items work in a `Button` menu and a `ContextMenu`.
|
|
99
99
|
|
|
100
100
|
| Field | Type | Description |
|
|
101
101
|
| --- | --- | --- |
|
|
102
|
+
| `key` | `string \| number` | Names the item in paths (`file/save`), in what the user changed and in merging. Without it, an item is named by its position. |
|
|
102
103
|
| `text` | `Bind<string>` | The label. `&Copy` makes C select the item while the menu is open (Alt+C on a top-level menu bar item). |
|
|
104
|
+
| `command` | `string` | The key of an app command (`commands`). What the item is not given, such as its text, icon, keys, state and action, comes from the command. |
|
|
103
105
|
| `icon, hint` | `Bind<…>` | An icon at the start, and a tooltip. |
|
|
104
|
-
| `shortcut` | `Bind<string>` | A key combination displayed at the end (`Ctrl+S`). It is for display only
|
|
105
|
-
| `description` | `Bind<string>` | A second, dimmer text after the label that distinguishes the item, such as a folder name. It is part of the item
|
|
106
|
+
| `shortcut` | `Bind<string>` | A key combination displayed at the end (`Ctrl+S`). It is for display only: register the key with `addShortcut`, or name a command, whose keys are shown and run. |
|
|
107
|
+
| `description` | `Bind<string>` | A second, dimmer text after the label that distinguishes the item, such as a folder name. It is part of the item’s name and never a key. |
|
|
106
108
|
| `items` | `Bind<readonly MenuItem[]>` | A submenu that opens at the side. |
|
|
107
109
|
| `checked` | `Bind<boolean>` | A check item (`menuitemcheckbox`). |
|
|
108
110
|
| `group` | `Bind<string>` | With `checked`, one choice in a group (`menuitemradio`), shown with a dot. |
|
|
109
111
|
| `enabled, visible` | `Bind<boolean>` | Dims the item so it cannot be selected, or removes it. |
|
|
110
112
|
| `beginGroup` | `Bind<boolean>` | Draws a separator before the item. |
|
|
111
113
|
| `tone` | `Bind<'standard' \| 'accent' \| 'success' \| 'caution' \| 'danger'>` | Colors the item with a kit tone (`danger` for destructive actions). A toolbar button moved into the overflow menu keeps its tone. |
|
|
114
|
+
| `customizable` | `Bind<boolean>` | `false` keeps the item shown and in its place in a customizable bar; nothing moves past it. |
|
|
115
|
+
| `merge` | `Bind<'auto' \| 'add' \| 'replace' \| 'remove' \| 'none'>` | In a bar merged into another: what the item does there. The default is `auto`. |
|
|
116
|
+
| `mergeAt` | `Bind<number \| { before } \| { after }>` | In a bar merged into another: where the item stands there. The default is the end. |
|
|
112
117
|
| `click` | `(e) => void` | Occurs when the item is selected, after the menu closes. `e`: `{ item, source, event }`. |
|
|
113
118
|
| `data` | `unknown` | A custom value. |
|
|
114
119
|
|
|
115
|
-
##
|
|
120
|
+
## In this group
|
|
116
121
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
id: number;
|
|
125
|
-
name: string;
|
|
126
|
-
locked: boolean;
|
|
127
|
-
starred: boolean;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const BOX = 'inline-size: 100%; margin: 0; list-style: none; padding: var(--mx-space-4); background: var(--mx-color-bg-card); border: var(--mx-border-width-1) solid var(--mx-color-stroke-card); border-radius: var(--mx-radius-lg)';
|
|
131
|
-
|
|
132
|
-
/** A context menu whose items `onOpening` builds for the row of a list it opens on. */
|
|
133
|
-
export default function FileList() {
|
|
134
|
-
const s = reactive({
|
|
135
|
-
log: 'Nothing chosen yet.',
|
|
136
|
-
files: [
|
|
137
|
-
{ id: 1, name: 'report.docx', locked: false, starred: true },
|
|
138
|
-
{ id: 2, name: 'budget.xlsx', locked: true, starred: false },
|
|
139
|
-
{ id: 3, name: 'photo.png', locked: false, starred: false },
|
|
140
|
-
] as FileRow[],
|
|
141
|
-
});
|
|
142
|
-
let renamed = 0;
|
|
143
|
-
let list: Component<HTMLUListElement> | null = null;
|
|
144
|
-
|
|
145
|
-
const did = (what: string) => (s.log = what);
|
|
146
|
-
const rename = (row: FileRow) => {
|
|
147
|
-
row.name = `copy-${++renamed}-${row.name}`;
|
|
148
|
-
did(`Renamed to ${row.name}`);
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const rowItems = (row: FileRow): MenuItem[] => [
|
|
152
|
-
{ text: '&Open', click: () => did(`Open ${row.name}`) },
|
|
153
|
-
{ text: '&Rename', enabled: !row.locked, click: () => rename(row) },
|
|
154
|
-
{ text: '&Star', checked: row.starred, click: () => (row.starred = !row.starred) },
|
|
155
|
-
{ text: '&Move to', items: ['Documents', 'Pictures', 'Archive'].map((folder) => ({ text: folder, click: () => did(`Move ${row.name} to ${folder}`) })) },
|
|
156
|
-
{ text: '&Delete', shortcut: 'Del', beginGroup: true, enabled: !row.locked, click: () => (s.files = s.files.filter((f) => f !== row)) },
|
|
157
|
-
];
|
|
158
|
-
|
|
159
|
-
const rowOf = (part: ComponentBase) => {
|
|
160
|
-
let id: string | null = null;
|
|
161
|
-
for (let at: ComponentBase | null = part; at && !id; at = at.parent) id = at.attr.get('data-id');
|
|
162
|
-
return s.files.find((f) => f.id === Number(id));
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
return (
|
|
166
|
-
<>
|
|
167
|
-
<ul class="cm-list" aria-label="Files" ref={(c: Component<HTMLUListElement>) => (list = c)} style={BOX}>
|
|
168
|
-
{s.files.map((file) => (
|
|
169
|
-
<li key={file.id} data-id={String(file.id)} tabindex="0" style="padding-block: var(--mx-space-2)">
|
|
170
|
-
{() => `${file.starred ? '★ ' : ''}${file.name}${file.locked ? ' (locked)' : ''}`}
|
|
171
|
-
</li>
|
|
172
|
-
))}
|
|
173
|
-
</ul>
|
|
174
|
-
<ContextMenu
|
|
175
|
-
target={() => list}
|
|
176
|
-
label="File"
|
|
177
|
-
onOpening={(e) => {
|
|
178
|
-
const row = rowOf(e.part);
|
|
179
|
-
if (row) e.items = rowItems(row);
|
|
180
|
-
else e.cancel = true;
|
|
181
|
-
}}
|
|
182
|
-
/>
|
|
183
|
-
<output class="cm-log">{() => s.log}</output>
|
|
184
|
-
</>
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
```tsx
|
|
190
|
-
import { reactive, type Component } from '@motifx/core';
|
|
191
|
-
import { attachContextMenu } from '@motifx-community/ui';
|
|
192
|
-
|
|
193
|
-
const START = 'Right-click here, or focus me and press the Menu key.';
|
|
194
|
-
const BOX = 'padding: var(--mx-space-4); background: var(--mx-color-bg-card); border: var(--mx-border-width-1) solid var(--mx-color-stroke-card); border-radius: var(--mx-radius-lg)';
|
|
195
|
-
|
|
196
|
-
/** A menu given to a component with `attachContextMenu`, its items built from the opening. */
|
|
197
|
-
export default function AttachedMenu() {
|
|
198
|
-
const s = reactive({ zone: START });
|
|
199
|
-
|
|
200
|
-
const attach = (c: Component<HTMLDivElement>) => {
|
|
201
|
-
const remove = attachContextMenu(c, (e) => [
|
|
202
|
-
{ text: '&Say where', click: () => (s.zone = `Opened ${e.byKeyboard ? 'from the keyboard' : 'with the pointer'} on ${e.part === c ? 'the zone' : 'its content'}.`) },
|
|
203
|
-
{ text: '&Reset', click: () => (s.zone = START) },
|
|
204
|
-
]);
|
|
205
|
-
c.motif.setDisposable(remove);
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
return (
|
|
209
|
-
<div class="cm-zone" tabindex="0" style={BOX} onBuilt={attach}>
|
|
210
|
-
{() => s.zone}
|
|
211
|
-
</div>
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
```
|
|
122
|
+
| Page | Content |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| `[ContextMenu](menus-context.md)` | The menu of an element, opened by a right-click, the Menu key or Shift+F10. |
|
|
125
|
+
| `[Customization](menus-customization.md)` | The user hides, moves, renames and adds items, and changes keyboard shortcuts; the changes are one object to save. |
|
|
126
|
+
| `[Programmatic changes](menus-programmatic.md)` | Items added, removed, moved and changed by path, and items that name app commands. |
|
|
127
|
+
| `[Merging menus](menus-merging.md)` | The bar of a document, a window or a tab shows its items in the app’s bar. |
|
|
128
|
+
| `[API reference](menus-api.md)` | Every prop, property, method and event. |
|
|
215
129
|
|
|
216
130
|
## Keyboard
|
|
217
131
|
|
|
@@ -221,11 +135,11 @@ export default function AttachedMenu() {
|
|
|
221
135
|
| `Left / Right` | On the bar, moves to the previous or next top-level item. In a menu, moves to the adjacent menu or closes a submenu (Right opens one). These keys are mirrored on right-to-left pages. |
|
|
222
136
|
| `Down, Enter, Space` | On the bar, opens the menu on its first item. Up opens it on the last item. |
|
|
223
137
|
| `Up / Down, Home / End` | In a menu, moves between items and wraps at the ends. |
|
|
224
|
-
| `A letter` | Moves to the next item that starts with that letter. An item
|
|
138
|
+
| `A letter` | Moves to the next item that starts with that letter. An item’s `&` key selects it. |
|
|
225
139
|
| `Alt + key` | Opens the top-level item with that `&` key (Control + Option on Apple platforms). |
|
|
226
140
|
| `Escape` | Closes a submenu, then the menu, and returns to where it opened. |
|
|
227
141
|
| `F10` | Moves focus to the menu bar when `focusOnF10` is set. |
|
|
228
|
-
| `Menu key, Shift+F10` | Opens a context menu at the focused element. |
|
|
142
|
+
| `Menu key, Shift+F10` | Opens a context menu at the focused element; on a customizable bar, the menu of the focused item. |
|
|
229
143
|
|
|
230
144
|
## Accessibility
|
|
231
145
|
|
|
@@ -235,82 +149,11 @@ export default function AttachedMenu() {
|
|
|
235
149
|
| `Menus` | `role="menu"`. Items are `menuitem`, `menuitemcheckbox` or `menuitemradio` with `aria-checked`. Disabled items have `aria-disabled` and remain reachable. |
|
|
236
150
|
| `Submenus` | The item has `aria-haspopup="menu"` and `aria-expanded`. The submenu opens next to it, focus moves in and returns when it closes. |
|
|
237
151
|
| `Focus` | A menu opened from the keyboard focuses its first item, and a menu opened with the pointer focuses the menu itself. Closing returns focus. |
|
|
238
|
-
| `Shortcuts` | The shortcut text is part of the item
|
|
152
|
+
| `Shortcuts` | The shortcut text is part of the item’s name. Access keys are exposed through `aria-keyshortcuts` on top-level items. |
|
|
239
153
|
|
|
240
154
|
## Localization
|
|
241
155
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
## Styling
|
|
245
|
-
|
|
246
|
-
| Hook | Description |
|
|
247
|
-
| --- | --- |
|
|
248
|
-
| `.mx-menubar, .mx-menubar__bar, .mx-menubar__item` | The menu bar, its row and a top-level item (`aria-expanded="true"` while open). |
|
|
249
|
-
| `.mx-context-menu, .mx-context-menu__anchor` | The context menu, which has no box of its own, and the point it opens at. |
|
|
250
|
-
| `.mx-menu, .mx-menu__item, .mx-menu__separator` | A menu (shared with Button), an item and a separator. |
|
|
251
|
-
| `.mx-menu__check, .mx-menu__icon, .mx-menu__label, .mx-menu__description, .mx-menu__shortcut, .mx-menu__arrow` | The parts of an item. |
|
|
252
|
-
|
|
253
|
-
### Component tokens
|
|
254
|
-
|
|
255
|
-
| Token | Description |
|
|
256
|
-
| --- | --- |
|
|
257
|
-
| `menubar.height, menubar.item-height` | The height of the bar and of a top-level item. |
|
|
258
|
-
| `menubar.bar, menubar.item, menubar.icon, menubar.mnemonic` | Units: the bar, a top-level item with its box per state (`hover`, `pressed`, `open`, `disabled`, `focus`), its icon, and its access key indicator (`shown`). |
|
|
259
|
-
| `menu.item, menu.item-height, menu.item-white-space` | Menu items, shared with the Button menu: the item unit in each state (`highlight`, `pressed`, `focus`, `checked`, `disabled`, `first`, `last`, each tone and `<tone>-highlight`), the row height, and text wrapping. |
|
|
260
|
-
| `menu.panel, menu.check, menu.icon, menu.check-mark, menu.radio-mark, menu.separator` | Units: the item column, the leading indicator and icon, the check and radio marks, and the separator between groups. |
|
|
261
|
-
| `menu.label, menu.description, menu.shortcut, menu.arrow` | Units: the item text, its description, the shortcut and the submenu arrow. |
|
|
262
|
-
|
|
263
|
-
## API reference
|
|
264
|
-
|
|
265
|
-
### MenuBar props
|
|
266
|
-
|
|
267
|
-
| Prop | Type | Default | Description |
|
|
268
|
-
| --- | --- | --- | --- |
|
|
269
|
-
| `items` | `Bind<readonly MenuItem[]>` | `[]` | The top-level items, whose `items` define the menus they open. A top-level item without `items` runs its `click`. |
|
|
270
|
-
| `label` | `Bind<string>` | `''` | The accessible name of the bar. This is the same property as `text`. |
|
|
271
|
-
| `focusOnF10` | `Bind<boolean>` | `false` | F10 moves focus to the bar from anywhere on the page. This is off by default because browsers use F10. |
|
|
272
|
-
| `openOnHover` | `Bind<boolean>` | `true` | While a menu is open, hovering another top-level item opens its menu, and hovering an item opens its submenu. |
|
|
273
|
-
| `enabled / disabled, visible, tabStop, tabIndex` | see Control | | Properties shared by all controls. |
|
|
274
|
-
|
|
275
|
-
### ContextMenu props
|
|
276
|
-
|
|
277
|
-
| Prop | Type | Default | Description |
|
|
278
|
-
| --- | --- | --- | --- |
|
|
279
|
-
| `items` | `Bind<readonly MenuItem[]>` | `[]` | The commands. `onOpening` can provide different ones for each component. |
|
|
280
|
-
| `target` | `Bind<Component \| null>` | Its parent | The component the menu belongs to. If not set, this is the component the `ContextMenu` is placed in. |
|
|
281
|
-
| `label` | `Bind<string>` | `''` | The accessible name of the menu. |
|
|
282
|
-
| `keyboard` | `Bind<boolean>` | `true` | The Menu key and Shift+F10 open the menu at the focused element. |
|
|
283
|
-
| `closeOnScroll` | `Bind<boolean>` | `true` | Scrolling the element out of view closes the menu. Until then, the menu follows the element. |
|
|
284
|
-
| `openOnHover` | `Bind<boolean>` | `true` | Hovering an item opens its submenu. |
|
|
285
|
-
| `enabled` | `Bind<boolean>` | `true` | `false` shows the browser's own menu. |
|
|
286
|
-
|
|
287
|
-
### Properties
|
|
288
|
-
|
|
289
|
-
| Property | Access | Description |
|
|
290
|
-
| --- | --- | --- |
|
|
291
|
-
| `MenuBar.openItem` | read-only, reactive | The top-level item whose menu is open. |
|
|
292
|
-
| `ContextMenu.opened` | read-only, reactive | Indicates whether it is open. |
|
|
293
|
-
| `ContextMenu.targetPart` | read-only, reactive | The component the menu was last opened on. |
|
|
294
|
-
| `ContextMenu.target` | read/write, reactive | The component the menu listens on. |
|
|
295
|
-
|
|
296
|
-
### Methods
|
|
297
|
-
|
|
298
|
-
| Method | Returns | Description |
|
|
299
|
-
| --- | --- | --- |
|
|
300
|
-
| `MenuBar.open(item \| index)` | `boolean` | Opens a top-level item's menu with focus on its first item. |
|
|
301
|
-
| `MenuBar.close()` | `void` | Closes the open menu. |
|
|
302
|
-
| `ContextMenu.open(at, target?)` | `boolean` | Opens the menu programmatically, at `{ x, y }` or at a component. |
|
|
303
|
-
| `ContextMenu.close()` | `void` | Closes it. |
|
|
304
|
-
| `MenuBar.refresh(), ContextMenu.refresh()` | `void` | Your items can be plain or reactive, and the menu reads them as they are. After changing them in place, call `refresh()`. The bar, the open menu and its submenus update. |
|
|
305
|
-
| `attachContextMenu(target, items)` | `() => void` | Attaches a menu to a component. `items` can be a function of the opening event (`e.part`). Returns a function that removes the menu. |
|
|
306
|
-
|
|
307
|
-
### Events
|
|
308
|
-
|
|
309
|
-
| Event | When |
|
|
310
|
-
| --- | --- |
|
|
311
|
-
| `onItemClick(e)` | On both components, occurs when an item is selected, after its own `click`. |
|
|
312
|
-
| `ContextMenu.onOpening(e)` | Occurs before the menu opens. `e`: `{ part, items, cancel, byKeyboard, event, source }`. Set `e.items` for the component `part`, or set `e.cancel = true`. |
|
|
313
|
-
| `ContextMenu.onClosed(reason)` | `escape`, `outside`, `focus` or `code`. |
|
|
156
|
+
Every label, shortcut and name of an item comes from your items, so they follow your own translations. A function in `text` updates immediately when the language changes. The texts of the bar itself, such as those of its customizer, come from the kit’s language packs.
|
|
314
157
|
|
|
315
158
|
## Feedback
|
|
316
159
|
|
package/docs/multiview.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MultiView
|
|
2
2
|
|
|
3
|
-
> Navigation · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Navigation · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Displays one page at a time from a horizontal set. Users move between pages with a swipe or drag, and you can navigate with `next()`, `previous()` and `goTo()`, or with [Tabs](tabs.md), a [Stepper](stepper.md) or buttons bound to the same value. It works like the panels of a tab control without the tab strip.
|
|
6
6
|
|
package/docs/navigation.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Navigation
|
|
2
2
|
|
|
3
|
-
> Navigation · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Navigation · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
|
-
Navigation components move the reader around an application and lay out its screens: bars at the top and bottom, tabs, paths, steps and pages, panels that slide in, and the containers that arrange everything.
|
|
5
|
+
Navigation components move the reader around an application and lay out its screens: bars at the top and bottom, menus and toolbars, tabs, paths, steps and pages, panels that slide in, and the containers that arrange everything.
|
|
6
6
|
|
|
7
7
|
## A project app
|
|
8
8
|
|
|
@@ -97,6 +97,8 @@ Each component has its own page with its examples and its full API.
|
|
|
97
97
|
| Component | For |
|
|
98
98
|
| --- | --- |
|
|
99
99
|
| `[AppBar](appbar.md)` | The bar at the top of an application. |
|
|
100
|
+
| `[MenuBar and ContextMenu](menus.md)` | The menus of an application and the menu of an element, with shortcuts, check items and access keys. |
|
|
101
|
+
| `[Toolbar](toolbar.md)` | A row of commands that moves what does not fit into a menu. |
|
|
100
102
|
| `[BottomNavigation](bottomnavigation.md)` | The main places of an application at the bottom of a phone screen. |
|
|
101
103
|
| `[Tabs](tabs.md)` | Views of the same thing, one at a time. |
|
|
102
104
|
| `[Breadcrumb](breadcrumb.md)` | Where the reader is in a hierarchy. |
|
|
@@ -120,6 +122,9 @@ Several components can do the same job; this table points to the one that reads
|
|
|
120
122
|
| `Split a long list` | [Pagination](pagination.md) |
|
|
121
123
|
| `Fold away sections` | [Accordion](accordion.md) |
|
|
122
124
|
| `Give an application its menu` | [Drawer](drawer.md), or [AppBar](appbar.md) with its menu button |
|
|
125
|
+
| `Offer the commands of a whole application` | [MenuBar](menus.md), or [RibbonMenu](ribbonmenu.md) for many commands in tabs |
|
|
126
|
+
| `Keep many commands in one bar at any width` | [Toolbar](toolbar.md) |
|
|
127
|
+
| `Act on what is under the pointer` | [ContextMenu](menus-context.md) |
|
|
123
128
|
| `Reach the main places on a phone` | [BottomNavigation](bottomnavigation.md) |
|
|
124
129
|
| `Offer actions on a phone` | [ActionSheet](actionsheet.md) |
|
|
125
130
|
| `Put content beside content, resizable` | [Splitter](splitter.md) |
|
package/docs/numberbox.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# NumberBox
|
|
2
2
|
|
|
3
|
-
> Editors · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Editors · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
A numeric input with arrow key support, PageUp and PageDown, spin buttons that repeat while held, min and max limits, exact decimal stepping, display formats such as currency and percent, and locale-aware input.
|
|
6
6
|
|
|
@@ -111,7 +111,7 @@ export default function SpinButtons() {
|
|
|
111
111
|
|
|
112
112
|
## Format and locale
|
|
113
113
|
|
|
114
|
-
Without focus, the value is displayed through `Intl.NumberFormat` using `format` and `locale` (the
|
|
114
|
+
Without focus, the value is displayed through `Intl.NumberFormat` using `format` and `locale` (the page `lang` by default). With focus, it switches to a plain number for editing. Input is parsed in the same locale: `1.234,5` in Turkish and `1,234.5` in English. A `.` also works as the decimal point where it cannot be a group separator. A percent is edited as displayed, so 0.125 is entered as 12.5.
|
|
115
115
|
|
|
116
116
|
```tsx
|
|
117
117
|
import { reactive } from '@motifx/core';
|
|
@@ -266,7 +266,7 @@ export default function Localization() {
|
|
|
266
266
|
| `spinLayout` | `Bind<SpinLayout>` | `'stacked'` | `stacked` shows arrows on top of each other, and `inline` shows − and + side by side. |
|
|
267
267
|
| `wheel` | `Bind<boolean>` | `false` | The mouse wheel changes the value while the field has focus. |
|
|
268
268
|
| `format` | `Bind<Intl.NumberFormatOptions>` | `{}` | The display format without focus: `{ style: 'currency', currency: 'TRY' }`, `{ style: 'percent' }`, `{ minimumFractionDigits: 2 }`… |
|
|
269
|
-
| `locale` | `Bind<string>` | `
|
|
269
|
+
| `locale` | `Bind<string>` | The page `lang` | The locale of the format and of the input. |
|
|
270
270
|
| `decimals` | `Bind<number \| null>` | `null` | The number of digits after the decimal point. Every value is rounded to this precision (half away from zero) regardless of its source, and displayed with exactly that many digits while the field is not being edited. |
|
|
271
271
|
| `clamp` | `Bind<boolean>` | `true` | Brings a value outside `min` and `max` into range when entered. `false` leaves it to the range validation. |
|
|
272
272
|
| `allowEmpty` | `Bind<boolean>` | `true` | An empty field is `null`. `false` replaces it with `min` (or 0) when the field loses focus. |
|
package/docs/otpinput.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OtpInput
|
|
2
2
|
|
|
3
|
-
> Editors · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Editors · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
A one-time code in a row of boxes. Typing, pasting a whole code, the code a phone offers from a message and screen readers work as in any text box, because the boxes are drawn over one real input.
|
|
6
6
|
|
package/docs/pagination.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pagination
|
|
2
2
|
|
|
3
|
-
> Navigation · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Navigation · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Navigates through pages of items, with page size options, the current position, navigation buttons and a button for each nearby page. It switches to a compact layout when it does not fit, and it looks and works like the DataGrid pager.
|
|
6
6
|
|
package/docs/popover.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Popover
|
|
2
2
|
|
|
3
|
-
> Feedback · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Feedback · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Displays content next to a related element, such as a title, a close button, a form or a card. It opens on click or on hover, follows its target, and points to it with an arrow where the design language includes one.
|
|
6
6
|
|
package/docs/progress.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ProgressBar and Spinner
|
|
2
2
|
|
|
3
|
-
> Feedback · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Feedback · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
ProgressBar shows how far an operation has progressed, as a line or a circle, or indicates activity when the progress is unknown. Spinner shows that the system is busy. It is a rotating ring that can stand alone or cover a panel while it loads, and it can wait for a delay so that quick operations do not cause a flash.
|
|
6
6
|
|
|
@@ -303,7 +303,7 @@ export default function Cover() {
|
|
|
303
303
|
|
|
304
304
|
## Localization
|
|
305
305
|
|
|
306
|
-
A bar or spinner without a label is named `uiLocale.strings.loading`. The percentage uses `locale`, which defaults to the
|
|
306
|
+
A bar or spinner without a label is named `uiLocale.strings.loading`. The percentage uses `locale`, which defaults to the page `lang`.
|
|
307
307
|
|
|
308
308
|
```tsx
|
|
309
309
|
import { reactive } from '@motifx/core';
|
|
@@ -372,7 +372,7 @@ export default function Localization() {
|
|
|
372
372
|
| `labelPosition` | `Bind<'top' \| 'bottom' \| 'side'>` | `'top'` (`'bottom'` for a circle) | `top` places the label and value above the bar, `bottom` places them below it, and `side` places the label before it and the value after it. |
|
|
373
373
|
| `showValue` | `Bind<boolean>` | `false` | Shows the percentage, rounded down to a whole number, or `valueText`. |
|
|
374
374
|
| `valueText` | `(value, fraction) => string` | — | The text shown and announced for a value (`3 of 12 files`). Because it is a function, it is stored as is and not bound. |
|
|
375
|
-
| `locale` | `Bind<string>` | `
|
|
375
|
+
| `locale` | `Bind<string>` | The page `lang` | The locale of the percentage. |
|
|
376
376
|
| `tone` | `Bind<ProgressTone>` | `'accent'` | `accent`, `neutral`, `success`, `caution`, `danger`. |
|
|
377
377
|
| `size` | `Bind<ControlSize>` | `'md'` | The thickness, and the size of a circle: `sm`, `md` or `lg`. |
|
|
378
378
|
| `stretch` | `Bind<boolean>` | `false` | Stretches to the full width of its container. |
|
package/docs/qrcode.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# QRCode
|
|
2
2
|
|
|
3
|
-
> Display · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Display · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
A QR code, drawn as vectors so that it stays sharp at any size. It has no dependencies, chooses the smallest version that holds the text, and can carry a logo.
|
|
6
6
|
|
package/docs/radiogroup.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RadioGroup
|
|
2
2
|
|
|
3
|
-
> Choice · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Choice · @motifx-community/ui 0.1.0-beta.10
|
|
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
|
|
package/docs/rating.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rating
|
|
2
2
|
|
|
3
|
-
> Editors · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Editors · @motifx-community/ui 0.1.0-beta.10
|
|
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.
|
|
3
|
+
> Navigation · @motifx-community/ui 0.1.0-beta.10
|
|
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
|
|
package/docs/ribbonmenu-api.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RibbonMenu: Commands
|
|
2
2
|
|
|
3
|
-
> RibbonMenu · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> RibbonMenu · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RibbonMenu: Customization
|
|
2
2
|
|
|
3
|
-
> RibbonMenu · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> RibbonMenu · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RibbonMenu: Showing and keys
|
|
2
2
|
|
|
3
|
-
> RibbonMenu · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> RibbonMenu · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RibbonMenu: Layouts and room
|
|
2
2
|
|
|
3
|
-
> RibbonMenu · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> RibbonMenu · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RibbonMenu: Programmatic changes
|
|
2
2
|
|
|
3
|
-
> RibbonMenu · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> RibbonMenu · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
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
6
|
|
package/docs/ribbonmenu.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RibbonMenu
|
|
2
2
|
|
|
3
|
-
> RibbonMenu · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> RibbonMenu · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
The commands of an application in tabs, each tab in named groups of large, medium and small commands. It adapts to the room it has, can show only its tabs or hide itself, and lets users arrange it to their liking. The menu holds nothing of its own: the tabs, the groups and the commands are given by the application.
|
|
6
6
|
|
package/docs/scheduler-agenda.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: Big data
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Handles thousands of resources and appointments. The scheduler renders only what is visible, and recalculates the layout only for what has changed.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: Editing
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Users can add, move, resize, copy and delete appointments with the pointer and the keyboard, and you can do the same programmatically. Every change raises its event first, can wait for a server, and is reverted if saving fails.
|
|
6
6
|
|
package/docs/scheduler-form.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: The appointment form
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Configure the appointment form without handling events. You can choose its fields and their order, arrange them in groups and tabs, use custom editors, add validation per field, and show or lock fields for specific appointments. You can also replace the form with your own.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: iCalendar and print
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Exports appointments to an iCalendar file (RFC 5545) and imports them back, for use with other calendar applications. The scheduler can also be printed.
|
|
6
6
|
|
package/docs/scheduler-mobile.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: Tablet and phone
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
On tablets and phones, the scheduler keeps its appointments, views and date, and changes how it presents them. On a phone, it shows the agenda, a compact toolbar and bottom sheets. Touch gestures can lift and resize appointments, swipe between days, and pinch to zoom.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: Recurrence and time zones
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Recurring appointments based on RFC 5545 rules, with exceptions and individually edited occurrences, a prompt that asks what a change should apply to, a recurrence editor, and time zone support that handles daylight saving time.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: Resources and groups
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Resources such as rooms, people and equipment can color appointments, divide columns into groups (nested or under each date), and define when each resource is available and when time is blocked.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Scheduler: Timeline
|
|
2
2
|
|
|
3
|
-
> Scheduler · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Scheduler · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Displays one row per resource, with time running along the row, for a day, a week, a work week or a month. Appointments at the same time stack within a row, and the row grows to fit them.
|
|
6
6
|
|