@nanahoshi/mona-ui 0.24.10 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +9 -0
  2. package/chart/README.md +223 -77
  3. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
  4. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
  5. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
  6. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
  7. package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
  8. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
  9. package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
  10. package/fesm2022/nanahoshi-mona-ui-chart.mjs +1909 -666
  11. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
  12. package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
  13. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
  14. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
  15. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
  16. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
  17. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
  18. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
  19. package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
  20. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
  21. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
  22. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
  23. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
  24. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
  25. package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
  26. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
  27. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
  28. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  29. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
  30. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
  31. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
  32. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
  33. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
  34. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  35. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +146 -5
  36. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
  37. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
  38. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
  39. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
  40. package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
  41. package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
  42. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
  43. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
  44. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +111 -5
  45. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +103 -5
  46. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +103 -5
  47. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +100 -6
  48. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +90 -5
  49. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +103 -5
  50. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +90 -5
  51. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +90 -5
  52. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +103 -5
  53. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +105 -5
  54. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +103 -5
  55. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +90 -5
  56. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +90 -5
  57. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
  58. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
  59. package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
  60. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
  61. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
  62. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
  63. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
  64. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
  65. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
  66. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
  67. package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
  68. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
  69. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
  70. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
  71. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
  72. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
  73. package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
  74. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
  75. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
  76. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
  77. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
  78. package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
  79. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
  80. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
  81. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
  82. package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
  83. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
  84. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
  85. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
  86. package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
  87. package/i18n/catalogs/en-US.messages.json +90 -5
  88. package/locales/ar-sa/ar-sa.messages.json +90 -5
  89. package/locales/de-de/de-de.messages.json +90 -5
  90. package/locales/es-es/es-es.messages.json +90 -5
  91. package/locales/fr-fr/fr-fr.messages.json +91 -6
  92. package/locales/id-id/id-id.messages.json +90 -5
  93. package/locales/it-it/it-it.messages.json +90 -5
  94. package/locales/ja-jp/ja-jp.messages.json +90 -5
  95. package/locales/ko-kr/ko-kr.messages.json +90 -5
  96. package/locales/pt-br/pt-br.messages.json +90 -5
  97. package/locales/ru-ru/ru-ru.messages.json +90 -5
  98. package/locales/tr-tr/tr-tr.messages.json +90 -5
  99. package/locales/zh-cn/zh-cn.messages.json +90 -5
  100. package/locales/zh-tw/zh-tw.messages.json +90 -5
  101. package/package.json +2 -1
  102. package/styles.css +156 -0
  103. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
  104. package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
  105. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
  106. package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
  107. package/types/nanahoshi-mona-ui-button.d.ts +26 -3
  108. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  109. package/types/nanahoshi-mona-ui-card.d.ts +22 -6
  110. package/types/nanahoshi-mona-ui-chart.d.ts +519 -527
  111. package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
  112. package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
  113. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
  114. package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
  115. package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
  116. package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
  117. package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
  118. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
  119. package/types/nanahoshi-mona-ui-common.d.ts +28 -2
  120. package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
  121. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
  122. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
  123. package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
  124. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
  125. package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
  126. package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
  127. package/types/nanahoshi-mona-ui-i18n.d.ts +130 -3
  128. package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
  129. package/types/nanahoshi-mona-ui-label.d.ts +17 -2
  130. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +85 -0
  131. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +85 -0
  132. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +85 -0
  133. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +85 -0
  134. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +85 -0
  135. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +85 -0
  136. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +85 -0
  137. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +85 -0
  138. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +85 -0
  139. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +85 -0
  140. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +85 -0
  141. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +85 -0
  142. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +85 -0
  143. package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
  144. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
  145. package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
  146. package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
  147. package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
  148. package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
  149. package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
  150. package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
  151. package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
  152. package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
  153. package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
  154. package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
  155. package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
  156. package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
  157. package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
  158. package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
  159. package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
  160. package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
  161. package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
  162. package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
  163. package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
  164. package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
  165. package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
