@nanahoshi/mona-ui 0.24.11 → 0.25.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 (163) hide show
  1. package/README.md +9 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
  3. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
  7. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
  8. package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
  9. package/fesm2022/nanahoshi-mona-ui-chart.mjs +27 -22
  10. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
  11. package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
  12. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
  13. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
  14. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
  15. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
  16. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
  17. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
  18. package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
  19. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
  20. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
  21. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
  23. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
  24. package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
  25. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
  26. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  28. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
  29. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
  30. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
  31. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
  32. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
  33. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  34. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -4
  35. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
  36. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
  39. package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
  40. package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
  41. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
  42. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
  43. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -4
  44. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -4
  45. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -4
  46. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -4
  47. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -4
  48. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -4
  49. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -4
  50. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -4
  51. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -4
  52. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -4
  53. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -4
  54. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -4
  55. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -4
  56. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
  57. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
  58. package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
  59. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
  60. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
  61. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
  62. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
  63. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
  64. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
  65. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
  66. package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
  67. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
  68. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
  69. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
  70. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
  71. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
  73. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
  74. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
  75. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
  76. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
  77. package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
  78. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
  79. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
  80. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
  81. package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
  82. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
  83. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
  84. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
  86. package/i18n/catalogs/en-US.messages.json +33 -4
  87. package/locales/ar-sa/ar-sa.messages.json +33 -4
  88. package/locales/de-de/de-de.messages.json +33 -4
  89. package/locales/es-es/es-es.messages.json +33 -4
  90. package/locales/fr-fr/fr-fr.messages.json +33 -4
  91. package/locales/id-id/id-id.messages.json +33 -4
  92. package/locales/it-it/it-it.messages.json +33 -4
  93. package/locales/ja-jp/ja-jp.messages.json +33 -4
  94. package/locales/ko-kr/ko-kr.messages.json +33 -4
  95. package/locales/pt-br/pt-br.messages.json +33 -4
  96. package/locales/ru-ru/ru-ru.messages.json +33 -4
  97. package/locales/tr-tr/tr-tr.messages.json +33 -4
  98. package/locales/zh-cn/zh-cn.messages.json +33 -4
  99. package/locales/zh-tw/zh-tw.messages.json +33 -4
  100. package/package.json +2 -1
  101. package/styles.css +156 -0
  102. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
  103. package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
  104. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
  105. package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
  106. package/types/nanahoshi-mona-ui-button.d.ts +26 -3
  107. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  108. package/types/nanahoshi-mona-ui-card.d.ts +22 -6
  109. package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
  110. package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
  111. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
  112. package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
  113. package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
  114. package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
  115. package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
  116. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
  117. package/types/nanahoshi-mona-ui-common.d.ts +28 -2
  118. package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
  119. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
  120. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
  121. package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
  122. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
  123. package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
  124. package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
  125. package/types/nanahoshi-mona-ui-i18n.d.ts +38 -3
  126. package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
  127. package/types/nanahoshi-mona-ui-label.d.ts +17 -2
  128. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
  129. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
  130. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
  131. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
  132. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
  133. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
  134. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
  135. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
  136. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
  137. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
  138. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
  139. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
  140. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
  141. package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
  142. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
  143. package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
  144. package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
  145. package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
  146. package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
  147. package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
  148. package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
  149. package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
  150. package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
  151. package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
  152. package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
  153. package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
  154. package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
  155. package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
  156. package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
  157. package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
  158. package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
  159. package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
  160. package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
  161. package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
  162. package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
  163. package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
@@ -5,6 +5,8 @@ import { ClassInputType } from '@nanahoshi/mona-ui/common';
5
5
  import * as i1 from '@angular/cdk/a11y';
6
6
  import * as i1$1 from '@nanahoshi/mona-ui/text-box';
7
7
  import * as i1$2 from '@nanahoshi/mona-ui/button';
