@nanahoshi/mona-ui 0.27.1 → 0.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/docs/api/auto-complete.md +67 -0
  2. package/docs/api/avatar.md +31 -0
  3. package/docs/api/breadcrumb.md +74 -0
  4. package/docs/api/button-group.md +71 -0
  5. package/docs/api/button.md +84 -0
  6. package/docs/api/calendar.md +123 -0
  7. package/docs/api/card.md +97 -0
  8. package/docs/api/chart.md +4380 -0
  9. package/docs/api/check-box.md +70 -0
  10. package/docs/api/chip.md +55 -0
  11. package/docs/api/circular-progress-bar.md +71 -0
  12. package/docs/api/collapsible.md +71 -0
  13. package/docs/api/color-gradient.md +54 -0
  14. package/docs/api/color-palette.md +52 -0
  15. package/docs/api/color-picker.md +89 -0
  16. package/docs/api/combo-box.md +69 -0
  17. package/docs/api/command.md +282 -0
  18. package/docs/api/common.md +599 -0
  19. package/docs/api/contextmenu.md +239 -0
  20. package/docs/api/date-input.md +119 -0
  21. package/docs/api/date-picker.md +67 -0
  22. package/docs/api/datetime-picker.md +72 -0
  23. package/docs/api/dialog.md +291 -0
  24. package/docs/api/dropdown-button.md +248 -0
  25. package/docs/api/dropdown-list.md +72 -0
  26. package/docs/api/dropdowns.md +172 -0
  27. package/docs/api/editor.md +117 -0
  28. package/docs/api/expansion-panel.md +85 -0
  29. package/docs/api/fieldset.md +33 -0
  30. package/docs/api/filter.md +116 -0
  31. package/docs/api/grid.md +1445 -0
  32. package/docs/api/i18n.md +1699 -0
  33. package/docs/api/label.md +58 -0
  34. package/docs/api/list-box.md +301 -0
  35. package/docs/api/list-view.md +294 -0
  36. package/docs/api/list.md +119 -0
  37. package/docs/api/locales.md +134 -0
  38. package/docs/api/menubar.md +275 -0
  39. package/docs/api/multi-select.md +92 -0
  40. package/docs/api/notification.md +164 -0
  41. package/docs/api/numeric-text-box.md +130 -0
  42. package/docs/api/otp-input.md +100 -0
  43. package/docs/api/pager.md +371 -0
  44. package/docs/api/placeholder.md +18 -0
  45. package/docs/api/popover.md +170 -0
  46. package/docs/api/popup-menu.md +328 -0
  47. package/docs/api/popup.md +299 -0
  48. package/docs/api/progress-bar.md +79 -0
  49. package/docs/api/query.md +367 -0
  50. package/docs/api/radio-button.md +113 -0
  51. package/docs/api/rating.md +187 -0
  52. package/docs/api/scroll-view.md +93 -0
  53. package/docs/api/segmented.md +114 -0
  54. package/docs/api/sheet.md +65 -0
  55. package/docs/api/sidebar.md +583 -0
  56. package/docs/api/skeleton.md +26 -0
  57. package/docs/api/slider.md +173 -0
  58. package/docs/api/spinner.md +132 -0
  59. package/docs/api/split-button.md +261 -0
  60. package/docs/api/splitter.md +57 -0
  61. package/docs/api/stepper.md +148 -0
  62. package/docs/api/switch.md +78 -0
  63. package/docs/api/tabs.md +139 -0
  64. package/docs/api/text-area.md +20 -0
  65. package/docs/api/text-box.md +106 -0
  66. package/docs/api/theme.md +627 -0
  67. package/docs/api/time-picker.md +69 -0
  68. package/docs/api/time-selector.md +54 -0
  69. package/docs/api/tooltip.md +112 -0
  70. package/docs/api/tree-view.md +631 -0
  71. package/docs/api/window.md +245 -0
  72. package/docs/auto-complete.md +28 -329
  73. package/docs/avatar.md +4 -24
  74. package/docs/breadcrumb.md +10 -65
  75. package/docs/button-group.md +7 -60
  76. package/docs/button.md +8 -67
  77. package/docs/calendar.md +16 -121
  78. package/docs/card.md +16 -79
  79. package/docs/chart-bar.md +16 -234
  80. package/docs/chart-financial.md +10 -121
  81. package/docs/chart-funnel.md +13 -176
  82. package/docs/chart-heatmap.md +15 -131
  83. package/docs/chart-line-area.md +12 -137
  84. package/docs/chart-pie.md +17 -221
  85. package/docs/chart-radar.md +13 -129
  86. package/docs/chart-radial.md +13 -211
  87. package/docs/chart-scatter.md +6 -74
  88. package/docs/chart-treemap.md +14 -196
  89. package/docs/chart.md +154 -1892
  90. package/docs/checkbox.md +5 -61
  91. package/docs/chip.md +7 -42
  92. package/docs/circular-progress-bar.md +9 -61
  93. package/docs/collapsible.md +5 -87
  94. package/docs/color-gradient.md +8 -81
  95. package/docs/color-palette.md +7 -69
  96. package/docs/color-picker.md +9 -105
  97. package/docs/combo-box.md +28 -331
  98. package/docs/command.md +25 -236
  99. package/docs/contextmenu.md +15 -140
  100. package/docs/date-picker.md +7 -110
  101. package/docs/datetime-picker.md +7 -129
  102. package/docs/decimal-textbox.md +6 -69
  103. package/docs/dialog.md +23 -263
  104. package/docs/dropdown-button.md +15 -146
  105. package/docs/dropdown-list.md +29 -332
  106. package/docs/editor.md +8 -164
  107. package/docs/expansion-panel.md +7 -69
  108. package/docs/fieldset.md +5 -24
  109. package/docs/grid-columns.md +12 -92
  110. package/docs/grid-editing.md +29 -291
  111. package/docs/grid-grouping.md +11 -50
  112. package/docs/grid-rows.md +10 -74
  113. package/docs/grid-selection.md +7 -36
  114. package/docs/grid-server.md +8 -293
  115. package/docs/grid-sorting-filtering.md +10 -333
  116. package/docs/grid-state-export.md +17 -228
  117. package/docs/grid.md +23 -216
  118. package/docs/input.md +7 -19
  119. package/docs/label.md +8 -39
  120. package/docs/list-box.md +21 -253
  121. package/docs/list-view.md +25 -232
  122. package/docs/menubar.md +21 -167
  123. package/docs/multi-select.md +31 -350
  124. package/docs/notification.md +17 -116
  125. package/docs/numeric-textbox.md +9 -78
  126. package/docs/otp-input.md +9 -95
  127. package/docs/pager.md +19 -239
  128. package/docs/placeholder.md +5 -18
  129. package/docs/popover.md +13 -123
  130. package/docs/popup-menu.md +22 -243
  131. package/docs/popup.md +24 -248
  132. package/docs/progress-bar.md +10 -75
  133. package/docs/radio-button.md +8 -96
  134. package/docs/range-slider.md +9 -82
  135. package/docs/rating.md +15 -163
  136. package/docs/scroll-view.md +9 -86
  137. package/docs/segmented.md +8 -90
  138. package/docs/sheet.md +10 -74
  139. package/docs/sidebar-menus.md +20 -155
  140. package/docs/sidebar-state.md +16 -134
  141. package/docs/sidebar.md +18 -218
  142. package/docs/skeleton.md +5 -26
  143. package/docs/slider.md +9 -97
  144. package/docs/spinner.md +15 -95
  145. package/docs/split-button.md +21 -166
  146. package/docs/splitter.md +9 -56
  147. package/docs/stepper.md +13 -127
  148. package/docs/switch.md +8 -58
  149. package/docs/tabs.md +13 -111
  150. package/docs/textarea.md +4 -13
  151. package/docs/textbox.md +10 -77
  152. package/docs/time-picker.md +7 -112
  153. package/docs/tooltip-directive.md +12 -96
  154. package/docs/tooltip.md +12 -96
  155. package/docs/tree-view.md +42 -495
  156. package/docs/window.md +19 -230
  157. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +1 -0
  158. package/fesm2022/nanahoshi-mona-ui-common.mjs +3 -0
  159. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +13 -1
  160. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -0
  161. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +9 -0
  162. package/llms.txt +74 -0
  163. package/package.json +1 -1
  164. package/types/nanahoshi-mona-ui-collapsible.d.ts +2 -0
  165. package/types/nanahoshi-mona-ui-common.d.ts +6 -0
  166. package/types/nanahoshi-mona-ui-date-input.d.ts +18 -1
  167. package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -0
  168. package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
