@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.
Files changed (168) hide show
  1. package/docs/api/auto-complete.md +67 -0
  2. package/docs/api/avatar.md +31 -0
  3. package/docs/api/breadcrumb.md +74 -0
  4. package/docs/api/button-group.md +71 -0
  5. package/docs/api/button.md +84 -0
  6. package/docs/api/calendar.md +123 -0
  7. package/docs/api/card.md +97 -0
  8. package/docs/api/chart.md +4380 -0
  9. package/docs/api/check-box.md +70 -0
  10. package/docs/api/chip.md +55 -0
  11. package/docs/api/circular-progress-bar.md +71 -0
  12. package/docs/api/collapsible.md +71 -0
  13. package/docs/api/color-gradient.md +54 -0
  14. package/docs/api/color-palette.md +52 -0
  15. package/docs/api/color-picker.md +89 -0
  16. package/docs/api/combo-box.md +69 -0
  17. package/docs/api/command.md +282 -0
  18. package/docs/api/common.md +599 -0
  19. package/docs/api/contextmenu.md +239 -0
  20. package/docs/api/date-input.md +119 -0
  21. package/docs/api/date-picker.md +67 -0
  22. package/docs/api/datetime-picker.md +72 -0
  23. package/docs/api/dialog.md +291 -0
  24. package/docs/api/dropdown-button.md +248 -0
  25. package/docs/api/dropdown-list.md +72 -0
  26. package/docs/api/dropdowns.md +172 -0
  27. package/docs/api/editor.md +117 -0
  28. package/docs/api/expansion-panel.md +85 -0
  29. package/docs/api/fieldset.md +33 -0
  30. package/docs/api/filter.md +116 -0
  31. package/docs/api/grid.md +1445 -0
  32. package/docs/api/i18n.md +1699 -0
  33. package/docs/api/label.md +58 -0
  34. package/docs/api/list-box.md +301 -0
  35. package/docs/api/list-view.md +294 -0
  36. package/docs/api/list.md +119 -0
  37. package/docs/api/locales.md +134 -0
  38. package/docs/api/menubar.md +275 -0
  39. package/docs/api/multi-select.md +92 -0
  40. package/docs/api/notification.md +164 -0
  41. package/docs/api/numeric-text-box.md +130 -0
  42. package/docs/api/otp-input.md +100 -0
  43. package/docs/api/pager.md +371 -0
  44. package/docs/api/placeholder.md +18 -0
  45. package/docs/api/popover.md +170 -0
  46. package/docs/api/popup-menu.md +328 -0
  47. package/docs/api/popup.md +299 -0
  48. package/docs/api/progress-bar.md +79 -0
  49. package/docs/api/query.md +367 -0
  50. package/docs/api/radio-button.md +113 -0
  51. package/docs/api/rating.md +187 -0
  52. package/docs/api/scroll-view.md +93 -0
  53. package/docs/api/segmented.md +114 -0
  54. package/docs/api/sheet.md +65 -0
  55. package/docs/api/sidebar.md +583 -0
  56. package/docs/api/skeleton.md +26 -0
  57. package/docs/api/slider.md +173 -0
  58. package/docs/api/spinner.md +132 -0
  59. package/docs/api/split-button.md +261 -0
  60. package/docs/api/splitter.md +57 -0
  61. package/docs/api/stepper.md +148 -0
  62. package/docs/api/switch.md +78 -0
  63. package/docs/api/tabs.md +139 -0
  64. package/docs/api/text-area.md +20 -0
  65. package/docs/api/text-box.md +106 -0
  66. package/docs/api/theme.md +627 -0
  67. package/docs/api/time-picker.md +69 -0
  68. package/docs/api/time-selector.md +54 -0
  69. package/docs/api/tooltip.md +112 -0
  70. package/docs/api/tree-view.md +631 -0
  71. package/docs/api/window.md +245 -0
  72. package/docs/auto-complete.md +28 -329
  73. package/docs/avatar.md +4 -24
  74. package/docs/breadcrumb.md +10 -65
  75. package/docs/button-group.md +7 -60
  76. package/docs/button.md +8 -67
  77. package/docs/calendar.md +16 -121
  78. package/docs/card.md +16 -79
  79. package/docs/chart-bar.md +16 -234
  80. package/docs/chart-financial.md +10 -121
  81. package/docs/chart-funnel.md +13 -176
  82. package/docs/chart-heatmap.md +15 -131
  83. package/docs/chart-line-area.md +12 -137
  84. package/docs/chart-pie.md +17 -221
  85. package/docs/chart-radar.md +13 -129
  86. package/docs/chart-radial.md +13 -211
  87. package/docs/chart-scatter.md +6 -74
  88. package/docs/chart-treemap.md +14 -196
  89. package/docs/chart.md +154 -1892
  90. package/docs/checkbox.md +5 -61
  91. package/docs/chip.md +7 -42
  92. package/docs/circular-progress-bar.md +9 -61
  93. package/docs/collapsible.md +5 -87
  94. package/docs/color-gradient.md +8 -81
  95. package/docs/color-palette.md +7 -69
  96. package/docs/color-picker.md +9 -105
  97. package/docs/combo-box.md +28 -331
  98. package/docs/command.md +25 -236
  99. package/docs/contextmenu.md +15 -140
  100. package/docs/date-picker.md +7 -110
  101. package/docs/datetime-picker.md +7 -129
  102. package/docs/decimal-textbox.md +6 -69
  103. package/docs/dialog.md +23 -263
  104. package/docs/dropdown-button.md +15 -146
  105. package/docs/dropdown-list.md +29 -332
  106. package/docs/editor.md +8 -164
  107. package/docs/expansion-panel.md +7 -69
  108. package/docs/fieldset.md +5 -24
  109. package/docs/grid-columns.md +12 -92
  110. package/docs/grid-editing.md +29 -291
  111. package/docs/grid-grouping.md +11 -50
  112. package/docs/grid-rows.md +10 -74
  113. package/docs/grid-selection.md +7 -36
  114. package/docs/grid-server.md +8 -293
  115. package/docs/grid-sorting-filtering.md +10 -333
  116. package/docs/grid-state-export.md +17 -228
  117. package/docs/grid.md +23 -216
  118. package/docs/input.md +7 -19
  119. package/docs/label.md +8 -39
  120. package/docs/list-box.md +21 -253
  121. package/docs/list-view.md +25 -232
  122. package/docs/menubar.md +21 -167
  123. package/docs/multi-select.md +31 -350
  124. package/docs/notification.md +17 -116
  125. package/docs/numeric-textbox.md +9 -78
  126. package/docs/otp-input.md +9 -95
  127. package/docs/pager.md +19 -239
  128. package/docs/placeholder.md +5 -18
  129. package/docs/popover.md +13 -123
  130. package/docs/popup-menu.md +22 -243
  131. package/docs/popup.md +24 -248
  132. package/docs/progress-bar.md +10 -75
  133. package/docs/radio-button.md +8 -96
  134. package/docs/range-slider.md +9 -82
  135. package/docs/rating.md +15 -163
  136. package/docs/scroll-view.md +9 -86
  137. package/docs/segmented.md +8 -90
  138. package/docs/sheet.md +10 -74
  139. package/docs/sidebar-menus.md +20 -155
  140. package/docs/sidebar-state.md +16 -134
  141. package/docs/sidebar.md +18 -218
  142. package/docs/skeleton.md +5 -26
  143. package/docs/slider.md +9 -97
  144. package/docs/spinner.md +15 -95
  145. package/docs/split-button.md +21 -166
  146. package/docs/splitter.md +9 -56
  147. package/docs/stepper.md +13 -127
  148. package/docs/switch.md +8 -58
  149. package/docs/tabs.md +13 -111
  150. package/docs/textarea.md +4 -13
  151. package/docs/textbox.md +10 -77
  152. package/docs/time-picker.md +7 -112
  153. package/docs/tooltip-directive.md +12 -96
  154. package/docs/tooltip.md +12 -96
  155. package/docs/tree-view.md +42 -495
  156. package/docs/window.md +19 -230
  157. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +1 -0
  158. package/fesm2022/nanahoshi-mona-ui-common.mjs +3 -0
  159. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +13 -1
  160. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -0
  161. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +9 -0
  162. package/llms.txt +74 -0
  163. package/package.json +1 -1
  164. package/types/nanahoshi-mona-ui-collapsible.d.ts +2 -0
  165. package/types/nanahoshi-mona-ui-common.d.ts +6 -0
  166. package/types/nanahoshi-mona-ui-date-input.d.ts +18 -1
  167. package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -0
  168. 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`, `@nanahoshi/mona-ui/dropdowns`, as noted.
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
- | Signature | Description |
423
+ | Name | Kind |
474
424
  | --- | --- |
475
- | `focus(options?: FocusOptions): void` | Moves focus to the inner input. The caret goes to the end of the text. |
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
- **Selector:** `ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate]`
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
- | `navigate$` (read-only) | `Subject<{ item: ListItem<TData>; }>` |
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
- #### `COMBO_BOX_DEFAULT_MESSAGES`
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
- | `close` (read-only) | `OutputEmitterRef<PopupCloseEvent>` |
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/common`.
451
+ From `@nanahoshi/mona-ui/dropdowns`:
688
452
 