8
+ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
9
+ import { MonaSidebarMessages } from '@nanahoshi/mona-ui/i18n';
8
10
 
9
11
  /**
10
12
  * How the sidebar behaves when it is collapsed.
@@ -45,25 +47,31 @@ type SidebarVariant = "sidebar" | "floating" | "inset";
45
47
  * parts appear exactly where they are written.
46
48
  *
47
49
  * Below the layout's `mobileBreakpoint` it presents as a modal overlay drawer: focus is trapped
48
- * inside it while open, restored to whatever opened it on close, and the rest of the layout is made
49
- * inert. It is not a navigation landmark by itself — wrap the menus in a labelled `nav`, or set
50
- * `role` and `ariaLabel` if the whole region is navigation.
50
+ * inside it while open, restored to whatever opened it on close, and everything outside it is made
51
+ * inert, as far as the layout's `modalScope` says. It is not a navigation landmark by itself — wrap
52
+ * the menus in a labelled `nav`, or set `role` and `aria-label` if the whole region is navigation.
51
53
  */
52
54
  declare class SidebarComponent {
53
55
  #private;
54
- protected readonly physicalSide: _angular_core.Signal<"left" | "right">;
55
- protected readonly drawerPhysicalSide: _angular_core.Signal<"left" | "right">;
56
+ /** Only while there's a role to name. On a plain element a label means nothing, and axe reports it. */
57
+ protected readonly accessibleName: _angular_core.Signal<string | null>;
56
58
  protected readonly baseClass: _angular_core.Signal<string>;
57
59
  /** The compact presentation: an overlay pinned to one edge rather than a column in the flow. */
58
60
  protected readonly drawer: _angular_core.Signal<boolean>;
59
- /** Published rather than the raw input, so a `left`/`right` alias still reports as `start`/`end`. */
60
- protected readonly logicalSide: _angular_core.Signal<_nanahoshi_mona_ui_sidebar.SidebarLogicalSide>;
61
61
  /**
62
62
  * Whether the panel is out of view entirely. The icon rail does not count — it is still on screen
63
63
  * and still operable — but a closed drawer and a fully collapsed off-canvas sidebar both do.
64
64
  */
65
65
  protected readonly hidden: _angular_core.Signal<boolean>;
66
+ protected readonly iconOnly: _angular_core.Signal<boolean>;
67
+ /** Published rather than the raw input, so a `left`/`right` alias still reports as `start`/`end`. */
68
+ protected readonly logicalSide: _angular_core.Signal<_nanahoshi_mona_ui_sidebar.SidebarLogicalSide>;
69
+ /** A drawer scoped to its layout leaves what's around that usable, so it can't claim to be modal. */
70
+ protected readonly modal: _angular_core.Signal<boolean>;
66
71
  protected readonly offCanvasClosed: _angular_core.Signal<boolean>;
72
+ protected readonly physicalSide: _angular_core.Signal<"left" | "right">;
73
+ protected readonly railOpensToward: _angular_core.Signal<"start" | "end">;
74
+ protected readonly railTooltipText: (element: HTMLElement) => string;
67
75
  /** A drawer is a modal surface; a docked sidebar keeps whatever role the consumer gave it. */
68
76
  protected readonly resolvedRole: _angular_core.Signal<string | null>;
69
77
  protected readonly sidebarId: _angular_core.Signal<string>;
@@ -77,10 +85,16 @@ declare class SidebarComponent {
77
85
  protected readonly widthString: _angular_core.Signal<string>;
78
86
  /**
79
87
  * @description Accessible name for the sidebar region. Required when `role` is set, and used as the
80
- * drawer's name on compact viewports.
88
+ * drawer's name on compact viewports, which otherwise has a localized default.
81
89
  * @default ""
82
90
  */
83
91
  readonly ariaLabel: _angular_core.InputSignal<string>;
92
+ /**
93
+ * @description The id of the element that names the sidebar region, in place of `aria-label`. A docked sidebar with no
94
+ * `role` ignores it.
95
+ * @default ""
96
+ */
97
+ readonly ariaLabelledBy: _angular_core.InputSignal<string>;
84
98
  /**
85
99
  * @description How the sidebar behaves when collapsed. `"icon"` keeps a narrow rail of icons visible,
86
100
  * `"offcanvas"` removes it from the layout entirely, and `"none"` disables collapsing altogether.
@@ -89,7 +103,8 @@ declare class SidebarComponent {
89
103
  readonly collapsible: _angular_core.InputSignal<SidebarCollapsibleMode>;
90
104
  /**
91
105
  * @description Sets whether this sidebar is open. Supports two-way binding. While the viewport is
92
- * compact this reflects the drawer, so one binding drives both presentations.
106
+ * compact this reflects the drawer, so one binding drives both presentations, and it reads `false` on
107
+ * a phone from the start. To remember the docked state, use `persistKey` rather than saving this.
93
108
  * @default true
94
109
  */
95
110
  readonly expanded: _angular_core.ModelSignal<boolean>;
@@ -156,9 +171,18 @@ declare class SidebarComponent {
156
171
  readonly width: _angular_core.InputSignal<string | number>;
157
172
  constructor();
158
173
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarComponent, never>;
159
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarComponent, "mona-sidebar", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "iconWidth": { "alias": "iconWidth"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "mobileWidth": { "alias": "mobileWidth"; "required": false; "isSignal": true; }; "persistKey": { "alias": "persistKey"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, ["*"], true, [{ directive: typeof i1.CdkTrapFocus; inputs: {}; outputs: {}; }]>;
174
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarComponent, "mona-sidebar", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "iconWidth": { "alias": "iconWidth"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "mobileWidth": { "alias": "mobileWidth"; "required": false; "isSignal": true; }; "persistKey": { "alias": "persistKey"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, ["*"], true, [{ directive: typeof i1.CdkTrapFocus; inputs: {}; outputs: {}; }]>;
160
175
  }
161
176
 
177
+ /**
178
+ * @description
179
+ * How far an open drawer's modality reaches.
180
+ * - `"page"` makes everything outside the drawer inert and locks the page's scroll, and the drawer is `aria-modal`.
181
+ * - `"layout"` does that within `mona-sidebar-layout` only, for a sidebar embedded in part of a page. What's around the
182
+ * layout stays usable, so the drawer isn't `aria-modal`.
183
+ */
184
+ type SidebarModalScope = "page" | "layout";
185
+
162
186
  /**
163
187
  * @description
164
188
  * Lays its children out in a row and owns what they share. Project one or more `mona-sidebar`
@@ -184,6 +208,13 @@ declare class SidebarLayoutComponent {
184
208
  * @default 768
185
209
  */
186
210
  readonly mobileBreakpoint: _angular_core.InputSignal<number>;
211
+ /**
212
+ * @description How far an open drawer's modality reaches. `"page"` makes everything outside the drawer inert and
213
+ * locks the page's scroll. Use `"layout"` for a sidebar embedded in part of a page: what's around the layout stays
214
+ * usable, so the drawer isn't `aria-modal`.
215
+ * @default "page"
216
+ */
217
+ readonly modalScope: _angular_core.InputSignal<SidebarModalScope>;
187
218
  /**
188
219
  * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
189
220
  * @default ""
@@ -193,12 +224,12 @@ declare class SidebarLayoutComponent {
193
224
  protected onBackdropClick(): void;
194
225
  protected onEscape(event: Event): void;
195
226
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarLayoutComponent, never>;
196
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarLayoutComponent, "mona-sidebar-layout", never, { "mobileBreakpoint": { "alias": "mobileBreakpoint"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
227
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarLayoutComponent, "mona-sidebar-layout", never, { "mobileBreakpoint": { "alias": "mobileBreakpoint"; "required": false; "isSignal": true; }; "modalScope": { "alias": "modalScope"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
197
228
  }
198
229
 
199
230
  /**
200
231
  * @description
201
- * A loading placeholder shaped like a menu item. Drops its label bar on the icon rail, where the
232
+ * A loading placeholder shaped like a menu item. Its label bar is clipped on the icon rail, where the
202
233
  * real labels are not visible either.
203
234
  */
204
235
  declare class SidebarMenuSkeletonComponent {
@@ -251,7 +282,8 @@ declare class SidebarFooterDirective {
251
282
  /**
252
283
  * @description
253
284
  * A titled section of the sidebar, grouping a label and its menu. Stack as many as the sidebar
254
- * needs; each is an ordinary block, so a `monaSidebarSeparator` between them is optional.
285
+ * needs; each is an ordinary block, so a `monaSidebarSeparator` between them is optional. A
286
+ * `monaSidebarGroupLabel` inside it names the group.
255
287
  */
256
288
  declare class SidebarGroupDirective {
257
289
  protected readonly baseClass: string;
@@ -295,11 +327,14 @@ declare class SidebarGroupHeaderDirective {
295
327
 
296
328
  /**
297
329
  * @description
298
- * The name of a group. Fades out on the icon rail, where there is no width to read it in.
330
+ * The name of a group, which the enclosing `monaSidebarGroup` is labelled by. Fades out on the icon
331
+ * rail, where there is no width to read it in.
299
332
  */
300
333
  declare class SidebarGroupLabelDirective {
301
334
  #private;
302
335
  protected readonly baseClass: _angular_core.Signal<string>;
336
+ protected readonly id: string;
337
+ constructor();
303
338
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarGroupLabelDirective, never>;
304
339
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SidebarGroupLabelDirective, "[monaSidebarGroupLabel]", never, {}, {}, never, never, true, never>;
305
340
  }
@@ -413,7 +448,8 @@ type SidebarMenuButtonSize = "medium" | "large";
413
448
  * bar preview, none of which a button can offer.
414
449
  *
415
450
  * On a compact viewport, following a link closes the drawer, since the destination it navigates to is
416
- * underneath it.
451
+ * underneath it. A row that opens a submenu leaves the drawer open, and on the icon rail it expands the
452
+ * sidebar, since that's the only place the submenu can open.
417
453
  */
418
454
  declare class SidebarMenuButtonDirective {
419
455
  #private;
@@ -431,18 +467,20 @@ declare class SidebarMenuButtonDirective {
431
467
  * overflow, so any label is pushed out of view instead of competing for space.
432
468
  */
433
469
  protected readonly railBox: _angular_core.Signal<boolean>;
434
- protected readonly railTitle: _angular_core.Signal<string | null>;
470
+ protected readonly railTooltip: _angular_core.Signal<string | null>;
471
+ protected readonly role: _angular_core.Signal<string | null>;
435
472
  protected readonly tabIndex: _angular_core.Signal<0 | null>;
436
473
  protected readonly type: string | null;
437
474
  /**
438
475
  * @description Closes the overlay drawer after this row is activated. Only applies on compact
439
476
  * viewports, where the drawer covers the destination being navigated to. Set to `false` for rows
440
- * that do not navigate, such as a disclosure trigger.
441
- * @default true
477
+ * that do not navigate. Leave it unset on a `monaCollapsibleTrigger`, which keeps the drawer open.
478
+ * @default true, or false on a `monaCollapsibleTrigger`
442
479
  */
443
- readonly closeOnSelect: _angular_core.InputSignal<boolean>;
480
+ readonly closeOnSelect: _angular_core.InputSignal<boolean | undefined>;
444
481
  /**
445
- * @description Renders the row as unavailable and suppresses activation.
482
+ * @description Renders the row as unavailable and suppresses activation, including a `routerLink` and any `click`
483
+ * handler on it. A disabled anchor gives up its `href`.
446
484
  * @default false
447
485
  */
448
486
  readonly disabled: _angular_core.InputSignal<boolean>;
@@ -454,8 +492,7 @@ declare class SidebarMenuButtonDirective {
454
492
  readonly size: _angular_core.InputSignal<SidebarMenuButtonSize>;
455
493
  /**
456
494
  * @description Text identifying this item while the sidebar is collapsed to its icon rail, where the
457
- * label is clipped away. Applied as the host's `title`, so the browser surfaces it on hover, and an
458
- * ancestor carrying `monaTooltip` with `mode="content"` renders it as a styled tooltip instead.
495
+ * label is clipped away. Shown as a tooltip on hover and on keyboard focus, on the rail only.
459
496
  * @default ""
460
497
  */
461
498
  readonly tooltip: _angular_core.InputSignal<string>;
@@ -464,7 +501,8 @@ declare class SidebarMenuButtonDirective {
464
501
  * @default ""
465
502
  */
466
503
  readonly userClass: _angular_core.InputSignalWithTransform<string, ClassInputType>;
467
- protected onClick(event: Event): void;
504
+ constructor();
505
+ protected onClick(): void;
468
506
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarMenuButtonDirective, never>;
469
507
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SidebarMenuButtonDirective, "a[monaSidebarMenuButton], button[monaSidebarMenuButton]", ["monaSidebarMenuButton"], { "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
470
508
  }
@@ -514,19 +552,23 @@ declare class SidebarMenuSubDirective {
514
552
  * which positions it. Hidden on narrow viewports, where the edge is too easy to hit by accident.
515
553
  *
516
554
  * Deliberately outside the tab order: it is a pointer shortcut for what `monaSidebarTrigger` already
517
- * does, and a second tab stop onto an unlabelled 4px strip would be noise for keyboard users. Provide
518
- * a `monaSidebarTrigger` as well — the rail is not a substitute for it — and give the rail an
519
- * `aria-label` so pointer users of assistive technology can still identify it.
555
+ * does, and a second tab stop onto a 4px strip would be noise for keyboard users. Provide a
556
+ * `monaSidebarTrigger` as well — the rail is not a substitute for it.
520
557
  */
521
558
  declare class SidebarRailDirective {
522
559
  #private;
523
- protected readonly physicalSide: _angular_core.Signal<"left" | "right">;
524
560
  protected readonly baseClass: _angular_core.Signal<string>;
525
561
  protected readonly expanded: _angular_core.Signal<boolean>;
562
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaSidebarMessages>;
526
563
  protected readonly sidebarId: _angular_core.Signal<string>;
564
+ /**
565
+ * @description Accessible name of the rail, which otherwise has a localized default.
566
+ * @default ""
567
+ */
568
+ readonly ariaLabel: _angular_core.InputSignal<string>;
527
569
  protected onClick(): void;
528
570
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarRailDirective, never>;
529
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SidebarRailDirective, "button[monaSidebarRail]", never, {}, {}, never, never, true, never>;
571
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SidebarRailDirective, "button[monaSidebarRail]", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
530
572
  }
531
573
 
532
574
  /**
@@ -536,6 +578,7 @@ declare class SidebarRailDirective {
536
578
  declare class SidebarSeparatorDirective {
537
579
  #private;
538
580
  protected readonly baseClass: _angular_core.Signal<string>;
581
+ protected readonly role: string | null;
539
582
  /**
540
583
  * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
541
584
  * @default ""
@@ -553,18 +596,22 @@ declare class SidebarSeparatorDirective {
553
596
  * By default it drives the sidebar it is written inside. Set `for` to the id of a `mona-sidebar` to
554
597
  * drive that one instead, which is what a trigger in a shared header needs when the layout holds more
555
598
  * than one sidebar. A `for` that matches no sidebar leaves the trigger inert rather than throwing, so
556
- * a sidebar that has not rendered yet does not take the page down with it.
599
+ * a sidebar that has not rendered yet does not take the page down with it, and warns in development.
557
600
  *
558
601
  * A `button` is the right host and needs nothing further. On any other element the directive supplies
559
- * the rest of the button contract — `role`, a tab stop, and Enter/Space activation — so a `div` or
560
- * `span` trigger is still operable by keyboard rather than silently mouse-only.
602
+ * the rest of the button contract — `role`, a tab stop, and Enter/Space activation — so a `div`, a
603
+ * `span` or an `a` without `href` is still operable by keyboard rather than silently mouse-only.
604
+ *
605
+ * A sidebar that can't collapse has nothing for a trigger to do on a wide viewport, so the trigger
606
+ * reports itself as disabled there rather than as an open disclosure.
561
607
  */
562
608
  declare class SidebarTriggerDirective {
563
609
  #private;
564
610
  protected readonly expanded: _angular_core.Signal<boolean | null>;
565
- protected readonly role: string | null;
611
+ protected readonly fixed: _angular_core.Signal<boolean>;
612
+ protected readonly role: _angular_core.Signal<"button" | null>;
566
613
  protected readonly sidebarId: _angular_core.Signal<string | null>;
567
- protected readonly tabIndex: number | null;
614
+ protected readonly tabIndex: _angular_core.Signal<0 | null>;
568
615
  protected readonly type: string | null;
569
616
  /**
570
617
  * @description Id of the `mona-sidebar` to toggle. Leave unset to toggle the sidebar this trigger
@@ -572,6 +619,7 @@ declare class SidebarTriggerDirective {
572
619
  * @default ""
573
620
  */
574
621
  readonly for: _angular_core.InputSignal<string>;
622
+ constructor();
575
623
  protected onClick(): void;
576
624
  protected onEnterKeydown(event: Event): void;
577
625
  protected onSpaceKeydown(event: Event): void;
@@ -643,12 +691,16 @@ interface SidebarStorage {
643
691
  write(key: string, expanded: boolean): void;
644
692
  }
645
693
 
694
+ declare const SIDEBAR_DEFAULT_MESSAGES: MonaSidebarMessages;
695
+
646
696
  /**
647
697
  * Replaces where sidebars remember whether they were left open. The default is `localStorage`, which
648
698
  * the server cannot read; supply a cookie- or request-backed storage here to have a server-rendered
649
699
  * application render the remembered state rather than correcting it on hydration.
700
+ * @param storage the storage, or a factory for it that runs in an injection context, such as for one
701
+ * that injects the current request
650
702
  */
651
- declare function provideSidebarStorage(storage: SidebarStorage): EnvironmentProviders;
703
+ declare function provideSidebarStorage(storage: SidebarStorage | (() => SidebarStorage)): EnvironmentProviders;
652
704
 
653
705
  /**
654
706
  * The default `SidebarStorage`: `localStorage`, under the sidebar's `persistKey`.
@@ -677,22 +729,33 @@ declare class LocalStorageSidebarStorage implements SidebarStorage {
677
729
  */
678
730
  declare const SIDEBAR_STORAGE: InjectionToken<SidebarStorage>;
679
731
 
732
+ interface InjectSidebarOptions {
733
+ /** Reads the sidebar with this id in the enclosing layout, rather than the nearest one. Needs a layout. */
734
+ readonly for?: string;
735
+ /** Returns `null` instead of throwing when there is no enclosing sidebar or layout. */
736
+ readonly optional?: boolean;
737
+ }
680
738
  /**
681
739
  * @description
682
- * Reads the sidebar that encloses the calling component or directive. Must be called from an
683
- * injection context inside a `mona-sidebar-layout`.
740
+ * Reads a sidebar from an injection context: the one that encloses the caller, or from elsewhere in a
741
+ * `mona-sidebar-layout`, such as a toolbar in the inset, the layout's first sidebar. Name another one with `for`.
684
742
  *
685
743
  * Returns the sidebar's state and the commands that are safe to issue from anywhere — opening,
686
744
  * closing and toggling, each routed to whichever presentation is current. Structural facts such as
687
745
  * the side, variant and collapsible mode are readable but not settable; those are authored as inputs
688
746
  * on `mona-sidebar`, and writing them from a descendant would only desynchronise the two.
689
747
  *
690
- * @param options.optional Returns `null` instead of throwing when there is no enclosing layout.
748
+ * In a layout it follows the sidebar rather than holding it, because the caller may be created first. Until there is
749
+ * one, it reads as closed and its commands do nothing.
750
+ *
751
+ * @param options.optional Returns `null` instead of throwing when there is no enclosing sidebar or layout.
752
+ * @param options.for The id of the `mona-sidebar` to read, in the enclosing layout. Without a layout this throws, or
753
+ * returns `null` with `optional`, even inside a sidebar, because only a layout can find one by id.
691
754
  */
692
- declare function injectSidebar(): SidebarController;
693
- declare function injectSidebar(options: {
755
+ declare function injectSidebar(options: InjectSidebarOptions & {
694
756
  optional: true;
695
757
  }): SidebarController | null;
758
+ declare function injectSidebar(options?: InjectSidebarOptions): SidebarController;
696
759
 
697
- export { LocalStorageSidebarStorage, SIDEBAR_STORAGE, SidebarComponent, SidebarContentDirective, SidebarFooterDirective, SidebarGroupActionDirective, SidebarGroupContentDirective, SidebarGroupDirective, SidebarGroupHeaderDirective, SidebarGroupLabelDirective, SidebarHeaderDirective, SidebarInputDirective, SidebarInsetDirective, SidebarLayoutComponent, SidebarMenuActionDirective, SidebarMenuBadgeDirective, SidebarMenuButtonDirective, SidebarMenuDirective, SidebarMenuItemDirective, SidebarMenuSkeletonComponent, SidebarMenuSubDirective, SidebarRailDirective, SidebarSeparatorDirective, SidebarTriggerDirective, injectSidebar, provideSidebarStorage };
698
- export type { SidebarCollapsibleMode, SidebarController, SidebarLogicalSide, SidebarMenuButtonSize, SidebarSide, SidebarStorage, SidebarVariant };
760
+ export { LocalStorageSidebarStorage, SIDEBAR_DEFAULT_MESSAGES, SIDEBAR_STORAGE, SidebarComponent, SidebarContentDirective, SidebarFooterDirective, SidebarGroupActionDirective, SidebarGroupContentDirective, SidebarGroupDirective, SidebarGroupHeaderDirective, SidebarGroupLabelDirective, SidebarHeaderDirective, SidebarInputDirective, SidebarInsetDirective, SidebarLayoutComponent, SidebarMenuActionDirective, SidebarMenuBadgeDirective, SidebarMenuButtonDirective, SidebarMenuDirective, SidebarMenuItemDirective, SidebarMenuSkeletonComponent, SidebarMenuSubDirective, SidebarRailDirective, SidebarSeparatorDirective, SidebarTriggerDirective, injectSidebar, provideSidebarStorage };
761
+ export type { InjectSidebarOptions, SidebarCollapsibleMode, SidebarController, SidebarLogicalSide, SidebarMenuButtonSize, SidebarModalScope, SidebarSide, SidebarStorage, SidebarVariant };
@@ -13,7 +13,7 @@ type SkeletonVariantInput = VariantInputs<SkeletonVariantProps>;
13
13
  /**
14
14
  * @description
15
15
  * A placeholder block standing in for content that has not loaded yet. Size it with `width` and
16
- * `height`, or with utility classes for anything more involved.
16
+ * `height`, which set inline styles, so utility classes for size have no effect.
17
17
  *
18
18
  * It is decorative, so it is hidden from assistive technology. Mark the region it fills with
19
19
  * `aria-busy` and describe what is loading there instead.