package/docs/otp-input.md CHANGED
@@ -435,105 +435,19 @@ The `FormField` directive automatically synchronizes value, disabled, name, read
435
435
 
436
436
  ## API
437
437
 
438
- Everything below is imported from `@nanahoshi/mona-ui/otp-input`.
439
-
440
- ### `OtpInputComponent`
441
-
442
- **Selector:** `mona-otp-input`
443
- **Implements:** `FormValueControl<string>`
444
-
445
- #### Inputs
446
-
447
- | Name | Type | Default | Description |
448
- | --- | --- | --- | --- |
449
- | `aria-describedby` | `string \| null` | `null` | Id of an element that describes the inner `<input>`, such as an error message. |
450
- | `aria-label` | `string \| null` | `null` | Accessible name for the inner `<input>` element. A `<label>` or `mona-label` names it too, and the generic "Verification code" name only applies when there is neither. |
451
- | `aria-labelledby` | `string \| null` | `null` | Id of the element that labels the inner `<input>`. |
452
- | `characterPattern` | `RegExp \| null` | `null` | Regular expression used to determine whether each individual OTP character is allowed. |
453
- | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
454
- | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
455
- | `groupLength` | `number \| number[] \| null` | `null` | Configures slot grouping lengths. Accepts a uniform number or an array of group sizes. |
456
- | `inputAttributes` | `AttributeConfig` | `{}` | Additional HTML attributes applied directly to the inner `<input>` element. |
457
- | `inputId` | `string` | `generated` | Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the control. A unique id is generated when it isn't set. |
458
- | `invalid` | `boolean` | `false` | Marks the OTP input as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
459
- | `length` | `number` | `4` | Sets the total number of characters accepted by the OTP input and the number of visual slots. |
460
- | `name` | `string` | `""` | Name of the native input, used in native form submission and by browsers for autofill. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
461
- | `placeholder` | `string` | `""` | Hint character displayed in empty visual slots. |
462
- | `readonly` | `boolean` | `false` | Prevents value changes while preserving the component's focusability and visual state. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
463
- | `required` | `boolean` | `false` | Marks the OTP input as required. Triggers invalid state when touched and incomplete. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
464
- | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the OTP slots. |
465
- | `separator` | `string` | `""` | Text character or string displayed between visual slot groups. |
466
- | `separatorClass` | `string \| string[]` | `""` | Additional CSS classes applied to separator elements. |
467
- | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the dimensions and font size of the OTP slots. |
468
- | `slotClass` | `string \| string[]` | `""` | Additional CSS classes applied to each visual slot element. |
469
- | `spacing` | `boolean` | `true` | Determines whether visual slots within a group have spacing between them or are joined together. |
470
- | `tabindex` | `string \| number` | `0` | Tab index of the inner `<input>`. |
471
- | `touched` | `boolean` | `false` | Sets the touched state of the OTP input. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
472
- | `type` | `OtpInputType` | `"text"` | Sets the type of the OTP input ("text", "number", or "password"). |
473
- | `value` (two-way) | `string` | `""` | Two-way bindable current value of the OTP input. |
474
-
475
- #### Outputs
476
-
477
- | Name | Type | Description |
478
- | --- | --- | --- |
479
- | `complete` | `string` | Emitted when a user interaction completes the verification code. Pasting a different full code over a complete one emits again, so auto-submit sees the new code. Correcting a complete code one character at a time doesn't. |
480
- | `inputBlur` | `FocusEvent` | Emitted when the inner input loses focus. |
481
- | `inputFocus` | `FocusEvent` | Emitted when the inner input gains focus. |
482
- | `touch` | `void` | Emitted when the inner input loses focus. The `FormField` directive listens to this to mark the field as touched. |
483
- | `valueChange` | `string` | Emitted when `value` changes. |
484
-
485
- #### Methods
486
-
487
- | Signature | Description |
488
- | --- | --- |
489
- | `blur(): void` | Removes focus from the input. |
490
-
491
- ### `OtpInputSeparatorTemplateDirective`
492
-
493
- **Selector:** `ng-template[monaOtpInputSeparatorTemplate]`
438
+ Everything below is imported from `@nanahoshi/mona-ui/otp-input`. Each name links to its reference page, with every input, output, property and method.
494
439
 
