@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
package/docs/datagrid-editing.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DataGrid: Editing
|
|
2
2
|
|
|
3
|
-
> DataGrid · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> DataGrid · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
## Editing and save modes
|
|
6
6
|
|
|
@@ -66,6 +66,34 @@ export interface Order {
|
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
## Columns with several values
|
|
70
|
+
|
|
71
|
+
With `multiple: true`, a cell holds a list of values (an array) of the column's `type`: `list` choices, `lookup` keys, numbers or texts. It shows their texts joined the way the locale writes lists (“Red, Navy”) and is edited with a `TagBox`. A pick adds or removes a value and leaves the list open, and a text or number column takes typed texts as values. Enter on the empty input, Tab or leaving the cell keeps the values; Escape closes the list, then clears the typed text, then cancels the edit. An empty list is no value, so `required` asks for at least one.
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
/** A customer, as stored by a second sample service. */
|
|
75
|
+
export interface Customer {
|
|
76
|
+
id: number;
|
|
77
|
+
name: string;
|
|
78
|
+
city: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const FIRST = ['Ada', 'Grace', 'Alan', 'Cahit', 'Katherine', 'Edsger', 'Barbara', 'Donald', 'İlhan', 'Margaret', 'Feza', 'Ali Nesin'];
|
|
82
|
+
const LAST = ['Lovelace', 'Hopper', 'Turing', 'Arf', 'Johnson', 'Dijkstra', 'Liskov', 'Knuth', 'Koman', 'Hamilton', 'Gürsey', 'Yılmaz'];
|
|
83
|
+
const CITIES = ['Ankara', 'Antalya', 'Bursa', 'İstanbul', 'İzmir', 'Konya', 'Trabzon'];
|
|
84
|
+
|
|
85
|
+
/** `n` sample customers, the same ones every time. */
|
|
86
|
+
export function makeCustomers(n: number): Customer[] {
|
|
87
|
+
return Array.from({ length: n }, (_, i) => ({
|
|
88
|
+
id: i + 1,
|
|
89
|
+
name: `${FIRST[i % FIRST.length]} ${LAST[Math.floor(i / FIRST.length) % LAST.length]} ${Math.floor(i / (FIRST.length * LAST.length)) + 1}`,
|
|
90
|
+
city: CITIES[(i * 5) % CITIES.length],
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
A filter condition holds when one of the values passes it, and with `<>` when none of them does. The header filter lists the values one by one, a row counted once for each, and the search finds the text of any value. Rows sort and group by the joined texts, copying and exporting write them, and pasted text is split at the locale's separator. With an `ODataAdapter`, name the fields in its `collections` option so that their conditions are written with `any()`.
|
|
96
|
+
|
|
69
97
|
## Row actions
|
|
70
98
|
|
|
71
99
|
`actions` defines the buttons for each row, as a list or as a function of the row and its state (`isNew`, `isEditing`, `isDirty`, `isSaving`, `hasError`, `isRemoved`, `isSelected`). When a value read by the function changes, the row's buttons update. Built-in actions are referenced by name. Buttons that do not fit in the column move to the “more” menu, and those listed first stay visible. The column can be at the start or the end, pinned to its edge or scrolling with the rows.
|
|
@@ -399,6 +427,84 @@ export default function NewRows() {
|
|
|
399
427
|
}
|
|
400
428
|
```
|
|
401
429
|
|
|
430
|
+
`MultipleValues.tsx`
|
|
431
|
+
|
|
432
|
+
```tsx
|
|
433
|
+
import { DataGrid, type GridColumn } from '@motifx-community/ui';
|
|
434
|
+
import { makeCustomers } from './customers';
|
|
435
|
+
|
|
436
|
+
type Product = { id: number; name: string; colors: string[]; tags: string[]; sizes: number[]; buyers: number[] };
|
|
437
|
+
|
|
438
|
+
const COLORS: { value: string; label: string }[] = [
|
|
439
|
+
{ value: 'black', label: 'Black' },
|
|
440
|
+
{ value: 'white', label: 'White' },
|
|
441
|
+
{ value: 'red', label: 'Red' },
|
|
442
|
+
{ value: 'navy', label: 'Navy' },
|
|
443
|
+
{ value: 'olive', label: 'Olive' },
|
|
444
|
+
];
|
|
445
|
+
const TAGS = ['new', 'sale', 'organic', 'limited', 'bestseller'];
|
|
446
|
+
const NAMES = ['T-shirt', 'Hoodie', 'Jacket', 'Sneakers', 'Cap', 'Scarf', 'Jeans', 'Shirt', 'Socks', 'Coat'];
|
|
447
|
+
|
|
448
|
+
/** Products whose cells hold several values: colors from a list, free tags, sizes, and buyers from another source. */
|
|
449
|
+
export default function MultipleValues() {
|
|
450
|
+
const buyers = makeCustomers(40);
|
|
451
|
+
const products: Product[] = Array.from({ length: 60 }, (_, i) => ({
|
|
452
|
+
id: i + 1,
|
|
453
|
+
name: `${NAMES[i % NAMES.length]} ${Math.floor(i / NAMES.length) + 1}`,
|
|
454
|
+
colors: COLORS.filter((_, c) => (i + c) % 3 === 0).map((o) => o.value),
|
|
455
|
+
tags: TAGS.filter((_, t) => (i * 7 + t) % 4 === 0),
|
|
456
|
+
sizes: i % 5 === 0 ? [] : [36 + (i % 3) * 2, 42 + (i % 4) * 2],
|
|
457
|
+
// None, one or two buyers.
|
|
458
|
+
buyers: [((i * 7) % 40) + 1, ((i * 13) % 40) + 1].slice(0, i % 3),
|
|
459
|
+
}));
|
|
460
|
+
const columns: GridColumn<Product>[] = [
|
|
461
|
+
{ field: 'id', title: 'No', type: 'number', width: 70, editable: false },
|
|
462
|
+
{ field: 'name', title: 'Product', width: 140 },
|
|
463
|
+
{ field: 'colors', title: 'Colors', type: 'list', options: COLORS, multiple: true, width: 180, required: true },
|
|
464
|
+
{ field: 'tags', title: 'Tags', multiple: true, width: 180 },
|
|
465
|
+
{ field: 'sizes', title: 'Sizes', type: 'number', multiple: true, width: 120 },
|
|
466
|
+
{ field: 'buyers', title: 'Buyers', multiple: true, flex: 1, width: 240, lookup: { dataSource: buyers, valueField: 'id', textField: 'name' } },
|
|
467
|
+
];
|
|
468
|
+
|
|
469
|
+
return (
|
|
470
|
+
<DataGrid
|
|
471
|
+
style="block-size: 28rem"
|
|
472
|
+
rows={products}
|
|
473
|
+
rowKey="id"
|
|
474
|
+
columns={columns}
|
|
475
|
+
label="Products with several values in a cell"
|
|
476
|
+
locale="en"
|
|
477
|
+
saveMode="batch"
|
|
478
|
+
settings={{ editable: true, filterRow: true, headerFilter: true, searchPanel: true, filterDelay: 200 }}
|
|
479
|
+
/>
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
`customers.ts`
|
|
485
|
+
|
|
486
|
+
```tsx
|
|
487
|
+
/** A customer, as stored by a second sample service. */
|
|
488
|
+
export interface Customer {
|
|
489
|
+
id: number;
|
|
490
|
+
name: string;
|
|
491
|
+
city: string;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
const FIRST = ['Ada', 'Grace', 'Alan', 'Cahit', 'Katherine', 'Edsger', 'Barbara', 'Donald', 'İlhan', 'Margaret', 'Feza', 'Ali Nesin'];
|
|
495
|
+
const LAST = ['Lovelace', 'Hopper', 'Turing', 'Arf', 'Johnson', 'Dijkstra', 'Liskov', 'Knuth', 'Koman', 'Hamilton', 'Gürsey', 'Yılmaz'];
|
|
496
|
+
const CITIES = ['Ankara', 'Antalya', 'Bursa', 'İstanbul', 'İzmir', 'Konya', 'Trabzon'];
|
|
497
|
+
|
|
498
|
+
/** `n` sample customers, the same ones every time. */
|
|
499
|
+
export function makeCustomers(n: number): Customer[] {
|
|
500
|
+
return Array.from({ length: n }, (_, i) => ({
|
|
501
|
+
id: i + 1,
|
|
502
|
+
name: `${FIRST[i % FIRST.length]} ${LAST[Math.floor(i / FIRST.length) % LAST.length]} ${Math.floor(i / (FIRST.length * LAST.length)) + 1}`,
|
|
503
|
+
city: CITIES[(i * 5) % CITIES.length],
|
|
504
|
+
}));
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
402
508
|
`RowActions.tsx`
|
|
403
509
|
|
|
404
510
|
```tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DataGrid: Filtering and search
|
|
2
2
|
|
|
3
|
-
> DataGrid · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> DataGrid · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
## Filters
|
|
6
6
|
|
|
@@ -96,7 +96,7 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
|
|
|
96
96
|
|
|
97
97
|
## Ranges, dates and custom entries
|
|
98
98
|
|
|
99
|
-
A column's `headerFilterInterval` groups its header filter. A number column uses ranges of that size (“0 – 250”, “250 – 500”), and several sizes such as `[1000, 100]` create a tree. A date column uses a tree of years, months and days, down to the part it names (`'year'`, `'quarter'`, `'month'`, `'day'`, `'hour'`, `'minute'`, `'second'`), and `null` lists individual dates. Dates are a tree by default, down to the day (`headerFilterDateInterval`). The tree is the kit's `TreeView` with check boxes and “Select all”. A checked month is stored as `'2026/3'` and a year as `2026`, and each filters with `>=` its first moment and `<` the next one's, so a server can run it too. Counts are calculated in the browser from the column's distinct values, whether counted in memory, grouped by an adapter that supports grouping, or from `loadValues`.
|
|
99
|
+
A column's `headerFilterInterval` groups its header filter. A number column uses ranges of that size (“0 – 250”, “250 – 500”), and several sizes such as `[1000, 100]` create a tree. A date column uses a tree of years, months and days, down to the part it names (`'year'`, `'quarter'`, `'month'`, `'day'`, `'hour'`, `'minute'`, `'second'`), and `null` lists individual dates. Dates are a tree by default, down to the day (`headerFilterDateInterval`). The tree is the kit's `TreeView` with check boxes and “Select all”. A checked month is stored as `'2026/3'` and a year as `2026`, and each filters with `>=` its first moment and `<` the next one's, so a server can run it too. Counts are calculated in the browser from the column's distinct values, whether counted in memory, grouped by an adapter that supports grouping, or from `loadValues`. A `datetime` column's tree goes down to the hour by default, and its filter row compares to the minute; a `date` column's compares by the day.
|
|
100
100
|
|
|
101
101
|
`headerFilterItems` provides custom header filter entries, as `{ text, value }`, where a value is a value or a filter expression (`data.where('city', 'in', […])`). A function receives the other filters and `values()`, the entries it would list, so that you can add to them. `filterValues` and `filterType` (both can be tracked functions) set the contents of the header filter. `'exclude'` leaves those values out, so values added later appear. In the list, selecting every value and then deselecting some leaves those out in the same way.
|
|
102
102
|
|
|
@@ -418,6 +418,12 @@ import { columns, makeOrders } from './orders';
|
|
|
418
418
|
|
|
419
419
|
const COAST = ['Antalya', 'İstanbul', 'İzmir', 'Trabzon'];
|
|
420
420
|
|
|
421
|
+
/** An order with the moment it was placed: its day and a time of that day. */
|
|
422
|
+
type Placed = Order & { placed: string };
|
|
423
|
+
|
|
424
|
+
const pad = (n: number) => String(n).padStart(2, '0');
|
|
425
|
+
const withTimes = (orders: Order[]): Placed[] => orders.map((o) => ({ ...o, placed: `${o.date}T${pad(8 + ((o.id * 7) % 10))}:${pad((o.id * 13) % 60)}:00` }));
|
|
426
|
+
|
|
421
427
|
/** The order columns with header filters: amounts in ranges, dates in a tree, cities with custom entries, and excluded statuses. */
|
|
422
428
|
const intervalColumns: GridColumn<Order>[] = columns.map((c) => {
|
|
423
429
|
switch (c.field) {
|
|
@@ -444,6 +450,8 @@ const intervalColumns: GridColumn<Order>[] = columns.map((c) => {
|
|
|
444
450
|
return c;
|
|
445
451
|
}
|
|
446
452
|
});
|
|
453
|
+
// A date and time: shown with its time, its header filter down to the hour, its filter row to the minute.
|
|
454
|
+
intervalColumns.splice(intervalColumns.findIndex((c) => c.field === 'date') + 1, 0, { field: 'placed', title: 'Placed', type: 'datetime', width: 160, headerFilter: true, filterRow: true });
|
|
447
455
|
|
|
448
456
|
/** The header filter with ranges of amounts, a tree of dates, custom entries and excluded values. */
|
|
449
457
|
export default function HeaderFilterIntervals() {
|
|
@@ -460,7 +468,7 @@ export default function HeaderFilterIntervals() {
|
|
|
460
468
|
<DataGrid
|
|
461
469
|
class="dg-intervals"
|
|
462
470
|
style="block-size: 30rem"
|
|
463
|
-
rows={makeOrders(300)}
|
|
471
|
+
rows={withTimes(makeOrders(300))}
|
|
464
472
|
rowKey="id"
|
|
465
473
|
columns={intervalColumns}
|
|
466
474
|
label="Orders filtered by ranges and dates"
|
package/docs/datagrid-forms.md
CHANGED
package/docs/datagrid-layout.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DataGrid: Layout and events
|
|
2
2
|
|
|
3
|
-
> DataGrid · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> DataGrid · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
## Toolbar
|
|
6
6
|
|
|
@@ -151,7 +151,7 @@ export interface Order {
|
|
|
151
151
|
| `pageSizeSelector, allowedPageSizes` | `false`, `'auto'` | The page sizes in the pager, and the sizes it offers (numbers and `all`, where `auto` is half, once and twice the page size). |
|
|
152
152
|
| `pageKeys` | `'page'` | In paged mode, PageUp and PageDown move to the previous and next page, or move a screen of rows (`rows`). |
|
|
153
153
|
| `headerFilterPageSize, headerFilterRows` | `100`, `8` | The values the header filter loads per request, and the height of its list or tree in rows. |
|
|
154
|
-
| `headerFilterDateInterval` | `'day'` | The deepest level of the year → month → day tree in a date column's header filter. `null` lists every date. A column's `headerFilterInterval` takes precedence. |
|
|
154
|
+
| `headerFilterDateInterval` | `'day'` | The deepest level of the year → month → day tree in a date column's header filter. `null` lists every date. A column's `headerFilterInterval` takes precedence. A `datetime` column goes down to the hour at least. |
|
|
155
155
|
| `exportPageSize` | `1000` | The rows an export requests from a server per request. `exportCsv({ pageSize })` takes precedence. |
|
|
156
156
|
| `trueTexts, falseTexts` | `['true', '1', 'x', '✓', '✔']`, `['false', '0', '']` | Pasted text read as yes and as no in a yes/no column, in addition to the `yes` and `no` strings. A column can set its own values. |
|
|
157
157
|
| `editKeys, clearKeys` | `['Enter', 'F2']`, `['Delete']` | The keys that open the active cell's editor, and the keys that clear it (`KeyboardEvent.key` values). |
|
package/docs/datagrid-lookups.md
CHANGED
package/docs/datagrid.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DataGrid
|
|
2
2
|
|
|
3
|
-
> DataGrid · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> DataGrid · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
A grid for data entry and large data sets. Rows can be in memory or come from any data layer adapter, and can be displayed in a virtual list or in pages. It supports sorting, column layout, editing with kit editors, new rows with Tab navigation, three save modes, row actions, selection, filters, a search panel, grouping, summaries, a toolbar, lookup columns from other services, copy and paste, export, and a persistent layout. Every feature can be disabled for the grid or for a single column.
|
|
6
6
|
|
package/docs/datebox.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DateBox
|
|
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
|
An input for a date, a time or both. Users can type through a mask in the locale's order, or pick from a calendar and a list of times. `min`, `max` and `disabledDates` apply to both methods.
|
|
6
6
|
|
package/docs/daterangebox.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DateRangeBox
|
|
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 single field for a start date and an end date. Users can type through two masks, or pick from two side-by-side months and a list of presets, within the allowed dates and range length. The value is a `[start, end]` pair.
|
|
6
6
|
|
package/docs/display.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Display
|
|
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
|
Display components present content: people, counts and labels, cards, pictures, tiles, events in time, codes to scan, and placeholders while content loads.
|
|
6
6
|
|
package/docs/draggable.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Draggable and DropTarget
|
|
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
|
Makes any content movable with the pointer, touch or the arrow keys, optionally along one axis, inside a boundary, by a handle or as a copy. `DropTarget` defines areas that accept it. To reorder items in a list, see [Sortable](sortable.md).
|
|
6
6
|
|
package/docs/drawer.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Drawer
|
|
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 panel that slides in from an edge of the page or a container, either over the content or pushing it aside. Users can swipe it in from the edge and back out, and Escape, the scrim and the browser's back action close it.
|
|
6
6
|
|
package/docs/dropdown.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DropDown
|
|
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
|
Selects one item from a list. The field shows the selected item, and the list opens below it on click or from the keyboard. The list can be searched, grouped and customized, and it stays fast with thousands of items.
|
|
6
6
|
|
package/docs/editors.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Editors
|
|
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
|
Editors take values: text, numbers, dates and times, ranges, colors, ratings, codes, files and signatures. They share one field model, so a label, help text, validation and binding work the same in all of them.
|
|
6
6
|
|
|
@@ -119,6 +119,7 @@ Each component has its own page with its examples and its full API.
|
|
|
119
119
|
| `[Rating](rating.md)` | A score in stars or other marks. |
|
|
120
120
|
| `[ValidationSummary](validationsummary.md)` | The invalid fields of a group, with links to them. |
|
|
121
121
|
| `[FileUploader](fileuploader.md)` | Files dropped or chosen, with limits, progress and uploading in chunks. |
|
|
122
|
+
| `[ShortcutEditor](shortcuteditor.md)` | The app’s keyboard shortcuts, for the user to assign other keys. |
|
|
122
123
|
|
|
123
124
|
## Choosing a component
|
|
124
125
|
|
|
@@ -135,6 +136,7 @@ Several components can do the same job; this table points to the one that reads
|
|
|
135
136
|
| `Show a month all the time` | [Calendar](calendar.md) |
|
|
136
137
|
| `Take a code sent by message` | [OtpInput](otpinput.md) |
|
|
137
138
|
| `Take files` | [FileUploader](fileuploader.md) |
|
|
139
|
+
| `Let the user change keyboard shortcuts` | [ShortcutEditor](shortcuteditor.md) |
|
|
138
140
|
|
|
139
141
|
## What they share
|
|
140
142
|
|
package/docs/feedback.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Feedback
|
|
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
|
Feedback components tell the reader what is happening: how far a task has come, that something is loading, what a control does, and what has just happened.
|
|
6
6
|
|
package/docs/fileuploader.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FileUploader
|
|
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
|
Lets users select files with a button or drop them on the box. Files are listed with their size and status, and can upload automatically, on a button click or programmatically, with progress, cancel, retry and remove for each file. Files that exceed the limits are listed with the reason.
|
|
6
6
|
|
package/docs/filterbuilder.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FilterBuilder
|
|
2
2
|
|
|
3
|
-
> Data · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Data · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Lets users build a filter visually, using groups joined by And, Or, Not And or Not Or, and conditions made of a field, an operation and a value. Its value is a data layer filter expression, so it works directly with in-memory rows and every adapter. DataGrid opens it from the filter panel, and you can also use it on its own for reports or saved searches.
|
|
6
6
|
|
package/docs/formlayout.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FormLayout
|
|
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
|
Arranges the fields of a data object on a grid. Each field gets an editor, chosen by name or by the type of its value, with two-way binding to the object. Groups, column spans and buttons organize the layout, and submitting the form validates every field first.
|
|
6
6
|
|
package/docs/foundations.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Foundations
|
|
2
2
|
|
|
3
|
-
> Foundations · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Foundations · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
The foundations are what every control of the kit shares: the Control base with its properties, keyboard and focus, and the language of the texts and formats.
|
|
6
6
|
|
package/docs/gallery.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gallery
|
|
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
|
Displays a horizontal set of slides, one or several at a time. Users navigate with the side buttons, the indicator dots, swipe gestures or the arrow keys, and it can run as an automatic slideshow. A slide can be an image with a caption or any other content.
|
|
6
6
|
|
package/docs/gauge-base.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gauge: Base value
|
|
2
2
|
|
|
3
|
-
> Gauges · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Gauges · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
The fill starts at the start of the scale, or at a base value inside it. A scale with values on both sides of a target then fills from the target, either way.
|
|
6
6
|
|
package/docs/gauge-circular.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gauge: Circular
|
|
2
2
|
|
|
3
|
-
> Gauges · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Gauges · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
A circular gauge shows its value on an arc or a whole circle, with the value written in the middle. It reads best for one value whose scale the reader knows, such as a speed or a share.
|
|
6
6
|
|
package/docs/gauge-dashboards.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gauge: Dashboards
|
|
2
2
|
|
|
3
|
-
> Gauges · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Gauges · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Gauges of different kinds put together, all following the same values. Each gauge keeps its own scale, so readers compare values by their meaning, not by size alone.
|
|
6
6
|
|
package/docs/gauge-linear.md
CHANGED
package/docs/gauge-markers.md
CHANGED
package/docs/gauge-marks.md
CHANGED
package/docs/gauge-ranges.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gauge: Ranges
|
|
2
2
|
|
|
3
|
-
> Gauges · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Gauges · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Ranges give stretches of the scale a meaning, such as normal, high and critical. They show as a band beside the track, and the fill takes the color of the range its value is in.
|
|
6
6
|
|
package/docs/gauge-scales.md
CHANGED
package/docs/gauge.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gauge
|
|
2
2
|
|
|
3
|
-
> Gauges · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Gauges · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Shows a value against its scale, as an arc, a circle or a straight bar. Ranges give stretches of the scale a meaning, markers and marks point at values, and every part takes its look from the design language.
|
|
6
6
|
|
package/docs/home.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @motifx-community/ui
|
|
2
2
|
|
|
3
|
-
> Get started · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Get started · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Components for MotifJS: objects you create when you need them, show anywhere and dispose when you are done, drawn from the MotifJS design system's tokens.
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ The library includes more than fifty components built on a shared base. Each one
|
|
|
28
28
|
|
|
29
29
|
| Group | Components |
|
|
30
30
|
| --- | --- |
|
|
31
|
-
| Buttons and commands | [`Button`](button.md) (menu, split, toggle, busy), [`ButtonGroup`](buttongroup.md), [`Toolbar`](toolbar.md), [`SpeedDial`](speeddial.md), [`MenuBar`](menus.md) and [`ContextMenu`](menus.md) |
|
|
31
|
+
| Buttons and commands | [`Button`](button.md) (menu, split, toggle, busy), [`ButtonGroup`](buttongroup.md), [`Toolbar`](toolbar.md), [`SpeedDial`](speeddial.md), [`MenuBar`](menus.md) and [`ContextMenu`](menus-context.md) |
|
|
32
32
|
| Editors | [`TextBox`](textbox.md) (mask, validation), [`TextArea`](textarea.md), [`NumberBox`](numberbox.md), [`DateBox`](datebox.md), [`DateRangeBox`](daterangebox.md), [`Calendar`](calendar.md), [`ColorBox`](colorbox.md) and [`ColorPicker`](colorbox.md), [`Slider`](slider.md), [`Rating`](rating.md), [`FileUploader`](fileuploader.md), [`ValidationSummary`](validationsummary.md) |
|
|
33
33
|
| Choice | [`CheckBox`](checkbox.md), [`Switch`](switch.md), [`RadioGroup`](radiogroup.md), [`DropDown`](dropdown.md), [`ComboBox`](combobox.md) and [`Autocomplete`](combobox.md), [`Lookup`](lookup.md), [`TagBox`](tagbox.md), [`ListBox`](listbox.md) |
|
|
34
34
|
| Display and feedback | [`Badge`](badge.md), [`Avatar`](avatar.md) and [`AvatarGroup`](avatar.md), [`Chip`](chip.md) and [`ChipGroup`](chip.md), [`Card`](card.md), [`Gallery`](gallery.md), [`TileView`](tileview.md), [`Timeline`](timeline.md), [`Skeleton`](skeleton.md), [`ProgressBar`](progress.md) and [`Spinner`](progress.md), [`LoadPanel`](loadpanel.md), [`Tooltip`](tooltip.md), [`Popover`](popover.md), [`Toast`](toast.md) |
|
package/docs/keyboard.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Keyboard and focus
|
|
2
2
|
|
|
3
|
-
> Foundations · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Foundations · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
Every control follows the same rules for Tab order, the active control of a container, focus handling, `&File` access keys and application-wide shortcuts.
|
|
6
6
|
|
|
@@ -149,6 +149,8 @@ export default class Shortcut extends Component {
|
|
|
149
149
|
}
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
+
Commands defined once, with their keys, for menus, toolbars and ribbons, the list of every shortcut with its conflicts, and the keys the user gives are on [Commands and shortcuts](commands.md). [ShortcutEditor](shortcuteditor.md) lets the user assign other keys to any shortcut with a name.
|
|
153
|
+
|
|
152
154
|
## Focus never lands on <body>
|
|
153
155
|
|
|
154
156
|
When the focused part of a control is disabled, hidden, removed (a list row, a tree branch) or disposed, focus moves to the next usable element from that position in the same window, or to the previous one. Clicking an empty area still clears focus as usual, and route changes are left to the router.
|
|
@@ -177,8 +179,8 @@ export default function FocusGuard() {
|
|
|
177
179
|
|
|
178
180
|
| Member | Return value / type | Description |
|
|
179
181
|
| --- | --- | --- |
|
|
180
|
-
| `addShortcut(
|
|
181
|
-
| `control.addShortcut(
|
|
182
|
+
| `addShortcut(keys, handler, options?)` | `() => void` | Registers a shortcut and returns a function that removes it. `keys` is one set of keys or a list of them. `options.scope` limits it to a component, `options.within` further to parts of it (a component, a list of components, or a function that returns them, such as the tabs of a strip: shortcuts of different parts may share keys), `options.inEditable` also enables it in text fields, and `options.name` lets the user assign other keys ([ShortcutEditor](shortcuteditor.md)). |
|
|
183
|
+
| `control.addShortcut(keys, handler, options?)` | `() => void` | Registers a shortcut scoped to the control and removes it when the control is disposed. |
|
|
182
184
|
| `parseAccessKey(text)` | `{ text, key, index }` | Parses `&Text` for your own controls. Render the result with the `mx-access-key` class and call `setAccessKey(key)`. |
|
|
183
185
|
| `tabIndex` | prop / property | The order inside the container. The default is 0. |
|
|
184
186
|
| `activeControl / restoreFocus()` | FocusContainer | See the Control page. |
|
package/docs/language.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Language
|
|
2
2
|
|
|
3
|
-
> Foundations · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Foundations · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
`uiLocale` controls the strings that controls display, the locale used for dates and numbers, and the text direction. The kit has one `uiLocale`, and each language pack is loaded on demand.
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ export default function Switch() {
|
|
|
45
45
|
|
|
46
46
|
| Rule | Details |
|
|
47
47
|
| --- | --- |
|
|
48
|
-
| `Start` | The initial language
|
|
48
|
+
| `Start` | The initial language comes from the page's `<html lang>` attribute, or from the browser language if it is not set. Set `lang` before creating the first control. `uiLocale.ready` resolves once that language has loaded. |
|
|
49
49
|
| `Texts` | Every string a control displays on its own, such as a button name, a message or “No items”, comes from the active language pack. English is used for anything the pack does not include. |
|
|
50
50
|
| `Formats` | Dates, numbers, the first day of the week and the 12 or 24-hour clock follow `uiLocale.locale`. A control's own `locale` prop takes precedence for that control. |
|
|
51
51
|
| `Direction` | `uiLocale.dir` is `rtl` for Arabic, Hebrew, Persian, Urdu and similar languages. Controls lay themselves out based on `<html dir>`, which `@motifx-community/i18n` keeps in sync. |
|
package/docs/layout.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Layout
|
|
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
|
Container controls for arranging other controls: `Stack` (a row or column), `Grid` (rows and columns), `Panel` (a plain box that can scroll), `GroupBox` (a titled frame), `DockPanel` (children docked to its edges) and `SplitContainer` (two panes with a splitter). All of them are controls, so they can disable and hide their content, and they lay out children added at any time.
|
|
6
6
|
|
package/docs/listbox.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ListBox
|
|
2
2
|
|
|
3
|
-
> Data · @motifx-community/ui 0.1.0-beta.
|
|
3
|
+
> Data · @motifx-community/ui 0.1.0-beta.10
|
|
4
4
|
|
|
5
5
|
A list displayed directly on the page. Users select one or more items with the keyboard or pointer. Items can come from memory or a data source, can be searched and grouped, and long lists render only the visible rows.
|
|
6
6
|
|
package/docs/loadpanel.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# LoadPanel
|
|
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
|
A loading overlay for a container or the whole page. It includes a shade, a panel with the kit spinner and a message, and a Cancel button when the operation can be stopped. The content underneath is unavailable while it is shown, and focus returns afterward.
|
|
6
6
|
|
|
@@ -126,7 +126,7 @@ export default function Options() {
|
|
|
126
126
|
| Topic | Details |
|
|
127
127
|
| --- | --- |
|
|
128
128
|
| `Covering a container` | The panel is placed inside the container, above its content. The container gets `aria-busy`, and the content under the panel is inert, so it cannot be clicked or focused. |
|
|
129
|
-
| `Over the page` | Without a `target`, the panel covers the viewport and the rest of the page is inert.
|
|
129
|
+
| `Over the page` | Without a `target`, the panel covers the viewport and the rest of the page is inert. |
|
|
130
130
|
| `Focus` | Focus moves from the content underneath to the panel (to the Cancel button if there is one) and returns to its original position when the panel hides. |
|
|
131
131
|
| `Delay` | Quick operations show nothing. The panel appears after `delay`, and hiding it before then cancels it. |
|
|
132
132
|
| `Spinner.cover` | The kit spinner can cover a container with a single call (`Spinner.cover`). LoadPanel is the full component, with the panel, message, delay and button. |
|
package/docs/lookup.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lookup
|
|
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
|
Selects one row from a table-style list, typically from a data source searched on the server, such as a customer by company, contact and city. The field shows the text of the selected row, and everything else works as in DropDown.
|
|
6
6
|
|