@nanahoshi/mona-ui 0.27.1 → 0.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/docs/api/auto-complete.md +67 -0
  2. package/docs/api/avatar.md +31 -0
  3. package/docs/api/breadcrumb.md +74 -0
  4. package/docs/api/button-group.md +71 -0
  5. package/docs/api/button.md +84 -0
  6. package/docs/api/calendar.md +123 -0
  7. package/docs/api/card.md +97 -0
  8. package/docs/api/chart.md +4380 -0
  9. package/docs/api/check-box.md +70 -0
  10. package/docs/api/chip.md +55 -0
  11. package/docs/api/circular-progress-bar.md +71 -0
  12. package/docs/api/collapsible.md +71 -0
  13. package/docs/api/color-gradient.md +54 -0
  14. package/docs/api/color-palette.md +52 -0
  15. package/docs/api/color-picker.md +89 -0
  16. package/docs/api/combo-box.md +69 -0
  17. package/docs/api/command.md +282 -0
  18. package/docs/api/common.md +599 -0
  19. package/docs/api/contextmenu.md +239 -0
  20. package/docs/api/date-input.md +119 -0
  21. package/docs/api/date-picker.md +67 -0
  22. package/docs/api/datetime-picker.md +72 -0
  23. package/docs/api/dialog.md +291 -0
  24. package/docs/api/dropdown-button.md +248 -0
  25. package/docs/api/dropdown-list.md +72 -0
  26. package/docs/api/dropdowns.md +172 -0
  27. package/docs/api/editor.md +117 -0
  28. package/docs/api/expansion-panel.md +85 -0
  29. package/docs/api/fieldset.md +33 -0
  30. package/docs/api/filter.md +116 -0
  31. package/docs/api/grid.md +1445 -0
  32. package/docs/api/i18n.md +1699 -0
  33. package/docs/api/label.md +58 -0
  34. package/docs/api/list-box.md +301 -0
  35. package/docs/api/list-view.md +294 -0
  36. package/docs/api/list.md +119 -0
  37. package/docs/api/locales.md +134 -0
  38. package/docs/api/menubar.md +275 -0
  39. package/docs/api/multi-select.md +92 -0
  40. package/docs/api/notification.md +164 -0
  41. package/docs/api/numeric-text-box.md +130 -0
  42. package/docs/api/otp-input.md +100 -0
  43. package/docs/api/pager.md +371 -0
  44. package/docs/api/placeholder.md +18 -0
  45. package/docs/api/popover.md +170 -0
  46. package/docs/api/popup-menu.md +328 -0
  47. package/docs/api/popup.md +299 -0
  48. package/docs/api/progress-bar.md +79 -0
  49. package/docs/api/query.md +367 -0
  50. package/docs/api/radio-button.md +113 -0
  51. package/docs/api/rating.md +187 -0
  52. package/docs/api/scroll-view.md +93 -0
  53. package/docs/api/segmented.md +114 -0
  54. package/docs/api/sheet.md +65 -0
  55. package/docs/api/sidebar.md +583 -0
  56. package/docs/api/skeleton.md +26 -0
  57. package/docs/api/slider.md +173 -0
  58. package/docs/api/spinner.md +132 -0
  59. package/docs/api/split-button.md +261 -0
  60. package/docs/api/splitter.md +57 -0
  61. package/docs/api/stepper.md +148 -0
  62. package/docs/api/switch.md +78 -0
  63. package/docs/api/tabs.md +139 -0
  64. package/docs/api/text-area.md +20 -0
  65. package/docs/api/text-box.md +106 -0
  66. package/docs/api/theme.md +627 -0
  67. package/docs/api/time-picker.md +69 -0
  68. package/docs/api/time-selector.md +54 -0
  69. package/docs/api/tooltip.md +112 -0
  70. package/docs/api/tree-view.md +631 -0
  71. package/docs/api/window.md +245 -0
  72. package/docs/auto-complete.md +28 -329
  73. package/docs/avatar.md +4 -24
  74. package/docs/breadcrumb.md +10 -65
  75. package/docs/button-group.md +7 -60
  76. package/docs/button.md +8 -67
  77. package/docs/calendar.md +16 -121
  78. package/docs/card.md +16 -79
  79. package/docs/chart-bar.md +16 -234
  80. package/docs/chart-financial.md +10 -121
  81. package/docs/chart-funnel.md +13 -176
  82. package/docs/chart-heatmap.md +15 -131
  83. package/docs/chart-line-area.md +12 -137
  84. package/docs/chart-pie.md +17 -221
  85. package/docs/chart-radar.md +13 -129
  86. package/docs/chart-radial.md +13 -211
  87. package/docs/chart-scatter.md +6 -74
  88. package/docs/chart-treemap.md +14 -196
  89. package/docs/chart.md +154 -1892
  90. package/docs/checkbox.md +5 -61
  91. package/docs/chip.md +7 -42
  92. package/docs/circular-progress-bar.md +9 -61
  93. package/docs/collapsible.md +5 -87
  94. package/docs/color-gradient.md +8 -81
  95. package/docs/color-palette.md +7 -69
  96. package/docs/color-picker.md +9 -105
  97. package/docs/combo-box.md +28 -331
  98. package/docs/command.md +25 -236
  99. package/docs/contextmenu.md +15 -140
  100. package/docs/date-picker.md +7 -110
  101. package/docs/datetime-picker.md +7 -129
  102. package/docs/decimal-textbox.md +6 -69
  103. package/docs/dialog.md +23 -263
  104. package/docs/dropdown-button.md +15 -146
  105. package/docs/dropdown-list.md +29 -332
  106. package/docs/editor.md +8 -164
  107. package/docs/expansion-panel.md +7 -69
  108. package/docs/fieldset.md +5 -24
  109. package/docs/grid-columns.md +12 -92
  110. package/docs/grid-editing.md +29 -291
  111. package/docs/grid-grouping.md +11 -50
  112. package/docs/grid-rows.md +10 -74
  113. package/docs/grid-selection.md +7 -36
  114. package/docs/grid-server.md +8 -293
  115. package/docs/grid-sorting-filtering.md +10 -333
  116. package/docs/grid-state-export.md +17 -228
  117. package/docs/grid.md +23 -216
  118. package/docs/input.md +7 -19
  119. package/docs/label.md +8 -39
  120. package/docs/list-box.md +21 -253
  121. package/docs/list-view.md +25 -232
  122. package/docs/menubar.md +21 -167
  123. package/docs/multi-select.md +31 -350
  124. package/docs/notification.md +17 -116
  125. package/docs/numeric-textbox.md +9 -78
  126. package/docs/otp-input.md +9 -95
  127. package/docs/pager.md +19 -239
  128. package/docs/placeholder.md +5 -18
  129. package/docs/popover.md +13 -123
  130. package/docs/popup-menu.md +22 -243
  131. package/docs/popup.md +24 -248
  132. package/docs/progress-bar.md +10 -75
  133. package/docs/radio-button.md +8 -96
  134. package/docs/range-slider.md +9 -82
  135. package/docs/rating.md +15 -163
  136. package/docs/scroll-view.md +9 -86
  137. package/docs/segmented.md +8 -90
  138. package/docs/sheet.md +10 -74
  139. package/docs/sidebar-menus.md +20 -155
  140. package/docs/sidebar-state.md +16 -134
  141. package/docs/sidebar.md +18 -218
  142. package/docs/skeleton.md +5 -26
  143. package/docs/slider.md +9 -97
  144. package/docs/spinner.md +15 -95
  145. package/docs/split-button.md +21 -166
  146. package/docs/splitter.md +9 -56
  147. package/docs/stepper.md +13 -127
  148. package/docs/switch.md +8 -58
  149. package/docs/tabs.md +13 -111
  150. package/docs/textarea.md +4 -13
  151. package/docs/textbox.md +10 -77
  152. package/docs/time-picker.md +7 -112
  153. package/docs/tooltip-directive.md +12 -96
  154. package/docs/tooltip.md +12 -96
  155. package/docs/tree-view.md +42 -495
  156. package/docs/window.md +19 -230
  157. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +1 -0
  158. package/fesm2022/nanahoshi-mona-ui-common.mjs +3 -0
  159. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +13 -1
  160. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -0
  161. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +9 -0
  162. package/llms.txt +74 -0
  163. package/package.json +1 -1
  164. package/types/nanahoshi-mona-ui-collapsible.d.ts +2 -0
  165. package/types/nanahoshi-mona-ui-common.d.ts +6 -0
  166. package/types/nanahoshi-mona-ui-date-input.d.ts +18 -1
  167. package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -0
  168. package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
