@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/segmented.md CHANGED
@@ -336,99 +336,17 @@ Native radio behavior applies. Arrow keys move the selection within the group, a
336
336
 
337
337
  ## API
338
338
 
339
- Everything below is imported from `@nanahoshi/mona-ui/segmented`.
340
-
341
- ### `SegmentedComponent`
342
-
343
- **Selector:** `mona-segmented`
344
- **Type parameters:** `T extends SegmentedValue = SegmentedValue`
345
- **Implements:** `FormValueControl<T \| null>`
346
-
347
- #### Inputs
348
-
349
- | Name | Type | Default | Description |
350
- | --- | --- | --- | --- |
351
- | `alignment` | `"center" \| "end" \| "start" \| "stretch"` | `"stretch"` | Controls the alignment of the items inside the segmented component. |
352
- | `animate` | `boolean` | `true` | Controls whether the selection indicator animates between selected options. When false, selection changes are applied immediately without transition. |
353
- | `aria-label` | `string \| null` | `null` | Accessible name for the radio group. Provide either `aria-label` or `aria-labelledby`. |
354
- | `aria-labelledby` | `string \| null` | `null` | ID of an external element that provides the accessible name for the radio group. |
355
- | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
356
- | `disabled` | `boolean` | `false` | Disables every option in the group and prevents value changes. |
357
- | `invalid` | `boolean` | `false` | Marks the component as invalid. Error styling requires both `invalid` and `touched` to be `true`. When bound to a signal form field via `[formField]`, this is written by the signal forms `FormField` directive. |
358
- | `name` | `string` | `""` | The name of the radios, for a native `<form>`. Generated when empty, so two groups don't interfere. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
359
- | `options` (required) | `readonly SegmentedOption<T>[]` | — | The list of selectable options. Exactly one option is selected at a time. |
360
- | `readonly` | `boolean` | `false` | Prevents value changes while the control stays focusable and readable. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
361
- | `required` | `boolean` | `false` | Marks the group as required, as `aria-required`. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
362
- | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the segmented container and its options. |
363
- | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the height, horizontal padding, text size, and spacing of each option. |
364
- | `touched` | `boolean` | `false` | Marks the component as touched. When bound to a signal form field via `[formField]`, this is written by the signal forms `FormField` directive. |
365
- | `value` (two-way) | `T \| null` | `null` | The currently selected value. When it matches no current option, no option is checked. A `null` value is allowed initially but cannot be restored through segmented interaction. |
366
-
367
- #### Outputs
368
-
369
- | Name | Type | Description |
370
- | --- | --- | --- |
371
- | `touch` | `void` | Emitted when the selected value changes or focus leaves the group. |
372
- | `valueChange` | `T \| null` | Emitted when `value` changes. |
373
-
374
- #### Methods
375
-
376
- | Signature | Description |
377
- | --- | --- |
378
- | `focus(options?: FocusOptions): void` | Moves focus to the selected option, or the first enabled one. |
379
-
380
- ### `SegmentedItemTemplateDirective`
381
-
382
- Renders the visual content of every segmented option. Overrides the default label
383
- text of each option. Bind the options, as `[monaSegmentedItemTemplate]="options"`, to type `let-option` from them.
339
+ Everything below is imported from `@nanahoshi/mona-ui/segmented`. Each name links to its reference page, with every input, output, property and method.
384
340
 
385
- **Selector:** `ng-template[monaSegmentedItemTemplate]`
386
- **Type parameters:** `T extends SegmentedValue = SegmentedValue`
387
-
388
- #### Inputs
389
-
390
- | Name | Type | Default | Description |
391
- | --- | --- | --- | --- |
392
- | `monaSegmentedItemTemplate` | `readonly SegmentedOption<T>[] \| "" \| undefined` | `undefined` | The options, to type `let-option` from them. It changes nothing else. |
393
-
394
- #### Template context
395
-
396
- | Name | Type | Description |
341
+ | Name | Kind | Description |
397
342
  | --- | --- | --- |