689
- **Extends:** `PreventableEvent`
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
- | `originalEvent` (read-only) | `E \| undefined` | The DOM event that caused this one, when there is one. |
755
- | `type` (read-only) | `string \| undefined` | A name for the kind of event, when the component that emits it sets one. |
756
-
757
- **Methods**
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
- **Documented elsewhere:** [`FilterableOptions`](grid-sorting-filtering.md), [`GroupableOptions`](list-view.md), [`PopupCloseEvent`](popup.md), [`VirtualScrollOptions`](list-view.md)
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
- ### `CommandComponent`
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
- | `itemSelect` | `CommandSelectEvent` | Emits when this item is chosen, with the pointer or with Enter. |
416
-
417
- ### `CommandInputComponent`
418
-
419
- The search field of a `mona-command`. Focus stays here while the arrow keys move through the list, so typing always
420
- continues the search.
421
-
422
- **Selector:** `mona-command-input`
423
-
424
- #### Inputs
425
-
426
- | Name | Type | Default | Description |
427
- | --- | --- | --- | --- |
428
- | `aria-label` | `string \| undefined` | `undefined` | The accessible name of the field. |
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
- #### `COMMAND_DEFAULT_MESSAGES`
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
- | `originalEvent` (read-only) | `KeyboardEvent \| MouseEvent` | The click or key press that chose the item, to tell apart a modified one, such as Ctrl+Enter. |
551
- | `value` (read-only) | `string` | The value of the chosen item. |
552
-
553
- #### `CommandFilter`
554
-
555
- Decides whether an item stays in the list for a query. It's only called while the query isn't empty.
556
-
557
- ```typescript
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)