@@ -0,0 +1,70 @@
1
+ # `@nanahoshi/mona-ui/check-box`
2
+
3
+ Everything `@nanahoshi/mona-ui/check-box` exports.
4
+
5
+ **Guides:** [Checkbox](../checkbox.md)
6
+
7
+ ## `CheckBoxComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-check-box`
12
+ **Implements:** `FormCheckboxControl`
13
+
14
+ ### Inputs
15
+
16
+ | Name | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `aria-describedby` | `string` | `""` | Id of an element that describes the check box, such as an error message. |
19
+ | `aria-label` | `string` | `""` | Accessible name of the check box when it has no visible label. |
20
+ | `aria-labelledby` | `string` | `""` | Id of the element that labels the check box. |
21
+ | `checked` (two-way) | `boolean` | `false` | Whether the control is checked. |
22
+ | `class` | `string` | `""` | Additional CSS classes merged onto the label container via `tailwind-merge`. |
23
+ | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
24
+ | `indeterminate` | `boolean` | `false` | Activates indeterminate mode, showing a dash instead of a checkmark. A user change clears it, as it does on a native checkbox. Use `[(indeterminate)]` to follow that, because a one-way binding only writes again when the bound value changes. |
25
+ | `inputId` | `string` | `generated` | Id of the native checkbox input. Point a `<label for>` at it to label the check box from outside. A unique id is generated when it isn't set. |
26
+ | `invalid` | `boolean` | `false` | Marks the checkbox as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
27
+ | `label` | `string` | `""` | Text label displayed alongside the checkbox. When provided, takes precedence over projected content. |
28
+ | `labelPosition` | `"before" \| "after"` | `"after"` | Position of the label relative to the checkbox. |
29
+ | `labelSize` | `"large" \| "medium" \| "small"` | `"medium"` | Controls the font size of the label text. |
30
+ | `name` | `string` | `""` | Name of the native checkbox input, used in native form submission. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
31
+ | `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. |
32
+ | `required` | `boolean` | `false` | Marks the control as required for form validation. |
33
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the checkmark box. |
34
+ | `tabIndex` | `number` | `0` | Tab index of the native checkbox input. |
35
+ | `touched` | `boolean` | `false` | Marks the checkbox as touched. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
36
+
37
+ ### Outputs
38
+
39
+ | Name | Type | Description |
40
+ | --- | --- | --- |
41
+ | `checkedChange` | `boolean` | Emitted when `checked` changes. |
42
+ | `indeterminateChange` | `boolean` | Emitted with `false` when a user change clears the indeterminate mode. |
43
+ | `inputBlur` | `FocusEvent` | Emitted when the checkbox input loses focus. |
44
+ | `inputChange` | `Event` | Emitted when the checkbox value changes. |
45
+ | `inputFocus` | `FocusEvent` | Emitted when the checkbox input gains focus. |
46
+ | `touch` | `void` | Emitted when the checkbox loses focus or its value changes. |
47
+
48
+ ### Methods
49
+
50
+ | Signature | Description |
51
+ | --- | --- |
52
+ | `focus(options?: FocusOptions): void` | Moves focus to the native checkbox input. |
53
+
54
+ ## `CheckboxDirective`
55
+
56
+ Directive.
57
+
58
+ Applies Mona UI styling to a native `<input type="checkbox">`. All native checkbox behaviors — keyboard interaction,
59
+ form submission, `indeterminate` state, and Angular forms directives — are preserved.
60
+
61
+ **Selector:** `input[type='checkbox'][monaCheckbox]`
62
+
63
+ ### Inputs
64
+
65
+ | Name | Type | Default | Description |
66
+ | --- | --- | --- | --- |
67
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
68
+ | `invalid` | `boolean` | `false` | Marks the checkbox as invalid, triggering error border and ring styling. |
69
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the checkbox. |
70
+ | `touched` | `boolean` | `false` | Marks the checkbox as touched. Error styling is only shown when both `invalid` and `touched` are `true`. |
@@ -0,0 +1,55 @@
1
+ # `@nanahoshi/mona-ui/chip`
2
+
3
+ Everything `@nanahoshi/mona-ui/chip` exports.
4
+
5
+ **Guides:** [Chip](../chip.md)
6
+
7
+ ## `ChipComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-chip`
12
+
13
+ ### Inputs
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `aria-label` | `string` | `""` | Accessible name of the chip, for one whose text doesn't describe it, such as an icon. On a chip with no other role, it makes the chip a named group. |
18
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
19
+ | `disabled` | `boolean` | `false` | Renders the chip with reduced visual emphasis and removes pointer interaction. |
20
+ | `label` | `string` | `""` | Text label displayed inside the chip. When non-empty, takes precedence over projected content. |
21
+ | `look` | `"default" \| "error" \| "ghost" \| "info" \| "outline" \| "primary" \| "secondary" \| "success" \| "warning"` | `"default"` | Visual style variant controlling the chip's background color, border, and interaction states. |
22
+ | `removable` | `boolean` | `false` | Renders a remove button inside the chip. When activated, emits the `remove` output. |
23
+ | `removeLabel` | `string` | `undefined` | Accessible label for the remove button, overriding the auto-computed `"Remove, <label>"` fallback. A chip with only projected content needs this or `aria-label`, or it warns in development. |
24
+ | `removeTabIndex` | `number \| string` | `0` | Tab index for the remove button, independent of the chip host's own tabindex. Set to `-1` to exclude the remove button from tab order, since Delete and Backspace on the chip also remove it. |
25
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the chip. |
26
+ | `selected` (two-way) | `boolean` | `false` | Whether the chip is selected. When `toggleable` is `true`, each activation flips this value. Supports two-way binding via `[(selected)]`. Without `toggleable`, it's only a look, with no state for assistive technology. |
27
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the chip's padding and remove button dimensions. |
28
+ | `tabindex` | `number \| string` | `undefined` | Tab index override for the chip host element. When not set, computed automatically: `0` when `toggleable` is `true` or functioning as a link, not focusable otherwise. Overridden to `-1` when `disabled` is `true`. |
29
+ | `toggleable` | `boolean` | `false` | Enables toggle behavior. When `true`, each activation flips `selected` and the host receives `role="checkbox"` with `aria-checked`. With `removable`, the host is a `group` instead, and an inner element is the checkbox, beside the remove button. |
30
+ | `value` | `unknown` | `undefined` | Arbitrary value associated with this chip. The chip doesn't use it or emit it, so to tell which chip was removed, pass the item in your `(remove)` handler. |
31
+
32
+ ### Outputs
33
+
34
+ | Name | Type | Description |
35
+ | --- | --- | --- |
36
+ | `contentClick` | `void` | Emitted when a toggleable chip body is activated via click, Enter, or Space. Not emitted when the remove button is activated or for non-toggleable chips. |
37
+ | `remove` | `Event` | Emitted when the remove button is clicked, or Delete or Backspace is pressed on the chip. Only fires when `removable` is `true`. Emits the originating `Event`. The chip can't keep focus once its parent destroys it, so move focus to the next chip or the list here. |
38
+ | `selectedChange` | `boolean` | Emitted when `selected` changes. |
39
+
40
+ ## `ChipPrefixTemplateDirective`
41
+
42
+ Directive.
43
+
44
+ Apply to an `<ng-template>` directly inside `<mona-chip>` to render prefix content
45
+ (e.g., an avatar or icon) before the chip label or projected content. The template receives no context.
46
+
47
+ **Selector:** `ng-template[monaChipPrefixTemplate]`
48
+
49
+ ## `CHIP_DEFAULT_MESSAGES`
50
+
51
+ Constant.
52
+
53
+ ```typescript
54
+ const CHIP_DEFAULT_MESSAGES: { removeLabel: (label?: string) => string; };
55
+ ```
@@ -0,0 +1,71 @@
1
+ # `@nanahoshi/mona-ui/circular-progress-bar`
2
+
3
+ Everything `@nanahoshi/mona-ui/circular-progress-bar` exports.
4
+
5
+ **Guides:** [Circular Progress Bar](../circular-progress-bar.md)
6
+
7
+ ## `CircularProgressBarComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-circular-progress-bar`
12
+
13
+ ### Inputs
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `animate` | `boolean` | `true` | Enables CSS transitions on stroke and color changes. Set to `false` when updating `value` at a high frequency. |
18
+ | `aria-label` | `string` | `""` | Accessible name for the host element. Describe what the component represents (e.g., "Upload progress"). When empty, falls back to the localized "Progress". An `aria-labelledby` on the host takes precedence over both. |
19
+ | `aria-valuetext` | `string` | `""` | Human-readable override for the `aria-valuenow` announcement. Useful in indeterminate mode — set to a localized string such as `"Loading"` so screen readers announce state rather than silence. When empty, assistive technology falls back to the numeric value. |
20
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
21
+ | `color` | `string \| Action<number, string>` | `""` | Accent color. Pass a CSS color string, or a function receiving the current percentage (0–100) and returning a string. When empty, falls back to the primary theme color. |
22
+ | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
23
+ | `indeterminate` | `boolean` | `false` | Activates indeterminate mode when the completion value is unknown. ARIA value attributes are removed. |
24
+ | `labelVisible` | `boolean` | `true` | Controls label visibility in determinate mode. Has no effect in indeterminate mode, where the label is always hidden. |
25
+ | `lineCap` | `CircularProgressBarLineCap` | `"round"` | Shape of the arc's two ends. `"round"` draws rounded ends that stay within the value's span, so the arc covers the same part of the ring as `"flat"`, which cuts them straight. An empty ring draws nothing either way. |
26
+ | `max` | `number` | `100` | Upper bound of the value range. Must be greater than `min`; otherwise the bar reports no values and a warning is logged in development. |
27
+ | `min` | `number` | `0` | Lower bound of the value range. |
28
+ | `size` | `number` | `100` | Diameter of the indicator in pixels. Controls both width and height of the host element. |
29
+ | `thickness` | `number` | `6` | Stroke width of the circular track in pixels. |
30
+ | `value` | `number` | `0` | Current progress value within `[min, max]`. Values outside the range are clamped, for the ring and for `aria-valuenow`; non-finite values count as `min`. |
31
+
32
+ ## `CircularProgressBarLabelTemplateDirective`
33
+
34
+ Directive.
35
+
36
+ Structural template directive that replaces the default percentage label inside the circle. The template is hidden
37
+ when `indeterminate` is `true`.
38
+
39
+ **Selector:** `ng-template[monaCircularProgressBarLabelTemplate]`
40
+
41
+ ### Template context
42
+
43
+ | Name | Type |
44
+ | --- | --- |
45
+ | `$implicit` | `number` |
46
+ | `max` | `number` |
47
+ | `min` | `number` |
48
+ | `percent` | `number` |
49
+
50
+ ## `LabelTemplateContext`
51
+
52
+ Interface.
53
+
54
+ ### Properties
55
+
56
+ | Name | Type |
57
+ | --- | --- |
58
+ | `$implicit` | `number` |
59
+ | `max` | `number` |
60
+ | `min` | `number` |
61
+ | `percent` | `number` |
62
+
63
+ ## `CircularProgressBarLineCap`
64
+
65
+ Type alias.
66
+
67
+ ```typescript
68
+ type CircularProgressBarLineCap = "flat" | "round";
69
+ ```
70
+
71
+ **Used by:** [`CircularProgressBarComponent`](circular-progress-bar.md#circularprogressbarcomponent)
@@ -0,0 +1,71 @@
1
+ # `@nanahoshi/mona-ui/collapsible`
2
+
3
+ Everything `@nanahoshi/mona-ui/collapsible` exports.
4
+
5
+ **Guides:** [Collapsible](../collapsible.md)
6
+
7
+ ## `CollapsibleDirective`
8
+
9
+ Directive.
10
+
11
+ Headless disclosure root. Adds no markup of its own, so it can be applied to any element
12
+ (`li`, `div`, `section`) and paired with `monaCollapsibleTrigger` and `monaCollapsibleContent`.
13
+
14
+ **Selector:** `[monaCollapsible]`
15
+ **Exported as:** `monaCollapsible`
16
+
17
+ ### Inputs
18
+
19
+ | Name | Type | Default | Description |
20
+ | --- | --- | --- | --- |
21
+ | `animate` | `boolean` | `true` | Enables the height transition applied to the collapsible content. |
22
+ | `disabled` | `boolean` | `false` | Suppresses toggling through the trigger. `expand()` and `collapse()` still apply. |
23
+ | `expanded` (two-way) | `boolean` | `false` | Sets whether the content is expanded. Supports two-way binding. |
24
+
25
+ ### Outputs
26
+
27
+ | Name | Type | Description |
28
+ | --- | --- | --- |
29
+ | `expandedChange` | `boolean` | Emitted when `expanded` changes. |
30
+
31
+ ### Properties
32
+
33
+ | Name | Type | Description |
34
+ | --- | --- | --- |
35
+ | `contentId` (read-only) | `string` | Id of the content element, which the trigger references through `aria-controls`. Generated, unless the content element has its own `id`. |
36
+
37
+ ### Methods
38
+
39
+ | Signature | Description |
40
+ | --- | --- |
41
+ | `collapse(): void` | Sets `expanded` to `false`. |
42
+ | `expand(): void` | Sets `expanded` to `true`. |
43
+ | `setContentId(id: string \| null): void` | Takes the ID the content element was given, so the trigger points at it. `CollapsibleContentDirective` calls it, so there's no need to. |
44
+ | `toggle(): void` | Toggles `expanded` unless the root is disabled. |
45
+
46
+ ## `CollapsibleContentDirective`
47
+
48
+ Directive.
49
+
50
+ Animates the height of the collapsible content between `0` and its measured size. Adds no wrapper
51
+ element, so it can be applied directly to a `ul`, `div` or any other container with any number of children.
52
+
53
+ The measured size is also published on the host as the `--mona-collapsible-content-height` custom
54
+ property, so consumers can drive their own animation instead (pair it with `[animate]="false"` on the root).
55
+
56
+ **Selector:** `[monaCollapsibleContent]`
57
+
58
+ ### Inputs
59
+
60
+ | Name | Type | Default | Description |
61
+ | --- | --- | --- | --- |
62
+ | `id` | `string \| null` | `null` | The content's id, for when it has to be something in particular. Generated if not given. |
63
+
64
+ ## `CollapsibleTriggerDirective`
65
+
66
+ Directive.
67
+
68
+ Toggles the closest `monaCollapsible`. Wires `aria-expanded` / `aria-controls` automatically and
69
+ only adds `role`, `tabindex` and keyboard handling when the host element is not already interactive.
70
+
71
+ **Selector:** `[monaCollapsibleTrigger]`
@@ -0,0 +1,54 @@
1
+ # `@nanahoshi/mona-ui/color-gradient`
2
+
3
+ Everything `@nanahoshi/mona-ui/color-gradient` exports.
4
+
5
+ **Guides:** [Color Gradient](../color-gradient.md)
6
+
7
+ ## `ColorGradientComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-color-gradient`
12
+ **Implements:** `FormValueControl<string \| null \| undefined>`
13
+
14
+ ### Inputs
15
+
16
+ | Name | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `aria-label` | `string` | `""` | Accessible name of the group of controls. |
19
+ | `aria-labelledby` | `string` | `""` | Id of the element that names the group of controls. |
20
+ | `disabled` | `boolean` | `false` | Sets the disabled state of the color gradient. |
21
+ | `format` | `ColorOutputFormat` | `"hex"` | Specifies the format of the color output. |
22
+ | `invalid` | `boolean` | `false` | Marks the color gradient as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
23
+ | `opacity` | `boolean` | `true` | Specifies whether the color picker should display the alpha slider. |
24
+ | `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. |
25
+ | `required` | `boolean` | `false` | Marks the color gradient as required for form validation. |
26
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Specifies the rounded variant of the color picker. |
27
+ | `showButtons` | `boolean` | `true` | Specifies whether the color picker should display the buttons. When set to true, the color picker will display the "Apply" and "Cancel" buttons. When set to false, the color picker will not display the buttons and will emit the color value on change. |
28
+ | `showColorInputs` | `boolean` | `true` | Specifies whether the color picker should display the channel inputs (RGB or HSV). |
29
+ | `showHexInput` | `boolean` | `true` | Specifies whether the color picker should display the hex input. |
30
+ | `touched` | `boolean` | `false` | Marks the color gradient as touched. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
31
+ | `value` (two-way) | `string \| null \| undefined` | `undefined` | Two-way bindable current color value. When undefined, the component keeps its default internal color state (white, #ffffffff). |
32
+
33
+ ### Outputs
34
+
35
+ | Name | Type | Description |
36
+ | --- | --- | --- |
37
+ | `apply` | `void` | Emits when the Apply button is clicked. The `Apply` button is only displayed when `showButtons` is set to true. |
38
+ | `cancel` | `void` | Emits when the Cancel button is clicked, after the controls go back to the current value. The `Cancel` button is only displayed when `showButtons` is set to true. |
39
+ | `touch` | `void` | Emitted when focus leaves the color gradient. Moving between its own parts doesn't count. The `FormField` directive listens to this to mark the field as touched. |
40
+ | `valueChange` | `string \| null \| undefined` | Emitted when `value` changes. |
41
+
42
+ ### Methods
43
+
44
+ | Signature | Description |
45
+ | --- | --- |
46
+ | `focus(options?: FocusOptions): void` | Moves focus to the saturation and value handle. |
47
+
48
+ ## `COLOR_GRADIENT_DEFAULT_MESSAGES`
49
+
50
+ Constant.
51
+
52
+ ```typescript
53
+ const COLOR_GRADIENT_DEFAULT_MESSAGES: MonaColorGradientMessages;
54
+ ```
@@ -0,0 +1,52 @@
1
+ # `@nanahoshi/mona-ui/color-palette`
2
+
3
+ Everything `@nanahoshi/mona-ui/color-palette` exports.
4
+
5
+ **Guides:** [Color Palette](../color-palette.md)
6
+
7
+ ## `ColorPaletteComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-color-palette`
12
+ **Implements:** `FormValueControl<string \| null>`
13
+
14
+ ### Inputs
15
+
16
+ | Name | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `aria-label` | `string` | `""` | Accessible label for the color palette grid. |
19
+ | `aria-labelledby` | `string` | `""` | Id of the element that names the color palette grid. |
20
+ | `clearable` | `boolean` | `true` | Whether activating the selected tile clears the value. A required palette never clears. |
21
+ | `columns` | `number` | `10` | The number of columns in the color palette grid. Only applicable when using a custom palette. A value below 1 shows one column. |
22
+ | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
23
+ | `invalid` | `boolean` | `false` | Marks the color palette as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
24
+ | `palette` | `PaletteType \| Iterable<string \| ColorPaletteItem>` | `[]` | The palette to display — one of the built-in `"flat"`, `"material"`, or `"websafe"` schemes, or a custom iterable of colors. A custom color is a CSS color string, or a `{ color, name }` item when it has a name of its own. An empty custom palette falls back to the flat scheme. |
25
+ | `readonly` | `boolean` | `false` | Prevents value changes while preserving the component's visual state. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
26
+ | `required` | `boolean` | `false` | Sets whether the color palette is required. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
27
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"none"` | Border-radius preset applied to the color palette items. |
28
+ | `tileSize` | `number` | `24` | The size of each tile in the color palette grid, in pixels. Below 24, tiles miss the minimum target size of WCAG 2.5.8. |
29
+ | `touched` | `boolean` | `false` | Sets the touched state of the color palette. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
30
+ | `value` (two-way) | `string \| null` | `null` | Two-way bindable current color value. |
31
+
32
+ ### Outputs
33
+
34
+ | Name | Type | Description |
35
+ | --- | --- | --- |
36
+ | `colorSelect` | `string` | Emitted with the tile's color each time a tile is activated, also when it's already selected, which doesn't change `value`. |
37
+ | `touch` | `void` | Emitted when focus leaves the color palette or a color is selected. The `FormField` directive listens to this to mark the field as touched. |
38
+ | `valueChange` | `string \| null` | Emitted when `value` changes. |
39
+
40
+ ### Methods
41
+
42
+ | Signature | Description |
43
+ | --- | --- |
44
+ | `focus(options?: FocusOptions): void` | Moves focus to the palette's active tile. |
45
+
46
+ ## `COLOR_PALETTE_DEFAULT_MESSAGES`
47
+
48
+ Constant.
49
+
50
+ ```typescript
51
+ const COLOR_PALETTE_DEFAULT_MESSAGES: MonaColorPaletteMessages;
52
+ ```
@@ -0,0 +1,89 @@
1
+ # `@nanahoshi/mona-ui/color-picker`
2
+
3
+ Everything `@nanahoshi/mona-ui/color-picker` exports.
4
+
5
+ **Guides:** [Color Picker](../color-picker.md)
6
+
7
+ ## `ColorPickerComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-color-picker`
12
+ **Implements:** `FormValueControl<string \| null>`
13
+
14
+ ### Inputs
15
+
16
+ | Name | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `aria-label` | `string` | `""` | Accessible label for the color picker combobox. |
19
+ | `aria-labelledby` | `string` | `""` | Id of the element that names the color picker. |
20
+ | `closeOnSelect` | `boolean` | `true` | Whether to close the color picker when a color is selected. Only applies when the view is set to "palette". |
21
+ | `columns` | `number` | `10` | The number of columns to display in the color palette. Only applies when the view is set to "palette" and the palette is a custom array of colors. |
22
+ | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
23
+ | `format` | `ColorOutputFormat` | `"hex"` | The format of the value the gradient view writes. Only applies when the view is set to "gradient". |
24
+ | `invalid` | `boolean` | `false` | Marks the color picker as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
25
+ | `opacity` | `boolean` | `true` | Whether to display the opacity slider. Only applies when the view is set to "gradient". |
26
+ | `palette` | `Iterable<string \| ColorPaletteItem> \| PaletteType` | `"flat"` | The type of color palette to use. This can be a predefined palette type like "flat", "material", or "websafe", or a custom iterable of CSS color strings or `{ color, name }` items. |
27
+ | `readonly` | `boolean` | `false` | Prevents value changes while preserving the component's visual state. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
28
+ | `required` | `boolean` | `false` | Sets whether the color picker is required. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
29
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the color picker. |
30
+ | `showButtons` | `boolean` | `true` | Whether the gradient view has Apply and Cancel buttons. Without them, each change writes the value at once. Only applies when the view is set to "gradient". |
31
+ | `showClearButton` | `boolean` | `false` | Whether to show the clear button to reset the color. This is only applicable when the view is set to "palette". |
32
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the color picker's dimensions. |
33
+ | `tileSize` | `number` | `24` | The size of each palette tile, in pixels. Only applies when the view is set to "palette". Below 24, tiles miss the minimum target size of WCAG 2.5.8. |
34
+ | `touched` | `boolean` | `false` | Sets the touched state of the color picker. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
35
+ | `value` (two-way) | `string \| null` | `null` | Two-way bindable current color value. |
36
+ | `view` | `ColorPickerView` | `"gradient"` | The view mode of the color picker. This can be either "palette" or "gradient". |
37
+
38
+ ### Outputs
39
+
40
+ | Name | Type | Description |
41
+ | --- | --- | --- |
42
+ | `touch` | `void` | Emitted when focus leaves the color picker or its popup closes. A color selected with `closeOnSelect` off doesn't emit it until then. The `FormField` directive listens to this to mark the field as touched. |
43
+ | `valueChange` | `string \| null` | Emitted when `value` changes. |
44
+
45
+ ### Methods
46
+
47
+ | Signature | Description |
48
+ | --- | --- |
49
+ | `focus(options?: FocusOptions): void` | Moves focus to the color picker. |
50
+
51
+ ## `ColorPickerValueTemplateDirective`
52
+
53
+ Directive.
54
+
55
+ **Selector:** `ng-template[monaColorPickerValueTemplate]`
56
+
57
+ ### Template context
58
+
59
+ | Name | Type |
60
+ | --- | --- |
61
+ | `$implicit` | `string \| null` |
62
+
63
+ ## `COLOR_PICKER_DEFAULT_MESSAGES`
64
+
65
+ Constant.
66
+
67
+ ```typescript
68
+ const COLOR_PICKER_DEFAULT_MESSAGES: MonaColorPickerMessages;
69
+ ```
70
+
71
+ ## `ColorPickerValueTemplateContext`
72
+
73
+ Interface.
74
+
75
+ ### Properties
76
+
77
+ | Name | Type |
78
+ | --- | --- |
79
+ | `$implicit` | `string \| null` |
80
+
81
+ ## `ColorPickerView`
82
+
83
+ Type alias.
84
+
85
+ ```typescript
86
+ type ColorPickerView = "gradient" | "palette";
87
+ ```
88
+
89
+ **Used by:** [`ColorPickerComponent`](color-picker.md#colorpickercomponent)
@@ -0,0 +1,69 @@
1
+ # `@nanahoshi/mona-ui/combo-box`
2
+
3
+ Everything `@nanahoshi/mona-ui/combo-box` exports.
4
+
5
+ **Guides:** [Combo Box](../combo-box.md)
6
+
7
+ ## `ComboBoxComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-combo-box`
12
+ **Type parameters:** `TData = unknown`, `TValue = TData`
13
+ **Implements:** `FormValueControl<TValue \| null>`
14
+
15
+ ### Inputs
16
+
17
+ | Name | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `allowCustomValue` | `boolean` | `false` | Allows a custom value to be committed when it doesn't match any item in `data`. |
20
+ | `aria-describedby` | `string` | `""` | ID of an element that provides an extended description for the input. |
21
+ | `aria-label` | `string` | `""` | Accessible name for the input. Describe what the combo box represents. Prefer a visible label, linked through `inputId` or `aria-labelledby`; without any of them, browsers fall back to the `placeholder`. |
22
+ | `aria-labelledby` | `string` | `""` | ID of an external element that provides the accessible name for the input. |
23
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
24
+ | `data` | `Iterable<TData>` | `[]` | Collection of items to render. |
25
+ | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
26
+ | `inputId` | `string` | `generated` | Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the combo box. A unique id is generated when it isn't set. |
27
+ | `invalid` | `boolean` | `false` | Marks the combo box as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
28
+ | `itemDisabled` | `DropdownFieldPredicateType<TData>` | `undefined` | A predicate function or the name of the field that determines whether an item is disabled. |
29
+ | `loading` | `boolean` | `false` | Shows a loading indicator, in place of the clear button, and marks the field busy. It doesn't block interaction: the field stays usable while data loads. |
30
+ | `placeholder` | `string` | `""` | Placeholder text shown when no value is selected or entered. |
31
+ | `popupClass` | `string` | `""` | Sets the class of the popup element. |
32
+ | `popupHeight` | `ListSizeInputType` | `null` | Maximum height of the popup, in pixels or as a CSS length. Shorter lists shrink to fit. When unset, the popup is at most 200 pixels tall. |
33
+ | `popupWidth` | `ListSizeInputType` | `null` | Sets the width of the popup element. |
34
+ | `readonly` | `boolean` | `false` | Prevents value changes while preserving the component's visual state. |
35
+ | `required` | `boolean` | `false` | Sets the required state of the combo box component. |
36
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
37
+ | `showClearButton` | `boolean` | `false` | Displays a button that resets the value to empty when an item is selected. |
38
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
39
+ | `textField` | `DropdownFieldSelectorType<TData, string>` | `undefined` | Property name or accessor used to derive the display text from a data item. If not set, the item itself is used as the text representation. |
40
+ | `touched` | `boolean` | `false` | Sets the touched state of the combo box. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
41
+ | `value` (two-way) | `TValue \| null` | `null` | Two-way bindable current selected value. Implements `FormValueControl<TValue \| null>`, enabling signal forms `[formField]` binding. Object mode returns the selected data item; primitive mode (see `valuePrimitive`) returns the value resolved through `valueField`. `null` represents no selection. |
42
+ | `valueField` | `DropdownFieldSelectorType<TData, unknown>` | `undefined` | Property name or accessor used to derive the value from a data item. It is used for stable item identity, matching externally supplied values, and primitive value projection when `valuePrimitive` is enabled. When omitted, the item itself is used as the value representation. Should resolve to a stable, unique scalar. |
43
+ | `valuePrimitive` | `boolean` | `false` | Determines whether the bound value contains complete data items or values extracted through `valueField`. When `false`, selecting an item writes the complete data item. When `true`, selecting an item writes the value resolved through `valueField`. |
44
+
45
+ ### Outputs
46
+
47
+ | Name | Type | Description |
48
+ | --- | --- | --- |
49
+ | `close` | `PopupCloseEvent<unknown>` | Emitted when the popup is about to close. This event is preventable. |
50
+ | `closed` | `void` | Emitted after the popup is closed. |
51
+ | `open` | `PreventableEvent<Event>` | Emitted when the popup is about to open. This event is preventable. |
52
+ | `opened` | `void` | Emitted after the popup is opened. |
53
+ | `touch` | `void` | Emitted when focus leaves the combo box. Moving between its input, clear button and popup doesn't count. The `FormField` directive listens to this to mark the field as touched. |
54
+ | `valueAdd` | `string` | Emitted with the entered text when the user presses Enter on text that matches no item, or leaves the field with it. Only emitted when `allowCustomValue` is true. |
55
+ | `valueChange` | `TValue \| null` | Emitted when `value` changes. |
56
+
57
+ ### Methods
58
+
59
+ | Signature | Description |
60
+ | --- | --- |
61
+ | `focus(options?: FocusOptions): void` | Moves focus to the inner input. The caret goes to the end of the text. |
62
+
63
+ ## `COMBO_BOX_DEFAULT_MESSAGES`
64
+
65
+ Constant.
66
+
67
+ ```typescript
68
+ const COMBO_BOX_DEFAULT_MESSAGES: MonaComboBoxMessages;
69
+ ```