@nanahoshi/mona-ui 0.27.0 → 0.27.2
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/docs/api/auto-complete.md +67 -0
- package/docs/api/avatar.md +31 -0
- package/docs/api/breadcrumb.md +74 -0
- package/docs/api/button-group.md +71 -0
- package/docs/api/button.md +84 -0
- package/docs/api/calendar.md +123 -0
- package/docs/api/card.md +97 -0
- package/docs/api/chart.md +4380 -0
- package/docs/api/check-box.md +70 -0
- package/docs/api/chip.md +55 -0
- package/docs/api/circular-progress-bar.md +71 -0
- package/docs/api/collapsible.md +71 -0
- package/docs/api/color-gradient.md +54 -0
- package/docs/api/color-palette.md +52 -0
- package/docs/api/color-picker.md +89 -0
- package/docs/api/combo-box.md +69 -0
- package/docs/api/command.md +282 -0
- package/docs/api/common.md +599 -0
- package/docs/api/contextmenu.md +239 -0
- package/docs/api/date-input.md +119 -0
- package/docs/api/date-picker.md +67 -0
- package/docs/api/datetime-picker.md +72 -0
- package/docs/api/dialog.md +291 -0
- package/docs/api/dropdown-button.md +248 -0
- package/docs/api/dropdown-list.md +72 -0
- package/docs/api/dropdowns.md +172 -0
- package/docs/api/editor.md +117 -0
- package/docs/api/expansion-panel.md +85 -0
- package/docs/api/fieldset.md +33 -0
- package/docs/api/filter.md +116 -0
- package/docs/api/grid.md +1445 -0
- package/docs/api/i18n.md +1699 -0
- package/docs/api/label.md +58 -0
- package/docs/api/list-box.md +301 -0
- package/docs/api/list-view.md +294 -0
- package/docs/api/list.md +119 -0
- package/docs/api/locales.md +134 -0
- package/docs/api/menubar.md +275 -0
- package/docs/api/multi-select.md +92 -0
- package/docs/api/notification.md +164 -0
- package/docs/api/numeric-text-box.md +130 -0
- package/docs/api/otp-input.md +100 -0
- package/docs/api/pager.md +371 -0
- package/docs/api/placeholder.md +18 -0
- package/docs/api/popover.md +170 -0
- package/docs/api/popup-menu.md +328 -0
- package/docs/api/popup.md +299 -0
- package/docs/api/progress-bar.md +79 -0
- package/docs/api/query.md +367 -0
- package/docs/api/radio-button.md +113 -0
- package/docs/api/rating.md +187 -0
- package/docs/api/scroll-view.md +93 -0
- package/docs/api/segmented.md +114 -0
- package/docs/api/sheet.md +65 -0
- package/docs/api/sidebar.md +583 -0
- package/docs/api/skeleton.md +26 -0
- package/docs/api/slider.md +173 -0
- package/docs/api/spinner.md +132 -0
- package/docs/api/split-button.md +261 -0
- package/docs/api/splitter.md +57 -0
- package/docs/api/stepper.md +148 -0
- package/docs/api/switch.md +78 -0
- package/docs/api/tabs.md +139 -0
- package/docs/api/text-area.md +20 -0
- package/docs/api/text-box.md +106 -0
- package/docs/api/theme.md +627 -0
- package/docs/api/time-picker.md +69 -0
- package/docs/api/time-selector.md +54 -0
- package/docs/api/tooltip.md +112 -0
- package/docs/api/tree-view.md +631 -0
- package/docs/api/window.md +245 -0
- package/docs/auto-complete.md +28 -329
- package/docs/avatar.md +4 -24
- package/docs/breadcrumb.md +10 -65
- package/docs/button-group.md +7 -60
- package/docs/button.md +8 -67
- package/docs/calendar.md +16 -121
- package/docs/card.md +16 -79
- package/docs/chart-bar.md +16 -234
- package/docs/chart-financial.md +10 -121
- package/docs/chart-funnel.md +13 -176
- package/docs/chart-heatmap.md +15 -131
- package/docs/chart-line-area.md +12 -137
- package/docs/chart-pie.md +17 -221
- package/docs/chart-radar.md +13 -129
- package/docs/chart-radial.md +13 -211
- package/docs/chart-scatter.md +6 -74
- package/docs/chart-treemap.md +14 -196
- package/docs/chart.md +154 -1892
- package/docs/checkbox.md +5 -61
- package/docs/chip.md +7 -42
- package/docs/circular-progress-bar.md +9 -61
- package/docs/collapsible.md +5 -87
- package/docs/color-gradient.md +8 -81
- package/docs/color-palette.md +7 -69
- package/docs/color-picker.md +9 -105
- package/docs/combo-box.md +28 -331
- package/docs/command.md +25 -236
- package/docs/contextmenu.md +15 -140
- package/docs/date-picker.md +7 -110
- package/docs/datetime-picker.md +7 -129
- package/docs/decimal-textbox.md +6 -69
- package/docs/dialog.md +23 -263
- package/docs/dropdown-button.md +15 -146
- package/docs/dropdown-list.md +29 -332
- package/docs/editor.md +8 -164
- package/docs/expansion-panel.md +7 -69
- package/docs/fieldset.md +5 -24
- package/docs/grid-columns.md +12 -92
- package/docs/grid-editing.md +29 -291
- package/docs/grid-grouping.md +11 -50
- package/docs/grid-rows.md +10 -74
- package/docs/grid-selection.md +7 -36
- package/docs/grid-server.md +8 -293
- package/docs/grid-sorting-filtering.md +10 -333
- package/docs/grid-state-export.md +17 -228
- package/docs/grid.md +23 -216
- package/docs/input.md +7 -19
- package/docs/label.md +8 -39
- package/docs/list-box.md +21 -253
- package/docs/list-view.md +25 -232
- package/docs/menubar.md +21 -167
- package/docs/multi-select.md +31 -350
- package/docs/notification.md +17 -116
- package/docs/numeric-textbox.md +9 -78
- package/docs/otp-input.md +9 -95
- package/docs/pager.md +19 -239
- package/docs/placeholder.md +5 -18
- package/docs/popover.md +13 -123
- package/docs/popup-menu.md +22 -243
- package/docs/popup.md +24 -248
- package/docs/progress-bar.md +10 -75
- package/docs/radio-button.md +8 -96
- package/docs/range-slider.md +9 -82
- package/docs/rating.md +15 -163
- package/docs/scroll-view.md +9 -86
- package/docs/segmented.md +8 -90
- package/docs/sheet.md +10 -74
- package/docs/sidebar-menus.md +413 -0
- package/docs/sidebar-state.md +401 -0
- package/docs/sidebar.md +32 -876
- package/docs/skeleton.md +5 -26
- package/docs/slider.md +9 -97
- package/docs/spinner.md +15 -95
- package/docs/split-button.md +21 -166
- package/docs/splitter.md +9 -56
- package/docs/stepper.md +13 -127
- package/docs/switch.md +8 -58
- package/docs/tabs.md +13 -111
- package/docs/textarea.md +4 -13
- package/docs/textbox.md +10 -77
- package/docs/time-picker.md +7 -112
- package/docs/tooltip-directive.md +12 -96
- package/docs/tooltip.md +12 -96
- package/docs/tree-view.md +42 -495
- package/docs/window.md +19 -230
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +3 -0
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -0
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +9 -0
- package/llms.txt +76 -0
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-collapsible.d.ts +2 -0
- package/types/nanahoshi-mona-ui-common.d.ts +6 -0
- package/types/nanahoshi-mona-ui-date-input.d.ts +18 -1
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
package/docs/grid.md
CHANGED
|
@@ -283,224 +283,31 @@ Grid cells use a roving `tabindex`: the cell that last had focus has `tabindex="
|
|
|
283
283
|
|
|
284
284
|
## API
|
|
285
285
|
|
|
286
|
-
Everything below is imported from `@nanahoshi/mona-ui/grid`.
|
|
287
|
-
|
|
288
|
-
### `GridColumnComponent`
|
|
289
|
-
|
|
290
|
-
**Selector:** `mona-grid-column`
|
|
291
|
-
|
|
292
|
-
#### Inputs
|
|
293
|
-
|
|
294
|
-
| Name | Type | Default | Description |
|
|
295
|
-
| --- | --- | --- | --- |
|
|
296
|
-
| `aggregate` | `AggregateFunction \| null` | `null` | The aggregate shown in the grid footer for this column. |
|
|
297
|
-
| `editable` | `boolean \| null` | `null` | Whether this column is editable when the grid is in edit mode. Left unset, every column is editable except the one whose `field` is the grid's `rowKey`. |
|
|
298
|
-
| `field` | `string` | `""` | The field name of the data property to display in this column. |
|
|
299
|
-
| `filterable` | `boolean` | `true` | Whether this column can be filtered when grid filtering is enabled. Has no effect if filtering is disabled on the grid. |
|
|
300
|
-
| `format` | `ColumnFormat \| null` | — | Formats the displayed cell value. String formats apply to date columns and their date filters; formatter functions replace the cell text. |
|
|
301
|
-
| `hidden` | `boolean` | `false` | Whether this column is hidden from the rendered grid. |
|
|
302
|
-
| `locked` | `boolean` | `false` | Whether this column remains fixed while the grid scrolls horizontally. |
|
|
303
|
-
| `lockedPosition` | `GridColumnLockedPosition` | `"left"` | The side of the grid where this locked column is fixed. |
|
|
304
|
-
| `maxWidth` | `number \| null` | `null` | The maximum width of this column in pixels. |
|
|
305
|
-
| `minWidth` | `number` | `40` | The minimum width of this column in pixels. |
|
|
306
|
-
| `sortable` | `boolean` | `true` | Whether this column can be sorted through its header when grid sorting is enabled. Has no effect if sorting is disabled on the grid. |
|
|
307
|
-
| `sortComparator` | `ColumnSortComparator \| null` | `null` | Compares two values of this column when the user sorts it, returning a negative number, zero or a positive number. Without it, values sort by type (empty values first) and strings by the locale. |
|
|
308
|
-
| `stateKey` | `string \| null` | `null` | A stable key used to persist state for columns whose field is empty or unstable. |
|
|
309
|
-
| `title` | `string` | `""` | The title displayed in the column header. |
|
|
310
|
-
| `type` | `DataType` | `"string"` | The data type of the column. Determines the edit component and filter behavior. |
|
|
311
|
-
| `width` | `number \| null` | — | The fixed width of this column in pixels. If not set, the column width is calculated automatically. |
|
|
312
|
-
|
|
313
|
-
### `GridComponent`
|
|
314
|
-
|
|
315
|
-
**Selector:** `mona-grid`
|
|
316
|
-
**Type parameters:** `T`
|
|
317
|
-
|
|
318
|
-
#### Inputs
|
|
319
|
-
|
|
320
|
-
| Name | Type | Default | Description |
|
|
321
|
-
| --- | --- | --- | --- |
|
|
322
|
-
| `aria-label` | `string \| null` | `null` | The grid's accessible name, such as "Orders". Use it, or `aria-labelledby`. The grid moves the name to its `role="grid"` element, so the host keeps no `aria-label` attribute. |
|
|
323
|
-
| `aria-labelledby` | `string \| null` | `null` | The id of the element that names the grid, such as a heading above it. |
|
|
324
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
|
|
325
|
-
| `data` | `Iterable<T>` | `[]` | The row data to be displayed in the grid. |
|
|
326
|
-
| `expandedKeys` (two-way) | `unknown[]` | `[]` | Keys of the rows whose detail row is open: `rowKey` values, or the data items when the grid has no `rowKey`. Supports two-way binding; `expandedKeysChange` emits when the user opens or closes one. |
|
|
327
|
-
| `pageSize` (two-way) | `number` | — | The number of items to be displayed on a page. Values that aren't positive integers are ignored. A new size keeps the first row of the current page in view. Supports two-way binding. |
|
|
328
|
-
| `pageSizeValues` | `number[]` | `[]` | The page sizes that the user can select from. These values will be displayed in the page size dropdown. |
|
|
329
|
-
| `resizeMethod` | `ResizeMethod` | `"fitView"` | The method to be used to set initial column widths. It can be the following values: - `fitView`: The columns will be resized to fit the available width. - `auto`: The columns will be resized based on the content. - A number representing the width of the columns. All columns except the columns with a specified width will have the same width. |
|
|
330
|
-
| `responsivePager` | `boolean` | `true` | Whether the pager is responsive. If set to `true`, the pager will be displayed as a dropdown when the grid width gets smaller. |
|
|
331
|
-
| `rounded` | `"large" \| "medium" \| "none" \| "small"` | `"medium"` | The border radius of the grid. |
|
|
332
|
-
| `rowClass` | `GridRowClass<T> \| null` | `null` | Returns extra CSS classes for the data row that shows an item, merged onto the row's own classes via `tailwind-merge`. It runs again whenever the item's row is rebound. Group, group footer and detail rows are not affected. To dim a row, prefer a text style such as `text-muted-foreground` over `opacity`: locked cells stay opaque so scrolled cells pass beneath them, and opacity on the row or its cells would let those show through. |
|
|
333
|
-
| `rowKey` | `GridKeySelector<unknown> \| null` | `null` | Field name or selector used to derive a stable identity for each row. The resolved value must be unique within the grid data. |
|
|
334
|
-
| `skip` (two-way) | `number` | `0` | The number of rows before the current page, in client paging. Supports two-way binding. With `monaGridServerBinding`, the directive's `skip` sets the page and this model reports user changes. |
|
|
335
|
-
|
|
336
|
-
#### Outputs
|
|
337
|
-
|
|
338
|
-
| Name | Type | Description |
|
|
339
|
-
| --- | --- | --- |
|
|
340
|
-
| `expandedKeysChange` | `unknown[]` | Emitted when `expandedKeys` changes. |
|
|
341
|
-
| `pageChange` | `PageChangeEvent` | Emitted when the user changes the page or the page size, when the user's sort or filter moves a client-side grid back to the first page, and when the grid moves back to the last page because the data shrank. Not emitted for `skip` or `pageSize` values set from code. |
|
|
342
|
-
| `pageSizeChange` | `number` | Emitted when `pageSize` changes. |
|
|
343
|
-
| `skipChange` | `number` | Emitted when `skip` changes. |
|
|
344
|
-
|
|
345
|
-
### `GridCellTemplateDirective`
|
|
346
|
-
|
|
347
|
-
**Selector:** `ng-template[monaGridCellTemplate]`
|
|
348
|
-
|
|
349
|
-
### `GridColumnTitleTemplateDirective`
|
|
350
|
-
|
|
351
|
-
**Selector:** `[monaGridColumnTitleTemplate]`
|
|
352
|
-
|
|
353
|
-
### `GridContextMenuDirective`
|
|
354
|
-
|
|
355
|
-
**Selector:** `[monaGridContextMenu]`
|
|
356
|
-
|
|
357
|
-
### `GridHeaderTemplateDirective`
|
|
358
|
-
|
|
359
|
-
**Selector:** `ng-template[monaGridHeaderTemplate]`
|
|
360
|
-
|
|
361
|
-
### `GridNoDataTemplateDirective`
|
|
362
|
-
|
|
363
|
-
**Selector:** `ng-template[monaGridNoDataTemplate]`
|
|
364
|
-
|
|
365
|
-
### `GridToolbarTemplateDirective`
|
|
366
|
-
|
|
367
|
-
**Selector:** `ng-template[monaGridToolbarTemplate]`
|
|
368
|
-
|
|
369
|
-
### `Row`
|
|
370
|
-
|
|
371
|
-
A row of the grid, wrapping its data item.
|
|
372
|
-
|
|
373
|
-
#### Properties
|
|
286
|
+
Everything below is imported from `@nanahoshi/mona-ui/grid`. Each name links to its reference page, with every input, output, property and method.
|
|
374
287
|
|
|
375
|
-
| Name |
|
|
376
|
-
| --- | --- |
|
|
377
|
-
| `data` (read-only) | `Record<PropertyKey, unknown>` |
|
|
378
|
-
| `uid` (read-only) | `string` |
|
|
379
|
-
|
|
380
|
-
### Types
|
|
381
|
-
|
|
382
|
-
#### `GRID_DEFAULT_MESSAGES`
|
|
383
|
-
|
|
384
|
-
```typescript
|
|
385
|
-
const GRID_DEFAULT_MESSAGES: { all: string; apply: string; cancel: string; cancelNewRow: string; cancelRowEdit: (rowNumber: number) => string; clearFilter: (column: string) => string; collapseDetail: (rowNumber: number) => string; columnGrouped: (column: string) => string; columnMoved: (column: string, position: number) => string; columns: string; columnsSelected: (count: number) => string; commandColumnTitle: string; delete: string; deleteRowConfirmation: (rowNumber: number) => string; deleteRowTitle: string; details: string; dragColumnHeaderToGroup: string; edit: string; editRow: (rowNumber: number) => string; expandDetail: (rowNumber: number) => string; fieldValidationError: string; filterByColumn: (column: string) => string; filterByColumnFiltered: (column: string) => string; filterOperator: (column: string, operator: string) => string; filterPlaceholder: string; group: string; groupOptions: (column: string) => string; loading: string; modified: string; moveAsNext: string; moveAsPrevious: string; moveRow: string; noData: string; remove: string; removeRow: (rowNumber: number) => string; reorderRow: (rowNumber: number) => string; resizeColumn: (column: string) => string; rowReorder: string; rowReorderDisabled: string; rowReorderDisabledEditing: string; rowReorderDisabledFiltered: string; rowReorderDisabledGrouped: string; rowReorderDisabledServerBinding: string; rowReorderDisabledSingleRow: string; rowReorderDisabledSorted: string; rowReorderDisabledVirtualScroll: string; rowReorderHandleAriaLabel: (rowLabel: string, keyboardHint: string, disabledReason?: string) => string; rowReorderKeyboardHint: string; rowReorderMoved: (fromRowNumber: number, toPosition: number) => string; rowValidationError: string; save: string; saveNewRow: string; saveRow: (rowNumber: number) => string; selectAllRows: string; selectRow: (rowNumber: number) => string; sortOrder: (position: number) => string; toolbar: string; };
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
#### `GridToolbarContext`
|
|
389
|
-
|
|
390
|
-
The grid state and actions a toolbar template can use.
|
|
391
|
-
|
|
392
|
-
| Name | Type | Description |
|
|
288
|
+
| Name | Kind | Description |
|
|
393
289
|
| --- | --- | --- |
|
|
394
|
-
| `
|
|
395
|
-
| `
|
|
396
|
-
| `
|
|
397
|
-
| `
|
|
398
|
-
| `
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
|
403
|
-
| --- | --- |
|
|
404
|
-
| `cancelAdd(): boolean` | Closes the add row without saving. Returns whether it closed. |
|
|
405
|
-
| `cancelEdit(): boolean` | Ends the current cell or row edit without saving. Returns whether an edit was cancelled. |
|
|
406
|
-
| `saveAdd(): boolean` | Saves the add row. Returns whether it was saved. |
|
|
407
|
-
| `startAdd(): boolean` | Opens the add row. Returns whether it opened. |
|
|
408
|
-
|
|
409
|
-
#### `Column`
|
|
410
|
-
|
|
411
|
-
Set `locked` and `lockedPosition` on a `mona-grid-column` (or `mona-grid-command-column`) to keep it fixed while the
|
|
412
|
-
grid scrolls horizontally.
|
|
290
|
+
| [`GridColumnComponent`](api/grid.md#gridcolumncomponent) | Component | |
|
|
291
|
+
| [`GridComponent`](api/grid.md#gridcomponent) | Component | |
|
|
292
|
+
| [`GridCellTemplateDirective`](api/grid.md#gridcelltemplatedirective) | Directive | |
|
|
293
|
+
| [`GridColumnTitleTemplateDirective`](api/grid.md#gridcolumntitletemplatedirective) | Directive | |
|
|
294
|
+
| [`GridContextMenuDirective`](api/grid.md#gridcontextmenudirective) | Directive | |
|
|
295
|
+
| [`GridHeaderTemplateDirective`](api/grid.md#gridheadertemplatedirective) | Directive | |
|
|
296
|
+
| [`GridNoDataTemplateDirective`](api/grid.md#gridnodatatemplatedirective) | Directive | |
|
|
297
|
+
| [`GridToolbarTemplateDirective`](api/grid.md#gridtoolbartemplatedirective) | Directive | |
|
|
298
|
+
| [`Row`](api/grid.md#row) | Class | A row of the grid, wrapping its data item. |
|
|
413
299
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
| Name | Type | Description |
|
|
417
|
-
| --- | --- | --- |
|
|
418
|
-
| `calculatedWidth` (read-only) | `number \| null` | The column's currently rendered width. |
|
|
419
|
-
| `columnSortDirection` (read-only) | `SortDirection \| null` | The direction the grid is currently sorted by this column, or `null` when it isn't. |
|
|
420
|
-
| `filtered` (read-only) | `boolean` | Whether a filter is currently applied to this column. |
|
|
421
|
-
| `groupSortDirection` (read-only) | `SortDirection \| null` | The sort direction of the grid's grouping by this column, or `null` when the grid isn't grouped by it. |
|
|
422
|
-
| `hidden` (read-only) | `boolean` | Whether the column is hidden. |
|
|
423
|
-
| `sortIndex` (read-only) | `number \| null` | The column's one-based position among the grid's sorted columns, or `null` when it isn't sorted. |
|
|
424
|
-
|
|
425
|
-
#### `ColumnConfig`
|
|
300
|
+
### Types
|
|
426
301
|
|
|
427
|
-
|
|
|
302
|
+
| Type | Kind | Description |
|
|
428
303
|
| --- | --- | --- |
|
|
429
|
-
| `
|
|
430
|
-
| `
|
|
431
|
-
| `
|
|
432
|
-
| `
|
|
433
|
-
| `
|
|
434
|
-
| `
|
|
435
|
-
| `
|
|
436
|
-
| `
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
| `format` (read-only) | `ColumnFormat \| null` | How cell values are formatted for display, or `null` to show them as they are. |
|
|
440
|
-
| `groupFooterTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridGroupFooterTemplate`, which renders its cell in group footer rows, or `null`. |
|
|
441
|
-
| `headerTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridHeaderTemplate`, which replaces the whole header content and receives the column, or `null`. |
|
|
442
|
-
| `hidden` (read-only) | `boolean` | The column's `hidden` input as set. |
|
|
443
|
-
| `id` (read-only) | `string` | A unique id generated for the column. |
|
|
444
|
-
| `kind` (read-only) | `ColumnKind` | `"data"` for a `mona-grid-column`, `"command"` for a `mona-grid-command-column`. |
|
|
445
|
-
| `locked` (read-only) | `boolean` | Whether the column stays fixed while the grid scrolls horizontally. |
|
|
446
|
-
| `lockedPosition` (read-only) | `GridColumnLockedPosition` | The side of the grid a locked column is fixed to. |
|
|
447
|
-
| `maxWidth` (read-only) | `number \| null` | The column's maximum width in pixels, or `null` for no maximum. |
|
|
448
|
-
| `minWidth` (read-only) | `number \| null` | The column's minimum width in pixels, or `null` for no minimum. |
|
|
449
|
-
| `removeConfirmation` (read-only) | `boolean` | Whether the built-in remove command asks for confirmation before emitting `remove`. Only command columns set it. |
|
|
450
|
-
| `sortable` (read-only) | `boolean` | Whether the column can be sorted from its header when the grid's sorting is enabled. |
|
|
451
|
-
| `sortComparator?` (read-only) | `ColumnSortComparator \| null` | Compares values when the user sorts this column; without it values sort by type, strings by locale. |
|
|
452
|
-
| `stateKey` (read-only) | `string \| null` | The key the column's saved state is stored under, or `null` to use `field`. |
|
|
453
|
-
| `title` (read-only) | `string` | The text shown in the column header. |
|
|
454
|
-
| `titleTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridColumnTitleTemplate`, shown in the header in place of `title` when there is no header template, or `null`. |
|
|
455
|
-
| `width` (read-only) | `number \| null` | The column's configured width in pixels, or `null` to size it automatically. |
|
|
456
|
-
|
|
457
|
-
#### `GridToolbarTemplateContext`
|
|
458
|
-
|
|
459
|
-
Context of `monaGridToolbarTemplate`: the toolbar state, also as `$implicit`.
|
|
460
|
-
|
|
461
|
-
**Extends:** `GridToolbarContext`
|
|
462
|
-
|
|
463
|
-
| Name | Type |
|
|
464
|
-
| --- | --- |
|
|
465
|
-
| `$implicit` (read-only) | `GridToolbarContext` |
|
|
466
|
-
|
|
467
|
-
#### `ColumnFormat`
|
|
468
|
-
|
|
469
|
-
A date format string, for `date` columns, or a formatter function, for any column.
|
|
470
|
-
|
|
471
|
-
```typescript
|
|
472
|
-
type ColumnFormat = string | ColumnFormatFunction;
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
#### `ColumnFormatFunction`
|
|
476
|
-
|
|
477
|
-
Formats a cell's value for display. Written in method form so a formatter typed for the column's own
|
|
478
|
-
value (`(value: number) => string`) is accepted.
|
|
479
|
-
|
|
480
|
-
```typescript
|
|
481
|
-
type ColumnFormatFunction = { format(value: unknown, row: Record<PropertyKey, unknown>, column: Column): string; }["format"];
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
#### `ColumnKind`
|
|
485
|
-
|
|
486
|
-
```typescript
|
|
487
|
-
type ColumnKind = "command" | "data";
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
#### `DataType`
|
|
491
|
-
|
|
492
|
-
From `@nanahoshi/mona-ui/common`.
|
|
493
|
-
|
|
494
|
-
```typescript
|
|
495
|
-
type DataType = "string" | "number" | "date" | "boolean";
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
#### `SortDirection`
|
|
499
|
-
|
|
500
|
-
From `@nanahoshi/mona-ui/query`.
|
|
501
|
-
|
|
502
|
-
```typescript
|
|
503
|
-
type SortDirection = "asc" | "desc";
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
**Documented elsewhere:** [`AggregateFunction`](grid-grouping.md), [`ColumnSortComparator`](grid-sorting-filtering.md), [`GridColumnLockedPosition`](grid-columns.md), [`GridDataState`](grid-server.md), [`GridEditSession`](grid-editing.md), [`GridKeySelector`](grid-selection.md), [`GridRowClass`](grid-rows.md), [`PageChangeEvent`](pager.md), [`ResizeMethod`](grid-columns.md)
|
|
304
|
+
| [`GRID_DEFAULT_MESSAGES`](api/grid.md#grid-default-messages) | Constant | |
|
|
305
|
+
| [`GridToolbarContext`](api/grid.md#gridtoolbarcontext) | Interface | The grid state and actions a toolbar template can use. |
|
|
306
|
+
| [`Column`](api/grid.md#column) | Interface | Set `locked` and `lockedPosition` on a `mona-grid-column` (or `mona-grid-command-column`) to keep it fixed while the grid scrolls horizontally. |
|
|
307
|
+
| [`ColumnConfig`](api/grid.md#columnconfig) | Interface | |
|
|
308
|
+
| [`GridToolbarTemplateContext`](api/grid.md#gridtoolbartemplatecontext) | Interface | Context of `monaGridToolbarTemplate`: the toolbar state, also as `$implicit`. |
|
|
309
|
+
| [`ColumnFormat`](api/grid.md#columnformat) | Type alias | A date format string, for `date` columns, or a formatter function, for any column. |
|
|
310
|
+
| [`ColumnFormatFunction`](api/grid.md#columnformatfunction) | Type alias | Formats a cell's value for display. |
|
|
311
|
+
| [`ColumnKind`](api/grid.md#columnkind) | Type alias | |
|
|
312
|
+
|
|
313
|
+
**Related types:** [`AggregateFunction`](api/grid.md#aggregatefunction), [`ColumnSortComparator`](api/grid.md#columnsortcomparator), [`DataType`](api/common.md#datatype), [`GridColumnLockedPosition`](api/grid.md#gridcolumnlockedposition), [`GridDataState`](api/grid.md#griddatastate), [`GridEditSession`](api/grid.md#grideditsession), [`GridKeySelector`](api/grid.md#gridkeyselector), [`GridRowClass`](api/grid.md#gridrowclass), [`PageChangeEvent`](api/pager.md#pagechangeevent), [`ResizeMethod`](api/grid.md#resizemethod), [`SortDirection`](api/query.md#sortdirection)
|
package/docs/input.md
CHANGED
|
@@ -172,26 +172,14 @@ The focus ring appears only for keyboard-initiated focus, matching browser `focu
|
|
|
172
172
|
|
|
173
173
|
## API
|
|
174
174
|
|
|
175
|
-
Everything below is imported from `@nanahoshi/mona-ui/text-box`.
|
|
175
|
+
Everything below is imported from `@nanahoshi/mona-ui/text-box`. Each name links to its reference page, with every input, output, property and method.
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
#### Inputs
|
|
182
|
-
|
|
183
|
-
| Name | Type | Default | Description |
|
|
184
|
-
| --- | --- | --- | --- |
|
|
185
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
|
|
186
|
-
| `invalid` | `boolean` | `false` | Marks the input as invalid, triggering error border and ring styling. |
|
|
187
|
-
| `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
|
|
188
|
-
| `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
|
|
189
|
-
| `touched` | `boolean` | `false` | Marks the input as touched. Error styling is only shown when both `invalid` and `touched` are `true`. |
|
|
177
|
+
| Name | Kind |
|
|
178
|
+
| --- | --- |
|
|
179
|
+
| [`TextBoxDirective`](api/text-box.md#textboxdirective) | Directive |
|
|
190
180
|
|
|
191
181
|
### Types
|
|
192
182
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
type InputType = "email" | "password" | "search" | "tel" | "text" | "url";
|
|
197
|
-
```
|
|
183
|
+
| Type | Kind |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| [`InputType`](api/text-box.md#inputtype) | Type alias |
|
package/docs/label.md
CHANGED
|
@@ -294,47 +294,16 @@ Do not wrap `CheckBoxComponent` or `RadioButtonComponent` in `<mona-label>`, and
|
|
|
294
294
|
|
|
295
295
|
## API
|
|
296
296
|
|
|
297
|
-
Everything below is imported from `@nanahoshi/mona-ui/label`.
|
|
297
|
+
Everything below is imported from `@nanahoshi/mona-ui/label`. Each name links to its reference page, with every input, output, property and method.
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
#### Inputs
|
|
304
|
-
|
|
305
|
-
| Name | Type | Default | Description |
|
|
306
|
-
| --- | --- | --- | --- |
|
|
307
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the rendered `<label>` element via `tailwind-merge`. |
|
|
308
|
-
| `for` | `LabelTarget` | `undefined` | Associates the label with a native control ID or a target that exposes a public `focus()` method. String values are reflected as the native `for` attribute. Object targets receive focus when the label is clicked. |
|
|
309
|
-
| `optional` | `boolean` | `false` | Whether to display optional-field text next to the caption. |
|
|
310
|
-
| `optionalText` | `string` | `""` | Text displayed when `optional` is enabled. |
|
|
311
|
-
| `text` | `string` | `""` | Visible label caption text. |
|
|
312
|
-
|
|
313
|
-
### `LabelDirective`
|
|
314
|
-
|
|
315
|
-
**Selector:** `label[monaLabel]`
|
|
316
|
-
|
|
317
|
-
#### Inputs
|
|
318
|
-
|
|
319
|
-
| Name | Type | Default | Description |
|
|
320
|
-
| --- | --- | --- | --- |
|
|
321
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the native label element via `tailwind-merge`. |
|
|
322
|
-
| `for` | `LabelTarget` | `undefined` | Associates the label with a native control ID or a target that exposes a public `focus()` method. String values are reflected as the native `for` attribute. Object targets receive focus when the label is clicked. |
|
|
299
|
+
| Name | Kind |
|
|
300
|
+
| --- | --- |
|
|
301
|
+
| [`LabelComponent`](api/label.md#labelcomponent) | Component |
|
|
302
|
+
| [`LabelDirective`](api/label.md#labeldirective) | Directive |
|
|
323
303
|
|
|
324
304
|
### Types
|
|
325
305
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
**Methods**
|
|
329
|
-
|
|
330
|
-
| Signature | Description |
|
|
306
|
+
| Type | Kind |
|
|
331
307
|
| --- | --- |
|
|
332
|
-
| `
|
|
333
|
-
| `
|
|
334
|
-
| `setLabelledBy(id: string \| null): void` | Receives the id of the label's text, so the control can use it for `aria-labelledby`. |
|
|
335
|
-
|
|
336
|
-
#### `LabelTarget`
|
|
337
|
-
|
|
338
|
-
```typescript
|
|
339
|
-
type LabelTarget = string | LabelFocusable | null | undefined;
|
|
340
|
-
```
|
|
308
|
+
| [`LabelFocusable`](api/label.md#labelfocusable) | Interface |
|
|
309
|
+
| [`LabelTarget`](api/label.md#labeltarget) | Type alias |
|
package/docs/list-box.md
CHANGED
|
@@ -376,262 +376,30 @@ When connecting two list boxes, set a distinct `aria-label` on each so assistive
|
|
|
376
376
|
|
|
377
377
|
## API
|
|
378
378
|
|
|
379
|
-
Everything below is imported from `@nanahoshi/mona-ui/list-box`.
|
|
380
|
-
|
|
381
|
-
### `ListBoxComponent`
|
|
382
|
-
|
|
383
|
-
**Selector:** `mona-list-box`
|
|
384
|
-
**Type parameters:** `T = unknown`, `K = unknown`
|
|
385
|
-
|
|
386
|
-
#### Inputs
|
|
387
|
-
|
|
388
|
-
| Name | Type | Default | Description |
|
|
389
|
-
| --- | --- | --- | --- |
|
|
390
|
-
| `aria-label` | `string` | `""` | Accessible name for the list box's `listbox` element. Describe what the list represents, which matters in particular when connecting two list boxes: the toolbar's name and the transfer buttons' labels are built from it. |
|
|
391
|
-
| `aria-labelledby` | `string` | `""` | Id of the element that names the list box, as an alternative to `aria-label`. Without an `aria-label`, the toolbar's name and the transfer buttons' labels are built from that element's text. |
|
|
392
|
-
| `connectedList` | `ListBoxComponent<T, K> \| null` | `null` | The other list box to transfer items to and from using the toolbar actions. |
|
|
393
|
-
| `disabledBy` | `string \| Predicate<T> \| null \| undefined` | `""` | Property name or predicate that marks items as disabled. Disabled items can't be selected, and no action (including the "All" transfers) carries them. |
|
|
394
|
-
| `height` | `string \| number` | `"100%"` | Sets the height of the component. |
|
|
395
|
-
| `items` | `Iterable<T>` | `[]` | Collection of items to render. |
|
|
396
|
-
| `rounded` | `"large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
|
|
397
|
-
| `selectBy` | `ListKeySelector<T, K>` | `""` | Property name or accessor used to derive the key from a data item, used to identify selected items. |
|
|
398
|
-
| `selectedKeys` | `Iterable<K>` | `[]` | Keys of the currently selected items. |
|
|
399
|
-
| `selectionMode` | `SelectionMode` | `"single"` | Allows multiple items to be selected simultaneously when set to `"multiple"`. |
|
|
400
|
-
| `singleSelectionToggleable` | `boolean` | `true` | Allows an already-selected item to be deselected by clicking it again while `selectionMode` is `"single"`. Has no effect when `selectionMode` is `"multiple"`. Accepts the bare attribute form. |
|
|
401
|
-
| `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
|
|
402
|
-
| `textField` | `ListKeySelector<T, string>` | `""` | Property name or accessor used to derive the display text from a data item. |
|
|
403
|
-
| `toolbar` | `string \| boolean \| Partial<ToolbarOptions> \| null \| undefined` | `true` | Shows the action toolbar. Pass `false` to hide it entirely, or an options object to customize which actions are shown and where the toolbar is positioned. The transfer actions appear only with a `connectedList`; the move, clear and remove actions work on a list box of its own. Accepts the bare attribute form. |
|
|
404
|
-
| `toolbarAriaLabel` | `string` | `""` | Accessible name for the toolbar. By default it is built from the list box's name ("Available foods actions"). |
|
|
405
|
-
| `width` | `string \| number` | `"100%"` | Sets the width of the component. |
|
|
406
|
-
|
|
407
|
-
#### Outputs
|
|
408
|
-
|
|
409
|
-
| Name | Type | Description |
|
|
410
|
-
| --- | --- | --- |
|
|
411
|
-
| `actionClick` | `ListBoxActionEvent<T>` | Emitted when a toolbar action button is clicked, carrying the action's details. |
|
|
412
|
-
| `selectedKeysChange` | `K[]` | Emitted with the updated keys whenever the user changes the selection, including when an action (transfer, clear, remove) or a selection in the connected list box changes it. |
|
|
413
|
-
| `selectionChange` | `ListBoxSelectionEvent<T>` | Emitted with the selected and deselected items whenever the user changes the selection, including when an action (transfer, clear, remove) or a selection in the connected list box changes it. |
|
|
414
|
-
|
|
415
|
-
#### Properties
|
|
416
|
-
|
|
417
|
-
| Name | Type | Description |
|
|
418
|
-
| --- | --- | --- |
|
|
419
|
-
| `listBoxItems` (read-only) | `Signal<ImmutableList<T>>` | The items, as rendered. Read-only: change `items` to change them. |
|
|
420
|
-
| `selectedItems` (read-only) | `Signal<ImmutableSet<T>>` | The selected items, read-only. |
|
|
421
|
-
| `selectedItems$` (read-only) | `Observable<ImmutableSet<T>>` | **Deprecated.** Use the `selectedItems` signal or the `selectionChange` output. |
|
|
422
|
-
|
|
423
|
-
#### Methods
|
|
424
|
-
|
|
425
|
-
| Signature | Description |
|
|
426
|
-
| --- | --- |
|
|
427
|
-
| `clearSelections(): void` | Clears the selection and reports the change through `selectionChange` and `selectedKeysChange`. |
|
|
428
|
-
| `notifySelectionChange(): void` | **Deprecated.** `clearSelections()` and the actions report selection changes themselves. |
|
|
429
|
-
|
|
430
|
-
### `ListBoxItemTemplateDirective`
|
|
431
|
-
|
|
432
|
-
Template for each item of a list box. The data item is the template's implicit value (`let-item`). Bind the list
|
|
433
|
-
box's items to `monaListBoxItemTemplateOf` to type it; without it, the item is `any` in templates.
|
|
434
|
-
|
|
435
|
-
**Selector:** `ng-template[monaListBoxItemTemplate]`
|
|
436
|
-
**Type parameters:** `T = any`
|
|
437
|
-
|
|
438
|
-
#### Inputs
|
|
439
|
-
|
|
440
|
-
| Name | Type | Default | Description |
|
|
441
|
-
| --- | --- | --- | --- |
|
|
442
|
-
| `monaListBoxItemTemplateOf` | `Iterable<T> \| null \| undefined` | `null` | The list box's items, used only to type the template's item. Optional. |
|
|
443
|
-
|
|
444
|
-
#### Template context
|
|
445
|
-
|
|
446
|
-
| Name | Type | Description |
|
|
447
|
-
| --- | --- | --- |
|
|
448
|
-
| `$implicit` | `T` | The raw data item being rendered. |
|
|
449
|
-
|
|
450
|
-
### `ListBoxFooterTemplateDirective`
|
|
451
|
-
|
|
452
|
-
**Selector:** `ng-template[monaListBoxFooterTemplate]`
|
|
453
|
-
|
|
454
|
-
### `ListBoxHeaderTemplateDirective`
|
|
455
|
-
|
|
456
|
-
**Selector:** `ng-template[monaListBoxHeaderTemplate]`
|
|
457
|
-
|
|
458
|
-
### `ListBoxNoDataTemplateDirective`
|
|
459
|
-
|
|
460
|
-
**Selector:** `ng-template[monaListBoxNoDataTemplate]`
|
|
461
|
-
|
|
462
|
-
### `ListBoxClearEvent`
|
|
463
|
-
|
|
464
|
-
**Type parameters:** `T = any`
|
|
465
|
-
**Extends:** `PreventableEvent`
|
|
466
|
-
|
|
467
|
-
#### Properties
|
|
379
|
+
Everything below is imported from `@nanahoshi/mona-ui/list-box`. Each name links to its reference page, with every input, output, property and method.
|
|
468
380
|
|
|
469
|
-
| Name |
|
|
381
|
+
| Name | Kind | Description |
|
|
470
382
|
| --- | --- | --- |
|
|
471
|
-
| `
|
|
472
|
-
| `
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
| Name | Type | Description |
|
|
482
|
-
| --- | --- | --- |
|
|
483
|
-
| `action` (read-only) | `Extract<ToolbarAction, "moveDown" \| "moveUp">` | Discriminant matching the `ListBoxActionEvent` union. |
|
|
484
|
-
| `newIndex` (read-only) | `number` | For Move Up, the index above the first selected item; for Move Down, the index below the last one. |
|
|
485
|
-
| `oldIndex` (read-only) | `number` | The index of the first selected item (in list order) before the move. |
|
|
486
|
-
| `selectedIndices` (read-only) | `number[]` | Indices of all selected items before the move, ascending. |
|
|
487
|
-
| `selectedItems` (read-only) | `T[]` | The items that were selected when the move was requested. |
|
|
488
|
-
|
|
489
|
-
### `ListBoxRemoveEvent`
|
|
490
|
-
|
|
491
|
-
**Type parameters:** `T = any`
|
|
492
|
-
**Extends:** `PreventableEvent`
|
|
493
|
-
|
|
494
|
-
#### Properties
|
|
495
|
-
|
|
496
|
-
| Name | Type | Description |
|
|
497
|
-
| --- | --- | --- |
|
|
498
|
-
| `action` (read-only) | `Extract<ToolbarAction, "remove">` | Discriminant matching the `ListBoxActionEvent` union. |
|
|
499
|
-
| `selectedItems` (read-only) | `T[]` | The items that were selected when Remove was clicked. |
|
|
500
|
-
|
|
501
|
-
### `ListBoxTransferEvent`
|
|
502
|
-
|
|
503
|
-
**Type parameters:** `T = any`
|
|
504
|
-
**Extends:** `PreventableEvent`
|
|
505
|
-
|
|
506
|
-
#### Properties
|
|
507
|
-
|
|
508
|
-
| Name | Type | Description |
|
|
509
|
-
| --- | --- | --- |
|
|
510
|
-
| `action` (read-only) | `ListBoxTransferAction` | Discriminant matching the `ListBoxActionEvent` union. |
|
|
511
|
-
| `selectedItems` (read-only) | `T[]` | The items to transfer, in list order: the source's selection, or all of the source's items for the "All" variants. See Which list box's `actionClick` fires. |
|
|
383
|
+
| [`ListBoxComponent`](api/list-box.md#listboxcomponent) | Component | |
|
|
384
|
+
| [`ListBoxItemTemplateDirective`](api/list-box.md#listboxitemtemplatedirective) | Directive | Template for each item of a list box. |
|
|
385
|
+
| [`ListBoxFooterTemplateDirective`](api/list-box.md#listboxfootertemplatedirective) | Directive | |
|
|
386
|
+
| [`ListBoxHeaderTemplateDirective`](api/list-box.md#listboxheadertemplatedirective) | Directive | |
|
|
387
|
+
| [`ListBoxNoDataTemplateDirective`](api/list-box.md#listboxnodatatemplatedirective) | Directive | |
|
|
388
|
+
| [`ListBoxClearEvent`](api/list-box.md#listboxclearevent) | Class | |
|
|
389
|
+
| [`ListBoxMoveEvent`](api/list-box.md#listboxmoveevent) | Class | |
|
|
390
|
+
| [`ListBoxRemoveEvent`](api/list-box.md#listboxremoveevent) | Class | |
|
|
391
|
+
| [`ListBoxTransferEvent`](api/list-box.md#listboxtransferevent) | Class | |
|
|
512
392
|
|
|
513
393
|
### Types
|
|
514
394
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
```typescript
|
|
518
|
-
const LIST_BOX_DEFAULT_MESSAGES: MonaListBoxMessages;
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
#### `ListBoxItemTemplateContext`
|
|
522
|
-
|
|
523
|
-
The context of a `monaListBoxItemTemplate`: the data item, as `let-item`.
|
|
524
|
-
|
|
525
|
-
**Type parameters:** `T = unknown`
|
|
526
|
-
|
|
527
|
-
| Name | Type | Description |
|
|
395
|
+
| Type | Kind | Description |
|
|
528
396
|
| --- | --- | --- |
|
|
529
|
-
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
| `selectedItems` (read-only) | `T[]` | Items that are now selected (read-only). |
|
|
539
|
-
|
|
540
|
-
#### `ToolbarOptions`
|
|
541
|
-
|
|
542
|
-
| Name | Type | Description |
|
|
543
|
-
| --- | --- | --- |
|
|
544
|
-
| `actions` | `ToolbarAction[]` | Which toolbar buttons to show. They appear in a fixed order. |
|
|
545
|
-
| `position` | `Position` | Which side of the list the toolbar renders on; `"right"` and `"left"` are the inline end and start, so they swap in RTL. |
|
|
546
|
-
|
|
547
|
-
#### `ListBoxActionEvent`
|
|
548
|
-
|
|
549
|
-
```typescript
|
|
550
|
-
type ListBoxActionEvent<T = any> = ListBoxClearEvent<T> | ListBoxMoveEvent<T> | ListBoxRemoveEvent<T> | ListBoxTransferEvent<T>;
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
#### `ListBoxTransferAction`
|
|
554
|
-
|
|
555
|
-
The toolbar actions that move items between list boxes.
|
|
556
|
-
|
|
557
|
-
```typescript
|
|
558
|
-
type ListBoxTransferAction = Extract<ToolbarAction, "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo">;
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
#### `ToolbarAction`
|
|
562
|
-
|
|
563
|
-
```typescript
|
|
564
|
-
type ToolbarAction = "clear" | "moveDown" | "moveUp" | "remove" | "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo";
|
|
565
|
-
```
|
|
566
|
-
|
|
567
|
-
#### `ListKeySelector`
|
|
568
|
-
|
|
569
|
-
From `@nanahoshi/mona-ui/list`.
|
|
570
|
-
|
|
571
|
-
```typescript
|
|
572
|
-
type ListKeySelector<T, K = unknown> = string | Selector<T, K> | null;
|
|
573
|
-
```
|
|
574
|
-
|
|
575
|
-
#### `MonaListBoxMessages`
|
|
576
|
-
|
|
577
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
578
|
-
|
|
579
|
-
| Name | Type | Description |
|
|
580
|
-
| --- | --- | --- |
|
|
581
|
-
| `clearSelection` (read-only) | `string` | Label of the Clear Selection toolbar button. |
|
|
582
|
-
| `moveDown` (read-only) | `string` | Label of the Move Down toolbar button. |
|
|
583
|
-
| `moveUp` (read-only) | `string` | Label of the Move Up toolbar button. |
|
|
584
|
-
| `remove` (read-only) | `string` | Label of the Remove toolbar button. |
|
|
585
|
-
| `selectionCleared` (read-only) | `string` | Announced after Clear Selection. |
|
|
586
|
-
| `transferAllFrom` (read-only) | `string` | Label of Transfer All From when the connected list box has no accessible name. |
|
|
587
|
-
| `transferAllTo` (read-only) | `string` | Label of Transfer All To when the connected list box has no accessible name. |
|
|
588
|
-
| `transferFrom` (read-only) | `string` | Label of Transfer From when the connected list box has no accessible name. |
|
|
589
|
-
| `transferTo` (read-only) | `string` | Label of Transfer To when the connected list box has no accessible name. |
|
|
590
|
-
|
|
591
|
-
**Methods**
|
|
592
|
-
|
|
593
|
-
| Signature | Description |
|
|
594
|
-
| --- | --- |
|
|
595
|
-
| `itemsMoved(position: number, total: number): string` | Announced after Move Up or Move Down, with the new position of the first moved item ("Moved to position 2 of 5"). |
|
|
596
|
-
| `itemsRemoved(count: number): string` | Announced after Remove, with the number of items removed. |
|
|
597
|
-
| `itemsTransferred(count: number, list: string): string` | Announced after a transfer, with the number of items moved and the name of the list they moved to. |
|
|
598
|
-
| `itemsTransferredToOtherList(count: number): string` | Announced after a transfer to a list box that has no accessible name. |
|
|
599
|
-
| `toolbarLabel(list: string): string` | Accessible name of the toolbar, from the list box's name ("Available foods actions"). |
|
|
600
|
-
| `transferAllFromList(list: string): string` | Label of Transfer All From, naming the connected list box. |
|
|
601
|
-
| `transferAllToList(list: string): string` | Label of Transfer All To, naming the connected list box. |
|
|
602
|
-
| `transferFromList(list: string): string` | Label of Transfer From, naming the connected list box. |
|
|
603
|
-
| `transferToList(list: string): string` | Label of Transfer To, naming the connected list box. |
|
|
604
|
-
|
|
605
|
-
#### `Position`
|
|
606
|
-
|
|
607
|
-
From `@nanahoshi/mona-ui/common`.
|
|
608
|
-
|
|
609
|
-
```typescript
|
|
610
|
-
type Position = "top" | "right" | "bottom" | "left";
|
|
611
|
-
```
|
|
612
|
-
|
|
613
|
-
#### `PreventableEvent`
|
|
614
|
-
|
|
615
|
-
From `@nanahoshi/mona-ui/common`.
|
|
616
|
-
|
|
617
|
-
**Type parameters:** `E extends Event = Event`
|
|
618
|
-
|
|
619
|
-
| Name | Type | Description |
|
|
620
|
-
| --- | --- | --- |
|
|
621
|
-
| `originalEvent` (read-only) | `E \| undefined` | The DOM event that caused this one, when there is one. |
|
|
622
|
-
| `type` (read-only) | `string \| undefined` | A name for the kind of event, when the component that emits it sets one. |
|
|
623
|
-
|
|
624
|
-
**Methods**
|
|
625
|
-
|
|
626
|
-
| Signature | Description |
|
|
627
|
-
| --- | --- |
|
|
628
|
-
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
629
|
-
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
630
|
-
|
|
631
|
-
#### `SelectionMode`
|
|
632
|
-
|
|
633
|
-
From `@nanahoshi/mona-ui/common`.
|
|
634
|
-
|
|
635
|
-
```typescript
|
|
636
|
-
type SelectionMode = "single" | "multiple";
|
|
637
|
-
```
|
|
397
|
+
| [`LIST_BOX_DEFAULT_MESSAGES`](api/list-box.md#list-box-default-messages) | Constant | |
|
|
398
|
+
| [`ListBoxItemTemplateContext`](api/list-box.md#listboxitemtemplatecontext) | Interface | The context of a `monaListBoxItemTemplate`: the data item, as `let-item`. |
|
|
399
|
+
| [`ListBoxSelectionEvent`](api/list-box.md#listboxselectionevent) | Interface | |
|
|
400
|
+
| [`ToolbarOptions`](api/list-box.md#toolbaroptions) | Interface | |
|
|
401
|
+
| [`ListBoxActionEvent`](api/list-box.md#listboxactionevent) | Type alias | |
|
|
402
|
+
| [`ListBoxTransferAction`](api/list-box.md#listboxtransferaction) | Type alias | The toolbar actions that move items between list boxes. |
|
|
403
|
+
| [`ToolbarAction`](api/list-box.md#toolbaraction) | Type alias | |
|
|
404
|
+
|
|
405
|
+
**Related types:** [`ListKeySelector`](api/list.md#listkeyselector), [`MonaListBoxMessages`](api/i18n.md#monalistboxmessages), [`Position`](api/common.md#position), [`PreventableEvent`](api/common.md#preventableevent), [`SelectionMode`](api/common.md#selectionmode)
|