495
- #### Template context
496
-
497
- | Name | Type |
440
+ | Name | Kind |
498
441
  | --- | --- |
499
- | `$implicit` | `number` |
500
- | `groupIndex` | `number` |
442
+ | [`OtpInputComponent`](api/otp-input.md#otpinputcomponent) | Component |
443
+ | [`OtpInputSeparatorTemplateDirective`](api/otp-input.md#otpinputseparatortemplatedirective) | Directive |
501
444
 
502
445
  ### Types
503
446
 
504
- #### `OTP_INPUT_DEFAULT_MESSAGES`
505
-
506
- ```typescript
507
- const OTP_INPUT_DEFAULT_MESSAGES: MonaOtpInputMessages;
508
- ```
509
-
510
- #### `OtpInputSeparatorContext`
511
-
512
- | Name | Type |
447
+ | Type | Kind |
513
448
  | --- | --- |
514
- | `$implicit` | `number` |
515
- | `groupIndex` | `number` |
516
-
517
- #### `OtpInputType`
518
-
519
- ```typescript
520
- type OtpInputType = "text" | "number" | "password";
521
- ```
522
-
523
- #### `AttributeConfig`
449
+ | [`OTP_INPUT_DEFAULT_MESSAGES`](api/otp-input.md#otp-input-default-messages) | Constant |
450
+ | [`OtpInputSeparatorContext`](api/otp-input.md#otpinputseparatorcontext) | Interface |
451
+ | [`OtpInputType`](api/otp-input.md#otpinputtype) | Type alias |
524
452
 
525
- From `@nanahoshi/mona-ui/common`.
526
-
527
- HTML attributes by name, to apply to an element.
528
-
529
- ```typescript
530
- type AttributeConfig = Record<string, unknown>;
531
- ```
532
-
533
- #### `MonaOtpInputMessages`
534
-
535
- From `@nanahoshi/mona-ui/i18n`.
536
-
537
- | Name | Type |
538
- | --- | --- |
539
- | `verificationCode` (read-only) | `string` |
453
+ **Related types:** [`AttributeConfig`](api/common.md#attributeconfig), [`MonaOtpInputMessages`](api/i18n.md#monaotpinputmessages)
package/docs/pager.md CHANGED
@@ -266,248 +266,28 @@ When the focused button becomes disabled or is removed (Next on the last page, a
266
266
 
267
267
  ## API
268
268
 
269
- Everything below is imported from `@nanahoshi/mona-ui/pager`.
269
+ Everything below is imported from `@nanahoshi/mona-ui/pager`. Each name links to its reference page, with every input, output, property and method.
270
270
 
271
- ### `PagerComponent`
272
-
273
- **Selector:** `mona-pager`
274
-
275
- #### Inputs
276
-
277
- | Name | Type | Default | Description |
278
- | --- | --- | --- | --- |
279
- | `aria-label` | `string \| null` | `null` | Accessible name of the pager's navigation landmark. Defaults to the localized "Pagination"; name each pager when a page has several. |
280
- | `aria-labelledby` | `string` | `""` | Id of the element that names the pager. Takes precedence over `aria-label`. |
281
- | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
282
- | `firstLast` | `boolean` | `true` | Shows the first and last page navigation buttons. |
283
- | `navigable` | `boolean` | `true` | Enables page shortcuts while a pager button has focus: Page Up and Page Down go to the previous and next page, Home and End to the first and last, and the left and right arrows to the previous and next page (mirrored right to left). The buttons themselves are always ordinary tab stops. |
284
- | `pageInput` | `boolean` | `false` | Shows a numeric input for jumping directly to a page. |
285
- | `pageSize` (two-way) | `number` | `5` | Number of items displayed per page; values below 1 count as 1. Supports two-way binding (`[(pageSize)]`): `pageSizeChange` emits the new size after the user changes it, and `pageChange` reports it as `take`. |
286
- | `pageSizeValues` | `readonly number[] \| boolean` | `[5, 10, 20, 50, 100]` | Page-size options shown in the page-size dropdown. `true` shows the default options; `false` or an empty array hides the dropdown. |
287
- | `previousNext` | `boolean` | `true` | Shows the previous and next page navigation buttons. |
288
- | `responsive` | `boolean` | `true` | Replaces the page buttons with a page dropdown when the pager is narrower than 480px. Other sections wrap onto a new line instead of being hidden. |
289
- | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
290
- | `showInfo` | `boolean` | `true` | Displays the summary of the current page range and total item count. |
291
- | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
292
- | `skip` (two-way) | `number` | `0` | Number of items before the current page. Supports two-way binding. A value past the last page, or between page boundaries, is corrected to the start of the page that holds it, and `pageChange` reports it. |
293
- | `total` | `number` | `0` | Total number of items in the paged collection. |
294
- | `type` | `PagerType` | `"numeric"` | Visual mode of the pager: numeric page buttons, or a page-jump input. |
295
- | `visiblePages` | `number` | `5` | Number of page buttons shown between the first and last page before the rest collapse into jump buttons. At least 1. |
296
-
297
- #### Outputs
298
-
299
- | Name | Type | Description |
300
- | --- | --- | --- |
301
- | `pageChange` | `PageChangeEvent` | Emitted when the user changes the page or the page size, or when the pager corrects a `skip` that is past the last page or not on a page boundary. Setting `skip` or `pageSize` from code to a valid value doesn't emit it. |
302
- | `pageSizeChange` | `number` | Emitted when `pageSize` changes. |
303
- | `pageSizeSelect` | `PageSizeChangeEvent` | Emitted when the user picks a page size, before it is applied. Call `preventDefault()` on the event to keep the current size. |
304
- | `skipChange` | `number` | Emitted when `skip` changes. |
305
-
306
- ### `PagerNavigationButtonsTemplateDirective`
307
-
308
- **Selector:** `ng-template[monaPagerNavigationButtonsTemplate]`
309
-
310
- #### Inputs
311
-
312
- | Name | Type | Default | Description |
313
- | --- | --- | --- | --- |
314
- | `type` (required) | `"first" \| "last" \| "next" \| "previous"` | — | Which navigation button the template replaces. |
315
-
316
- #### Template context
317
-
318
- | Name | Type | Description |
271
+ | Name | Kind | Description |
319
272
  | --- | --- | --- |
320
- | `$implicit` | `PagerContext` | The pager state, the same values the context spreads at its top level. |
321
- | `currentPage` | `number` | The current page, starting at 1. |
322
- | `disabled` | `boolean` | True when the button has nowhere to go (the first or last page is current, or there are no pages). |
323
- | `end` | `number` | The position of the last item on the current page, or 0 when there are no items. |
324
- | `goToPage` | `(page: number) => void` | Goes to a page (clamped to the page range) and emits `pageChange`, as a click on a page button does. |
325
- | `navigate` | `() => void` | Goes to `targetPage`. |
326
- | `pageSize` | `number` | The number of items per page. |
327
- | `pageSizes` | `readonly number[]` | The page sizes offered by the page-size dropdown. |
328
- | `setPageSize` | `(pageSize: number \| null) => void` | Changes the page size through the cancelable `pageSizeSelect` event, as the page-size dropdown does. `null` and values below 1 are ignored. |
329
- | `skip` | `number` | The number of items before the current page. |
330
- | `start` | `number` | The position of the first item on the current page, or 0 when there are no items. |
331
- | `targetPage` | `number` | The page the button goes to. |
332
- | `total` | `number` | The total number of items. |
333
- | `totalPages` | `number` | The total number of pages. |
334
-
335
- ### `PagerInfoTemplateDirective`
336
-
337
- **Selector:** `ng-template[monaPagerInfoTemplate]`
338
-
339
- #### Template context
340
-
341
- | Name | Type | Description |
342
- | --- | --- | --- |
343
- | `$implicit` | `PagerContext` | The pager state, the same values the context spreads at its top level. |
344
- | `currentPage` | `number` | The current page, starting at 1. |
345
- | `end` | `number` | The position of the last item on the current page, or 0 when there are no items. |
346
- | `goToPage` | `(page: number) => void` | Goes to a page (clamped to the page range) and emits `pageChange`, as a click on a page button does. |
347
- | `pageSize` | `number` | The number of items per page. |
348
- | `pageSizes` | `readonly number[]` | The page sizes offered by the page-size dropdown. |
349
- | `setPageSize` | `(pageSize: number \| null) => void` | Changes the page size through the cancelable `pageSizeSelect` event, as the page-size dropdown does. `null` and values below 1 are ignored. |
350
- | `skip` | `number` | The number of items before the current page. |
351
- | `start` | `number` | The position of the first item on the current page, or 0 when there are no items. |
352
- | `total` | `number` | The total number of items. |
353
- | `totalPages` | `number` | The total number of pages. |
354
-
355
- ### `PagerNumericButtonsTemplateDirective`
356
-
357
- **Selector:** `ng-template[monaPagerNumericButtonsTemplate]`
358
-
359
- #### Template context
360
-
361
- | Name | Type | Description |
362
- | --- | --- | --- |
363
- | `$implicit` | `PagerContext` | The pager state, the same values the context spreads at its top level. |
364
- | `currentPage` | `number` | The current page, starting at 1. |
365
- | `end` | `number` | The position of the last item on the current page, or 0 when there are no items. |
366
- | `goToPage` | `(page: number) => void` | Goes to a page (clamped to the page range) and emits `pageChange`, as a click on a page button does. |
367
- | `pages` | `readonly number[]` | The page numbers the default buttons would show, in order (the first and last page included). |
368
- | `pageSize` | `number` | The number of items per page. |
369
- | `pageSizes` | `readonly number[]` | The page sizes offered by the page-size dropdown. |
370
- | `setPageSize` | `(pageSize: number \| null) => void` | Changes the page size through the cancelable `pageSizeSelect` event, as the page-size dropdown does. `null` and values below 1 are ignored. |
371
- | `skip` | `number` | The number of items before the current page. |
372
- | `start` | `number` | The position of the first item on the current page, or 0 when there are no items. |
373
- | `total` | `number` | The total number of items. |
374
- | `totalPages` | `number` | The total number of pages. |
375
-
376
- ### `PagerPageSizeTemplateDirective`
377
-
378
- **Selector:** `ng-template[monaPagerPageSizeTemplate]`
379
-
380
- #### Template context
381
-
382
- | Name | Type | Description |
383
- | --- | --- | --- |
384
- | `$implicit` | `readonly number[]` | The page sizes offered, as for the default dropdown. |
385
- | `currentPage` | `number` | The current page, starting at 1. |
386
- | `end` | `number` | The position of the last item on the current page, or 0 when there are no items. |
387
- | `goToPage` | `(page: number) => void` | Goes to a page (clamped to the page range) and emits `pageChange`, as a click on a page button does. |
388
- | `pageSize` | `number` | The number of items per page. |
389
- | `pageSizes` | `readonly number[]` | The page sizes offered by the page-size dropdown. |
390
- | `setPageSize` | `(pageSize: number \| null) => void` | Changes the page size through the cancelable `pageSizeSelect` event, as the page-size dropdown does. `null` and values below 1 are ignored. |
391
- | `skip` | `number` | The number of items before the current page. |
392
- | `start` | `number` | The position of the first item on the current page, or 0 when there are no items. |
393
- | `total` | `number` | The total number of items. |
394
- | `totalPages` | `number` | The total number of pages. |
395
-
396
- ### `PageSizeChangeEvent`
397
-
398
- The cancelable payload of the pager's `pageSizeSelect` event.
399
-
400
- **Extends:** `PreventableEvent`
401
-
402
- #### Properties
403
-
404
- | Name | Type |
405
- | --- | --- |
406
- | `newPageSize` (read-only) | `number` |
407
- | `oldPageSize` (read-only) | `number` |
273
+ | [`PagerComponent`](api/pager.md#pagercomponent) | Component | |
274
+ | [`PagerNavigationButtonsTemplateDirective`](api/pager.md#pagernavigationbuttonstemplatedirective) | Directive | |
275
+ | [`PagerInfoTemplateDirective`](api/pager.md#pagerinfotemplatedirective) | Directive | |
276
+ | [`PagerNumericButtonsTemplateDirective`](api/pager.md#pagernumericbuttonstemplatedirective) | Directive | |
277
+ | [`PagerPageSizeTemplateDirective`](api/pager.md#pagerpagesizetemplatedirective) | Directive | |
278
+ | [`PageSizeChangeEvent`](api/pager.md#pagesizechangeevent) | Class | The cancelable payload of the pager's `pageSizeSelect` event. |
408
279
 
409
280
  ### Types
410
281
 
411
- #### `PAGER_DEFAULT_MESSAGES`
412
-
413
- ```typescript
414
- const PAGER_DEFAULT_MESSAGES: { firstPageLabel: string; itemsPerPageLabel: string; jumpBackwardLabel: (pages: number) => string; jumpForwardLabel: (pages: number) => string; lastPageLabel: string; nextPageLabel: string; ofText: string; pageInputPrefix: (_totalPages: number) => string; pageInputSuffix: (totalPages: number) => string; pageLabel: (page: number) => string; pageSelectLabel: string; pageSizeLabel: (pageSize: number) => string; pageStatus: (page: number, totalPages: number) => string; pageText: string; pagerLabel: string; previousPageLabel: string; rangeStatus: (start: number, end: number, total: number) => string; };
415
- ```
416
-
417
- #### `PagerContext`
418
-
419
- The pager's state and actions, passed to every custom template.
420
-
421
- | Name | Type | Description |
422
- | --- | --- | --- |
423
- | `currentPage` (read-only) | `number` | The current page, starting at 1. |
424
- | `end` (read-only) | `number` | The position of the last item on the current page, or 0 when there are no items. |
425
- | `pageSize` (read-only) | `number` | The number of items per page. |
426
- | `pageSizes` (read-only) | `readonly number[]` | The page sizes offered by the page-size dropdown. |
427
- | `skip` (read-only) | `number` | The number of items before the current page. |
428
- | `start` (read-only) | `number` | The position of the first item on the current page, or 0 when there are no items. |
429
- | `total` (read-only) | `number` | The total number of items. |
430
- | `totalPages` (read-only) | `number` | The total number of pages. |
431
-
432
- **Methods**
433
-
434
- | Signature | Description |
435
- | --- | --- |
436
- | `goToPage(page: number): void` | Goes to a page (clamped to the page range) and emits `pageChange`, as a click on a page button does. |
437
- | `setPageSize(pageSize: number \| null): void` | Changes the page size through the cancelable `pageSizeSelect` event, as the page-size dropdown does. `null` and values below 1 are ignored. |
438
-
439
- #### `NavigationButtonsTemplateContext`
440
-
441
- **Extends:** `PagerContext`
442
-
443
- | Name | Type | Description |
444
- | --- | --- | --- |
445
- | `$implicit` (read-only) | `PagerContext` | The pager state, the same values the context spreads at its top level. |
446
- | `disabled` (read-only) | `boolean` | True when the button has nowhere to go (the first or last page is current, or there are no pages). |
447
- | `targetPage` (read-only) | `number` | The page the button goes to. |
448
-
449
- **Methods**
450
-
451
- | Signature | Description |
452
- | --- | --- |
453
- | `navigate(): void` | Goes to `targetPage`. |
454
-
455
- #### `InfoTemplateContext`
456
-
457
- **Extends:** `PagerContext`
458
-
459
- | Name | Type | Description |
460
- | --- | --- | --- |
461
- | `$implicit` (read-only) | `PagerContext` | The pager state, the same values the context spreads at its top level. |
462
-
463
- #### `NumericButtonsTemplateContext`
464
-
465
- Context of `monaPagerNumericButtonsTemplate`. The template renders inside the pager's `<ol>`, so put each
466
- control in an `<li>`.
467
-
468
- **Extends:** `PagerContext`
469
-
470
- | Name | Type | Description |
282
+ | Type | Kind | Description |
471
283
  | --- | --- | --- |
472
- | `$implicit` (read-only) | `PagerContext` | The pager state, the same values the context spreads at its top level. |
473
- | `pages` (read-only) | `readonly number[]` | The page numbers the default buttons would show, in order (the first and last page included). |
474
-
475
- #### `PageChangeEvent`
476
-
477
- | Name | Type |
478
- | --- | --- |
479
- | `page` | `number` |
480
- | `skip` | `number` |
481
- | `take` | `number` |
482
-
483
- #### `PageSizeTemplateContext`
484
-
485
- **Extends:** `PagerContext`
486
-
487
- | Name | Type | Description |
488
- | --- | --- | --- |
489
- | `$implicit` (read-only) | `readonly number[]` | The page sizes offered, as for the default dropdown. |
490
-
491
- #### `PagerType`
492
-
493
- ```typescript
494
- type PagerType = "input" | "numeric";
495
- ```
496
-
497
- #### `PreventableEvent`
498
-
499
- From `@nanahoshi/mona-ui/common`.
500
-
501
- **Type parameters:** `E extends Event = Event`
502
-
503
- | Name | Type | Description |
504
- | --- | --- | --- |
505
- | `originalEvent` (read-only) | `E \| undefined` | The DOM event that caused this one, when there is one. |
506
- | `type` (read-only) | `string \| undefined` | A name for the kind of event, when the component that emits it sets one. |
507
-
508
- **Methods**
509
-
510
- | Signature | Description |
511
- | --- | --- |
512
- | `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
513
- | `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
284
+ | [`PAGER_DEFAULT_MESSAGES`](api/pager.md#pager-default-messages) | Constant | |
285
+ | [`PagerContext`](api/pager.md#pagercontext) | Interface | The pager's state and actions, passed to every custom template. |
286
+ | [`NavigationButtonsTemplateContext`](api/pager.md#navigationbuttonstemplatecontext) | Interface | |
287
+ | [`InfoTemplateContext`](api/pager.md#infotemplatecontext) | Interface | |
288
+ | [`NumericButtonsTemplateContext`](api/pager.md#numericbuttonstemplatecontext) | Interface | Context of `monaPagerNumericButtonsTemplate`. |
289
+ | [`PageChangeEvent`](api/pager.md#pagechangeevent) | Interface | |
290
+ | [`PageSizeTemplateContext`](api/pager.md#pagesizetemplatecontext) | Interface | |
291
+ | [`PagerType`](api/pager.md#pagertype) | Type alias | |
292
+
293
+ **Related types:** [`PreventableEvent`](api/common.md#preventableevent)
@@ -152,25 +152,12 @@ If the placeholder communicates a state change that screen reader users must be
152
152
 
153
153
  ## API
154
154
 
155
- Everything below is imported from `@nanahoshi/mona-ui/placeholder`.
155
+ Everything below is imported from `@nanahoshi/mona-ui/placeholder`. Each name links to its reference page, with every input, output, property and method.
156
156
 
157
- ### `PlaceholderComponent`
158
-
159
- **Selector:** `mona-placeholder`
160
-
161
- #### Inputs
162
-
163
- | Name | Type | Default | Description |
164
- | --- | --- | --- | --- |
165
- | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. Bind this input with the public `class` alias. |
166
- | `text` | `string` | `""` | The text to display inside the placeholder. Takes precedence over projected content if both are provided. |
157
+ | Name | Kind |
158
+ | --- | --- |
159
+ | [`PlaceholderComponent`](api/placeholder.md#placeholdercomponent) | Component |
167
160
 
168
161
  ### Types
169
162
 
170
- #### `ClassInputType`
171
-
172
- From `@nanahoshi/mona-ui/common`.
173
-
174
- ```typescript
175
- type ClassInputType = string | string[] | Record<string, unknown> | null | undefined;
176
- ```
163
+ **Related types:** [`ClassInputType`](api/common.md#classinputtype)
package/docs/popover.md CHANGED
@@ -291,133 +291,23 @@ Popover is non-modal and doesn't trap focus: Tab moves on past its content, and
291
291
 
292
292
  ## API
293
293
 
294
- Everything below is imported from `@nanahoshi/mona-ui/popover`.
294
+ Everything below is imported from `@nanahoshi/mona-ui/popover`. Each name links to its reference page, with every input, output, property and method.
295
295
 
296
- ### `PopoverComponent`
297
-
298
- **Selector:** `mona-popover`
299
- **Exported as:** `monaPopover`
300
-
301
- #### Inputs
302
-
303
- | Name | Type | Default | Description |
304
- | --- | --- | --- | --- |
305
- | `aria-label` | `string \| undefined` | `undefined` | Accessible name for the popover when it has no `title` or title template. |
306
- | `autoFocus` | `boolean \| undefined` | `undefined` | Whether focus moves into the popover when it opens: to its first focusable element, or to the popover itself. Defaults to `true`, except for the `hover` trigger. |
307
- | `closeOnEscape` | `boolean` | `true` | Whether pressing Escape closes the popover. |
308
- | `closeOnOutsideClick` | `boolean` | `true` | Whether a click outside the popover and its target closes it. |
309
- | `displayArrow` | `boolean` | `false` | Display the arrow of the popover. |
310
- | `position` | `PopoverPosition` | `"top"` | The side of the target the popover opens on. `left` and `right` are physical; `start` and `end` follow the text direction. It flips to the opposite side when there isn't room. |
311
- | `rounded` | `"large" \| "medium" \| "none" \| "small"` | `"medium"` | The border radius of the popover. |
312
- | `target` (required) | `Element \| ElementRef` | — | The target element or ElementRef to which the popover is attached. |
313
- | `title` | `string` | `""` | The title of the popover. |
314
- | `trigger` | `PopoverTrigger` | `"click"` | The trigger that opens/closes the popover. "click" toggles on click, "hover" opens while the pointer is on the target or the popover, or focus is on the target, "none" disables automatic triggering (use `open()`/`close()` instead). Any other DOM event name is also accepted and used as-is. |
315
-
316
- #### Outputs
317
-
318
- | Name | Type | Description |
296
+ | Name | Kind | Description |
319
297
  | --- | --- | --- |
320
- | `hidden` | `void` | Emits when the popover is hidden. |
321
- | `hide` | `PopoverHideEvent` | Emits when the popover is about to be closed. This event is preventable. |
322
- | `show` | `PopoverShowEvent` | Emits when the popover is about to be shown. This event is preventable. |
323
- | `shown` | `PopoverShownEvent` | Emits once the popover has opened. |
324
-
325
- #### Methods
326
-
327
- | Signature | Description |
328
- | --- | --- |
329
- | `close(): void` | Closes the popover if one is currently open. Emits `hide` and respects `preventDefault()` — if canceled, the popup stays open and the component's internal state remains consistent with that. |
330
- | `open(): void` | Opens the popover directly. No-op if it is already open. Does not emit `show`; emits `shown` once open. |
331
-
332
- ### `PopoverFooterTemplateDirective`
333
-
334
- Marks an `ng-template` as the popover's custom footer content.
335
-
336
- **Selector:** `ng-template[monaPopoverFooterTemplate]`
337
-
338
- ### `PopoverTitleTemplateDirective`
339
-
340
- Marks an `ng-template` as the popover's custom title content.
341
-
342
- **Selector:** `ng-template[monaPopoverTitleTemplate]`
343
-
344
- ### `PopoverHideEvent`
345
-
346
- **Extends:** `PreventableEvent`
347
-
348
- #### Properties
349
-
350
- | Name | Type |
351
- | --- | --- |
352
- | `popupRef` (read-only) | `PopupRef` |
353
- | `target` (read-only) | `Element` |
354
-
355
- ### `PopoverShowEvent`
356
-
357
- **Extends:** `PreventableEvent`
358
-
359
- #### Properties
360
-
361
- | Name | Type |
362
- | --- | --- |
363
- | `target` (read-only) | `Element` |
364
-
365
- ### `PopoverShownEvent`
366
-
367
- #### Properties
368
-
369
- | Name | Type |
370
- | --- | --- |
371
- | `popupRef` (read-only) | `PopupRef` |
372
- | `target` (read-only) | `Element` |
298
+ | [`PopoverComponent`](api/popover.md#popovercomponent) | Component | |
299
+ | [`PopoverFooterTemplateDirective`](api/popover.md#popoverfootertemplatedirective) | Directive | Marks an `ng-template` as the popover's custom footer content. |
300
+ | [`PopoverTitleTemplateDirective`](api/popover.md#popovertitletemplatedirective) | Directive | Marks an `ng-template` as the popover's custom title content. |
301
+ | [`PopoverHideEvent`](api/popover.md#popoverhideevent) | Class | |
302
+ | [`PopoverShowEvent`](api/popover.md#popovershowevent) | Class | |
303
+ | [`PopoverShownEvent`](api/popover.md#popovershownevent) | Class | |
373
304
 
374
305
  ### Types
375
306
 
376
- #### `OverlaySide`
377
-
378
- A side of the anchor. `start` and `end` follow the direction.
379
-
380
- ```typescript
381
- type OverlaySide = "bottom" | "end" | "left" | "right" | "start" | "top";
382
- ```
383
-
384
- #### `PopoverPosition`
385
-
386
- The side of its target a popover opens on. `left` and `right` are physical in every direction; `start` and `end`
387
- follow the text direction.
388
-
389
- ```typescript
390
- type PopoverPosition = OverlaySide;
391
- ```
392
-
393
- #### `PopoverTrigger`
394
-
395
- The trigger event for showing/hiding a popover.
396
- "click" toggles the popover on click, "hover" opens on pointer enter and
397
- closes on pointer leave, and "none" disables automatic triggering so the
398
- popover can only be controlled via its `open()`/`close()` methods.
399
- Any other DOM event name is also accepted and used as-is to open the popover.
400
-
401
- ```typescript
402
- type PopoverTrigger = "click" | "hover" | "none" | (string & {});
403
- ```
404
-
405
- #### `PreventableEvent`
406
-
407
- From `@nanahoshi/mona-ui/common`.
408
-
409
- **Type parameters:** `E extends Event = Event`
410
-
411
- | Name | Type | Description |
307
+ | Type | Kind | Description |
412
308
  | --- | --- | --- |
413
- | `originalEvent` (read-only) | `E \| undefined` | The DOM event that caused this one, when there is one. |
414
- | `type` (read-only) | `string \| undefined` | A name for the kind of event, when the component that emits it sets one. |
415
-
416
- **Methods**
417
-
418
- | Signature | Description |
419
- | --- | --- |
420
- | `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
421
- | `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
309
+ | [`OverlaySide`](api/popover.md#overlayside) | Type alias | A side of the anchor. |
310
+ | [`PopoverPosition`](api/popover.md#popoverposition) | Type alias | The side of its target a popover opens on. |
311
+ | [`PopoverTrigger`](api/popover.md#popovertrigger) | Type alias | The trigger event for showing/hiding a popover. "click" toggles the popover on click, "hover" opens on pointer enter and closes on pointer leave, and "none" disables automatic triggering so the popover can only be controlled via its `open()`/`close()` methods. |
422
312
 
423
- **Documented elsewhere:** [`PopupRef`](popup.md)
313
+ **Related types:** [`PopupRef`](api/popup.md#popupref), [`PreventableEvent`](api/common.md#preventableevent)