@nanahoshi/mona-ui 0.25.0 → 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 (227) 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-group.mjs +1 -1
  75. package/fesm2022/nanahoshi-mona-ui-button.mjs +14 -2
  76. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +5 -2
  77. package/fesm2022/nanahoshi-mona-ui-chart.mjs +108 -22
  78. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +4 -0
  79. package/fesm2022/nanahoshi-mona-ui-chip.mjs +1 -1
  80. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +4 -0
  81. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +16 -2
  82. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  83. package/fesm2022/nanahoshi-mona-ui-command.mjs +924 -0
  84. package/fesm2022/nanahoshi-mona-ui-common.mjs +4 -0
  85. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +10 -6
  86. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +2 -1
  87. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +2 -1
  88. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +9 -5
  89. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +9 -5
  90. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +55 -1
  91. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -2
  92. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +13 -0
  93. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +5 -0
  94. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs} +2 -2
  95. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs → nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs} +5 -5
  96. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs → nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs} +18 -35
  97. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs} +5 -5
  98. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs} +4653 -4529
  99. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  100. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -0
  101. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1 -0
  102. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +168 -0
  103. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +19 -1
  104. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +14 -0
  105. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +32 -0
  106. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -0
  107. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -0
  108. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -0
  109. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -0
  110. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -0
  111. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -0
  112. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -0
  113. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -0
  114. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -0
  115. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -0
  116. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -0
  117. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -0
  118. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -0
  119. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +15 -8
  120. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +8 -5
  121. package/fesm2022/nanahoshi-mona-ui-notification.mjs +9 -0
  122. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
  123. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +5 -0
  124. package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -1
  125. package/fesm2022/nanahoshi-mona-ui-popover.mjs +14 -6
  126. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +48 -183
  127. package/fesm2022/nanahoshi-mona-ui-popup.mjs +16 -0
  128. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +4 -0
  129. package/fesm2022/nanahoshi-mona-ui-rating.mjs +2 -0
  130. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +7 -3
  131. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +2 -1
  132. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +5 -5
  133. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +1 -1
  134. package/fesm2022/nanahoshi-mona-ui-slider.mjs +8 -3
  135. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +10 -7
  136. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +18 -21
  137. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +11 -8
  138. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +9 -1
  139. package/fesm2022/nanahoshi-mona-ui-theme.mjs +53 -21
  140. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +2 -1
  141. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +16 -5
  142. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +13 -11
  143. package/fesm2022/nanahoshi-mona-ui-window.mjs +12 -5
  144. package/i18n/catalogs/en-US.messages.json +10 -0
  145. package/internal/popup-menu/package.json +4 -0
  146. package/llms.txt +123 -0
  147. package/locales/ar-sa/ar-sa.messages.json +10 -0
  148. package/locales/de-de/de-de.messages.json +10 -0
  149. package/locales/es-es/es-es.messages.json +10 -0
  150. package/locales/fr-fr/fr-fr.messages.json +10 -0
  151. package/locales/id-id/id-id.messages.json +10 -0
  152. package/locales/it-it/it-it.messages.json +10 -0
  153. package/locales/ja-jp/ja-jp.messages.json +10 -0
  154. package/locales/ko-kr/ko-kr.messages.json +10 -0
  155. package/locales/pt-br/pt-br.messages.json +10 -0
  156. package/locales/ru-ru/ru-ru.messages.json +10 -0
  157. package/locales/tr-tr/tr-tr.messages.json +10 -0
  158. package/locales/zh-cn/zh-cn.messages.json +10 -0
  159. package/locales/zh-tw/zh-tw.messages.json +10 -0
  160. package/package.json +9 -1
  161. package/styles.css +12 -2
  162. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -1
  163. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +8 -0
  164. package/types/nanahoshi-mona-ui-button.d.ts +12 -0
  165. package/types/nanahoshi-mona-ui-calendar.d.ts +3 -0
  166. package/types/nanahoshi-mona-ui-chart.d.ts +200 -0
  167. package/types/nanahoshi-mona-ui-check-box.d.ts +4 -0
  168. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +4 -0
  169. package/types/nanahoshi-mona-ui-collapsible.d.ts +10 -0
  170. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -1
  171. package/types/nanahoshi-mona-ui-command.d.ts +253 -0
  172. package/types/nanahoshi-mona-ui-common.d.ts +17 -1
  173. package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -2
  174. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -1
  175. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -1
  176. package/types/nanahoshi-mona-ui-dialog.d.ts +58 -1
  177. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +7 -3
  178. package/types/nanahoshi-mona-ui-dropdowns.d.ts +55 -1
  179. package/types/nanahoshi-mona-ui-editor.d.ts +31 -0
  180. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +13 -0
  181. package/types/nanahoshi-mona-ui-fieldset.d.ts +5 -0
  182. package/types/nanahoshi-mona-ui-grid.d.ts +162 -35
  183. package/types/nanahoshi-mona-ui-i18n.d.ts +144 -1
  184. package/types/nanahoshi-mona-ui-internal-list.d.ts +16 -1
  185. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +165 -0
  186. package/types/nanahoshi-mona-ui-internal-tree.d.ts +21 -2
  187. package/types/nanahoshi-mona-ui-internal.d.ts +4 -5
  188. package/types/nanahoshi-mona-ui-label.d.ts +1 -0
  189. package/types/nanahoshi-mona-ui-list-box.d.ts +27 -4
  190. package/types/nanahoshi-mona-ui-list-view.d.ts +34 -1
  191. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  192. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +10 -0
  193. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +10 -0
  194. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +10 -0
  195. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +10 -0
  196. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +10 -0
  197. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +10 -0
  198. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +10 -0
  199. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +10 -0
  200. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +10 -0
  201. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +10 -0
  202. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +10 -0
  203. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +10 -0
  204. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +10 -0
  205. package/types/nanahoshi-mona-ui-menubar.d.ts +10 -3
  206. package/types/nanahoshi-mona-ui-multi-select.d.ts +3 -3
  207. package/types/nanahoshi-mona-ui-notification.d.ts +9 -0
  208. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -1
  209. package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
  210. package/types/nanahoshi-mona-ui-pager.d.ts +5 -1
  211. package/types/nanahoshi-mona-ui-popover.d.ts +9 -1
  212. package/types/nanahoshi-mona-ui-popup-menu.d.ts +48 -161
  213. package/types/nanahoshi-mona-ui-popup.d.ts +16 -0
  214. package/types/nanahoshi-mona-ui-progress-bar.d.ts +4 -0
  215. package/types/nanahoshi-mona-ui-rating.d.ts +2 -0
  216. package/types/nanahoshi-mona-ui-segmented.d.ts +1 -0
  217. package/types/nanahoshi-mona-ui-sheet.d.ts +1 -1
  218. package/types/nanahoshi-mona-ui-slider.d.ts +2 -0
  219. package/types/nanahoshi-mona-ui-spinner.d.ts +7 -0
  220. package/types/nanahoshi-mona-ui-split-button.d.ts +7 -4
  221. package/types/nanahoshi-mona-ui-stepper.d.ts +11 -2
  222. package/types/nanahoshi-mona-ui-tabs.d.ts +4 -1
  223. package/types/nanahoshi-mona-ui-text-box.d.ts +9 -1
  224. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -1
  225. package/types/nanahoshi-mona-ui-tooltip.d.ts +10 -2
  226. package/types/nanahoshi-mona-ui-tree-view.d.ts +6 -5
  227. package/types/nanahoshi-mona-ui-window.d.ts +66 -1