@@ -2,11 +2,24 @@ import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
2
2
  import * as _nanahoshi_mona_ui_button from '@nanahoshi/mona-ui/button';
3
3
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
4
4
  import * as _angular_core from '@angular/core';
5
+ import { FormValueControl } from '@angular/forms/signals';
5
6
  import { SelectionMode } from '@nanahoshi/mona-ui/common';
6
7
  import * as class_variance_authority_types from 'class-variance-authority/types';
7
8
  import { VariantProps } from 'class-variance-authority';
8
9
  import { VariantInputs } from '@nanahoshi/mona-ui/internal';
9
10
 
11
+ /**
12
+ * What `mona-button-group` reports about a clicked button.
13
+ */
14
+ interface ButtonGroupClickEvent<T = unknown> {
15
+ /** The button's element. */
16
+ readonly button: HTMLButtonElement;
17
+ /** Whether the button is selected now that the group has applied its selection. */
18
+ readonly selected: boolean;
19
+ /** The button's `value`, if it has one. */
20
+ readonly value: T | undefined;
21
+ }
22
+
10
23
  declare const buttonGroupThemeVariants: (props?: ({
11
24
  look?: "default" | "error" | "ghost" | "info" | "outline" | "primary" | "secondary" | "success" | "warning" | null | undefined;
12
25
  rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
@@ -15,7 +28,7 @@ declare const buttonGroupThemeVariants: (props?: ({
15
28
  type ButtonGroupVariantProps = VariantProps<typeof buttonGroupThemeVariants>;
16
29
  type ButtonGroupVariantsInput = VariantInputs<ButtonGroupVariantProps>;
17
30
 
18
- declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
31
+ declare class ButtonGroupComponent<T = unknown> implements ButtonGroupVariantsInput, FormValueControl<T | readonly T[] | null | undefined> {
19
32
  #private;
20
33
  protected readonly baseClass: _angular_core.Signal<string>;
21
34
  /**
@@ -27,61 +40,118 @@ declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
27
40
  * disabled state, but not its selection.
28
41
  */
29
42
  protected readonly components: _angular_core.Signal<readonly _nanahoshi_mona_ui_button.ButtonGroupMember[]>;
30
- protected readonly effectiveAriaLabel: _angular_core.Signal<string>;
43
+ protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
44
+ protected readonly invalidState: _angular_core.Signal<boolean>;
45
+ protected readonly labelledBy: _angular_core.Signal<string | null>;
31
46
  protected readonly members: _angular_core.Signal<ButtonDirective[]>;
32
47
  protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaButtonGroupMessages>;
33
48
  /**
34
- * @description When `false` and `selection` is `"single"`, at least one button must remain selected;
35
- * the active button cannot be deselected. Has no effect in `"multiple"` mode.
49
+ * @description When `false` and `selection` is `"single"`, a selected button stays selected until another one takes
50
+ * over: the active button can't be deselected, and clearing every `selected` brings it back. It doesn't choose a
51
+ * first button, and a `value` of `null` still clears the group, so a form can reset it. Has no effect in `"multiple"`
52
+ * mode.
36
53
  * @default true
37
54
  */
38
- readonly allowEmpty: _angular_core.InputSignal<boolean>;
55
+ readonly allowEmpty: _angular_core.InputSignalWithTransform<boolean, unknown>;
39
56
  /**
40
57
  * @description Accessible name for the host element. Override when multiple button groups appear on the same page
41
58
  * so screen reader users can distinguish them.
42
59
  */
43
60
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
44
61
  /**
45
- * @description Emitted when any child button in the group is clicked.
46
- * Use `[(selected)]` on child buttons to observe the resulting selection state.
62
+ * @description Id of the element that names the group.
63
+ * @default ""
64
+ */
65
+ readonly ariaLabelledBy: _angular_core.InputSignal<string>;
66
+ /**
67
+ * @description Emitted when a button placed directly in the group is clicked, toggleable or not, after the group has
68
+ * applied its selection. Not emitted for a dropdown or split button's own buttons, for a disabled button, or for a
69
+ * toggle button while the group is read-only, since nothing was selected.
47
70
  */
48
- readonly buttonClick: _angular_core.OutputRef<void>;
71
+ readonly buttonClick: _angular_core.OutputRef<ButtonGroupClickEvent<T>>;
49
72
  /**
50
- * @description Renders all child buttons with reduced visual emphasis and removes pointer interaction.
73
+ * @description Renders all child buttons with reduced visual emphasis and removes pointer interaction. When bound to
74
+ * a signal form field via `[formField]`, this is written by the `FormField` directive.
51
75
  * @default false
52
76
  */
53
- readonly disabled: _angular_core.ModelSignal<boolean>;
77
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
78
+ /**
79
+ * @description Marks the group as invalid. Error styling requires both `invalid` and `touched` to be `true`. When
80
+ * bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
81
+ * @default false
82
+ */
83
+ readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
54
84
  /**
55
85
  * @description Visual style variant propagated to all child buttons.
56
86
  * Also controls container-level divider and border behavior.
57
87
  * @default "outline"
58
88
  */
59
89
  readonly look: _angular_core.InputSignal<"default" | "error" | "ghost" | "info" | "outline" | "primary" | "secondary" | "success" | "warning" | null | undefined>;
90
+ /**
91
+ * @description Prevents selection changes while the buttons stay focusable. Buttons that aren't toggleable keep
92
+ * working. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
93
+ * @default false
94
+ */
95
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
60
96
  /**
61
97
  * @description Border-radius preset applied to the container and the outer corners of the first and last child button.
62
98
  * @default "medium"
63
99
  */
64
100
  readonly rounded: _angular_core.InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
65
101
  /**
66
- * @description Two-way bindable. Controls whether child buttons behave as a radio group (`"single"`)
67
- * or toggle independently (`"multiple"`).
102
+ * @description Whether one button can be selected at a time (`"single"`) or each toggles on its own (`"multiple"`).
103
+ * The buttons stay toggle buttons with `aria-pressed` in both. For a choice that must always hold one value, use
104
+ * `mona-segmented`, which is a radio group.
68
105
  * @default "multiple"
69
106
  */
70
- readonly selection: _angular_core.ModelSignal<SelectionMode>;
107
+ readonly selection: _angular_core.InputSignal<SelectionMode>;
71
108
  /**
72
109
  * @description Size preset propagated to all child buttons, overriding their individual `size` inputs.
73
110
  * @default "medium"
74
111
  */
75
112
  readonly size: _angular_core.InputSignal<"large" | "medium" | "small" | null | undefined>;
113
+ /**
114
+ * @description Emitted when a user changes the selection or focus leaves the group.
115
+ * The `FormField` directive listens to this to mark the field as touched.
116
+ */
117
+ readonly touch: _angular_core.OutputEmitterRef<void>;
118
+ /**
119
+ * @description Marks the group as touched. When bound to a signal form field via `[formField]`, this is written by
120
+ * the `FormField` directive.
121
+ * @default false
122
+ */
123
+ readonly touched: _angular_core.InputSignalWithTransform<boolean, unknown>;
76
124
  /**
77
125
  * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
78
126
  * @default ""
79
127
  */
80
128
  readonly userClass: _angular_core.InputSignal<string>;
129
+ /**
130
+ * @description The value of the selected button in `"single"` mode, or `null`, and an array of the selected buttons'
131
+ * values in `"multiple"` mode. Buttons take part by having a `value`. While `undefined`, it leaves each button's
132
+ * `selected` alone. A value with no button yet stays, so one that loads before its button isn't lost. Use either this
133
+ * or `[(selected)]` on the buttons, not both.
134
+ * @default undefined
135
+ */
136
+ readonly value: _angular_core.ModelSignal<T | readonly T[] | null | undefined>;
81
137
  constructor();
138
+ /**
139
+ * @description Moves focus to the selected button, or the first enabled one.
140
+ * @param options Options passed to the native `focus()` call, such as `preventScroll`.
141
+ */
142
+ focus(options?: FocusOptions): void;
143
+ protected onFocusOut(event: FocusEvent): void;
144
+ private commitValue;
145
+ /**
146
+ * Holds the group to `selection` and `allowEmpty` however a button's `selected` changed, since a binding can change
147
+ * it as well as a click. A form's `value` of `null` is left alone, so the form can reset the group.
148
+ */
149
+ private enforceSelectionPolicy;
82
150
  private setSubscriptions;
83
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonGroupComponent, never>;
84
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupComponent, "mona-button-group", never, { "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; "disabled": "disabledChange"; "selection": "selectionChange"; }, ["buttons", "components"], ["[monaButton], mona-dropdown-button, mona-split-button"], true, never>;
151
+ private valueButtons;
152
+ private valuesOf;
153
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonGroupComponent<any>, never>;
154
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupComponent<any>, "mona-button-group", never, { "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; "touch": "touch"; "value": "valueChange"; }, ["buttons", "components"], ["[monaButton], mona-dropdown-button, mona-split-button"], true, never>;
85
155
  }
86
156
 
87
157
  declare const BUTTON_GROUP_DEFAULT_MESSAGES: {
@@ -89,4 +159,4 @@ declare const BUTTON_GROUP_DEFAULT_MESSAGES: {
89
159
  };
90
160
 
91
161
  export { BUTTON_GROUP_DEFAULT_MESSAGES, ButtonGroupComponent };
92
- export type { ButtonGroupVariantProps };
162
+ export type { ButtonGroupClickEvent, ButtonGroupVariantProps };
@@ -25,11 +25,13 @@ type ButtonVariantsInput = VariantInputs<ButtonVariantProps>;
25
25
  declare class ButtonDirective implements ButtonVariantsInput {
26
26
  #private;
27
27
  protected readonly baseClass: _angular_core.Signal<string>;
28
- protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
29
28
  protected readonly effectiveLook: _angular_core.Signal<"default" | "primary" | "success" | "error" | "warning" | "info" | "outline" | "secondary" | "ghost" | "link" | "clear" | null | undefined>;
30
29
  protected readonly effectiveRounded: _angular_core.Signal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
31
30
  protected readonly effectiveSize: _angular_core.Signal<"large" | "medium" | "small" | null | undefined>;
32
- protected readonly effectiveToggleable: _angular_core.Signal<boolean>;
31
+ /**
32
+ * A read-only group's toggle buttons keep focus, so they can't be natively disabled.
33
+ */
34
+ protected readonly groupReadonly: _angular_core.Signal<boolean>;
33
35
  protected readonly loadingSize: _angular_core.Signal<12 | 16 | 14>;
34
36
  /**
35
37
  * @description Value forwarded to the `aria-haspopup` attribute. Set when this button triggers a popup, menu,
@@ -44,6 +46,16 @@ declare class ButtonDirective implements ButtonVariantsInput {
44
46
  * @default false
45
47
  */
46
48
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
49
+ /**
50
+ * Whether the button is disabled, by its own input or its group's. A dropdown or split button reads this to close
51
+ * its menu.
52
+ */
53
+ readonly effectiveDisabled: _angular_core.Signal<boolean>;
54
+ /**
55
+ * Whether a click toggles the button: buttons in a group do unless `toggleable` is `false`. The group reads this to
56
+ * know which buttons take part in its selection.
57
+ */
58
+ readonly effectiveToggleable: _angular_core.Signal<boolean>;
47
59
  /**
48
60
  * @description Removes horizontal padding and fixes a square aspect ratio sized to match `size`.
49
61
  * Provide `aria-label` on the host when using icon-only buttons; in dev mode, an icon-only button without an
@@ -106,9 +118,15 @@ declare class ButtonDirective implements ButtonVariantsInput {
106
118
  * @default ""
107
119
  */
108
120
  readonly userClass: _angular_core.InputSignal<string>;
121
+ /**
122
+ * @description What a `ButtonGroup`'s `value` holds while this button is selected. A button without one takes no part
123
+ * in the group's `value`.
124
+ * @default undefined
125
+ */
126
+ readonly value: _angular_core.InputSignal<unknown>;
109
127
  constructor();
110
128
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonDirective, never>;
111
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "button[monaButton]", never, { "ariaHasPopup": { "alias": "aria-haspopup"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "selected": "selectedChange"; }, never, never, true, never>;
129
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "button[monaButton]", never, { "ariaHasPopup": { "alias": "aria-haspopup"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "look": "lookChange"; "selected": "selectedChange"; }, never, never, true, never>;
112
130
  }
113
131
 
114
132
  /**
@@ -139,8 +157,13 @@ declare class ButtonService {
139
157
  readonly buttonSelect$: Subject<[ButtonDirective, boolean]>;
140
158
  readonly groupDisabled: _angular_core.WritableSignal<boolean>;
141
159
  readonly groupLook: _angular_core.WritableSignal<"default" | "primary" | "success" | "error" | "warning" | "info" | "outline" | "secondary" | "ghost" | "link" | "clear" | null | undefined>;
160
+ readonly groupReadonly: _angular_core.WritableSignal<boolean>;
142
161
  readonly groupRounded: _angular_core.WritableSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
143
162
  readonly groupSize: _angular_core.WritableSignal<"large" | "medium" | "small" | null | undefined>;
163
+ /**
164
+ * Every click on a member, toggleable or not, reported after the group has applied its selection.
165
+ */
166
+ readonly memberClick$: Subject<[ButtonDirective, HTMLButtonElement]>;
144
167
  /**
145
168
  * The buttons that belong to the group. Only these follow the group's look, size, rounding, disabled state and
146
169
  * selection; other buttons that can inject this service ignore it.
@@ -116,6 +116,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
116
116
  protected readonly decadeGridClass: _angular_core.Signal<string>;
117
117
  protected readonly decadeStart: _angular_core.Signal<number>;
118
118
  protected readonly decadeYears: _angular_core.Signal<number[][]>;
119
+ protected readonly effectiveDisabled: _angular_core.Signal<boolean>;
119
120
  protected readonly effectiveFirstDay: _angular_core.Signal<FirstDayOfWeek>;
120
121
  protected readonly gridId: string;
121
122
  protected readonly headerClass: _angular_core.Signal<string>;
@@ -9,7 +9,7 @@ import { ClassInputType } from '@nanahoshi/mona-ui/common';
9
9
  declare class CardContentDirective {
10
10
  readonly templateRef: TemplateRef<any>;
11
11
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardContentDirective, never>;
12
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardContentDirective, "[monaCardContent]", never, {}, {}, never, never, true, never>;
12
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardContentDirective, "ng-template[monaCardContent]", never, {}, {}, never, never, true, never>;
13
13
  }
14
14
 
15
15
  declare const cardBaseThemeVariants: (props?: ({
@@ -29,6 +29,8 @@ declare class CardComponent implements CardVariantInput {
29
29
  protected readonly baseClass: _angular_core.Signal<string>;
30
30
  protected readonly contentDirective: _angular_core.Signal<CardContentDirective | undefined>;
31
31
  protected readonly descriptionCellClass: string;
32
+ /** Its own id on the library's wrapper: the template's `let id` may already be on the consumer's element. */
33
+ protected readonly descriptionCellId: _angular_core.Signal<string | null>;
32
34
  protected readonly descriptionId: _angular_core.Signal<string | null>;
33
35
  protected readonly descriptionTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
34
36
  protected readonly footerClass: _angular_core.Signal<string>;
@@ -37,8 +39,15 @@ declare class CardComponent implements CardVariantInput {
37
39
  protected readonly headerTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
38
40
  protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCardMessages>;
39
41
  protected readonly titleCellClass: string;
42
+ protected readonly titleCellId: _angular_core.Signal<string | null>;
40
43
  protected readonly titleId: _angular_core.Signal<string | null>;
41
44
  protected readonly titleTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
45
+ /**
46
+ * @description The role the card takes when it has a title, which then names it. Use `article` for self-contained
47
+ * content or `region` for a landmark.
48
+ * @default "group"
49
+ */
50
+ readonly role: _angular_core.InputSignal<"article" | "group" | "region">;
42
51
  /**
43
52
  * @description Controls the border radius applied to the card and its header/footer regions.
44
53
  * @default "medium"
@@ -50,7 +59,7 @@ declare class CardComponent implements CardVariantInput {
50
59
  */
51
60
  readonly userClass: _angular_core.InputSignal<string>;
52
61
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardComponent, never>;
53
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardComponent, "mona-card", never, { "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["contentDirective"], never, true, never>;
62
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardComponent, "mona-card", never, { "role": { "alias": "role"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["contentDirective"], never, true, never>;
54
63
  }
55
64
 
56
65
  declare class CardFooterComponent {
@@ -85,21 +94,28 @@ declare class CardHeaderComponent {
85
94
  declare class CardActionDirective {
86
95
  readonly templateRef: TemplateRef<any>;
87
96
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardActionDirective, never>;
88
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardActionDirective, "[monaCardAction]", never, {}, {}, never, never, true, never>;
97
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardActionDirective, "ng-template[monaCardAction]", never, {}, {}, never, never, true, never>;
98
+ }
99
+
100
+ interface CardTemplateContext {
101
+ /** An id for the element in the template, if something needs to refer to it. The card doesn't need it for its name. */
102
+ readonly $implicit: string;
89
103
  }
90
104
 
91
105
  declare class CardDescriptionDirective {
92
106
  readonly id: string;
93
107
  readonly templateRef: TemplateRef<any>;
108
+ static ngTemplateContextGuard(_directive: CardDescriptionDirective, _context: unknown): _context is CardTemplateContext;
94
109
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardDescriptionDirective, never>;
95
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardDescriptionDirective, "[monaCardDescription]", never, {}, {}, never, never, true, never>;
110
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardDescriptionDirective, "ng-template[monaCardDescription]", never, {}, {}, never, never, true, never>;
96
111
  }
97
112
 
98
113
  declare class CardTitleDirective {
99
114
  readonly id: string;
100
115
  readonly templateRef: TemplateRef<any>;
116
+ static ngTemplateContextGuard(_directive: CardTitleDirective, _context: unknown): _context is CardTemplateContext;
101
117
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardTitleDirective, never>;
102
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardTitleDirective, "[monaCardTitle]", never, {}, {}, never, never, true, never>;
118
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CardTitleDirective, "ng-template[monaCardTitle]", never, {}, {}, never, never, true, never>;
103
119
  }
104
120
 
105
121
  declare const CARD_DEFAULT_MESSAGES: {
@@ -107,4 +123,4 @@ declare const CARD_DEFAULT_MESSAGES: {
107
123
  };
108
124
 
109
125
  export { CARD_DEFAULT_MESSAGES, CardActionDirective, CardComponent, CardContentDirective, CardDescriptionDirective, CardFooterComponent, CardHeaderComponent, CardTitleDirective };
110
- export type { CardVariantProps };
126
+ export type { CardTemplateContext, CardVariantProps };