@nanahoshi/mona-ui 0.27.0 → 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 +413 -0
  140. package/docs/sidebar-state.md +401 -0
  141. package/docs/sidebar.md +32 -876
  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 +76 -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
@@ -0,0 +1,187 @@
1
+ # `@nanahoshi/mona-ui/rating`
2
+
3
+ Everything `@nanahoshi/mona-ui/rating` exports.
4
+
5
+ **Guides:** [Rating](../rating.md)
6
+
7
+ ## `RatingComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-rating`
12
+ **Implements:** `FormValueControl<number>`
13
+
14
+ ### Inputs
15
+
16
+ | Name | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `aria-describedby` | `string \| null` | `null` | Associates help text or an error description with the focusable rating control. |
19
+ | `aria-label` | `string \| null` | `null` | Explicit accessible name for the rating control. Provide `aria-label`, `aria-labelledby`, or `label` so assistive technology can announce the control. |
20
+ | `aria-labelledby` | `string \| null` | `null` | IDs of external elements providing the accessible name for the rating control. |
21
+ | `ariaValueText` | `((value: number, maximum: number) => string) \| null` | `null` | Custom screen-reader value announcement. Receives the normalized value and the item count and returns the string to expose through `aria-valuetext`. |
22
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
23
+ | `clearable` | `boolean` | `false` | Lets a click on the current value clear the rating, so pointer and touch users can undo one. The keyboard can always clear it with Home. |
24
+ | `color` | `string \| null` | `undefined` | CSS color for selected and hovered rating visuals. Empty, `null`, and `undefined` values use the primary theme color. |
25
+ | `disabled` | `boolean` | `false` | Disables pointer and keyboard interaction and removes the control from the tab sequence. When bound to a signal form field via `[formField]`, this is written by the signal forms `Field` directive. |
26
+ | `icon` | `RatingIconName` | `"star"` | Built-in icon used for the default rating visuals. Choose `star`, `heart`, `circle`, `diamond`, or `flame`; use item templates to supply a custom icon. |
27
+ | `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 `Field` directive. |
28
+ | `itemsCount` | `number` | `5` | Number of rating items. Fractional values are floored and values below one are raised to one. |
29
+ | `label` | `string \| null` | `null` | Optional visible label rendered before or after the rating items. When no explicit `aria-label` or `aria-labelledby` is supplied, the label provides the accessible name. |
30
+ | `labelPosition` | `RatingLabelPosition` | `"after"` | Places the visible label before or after the item group. |
31
+ | `precision` | `RatingPrecision` | `"item"` | Selection granularity of the rating. |
32
+ | `readonly` | `boolean` | `false` | Prevents value changes while preserving focusability and normal visual emphasis. |
33
+ | `required` | `boolean` | `false` | Shows the invalid state while the rating is `0` and the control is touched. The `required` rule of signal forms doesn't treat `0` as empty, so it won't fail the form by itself: use `min(path, 1)` to reject an unrated value. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
34
+ | `selection` | `RatingSelectionMode` | `"continuous"` | Controls cumulative or single-item filling. |
35
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the icon dimensions, item hitboxes, spacing, and label typography. |
36
+ | `tabindex` | `string \| number` | `0` | Tab index applied to the focusable rating control when not disabled. Accepts a numeric string and converts it to a number. |
37
+ | `touched` | `boolean` | `false` | Marks the component as touched. When bound to a signal form field via `[formField]`, this is written by the signal forms `Field` directive. |
38
+ | `value` (two-way) | `number` | `0` | Current rating value. `0` represents an unrated state. Values are normalized for rendering but are not rewritten until the user interacts with the component. |
39
+
40
+ ### Outputs
41
+
42
+ | Name | Type | Description |
43
+ | --- | --- | --- |
44
+ | `touch` | `void` | Emitted when the control loses focus or a pointer commits a rating, marking the field as touched. |
45
+ | `valueChange` | `number` | Emitted when `value` changes. |
46
+
47
+ ### Methods
48
+
49
+ | Signature | Description |
50
+ | --- | --- |
51
+ | `blur(): void` | Blurs the inner slider control if focused. |
52
+ | `focus(options?: FocusOptions): void` | Focuses the inner slider control. Does nothing while disabled. |
53
+
54
+ ## `RatingHoveredItemTemplateDirective`
55
+
56
+ Directive.
57
+
58
+ Renders the pointer-preview visual for rating items. Overrides the default preset
59
+ overlay whenever the visible state comes from pointer preview.
60
+
61
+ **Selector:** `ng-template[monaRatingHoveredItemTemplate]`
62
+
63
+ ### Template context
64
+
65
+ | Name | Type | Description |
66
+ | --- | --- | --- |
67
+ | `$implicit` | `number` | Zero-based item index. |
68
+ | `fill` | `number` | Visible fill amount between 0 and 1. |
69
+ | `hovered` | `boolean` | Whether the visible state comes from pointer preview. |
70
+ | `index` | `number` | Zero-based item index. |
71
+ | `itemValue` | `number` | One-based value represented by this item. |
72
+ | `selected` | `boolean` | Whether the visible state comes from the committed value. |
73
+
74
+ ## `RatingItemTemplateDirective`
75
+
76
+ Directive.
77
+
78
+ Renders the default (unselected) visual for every rating item. Overrides the
79
+ default preset icon for the base layer of each item.
80
+
81
+ **Selector:** `ng-template[monaRatingItemTemplate]`
82
+
83
+ ### Template context
84
+
85
+ | Name | Type | Description |
86
+ | --- | --- | --- |
87
+ | `$implicit` | `number` | Zero-based item index. |
88
+ | `fill` | `number` | Visible fill amount between 0 and 1. |
89
+ | `hovered` | `boolean` | Whether the visible state comes from pointer preview. |
90
+ | `index` | `number` | Zero-based item index. |
91
+ | `itemValue` | `number` | One-based value represented by this item. |
92
+ | `selected` | `boolean` | Whether the visible state comes from the committed value. |
93
+
94
+ ## `RatingSelectedItemTemplateDirective`
95
+
96
+ Directive.
97
+
98
+ Renders the committed selected visual for rating items. Overrides the default
99
+ preset overlay whenever the visible state comes from the committed value.
100
+
101
+ **Selector:** `ng-template[monaRatingSelectedItemTemplate]`
102
+
103
+ ### Template context
104
+
105
+ | Name | Type | Description |
106
+ | --- | --- | --- |
107
+ | `$implicit` | `number` | Zero-based item index. |
108
+ | `fill` | `number` | Visible fill amount between 0 and 1. |
109
+ | `hovered` | `boolean` | Whether the visible state comes from pointer preview. |
110
+ | `index` | `number` | Zero-based item index. |
111
+ | `itemValue` | `number` | One-based value represented by this item. |
112
+ | `selected` | `boolean` | Whether the visible state comes from the committed value. |
113
+
114
+ ## `RATING_DEFAULT_MESSAGES`
115
+
116
+ Constant.
117
+
118
+ ```typescript
119
+ const RATING_DEFAULT_MESSAGES: MonaRatingMessages;
120
+ ```
121
+
122
+ ## `RatingItemTemplateContext`
123
+
124
+ Interface.
125
+
126
+ Rendering context passed to the default, selected, and hovered item templates.
127
+
128
+ ### Properties
129
+
130
+ | Name | Type | Description |
131
+ | --- | --- | --- |
132
+ | `$implicit` (read-only) | `number` | Zero-based item index. |
133
+ | `fill` (read-only) | `number` | Visible fill amount between 0 and 1. |
134
+ | `hovered` (read-only) | `boolean` | Whether the visible state comes from pointer preview. |
135
+ | `index` (read-only) | `number` | Zero-based item index. |
136
+ | `itemValue` (read-only) | `number` | One-based value represented by this item. |
137
+ | `selected` (read-only) | `boolean` | Whether the visible state comes from the committed value. |
138
+
139
+ ## `RatingIconName`
140
+
141
+ Type alias.
142
+
143
+ Built-in icon names available for the default rating visuals.
144
+
145
+ ```typescript
146
+ type RatingIconName = "circle" | "diamond" | "flame" | "heart" | "star";
147
+ ```
148
+
149
+ **Used by:** [`RatingComponent`](rating.md#ratingcomponent)
150
+
151
+ ## `RatingLabelPosition`
152
+
153
+ Type alias.
154
+
155
+ Position of the visible label relative to the rating items.
156
+
157
+ ```typescript
158
+ type RatingLabelPosition = "before" | "after";
159
+ ```
160
+
161
+ **Used by:** [`RatingComponent`](rating.md#ratingcomponent)
162
+
163
+ ## `RatingPrecision`
164
+
165
+ Type alias.
166
+
167
+ Selection granularity of the rating. `"item"` selects whole items, `"half"` selects
168
+ half-item increments.
169
+
170
+ ```typescript
171
+ type RatingPrecision = "item" | "half";
172
+ ```
173
+
174
+ **Used by:** [`RatingComponent`](rating.md#ratingcomponent)
175
+
176
+ ## `RatingSelectionMode`
177
+
178
+ Type alias.
179
+
180
+ How the selected value is visualized across the items. `"continuous"` fills every
181
+ item up to the selected value, `"single"` fills only the item representing the selected value.
182
+
183
+ ```typescript
184
+ type RatingSelectionMode = "continuous" | "single";
185
+ ```
186
+
187
+ **Used by:** [`RatingComponent`](rating.md#ratingcomponent)
@@ -0,0 +1,93 @@
1
+ # `@nanahoshi/mona-ui/scroll-view`
2
+
3
+ Everything `@nanahoshi/mona-ui/scroll-view` exports.
4
+
5
+ **Guides:** [Scroll View](../scroll-view.md)
6
+
7
+ ## `ScrollViewComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-scroll-view`
12
+
13
+ ### Inputs
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `animate` | `boolean \| number` | `true` | Sets whether page transitions are animated. Pass a boolean for default duration (500ms) or a number for custom duration in milliseconds. |
18
+ | `aria-label` | `string` | `""` | Accessible name of the carousel, saying what it shows. Use this or `aria-labelledby`; with neither, the host is a plain group and a warning is logged in development. |
19
+ | `aria-labelledby` | `string` | `""` | The id of the element that names the carousel. |
20
+ | `arrows` | `boolean` | `false` | Shows the previous and next arrows. A swipe is a gesture, so give pointer users arrows or a pager too. |
21
+ | `class` | `string` | `""` | Sets custom CSS classes on the component host element. Merged with base classes via tailwind-merge. |
22
+ | `data` | `Iterable<unknown>` | `[]` | Sets the data of the scroll view. |
23
+ | `height` (required) | `string \| number` | — | Sets the height of the scroll view. This property is required. |
24
+ | `index` (two-way) | `number` | `0` | Sets the active page of the scroll view. |
25
+ | `infinite` | `boolean` | `false` | Sets whether the scroll view is infinite. |
26
+ | `pageable` | `boolean` | `false` | Shows the pager. A swipe is a gesture, so give pointer users arrows or a pager too. |
27
+ | `pagerBlur` | `number` | `3` | Sets the background blur of the pager in pixels. It doesn't apply with `pagerOverlay` set to `"none"`. |
28
+ | `pagerOverlay` | `PagerOverlay` | `"dark"` | Sets the color of the pager. |
29
+ | `pagerRounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Sets the border radius of the pager items. |
30
+ | `rounded` | `"large" \| "medium" \| "none" \| "small"` | `"medium"` | Sets the border radius of the scroll view. |
31
+ | `width` (required) | `string \| number` | — | Sets the width of the scroll view. |
32
+
33
+ ### Outputs
34
+
35
+ | Name | Type | Description |
36
+ | --- | --- | --- |
37
+ | `indexChange` | `number` | Emitted when `index` changes. |
38
+
39
+ ## `ScrollViewSlideDirective`
40
+
41
+ Directive.
42
+
43
+ Marks the template that renders each slide. Bind `[monaScrollViewSlide]` to the same data as the scroll
44
+ view, and `let-item` takes its type from it.
45
+
46
+ **Selector:** `ng-template[monaScrollViewSlide]`
47
+ **Type parameters:** `T = unknown`
48
+
49
+ ### Inputs
50
+
51
+ | Name | Type | Default | Description |
52
+ | --- | --- | --- | --- |
53
+ | `monaScrollViewSlide` | `Iterable<T> \| ""` | `""` | The scroll view's data, bound only so that `let-item` takes its type from it. Leave it empty for `unknown`. |
54
+
55
+ ### Template context
56
+
57
+ | Name | Type |
58
+ | --- | --- |
59
+ | `$implicit` | `T` |
60
+ | `height` | `number` |
61
+ | `width` | `number` |
62
+
63
+ ## `SCROLL_VIEW_DEFAULT_MESSAGES`
64
+
65
+ Constant.
66
+
67
+ ```typescript
68
+ const SCROLL_VIEW_DEFAULT_MESSAGES: MonaScrollViewMessages;
69
+ ```
70
+
71
+ ## `ScrollViewSlideContext`
72
+
73
+ Interface.
74
+
75
+ **Type parameters:** `T = unknown`
76
+
77
+ ### Properties
78
+
79
+ | Name | Type |
80
+ | --- | --- |
81
+ | `$implicit` | `T` |
82
+ | `height` | `number` |
83
+ | `width` | `number` |
84
+
85
+ ## `PagerOverlay`
86
+
87
+ Type alias.
88
+
89
+ ```typescript
90
+ type PagerOverlay = "dark" | "light" | "none";
91
+ ```
92
+
93
+ **Used by:** [`ScrollViewComponent`](scroll-view.md#scrollviewcomponent)
@@ -0,0 +1,114 @@
1
+ # `@nanahoshi/mona-ui/segmented`
2
+
3
+ Everything `@nanahoshi/mona-ui/segmented` exports.
4
+
5
+ **Guides:** [Segmented](../segmented.md)
6
+
7
+ ## `SegmentedComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-segmented`
12
+ **Type parameters:** `T extends SegmentedValue = SegmentedValue`
13
+ **Implements:** `FormValueControl<T \| null>`
14
+
15
+ ### Inputs
16
+
17
+ | Name | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `alignment` | `"center" \| "end" \| "start" \| "stretch"` | `"stretch"` | Controls the alignment of the items inside the segmented component. |
20
+ | `animate` | `boolean` | `true` | Controls whether the selection indicator animates between selected options. When false, selection changes are applied immediately without transition. |
21
+ | `aria-label` | `string \| null` | `null` | Accessible name for the radio group. Provide either `aria-label` or `aria-labelledby`. |
22
+ | `aria-labelledby` | `string \| null` | `null` | ID of an external element that provides the accessible name for the radio group. |
23
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
24
+ | `disabled` | `boolean` | `false` | Disables every option in the group and prevents value changes. |
25
+ | `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. |
26
+ | `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. |
27
+ | `options` (required) | `readonly SegmentedOption<T>[]` | — | The list of selectable options. Exactly one option is selected at a time. |
28
+ | `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. |
29
+ | `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. |
30
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the segmented container and its options. |
31
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the height, horizontal padding, text size, and spacing of each option. |
32
+ | `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. |
33
+ | `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. |
34
+
35
+ ### Outputs
36
+
37
+ | Name | Type | Description |
38
+ | --- | --- | --- |
39
+ | `touch` | `void` | Emitted when the selected value changes or focus leaves the group. |
40
+ | `valueChange` | `T \| null` | Emitted when `value` changes. |
41
+
42
+ ### Methods
43
+
44
+ | Signature | Description |
45
+ | --- | --- |
46
+ | `focus(options?: FocusOptions): void` | Moves focus to the selected option, or the first enabled one. |
47
+
48
+ ## `SegmentedItemTemplateDirective`
49
+
50
+ Directive.
51
+
52
+ Renders the visual content of every segmented option. Overrides the default label
53
+ text of each option. Bind the options, as `[monaSegmentedItemTemplate]="options"`, to type `let-option` from them.
54
+
55
+ **Selector:** `ng-template[monaSegmentedItemTemplate]`
56
+ **Type parameters:** `T extends SegmentedValue = SegmentedValue`
57
+
58
+ ### Inputs
59
+
60
+ | Name | Type | Default | Description |
61
+ | --- | --- | --- | --- |
62
+ | `monaSegmentedItemTemplate` | `readonly SegmentedOption<T>[] \| "" \| undefined` | `undefined` | The options, to type `let-option` from them. It changes nothing else. |
63
+
64
+ ### Template context
65
+
66
+ | Name | Type | Description |
67
+ | --- | --- | --- |
68
+ | `$implicit` | `SegmentedOption<T>` | The option rendered by this item. |
69
+ | `disabled` | `boolean` | Whether this option is disabled, either individually or via the group. |
70
+ | `index` | `number` | Zero-based option index. |
71
+ | `option` | `SegmentedOption<T>` | The option rendered by this item. |
72
+ | `selected` | `boolean` | Whether this option is currently selected. |
73
+
74
+ ## `SegmentedItemTemplateContext`
75
+
76
+ Interface.
77
+
78
+ Rendering context passed to the segmented item template.
79
+
80
+ **Type parameters:** `T extends SegmentedValue = SegmentedValue`
81
+
82
+ ### Properties
83
+
84
+ | Name | Type | Description |
85
+ | --- | --- | --- |
86
+ | `$implicit` (read-only) | `SegmentedOption<T>` | The option rendered by this item. |
87
+ | `disabled` (read-only) | `boolean` | Whether this option is disabled, either individually or via the group. |
88
+ | `index` (read-only) | `number` | Zero-based option index. |
89
+ | `option` (read-only) | `SegmentedOption<T>` | The option rendered by this item. |
90
+ | `selected` (read-only) | `boolean` | Whether this option is currently selected. |
91
+
92
+ ## `SegmentedOption`
93
+
94
+ Interface.
95
+
96
+ **Type parameters:** `T extends SegmentedValue = SegmentedValue`
97
+
98
+ ### Properties
99
+
100
+ | Name | Type |
101
+ | --- | --- |
102
+ | `disabled?` (read-only) | `boolean` |
103
+ | `label` (read-only) | `string` |
104
+ | `value` (read-only) | `T` |
105
+
106
+ **Used by:** [`SegmentedComponent`](segmented.md#segmentedcomponent), [`SegmentedItemTemplateContext`](segmented.md#segmenteditemtemplatecontext), [`SegmentedItemTemplateDirective`](segmented.md#segmenteditemtemplatedirective)
107
+
108
+ ## `SegmentedValue`
109
+
110
+ Type alias.
111
+
112
+ ```typescript
113
+ type SegmentedValue = string | number;
114
+ ```
@@ -0,0 +1,65 @@
1
+ # `@nanahoshi/mona-ui/sheet`
2
+
3
+ Everything `@nanahoshi/mona-ui/sheet` exports.
4
+
5
+ **Guides:** [Sheet](../sheet.md)
6
+
7
+ ## `SheetComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-sheet`
12
+
13
+ ### Inputs
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `aria-label` | `string \| undefined` | `undefined` | Accessible name used when no visible title is provided. |
18
+ | `class` | `ClassInputType` | `undefined` | Additional CSS classes merged onto the sheet panel via `tailwind-merge`. |
19
+ | `closable` | `boolean` | `true` | Whether the close button is displayed. |
20
+ | `closeOnBackdropClick` | `boolean` | `true` | Whether clicking the backdrop requests that the sheet close. |
21
+ | `closeOnEscape` | `boolean` | `true` | Whether pressing Escape requests that the sheet close. |
22
+ | `description` | `string` | — | Supporting text displayed below the title. |
23
+ | `height` | `number \| string` | — | Explicit sheet height. Numbers are interpreted as pixels. |
24
+ | `messages` | `Partial<SheetMessages>` | — | Internationalization message overrides for accessible labels. |
25
+ | `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. |
26
+ | `title` | `string` | — | Title displayed in the sheet header and used as its accessible name. |
27
+ | `width` | `number \| string` | — | Explicit sheet width. Numbers are interpreted as pixels. |
28
+
29
+ ### Outputs
30
+
31
+ | Name | Type | Description |
32
+ | --- | --- | --- |
33
+ | `close` | `PopupCloseEvent<unknown>` | Emitted before the sheet closes. Call preventDefault() to keep it open. |
34
+ | `closed` | `void` | Emitted after the leave animation completes and the popup is disposed. |
35
+
36
+ ## `SHEET_DEFAULT_MESSAGES`
37
+
38
+ Constant.
39
+
40
+ ```typescript
41
+ const SHEET_DEFAULT_MESSAGES: MonaSheetMessages;
42
+ ```
43
+
44
+ ## `SheetPhysicalSide`
45
+
46
+ Type alias.
47
+
48
+ A side resolved to a physical edge.
49
+
50
+ ```typescript
51
+ type SheetPhysicalSide = "bottom" | "left" | "right" | "top";
52
+ ```
53
+
54
+ ## `SheetSide`
55
+
56
+ Type alias.
57
+
58
+ Edge the sheet opens from. `left` and `right` are physical, whatever the direction; `start` and `end` follow it
59
+ (`start` is the left edge in LTR and the right edge in RTL).
60
+
61
+ ```typescript
62
+ type SheetSide = "bottom" | "end" | "left" | "right" | "start" | "top";
63
+ ```
64
+
65
+ **Used by:** [`SheetComponent`](sheet.md#sheetcomponent)