@nanahoshi/mona-ui 0.25.1 → 0.26.1

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 (233) hide show
  1. package/README.md +2 -0
  2. package/chart/README.md +2 -2
  3. package/command/package.json +4 -0
  4. package/docs/auto-complete.md +733 -0
  5. package/docs/avatar.md +220 -0
  6. package/docs/breadcrumb.md +320 -0
  7. package/docs/button-group.md +392 -0
  8. package/docs/button.md +256 -0
  9. package/docs/calendar.md +515 -0
  10. package/docs/card.md +292 -0
  11. package/docs/chart-bar.md +714 -0
  12. package/docs/chart-financial.md +567 -0
  13. package/docs/chart-funnel.md +546 -0
  14. package/docs/chart-heatmap.md +535 -0
  15. package/docs/chart-line-area.md +462 -0
  16. package/docs/chart-pie.md +645 -0
  17. package/docs/chart-radar.md +518 -0
  18. package/docs/chart-radial.md +658 -0
  19. package/docs/chart-scatter.md +479 -0
  20. package/docs/chart-treemap.md +651 -0
  21. package/docs/chart.md +2465 -0
  22. package/docs/checkbox.md +374 -0
  23. package/docs/chip.md +339 -0
  24. package/docs/circular-progress-bar.md +287 -0
  25. package/docs/collapsible.md +308 -0
  26. package/docs/color-gradient.md +336 -0
  27. package/docs/color-palette.md +317 -0
  28. package/docs/color-picker.md +387 -0
  29. package/docs/combo-box.md +764 -0
  30. package/docs/command.md +582 -0
  31. package/docs/contextmenu.md +530 -0
  32. package/docs/date-picker.md +251 -0
  33. package/docs/datetime-picker.md +284 -0
  34. package/docs/decimal-textbox.md +260 -0
  35. package/docs/dialog.md +822 -0
  36. package/docs/dropdown-button.md +507 -0
  37. package/docs/dropdown-list.md +779 -0
  38. package/docs/editor.md +374 -0
  39. package/docs/expansion-panel.md +348 -0
  40. package/docs/fieldset.md +217 -0
  41. package/docs/forms.md +162 -0
  42. package/docs/grid.md +2053 -0
  43. package/docs/input.md +197 -0
  44. package/docs/installation.md +54 -0
  45. package/docs/introduction.md +46 -0
  46. package/docs/label.md +340 -0
  47. package/docs/list-box.md +637 -0
  48. package/docs/list-view.md +584 -0
  49. package/docs/menubar.md +559 -0
  50. package/docs/multi-select.md +765 -0
  51. package/docs/notification.md +460 -0
  52. package/docs/numeric-textbox.md +301 -0
  53. package/docs/otp-input.md +539 -0
  54. package/docs/pager.md +513 -0
  55. package/docs/placeholder.md +176 -0
  56. package/docs/popover.md +423 -0
  57. package/docs/popup-menu.md +658 -0
  58. package/docs/popup.md +617 -0
  59. package/docs/progress-bar.md +368 -0
  60. package/docs/radio-button.md +451 -0
  61. package/docs/range-slider.md +367 -0
  62. package/docs/rating.md +518 -0
  63. package/docs/scroll-view.md +375 -0
  64. package/docs/segmented.md +434 -0
  65. package/docs/sheet.md +348 -0
  66. package/docs/sidebar.md +1126 -0
  67. package/docs/skeleton.md +181 -0
  68. package/docs/slider.md +423 -0
  69. package/docs/spinner.md +370 -0
  70. package/docs/split-button.md +522 -0
  71. package/docs/splitter.md +342 -0
  72. package/docs/stepper.md +539 -0
  73. package/docs/switch.md +340 -0
  74. package/docs/tabs.md +542 -0
  75. package/docs/textarea.md +196 -0
  76. package/docs/textbox.md +332 -0
  77. package/docs/theming.md +403 -0
  78. package/docs/time-picker.md +254 -0
  79. package/docs/tooltip-directive.md +340 -0
  80. package/docs/tooltip.md +321 -0
  81. package/docs/tree-view.md +1018 -0
  82. package/docs/window.md +663 -0
  83. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
  84. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +8 -0
  85. package/fesm2022/nanahoshi-mona-ui-button.mjs +12 -0
  86. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +5 -2
  87. package/fesm2022/nanahoshi-mona-ui-chart.mjs +212 -66
  88. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +4 -0
  89. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +4 -0
  90. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +16 -2
  91. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  92. package/fesm2022/nanahoshi-mona-ui-command.mjs +924 -0
  93. package/fesm2022/nanahoshi-mona-ui-common.mjs +4 -0
  94. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +10 -6
  95. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +2 -1
  96. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +2 -1
  97. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +9 -5
  98. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +9 -5
  99. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +55 -1
  100. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -2
  101. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +13 -0
  102. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +5 -0
  103. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs} +2 -2
  104. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs → nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs} +5 -5
  105. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs → nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs} +18 -35
  106. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs} +5 -5
  107. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs} +4653 -4529
  108. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  109. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -0
  110. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1 -0
  111. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +168 -0
  112. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +19 -1
  113. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +14 -0
  114. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +32 -0
  115. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -0
  116. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -0
  117. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -0
  118. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -0
  119. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -0
  120. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -0
  121. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -0
  122. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -0
  123. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -0
  124. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -0
  125. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -0
  126. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -0
  127. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -0
  128. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +15 -8
  129. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +8 -5
  130. package/fesm2022/nanahoshi-mona-ui-notification.mjs +9 -0
  131. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
  132. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +5 -0
  133. package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -1
  134. package/fesm2022/nanahoshi-mona-ui-popover.mjs +14 -6
  135. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +48 -183
  136. package/fesm2022/nanahoshi-mona-ui-popup.mjs +16 -0
  137. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +4 -0
  138. package/fesm2022/nanahoshi-mona-ui-rating.mjs +2 -0
  139. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -0
  140. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +5 -5
  141. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +1 -1
  142. package/fesm2022/nanahoshi-mona-ui-slider.mjs +7 -2
  143. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +9 -6
  144. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +18 -21
  145. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +11 -8
  146. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +9 -1
  147. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +2 -1
  148. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +16 -5
  149. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +13 -11
  150. package/fesm2022/nanahoshi-mona-ui-window.mjs +12 -5
  151. package/i18n/catalogs/en-US.messages.json +10 -0
  152. package/internal/popup-menu/package.json +4 -0
  153. package/llms.txt +133 -0
  154. package/locales/ar-sa/ar-sa.messages.json +10 -0
  155. package/locales/de-de/de-de.messages.json +10 -0
  156. package/locales/es-es/es-es.messages.json +10 -0
  157. package/locales/fr-fr/fr-fr.messages.json +10 -0
  158. package/locales/id-id/id-id.messages.json +10 -0
  159. package/locales/it-it/it-it.messages.json +10 -0
  160. package/locales/ja-jp/ja-jp.messages.json +10 -0
  161. package/locales/ko-kr/ko-kr.messages.json +10 -0
  162. package/locales/pt-br/pt-br.messages.json +10 -0
  163. package/locales/ru-ru/ru-ru.messages.json +10 -0
  164. package/locales/tr-tr/tr-tr.messages.json +10 -0
  165. package/locales/zh-cn/zh-cn.messages.json +10 -0
  166. package/locales/zh-tw/zh-tw.messages.json +10 -0
  167. package/package.json +9 -1
  168. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -1
  169. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +8 -0
  170. package/types/nanahoshi-mona-ui-button.d.ts +12 -0
  171. package/types/nanahoshi-mona-ui-calendar.d.ts +3 -0
  172. package/types/nanahoshi-mona-ui-chart.d.ts +250 -20
  173. package/types/nanahoshi-mona-ui-check-box.d.ts +4 -0
  174. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +4 -0
  175. package/types/nanahoshi-mona-ui-collapsible.d.ts +10 -0
  176. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -1
  177. package/types/nanahoshi-mona-ui-command.d.ts +253 -0
  178. package/types/nanahoshi-mona-ui-common.d.ts +17 -1
  179. package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -2
  180. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -1
  181. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -1
  182. package/types/nanahoshi-mona-ui-dialog.d.ts +58 -1
  183. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +7 -3
  184. package/types/nanahoshi-mona-ui-dropdowns.d.ts +55 -1
  185. package/types/nanahoshi-mona-ui-editor.d.ts +31 -0
  186. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +13 -0
  187. package/types/nanahoshi-mona-ui-fieldset.d.ts +5 -0
  188. package/types/nanahoshi-mona-ui-grid.d.ts +162 -35
  189. package/types/nanahoshi-mona-ui-i18n.d.ts +144 -1
  190. package/types/nanahoshi-mona-ui-internal-list.d.ts +16 -1
  191. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +165 -0
  192. package/types/nanahoshi-mona-ui-internal-tree.d.ts +21 -2
  193. package/types/nanahoshi-mona-ui-internal.d.ts +4 -5
  194. package/types/nanahoshi-mona-ui-label.d.ts +1 -0
  195. package/types/nanahoshi-mona-ui-list-box.d.ts +27 -4
  196. package/types/nanahoshi-mona-ui-list-view.d.ts +34 -1
  197. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  198. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +10 -0
  199. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +10 -0
  200. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +10 -0
  201. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +10 -0
  202. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +10 -0
  203. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +10 -0
  204. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +10 -0
  205. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +10 -0
  206. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +10 -0
  207. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +10 -0
  208. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +10 -0
  209. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +10 -0
  210. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +10 -0
  211. package/types/nanahoshi-mona-ui-menubar.d.ts +10 -3
  212. package/types/nanahoshi-mona-ui-multi-select.d.ts +3 -3
  213. package/types/nanahoshi-mona-ui-notification.d.ts +9 -0
  214. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -1
  215. package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
  216. package/types/nanahoshi-mona-ui-pager.d.ts +5 -1
  217. package/types/nanahoshi-mona-ui-popover.d.ts +9 -1
  218. package/types/nanahoshi-mona-ui-popup-menu.d.ts +48 -161
  219. package/types/nanahoshi-mona-ui-popup.d.ts +16 -0
  220. package/types/nanahoshi-mona-ui-progress-bar.d.ts +4 -0
  221. package/types/nanahoshi-mona-ui-rating.d.ts +2 -0
  222. package/types/nanahoshi-mona-ui-segmented.d.ts +1 -0
  223. package/types/nanahoshi-mona-ui-sheet.d.ts +1 -1
  224. package/types/nanahoshi-mona-ui-slider.d.ts +2 -0
  225. package/types/nanahoshi-mona-ui-spinner.d.ts +7 -0
  226. package/types/nanahoshi-mona-ui-split-button.d.ts +7 -4
  227. package/types/nanahoshi-mona-ui-stepper.d.ts +11 -2
  228. package/types/nanahoshi-mona-ui-tabs.d.ts +4 -1
  229. package/types/nanahoshi-mona-ui-text-box.d.ts +9 -1
  230. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -1
  231. package/types/nanahoshi-mona-ui-tooltip.d.ts +10 -2
  232. package/types/nanahoshi-mona-ui-tree-view.d.ts +6 -5
  233. package/types/nanahoshi-mona-ui-window.d.ts +66 -1
