@nanahoshi/mona-ui 0.25.1 → 0.26.0

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 (222) hide show
  1. package/README.md +2 -0
  2. package/command/package.json +4 -0
  3. package/docs/auto-complete.md +733 -0
  4. package/docs/avatar.md +220 -0
  5. package/docs/breadcrumb.md +320 -0
  6. package/docs/button-group.md +392 -0
  7. package/docs/button.md +256 -0
  8. package/docs/calendar.md +515 -0
  9. package/docs/card.md +292 -0
  10. package/docs/chart.md +4058 -0
  11. package/docs/checkbox.md +374 -0
  12. package/docs/chip.md +339 -0
  13. package/docs/circular-progress-bar.md +287 -0
  14. package/docs/collapsible.md +308 -0
  15. package/docs/color-gradient.md +336 -0
  16. package/docs/color-palette.md +317 -0
  17. package/docs/color-picker.md +387 -0
  18. package/docs/combo-box.md +764 -0
  19. package/docs/command.md +582 -0
  20. package/docs/contextmenu.md +530 -0
  21. package/docs/date-picker.md +251 -0
  22. package/docs/datetime-picker.md +284 -0
  23. package/docs/decimal-textbox.md +260 -0
  24. package/docs/dialog.md +822 -0
  25. package/docs/dropdown-button.md +507 -0
  26. package/docs/dropdown-list.md +779 -0
  27. package/docs/editor.md +374 -0
  28. package/docs/expansion-panel.md +348 -0
  29. package/docs/fieldset.md +217 -0
  30. package/docs/forms.md +162 -0
  31. package/docs/grid.md +2053 -0
  32. package/docs/input.md +197 -0
  33. package/docs/installation.md +54 -0
  34. package/docs/introduction.md +46 -0
  35. package/docs/label.md +340 -0
  36. package/docs/list-box.md +637 -0
  37. package/docs/list-view.md +584 -0
  38. package/docs/menubar.md +559 -0
  39. package/docs/multi-select.md +765 -0
  40. package/docs/notification.md +460 -0
  41. package/docs/numeric-textbox.md +301 -0
  42. package/docs/otp-input.md +539 -0
  43. package/docs/pager.md +513 -0
  44. package/docs/placeholder.md +176 -0
  45. package/docs/popover.md +423 -0
  46. package/docs/popup-menu.md +658 -0
  47. package/docs/popup.md +617 -0
  48. package/docs/progress-bar.md +368 -0
  49. package/docs/radio-button.md +451 -0
  50. package/docs/range-slider.md +367 -0
  51. package/docs/rating.md +518 -0
  52. package/docs/scroll-view.md +375 -0
  53. package/docs/segmented.md +434 -0
  54. package/docs/sheet.md +348 -0
  55. package/docs/sidebar.md +1126 -0
  56. package/docs/skeleton.md +181 -0
  57. package/docs/slider.md +423 -0
  58. package/docs/spinner.md +370 -0
  59. package/docs/split-button.md +522 -0
  60. package/docs/splitter.md +342 -0
  61. package/docs/stepper.md +539 -0
  62. package/docs/switch.md +340 -0
  63. package/docs/tabs.md +542 -0
  64. package/docs/textarea.md +196 -0
  65. package/docs/textbox.md +332 -0
  66. package/docs/theming.md +403 -0
  67. package/docs/time-picker.md +254 -0
  68. package/docs/tooltip-directive.md +340 -0
  69. package/docs/tooltip.md +321 -0
  70. package/docs/tree-view.md +1018 -0
  71. package/docs/window.md +663 -0
  72. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
  73. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +8 -0
  74. package/fesm2022/nanahoshi-mona-ui-button.mjs +12 -0
  75. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +5 -2
  76. package/fesm2022/nanahoshi-mona-ui-chart.mjs +86 -0
  77. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +4 -0
  78. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +4 -0
  79. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +16 -2
  80. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  81. package/fesm2022/nanahoshi-mona-ui-command.mjs +924 -0
  82. package/fesm2022/nanahoshi-mona-ui-common.mjs +4 -0
  83. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +10 -6
  84. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +2 -1
  85. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +2 -1
  86. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +9 -5
  87. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +9 -5
  88. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +55 -1
  89. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -2
  90. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +13 -0
  91. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +5 -0
  92. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs} +2 -2
  93. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs → nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs} +5 -5
  94. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs → nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs} +18 -35
  95. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs} +5 -5
  96. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs} +4653 -4529
  97. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  98. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -0
  99. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1 -0
  100. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +168 -0
  101. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +19 -1
  102. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +14 -0
  103. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +32 -0
  104. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -0
  105. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -0
  106. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -0
  107. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -0
  108. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -0
  109. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -0
  110. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -0
  111. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -0
  112. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -0
  113. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -0
  114. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -0
  115. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -0
  116. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -0
  117. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +15 -8
  118. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +8 -5
  119. package/fesm2022/nanahoshi-mona-ui-notification.mjs +9 -0
  120. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
  121. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +5 -0
  122. package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -1
  123. package/fesm2022/nanahoshi-mona-ui-popover.mjs +14 -6
  124. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +48 -183
  125. package/fesm2022/nanahoshi-mona-ui-popup.mjs +16 -0
  126. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +4 -0
  127. package/fesm2022/nanahoshi-mona-ui-rating.mjs +2 -0
  128. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -0
  129. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +5 -5
  130. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +1 -1
  131. package/fesm2022/nanahoshi-mona-ui-slider.mjs +7 -2
  132. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +9 -6
  133. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +18 -21
  134. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +11 -8
  135. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +9 -1
  136. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +2 -1
  137. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +16 -5
  138. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +13 -11
  139. package/fesm2022/nanahoshi-mona-ui-window.mjs +12 -5
  140. package/i18n/catalogs/en-US.messages.json +10 -0
  141. package/internal/popup-menu/package.json +4 -0
  142. package/llms.txt +123 -0
  143. package/locales/ar-sa/ar-sa.messages.json +10 -0
  144. package/locales/de-de/de-de.messages.json +10 -0
  145. package/locales/es-es/es-es.messages.json +10 -0
  146. package/locales/fr-fr/fr-fr.messages.json +10 -0
  147. package/locales/id-id/id-id.messages.json +10 -0
  148. package/locales/it-it/it-it.messages.json +10 -0
  149. package/locales/ja-jp/ja-jp.messages.json +10 -0
  150. package/locales/ko-kr/ko-kr.messages.json +10 -0
  151. package/locales/pt-br/pt-br.messages.json +10 -0
  152. package/locales/ru-ru/ru-ru.messages.json +10 -0
  153. package/locales/tr-tr/tr-tr.messages.json +10 -0
  154. package/locales/zh-cn/zh-cn.messages.json +10 -0
  155. package/locales/zh-tw/zh-tw.messages.json +10 -0
  156. package/package.json +9 -1
  157. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -1
  158. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +8 -0
  159. package/types/nanahoshi-mona-ui-button.d.ts +12 -0
  160. package/types/nanahoshi-mona-ui-calendar.d.ts +3 -0
  161. package/types/nanahoshi-mona-ui-chart.d.ts +200 -0
  162. package/types/nanahoshi-mona-ui-check-box.d.ts +4 -0
  163. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +4 -0
  164. package/types/nanahoshi-mona-ui-collapsible.d.ts +10 -0
  165. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -1
  166. package/types/nanahoshi-mona-ui-command.d.ts +253 -0
  167. package/types/nanahoshi-mona-ui-common.d.ts +17 -1
  168. package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -2
  169. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -1
  170. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -1
  171. package/types/nanahoshi-mona-ui-dialog.d.ts +58 -1
  172. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +7 -3
  173. package/types/nanahoshi-mona-ui-dropdowns.d.ts +55 -1
  174. package/types/nanahoshi-mona-ui-editor.d.ts +31 -0
  175. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +13 -0
  176. package/types/nanahoshi-mona-ui-fieldset.d.ts +5 -0
  177. package/types/nanahoshi-mona-ui-grid.d.ts +162 -35
  178. package/types/nanahoshi-mona-ui-i18n.d.ts +144 -1
  179. package/types/nanahoshi-mona-ui-internal-list.d.ts +16 -1
  180. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +165 -0
  181. package/types/nanahoshi-mona-ui-internal-tree.d.ts +21 -2
  182. package/types/nanahoshi-mona-ui-internal.d.ts +4 -5
  183. package/types/nanahoshi-mona-ui-label.d.ts +1 -0
  184. package/types/nanahoshi-mona-ui-list-box.d.ts +27 -4
  185. package/types/nanahoshi-mona-ui-list-view.d.ts +34 -1
  186. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  187. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +10 -0
  188. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +10 -0
  189. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +10 -0
  190. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +10 -0
  191. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +10 -0
  192. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +10 -0
  193. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +10 -0
  194. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +10 -0
  195. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +10 -0
  196. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +10 -0
  197. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +10 -0
  198. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +10 -0
  199. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +10 -0
  200. package/types/nanahoshi-mona-ui-menubar.d.ts +10 -3
  201. package/types/nanahoshi-mona-ui-multi-select.d.ts +3 -3
  202. package/types/nanahoshi-mona-ui-notification.d.ts +9 -0
  203. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -1
  204. package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
  205. package/types/nanahoshi-mona-ui-pager.d.ts +5 -1
  206. package/types/nanahoshi-mona-ui-popover.d.ts +9 -1
  207. package/types/nanahoshi-mona-ui-popup-menu.d.ts +48 -161
  208. package/types/nanahoshi-mona-ui-popup.d.ts +16 -0
  209. package/types/nanahoshi-mona-ui-progress-bar.d.ts +4 -0
  210. package/types/nanahoshi-mona-ui-rating.d.ts +2 -0
  211. package/types/nanahoshi-mona-ui-segmented.d.ts +1 -0
  212. package/types/nanahoshi-mona-ui-sheet.d.ts +1 -1
  213. package/types/nanahoshi-mona-ui-slider.d.ts +2 -0
  214. package/types/nanahoshi-mona-ui-spinner.d.ts +7 -0
  215. package/types/nanahoshi-mona-ui-split-button.d.ts +7 -4
  216. package/types/nanahoshi-mona-ui-stepper.d.ts +11 -2
  217. package/types/nanahoshi-mona-ui-tabs.d.ts +4 -1
  218. package/types/nanahoshi-mona-ui-text-box.d.ts +9 -1
  219. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -1
  220. package/types/nanahoshi-mona-ui-tooltip.d.ts +10 -2
  221. package/types/nanahoshi-mona-ui-tree-view.d.ts +6 -5
  222. package/types/nanahoshi-mona-ui-window.d.ts +66 -1