398
- | `$implicit` | `SegmentedOption<T>` | The option rendered by this item. |
399
- | `disabled` | `boolean` | Whether this option is disabled, either individually or via the group. |
400
- | `index` | `number` | Zero-based option index. |
401
- | `option` | `SegmentedOption<T>` | The option rendered by this item. |
402
- | `selected` | `boolean` | Whether this option is currently selected. |
343
+ | [`SegmentedComponent`](api/segmented.md#segmentedcomponent) | Component | |
344
+ | [`SegmentedItemTemplateDirective`](api/segmented.md#segmenteditemtemplatedirective) | Directive | Renders the visual content of every segmented option. |
403
345
 
404
346
  ### Types
405
347
 
406
- #### `SegmentedItemTemplateContext`
407
-
408
- Rendering context passed to the segmented item template.
409
-
410
- **Type parameters:** `T extends SegmentedValue = SegmentedValue`
411
-
412
- | Name | Type | Description |
348
+ | Type | Kind | Description |
413
349
  | --- | --- | --- |
414
- | `$implicit` (read-only) | `SegmentedOption<T>` | The option rendered by this item. |
415
- | `disabled` (read-only) | `boolean` | Whether this option is disabled, either individually or via the group. |
416
- | `index` (read-only) | `number` | Zero-based option index. |
417
- | `option` (read-only) | `SegmentedOption<T>` | The option rendered by this item. |
418
- | `selected` (read-only) | `boolean` | Whether this option is currently selected. |
419
-
420
- #### `SegmentedOption`
421
-
422
- **Type parameters:** `T extends SegmentedValue = SegmentedValue`
423
-
424
- | Name | Type |
425
- | --- | --- |
426
- | `disabled?` (read-only) | `boolean` |
427
- | `label` (read-only) | `string` |
428
- | `value` (read-only) | `T` |
429
-
430
- #### `SegmentedValue`
431
-
432
- ```typescript
433
- type SegmentedValue = string | number;
434
- ```
350
+ | [`SegmentedItemTemplateContext`](api/segmented.md#segmenteditemtemplatecontext) | Interface | Rendering context passed to the segmented item template. |
351
+ | [`SegmentedOption`](api/segmented.md#segmentedoption) | Interface | |
352
+ | [`SegmentedValue`](api/segmented.md#segmentedvalue) | Type alias | |
package/docs/sheet.md CHANGED
@@ -267,82 +267,18 @@ Sheet content must have either a `title` or an `aria-label` so that the modal ha
267
267
 
268
268
  ## API
269
269
 
270
- Everything below is imported from `@nanahoshi/mona-ui/sheet`.
270
+ Everything below is imported from `@nanahoshi/mona-ui/sheet`. Each name links to its reference page, with every input, output, property and method.
271
271
 
272
- ### `SheetComponent`
273
-
274
- **Selector:** `mona-sheet`
275
-
276
- #### Inputs
277
-
278
- | Name | Type | Default | Description |
279
- | --- | --- | --- | --- |
280
- | `aria-label` | `string \| undefined` | `undefined` | Accessible name used when no visible title is provided. |
281
- | `class` | `ClassInputType` | `undefined` | Additional CSS classes merged onto the sheet panel via `tailwind-merge`. |
282
- | `closable` | `boolean` | `true` | Whether the close button is displayed. |
283
- | `closeOnBackdropClick` | `boolean` | `true` | Whether clicking the backdrop requests that the sheet close. |
284
- | `closeOnEscape` | `boolean` | `true` | Whether pressing Escape requests that the sheet close. |
285
- | `description` | `string` | — | Supporting text displayed below the title. |
286
- | `height` | `number \| string` | — | Explicit sheet height. Numbers are interpreted as pixels. |
287
- | `messages` | `Partial<SheetMessages>` | — | Internationalization message overrides for accessible labels. |
288
- | `side` | `SheetSide` | `"right"` | Edge of the viewport from which the sheet opens. `left` and `right` are physical; `start` and `end` follow the direction (`start` is the left edge in LTR and the right edge in RTL). The edge is fixed once the sheet opens. |
289
- | `title` | `string` | — | Title displayed in the sheet header and used as its accessible name. |
290
- | `width` | `number \| string` | — | Explicit sheet width. Numbers are interpreted as pixels. |
291
-
292
- #### Outputs
293
-
294
- | Name | Type | Description |
295
- | --- | --- | --- |
296
- | `close` | `PopupCloseEvent<unknown>` | Emitted before the sheet closes. Call preventDefault() to keep it open. |
297
- | `closed` | `void` | Emitted after the leave animation completes and the popup is disposed. |
298
-
299
- ### Types
300
-
301
- #### `SHEET_DEFAULT_MESSAGES`
302
-
303
- ```typescript
304
- const SHEET_DEFAULT_MESSAGES: MonaSheetMessages;
305
- ```
306
-
307
- #### `SheetPhysicalSide`
308
-
309
- A side resolved to a physical edge.
310
-
311
- ```typescript
312
- type SheetPhysicalSide = "bottom" | "left" | "right" | "top";
313
- ```
314
-
315
- #### `SheetSide`
316
-
317
- Edge the sheet opens from. `left` and `right` are physical, whatever the direction; `start` and `end` follow it
318
- (`start` is the left edge in LTR and the right edge in RTL).
319
-
320
- ```typescript
321
- type SheetSide = "bottom" | "end" | "left" | "right" | "start" | "top";
322
- ```
323
-
324
- #### `ClassInputType`
325
-
326
- From `@nanahoshi/mona-ui/common`.
327
-
328
- ```typescript
329
- type ClassInputType = string | string[] | Record<string, unknown> | null | undefined;
330
- ```
331
-
332
- #### `MonaSheetMessages`
333
-
334
- From `@nanahoshi/mona-ui/i18n`.
335
-
336
- | Name | Type |
272
+ | Name | Kind |
337
273
  | --- | --- |
338
- | `closeSheet` (read-only) | `string` |
339
-
340
- #### `SheetMessages`
274
+ | [`SheetComponent`](api/sheet.md#sheetcomponent) | Component |
341
275
 
342
- From `@nanahoshi/mona-ui/i18n`.
276
+ ### Types
343
277
 
344
- ```typescript
345
- type SheetMessages = MonaSheetMessages;
346
- ```
278
+ | Type | Kind | Description |
279
+ | --- | --- | --- |
280
+ | [`SHEET_DEFAULT_MESSAGES`](api/sheet.md#sheet-default-messages) | Constant | |
281
+ | [`SheetPhysicalSide`](api/sheet.md#sheetphysicalside) | Type alias | A side resolved to a physical edge. |
282
+ | [`SheetSide`](api/sheet.md#sheetside) | Type alias | Edge the sheet opens from. |
347
283
 
348
- **Documented elsewhere:** [`PopupCloseEvent`](popup.md)
284
+ **Related types:** [`ClassInputType`](api/common.md#classinputtype), [`MonaSheetMessages`](api/i18n.md#monasheetmessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`SheetMessages`](api/i18n.md#sheetmessages)
@@ -386,163 +386,28 @@ While collapsed to icons the labels are clipped away. Set `tooltip` on every row
386
386
 
387
387
  ## API
388
388
 
389
- Everything below is imported from `@nanahoshi/mona-ui/sidebar`.
389
+ Everything below is imported from `@nanahoshi/mona-ui/sidebar`. Each name links to its reference page, with every input, output, property and method.
390
390
 
391
- ### `SidebarMenuSkeletonComponent`
392
-
393
- A loading placeholder shaped like a menu item. Its label bar is clipped on the icon rail, where the
394
- real labels are not visible either.
395
-
396
- **Selector:** `mona-sidebar-menu-skeleton`
397
-
398
- #### Inputs
399
-
400
- | Name | Type | Default | Description |
401
- | --- | --- | --- | --- |
402
- | `labelWidth` | `string \| number` | `"60%"` | Width of the label bar. Varying it across a list keeps the placeholder from looking like a rigid grid. Numbers are treated as pixels. |
403
- | `showIcon` | `boolean` | `true` | Renders a square standing in for the item's icon. |
404
-
405
- ### `SidebarMenuButtonDirective`
406
-
407
- A row in a sidebar menu. Applies to a `button` for an action and to an `a` for a destination —
408
- an anchor keeps `href`, `routerLink`, middle-click, open-in-new-tab and the browser's own status
409
- bar preview, none of which a button can offer.
410
-
411
- On a compact viewport, following a link closes the drawer, since the destination it navigates to is
412
- underneath it. A row that opens a submenu leaves the drawer open, and on the icon rail it expands the
413
- sidebar, since that's the only place the submenu can open.
414
-
415
- **Selector:** `a[monaSidebarMenuButton], button[monaSidebarMenuButton]`
416
- **Exported as:** `monaSidebarMenuButton`
417
-
418
- #### Inputs
419
-
420
- | Name | Type | Default | Description |
421
- | --- | --- | --- | --- |
422
- | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
423
- | `closeOnSelect` | `boolean \| undefined` | `undefined` | Closes the overlay drawer after this row is activated. Only applies on compact viewports, where the drawer covers the destination being navigated to. Set to `false` for rows that do not navigate. Leave it unset on a `monaCollapsibleTrigger`, which keeps the drawer open. |
424
- | `disabled` | `boolean` | `false` | Renders the row as unavailable and suppresses activation, including a `routerLink` and any `click` handler on it. A disabled anchor gives up its `href`. |
425
- | `size` | `SidebarMenuButtonSize` | `"medium"` | How much room this row's leading visual needs. Use `"large"` when it opens with something avatar sized, so the icon rail lets it fill the square instead of insetting and clipping it. |
426
- | `tooltip` | `string` | `""` | Text identifying this item while the sidebar is collapsed to its icon rail, where the label is clipped away. Shown as a tooltip on hover and on keyboard focus, on the rail only. |
427
-
428
- ### `SidebarMenuItemDirective`
429
-
430
- **Selector:** `li[monaSidebarMenuItem]`
431
-
432
- #### Inputs
433
-
434
- | Name | Type | Default | Description |
435
- | --- | --- | --- | --- |
436
- | `active` | `boolean` | `false` | Marks this row as the current sidebar destination. The row owns the selected surface so trailing badges and actions remain inside one continuous highlight. |
437
- | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
438
-
439
- ### `SidebarMenuBadgeDirective`
440
-
441
- A trailing count or status badge on a menu item. Stands down on the icon rail, where it would
442
- crowd out the icon it belongs to.
443
-
444
- **Selector:** `[monaSidebarMenuBadge]`
445
-
446
- #### Inputs
447
-
448
- | Name | Type | Default | Description |
449
- | --- | --- | --- | --- |
450
- | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
451
-
452
- ### `SidebarMenuDirective`
453
-
454
- **Selector:** `ul[monaSidebarMenu]`
455
-
456
- #### Inputs
457
-
458
- | Name | Type | Default | Description |
459
- | --- | --- | --- | --- |
460
- | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
461
-
462
- ### `SidebarMenuSubDirective`
463
-
464
- An indented submenu inside a `monaSidebarMenuItem` that is also a `monaCollapsible`.
465
-
466
- It carries no hiding of its own on the icon rail. `SidebarMenuItemDirective` closes the disclosure
467
- there instead, which leaves the trigger's `aria-expanded` truthful and lets the collapsible content
468
- directive apply its own `inert`. Hiding it here as well used to produce the opposite: a submenu the
469
- trigger still described as expanded, with focusable items, that nobody could see.
470
-
471
- **Selector:** `ul[monaSidebarMenuSub]`
472
-
473
- #### Inputs
474
-
475
- | Name | Type | Default | Description |
476
- | --- | --- | --- | --- |
477
- | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
478
-
479
- ### `SidebarGroupActionDirective`
480
-
481
- A control in the corner of a group header — an add or overflow button. Stands down on the icon
482
- rail, where there is no header row left to sit in. Give it an `aria-label`: it is icon-only.
483
-
484
- **Selector:** `button[monaSidebarGroupAction]`
485
-
486
- ### `SidebarGroupContentDirective`
487
-
488
- The body of a `monaSidebarGroup`, below its header. Wraps the menu itself.
489
-
490
- **Selector:** `[monaSidebarGroupContent]`
491
-
492
- ### `SidebarGroupDirective`
493
-
494
- A titled section of the sidebar, grouping a label and its menu. Stack as many as the sidebar
495
- needs; each is an ordinary block, so a `monaSidebarSeparator` between them is optional. A
496
- `monaSidebarGroupLabel` inside it names the group.
497
-
498
- **Selector:** `[monaSidebarGroup]`
499
-
500
- ### `SidebarGroupHeaderDirective`
501
-
502
- The row above a group's content, holding its label and any group action. Collapses to nothing on
503
- the icon rail rather than leaving an empty gap where the label used to be.
504
-
505
- **Selector:** `[monaSidebarGroupHeader]`
506
-
507
- ### `SidebarGroupLabelDirective`
508
-
509
- The name of a group, which the enclosing `monaSidebarGroup` is labelled by. Fades out on the icon
510
- rail, where there is no width to read it in.
511
-
512
- **Selector:** `[monaSidebarGroupLabel]`
513
-
514
- ### `SidebarInputDirective`
515
-
516
- A text input sized for the sidebar, composing `monaTextBox`. Stands down on the icon rail,
517
- where there is no room to type.
518
-
519
- **Selector:** `input[monaSidebarInput]`
520
-
521
- ### `SidebarMenuActionDirective`
522
-
523
- A trailing control on a menu item — an overflow menu, a pin. Sits inside the row's highlight and
524
- stands down on the icon rail. Give it an `aria-label`: it is icon-only.
525
-
526
- **Selector:** `button[monaSidebarMenuAction]`
391
+ | Name | Kind | Description |
392
+ | --- | --- | --- |
393
+ | [`SidebarMenuSkeletonComponent`](api/sidebar.md#sidebarmenuskeletoncomponent) | Component | A loading placeholder shaped like a menu item. |
394
+ | [`SidebarMenuButtonDirective`](api/sidebar.md#sidebarmenubuttondirective) | Directive | A row in a sidebar menu. |
395
+ | [`SidebarMenuItemDirective`](api/sidebar.md#sidebarmenuitemdirective) | Directive | |
396
+ | [`SidebarMenuBadgeDirective`](api/sidebar.md#sidebarmenubadgedirective) | Directive | A trailing count or status badge on a menu item. |
397
+ | [`SidebarMenuDirective`](api/sidebar.md#sidebarmenudirective) | Directive | |
398
+ | [`SidebarMenuSubDirective`](api/sidebar.md#sidebarmenusubdirective) | Directive | An indented submenu inside a `monaSidebarMenuItem` that is also a `monaCollapsible`. |
399
+ | [`SidebarGroupActionDirective`](api/sidebar.md#sidebargroupactiondirective) | Directive | A control in the corner of a group header — an add or overflow button. |
400
+ | [`SidebarGroupContentDirective`](api/sidebar.md#sidebargroupcontentdirective) | Directive | The body of a `monaSidebarGroup`, below its header. |
401
+ | [`SidebarGroupDirective`](api/sidebar.md#sidebargroupdirective) | Directive | A titled section of the sidebar, grouping a label and its menu. |
402
+ | [`SidebarGroupHeaderDirective`](api/sidebar.md#sidebargroupheaderdirective) | Directive | The row above a group's content, holding its label and any group action. |
403
+ | [`SidebarGroupLabelDirective`](api/sidebar.md#sidebargrouplabeldirective) | Directive | The name of a group, which the enclosing `monaSidebarGroup` is labelled by. |
404
+ | [`SidebarInputDirective`](api/sidebar.md#sidebarinputdirective) | Directive | A text input sized for the sidebar, composing `monaTextBox`. |
405
+ | [`SidebarMenuActionDirective`](api/sidebar.md#sidebarmenuactiondirective) | Directive | A trailing control on a menu item — an overflow menu, a pin. |
527
406
 
528
407
  ### Types
529
408
 
530
- #### `SidebarMenuButtonSize`
531
-
532
- How much room the button's leading visual needs.
533
-
534
- - `medium` — sized for an icon, which the icon rail insets so it sits centred in the square.
535
- - `large` — sized for a full-height visual such as an avatar, which fills the rail square edge to
536
- edge, and which is given a taller row while the sidebar is expanded.
537
-
538
- ```typescript
539
- type SidebarMenuButtonSize = "medium" | "large";
540
- ```
541
-
542
- #### `ClassInputType`
543
-
544
- From `@nanahoshi/mona-ui/common`.
409
+ | Type | Kind | Description |
410
+ | --- | --- | --- |
411
+ | [`SidebarMenuButtonSize`](api/sidebar.md#sidebarmenubuttonsize) | Type alias | How much room the button's leading visual needs. |
545
412
 
546
- ```typescript
547
- type ClassInputType = string | string[] | Record<string, unknown> | null | undefined;
548
- ```
413
+ **Related types:** [`ClassInputType`](api/common.md#classinputtype)
@@ -318,7 +318,7 @@ export class WorkspaceSwitcherComponent {
318
318
  }
319
319
  ```
320
320
 
321
- The controller exposes `expanded`, `state`, `iconOnly`, `compact`, `mobileOpen`, `side`, `variant`, `collapsible` and `sidebarId` as signals, plus `expand()`, `collapse()` and `toggle()`. The [API](#api) section describes each one.
321
+ The controller exposes `expanded`, `state`, `iconOnly`, `compact`, `mobileOpen`, `side`, `variant`, `collapsible` and `sidebarId` as signals, plus `expand()`, `collapse()` and `toggle()`. The reference page of [`SidebarController`](api/sidebar.md#sidebarcontroller) describes each one.
322
322
 
323
323
  Structural facts are readable but not settable. `side`, `variant` and `collapsible` are authored as inputs on `mona-sidebar`; writing them from a descendant would leave the component and the shared state disagreeing until the next change detection pass. Bind the inputs instead.
324
324
 
@@ -379,141 +379,23 @@ Where `matchMedia` is unavailable — a server render, a test environment — th
379
379
 
380
380
  ## API
381
381
 
382
- Everything below is imported from `@nanahoshi/mona-ui/sidebar`.
382
+ Everything below is imported from `@nanahoshi/mona-ui/sidebar`. Each name links to its reference page, with every input, output, property and method.
383
383
 
384
- ### `LocalStorageSidebarStorage`
385
-
386
- The default `SidebarStorage`: `localStorage`, under the sidebar's `persistKey`.
387
-
388
- Reads report `null` anywhere `localStorage` cannot answer, and writes are dropped there. That
389
- covers the server, where there is no such thing, and a browser that refuses it — Safari's private
390
- mode throws on access rather than returning empty, and a full quota throws on write. None of that
391
- is worth taking an application down over: the sidebar simply opens the way its input says.
392
-
393
- A server-rendered application gets the default state in its markup and the remembered one on
394
- hydration, which shows as a flash. Storage that the server can read too — a cookie, or state
395
- transferred from the request — avoids it; supply it through `provideSidebarStorage()`.
396
-
397
- #### Methods
398
-
399
- | Signature |
400
- | --- |
401
- | `read(key: string): boolean \| null` |
402
- | `write(key: string, expanded: boolean): void` |
403
-
404
- ### `injectSidebar`
405
-
406
- Reads a sidebar from an injection context: the one that encloses the caller, or from elsewhere in a
407
- `mona-sidebar-layout`, such as a toolbar in the inset, the layout's first sidebar. Name another one with `for`.
408
-
409
- Returns the sidebar's state and the commands that are safe to issue from anywhere — opening,
410
- closing and toggling, each routed to whichever presentation is current. Structural facts such as
411
- the side, variant and collapsible mode are readable but not settable; those are authored as inputs
412
- on `mona-sidebar`, and writing them from a descendant would only desynchronise the two.
413
-
414
- In a layout it follows the sidebar rather than holding it, because the caller may be created first. Until there is
415
- one, it reads as closed and its commands do nothing.
416
-
417
- ```typescript
418
- function injectSidebar(options: InjectSidebarOptions & { optional: true }): SidebarController | null;
419
- function injectSidebar(options?: InjectSidebarOptions): SidebarController;
420
- ```
421
-
422
- ### `provideSidebarStorage`
423
-
424
- Replaces where sidebars remember whether they were left open. The default is `localStorage`, which
425
- the server cannot read; supply a cookie- or request-backed storage here to have a server-rendered
426
- application render the remembered state rather than correcting it on hydration.
427
-
428
- ```typescript
429
- function provideSidebarStorage(storage: SidebarStorage | (() => SidebarStorage)): EnvironmentProviders;
430
- ```
431
-
432
- ### Types
433
-
434
- #### `SIDEBAR_STORAGE`
435
-
436
- Where sidebars given a `persistKey` remember whether they were left open. Defaults to
437
- `localStorage`. Replace it with `provideSidebarStorage()` — with something the server can read too,
438
- for an application that renders there.
439
-
440
- ```typescript
441
- const SIDEBAR_STORAGE: InjectionToken<SidebarStorage>;
442
- ```
443
-
444
- #### `SidebarController`
445
-
446
- The safe, read-and-command view of one sidebar, returned by `injectSidebar()`.
447
-
448
- Structural facts — side, variant, collapsible mode — are readable but not settable. They are
449
- authored as inputs on `mona-sidebar`, and letting a descendant write them would leave the service
450
- and the component disagreeing about the same sidebar, with the component winning on the next
451
- change detection pass. Consumers who need them to change should bind the inputs.
452
-
453
- | Name | Type | Description |
384
+ | Name | Kind | Description |
454
385
  | --- | --- | --- |
455
- | `collapsible` (read-only) | `Signal<SidebarCollapsibleMode>` | How the sidebar behaves when collapsed, as authored on `mona-sidebar`. |
456
- | `compact` (read-only) | `Signal<boolean>` | Whether the viewport is narrow enough that the sidebar presents as an overlay drawer rather than as a column in the layout. |
457
- | `expanded` (read-only) | `Signal<boolean>` | Whether the sidebar is showing at full width. On a compact viewport this reports the drawer's state, so a single binding drives both presentations. |
458
- | `iconOnly` (read-only) | `Signal<boolean>` | Whether the sidebar is currently reduced to its icon rail, meaning parts that only make sense at full width — labels, trailing actions, submenus — should step aside. Never true while compact, where the drawer always presents at full width. |
459
- | `mobileOpen` (read-only) | `Signal<boolean>` | Whether the overlay drawer is open. Only meaningful while `compact` is true. |
460
- | `side` (read-only) | `Signal<SidebarLogicalSide>` | Which edge the sidebar sits on, resolved to a direction-relative side. |
461
- | `sidebarId` (read-only) | `Signal<string>` | The id of the sidebar element, for `aria-controls` on a custom trigger. |
462
- | `state` (read-only) | `Signal<"expanded" \| "collapsed">` | The expanded state as a string, for `data-state` bindings and styling hooks. |
463
- | `variant` (read-only) | `Signal<SidebarVariant>` | The visual treatment of the sidebar, as authored on `mona-sidebar`. |
464
-
465
- **Methods**
466
-
467
- | Signature | Description |
468
- | --- | --- |
469
- | `collapse(): void` | Closes the sidebar. On a compact viewport this closes the drawer instead. |
470
- | `expand(): void` | Opens the sidebar. On a compact viewport this opens the drawer instead. |
471
- | `toggle(): void` | Flips the sidebar between open and closed, on whichever presentation is current. |
472
-
473
- #### `SidebarStorage`
386
+ | [`LocalStorageSidebarStorage`](api/sidebar.md#localstoragesidebarstorage) | Class | The default `SidebarStorage`: `localStorage`, under the sidebar's `persistKey`. |
387
+ | [`injectSidebar`](api/sidebar.md#injectsidebar) | Function | Reads a sidebar from an injection context: the one that encloses the caller, or from elsewhere in a `mona-sidebar-layout`, such as a toolbar in the inset, the layout's first sidebar. |
388
+ | [`provideSidebarStorage`](api/sidebar.md#providesidebarstorage) | Function | Replaces where sidebars remember whether they were left open. |
474
389
 
475
- Where a sidebar remembers whether it was left open. Supplied through `SIDEBAR_STORAGE`, and only
476
- ever consulted for a sidebar that was given a `persistKey`.
477
-
478
- Only the docked state is ever handed to it. A drawer on a compact viewport is deliberately never
479
- persisted: restoring one open would cover the page on load, in front of the content the reader
480
- asked for.
481
-
482
- **Methods**
483
-
484
- | Signature | Description |
485
- | --- | --- |
486
- | `read(key: string): boolean \| null` | The remembered state for `key`, or `null` when nothing has been stored under it — including when this storage cannot answer, such as on the server. A `null` leaves the sidebar on whatever its `expanded` input says. |
487
- | `write(key: string, expanded: boolean): void` | Records the docked state for `key`. Failing to store it must not throw. |
488
-
489
- #### `InjectSidebarOptions`
390
+ ### Types
490
391
 
491
- | Name | Type | Description |
392
+ | Type | Kind | Description |
492
393
  | --- | --- | --- |
493
- | `for?` (read-only) | `string` | Reads the sidebar with this id in the enclosing layout, rather than the nearest one. Needs a layout. |
494
- | `optional?` (read-only) | `boolean` | Returns `null` instead of throwing when there is no enclosing sidebar or layout. |
495
-
496
- #### `SidebarCollapsibleMode`
497
-
498
- How the sidebar behaves when it is collapsed.
499
-
500
- - `offcanvas` — the sidebar collapses to zero width and leaves the layout.
501
- - `icon` — the sidebar shrinks to a narrow rail that keeps icons visible.
502
- - `none` — the sidebar cannot be collapsed and stays at its full width.
503
-
504
- ```typescript
505
- type SidebarCollapsibleMode = "offcanvas" | "icon" | "none";
506
- ```
507
-
508
- #### `SidebarModalScope`
509
-
510
- How far an open drawer's modality reaches.
511
- - `"page"` makes everything outside the drawer inert and locks the page's scroll, and the drawer is `aria-modal`.
512
- - `"layout"` does that within `mona-sidebar-layout` only, for a sidebar embedded in part of a page. What's around the
513
- layout stays usable, so the drawer isn't `aria-modal`.
514
-
515
- ```typescript
516
- type SidebarModalScope = "page" | "layout";
517
- ```
518
-
519
- **Documented elsewhere:** [`SidebarLogicalSide`](sidebar.md), [`SidebarVariant`](sidebar.md)
394
+ | [`SIDEBAR_STORAGE`](api/sidebar.md#sidebar-storage) | Constant | Where sidebars given a `persistKey` remember whether they were left open. |
395
+ | [`SidebarController`](api/sidebar.md#sidebarcontroller) | Interface | The safe, read-and-command view of one sidebar, returned by `injectSidebar()`. |
396
+ | [`SidebarStorage`](api/sidebar.md#sidebarstorage) | Interface | Where a sidebar remembers whether it was left open. |
397
+ | [`InjectSidebarOptions`](api/sidebar.md#injectsidebaroptions) | Interface | |
398
+ | [`SidebarCollapsibleMode`](api/sidebar.md#sidebarcollapsiblemode) | Type alias | How the sidebar behaves when it is collapsed. |
399
+ | [`SidebarModalScope`](api/sidebar.md#sidebarmodalscope) | Type alias | How far an open drawer's modality reaches. - `"page"` makes everything outside the drawer inert and locks the page's scroll, and the drawer is `aria-modal`. - `"layout"` does that within `mona-sidebar-layout` only, for a sidebar embedded in part of a page. |
400
+
401
+ **Related types:** [`SidebarLogicalSide`](api/sidebar.md#sidebarlogicalside), [`SidebarVariant`](api/sidebar.md#sidebarvariant)