@@ -0,0 +1,342 @@
1
+ # Splitter
2
+
3
+ > Lays out panes in a row or column that can be resized and collapsed.
4
+
5
+ Entry point: `@nanahoshi/mona-ui/splitter`
6
+
7
+ **Selectors:** `mona-splitter` · `mona-splitter-pane`
8
+
9
+ `SplitterComponent` lays out projected `SplitterPaneComponent` panes in a row or column and lets consumers resize them by dragging the bar between adjacent panes, with optional collapse/expand support per pane.
10
+
11
+ ## Overview
12
+
13
+ `SplitterComponent` (`mona-splitter`) renders its projected `SplitterPaneComponent` (`mona-splitter-pane`) children side by side, separated by a draggable resizer bar. The `orientation` input switches the layout between a horizontal row and a vertical column.
14
+
15
+ Each pane controls its own sizing through `size`, `min`, and `max`, and can opt in to drag-resizing (`resizable`) and collapse/expand (`collapsible`) independently of its siblings. The splitter fills the width and height of its containing element, so give the host element (or an ancestor) an explicit height for predictable layout.
16
+
17
+ **Use `SplitterComponent` when you need to:**
18
+
19
+ - Let users adjust the relative width or height of adjacent content regions (e.g. a sidebar and a main panel)
20
+ - Provide a panel users can collapse to reclaim space, with controls to bring it back
21
+
22
+ ## Import & Quick Start
23
+
24
+ ```typescript
25
+ import { SplitterComponent, SplitterPaneComponent } from "@nanahoshi/mona-ui/splitter";
26
+ ```
27
+
28
+ Add both to your standalone component's `imports` array.
29
+
30
+ ```html
31
+ <mona-splitter class="h-64 w-full">
32
+ <mona-splitter-pane [size]="240" [min]="120" [max]="400">
33
+ <div class="p-4">Sidebar</div>
34
+ </mona-splitter-pane>
35
+ <mona-splitter-pane>
36
+ <div class="p-4">Main content</div>
37
+ </mona-splitter-pane>
38
+ </mona-splitter>
39
+ ```
40
+
41
+ The second pane has no `size`, so it absorbs the remaining space.
42
+
43
+ ## Examples
44
+
45
+ ### Vertical
46
+
47
+ `vertical-example.component.ts`
48
+
49
+ ```typescript
50
+ import { Component } from "@angular/core";
51
+ import { SplitterComponent, SplitterPaneComponent } from "@nanahoshi/mona-ui/splitter";
52
+
53
+ @Component({
54
+ selector: "app-splitter-vertical-example",
55
+ imports: [SplitterComponent, SplitterPaneComponent],
56
+ templateUrl: "./vertical-example.component.html"
57
+ })
58
+ export class SplitterVerticalExampleComponent {}
59
+ ```
60
+
61
+ `vertical-example.component.html`
62
+
63
+ ```html
64
+ <mona-splitter class="h-72 w-full border border-border" orientation="vertical">
65
+ <mona-splitter-pane label="Query" [min]="60" [size]="160">
66
+ <p class="p-4 text-sm">SELECT name, total FROM orders WHERE status = 'open'</p>
67
+ </mona-splitter-pane>
68
+ <mona-splitter-pane label="Results">
69
+ <p class="p-4 text-sm">3 rows</p>
70
+ </mona-splitter-pane>
71
+ </mona-splitter>
72
+ ```
73
+
74
+ ### Collapsible pane
75
+
76
+ `collapsed` and `size` are two-way models, so the page can read and change both.
77
+
78
+ `collapsible-example.component.ts`
79
+
80
+ ```typescript
81
+ import { Component, signal } from "@angular/core";
82
+ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
83
+ import { SplitterComponent, SplitterPaneComponent } from "@nanahoshi/mona-ui/splitter";
84
+
85
+ @Component({
86
+ selector: "app-splitter-collapsible-example",
87
+ imports: [ButtonDirective, SplitterComponent, SplitterPaneComponent],
88
+ templateUrl: "./collapsible-example.component.html"
89
+ })
90
+ export class SplitterCollapsibleExampleComponent {
91
+ protected readonly foldersCollapsed = signal(false);
92
+ protected readonly foldersSize = signal<string | number>(200);
93
+ }
94
+ ```
95
+
96
+ `collapsible-example.component.html`
97
+
98
+ ```html
99
+ <div class="flex flex-col gap-2">
100
+ <div class="flex items-center gap-3">
101
+ <button monaButton type="button" (click)="foldersCollapsed.set(!foldersCollapsed())">
102
+ {{ foldersCollapsed() ? "Show folders" : "Hide folders" }}
103
+ </button>
104
+ <span aria-live="polite" class="text-sm">
105
+ Folders: {{ foldersCollapsed() ? "collapsed" : foldersSize() + " px" }}
106
+ </span>
107
+ </div>
108
+ <mona-splitter class="h-64 w-full border border-border">
109
+ <mona-splitter-pane
110
+ label="Folders"
111
+ [collapsible]="true"
112
+ [max]="320"
113
+ [min]="120"
114
+ [(collapsed)]="foldersCollapsed"
115
+ [(size)]="foldersSize">
116
+ <ul class="space-y-1 p-4 text-sm">
117
+ <li>Inbox</li>
118
+ <li>Drafts</li>
119
+ <li>Archive</li>
120
+ </ul>
121
+ </mona-splitter-pane>
122
+ <mona-splitter-pane label="Message">
123
+ <p class="p-4 text-sm">Double-click the bar, or focus it and press Enter, to collapse the folders.</p>
124
+ </mona-splitter-pane>
125
+ </mona-splitter>
126
+ </div>
127
+ ```
128
+
129
+ ### Proportional sizing
130
+
131
+ A fixed pane next to two `fr` panes, which share the remaining space at a 1:2 ratio.
132
+
133
+ `proportional-example.component.ts`
134
+
135
+ ```typescript
136
+ import { Component } from "@angular/core";
137
+ import { SplitterComponent, SplitterPaneComponent } from "@nanahoshi/mona-ui/splitter";
138
+
139
+ @Component({
140
+ selector: "app-splitter-proportional-example",
141
+ imports: [SplitterComponent, SplitterPaneComponent],
142
+ templateUrl: "./proportional-example.component.html"
143
+ })
144
+ export class SplitterProportionalExampleComponent {}
145
+ ```
146
+
147
+ `proportional-example.component.html`
148
+
149
+ ```html
150
+ <mona-splitter class="h-48 w-full border border-border">
151
+ <mona-splitter-pane label="Fixed" [size]="160">
152
+ <p class="p-4 text-sm">Fixed, 160 px</p>
153
+ </mona-splitter-pane>
154
+ <mona-splitter-pane label="One share" size="1fr">
155
+ <p class="p-4 text-sm">1fr</p>
156
+ </mona-splitter-pane>
157
+ <mona-splitter-pane label="Two shares" size="2fr">
158
+ <p class="p-4 text-sm">2fr</p>
159
+ </mona-splitter-pane>
160
+ </mona-splitter>
161
+ ```
162
+
163
+ ### Saving a layout
164
+
165
+ `resizeEnd` gives every pane's `size` in order, ready to pass back in.
166
+
167
+ `save-layout-example.component.ts`
168
+
169
+ ```typescript
170
+ import { Component, signal } from "@angular/core";
171
+ import { SplitterComponent, SplitterPaneComponent } from "@nanahoshi/mona-ui/splitter";
172
+
173
+ @Component({
174
+ selector: "app-splitter-save-layout-example",
175
+ imports: [SplitterComponent, SplitterPaneComponent],
176
+ templateUrl: "./save-layout-example.component.html"
177
+ })
178
+ export class SplitterSaveLayoutExampleComponent {
179
+ protected readonly layout = signal<readonly (string | number)[]>([200, ""]);
180
+ }
181
+ ```
182
+
183
+ `save-layout-example.component.html`
184
+
185
+ ```html
186
+ <div class="flex flex-col gap-2">
187
+ <mona-splitter class="h-48 w-full border border-border" (resizeEnd)="layout.set($event)">
188
+ <mona-splitter-pane label="Navigation" [size]="layout()[0]">
189
+ <p class="p-4 text-sm">Navigation</p>
190
+ </mona-splitter-pane>
191
+ <mona-splitter-pane label="Content" [size]="layout()[1]">
192
+ <p class="p-4 text-sm">Content</p>
193
+ </mona-splitter-pane>
194
+ </mona-splitter>
195
+ <p aria-live="polite" class="text-sm">Saved layout: {{ layout().join(" / ") }}</p>
196
+ </div>
197
+ ```
198
+
199
+ ## Appearance & Styling
200
+
201
+ ### Orientation
202
+
203
+ | `orientation` | Layout |
204
+ |------------------------|-----------------------------------------------------------|
205
+ | `horizontal` (default) | Panes arranged in a row, draggable bars are vertical |
206
+ | `vertical` | Panes arranged in a column, draggable bars are horizontal |
207
+
208
+ ### Custom classes
209
+
210
+ `SplitterComponent` and `SplitterPaneComponent` have no dedicated `class` input. Apply a `class` attribute directly to `<mona-splitter>` or `<mona-splitter-pane>`; Angular merges it with the component's own classes. Unlike most other Mona UI components, this merge does not go through `tailwind-merge`, so conflicting Tailwind utility classes are not deduplicated.
211
+
212
+ ## Behavior
213
+
214
+ ### Pane sizing
215
+
216
+ Each `mona-splitter-pane`'s `size` accepts:
217
+
218
+ - A number or pixel string (e.g. `240`, `"240px"`) — a fixed size
219
+ - Another CSS length string (e.g. `"20%"`, `"10rem"`) — a fixed size in that unit
220
+ - A proportional string in the form `"<n>fr"` (e.g. `"1fr"`, `"2fr"`) — shares remaining space with other `fr` panes by weight, similar to a CSS grid `fr` track
221
+ - An empty string (the default) — the pane absorbs the splitter's remaining space
222
+
223
+ If no pane is left with an empty `size`, the last non-collapsed pane absorbs remaining space instead — unless that pane already has an `fr` size, which is honored as its weight rather than being overridden.
224
+
225
+ `min` and `max` take numbers and pixels only, such as `120` or `"120px"`, because a drag works in pixels. Anything else, such as a percentage, `fr` or `rem`, is ignored, with a warning in development. They hold for the layout as well as for a drag, so a first size or a window resize can't take a pane past them. A collapsed pane doesn't keep its `min`, since it has to be able to close.
226
+
227
+ ### When the layout is reported
228
+
229
+ `sizeChange` fires on every move of a drag. `resizeEnd` on `mona-splitter` fires once when a drag ends, after each key that resizes, and when the separator collapses or expands a pane, with every pane's `size` in order, ready to pass back in, as in the [Saving a layout](#saving-a-layout) example.
230
+
231
+ A press that moved nothing doesn't fire it. Neither does collapsing or expanding with a double-click, a collapse button, `Enter` or `Alt` + arrow, so bind `collapsed` too if the layout should remember that.
232
+
233
+ ### Resizing and collapsing
234
+
235
+ Dragging the bar between two panes resizes both of them, clamped to their `min`/`max`, with the primary button or by touch. A pane's `resizable` input is `true` by default. Setting it to `false` stops both bars beside that pane from moving, by pointer or key. The bar still renders.
236
+
237
+ The bar is 2 pixels wide, and its hit area reaches past it, over the edges of the panes: 12 pixels, or 24 on a coarse pointer such as a finger. The collapse buttons are 24 pixels. Pressing the bar gives it focus, without showing the focus outline, so the keys work straight after a drag.
238
+
239
+ A pane's `collapsible` input is `false` by default. When `true`, the pane can be collapsed and expanded by:
240
+
241
+ - Double-clicking the adjacent resizer bar
242
+ - Collapse buttons that appear when the bar is hovered or has focus, which also covers touch, since a tap focuses it (rendered only while the relevant neighbor is collapsible and not already collapsed)
243
+ - The keyboard, as listed under [Accessibility](#accessibility)
244
+
245
+ A collapsed pane's content is hidden, can't take focus, and its size is reduced to zero. Expanding it restores its previous size where space allows.
246
+
247
+ ## Accessibility
248
+
249
+ The bar between two panes contains an element with `role="separator"`, with these managed attributes. The collapse buttons sit beside it, not inside it, so they stay reachable.
250
+
251
+ | Attribute | When present | Value |
252
+ |--------------------|-------------------------------------------------------------------------------|------------------------------------------------------------------------|
253
+ | `aria-label` | Always | The `label` of the pane before the bar, or a generic name |
254
+ | `aria-orientation` | Always | The way the bar runs: `"vertical"` in a horizontal splitter, and the reverse |
255
+ | `aria-controls` | When the bar can do something | The `id` of the pane before the bar |
256
+ | `aria-valuenow` | When the bar can do something | Current size, in pixels, of the pane before the bar. Follows the container's size. |
257
+ | `aria-valuemin` | When the bar can do something | Minimum size, in pixels, the pane before the bar can shrink to |
258
+ | `aria-valuemax` | When the bar can do something | Maximum size, in pixels, the pane before the bar can currently grow to |
259
+ | `tabindex` | When the bar can do something | `"0"`. A bar that can't move or collapse anything is a plain separator, out of the tab order. |
260
+ | `aria-hidden` | On a pane's content wrapper, while that pane is `collapsible` and `collapsed` | `"true"` |
261
+ | `inert` | On a pane's content wrapper, while that pane is `collapsible` and `collapsed` | Present |
262
+
263
+ Give each pane a `label` when a splitter has more than one bar, or a screen reader can't tell them apart.
264
+
265
+ Each collapse button has an `aria-label` describing its action (e.g. "Collapse previous pane" / "Collapse next pane" for horizontal splitters, "Collapse pane above" / "Collapse pane below" for vertical splitters).
266
+
267
+ **Keyboard map** (when a resizer bar has focus):
268
+
269
+ | Key | Action |
270
+ |-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
271
+ | `ArrowLeft` / `ArrowRight` (horizontal) or `ArrowUp` / `ArrowDown` (vertical) | Resize the adjacent panes by `keyboardStep`, 10 pixels by default, if both are resizable. On a collapsed pane, a key pointing out of it brings it back at its previous size, and one pointing into it does nothing. |
272
+ | `Home` / `End` | Move the bar as far as the limits allow, with the pane before it at its smallest or largest. |
273
+ | `Alt` + arrow key (same mapping as above) | Collapse the adjacent collapsible pane in that direction. If that pane isn't collapsible, the key stays the browser's. With a collapsed pane beside the bar, either direction expands it. |
274
+ | `Enter` | Toggle collapse/expand of the nearest collapsible pane, preferring a pane that is already collapsed. |
275
+
276
+ In a right-to-left layout, `ArrowLeft` and `ArrowRight` swap, so they still move the bar the way they point.
277
+
278
+ `Tab` follows the page's order: from a bar to its collapse buttons, then into the next pane's content, then to the next bar. There's no `F6` shortcut between panes.
279
+
280
+ ## API
281
+
282
+ Everything below is imported from `@nanahoshi/mona-ui/splitter`.
283
+
284
+ ### `SplitterPaneComponent`
285
+
286
+ **Selector:** `mona-splitter-pane`
287
+
288
+ #### Inputs
289
+
290
+ | Name | Type | Default | Description |
291
+ | --- | --- | --- | --- |
292
+ | `collapsed` (two-way) | `boolean` | `false` | Whether the pane is collapsed. |
293
+ | `collapsible` | `boolean` | `false` | Whether the pane is collapsible. |
294
+ | `label` | `string` | `""` | Names the separator after this pane, for assistive technology. Without it, the separator has a generic name, which can't tell one from another when a splitter has several. |
295
+ | `max` | `string \| number \| null` | `null` | The maximum size of the pane, in pixels. A number or a string like `"200px"`. Percentages aren't supported, and are ignored with a warning in development. |
296
+ | `min` | `string \| number \| null` | `null` | The minimum size of the pane, in pixels. A number or a string like `"200px"`. Percentages aren't supported, and are ignored with a warning in development. |
297
+ | `resizable` | `boolean` | `true` | Whether the pane is resizable. A separator only moves, by pointer or key, when the panes on both of its sides are. |
298
+ | `size` (two-way) | `string \| number` | `""` | The size of the pane. |
299
+
300
+ #### Outputs
301
+
302
+ | Name | Type | Description |
303
+ | --- | --- | --- |
304
+ | `collapsedChange` | `boolean` | Emitted when `collapsed` changes. |
305
+ | `sizeChange` | `string \| number` | Emitted when `size` changes. |
306
+
307
+ ### `SplitterComponent`
308
+
309
+ **Selector:** `mona-splitter`
310
+
311
+ #### Inputs
312
+
313
+ | Name | Type | Default | Description |
314
+ | --- | --- | --- | --- |
315
+ | `keyboardStep` | `number` | `10` | How far an arrow key moves a separator, in pixels. |
316
+ | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | The layout direction of the splitter panes. |
317
+
318
+ #### Outputs
319
+
320
+ | Name | Type | Description |
321
+ | --- | --- | --- |
322
+ | `resizeEnd` | `readonly (string \| number)[]` | Emitted with every pane's `size`, in order, once a drag ends, after each key that resizes, and when the separator collapses or expands a pane. Use it to save a layout: `sizeChange` on a pane fires on every move, and these values can go straight back into `size`. |
323
+
324
+ ### Types
325
+
326
+ #### `SPLITTER_DEFAULT_MESSAGES`
327
+
328
+ ```typescript
329
+ const SPLITTER_DEFAULT_MESSAGES: MonaSplitterMessages;
330
+ ```
331
+
332
+ #### `MonaSplitterMessages`
333
+
334
+ From `@nanahoshi/mona-ui/i18n`.
335
+
336
+ | Name | Type |
337
+ | --- | --- |
338
+ | `collapseDown` (read-only) | `string` |
339
+ | `collapseNext` (read-only) | `string` |
340
+ | `collapsePrevious` (read-only) | `string` |
341
+ | `collapseUp` (read-only) | `string` |
342
+ | `resizer` (read-only) | `string` |