@nanahoshi/mona-ui 0.27.1 → 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 +20 -155
- package/docs/sidebar-state.md +16 -134
- package/docs/sidebar.md +18 -218
- 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 +74 -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/combo-box.md
CHANGED
|
@@ -418,347 +418,44 @@ The control also renders a visually hidden live region that announces the highli
|
|
|
418
418
|
|
|
419
419
|
## API
|
|
420
420
|
|
|
421
|
-
Everything below is imported from `@nanahoshi/mona-ui/combo-box`,
|
|
422
|
-
|
|
423
|
-
### `ComboBoxComponent`
|
|
424
|
-
|
|
425
|
-
**Selector:** `mona-combo-box`
|
|
426
|
-
**Type parameters:** `TData = unknown`, `TValue = TData`
|
|
427
|
-
**Implements:** `FormValueControl<TValue \| null>`
|
|
428
|
-
|
|
429
|
-
#### Inputs
|
|
430
|
-
|
|
431
|
-
| Name | Type | Default | Description |
|
|
432
|
-
| --- | --- | --- | --- |
|
|
433
|
-
| `allowCustomValue` | `boolean` | `false` | Allows a custom value to be committed when it doesn't match any item in `data`. |
|
|
434
|
-
| `aria-describedby` | `string` | `""` | ID of an element that provides an extended description for the input. |
|
|
435
|
-
| `aria-label` | `string` | `""` | Accessible name for the input. Describe what the combo box represents. Prefer a visible label, linked through `inputId` or `aria-labelledby`; without any of them, browsers fall back to the `placeholder`. |
|
|
436
|
-
| `aria-labelledby` | `string` | `""` | ID of an external element that provides the accessible name for the input. |
|
|
437
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
|
|
438
|
-
| `data` | `Iterable<TData>` | `[]` | Collection of items to render. |
|
|
439
|
-
| `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
|
|
440
|
-
| `inputId` | `string` | `generated` | Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the combo box. A unique id is generated when it isn't set. |
|
|
441
|
-
| `invalid` | `boolean` | `false` | Marks the combo box as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
|
|
442
|
-
| `itemDisabled` | `DropdownFieldPredicateType<TData>` | `undefined` | A predicate function or the name of the field that determines whether an item is disabled. |
|
|
443
|
-
| `loading` | `boolean` | `false` | Shows a loading indicator, in place of the clear button, and marks the field busy. It doesn't block interaction: the field stays usable while data loads. |
|
|
444
|
-
| `placeholder` | `string` | `""` | Placeholder text shown when no value is selected or entered. |
|
|
445
|
-
| `popupClass` | `string` | `""` | Sets the class of the popup element. |
|
|
446
|
-
| `popupHeight` | `ListSizeInputType` | `null` | Maximum height of the popup, in pixels or as a CSS length. Shorter lists shrink to fit. When unset, the popup is at most 200 pixels tall. |
|
|
447
|
-
| `popupWidth` | `ListSizeInputType` | `null` | Sets the width of the popup element. |
|
|
448
|
-
| `readonly` | `boolean` | `false` | Prevents value changes while preserving the component's visual state. |
|
|
449
|
-
| `required` | `boolean` | `false` | Sets the required state of the combo box component. |
|
|
450
|
-
| `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
|
|
451
|
-
| `showClearButton` | `boolean` | `false` | Displays a button that resets the value to empty when an item is selected. |
|
|
452
|
-
| `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
|
|
453
|
-
| `textField` | `DropdownFieldSelectorType<TData, string>` | `undefined` | Property name or accessor used to derive the display text from a data item. If not set, the item itself is used as the text representation. |
|
|
454
|
-
| `touched` | `boolean` | `false` | Sets the touched state of the combo box. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
|
|
455
|
-
| `value` (two-way) | `TValue \| null` | `null` | Two-way bindable current selected value. Implements `FormValueControl<TValue \| null>`, enabling signal forms `[formField]` binding. Object mode returns the selected data item; primitive mode (see `valuePrimitive`) returns the value resolved through `valueField`. `null` represents no selection. |
|
|
456
|
-
| `valueField` | `DropdownFieldSelectorType<TData, unknown>` | `undefined` | Property name or accessor used to derive the value from a data item. It is used for stable item identity, matching externally supplied values, and primitive value projection when `valuePrimitive` is enabled. When omitted, the item itself is used as the value representation. Should resolve to a stable, unique scalar. |
|
|
457
|
-
| `valuePrimitive` | `boolean` | `false` | Determines whether the bound value contains complete data items or values extracted through `valueField`. When `false`, selecting an item writes the complete data item. When `true`, selecting an item writes the value resolved through `valueField`. |
|
|
458
|
-
|
|
459
|
-
#### Outputs
|
|
460
|
-
|
|
461
|
-
| Name | Type | Description |
|
|
462
|
-
| --- | --- | --- |
|
|
463
|
-
| `close` | `PopupCloseEvent<unknown>` | Emitted when the popup is about to close. This event is preventable. |
|
|
464
|
-
| `closed` | `void` | Emitted after the popup is closed. |
|
|
465
|
-
| `open` | `PreventableEvent<Event>` | Emitted when the popup is about to open. This event is preventable. |
|
|
466
|
-
| `opened` | `void` | Emitted after the popup is opened. |
|
|
467
|
-
| `touch` | `void` | Emitted when focus leaves the combo box. Moving between its input, clear button and popup doesn't count. The `FormField` directive listens to this to mark the field as touched. |
|
|
468
|
-
| `valueAdd` | `string` | Emitted with the entered text when the user presses Enter on text that matches no item, or leaves the field with it. Only emitted when `allowCustomValue` is true. |
|
|
469
|
-
| `valueChange` | `TValue \| null` | Emitted when `value` changes. |
|
|
470
|
-
|
|
471
|
-
#### Methods
|
|
421
|
+
Everything below is imported from `@nanahoshi/mona-ui/combo-box`, unless a table names another entry point. Each name links to its reference page, with every input, output, property and method.
|
|
472
422
|
|
|
473
|
-
|
|
|
423
|
+
| Name | Kind |
|
|
474
424
|
| --- | --- |
|
|
475
|
-
| `
|
|
476
|
-
|
|
477
|
-
### `DropdownFilterableDirective`
|
|
478
|
-
|
|
479
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
480
|
-
|
|
481
|
-
**Selector:** `mona-auto-complete[monaDropDownFilterable], mona-dropdown-list[monaDropDownFilterable], mona-combo-box[monaDropDownFilterable], mona-multi-select[monaDropDownFilterable]`
|
|
482
|
-
|
|
483
|
-
#### Inputs
|
|
484
|
-
|
|
485
|
-
| Name | Type | Default | Description |
|
|
486
|
-
| --- | --- | --- | --- |
|
|
487
|
-
| `filter` | `string` | `""` | Current filter text used to narrow the visible options. |
|
|
488
|
-
| `filterPlaceholder` | `string` | `""` | Placeholder text in the popup's filter row. Auto Complete has no filter row, since its own input is the filter, so it ignores this. |
|
|
489
|
-
| `monaDropDownFilterable` | `Partial<FilterableOptions> \| ""` | `""` | Filter operator, case sensitivity, and debounce delay. An empty string enables filtering with default settings (`operator: "contains"`, `caseSensitive: false`, `debounce: 0`); pass an object to override any field. |
|
|
490
|
-
|
|
491
|
-
#### Outputs
|
|
492
|
-
|
|
493
|
-
| Name | Type | Description |
|
|
494
|
-
| --- | --- | --- |
|
|
495
|
-
| `filterChange` | `FilterChangeEvent` | Emitted when the filter value changes. Cancelable. |
|
|
496
|
-
|
|
497
|
-
### `DropdownGroupableDirective`
|
|
498
|
-
|
|
499
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
500
|
-
|
|
501
|
-
**Selector:** `mona-auto-complete[monaDropDownGroupable], mona-combo-box[monaDropDownGroupable], mona-dropdown-list[monaDropDownGroupable], mona-multi-select[monaDropDownGroupable]`
|
|
502
|
-
**Type parameters:** `TData`
|
|
503
|
-
|
|
504
|
-
#### Inputs
|
|
505
|
-
|
|
506
|
-
| Name | Type | Default | Description |
|
|
507
|
-
| --- | --- | --- | --- |
|
|
508
|
-
| `groupBy` | `string \| Selector<TData, unknown> \| null \| undefined` | `""` | Property name, or accessor, used to derive an option's group. |
|
|
509
|
-
| `monaDropDownGroupable` | `GroupableOptions<TData, unknown> \| ""` | `""` | Group header order, and optional per-group item ordering. An empty string enables grouping with default settings (`headerOrder: "asc"`); pass an object to override any field. |
|
|
510
|
-
|
|
511
|
-
### `DropdownVirtualScrollDirective`
|
|
512
|
-
|
|
513
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
514
|
-
|
|
515
|
-
**Selector:** `mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll]`
|
|
516
|
-
|
|
517
|
-
#### Inputs
|
|
518
|
-
|
|
519
|
-
| Name | Type | Default | Description |
|
|
520
|
-
| --- | --- | --- | --- |
|
|
521
|
-
| `monaDropDownVirtualScroll` | `Partial<VirtualScrollOptions> \| ""` | `""` | Whether virtual scrolling is enabled and the pixel height of a single option row. An empty string enables virtual scrolling with default settings (`height: 28`); pass an object to override either field. |
|
|
522
|
-
|
|
523
|
-
### `DropdownDataHandlerDirective`
|
|
524
|
-
|
|
525
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
526
|
-
|
|
527
|
-
**Selector:** `[monaDropdownDataHandler]`
|
|
528
|
-
|
|
529
|
-
### `DropdownFooterTemplateDirective`
|
|
530
|
-
|
|
531
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
532
|
-
|
|
533
|
-
**Selector:** `ng-template[monaDropDownFooterTemplate], ng-template[monaAutoCompleteFooterTemplate], ng-template[monaDropDownListFooterTemplate], ng-template[monaDropDownTreeFooterTemplate], ng-template[monaComboBoxFooterTemplate], ng-template[monaMultiSelectFooterTemplate]`
|
|
534
|
-
|
|
535
|
-
### `DropdownGroupHeaderTemplateDirective`
|
|
536
|
-
|
|
537
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
538
|
-
|
|
539
|
-
**Selector:** `ng-template[monaDropDownGroupHeaderTemplate], ng-template[monaAutoCompleteGroupHeaderTemplate], ng-template[monaDropDownListGroupHeaderTemplate], ng-template[monaComboBoxGroupHeaderTemplate], ng-template[monaMultiSelectGroupHeaderTemplate]`
|
|
540
|
-
|
|
541
|
-
### `DropdownHeaderTemplateDirective`
|
|
542
|
-
|
|
543
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
544
|
-
|
|
545
|
-
**Selector:** `ng-template[monaDropDownHeaderTemplate], ng-template[monaAutoCompleteHeaderTemplate], ng-template[monaDropDownListHeaderTemplate], ng-template[monaDropDownTreeHeaderTemplate], ng-template[monaComboBoxHeaderTemplate], ng-template[monaMultiSelectHeaderTemplate]`
|
|
546
|
-
|
|
547
|
-
### `DropdownItemTemplateDirective`
|
|
425
|
+
| [`ComboBoxComponent`](api/combo-box.md#comboboxcomponent) | Component |
|
|
548
426
|
|
|
549
|
-
From `@nanahoshi/mona-ui/dropdowns
|
|
427
|
+
From `@nanahoshi/mona-ui/dropdowns`:
|
|
550
428
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
### `DropdownListPopupHandlerDirective`
|
|
554
|
-
|
|
555
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
556
|
-
|
|
557
|
-
**Selector:** `[monaDropdownListPopupHandler]`
|
|
558
|
-
|
|
559
|
-
### `DropdownLiveRegionDirective`
|
|
560
|
-
|
|
561
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
562
|
-
|
|
563
|
-
Announces how many results a dropdown shows after its list is filtered, or after its items change, while the
|
|
564
|
-
popup is open ("3 results available", "No results found").
|
|
565
|
-
|
|
566
|
-
The announcement goes through the CDK `LiveAnnouncer`, whose live region lives at the end of the document, so it
|
|
567
|
-
never becomes part of the combobox's content. The highlighted option isn't announced here:
|
|
568
|
-
`aria-activedescendant` already does that.
|
|
569
|
-
|
|
570
|
-
**Selector:** `[monaDropdownLiveRegion]`
|
|
571
|
-
|
|
572
|
-
### `DropdownNoDataTemplateDirective`
|
|
573
|
-
|
|
574
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
575
|
-
|
|
576
|
-
**Selector:** `ng-template[monaDropDownNoDataTemplate], ng-template[monaAutoCompleteNoDataTemplate], ng-template[monaDropDownListNoDataTemplate], ng-template[monaDropDownTreeNoDataTemplate], ng-template[monaComboBoxNoDataTemplate], ng-template[monaMultiSelectNoDataTemplate]`
|
|
577
|
-
|
|
578
|
-
### `DropdownPopupHandlerDirective`
|
|
579
|
-
|
|
580
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
581
|
-
|
|
582
|
-
**Selector:** `[monaDropdownPopupHandler]`
|
|
583
|
-
|
|
584
|
-
### `DropdownPrefixTemplateDirective`
|
|
585
|
-
|
|
586
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
587
|
-
|
|
588
|
-
**Selector:** `ng-template[monaDropdownPrefixTemplate]`
|
|
589
|
-
|
|
590
|
-
### `DropdownSuffixTemplateDirective`
|
|
591
|
-
|
|
592
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
593
|
-
|
|
594
|
-
**Selector:** `ng-template[monaDropdownSuffixTemplate]`
|
|
595
|
-
|
|
596
|
-
### `DropdownListService`
|
|
597
|
-
|
|
598
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
599
|
-
|
|
600
|
-
**Type parameters:** `TData = unknown`
|
|
601
|
-
|
|
602
|
-
#### Properties
|
|
603
|
-
|
|
604
|
-
| Name | Type |
|
|
429
|
+
| Name | Kind |
|
|
605
430
|
| --- | --- |
|
|
606
|
-
| `
|
|
431
|
+
| [`DropdownFilterableDirective`](api/dropdowns.md#dropdownfilterabledirective) | Directive |
|
|
432
|
+
| [`DropdownGroupableDirective`](api/dropdowns.md#dropdowngroupabledirective) | Directive |
|
|
433
|
+
| [`DropdownVirtualScrollDirective`](api/dropdowns.md#dropdownvirtualscrolldirective) | Directive |
|
|
434
|
+
| [`DropdownDataHandlerDirective`](api/dropdowns.md#dropdowndatahandlerdirective) | Directive |
|
|
435
|
+
| [`DropdownFooterTemplateDirective`](api/dropdowns.md#dropdownfootertemplatedirective) | Directive |
|
|
436
|
+
| [`DropdownGroupHeaderTemplateDirective`](api/dropdowns.md#dropdowngroupheadertemplatedirective) | Directive |
|
|
437
|
+
| [`DropdownHeaderTemplateDirective`](api/dropdowns.md#dropdownheadertemplatedirective) | Directive |
|
|
438
|
+
| [`DropdownItemTemplateDirective`](api/dropdowns.md#dropdownitemtemplatedirective) | Directive |
|
|
439
|
+
| [`DropdownListPopupHandlerDirective`](api/dropdowns.md#dropdownlistpopuphandlerdirective) | Directive |
|
|
440
|
+
| [`DropdownNoDataTemplateDirective`](api/dropdowns.md#dropdownnodatatemplatedirective) | Directive |
|
|
441
|
+
| [`DropdownPrefixTemplateDirective`](api/dropdowns.md#dropdownprefixtemplatedirective) | Directive |
|
|
442
|
+
| [`DropdownSuffixTemplateDirective`](api/dropdowns.md#dropdownsuffixtemplatedirective) | Directive |
|
|
443
|
+
| [`DropdownListService`](api/dropdowns.md#dropdownlistservice) | Service |
|
|
607
444
|
|
|
608
445
|
### Types
|
|
609
446
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
```typescript
|
|
613
|
-
const COMBO_BOX_DEFAULT_MESSAGES: MonaComboBoxMessages;
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
#### `DROPDOWN_DATA_INPUT_TOKEN`
|
|
617
|
-
|
|
618
|
-
```typescript
|
|
619
|
-
const DROPDOWN_DATA_INPUT_TOKEN: InjectionToken<DropdownDataInput<unknown>>;
|
|
620
|
-
```
|
|
621
|
-
|
|
622
|
-
#### `DROPDOWN_POPUP_INPUT_TOKEN`
|
|
623
|
-
|
|
624
|
-
```typescript
|
|
625
|
-
const DROPDOWN_POPUP_INPUT_TOKEN: InjectionToken<DropdownPopupInput>;
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
#### `DropdownDataInputToken`
|
|
629
|
-
|
|
630
|
-
**Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`.
|
|
631
|
-
|
|
632
|
-
```typescript
|
|
633
|
-
const DropdownDataInputToken: InjectionToken<DropdownDataInput<unknown>>;
|
|
634
|
-
```
|
|
635
|
-
|
|
636
|
-
#### `dropdownPopupThemeVariants`
|
|
637
|
-
|
|
638
|
-
```typescript
|
|
639
|
-
const dropdownPopupThemeVariants: (props?: ({ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined; size?: "small" | "medium" | "large" | null | undefined; } & ClassProp) | undefined) => string;
|
|
640
|
-
```
|
|
641
|
-
|
|
642
|
-
#### `DROPDOWNS_DEFAULT_MESSAGES`
|
|
643
|
-
|
|
644
|
-
```typescript
|
|
645
|
-
const DROPDOWNS_DEFAULT_MESSAGES: MonaDropdownsMessages;
|
|
646
|
-
```
|
|
647
|
-
|
|
648
|
-
#### `DropdownDataInput`
|
|
649
|
-
|
|
650
|
-
**Type parameters:** `TData`
|
|
651
|
-
|
|
652
|
-
| Name | Type |
|
|
653
|
-
| --- | --- |
|
|
654
|
-
| `data` (read-only) | `InputSignal<Iterable<TData>>` |
|
|
655
|
-
| `itemDisabled` (read-only) | `InputSignal<DropdownFieldPredicateType<TData>>` |
|
|
656
|
-
| `textField` (read-only) | `InputSignal<DropdownFieldSelectorType<TData, string>>` |
|
|
657
|
-
| `valueField` (read-only) | `InputSignal<DropdownFieldSelectorType<TData, unknown>>` |
|
|
658
|
-
|
|
659
|
-
#### `DropdownPopupInput`
|
|
660
|
-
|
|
661
|
-
| Name | Type |
|
|
447
|
+
| Type | Kind |
|
|
662
448
|
| --- | --- |
|
|
663
|
-
| `
|
|
664
|
-
| `closed` (read-only) | `OutputEmitterRef<void>` |
|
|
665
|
-
| `disabled` (read-only) | `Signal<boolean>` |
|
|
666
|
-
| `open` (read-only) | `OutputEmitterRef<PreventableEvent>` |
|
|
667
|
-
| `opened` (read-only) | `OutputEmitterRef<void>` |
|
|
668
|
-
| `popupHeight` (read-only) | `InputSignal<ListSizeInputType>` |
|
|
669
|
-
| `popupWidth` (read-only) | `InputSignal<ListSizeInputType>` |
|
|
670
|
-
| `readonly` (read-only) | `Signal<boolean>` |
|
|
671
|
-
| `touch` (read-only) | `OutputEmitterRef<void>` |
|
|
672
|
-
|
|
673
|
-
#### `DropdownFieldPredicateType`
|
|
674
|
-
|
|
675
|
-
```typescript
|
|
676
|
-
type DropdownFieldPredicateType<TData> = string | Predicate<TData> | null | undefined;
|
|
677
|
-
```
|
|
678
|
-
|
|
679
|
-
#### `DropdownFieldSelectorType`
|
|
680
|
-
|
|
681
|
-
```typescript
|
|
682
|
-
type DropdownFieldSelectorType<TData, TResult = unknown> = string | Selector<TData, TResult> | null | undefined;
|
|
683
|
-
```
|
|
684
|
-
|
|
685
|
-
#### `FilterChangeEvent`
|
|
449
|
+
| [`COMBO_BOX_DEFAULT_MESSAGES`](api/combo-box.md#combo-box-default-messages) | Constant |
|
|
686
450
|
|
|
687
|
-
From `@nanahoshi/mona-ui/
|
|
451
|
+
From `@nanahoshi/mona-ui/dropdowns`:
|
|
688
452
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
| Name | Type |
|
|
692
|
-
| --- | --- |
|
|
693
|
-
| `filter` (read-only) | `string` |
|
|
694
|
-
|
|
695
|
-
#### `ListItem`
|
|
696
|
-
|
|
697
|
-
From `@nanahoshi/mona-ui/list`.
|
|
698
|
-
|
|
699
|
-
An item of a list, wrapping its data item.
|
|
700
|
-
|
|
701
|
-
**Type parameters:** `TData`
|
|
702
|
-
|
|
703
|
-
| Name | Type |
|
|
704
|
-
| --- | --- |
|
|
705
|
-
| `data` (read-only) | `TData` |
|
|
706
|
-
| `header` (read-only) | `string` |
|
|
707
|
-
| `isHeader` (read-only) | `boolean` |
|
|
708
|
-
| `uid` (read-only) | `string` |
|
|
709
|
-
|
|
710
|
-
#### `ListSizeInputType`
|
|
711
|
-
|
|
712
|
-
From `@nanahoshi/mona-ui/list`.
|
|
713
|
-
|
|
714
|
-
```typescript
|
|
715
|
-
type ListSizeInputType = ListSizeType | number;
|
|
716
|
-
```
|
|
717
|
-
|
|
718
|
-
#### `ListSizeType`
|
|
719
|
-
|
|
720
|
-
From `@nanahoshi/mona-ui/list`.
|
|
721
|
-
|
|
722
|
-
A CSS length, or nothing to leave it to the stylesheet.
|
|
723
|
-
|
|
724
|
-
```typescript
|
|
725
|
-
type ListSizeType = string | null | undefined;
|
|
726
|
-
```
|
|
727
|
-
|
|
728
|
-
#### `MonaComboBoxMessages`
|
|
729
|
-
|
|
730
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
731
|
-
|
|
732
|
-
| Name | Type |
|
|
733
|
-
| --- | --- |
|
|
734
|
-
| `clear` (read-only) | `string` |
|
|
735
|
-
|
|
736
|
-
#### `MonaDropdownsMessages`
|
|
737
|
-
|
|
738
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
739
|
-
|
|
740
|
-
| Name | Type |
|
|
741
|
-
| --- | --- |
|
|
742
|
-
| `itemPosition` (read-only) | `(text: string, position: number, total: number) => string` |
|
|
743
|
-
| `noResultsFound` (read-only) | `string` |
|
|
744
|
-
| `resultsAvailable` (read-only) | `(count: number) => string` |
|
|
745
|
-
|
|
746
|
-
#### `PreventableEvent`
|
|
747
|
-
|
|
748
|
-
From `@nanahoshi/mona-ui/common`.
|
|
749
|
-
|
|
750
|
-
**Type parameters:** `E extends Event = Event`
|
|
751
|
-
|
|
752
|
-
| Name | Type | Description |
|
|
453
|
+
| Type | Kind | Description |
|
|
753
454
|
| --- | --- | --- |
|
|
754
|
-
| `
|
|
755
|
-
| `
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
| Signature | Description |
|
|
760
|
-
| --- | --- |
|
|
761
|
-
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
762
|
-
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
455
|
+
| [`DropdownDataInputToken`](api/dropdowns.md#dropdowndatainputtoken) | Constant | **Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`. |
|
|
456
|
+
| [`DROPDOWNS_DEFAULT_MESSAGES`](api/dropdowns.md#dropdowns-default-messages) | Constant | |
|
|
457
|
+
| [`DropdownDataInput`](api/dropdowns.md#dropdowndatainput) | Interface | |
|
|
458
|
+
| [`DropdownFieldPredicateType`](api/dropdowns.md#dropdownfieldpredicatetype) | Type alias | |
|
|
459
|
+
| [`DropdownFieldSelectorType`](api/dropdowns.md#dropdownfieldselectortype) | Type alias | |
|
|
763
460
|
|
|
764
|
-
**
|
|
461
|
+
**Related types:** [`FilterableOptions`](api/common.md#filterableoptions), [`FilterChangeEvent`](api/common.md#filterchangeevent), [`GroupableOptions`](api/grid.md#groupableoptions), [`ListItem`](api/list.md#listitem), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaComboBoxMessages`](api/i18n.md#monacomboboxmessages), [`MonaDropdownsMessages`](api/i18n.md#monadropdownsmessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent), [`VirtualScrollOptions`](api/common.md#virtualscrolloptions)
|
package/docs/command.md
CHANGED
|
@@ -338,245 +338,34 @@ Classes on `mona-command` and its parts add to their own, so `class="border-0"`
|
|
|
338
338
|
|
|
339
339
|
## API
|
|
340
340
|
|
|
341
|
-
Everything below is imported from `@nanahoshi/mona-ui/command`.
|
|
341
|
+
Everything below is imported from `@nanahoshi/mona-ui/command`. Each name links to its reference page, with every input, output, property and method.
|
|
342
342
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
A searchable list of actions or options, operated from one input. It works inline, in a popover, or in a
|
|
346
|
-
`mona-command-dialog`. It only runs what the consumer asks for: choosing an item emits an event, and nothing closes
|
|
347
|
-
or navigates by itself.
|
|
348
|
-
|
|
349
|
-
**Selector:** `mona-command`
|
|
350
|
-
|
|
351
|
-
#### Inputs
|
|
352
|
-
|
|
353
|
-
| Name | Type | Default | Description |
|
|
354
|
-
| --- | --- | --- | --- |
|
|
355
|
-
| `filter` | `CommandFilter` | `defaultCommandFilter` | What counts as a match while `filterMode` is `"auto"`. |
|
|
356
|
-
| `filterMode` | `CommandFilterMode` | `"auto"` | Whether the component filters the items, or the consumer supplies only the matching ones. |
|
|
357
|
-
| `loading` | `boolean` | `false` | Whether results are on their way. Shows `mona-command-loading` and holds back the empty state. |
|
|
358
|
-
| `loop` | `boolean` | `true` | Whether the arrow keys wrap around at the ends of the list. |
|
|
359
|
-
| `query` (two-way) | `string` | `""` | The text in the input. |
|
|
360
|
-
| `rounded` | `"large" \| "medium" \| "none" \| "small"` | `"medium"` | The corner radius. |
|
|
361
|
-
|
|
362
|
-
#### Outputs
|
|
363
|
-
|
|
364
|
-
| Name | Type | Description |
|
|
365
|
-
| --- | --- | --- |
|
|
366
|
-
| `itemSelect` | `CommandSelectEvent` | Emits when any item is chosen, with the pointer or with Enter. |
|
|
367
|
-
| `queryChange` | `string` | Emitted when `query` changes. |
|
|
368
|
-
|
|
369
|
-
#### Methods
|
|
370
|
-
|
|
371
|
-
| Signature | Description |
|
|
372
|
-
| --- | --- |
|
|
373
|
-
| `focus(): void` | Moves focus to the input. |
|
|
374
|
-
|
|
375
|
-
### `CommandDialogComponent`
|
|
376
|
-
|
|
377
|
-
A modal for a `mona-command`. It stays near the top of the page instead of centering, so the input doesn't jump as
|
|
378
|
-
results come and go, and the `mona-command` inside is created each time it opens, so it starts with an empty query.
|
|
379
|
-
|
|
380
|
-
**Selector:** `mona-command-dialog`
|
|
381
|
-
|
|
382
|
-
#### Inputs
|
|
383
|
-
|
|
384
|
-
| Name | Type | Default | Description |
|
|
385
|
-
| --- | --- | --- | --- |
|
|
386
|
-
| `aria-label` | `string \| undefined` | `undefined` | The accessible name of the dialog. |
|
|
387
|
-
| `open` (two-way) | `boolean` | `false` | Whether the dialog is open. |
|
|
388
|
-
| `shortcut` | `string \| null` | `null` | A key combination that opens and closes the dialog from anywhere on the page, such as `mod+k`. `mod` is Command on Apple devices and Ctrl elsewhere. Nothing is bound unless this is set. |
|
|
389
|
-
| `width` | `number \| string` | `"36rem"` | The dialog's width. It never gets wider than the viewport. |
|
|
390
|
-
|
|
391
|
-
#### Outputs
|
|
392
|
-
|
|
393
|
-
| Name | Type | Description |
|
|
394
|
-
| --- | --- | --- |
|
|
395
|
-
| `openChange` | `boolean` | Emitted when `open` changes. |
|
|
396
|
-
|
|
397
|
-
### `CommandItemComponent`
|
|
398
|
-
|
|
399
|
-
One action or option in a `mona-command`. What it shows is its content; what it's found by is its value.
|
|
400
|
-
|
|
401
|
-
**Selector:** `mona-command-item`
|
|
402
|
-
|
|
403
|
-
#### Inputs
|
|
404
|
-
|
|
405
|
-
| Name | Type | Default | Description |
|
|
406
|
-
| --- | --- | --- | --- |
|
|
407
|
-
| `disabled` | `boolean` | `false` | Whether the item shows but can't be chosen. |
|
|
408
|
-
| `keywords` | `readonly string[]` | `[]` | Other words the item should be found by, such as synonyms. |
|
|
409
|
-
| `value` (required) | `string` | — | What the item is found by, and what the select event carries. |
|
|
410
|
-
|
|
411
|
-
#### Outputs
|
|
412
|
-
|
|
413
|
-
| Name | Type | Description |
|
|
343
|
+
| Name | Kind | Description |
|
|
414
344
|
| --- | --- | --- |
|
|
415
|
-
| `
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
|
427
|
-
|
|
|
428
|
-
| `
|
|
429
|
-
| `placeholder` | `string` | — | The text shown while the field is empty. |
|
|
430
|
-
|
|
431
|
-
### `CommandGroupComponent`
|
|
432
|
-
|
|
433
|
-
A titled set of items. It hides itself while none of its items show.
|
|
434
|
-
|
|
435
|
-
**Selector:** `mona-command-group`
|
|
436
|
-
|
|
437
|
-
#### Inputs
|
|
438
|
-
|
|
439
|
-
| Name | Type | Default | Description |
|
|
440
|
-
| --- | --- | --- | --- |
|
|
441
|
-
| `heading` | `string` | — | The title above the group's items. |
|
|
442
|
-
|
|
443
|
-
### `CommandHighlightComponent`
|
|
444
|
-
|
|
445
|
-
Shows a text with the parts the query matches marked. Marks the query's words, however the item was matched.
|
|
446
|
-
|
|
447
|
-
**Selector:** `mona-command-highlight`
|
|
448
|
-
|
|
449
|
-
#### Inputs
|
|
450
|
-
|
|
451
|
-
| Name | Type | Default | Description |
|
|
452
|
-
| --- | --- | --- | --- |
|
|
453
|
-
| `text` (required) | `string` | — | The text to show. |
|
|
454
|
-
|
|
455
|
-
### `CommandListComponent`
|
|
456
|
-
|
|
457
|
-
Holds the items of a `mona-command`, and scrolls them. The empty and loading states sit outside the listbox, which
|
|
458
|
-
may only contain options and groups.
|
|
459
|
-
|
|
460
|
-
**Selector:** `mona-command-list`
|
|
461
|
-
|
|
462
|
-
#### Inputs
|
|
463
|
-
|
|
464
|
-
| Name | Type | Default | Description |
|
|
465
|
-
| --- | --- | --- | --- |
|
|
466
|
-
| `aria-label` | `string \| undefined` | `undefined` | The accessible name of the list. |
|
|
467
|
-
|
|
468
|
-
### `CommandShortcutComponent`
|
|
469
|
-
|
|
470
|
-
Shows an item's shortcut the way the platform writes it. It's only a hint: binding the keys stays with the consumer,
|
|
471
|
-
who knows what they do.
|
|
472
|
-
|
|
473
|
-
**Selector:** `mona-command-shortcut`
|
|
474
|
-
|
|
475
|
-
#### Inputs
|
|
476
|
-
|
|
477
|
-
| Name | Type | Default | Description |
|
|
478
|
-
| --- | --- | --- | --- |
|
|
479
|
-
| `keys` (required) | `string` | — | The keys, joined with `+`, such as `mod+k`. `mod` is Command on Apple devices and Ctrl elsewhere. |
|
|
480
|
-
|
|
481
|
-
### `CommandEmptyComponent`
|
|
482
|
-
|
|
483
|
-
Shows while a query has no results. Its content replaces the default message.
|
|
484
|
-
|
|
485
|
-
**Selector:** `mona-command-empty`
|
|
486
|
-
|
|
487
|
-
### `CommandFooterComponent`
|
|
488
|
-
|
|
489
|
-
A strip below the list, for key hints or links.
|
|
490
|
-
|
|
491
|
-
**Selector:** `mona-command-footer`
|
|
492
|
-
|
|
493
|
-
### `CommandHeaderComponent`
|
|
494
|
-
|
|
495
|
-
A strip above or below the input, for filters or a title.
|
|
496
|
-
|
|
497
|
-
**Selector:** `mona-command-header`
|
|
498
|
-
|
|
499
|
-
### `CommandLoadingComponent`
|
|
500
|
-
|
|
501
|
-
Shows while the `mona-command` is `loading`. Its content replaces the default message.
|
|
502
|
-
|
|
503
|
-
**Selector:** `mona-command-loading`
|
|
504
|
-
|
|
505
|
-
### `CommandSeparatorComponent`
|
|
506
|
-
|
|
507
|
-
A line between items. It's only visual, because a listbox can't contain a separator role. It hides while the
|
|
508
|
-
component filters, when it would divide nothing.
|
|
509
|
-
|
|
510
|
-
**Selector:** `mona-command-separator`
|
|
511
|
-
|
|
512
|
-
### `CommandDialogContentDirective`
|
|
513
|
-
|
|
514
|
-
Marks the template a `mona-command-dialog` renders while it's open.
|
|
515
|
-
|
|
516
|
-
**Selector:** `ng-template[monaCommandDialogContent]`
|
|
345
|
+
| [`CommandComponent`](api/command.md#commandcomponent) | Component | A searchable list of actions or options, operated from one input. |
|
|
346
|
+
| [`CommandDialogComponent`](api/command.md#commanddialogcomponent) | Component | A modal for a `mona-command`. |
|
|
347
|
+
| [`CommandItemComponent`](api/command.md#commanditemcomponent) | Component | One action or option in a `mona-command`. |
|
|
348
|
+
| [`CommandInputComponent`](api/command.md#commandinputcomponent) | Component | The search field of a `mona-command`. |
|
|
349
|
+
| [`CommandGroupComponent`](api/command.md#commandgroupcomponent) | Component | A titled set of items. |
|
|
350
|
+
| [`CommandHighlightComponent`](api/command.md#commandhighlightcomponent) | Component | Shows a text with the parts the query matches marked. |
|
|
351
|
+
| [`CommandListComponent`](api/command.md#commandlistcomponent) | Component | Holds the items of a `mona-command`, and scrolls them. |
|
|
352
|
+
| [`CommandShortcutComponent`](api/command.md#commandshortcutcomponent) | Component | Shows an item's shortcut the way the platform writes it. |
|
|
353
|
+
| [`CommandEmptyComponent`](api/command.md#commandemptycomponent) | Component | Shows while a query has no results. |
|
|
354
|
+
| [`CommandFooterComponent`](api/command.md#commandfootercomponent) | Component | A strip below the list, for key hints or links. |
|
|
355
|
+
| [`CommandHeaderComponent`](api/command.md#commandheadercomponent) | Component | A strip above or below the input, for filters or a title. |
|
|
356
|
+
| [`CommandLoadingComponent`](api/command.md#commandloadingcomponent) | Component | Shows while the `mona-command` is `loading`. |
|
|
357
|
+
| [`CommandSeparatorComponent`](api/command.md#commandseparatorcomponent) | Component | A line between items. |
|
|
358
|
+
| [`CommandDialogContentDirective`](api/command.md#commanddialogcontentdirective) | Directive | Marks the template a `mona-command-dialog` renders while it's open. |
|
|
517
359
|
|
|
518
360
|
### Types
|
|
519
361
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
```typescript
|
|
523
|
-
const COMMAND_DEFAULT_MESSAGES: MonaCommandMessages;
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
#### `defaultCommandFilter`
|
|
527
|
-
|
|
528
|
-
The default filter: an item stays when every word of the query appears in its value or keywords, ignoring case and
|
|
529
|
-
accents.
|
|
530
|
-
|
|
531
|
-
```typescript
|
|
532
|
-
const defaultCommandFilter: CommandFilter;
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
#### `CommandFilterItem`
|
|
536
|
-
|
|
537
|
-
What a filter sees of an item.
|
|
538
|
-
|
|
539
|
-
| Name | Type | Description |
|
|
540
|
-
| --- | --- | --- |
|
|
541
|
-
| `keywords` (read-only) | `readonly string[]` | Other words the item should be found by. |
|
|
542
|
-
| `value` (read-only) | `string` | The item's value. |
|
|
543
|
-
|
|
544
|
-
#### `CommandSelectEvent`
|
|
545
|
-
|
|
546
|
-
Emitted when an item is chosen, with the pointer or with Enter.
|
|
547
|
-
|
|
548
|
-
| Name | Type | Description |
|
|
362
|
+
| Type | Kind | Description |
|
|
549
363
|
| --- | --- | --- |
|
|
550
|
-
| `
|
|
551
|
-
| `
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
type CommandFilter = (query: string, item: CommandFilterItem) => boolean;
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
#### `CommandFilterMode`
|
|
562
|
-
|
|
563
|
-
Who decides which items show. `"auto"` filters them on the client. `"manual"` shows every item, for results the
|
|
564
|
-
consumer already narrowed down, such as a server's.
|
|
565
|
-
|
|
566
|
-
```typescript
|
|
567
|
-
type CommandFilterMode = "auto" | "manual";
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
#### `MonaCommandMessages`
|
|
571
|
-
|
|
572
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
573
|
-
|
|
574
|
-
| Name | Type |
|
|
575
|
-
| --- | --- |
|
|
576
|
-
| `dialogLabel` (read-only) | `string` |
|
|
577
|
-
| `inputLabel` (read-only) | `string` |
|
|
578
|
-
| `listLabel` (read-only) | `string` |
|
|
579
|
-
| `loading` (read-only) | `string` |
|
|
580
|
-
| `noResults` (read-only) | `string` |
|
|
581
|
-
| `placeholder` (read-only) | `string` |
|
|
582
|
-
| `resultsAvailable` (read-only) | `(count: number) => string` |
|
|
364
|
+
| [`COMMAND_DEFAULT_MESSAGES`](api/command.md#command-default-messages) | Constant | |
|
|
365
|
+
| [`defaultCommandFilter`](api/command.md#defaultcommandfilter) | Constant | The default filter: an item stays when every word of the query appears in its value or keywords, ignoring case and accents. |
|
|
366
|
+
| [`CommandFilterItem`](api/command.md#commandfilteritem) | Interface | What a filter sees of an item. |
|
|
367
|
+
| [`CommandSelectEvent`](api/command.md#commandselectevent) | Interface | Emitted when an item is chosen, with the pointer or with Enter. |
|
|
368
|
+
| [`CommandFilter`](api/command.md#commandfilter) | Type alias | Decides whether an item stays in the list for a query. |
|
|
369
|
+
| [`CommandFilterMode`](api/command.md#commandfiltermode) | Type alias | Who decides which items show. |
|
|
370
|
+
|
|
371
|
+
**Related types:** [`MonaCommandMessages`](api/i18n.md#monacommandmessages)
|