@@ -0,0 +1,637 @@
1
+ # List Box
2
+
3
+ > A selectable list with a toolbar for moving items and transferring them between lists.
4
+
5
+ Entry point: `@nanahoshi/mona-ui/list-box`
6
+
7
+ **Selector:** `mona-list-box`
8
+
9
+ `ListBoxComponent` renders a selectable list of items with an action toolbar for moving, clearing and removing items, and for transferring them to and from a second, connected list box.
10
+
11
+ Import it from `@nanahoshi/mona-ui/list-box` and name every list box with `aria-label` or `aria-labelledby`: the toolbar's name and the transfer buttons' labels are built from it. The list box emits what the user asked for; your handler updates the items.
12
+
13
+ ## Overview
14
+
15
+ List Box renders a `role="listbox"` list of items, built on top of List View, with two additional capabilities: in-place selection toggling and an optional action toolbar for moving, clearing, removing, and transferring items to and from a second, connected list box.
16
+
17
+ Used on its own, a list box is a selectable list whose toolbar moves, clears and removes items: a rearrangeable list. Connect two list boxes through `connectedList` and the toolbar adds the transfer actions, giving consumers a working "available items ⇄ selected items" picker without hand-rolling the transfer logic.
18
+
19
+ **Use List Box when:**
20
+
21
+ - You need a picker where items live in one or two always-visible lists rather than behind a popup.
22
+ - You want the built-in move/transfer/clear/remove toolbar between two related lists of items, or a list the user can reorder.
23
+
24
+ **Use `List View` instead when:**
25
+
26
+ - You need grouping, pagination, or virtual scrolling — List Box does not expose these.
27
+
28
+ **Use `MultiSelect`/`DropDownList`/`ComboBox` instead when:**
29
+
30
+ - Selected items should collapse into a compact, popup-triggered control rather than stay visible as a full list.
31
+
32
+ ## Import & Quick Start
33
+
34
+ ```typescript
35
+ import { ListBoxComponent } from "@nanahoshi/mona-ui/list-box";
36
+ ```
37
+
38
+ ```html
39
+ <mona-list-box aria-label="Foods" [items]="items" textField="name" selectBy="id" [height]="'320px'"></mona-list-box>
40
+ ```
41
+
42
+ `items` accepts any `Iterable<T>`. `selectBy` derives the key used by `selectedKeys`/`selectedKeysChange`; when omitted, the data item itself is used as the key. The toolbar is shown by default with Move Up, Move Down, Clear Selection and Remove; the transfer actions join it once a `connectedList` is set — see [Connected list boxes with a transfer toolbar](#connected-list-boxes-with-a-transfer-toolbar). Pass `[toolbar]="false"` for a list without one.
43
+
44
+ ## Anatomy
45
+
46
+ Each structural directive below is an `ng-template` placed as projected content inside `<mona-list-box>...</mona-list-box>`.
47
+
48
+ | Directive | Selector | Template context | Replaces |
49
+ |----------------------------------|------------------------------------------|---------------------------------------------------------------------------|--------------------------------------------|
50
+ | `ListBoxHeaderTemplateDirective` | `ng-template[monaListBoxHeaderTemplate]` | None | No default — renders above the list |
51
+ | `ListBoxItemTemplateDirective` | `ng-template[monaListBoxItemTemplate]` | `ListBoxItemTemplateContext<T>`: `{ $implicit: T }` (the raw data item) | The default text rendered from `textField` |
52
+ | `ListBoxFooterTemplateDirective` | `ng-template[monaListBoxFooterTemplate]` | None | No default — renders below the list |
53
+ | `ListBoxNoDataTemplateDirective` | `ng-template[monaListBoxNoDataTemplate]` | None | The default "No data" placeholder |
54
+
55
+ ```html
56
+ <mona-list-box aria-label="Foods" [items]="items" textField="name" selectBy="id">
57
+ <ng-template monaListBoxHeaderTemplate>
58
+ <div class="font-medium px-3 py-2 border-b border-input-border">Food Items</div>
59
+ </ng-template>
60
+ <ng-template monaListBoxItemTemplate [monaListBoxItemTemplateOf]="items" let-item>
61
+ <span class="flex-1">{{ item.name }}</span>
62
+ <span class="text-green-600">${{ item.price }}</span>
63
+ </ng-template>
64
+ <ng-template monaListBoxNoDataTemplate>
65
+ <div class="flex items-center justify-center h-full">No items available.</div>
66
+ </ng-template>
67
+ </mona-list-box>
68
+ ```
69
+
70
+ Binding the list box's items to `monaListBoxItemTemplateOf` types `let-item` as the item type, so a typo such as `item.nmae` fails the template type check. Without it, the item is `any`, as before.
71
+
72
+ ## Examples
73
+
74
+ ### Selection
75
+
76
+ With `selectionMode="multiple"`, clicks toggle items, and `[(selectedKeys)]` holds the keys derived through `selectBy`.
77
+
78
+ `selection-example.component.ts`
79
+
80
+ ```typescript
81
+ import { Component, signal } from "@angular/core";
82
+ import { ListBoxComponent } from "@nanahoshi/mona-ui/list-box";
83
+
84
+ @Component({
85
+ selector: "app-list-box-selection-example",
86
+ imports: [ListBoxComponent],
87
+ templateUrl: "./selection-example.component.html"
88
+ })
89
+ export class ListBoxSelectionExampleComponent {
90
+ protected readonly fruits = [
91
+ { id: 1, name: "Apple" },
92
+ { id: 2, name: "Banana" },
93
+ { id: 3, name: "Cherry" },
94
+ { id: 4, name: "Grape" },
95
+ { id: 5, name: "Mango" },
96
+ { id: 6, name: "Orange" }
97
+ ];
98
+ protected readonly selectedIds = signal<number[]>([2]);
99
+ }
100
+ ```
101
+
102
+ `selection-example.component.html`
103
+
104
+ ```html
105
+ <div class="flex max-w-xs flex-col gap-2">
106
+ <mona-list-box
107
+ aria-label="Fruits"
108
+ height="240px"
109
+ selectBy="id"
110
+ selectionMode="multiple"
111
+ textField="name"
112
+ [items]="fruits"
113
+ [toolbar]="false"
114
+ [(selectedKeys)]="selectedIds" />
115
+ <span aria-live="polite" class="text-sm">Selected ids: {{ selectedIds().join(", ") || "none" }}</span>
116
+ </div>
117
+ ```
118
+
119
+ With the default `selectionMode` (`"single"`) and `singleSelectionToggleable` (`true`), clicking the selected item again deselects it. Set `[singleSelectionToggleable]="false"` to require selecting a different item instead.
120
+
121
+ ### A rearrangeable list
122
+
123
+ Without a `connectedList`, the toolbar offers Move Up, Move Down, Clear Selection and Remove. The handler reorders or removes the items, here with `moveIndices` from `@nanahoshi/mona-ui/common`.
124
+
125
+ `reorder-example.component.ts`
126
+
127
+ ```typescript
128
+ import { Component, signal } from "@angular/core";
129
+ import { moveIndices } from "@nanahoshi/mona-ui/common";
130
+ import { ListBoxComponent, type ListBoxActionEvent } from "@nanahoshi/mona-ui/list-box";
131
+
132
+ interface Step {
133
+ id: number;
134
+ name: string;
135
+ }
136
+
137
+ @Component({
138
+ selector: "app-list-box-reorder-example",
139
+ imports: [ListBoxComponent],
140
+ templateUrl: "./reorder-example.component.html"
141
+ })
142
+ export class ListBoxReorderExampleComponent {
143
+ protected readonly steps = signal<Step[]>([
144
+ { id: 1, name: "Run the tests" },
145
+ { id: 2, name: "Update the changelog" },
146
+ { id: 3, name: "Tag the release" },
147
+ { id: 4, name: "Publish the package" },
148
+ { id: 5, name: "Announce it" }
149
+ ]);
150
+
151
+ protected onAction(event: ListBoxActionEvent<Step>): void {
152
+ if (event.action === "moveUp" || event.action === "moveDown") {
153
+ const offset = event.action === "moveUp" ? -1 : 1;
154
+ this.steps.update(steps => moveIndices(steps, event.selectedIndices, offset));
155
+ } else if (event.action === "remove") {
156
+ this.steps.update(steps => steps.filter(step => !event.selectedItems.includes(step)));
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ `reorder-example.component.html`
163
+
164
+ ```html
165
+ <mona-list-box
166
+ aria-label="Release steps"
167
+ height="240px"
168
+ selectBy="id"
169
+ textField="name"
170
+ width="320px"
171
+ [items]="steps()"
172
+ [toolbar]="{ actions: ['moveUp', 'moveDown', 'remove'] }"
173
+ (actionClick)="onAction($event)" />
174
+ ```
175
+
176
+ ### Connected list boxes with a transfer toolbar
177
+
178
+ "To" actions fire on the first list box and carry the items to move to the connected one (its selection, or every item for `transferAllTo`). "From" actions fire on the connected list box and carry the items to move back.
179
+
180
+ `transfer-example.component.ts`
181
+
182
+ ```typescript
183
+ import { Component, signal } from "@angular/core";
184
+ import { ListBoxComponent, type ListBoxActionEvent } from "@nanahoshi/mona-ui/list-box";
185
+
186
+ interface Permission {
187
+ id: number;
188
+ name: string;
189
+ }
190
+
191
+ @Component({
192
+ selector: "app-list-box-transfer-example",
193
+ imports: [ListBoxComponent],
194
+ templateUrl: "./transfer-example.component.html"
195
+ })
196
+ export class ListBoxTransferExampleComponent {
197
+ protected readonly available = signal<Permission[]>([
198
+ { id: 1, name: "Read issues" },
199
+ { id: 2, name: "Write issues" },
200
+ { id: 3, name: "Manage labels" },
201
+ { id: 4, name: "Merge pull requests" },
202
+ { id: 5, name: "Delete branches" }
203
+ ]);
204
+ protected readonly grantedItems = signal<Permission[]>([]);
205
+
206
+ /** "To" actions fire on the first list box and carry the items to move into the connected one. */
207
+ protected onAvailableAction(event: ListBoxActionEvent<Permission>): void {
208
+ if (event.action === "transferTo" || event.action === "transferAllTo") {
209
+ this.grantedItems.update(items => [...items, ...event.selectedItems]);
210
+ this.available.update(items => items.filter(item => !event.selectedItems.includes(item)));
211
+ }
212
+ }
213
+
214
+ /** "From" actions fire on the connected list box and carry the items to move back. */
215
+ protected onGrantedAction(event: ListBoxActionEvent<Permission>): void {
216
+ if (event.action === "transferFrom" || event.action === "transferAllFrom") {
217
+ this.available.update(items => [...items, ...event.selectedItems]);
218
+ this.grantedItems.update(items => items.filter(item => !event.selectedItems.includes(item)));
219
+ }
220
+ }
221
+ }
222
+ ```
223
+
224
+ `transfer-example.component.html`
225
+
226
+ ```html
227
+ <div class="flex flex-wrap gap-2">
228
+ <mona-list-box
229
+ aria-label="Available permissions"
230
+ height="240px"
231
+ selectBy="id"
232
+ selectionMode="multiple"
233
+ textField="name"
234
+ width="260px"
235
+ [connectedList]="granted"
236
+ [items]="available()"
237
+ [toolbar]="{ actions: ['transferTo', 'transferAllTo', 'transferFrom', 'transferAllFrom'] }"
238
+ (actionClick)="onAvailableAction($event)" />
239
+ <mona-list-box
240
+ #granted
241
+ aria-label="Granted permissions"
242
+ height="240px"
243
+ selectBy="id"
244
+ selectionMode="multiple"
245
+ textField="name"
246
+ width="200px"
247
+ [items]="grantedItems()"
248
+ [toolbar]="false"
249
+ (actionClick)="onGrantedAction($event)" />
250
+ </div>
251
+ ```
252
+
253
+ Setting `connectedList` on the first list box is enough — the connected one does not need `connectedList` set back. The toolbar renders on the first list box and controls both lists; set `[toolbar]="false"` on the connected one, or it shows a second toolbar of its own for moving, clearing and removing. Name both list boxes: the toolbar's name and the transfer buttons' labels are built from them ("Available permissions actions", "Transfer to Granted permissions"). See [The component does not mutate `items` itself](#the-component-does-not-mutate-items-itself) for what each action requires from the consumer.
254
+
255
+ Once the consumer has moved the items, they are selected in the list box they moved to, and focus follows them there when the transfer button is now disabled.
256
+
257
+ ### Disabled items
258
+
259
+ ```html
260
+ <mona-list-box aria-label="Foods" [items]="items" textField="name" selectBy="id" disabledBy="locked"></mona-list-box>
261
+ ```
262
+
263
+ `disabledBy` takes a property name or a predicate. Disabled items can't be selected (by click, keys or typeahead), and no action carries them: Transfer All moves only the enabled items. Drag and drop between list boxes isn't supported; the [keyboard shortcuts](#keyboard) and the toolbar are the ways to move items.
264
+
265
+ ### Customizing the toolbar
266
+
267
+ ```html
268
+ <mona-list-box
269
+ aria-label="Available foods"
270
+ [items]="items"
271
+ textField="name"
272
+ selectBy="id"
273
+ [connectedList]="selected()"
274
+ [toolbar]="{ actions: ['transferTo', 'transferFrom'], position: 'right' }">
275
+ </mona-list-box>
276
+ ```
277
+
278
+ `toolbar` accepts `true` (all actions, right-positioned) or the bare `toolbar` attribute, `false` (no toolbar), or an options object. Omitting `actions` on the object falls back to all actions; passing `actions: []` renders no toolbar. The buttons always appear in the same order (Move Up, Move Down, the transfers, Clear Selection, Remove), whatever order `actions` lists them in; the transfer actions need a `connectedList`.
279
+
280
+ `position` is logical: `"right"` puts the toolbar after the list in the writing direction, so it appears on the left in RTL, and `"left"` before it. `"top"` and `"bottom"` place it above or below the list and lay its buttons out in a row. The transfer icons point along the reading direction (towards the connected list at the inline end, mirrored in RTL) in every position: up and down icons would read as Move Up and Move Down.
281
+
282
+ ## Behavior
283
+
284
+ ### The component does not mutate `items` itself
285
+
286
+ List Box never adds, removes, or reorders the collection passed to `items`. Every toolbar action — move, transfer, clear, remove — only emits `actionClick` with a cancelable event describing what was requested; updating the consumer's own data source (as in the [transfer example](#connected-list-boxes-with-a-transfer-toolbar) above) is required for the list to visibly change. Calling `event.preventDefault()` only skips the component's internal selection-clearing/scroll bookkeeping — it never affects whether data was already mutated by the consumer's own handler, since that mutation always happens in the same handler.
287
+
288
+ ### Which list box's `actionClick` fires
289
+
290
+ | Action | Fires on |
291
+ |-----------------------------------|---------------------------------------------------------------------------------------------------|
292
+ | `clear`, `remove` | Whichever list box (`this` or `connectedList`) currently holds the selection. |
293
+ | `moveUp`, `moveDown` | Whichever list box currently holds the selection. The buttons are disabled when there is none, or when the selection already touches the start (Move Up) or end (Move Down). |
294
+ | `transferTo`, `transferAllTo` | The list box the toolbar is attached to (the source). `selectedItems` is its selection, or all of its enabled items for `transferAllTo`. |
295
+ | `transferFrom`, `transferAllFrom` | The `connectedList` (the source). `selectedItems` is its selection, or all of its enabled items for `transferAllFrom`. |
296
+
297
+ Every event lists items in list order, not the order they were selected in, and leaves out disabled items. After a transfer, clear or remove that isn't prevented, the selections involved are cleared and reported through `selectionChange` and `selectedKeysChange`; after a transfer, the moved items that arrived in the target are then selected there and reported the same way.
298
+
299
+ ### Selection events
300
+
301
+ `selectionChange` and `selectedKeysChange` fire for every change the user makes: clicking or keying a selection, Clear Selection, a transfer or Remove that clears it, the moved items a transfer selects in its target, and a selection in the other list box of a connected pair (which clears this one, in either direction). Keys set through `[selectedKeys]` are not echoed back.
302
+
303
+ ### Arrow-key navigation moves the selection
304
+
305
+ Like List View's default, List Box navigates in `"select"` mode, and it can't be changed: in single selection, arrow keys and typeahead immediately change the selection rather than only moving focus. In multiple selection they move focus only, and Space, Ctrl+A (Cmd+A) and clicks change the selection.
306
+
307
+ ### `selectBy`/`textField` accept a property name or a function
308
+
309
+ Both accept a string property name or a function `(item: T) => K`/`(item: T) => string`. When `selectBy` is omitted, the data item itself is used as the selection key.
310
+
311
+ - `ListBoxClearEvent<T> | ListBoxMoveEvent<T> | ListBoxRemoveEvent<T> | ListBoxTransferEvent<T>` — narrow on the `action` field to determine which one was emitted.
312
+
313
+ ## Forms Integration
314
+
315
+ Form integration is not applicable. List Box is a display and selection widget, not a form control.
316
+
317
+ ## Accessibility
318
+
319
+ ### Keyboard
320
+
321
+ | Key | Action |
322
+ |-------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
323
+ | `ArrowDown` | Select the next enabled item. |
324
+ | `ArrowUp` | Select the previous enabled item. |
325
+ | `Home` | Select the first enabled item. |
326
+ | `End` | Select the last enabled item. |
327
+ | `PageDown` | Scroll the list forward by roughly one viewport. |
328
+ | `PageUp` | Scroll the list back by roughly one viewport. |
329
+ | `Enter` | Select the highlighted or currently selected item. |
330
+ | `Space`, `Ctrl+A`/`Cmd+A` (multiple selection) | Toggle the focused item; select every enabled item. |
331
+ | Any letter, digit, hyphen, or underscore | Typeahead: jumps to the next item whose text starts with the typed characters, staying on the active item while it still matches (resets after a short pause). In multiple selection it moves focus without changing the selection. |
332
+ | `Alt+ArrowUp` / `Alt+ArrowDown` | Move the selection up or down (Move Up / Move Down). |
333
+ | `Delete` | Remove the selection (Remove). |
334
+ | `Alt+ArrowRight` (`Alt+ArrowLeft` in RTL) | In a list box with a `connectedList`: transfer the selection to it (Transfer To). |
335
+ | `Alt+ArrowLeft` (`Alt+ArrowRight` in RTL) | In the connected list box: transfer the selection back (Transfer From). |
336
+
337
+ The shortcuts work on a focused option and run the same action as the toolbar button, so they fire the same `actionClick` event; each runs only when the toolbar offers that action, it is enabled, and the selection is in the focused list box. The transfer shortcuts assume the connected list box follows the first one in reading order, as the transfer icons do.
338
+
339
+ In the toolbar:
340
+
341
+ | Key | Action |
342
+ |---------------------------------------------------------|------------------------------------------------------------|
343
+ | `ArrowDown` / `ArrowUp` (toolbar beside the list) | Move to the next or previous enabled button, wrapping. |
344
+ | `ArrowRight` / `ArrowLeft` (toolbar above or below; mirrored in RTL) | Move to the next or previous enabled button, wrapping. |
345
+ | `Home` / `End` | Move to the first or last enabled button. |
346
+ | `Enter` / `Space` | Run the focused button's action. |
347
+
348
+ ### Focus
349
+
350
+ The list is a single Tab stop, as in List View — Tab/Shift+Tab moves focus into and out of the list as a whole, not between items; use the keyboard map above to move within the list. An empty list keeps the Tab stop on its `listbox` element. The toolbar is one more Tab stop: the button that last had focus, or the first enabled one.
351
+
352
+ After an action, focus stays on the button that ran it while that button is still enabled. When the button is now disabled, or a shortcut ran the action, focus moves to what the action acted on: the transferred items in the list box they moved to, the moved item, the item now in the removed one's place, or the first item that was selected before Clear Selection.
353
+
354
+ ### ARIA
355
+
356
+ | Attribute | When present | Value |
357
+ |----------------------------------|------------------------------------------------|----------------------------------------------------------------|
358
+ | `role` | Always, on the inner list element (even empty) | `"listbox"` |
359
+ | `aria-label` | When `aria-label` is set | The provided string (on the listbox, not on the host) |
360
+ | `aria-labelledby` | When `aria-labelledby` is set | The provided ids (on the listbox, not on the host) |
361
+ | `aria-multiselectable` | In multiple selection | `"true"` |
362
+ | `aria-describedby` | On an empty listbox | The "No data" text (or the `monaListBoxNoDataTemplate`) |
363
+ | `role` | Always, on each item | `"option"` |
364
+ | `aria-selected` | Always, on each item | Reflects whether the item is selected |
365
+ | `aria-disabled` | Always, on each item | Reflects whether the item is disabled by `disabledBy` |
366
+ | `aria-posinset` / `aria-setsize` | Always, on each item | The item's 1-based position and the total count |
367
+ | `role` | On the toolbar | `"toolbar"` |
368
+ | `aria-label` | On the toolbar, when it has a name | `toolbarAriaLabel`, else "{list box name} actions" |
369
+ | `aria-orientation` | On the toolbar | `"vertical"` beside the list, `"horizontal"` above or below it |
370
+
371
+ Each toolbar button carries its own `aria-label` matching its tooltip. The transfer buttons name the connected list box ("Transfer to Chosen foods", "Transfer all from Chosen foods") when it has a name (its `aria-label`, or the text of its `aria-labelledby` elements), and fall back to "Transfer to the other list" and similar when it doesn't.
372
+
373
+ After each action, a polite announcement reports what happened once the consumer's change has rendered: "2 items moved to Chosen foods", "Moved to position 1 of 4", "1 item removed" or "Selection cleared". Nothing is announced when the consumer didn't carry out the action (for example, the items didn't arrive in the target). The announcements and labels are translated messages (`listBox` namespace).
374
+
375
+ When connecting two list boxes, set a distinct `aria-label` on each so assistive technology can tell them apart — the component does not label them for you, and the toolbar's name and the transfer labels are built from them.
376
+
377
+ ## API
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
468
+
469
+ | Name | Type | Description |
470
+ | --- | --- | --- |
471
+ | `action` (read-only) | `Extract<ToolbarAction, "clear">` | Discriminant matching the `ListBoxActionEvent` union. |
472
+ | `selectedItems` (read-only) | `T[]` | The items that were selected when Clear Selection was clicked. |
473
+
474
+ ### `ListBoxMoveEvent`
475
+
476
+ **Type parameters:** `T = any`
477
+ **Extends:** `PreventableEvent`
478
+
479
+ #### Properties
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. |
512
+
513
+ ### Types
514
+
515
+ #### `LIST_BOX_DEFAULT_MESSAGES`
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 |
528
+ | --- | --- | --- |
529
+ | `$implicit` (read-only) | `T` | The raw data item being rendered. |
530
+
531
+ #### `ListBoxSelectionEvent`
532
+
533
+ **Type parameters:** `T = any`
534
+
535
+ | Name | Type | Description |
536
+ | --- | --- | --- |
537
+ | `deselectedItems` (read-only) | `T[]` | Items that were deselected (read-only). |
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
+ ```