@@ -0,0 +1,584 @@
1
+ # List View
2
+
3
+ > Renders a collection as a list, with optional selection, grouping and paging.
4
+
5
+ Entry point: `@nanahoshi/mona-ui/list-view`
6
+
7
+ **Selector:** `mona-list-view`
8
+
9
+ `ListViewComponent` renders a collection of items as a list, or as a listbox once you can select from it. Keyboard navigation is built in; selection, grouping, pagination and virtual scrolling are each opt-in through a companion directive applied to the same host element.
10
+
11
+ Import it from `@nanahoshi/mona-ui/list-view`, and name every list view with `aria-label` or `aria-labelledby`. Item templates can hold buttons and links: keys pressed in them reach them.
12
+
13
+ ## Overview
14
+
15
+ List View renders a collection of items: a `role="list"` of `listitem`s, or, once you can select from it, a `role="listbox"` of `option`s. Keyboard navigation is on by default; the other behaviors are opt-in through a companion attribute directive applied to the same `<mona-list-view>` host element:
16
+
17
+ - `monaListViewSelectable` — single or multiple selection, with optional checkboxes. Makes the list a listbox.
18
+ - `monaListViewNavigable` — changes how arrow keys, Home/End and typeahead navigate, or turns navigation off.
19
+ - `monaListViewGroupable` — groups items under a header row.
20
+ - `monaListViewPageable` — adds a pager below the list.
21
+ - `monaListViewVirtualScroll` — renders only the items currently in view.
22
+
23
+ **Use List View when:**
24
+
25
+ - You need a plain, single-column list of items with optional selection, grouping, or pagination.
26
+ - You want full control over item markup through a custom item template.
27
+
28
+ **Use `DropDownList`/`ComboBox` instead when:**
29
+
30
+ - The list must be presented inside a popup triggered by an input-like control.
31
+
32
+ **Use `Grid` instead when:**
33
+
34
+ - Items need multiple columns, per-column sorting/filtering, or cell-level editing.
35
+
36
+ ## Import & Quick Start
37
+
38
+ ```typescript
39
+ import { ListViewComponent } from "@nanahoshi/mona-ui/list-view";
40
+ ```
41
+
42
+ ```html
43
+ <mona-list-view aria-label="Foods" [items]="items" textField="name" [height]="'300px'"></mona-list-view>
44
+ ```
45
+
46
+ `items` accepts any `Iterable<T>`, and `textField` accepts either a property name or a function `(item: T) => string` used to render each item's default text. Without any behavior directive, the list is a `list` you can move through with the arrow keys; add `monaListViewSelectable` for selection (see [Examples](#examples)). Name every list view with `aria-label` or `aria-labelledby`.
47
+
48
+ ## Anatomy
49
+
50
+ Each structural directive below is an `ng-template` placed as projected content inside `<mona-list-view>...</mona-list-view>`.
51
+
52
+ | Directive | Selector | Template context | Replaces |
53
+ |----------------------------------------|------------------------------------------------|--------------------------------------------|------------------------------------------------------|
54
+ | `ListViewHeaderTemplateDirective` | `ng-template[monaListViewHeaderTemplate]` | None | No default — renders above the list |
55
+ | `ListViewItemTemplateDirective` | `ng-template[monaListViewItemTemplate]` | `ListViewItemTemplateContext<T>`: `{ $implicit: T }` (the raw data item) | The default text rendered from `textField` |
56
+ | `ListViewGroupHeaderTemplateDirective` | `ng-template[monaListViewGroupHeaderTemplate]` | `ListViewGroupHeaderTemplateContext<K>`: `{ $implicit: K }` (the group's value) | The default bold group header text |
57
+ | `ListViewFooterTemplateDirective` | `ng-template[monaListViewFooterTemplate]` | None | No default — renders below the list, above the pager |
58
+ | `ListViewNoDataTemplateDirective` | `ng-template[monaListViewNoDataTemplate]` | None | The default "No data" placeholder |
59
+
60
+ ```html
61
+ <mona-list-view aria-label="Foods" [items]="items" textField="name">
62
+ <ng-template monaListViewHeaderTemplate>
63
+ <div class="font-bold px-3 py-1">Food List</div>
64
+ </ng-template>
65
+ <ng-template monaListViewItemTemplate [monaListViewItemTemplateOf]="items" let-item>
66
+ <span class="flex-1">{{ item.name }}</span>
67
+ <span class="text-green-600">${{ item.price }}</span>
68
+ </ng-template>
69
+ <ng-template monaListViewNoDataTemplate>
70
+ <div class="flex items-center justify-center h-full">No items available.</div>
71
+ </ng-template>
72
+ </mona-list-view>
73
+ ```
74
+
75
+ Bind the list view's items to `[monaListViewItemTemplateOf]` to type `let-item` in the template; without it, the item is `any`. The group header template's value isn't type-checked. Both context types are exported.
76
+
77
+ ## Examples
78
+
79
+ ### Single and multiple selection
80
+
81
+ `selection-example.component.ts`
82
+
83
+ ```typescript
84
+ import { Component, signal } from "@angular/core";
85
+ import { ListViewComponent, ListViewSelectableDirective } from "@nanahoshi/mona-ui/list-view";
86
+
87
+ @Component({
88
+ selector: "app-list-view-selection-example",
89
+ imports: [ListViewComponent, ListViewSelectableDirective],
90
+ templateUrl: "./selection-example.component.html"
91
+ })
92
+ export class ListViewSelectionExampleComponent {
93
+ protected readonly channels = [
94
+ { id: 1, name: "Email" },
95
+ { id: 2, name: "Push notifications" },
96
+ { id: 3, name: "SMS" },
97
+ { id: 4, name: "Slack" },
98
+ { id: 5, name: "Weekly digest" }
99
+ ];
100
+ protected readonly selectedIds = signal<number[]>([1]);
101
+ }
102
+ ```
103
+
104
+ `selection-example.component.html`
105
+
106
+ ```html
107
+ <div class="flex max-w-xs flex-col gap-2">
108
+ <mona-list-view
109
+ aria-label="Notification channels"
110
+ height=""
111
+ selectBy="id"
112
+ textField="name"
113
+ [items]="channels"
114
+ [monaListViewSelectable]="{ mode: 'multiple', checkboxes: true }"
115
+ [(selectedKeys)]="selectedIds" />
116
+ <span aria-live="polite" class="text-sm">Selected ids: {{ selectedIds().join(", ") || "none" }}</span>
117
+ </div>
118
+ ```
119
+
120
+ `selectBy` derives the key used for `selectedKeys`/`selectedKeysChange`; when omitted, the data item itself is used as the key. `selectedKeysChange` fires for the user's selections, not for keys set through `selectedKeys`, so `[(selectedKeys)]` works. `mode: "multiple"` allows selecting more than one item; `toggleable` (single mode only) lets the user deselect the current item by clicking it again. Set `checkboxes: true` on the options object to render a checkbox per item instead of relying on background color alone.
121
+
122
+ ### Keyboard navigation
123
+
124
+ ```html
125
+ <mona-list-view aria-label="Foods" [items]="items" textField="name" [monaListViewNavigable]="{ mode: 'highlight', wrap: true }" monaListViewSelectable>
126
+ </mona-list-view>
127
+ ```
128
+
129
+ Arrow-key/Home/End/typeahead navigation is on without the directive — see [Keyboard](#keyboard); `monaListViewNavigable` configures it. `mode: "select"` (the default) moves the selection as the user navigates a single-selection list; `mode: "highlight"` only moves a visual highlight, leaving selection to click/Enter. `wrap` (default `false`) makes navigating past the last item cycle back to the first. `{ enabled: false }` turns navigation off.
130
+
131
+ ### Grouping
132
+
133
+ `grouping-example.component.ts`
134
+
135
+ ```typescript
136
+ import { Component } from "@angular/core";
137
+ import {
138
+ ListViewComponent,
139
+ ListViewGroupableDirective,
140
+ ListViewGroupHeaderTemplateDirective
141
+ } from "@nanahoshi/mona-ui/list-view";
142
+
143
+ @Component({
144
+ selector: "app-list-view-grouping-example",
145
+ imports: [ListViewComponent, ListViewGroupableDirective, ListViewGroupHeaderTemplateDirective],
146
+ templateUrl: "./grouping-example.component.html"
147
+ })
148
+ export class ListViewGroupingExampleComponent {
149
+ protected readonly groceries = [
150
+ { name: "Spinach", aisle: "Produce" },
151
+ { name: "Apples", aisle: "Produce" },
152
+ { name: "Carrots", aisle: "Produce" },
153
+ { name: "Milk", aisle: "Dairy" },
154
+ { name: "Butter", aisle: "Dairy" },
155
+ { name: "Rice", aisle: "Pantry" },
156
+ { name: "Lentils", aisle: "Pantry" }
157
+ ];
158
+ }
159
+ ```
160
+
161
+ `grouping-example.component.html`
162
+
163
+ ```html
164
+ <mona-list-view
165
+ aria-label="Groceries"
166
+ class="max-w-xs"
167
+ groupBy="aisle"
168
+ height="280px"
169
+ textField="name"
170
+ [items]="groceries"
171
+ [monaListViewGroupable]="{ orderBy: 'name' }">
172
+ <ng-template let-aisle monaListViewGroupHeaderTemplate>
173
+ <span class="font-semibold">{{ aisle }}</span>
174
+ </ng-template>
175
+ </mona-list-view>
176
+ ```
177
+
178
+ `groupBy` selects the field (or a function) used to bucket items; each distinct value renders as a group header row. `orderBy`/`orderByDirection` sort items within each group; `headerOrder` sorts the groups themselves by their key. Dates group by their time, so two `Date` objects for the same moment share a group and date groups sort chronologically. Headers show dates in the locale's medium date format and numbers in the locale's digits; set `headerText` to format them yourself. The group header template receives the group's value (a `Date` stays a `Date`). If `groupBy` is omitted while grouping is enabled, every item falls into a single, unlabeled group — always provide `groupBy` together with `monaListViewGroupable`.
179
+
180
+ ### Pagination
181
+
182
+ `paging-example.component.ts`
183
+
184
+ ```typescript
185
+ import { Component, signal } from "@angular/core";
186
+ import { ListViewComponent, ListViewPageableDirective } from "@nanahoshi/mona-ui/list-view";
187
+
188
+ @Component({
189
+ selector: "app-list-view-paging-example",
190
+ imports: [ListViewComponent, ListViewPageableDirective],
191
+ templateUrl: "./paging-example.component.html"
192
+ })
193
+ export class ListViewPagingExampleComponent {
194
+ protected readonly invoices = Array.from({ length: 42 }, (_, index) => ({
195
+ label: `Invoice #${1001 + index}`
196
+ }));
197
+ protected readonly page = signal(1);
198
+ }
199
+ ```
200
+
201
+ `paging-example.component.html`
202
+
203
+ ```html
204
+ <mona-list-view
205
+ aria-label="Invoices"
206
+ class="max-w-sm"
207
+ height=""
208
+ textField="label"
209
+ [items]="invoices"
210
+ [monaListViewPageable]="{ pageSize: 5, pageSizeValues: [5, 10, 20] }"
211
+ [(page)]="page" />
212
+ <p aria-live="polite" class="mt-2 text-sm">Page {{ page() }}</p>
213
+ ```
214
+
215
+ Adds a pager below the list. `[(page)]` and `[(pageSize)]` on the directive follow the user's paging. Pagination and virtualization are mutually exclusive: if `monaListViewVirtualScroll` is also enabled, the pager is hidden regardless of `monaListViewPageable`'s state — see [Pagination and virtualization don't combine](#pagination-and-virtualization-dont-combine).
216
+
217
+ ### Virtual scrolling
218
+
219
+ ```html
220
+ <mona-list-view aria-label="Foods" [items]="items" textField="name" [monaListViewVirtualScroll]="{ enabled: true, height: 32 }" [height]="'400px'">
221
+ </mona-list-view>
222
+ ```
223
+
224
+ Renders only the items currently scrolled into view, for large collections. `height` on the options object is the fixed row height, in pixels, used to measure the virtual scroll viewport — every item must render at that height for scrolling to stay accurate. The viewport takes the list view's `height`: the default `"100%"` needs a parent with a height, so in an unsized container pass a fixed `height`, or `""` to size the viewport to its items.
225
+
226
+ ### Infinite scroll
227
+
228
+ `infinite-scroll-example.component.ts`
229
+
230
+ ```typescript
231
+ import { Component, computed, signal } from "@angular/core";
232
+ import { ListViewComponent } from "@nanahoshi/mona-ui/list-view";
233
+
234
+ const PAGE_SIZE = 15;
235
+
236
+ @Component({
237
+ selector: "app-list-view-infinite-scroll-example",
238
+ imports: [ListViewComponent],
239
+ templateUrl: "./infinite-scroll-example.component.html"
240
+ })
241
+ export class ListViewInfiniteScrollExampleComponent {
242
+ readonly #visibleCount = signal(PAGE_SIZE);
243
+ protected readonly events = Array.from({ length: 90 }, (_, index) => ({ text: `Event ${index + 1}` }));
244
+ protected readonly loading = signal(false);
245
+ protected readonly visibleEvents = computed(() => this.events.slice(0, this.#visibleCount()));
246
+
247
+ /** Fakes a slow request before the next batch is shown. */
248
+ protected loadMore(): void {
249
+ if (this.loading() || this.#visibleCount() >= this.events.length) {
250
+ return;
251
+ }
252
+ this.loading.set(true);
253
+ setTimeout(() => {
254
+ this.#visibleCount.update(count => count + PAGE_SIZE);
255
+ this.loading.set(false);
256
+ }, 600);
257
+ }
258
+ }
259
+ ```
260
+
261
+ `infinite-scroll-example.component.html`
262
+
263
+ ```html
264
+ <mona-list-view
265
+ aria-label="Activity"
266
+ class="max-w-sm"
267
+ height="240px"
268
+ textField="text"
269
+ [items]="visibleEvents()"
270
+ [loading]="loading()"
271
+ (scrollBottom)="loadMore()" />
272
+ <p aria-live="polite" class="mt-2 text-sm">Showing {{ visibleEvents().length }} of {{ events.length }}</p>
273
+ ```
274
+
275
+ `scrollBottom` emits once each time the list arrives within roughly 3px of its bottom edge (scrolling away and back emits again, as does reaching the new end after more items load), whichever of the plain list or the virtual scroll viewport is active. Combine it with slicing a larger source collection, and `loading` while the next batch arrives, to implement infinite loading — see [`scrollBottom` and `monaListViewPageable`](#scrollbottom-and-monalistviewpageable).
276
+
277
+ ## Behavior
278
+
279
+ ### Pagination and virtualization don't combine
280
+
281
+ When `monaListViewVirtualScroll` reports `enabled: true`, the pager rendered by `monaListViewPageable` is not shown, even if the pageable options are also `enabled: true`. Only one of the two should be applied to a given list.
282
+
283
+ ### `scrollBottom` and `monaListViewPageable`
284
+
285
+ `scrollBottom` only fires while pagination is disabled. If `monaListViewPageable` is enabled, scrolling to the bottom of the current page does not emit `scrollBottom` — pagination and infinite scroll are alternative strategies for large collections, not composable ones.
286
+
287
+ ### Option types
288
+
289
+ `GroupableOptions`, `NavigableOptions`, `PagerSettings`, `SelectableOptions` and `VirtualScrollOptions` are exported from `@nanahoshi/mona-ui/list-view` as types.
290
+
291
+ ### Each list view has its own state
292
+
293
+ A list view keeps its items, selection and paging to itself, so a list view inside another one's templates, or inside a dropdown or list box, never shares or overwrites their state. Equal items (two `"a"` strings, or the same object twice) are each shown.
294
+
295
+ ### Grouping key type defaults to the item type
296
+
297
+ `monaListViewGroupable`'s generic key parameter defaults to the item type itself rather than `unknown`. In practice, always pass an explicit `groupBy` selector (a property name or a function returning the group key) — grouping without one produces a single, unlabeled group.
298
+
299
+ ## Forms Integration
300
+
301
+ Form integration is not applicable. List View is a display and selection widget, not a form control.
302
+
303
+ ## Accessibility
304
+
305
+ ### Keyboard
306
+
307
+ Keyboard navigation is on by default; `monaListViewNavigable` changes its mode and wrapping, or turns it off with `{ enabled: false }`.
308
+
309
+ | Key | Action |
310
+ |-------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
311
+ | `ArrowDown` | Move to the next enabled item. |
312
+ | `ArrowUp` | Move to the previous enabled item. |
313
+ | `Home` | Move to the first enabled item. |
314
+ | `End` | Move to the last enabled item. |
315
+ | `PageDown` | Scroll the list forward by roughly one viewport. |
316
+ | `PageUp` | Scroll the list back by roughly one viewport. |
317
+ | `Enter` | Select the highlighted or currently selected item, and emit `itemActivate`. |
318
+ | Any letter, digit, space, 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 only. |
319
+
320
+ Disabled items (`disabledBy`) are skipped, and can't be selected by click, Enter or typeahead. Arrow keys with Alt are left to the page (the list box uses them to move items). Keys pressed in controls inside header, footer or item templates are left to those controls: an input in a header template takes typing and arrows, and Enter presses a button in an item.
321
+
322
+ ### Focus
323
+
324
+ The list is a single Tab stop. Tabbing in focuses the item last moved to, else the last selected item shown, else the first enabled item; a selection on another page or scrolled out of a virtual list doesn't take the Tab stop away. Tab/Shift+Tab then leave the list. When the focused item is removed from `items`, focus moves to the item now at its position (or the last one). An empty list keeps its named list element as the Tab stop, described by the "No data" text, so it stays in the accessibility tree. The focused item has a solid 2px ring.
325
+
326
+ ### ARIA
327
+
328
+ A list view you can select from (`monaListViewSelectable`) is a `listbox` of `option`s. Without selection it is a `list` of `listitem`s, so item templates may hold buttons and links.
329
+
330
+ | Attribute | Where | Value |
331
+ |----------------------------------|-------------------------------------------|------------------------------------------------------------------------|
332
+ | `role` | The inner list element (also when empty) | `"listbox"` when selectable, else `"list"` |
333
+ | `aria-describedby` | The inner list element, when empty | The "No data" text, or the no-data template |
334
+ | `role` | Each item | `"option"` when selectable, else `"listitem"` |
335
+ | `aria-label` / `aria-labelledby` | The inner list element | From the `aria-label` / `aria-labelledby` inputs (not left on the host) |
336
+ | `aria-multiselectable` | The listbox, in multiple selection | `true` |
337
+ | `aria-busy` | The inner list element, while `loading` | `true` |
338
+ | `aria-selected` / `aria-disabled`| Each option | Whether the item is selected / disabled |
339
+ | `aria-posinset` / `aria-setsize` | Each item | The item's 1-based position and the total count among non-header items |
340
+ | `role="group"` | Each group of options, when grouped | Named by its header (`aria-labelledby`); a plain list nests a `list` instead. With virtual scrolling the list stays flat and each option points at its header with `aria-describedby`. |
341
+ | `role="status"` | A visually hidden element after the list | "Loading" while `loading`, "No data" when there are no items |
342
+
343
+ Give every list view a name with `aria-label` or `aria-labelledby`. A paged list view names its pager "{name} pagination" (the `list.pagerLabel` message), or `pagerAriaLabel`, so several paged lists on a page have different landmarks.
344
+
345
+ ## API
346
+
347
+ Everything below is imported from `@nanahoshi/mona-ui/list-view`.
348
+
349
+ ### `ListViewComponent`
350
+
351
+ **Selector:** `mona-list-view`
352
+ **Type parameters:** `T = unknown`
353
+
354
+ #### Inputs
355
+
356
+ | Name | Type | Default | Description |
357
+ | --- | --- | --- | --- |
358
+ | `aria-label` | `string` | `""` | Accessible name for the list view's `listbox` element. Describe what the list represents. |
359
+ | `aria-labelledby` | `string` | `""` | Id of the element that names the list view's list, as an alternative to `aria-label`. |
360
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
361
+ | `disabledBy` | `string \| Predicate<T> \| null \| undefined` | `""` | Property name or predicate that marks an item as disabled. Disabled items can't be selected, activated or reached by typeahead. |
362
+ | `height` | `string \| number` | `"100%"` | Sets the height of the list view. With virtual scrolling, the viewport takes this height, so a percentage needs a parent with a height; `""` sizes the viewport to its items instead. |
363
+ | `items` | `Iterable<T>` | `[]` | Collection of items to render. |
364
+ | `listClass` | `string` | `""` | Sets the classes of the inner UL element. |
365
+ | `listItemClass` | `string` | `""` | Sets the classes of the list items. |
366
+ | `listItemStyle` | `Partial<CSSStyleDeclaration>` | `{}` | Sets the style of the list items. |
367
+ | `listStyle` | `Partial<CSSStyleDeclaration>` | `{}` | Sets the style of the list. |
368
+ | `loading` | `boolean` | `false` | Marks the list as loading: it gets `aria-busy` and a polite "Loading" status. |
369
+ | `maxHeight` | `string \| number` | `""` | Sets the maximum height of the list. |
370
+ | `maxWidth` | `string \| number` | `""` | Sets the maximum width of the list. |
371
+ | `pagerAriaLabel` | `string` | `""` | Accessible name of the pager. Defaults to "{name} pagination" from the list view's `aria-label`, so two paged list views on a page have different landmarks. |
372
+ | `rounded` | `"large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
373
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
374
+ | `textField` | `ListKeySelector<T, string> \| undefined` | `""` | Property name or accessor used to derive the display text from a data item. |
375
+ | `width` | `string \| number` | `"100%"` | Sets the width of the list view. |
376
+
377
+ #### Outputs
378
+
379
+ | Name | Type | Description |
380
+ | --- | --- | --- |
381
+ | `itemActivate` | `T` | Emitted with the data item when the user activates an enabled item by clicking it or pressing Enter on it. Fires whether or not the list view is selectable. |
382
+ | `scrollBottom` | `Event` | Emitted once each time the list is scrolled to its end, when the list view isn't paged. Scrolling away and back emits again, as does reaching the new end after more items are added. |
383
+
384
+ ### `ListViewPageableDirective`
385
+
386
+ **Selector:** `mona-list-view[monaListViewPageable]`
387
+
388
+ #### Inputs
389
+
390
+ | Name | Type | Default | Description |
391
+ | --- | --- | --- | --- |
392
+ | `monaListViewPageable` | `Partial<PagerSettings> \| ""` | `""` | Enables pagination. An empty string enables pagination with default settings (`type: "numeric"`, `previousNext: true`, `pageSize: 10`, `pageSizeValues: [5, 10, 20, 25, 50, 100]`, `visiblePages: 5`); pass an object to override any field. Has no visible effect while `monaListViewVirtualScroll` is enabled — see Pagination and virtualization don't combine. |
393
+ | `page` (two-way) | `number` | `1` | The current page. Supports two-way binding via `[(page)]`; updates when the user navigates the pager and can be set to navigate programmatically. |
394
+ | `pageSize` (two-way) | `number \| undefined` | `undefined` | Items per page. Supports two-way binding via `[(pageSize)]`: it updates when the user picks a size in the pager. While unset, the options' `pageSize` applies. A new size keeps the first item of the current page in view. |
395
+
396
+ #### Outputs
397
+
398
+ | Name | Type | Description |
399
+ | --- | --- | --- |
400
+ | `pageChange` | `number` | Emitted when `page` changes. |
401
+ | `pageSizeChange` | `number \| undefined` | Emitted when `pageSize` changes. |
402
+ | `pageSizeSelect` | `PageSizeChangeEvent` | Emitted when the user picks a page size, before it is applied. Call `preventDefault()` on the event to keep the current size. |
403
+
404
+ ### `ListViewSelectableDirective`
405
+
406
+ **Selector:** `mona-list-view[monaListViewSelectable]`
407
+ **Type parameters:** `T`, `K = unknown`
408
+
409
+ #### Inputs
410
+
411
+ | Name | Type | Default | Description |
412
+ | --- | --- | --- | --- |
413
+ | `monaListViewSelectable` | `Partial<SelectableOptions> \| ""` | `""` | Enables selection. An empty string enables single selection with default settings; pass an object to configure `mode` (`"single"` or `"multiple"`), `toggleable`, and `checkboxes`. |
414
+ | `selectBy` | `ListKeySelector<T, K> \| undefined` | `""` | Property name or accessor used to derive the selection key from a data item. When omitted, the data item itself is used as the key. |
415
+ | `selectedKeys` | `Iterable<K>` | `[]` | The selection, expressed as keys rather than items. Bind `[(selectedKeys)]` to keep it in sync. |
416
+
417
+ #### Outputs
418
+
419
+ | Name | Type | Description |
420
+ | --- | --- | --- |
421
+ | `selectedKeysChange` | `K[]` | Emitted with the selected keys when the user selects or deselects an item. Not emitted for keys set through `selectedKeys`. |
422
+
423
+ ### `ListViewGroupableDirective`
424
+
425
+ **Selector:** `mona-list-view[monaListViewGroupable]`
426
+ **Type parameters:** `T`, `K = T`
427
+
428
+ #### Inputs
429
+
430
+ | Name | Type | Default | Description |
431
+ | --- | --- | --- | --- |
432
+ | `groupBy` | `ListKeySelector<T, K> \| undefined` | `""` | Property name or accessor used to derive the group key from a data item. |
433
+ | `monaListViewGroupable` | `GroupableOptions<T, K> \| ""` | `""` | Enables grouping. An empty string enables grouping with default settings; pass an object to configure `headerOrder`, `headerText`, `orderBy`, and `orderByDirection`. |
434
+
435
+ ### `ListViewItemTemplateDirective`
436
+
437
+ Template for each item of a list view. The data item is the template's implicit value (`let-item`). Bind the list
438
+ view's items to `monaListViewItemTemplateOf` to type it; without it, the item is `any` in templates.
439
+
440
+ **Selector:** `ng-template[monaListViewItemTemplate]`
441
+ **Type parameters:** `T = any`
442
+
443
+ #### Inputs
444
+
445
+ | Name | Type | Default | Description |
446
+ | --- | --- | --- | --- |
447
+ | `monaListViewItemTemplateOf` | `Iterable<T> \| null \| undefined` | `null` | The list view's items, used only to type the template's item. Optional. |
448
+
449
+ #### Template context
450
+
451
+ | Name | Type | Description |
452
+ | --- | --- | --- |
453
+ | `$implicit` | `T` | The data item (`let-item`), or the group's value (`let-group`). |
454
+
455
+ ### `ListViewNavigableDirective`
456
+
457
+ **Selector:** `mona-list-view[monaListViewNavigable]`
458
+ **Type parameters:** `T`
459
+
460
+ #### Inputs
461
+
462
+ | Name | Type | Default | Description |
463
+ | --- | --- | --- | --- |
464
+ | `monaListViewNavigable` | `Partial<NavigableOptions> \| ""` | `""` | Configures keyboard navigation, which is on without the directive. An empty string keeps the defaults (`enabled: true`, `mode: "select"`, `wrap: false`); pass an object to override any field. |
465
+
466
+ ### `ListViewVirtualScrollDirective`
467
+
468
+ **Selector:** `mona-list-view[monaListViewVirtualScroll]`
469
+ **Type parameters:** `T`
470
+
471
+ #### Inputs
472
+
473
+ | Name | Type | Default | Description |
474
+ | --- | --- | --- | --- |
475
+ | `monaListViewVirtualScroll` (required) | `VirtualScrollOptions` | — | Enables virtual scrolling. `height` is the fixed row height, in pixels, used to measure the viewport; when omitted, a `28`px row height is assumed. |
476
+
477
+ ### `ListViewFooterTemplateDirective`
478
+
479
+ **Selector:** `ng-template[monaListViewFooterTemplate]`
480
+
481
+ ### `ListViewGroupHeaderTemplateDirective`
482
+
483
+ Template for the header of each group. The group's value is the template's implicit value (`let-group`); see
484
+ `ListViewGroupHeaderTemplateContext`. The context isn't type-checked, so templates written against the value's own
485
+ type keep compiling.
486
+
487
+ **Selector:** `ng-template[monaListViewGroupHeaderTemplate]`
488
+
489
+ ### `ListViewHeaderTemplateDirective`
490
+
491
+ **Selector:** `ng-template[monaListViewHeaderTemplate]`
492
+
493
+ ### `ListViewNoDataTemplateDirective`
494
+
495
+ **Selector:** `ng-template[monaListViewNoDataTemplate]`
496
+
497
+ ### Types
498
+
499
+ #### `ListViewGroupHeaderTemplateContext`
500
+
501
+ The context of a `monaListViewGroupHeaderTemplate`: the group's value (what `groupBy` returned for its items), as
502
+ `let-group`.
503
+
504
+ **Type parameters:** `G = unknown`
505
+
506
+ | Name | Type |
507
+ | --- | --- |
508
+ | `$implicit` (read-only) | `G` |
509
+
510
+ #### `ListViewItemTemplateContext`
511
+
512
+ The context of a `monaListViewItemTemplate`: the data item, as `let-item`.
513
+
514
+ **Type parameters:** `T = unknown`
515
+
516
+ | Name | Type | Description |
517
+ | --- | --- | --- |
518
+ | `$implicit` (read-only) | `T` | The data item (`let-item`), or the group's value (`let-group`). |
519
+
520
+ #### `NavigableOptions`
521
+
522
+ | Name | Type | Description |
523
+ | --- | --- | --- |
524
+ | `enabled` | `boolean` | Whether keyboard navigation is active. |
525
+ | `mode` | `NavigationMode` | Whether navigation only moves a visual highlight (`"highlight"`) or also changes selection (`"select"`). |
526
+ | `wrap` | `boolean` | Whether navigating past the last (or before the first) item cycles to the other end. |
527
+
528
+ #### `PagerSettings`
529
+
530
+ | Name | Type | Description |
531
+ | --- | --- | --- |
532
+ | `enabled` | `boolean` | Whether the pager is active. |
533
+ | `firstLast` | `boolean` | Whether first/last page buttons are shown. |
534
+ | `pageSize` | `number` | Number of items shown per page. |
535
+ | `pageSizeValues` | `number[] \| boolean` | Page size options shown in the pager, or `false`/`true` to hide/show a default set. |
536
+ | `previousNext` | `boolean` | Whether previous/next page buttons are shown. |
537
+ | `showInfo` | `boolean` | Whether a page summary (e.g. "1-10 of 50") is shown. |
538
+ | `type` | `"numeric" \| "input"` | Whether pages are selected via numbered buttons or a page-number input. |
539
+ | `visiblePages` | `number` | Number of numeric page buttons shown at once, when `type` is `"numeric"`. |
540
+
541
+ #### `VirtualScrollOptions`
542
+
543
+ | Name | Type | Description |
544
+ | --- | --- | --- |
545
+ | `enabled` | `boolean` | Whether virtual scrolling is active. |
546
+ | `height?` | `number` | Fixed row height, in pixels, used to measure the virtual scroll viewport. |
547
+
548
+ #### `GroupableOptions`
549
+
550
+ ```typescript
551
+ type GroupableOptions<T = unknown, R = unknown> = { enabled?: boolean; headerOrder?: "asc" | "desc"; headerText?: (value: unknown) => string; } & OrderByOptions<T, R>;
552
+ ```
553
+
554
+ #### `NavigationMode`
555
+
556
+ Whether arrow keys only highlight an item, or select it as well.
557
+
558
+ ```typescript
559
+ type NavigationMode = "highlight" | "select";
560
+ ```
561
+
562
+ #### `OrderByOptions`
563
+
564
+ How the items within each group are ordered. Leave both out to keep their order.
565
+
566
+ ```typescript
567
+ type OrderByOptions<T, R> = | { orderBy?: never; orderByDirection?: never } | { orderBy: string | Selector<T, R>; orderByDirection?: "asc" | "desc"; };
568
+ ```
569
+
570
+ #### `SelectableOptions`
571
+
572
+ ```typescript
573
+ type SelectableOptions = | { checkboxes?: boolean; enabled?: boolean; mode: "single"; toggleable?: boolean; } | { checkboxes?: boolean; enabled?: boolean; mode: "multiple"; };
574
+ ```
575
+
576
+ #### `ListKeySelector`
577
+
578
+ From `@nanahoshi/mona-ui/list`.
579
+
580
+ ```typescript
581
+ type ListKeySelector<T, K = unknown> = string | Selector<T, K> | null;
582
+ ```
583
+
584
+ **Documented elsewhere:** [`PageSizeChangeEvent`](pager.md)