@nanahoshi/mona-ui 0.27.2 → 0.28.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 (208) hide show
  1. package/docs/api/chart.md +2 -2
  2. package/docs/api/popup.md +1 -1
  3. package/docs/api/theme.md +2 -2
  4. package/docs/chart.md +14 -0
  5. package/docs/editor.md +2 -0
  6. package/docs/installation.md +147 -15
  7. package/docs/introduction.md +37 -15
  8. package/docs/theming-built-in-themes.md +67 -0
  9. package/docs/theming-custom-colors.md +274 -0
  10. package/docs/theming-custom-themes.md +168 -0
  11. package/docs/theming.md +164 -248
  12. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
  13. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
  14. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
  15. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
  16. package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
  17. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
  18. package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
  19. package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
  20. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
  21. package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
  22. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
  23. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
  24. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
  25. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
  26. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
  27. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
  28. package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
  29. package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
  30. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
  31. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
  32. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
  33. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
  34. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
  35. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
  36. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
  37. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
  38. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
  39. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
  40. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
  41. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
  42. package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
  43. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
  44. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
  45. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
  46. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
  47. package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
  48. package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
  49. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
  50. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
  51. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
  52. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
  53. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
  54. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
  55. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
  56. package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
  57. package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
  60. package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
  61. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
  62. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
  63. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
  64. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
  65. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
  66. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
  67. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
  68. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
  69. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
  70. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
  71. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
  72. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
  73. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
  74. package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
  75. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
  76. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
  77. package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
  78. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
  79. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
  80. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
  81. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
  82. package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
  83. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
  84. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
  85. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
  86. package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
  87. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
  88. package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
  89. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
  90. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
  91. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
  92. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
  93. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
  94. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
  95. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
  96. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
  97. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
  98. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
  99. package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
  100. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
  101. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
  102. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
  103. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
  104. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
  105. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
  106. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
  107. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
  108. package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
  109. package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
  110. package/llms.txt +6 -2
  111. package/package.json +62 -23
  112. package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
  113. package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
  114. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
  115. package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
  116. package/types/nanahoshi-mona-ui-button.d.ts +227 -166
  117. package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
  118. package/types/nanahoshi-mona-ui-card.d.ts +125 -111
  119. package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
  120. package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
  121. package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
  122. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
  123. package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
  124. package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
  125. package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
  126. package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
  127. package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
  128. package/types/nanahoshi-mona-ui-command.d.ts +279 -191
  129. package/types/nanahoshi-mona-ui-common.d.ts +354 -385
  130. package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
  131. package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
  132. package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
  133. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
  134. package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
  135. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
  136. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
  137. package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
  138. package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
  139. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
  140. package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
  141. package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
  142. package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
  143. package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
  144. package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
  145. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
  147. package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
  148. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
  149. package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
  150. package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
  151. package/types/nanahoshi-mona-ui-label.d.ts +108 -78
  152. package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
  153. package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
  154. package/types/nanahoshi-mona-ui-list.d.ts +2 -1
  155. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
  156. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
  157. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
  158. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
  159. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
  160. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
  161. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
  162. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
  163. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
  164. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
  165. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
  166. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
  167. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
  168. package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
  169. package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
  170. package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
  171. package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
  172. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
  173. package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
  174. package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
  175. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
  176. package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
  177. package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
  178. package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
  179. package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
  180. package/types/nanahoshi-mona-ui-query.d.ts +82 -88
  181. package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
  182. package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
  183. package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
  184. package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
  185. package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
  186. package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
  187. package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
  188. package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
  189. package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
  190. package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
  191. package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
  192. package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
  193. package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
  194. package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
  195. package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
  196. package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
  197. package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
  198. package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
  199. package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
  200. package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
  201. package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
  202. package/types/nanahoshi-mona-ui-window.d.ts +494 -399
  203. package/types/nanahoshi-mona-ui.d.ts +1 -2
  204. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
  205. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
  206. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
  207. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
  208. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
@@ -1,21 +1,16 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, computed, viewChild, input, booleanAttribute, output, model, afterRenderEffect, Component, ElementRef, signal, afterNextRender, isDevMode, Directive } from '@angular/core';
4
- import { FormsModule } from '@angular/forms';
5
- import { twMerge } from 'tailwind-merge';
6
- import { cva } from 'class-variance-authority';
7
- import { themeControlSurfaceClasses, injectLabelAssociation, injectEffectiveDisabled, createElementControlId } from '@nanahoshi/mona-ui/internal';
8
-
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, ElementRef, InjectionToken, afterNextRender, afterRenderEffect, booleanAttribute, computed, inject, input, isDevMode, model, output, signal, viewChild } from "@angular/core";
4
+ import { FormsModule } from "@angular/forms";
5
+ import { twMerge } from "tailwind-merge";
6
+ import { cva } from "class-variance-authority";
7
+ import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
9
8
  const radioGroupThemeVariants = cva("flex", {
10
- variants: {
11
- orientation: {
12
- horizontal: "flex-row flex-wrap gap-4",
13
- vertical: "flex-col gap-2"
14
- }
15
- },
16
- defaultVariants: {
17
- orientation: "vertical"
18
- }
9
+ variants: { orientation: {
10
+ horizontal: "flex-row flex-wrap gap-4",
11
+ vertical: "flex-col gap-2"
12
+ } },
13
+ defaultVariants: { orientation: "vertical" }
19
14
  });
20
15
  const radioButtonThemeVariants = cva(`
21
16
  peer sr-only appearance-none outline-none focus-visible:outline-hidden
@@ -38,33 +33,25 @@ const radioButtonCircleThemeVariants = cva(`
38
33
  data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
39
34
  data-[invalid='true']:peer-focus-visible:border-error
40
35
  data-[invalid='true']:peer-focus-visible:ring-error/35
41
- `, {
42
- variants: {
43
- rounded: {
44
- full: "rounded-full",
45
- large: "rounded-lg",
46
- medium: "rounded-md",
47
- none: "rounded-none",
48
- small: "rounded-sm"
49
- }
50
- }
51
- });
36
+ `, { variants: { rounded: {
37
+ full: "rounded-full",
38
+ large: "rounded-lg",
39
+ medium: "rounded-md",
40
+ none: "rounded-none",
41
+ small: "rounded-sm"
42
+ } } });
52
43
  const radioButtonIndicatorThemeVariants = cva(`
53
44
  flex h-3 w-3
54
45
  bg-[var(--mona-indicator-color,var(--color-primary))]
55
46
  forced-color-adjust-none forced-colors:bg-[Highlight]
56
47
  transition-all duration-(--mona-motion-fast)
57
- `, {
58
- variants: {
59
- rounded: {
60
- full: "rounded-full",
61
- large: "rounded-lg",
62
- medium: "rounded-md",
63
- none: "rounded-none",
64
- small: "rounded-sm"
65
- }
66
- }
67
- });
48
+ `, { variants: { rounded: {
49
+ full: "rounded-full",
50
+ large: "rounded-lg",
51
+ medium: "rounded-md",
52
+ none: "rounded-none",
53
+ small: "rounded-sm"
54
+ } } });
68
55
  const radioButtonContainerLabelThemeVariants = cva(`
69
56
  relative flex h-full w-full items-center justify-center gap-1
70
57
  cursor-pointer
@@ -75,16 +62,12 @@ const radioButtonContainerLabelThemeVariants = cva(`
75
62
  data-[readonly='true']:cursor-default
76
63
  [&[data-readonly='true']>*]:cursor-default
77
64
  `, {
78
- variants: {
79
- labelSize: {
80
- small: "text-sm",
81
- medium: "text-base",
82
- large: "text-lg"
83
- }
84
- },
85
- defaultVariants: {
86
- labelSize: "medium"
87
- }
65
+ variants: { labelSize: {
66
+ small: "text-sm",
67
+ medium: "text-base",
68
+ large: "text-lg"
69
+ } },
70
+ defaultVariants: { labelSize: "medium" }
88
71
  });
89
72
  const radioButtonDirectiveThemeVariants = cva(`
90
73
  relative flex h-4.5 w-4.5 items-center justify-center place-content-center
@@ -112,505 +95,991 @@ const radioButtonDirectiveThemeVariants = cva(`
112
95
  data-[invalid='true']:focus-visible:border-error
113
96
  data-[invalid='true']:focus-visible:ring-error/35
114
97
  `, {
115
- variants: {
116
- rounded: {
117
- full: "rounded-full",
118
- large: "rounded-lg",
119
- medium: "rounded-md",
120
- none: "rounded-none",
121
- small: "rounded-sm"
122
- }
123
- },
124
- compoundVariants: [
125
- {
126
- rounded: "full",
127
- class: "checked:after:rounded-full"
128
- },
129
- {
130
- rounded: "large",
131
- class: "checked:after:rounded-lg"
132
- },
133
- {
134
- rounded: "medium",
135
- class: "checked:after:rounded-md"
136
- },
137
- {
138
- rounded: "none",
139
- class: "checked:after:rounded-none"
140
- },
141
- {
142
- rounded: "small",
143
- class: "checked:after:rounded-sm"
144
- }
145
- ]
98
+ variants: { rounded: {
99
+ full: "rounded-full",
100
+ large: "rounded-lg",
101
+ medium: "rounded-md",
102
+ none: "rounded-none",
103
+ small: "rounded-sm"
104
+ } },
105
+ compoundVariants: [
106
+ {
107
+ rounded: "full",
108
+ class: "checked:after:rounded-full"
109
+ },
110
+ {
111
+ rounded: "large",
112
+ class: "checked:after:rounded-lg"
113
+ },
114
+ {
115
+ rounded: "medium",
116
+ class: "checked:after:rounded-md"
117
+ },
118
+ {
119
+ rounded: "none",
120
+ class: "checked:after:rounded-none"
121
+ },
122
+ {
123
+ rounded: "small",
124
+ class: "checked:after:rounded-sm"
125
+ }
126
+ ]
146
127
  });
147
-
148
- /**
149
- * Provided by `mona-radio-group` to the radio buttons inside it.
150
- */
151
128
  const MONA_RADIO_GROUP = new InjectionToken("MONA_RADIO_GROUP");
152
-
153
- class RadioButtonComponent {
154
- #group;
155
- #label;
156
- constructor() {
157
- this.#group = inject(MONA_RADIO_GROUP, { optional: true });
158
- this.#label = injectLabelAssociation({
159
- ariaLabel: () => this.ariaLabel(),
160
- ariaLabelledBy: () => this.ariaLabelledBy(),
161
- wrapped: false
162
- });
163
- this.containerLabelClasses = computed(() => {
164
- const labelSize = this.labelSize();
165
- const userClasses = this.userClass();
166
- const variantClasses = radioButtonContainerLabelThemeVariants({ labelSize });
167
- return twMerge(variantClasses, userClasses);
168
- }, /* @ts-ignore */
169
- ...(ngDevMode ? [{ debugName: "containerLabelClasses" }] : /* istanbul ignore next */ []));
170
- this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled() || (this.#group?.disabled() ?? false));
171
- this.effectiveName = computed(() => this.#group?.name() ?? this.name(), /* @ts-ignore */
172
- ...(ngDevMode ? [{ debugName: "effectiveName" }] : /* istanbul ignore next */ []));
173
- this.effectiveReadonly = computed(() => this.readonly() || (this.#group?.readonly() ?? false), /* @ts-ignore */
174
- ...(ngDevMode ? [{ debugName: "effectiveReadonly" }] : /* istanbul ignore next */ []));
175
- this.effectiveRequired = computed(() => this.required() || (this.#group?.required() ?? false), /* @ts-ignore */
176
- ...(ngDevMode ? [{ debugName: "effectiveRequired" }] : /* istanbul ignore next */ []));
177
- this.inputInvalid = computed(() => !this.#group && this.touched() && this.invalid(), /* @ts-ignore */
178
- ...(ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []));
179
- this.inputRef = viewChild.required("input", /* @ts-ignore */
180
- ...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
181
- // Inside a group the group carries aria-invalid, and the radios only paint it.
182
- this.invalidState = computed(() => this.#group?.invalid() ?? (this.touched() && this.invalid()), /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
184
- this.labelledBy = this.#label.labelledBy;
185
- // Only a primitive means anything to a native form. An object is still compared and written through the model.
186
- this.nativeValue = computed(() => {
187
- const radioValue = this.radioValue();
188
- return typeof radioValue === "object" ? null : radioValue;
189
- }, /* @ts-ignore */
190
- ...(ngDevMode ? [{ debugName: "nativeValue" }] : /* istanbul ignore next */ []));
191
- this.radioButtonCircleClasses = computed(() => {
192
- const rounded = this.rounded();
193
- return radioButtonCircleThemeVariants({ rounded });
194
- }, /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "radioButtonCircleClasses" }] : /* istanbul ignore next */ []));
196
- this.radioButtonClasses = computed(() => radioButtonThemeVariants(), /* @ts-ignore */
197
- ...(ngDevMode ? [{ debugName: "radioButtonClasses" }] : /* istanbul ignore next */ []));
198
- this.radioButtonIndicatorClasses = computed(() => {
199
- const rounded = this.rounded();
200
- return radioButtonIndicatorThemeVariants({ rounded });
201
- }, /* @ts-ignore */
202
- ...(ngDevMode ? [{ debugName: "radioButtonIndicatorClasses" }] : /* istanbul ignore next */ []));
203
- this.selected = computed(() => {
204
- const radioValue = this.radioValue();
205
- return radioValue !== undefined && radioValue === (this.#group ? this.#group.value() : this.value());
206
- }, /* @ts-ignore */
207
- ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
208
- /**
209
- * @description Id of an element that describes the radio button, such as an error message.
210
- * @default ""
211
- */
212
- this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
213
- /**
214
- * @description Accessible name of the radio button when it has no visible label.
215
- * @default ""
216
- */
217
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
218
- /**
219
- * @description Id of the element that labels the radio button.
220
- * @default ""
221
- */
222
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
223
- /**
224
- * @description Sets the disabled state of the radio button.
225
- * @default false
226
- */
227
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
228
- /**
229
- * @description Emits when the input loses focus.
230
- */
231
- this.inputBlur = output();
232
- /**
233
- * @description Emits when the input is clicked.
234
- */
235
- this.inputClick = output();
236
- /**
237
- * @description Emits when the input receives focus.
238
- */
239
- this.inputFocus = output();
240
- /**
241
- * @description Id of the native radio input. Point a `<label for>` at it to label the radio button from outside.
242
- * A unique id is generated when it isn't set.
243
- * @default generated
244
- */
245
- this.inputId = input(createElementControlId(), /* @ts-ignore */
246
- ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
247
- /**
248
- * @description Marks the radio button as invalid. When bound to a signal form field via `[formField]`, this is
249
- * written by the `FormField` directive.
250
- * @default false
251
- */
252
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
253
- /**
254
- * @description Text label displayed alongside the radio button.
255
- * When provided, takes precedence over projected content.
256
- * When empty, projected content inside `<mona-radio-button>` is used.
257
- * When both are absent, name the radio button with `aria-label` or `aria-labelledby`.
258
- * @default ""
259
- */
260
- this.label = input("", /* @ts-ignore */
261
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
262
- /**
263
- * @description Position of the label relative to the radio button circle.
264
- * @default "after"
265
- */
266
- this.labelPosition = input("after", /* @ts-ignore */
267
- ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
268
- /**
269
- * @description Font size applied to the label text.
270
- * @default "medium"
271
- */
272
- this.labelSize = input("medium", /* @ts-ignore */
273
- ...(ngDevMode ? [{ debugName: "labelSize" }] : /* istanbul ignore next */ []));
274
- /**
275
- * @description HTML `name` attribute forwarded to the native input.
276
- * Radio buttons that share the same `name` form a mutually exclusive group in the browser.
277
- * @default ""
278
- */
279
- this.name = input("", /* @ts-ignore */
280
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
281
- /**
282
- * @description The identity value of this radio button within a group.
283
- * Compared against `value()` to determine whether this button is selected.
284
- * When this button is chosen, its `radioValue` is written to the form as the new group value.
285
- * A radio button without one can't be selected.
286
- * @default undefined
287
- */
288
- this.radioValue = input(undefined, /* @ts-ignore */
289
- ...(ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []));
290
- /**
291
- * @description Prevents value changes while the control stays focusable and readable. When bound to a signal form
292
- * field via `[formField]`, this is written by the `FormField` directive.
293
- * @default false
294
- */
295
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
296
- /**
297
- * @description Marks the radio button as required, as the native `required` attribute. When bound to a signal form
298
- * field via `[formField]`, this is written by the `FormField` directive.
299
- * @default false
300
- */
301
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
302
- /**
303
- * @description Sets the border radius of the radio button circle and indicator.
304
- * @default "full"
305
- */
306
- this.rounded = input("full", /* @ts-ignore */
307
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
308
- /**
309
- * @description Emits when the radio button loses focus or is selected.
310
- */
311
- this.touch = output();
312
- /**
313
- * @description Marks the radio button as touched. Error styling requires both `invalid` and `touched` to be `true`.
314
- * When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
315
- * @default false
316
- */
317
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
318
- /**
319
- * @description Additional CSS classes merged onto the label container element via `tailwind-merge`.
320
- * @default ""
321
- */
322
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
323
- /**
324
- * @description The currently selected value of a group of radio buttons that aren't in a `mona-radio-group`. When
325
- * bound to a signal form field via `[formField]`, the `FormField` directive keeps it in sync.
326
- * @default undefined
327
- */
328
- this.value = model(undefined, /* @ts-ignore */
329
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
330
- const group = this.#group;
331
- if (group) {
332
- afterRenderEffect({
333
- write: () => {
334
- group.selectionVersion();
335
- this.inputRef().nativeElement.checked = this.selected();
336
- }
337
- });
338
- }
339
- }
340
- /**
341
- * Selects the radio button when a label pointing at it through `[for]` is clicked.
342
- * @internal
343
- */
344
- activateFromLabel() {
345
- const input = this.inputRef().nativeElement;
346
- input.focus();
347
- input.click();
348
- }
349
- /**
350
- * @description Moves focus to the native radio input.
351
- * @param options Options passed to the native `focus()` call, such as `preventScroll`.
352
- */
353
- focus(options) {
354
- this.inputRef().nativeElement.focus(options);
355
- }
356
- /**
357
- * @internal
358
- */
359
- setLabelledBy(id) {
360
- this.#label.setLabelledBy(id);
361
- }
362
- onBlur(event) {
363
- this.inputBlur.emit(event);
364
- this.touch.emit();
365
- }
366
- onInputClick(event) {
367
- // Canceling the click makes the browser restore the previously checked radio.
368
- if (this.effectiveReadonly()) {
369
- event.preventDefault();
370
- }
371
- this.inputClick.emit(event);
372
- }
373
- onSelectionChange() {
374
- if (this.#group) {
375
- this.#group.select(this.radioValue());
376
- return;
377
- }
378
- this.value.set(this.radioValue());
379
- this.touch.emit();
380
- }
381
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
382
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: RadioButtonComponent, isStandalone: true, selector: "mona-radio-button", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelSize: { classPropertyName: "labelSize", publicName: "labelSize", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, radioValue: { classPropertyName: "radioValue", publicName: "radioValue", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputBlur: "inputBlur", inputClick: "inputClick", inputFocus: "inputFocus", touch: "touch", value: "valueChange" }, host: { properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.data-readonly": "effectiveReadonly() || null", "attr.data-selected": "selected()", "attr.data-disabled": "effectiveDisabled()" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
383
- }
384
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioButtonComponent, decorators: [{
385
- type: Component,
386
- args: [{ selector: "mona-radio-button", imports: [FormsModule, NgTemplateOutlet], host: {
387
- // The ARIA inputs below are applied to the native input, so the host must not keep the static attributes.
388
- "[attr.aria-describedby]": "null",
389
- "[attr.aria-label]": "null",
390
- "[attr.aria-labelledby]": "null",
391
- "[attr.data-readonly]": "effectiveReadonly() || null",
392
- "[attr.data-selected]": "selected()",
393
- "[attr.data-disabled]": "effectiveDisabled()"
394
- }, template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n" }]
395
- }], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ["input", { isSignal: true }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputClick: [{ type: i0.Output, args: ["inputClick"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSize", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], radioValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "radioValue", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
396
-
397
- class RadioGroupComponent {
398
- #generatedName;
399
- #hostElementRef;
400
- #label;
401
- #selectionVersion;
402
- constructor() {
403
- this.#generatedName = createElementControlId();
404
- this.#hostElementRef = inject(ElementRef);
405
- this.#label = injectLabelAssociation({
406
- activate: () => this.focus(),
407
- ariaLabel: () => this.ariaLabel(),
408
- ariaLabelledBy: () => this.ariaLabelledBy()
409
- });
410
- this.#selectionVersion = signal(0, /* @ts-ignore */
411
- ...(ngDevMode ? [{ debugName: "#selectionVersion" }] : /* istanbul ignore next */ []));
412
- this.classes = computed(() => twMerge(radioGroupThemeVariants({ orientation: this.orientation() }), this.userClass()), /* @ts-ignore */
413
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
414
- this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
415
- this.invalidState = computed(() => this.touched() && this.invalid(), /* @ts-ignore */
416
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
417
- this.labelledBy = this.#label.labelledBy;
418
- /**
419
- * @description Id of an element that describes the group, such as an error message.
420
- * @default ""
421
- */
422
- this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
423
- /**
424
- * @description Accessible name of the group. A group needs a name from this, `aria-labelledby` or a `mona-label`.
425
- * @default ""
426
- */
427
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
428
- /**
429
- * @description Id of the element that labels the group.
430
- * @default ""
431
- */
432
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
433
- /**
434
- * @internal
435
- */
436
- this.context = {
437
- disabled: this.effectiveDisabled,
438
- invalid: this.invalidState,
439
- name: computed(() => this.name() || this.#generatedName),
440
- readonly: computed(() => this.readonly()),
441
- required: computed(() => this.required()),
442
- select: value => this.#select(value),
443
- selectionVersion: this.#selectionVersion,
444
- value: computed(() => this.value())
445
- };
446
- /**
447
- * @description Disables every radio button in the group. When bound to a signal form field via `[formField]`, this
448
- * is written by the `FormField` directive.
449
- * @default false
450
- */
451
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
452
- /**
453
- * @description Marks the group as invalid. It shows once `touched` is also true. When bound to a signal form field
454
- * via `[formField]`, this is written by the `FormField` directive.
455
- * @default false
456
- */
457
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
458
- /**
459
- * @description The native `name` shared by the radio buttons in the group. A unique name is generated when it isn't
460
- * set. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
461
- * @default ""
462
- */
463
- this.name = input("", /* @ts-ignore */
464
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
465
- /**
466
- * @description The direction the radio buttons are laid out and announced in.
467
- * @default "vertical"
468
- */
469
- this.orientation = input("vertical", /* @ts-ignore */
470
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
471
- /**
472
- * @description Prevents value changes while the radio buttons stay focusable and readable. When bound to a signal
473
- * form field via `[formField]`, this is written by the `FormField` directive.
474
- * @default false
475
- */
476
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
477
- /**
478
- * @description Marks the group as required. When bound to a signal form field via `[formField]`, this is written by
479
- * the `FormField` directive.
480
- * @default false
481
- */
482
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
483
- /**
484
- * @description Emits when a radio button is selected and when focus leaves the group.
485
- */
486
- this.touch = output();
487
- /**
488
- * @description Marks the group as touched. Error styling needs both `invalid` and `touched`. When bound to a signal
489
- * form field via `[formField]`, this is written by the `FormField` directive.
490
- * @default false
491
- */
492
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
493
- /**
494
- * @description Additional CSS classes merged onto the group via `tailwind-merge`.
495
- * @default ""
496
- */
497
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
498
- /**
499
- * @description The `radioValue` of the selected radio button.
500
- * @default undefined
501
- */
502
- this.value = model(undefined, /* @ts-ignore */
503
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
504
- afterNextRender(() => {
505
- if (isDevMode() && !this.labelledBy() && !this.ariaLabel()) {
506
- console.warn("[Mona Radio Group] A radio group needs an accessible name. Set aria-label, aria-labelledby or " +
507
- "use a mona-label.", this.#hostElementRef.nativeElement);
508
- }
509
- });
510
- }
511
- /**
512
- * @description Moves focus to the selected radio button, or the first enabled one.
513
- * @param options Options passed to the native `focus()` call, such as `preventScroll`.
514
- */
515
- focus(options) {
516
- const host = this.#hostElementRef.nativeElement;
517
- const target = host.querySelector("input[type='radio']:checked:not(:disabled)") ??
518
- host.querySelector("input[type='radio']:not(:disabled)");
519
- target?.focus(options);
520
- }
521
- /**
522
- * @internal
523
- */
524
- setLabelledBy(id) {
525
- this.#label.setLabelledBy(id);
526
- }
527
- #select(value) {
528
- this.value.set(value);
529
- this.#selectionVersion.update(version => version + 1);
530
- this.touch.emit();
531
- }
532
- onFocusOut(event) {
533
- const nextTarget = event.relatedTarget;
534
- if (nextTarget instanceof Node && this.#hostElementRef.nativeElement.contains(nextTarget)) {
535
- return;
536
- }
537
- this.touch.emit();
538
- }
539
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
540
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: RadioGroupComponent, isStandalone: true, selector: "mona-radio-group", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "attr.aria-describedby": "ariaDescribedBy() || null", "attr.aria-disabled": "effectiveDisabled() || null", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "labelledBy()", "attr.aria-orientation": "orientation()", "attr.aria-readonly": "readonly() || null", "attr.aria-required": "required() || null", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-readonly": "readonly() || null", "class": "classes()" } }, providers: [{ provide: MONA_RADIO_GROUP, useFactory: () => inject(RadioGroupComponent).context }], ngImport: i0, template: `<ng-content />`, isInline: true }); }
541
- }
542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioGroupComponent, decorators: [{
543
- type: Component,
544
- args: [{
545
- selector: "mona-radio-group",
546
- template: `<ng-content />`,
547
- providers: [{ provide: MONA_RADIO_GROUP, useFactory: () => inject(RadioGroupComponent).context }],
548
- host: {
549
- role: "radiogroup",
550
- "[attr.aria-describedby]": "ariaDescribedBy() || null",
551
- "[attr.aria-disabled]": "effectiveDisabled() || null",
552
- "[attr.aria-invalid]": "invalidState() ? 'true' : null",
553
- "[attr.aria-label]": "ariaLabel() || null",
554
- "[attr.aria-labelledby]": "labelledBy()",
555
- "[attr.aria-orientation]": "orientation()",
556
- "[attr.aria-readonly]": "readonly() || null",
557
- "[attr.aria-required]": "required() || null",
558
- "[attr.data-disabled]": "effectiveDisabled() || null",
559
- "[attr.data-readonly]": "readonly() || null",
560
- "[class]": "classes()",
561
- "(focusout)": "onFocusOut($event)"
562
- }
563
- }]
564
- }], ctorParameters: () => [], propDecorators: { ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
565
-
566
- class RadioButtonDirective {
567
- constructor() {
568
- this.classes = computed(() => {
569
- const rounded = this.rounded();
570
- return radioButtonDirectiveThemeVariants({ rounded });
571
- }, /* @ts-ignore */
572
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
573
- this.inputInvalid = computed(() => this.touched() && this.invalid(), /* @ts-ignore */
574
- ...(ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []));
575
- /**
576
- * @description Marks the radio button as invalid, triggering error border and ring styling.
577
- * @default false
578
- */
579
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
580
- /**
581
- * @description Sets the border radius of the radio button.
582
- * @default "full"
583
- */
584
- this.rounded = input("full", /* @ts-ignore */
585
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
586
- /**
587
- * @description Marks the radio button as touched. Error styling is only shown when both `invalid` and `touched` are `true`.
588
- * @default false
589
- */
590
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
591
- }
592
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
593
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: RadioButtonDirective, isStandalone: true, selector: "input[type='radio'][monaRadioButton]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-invalid": "inputInvalid() || null", "attr.data-invalid": "inputInvalid() || null", "class": "classes()" } }, ngImport: i0 }); }
594
- }
595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioButtonDirective, decorators: [{
596
- type: Directive,
597
- args: [{
598
- selector: "input[type='radio'][monaRadioButton]",
599
- host: {
600
- "[attr.aria-invalid]": "inputInvalid() || null",
601
- "[attr.data-invalid]": "inputInvalid() || null",
602
- "[class]": "classes()"
603
- }
604
- }]
605
- }], propDecorators: { invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }] } });
606
-
607
- /*
608
- * Public API Surface of @nanahoshi/mona-ui/radio-button
609
- */
610
-
611
- /**
612
- * Generated bundle index. Do not edit.
613
- */
614
-
129
+ var RadioButtonComponent = class RadioButtonComponent {
130
+ #group;
131
+ #label;
132
+ constructor() {
133
+ this.#group = inject(MONA_RADIO_GROUP, { optional: true });
134
+ this.#label = injectLabelAssociation({
135
+ ariaLabel: () => this.ariaLabel(),
136
+ ariaLabelledBy: () => this.ariaLabelledBy(),
137
+ wrapped: false
138
+ });
139
+ this.containerLabelClasses = computed(() => {
140
+ const labelSize = this.labelSize();
141
+ const userClasses = this.userClass();
142
+ const variantClasses = radioButtonContainerLabelThemeVariants({ labelSize });
143
+ return twMerge(variantClasses, userClasses);
144
+ }, ...ngDevMode ? [{ debugName: "containerLabelClasses" }] : /* istanbul ignore next */ []);
145
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled() || (this.#group?.disabled() ?? false));
146
+ this.effectiveName = computed(() => this.#group?.name() ?? this.name(), ...ngDevMode ? [{ debugName: "effectiveName" }] : /* istanbul ignore next */ []);
147
+ this.effectiveReadonly = computed(() => this.readonly() || (this.#group?.readonly() ?? false), ...ngDevMode ? [{ debugName: "effectiveReadonly" }] : /* istanbul ignore next */ []);
148
+ this.effectiveRequired = computed(() => this.required() || (this.#group?.required() ?? false), ...ngDevMode ? [{ debugName: "effectiveRequired" }] : /* istanbul ignore next */ []);
149
+ this.inputInvalid = computed(() => !this.#group && this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []);
150
+ this.inputRef = viewChild.required("input", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
151
+ this.invalidState = computed(() => this.#group?.invalid() ?? (this.touched() && this.invalid()), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
152
+ this.labelledBy = this.#label.labelledBy;
153
+ this.nativeValue = computed(() => {
154
+ const radioValue = this.radioValue();
155
+ return typeof radioValue === "object" ? null : radioValue;
156
+ }, ...ngDevMode ? [{ debugName: "nativeValue" }] : /* istanbul ignore next */ []);
157
+ this.radioButtonCircleClasses = computed(() => {
158
+ const rounded = this.rounded();
159
+ return radioButtonCircleThemeVariants({ rounded });
160
+ }, ...ngDevMode ? [{ debugName: "radioButtonCircleClasses" }] : /* istanbul ignore next */ []);
161
+ this.radioButtonClasses = computed(() => radioButtonThemeVariants(), ...ngDevMode ? [{ debugName: "radioButtonClasses" }] : /* istanbul ignore next */ []);
162
+ this.radioButtonIndicatorClasses = computed(() => {
163
+ const rounded = this.rounded();
164
+ return radioButtonIndicatorThemeVariants({ rounded });
165
+ }, ...ngDevMode ? [{ debugName: "radioButtonIndicatorClasses" }] : /* istanbul ignore next */ []);
166
+ this.selected = computed(() => {
167
+ const radioValue = this.radioValue();
168
+ return radioValue !== void 0 && radioValue === (this.#group ? this.#group.value() : this.value());
169
+ }, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
170
+ this.ariaDescribedBy = input("", {
171
+ ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
172
+ alias: "aria-describedby"
173
+ });
174
+ this.ariaLabel = input("", {
175
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
176
+ alias: "aria-label"
177
+ });
178
+ this.ariaLabelledBy = input("", {
179
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
180
+ alias: "aria-labelledby"
181
+ });
182
+ this.disabled = input(false, {
183
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
184
+ transform: booleanAttribute
185
+ });
186
+ this.inputBlur = output();
187
+ this.inputClick = output();
188
+ this.inputFocus = output();
189
+ this.inputId = input(createElementControlId(), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
190
+ this.invalid = input(false, {
191
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
192
+ transform: booleanAttribute
193
+ });
194
+ this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
195
+ this.labelPosition = input("after", ...ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []);
196
+ this.labelSize = input("medium", ...ngDevMode ? [{ debugName: "labelSize" }] : /* istanbul ignore next */ []);
197
+ this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
198
+ this.radioValue = input(void 0, ...ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []);
199
+ this.readonly = input(false, {
200
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
201
+ transform: booleanAttribute
202
+ });
203
+ this.required = input(false, {
204
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
205
+ transform: booleanAttribute
206
+ });
207
+ this.rounded = input("full", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
208
+ this.touch = output();
209
+ this.touched = input(false, {
210
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
211
+ transform: booleanAttribute
212
+ });
213
+ this.userClass = input("", {
214
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
215
+ alias: "class"
216
+ });
217
+ this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
218
+ const group = this.#group;
219
+ if (group) afterRenderEffect({ write: () => {
220
+ group.selectionVersion();
221
+ this.inputRef().nativeElement.checked = this.selected();
222
+ } });
223
+ }
224
+ activateFromLabel() {
225
+ const input = this.inputRef().nativeElement;
226
+ input.focus();
227
+ input.click();
228
+ }
229
+ focus(options) {
230
+ this.inputRef().nativeElement.focus(options);
231
+ }
232
+ setLabelledBy(id) {
233
+ this.#label.setLabelledBy(id);
234
+ }
235
+ onBlur(event) {
236
+ this.inputBlur.emit(event);
237
+ this.touch.emit();
238
+ }
239
+ onInputClick(event) {
240
+ if (this.effectiveReadonly()) event.preventDefault();
241
+ this.inputClick.emit(event);
242
+ }
243
+ onSelectionChange() {
244
+ if (this.#group) {
245
+ this.#group.select(this.radioValue());
246
+ return;
247
+ }
248
+ this.value.set(this.radioValue());
249
+ this.touch.emit();
250
+ }
251
+ static {
252
+ this.ɵfac = i0.ɵɵngDeclareFactory({
253
+ minVersion: "12.0.0",
254
+ version: "22.2.6",
255
+ ngImport: i0,
256
+ type: RadioButtonComponent,
257
+ deps: [],
258
+ target: i0.ɵɵFactoryTarget.Component
259
+ });
260
+ }
261
+ static {
262
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
263
+ minVersion: "17.0.0",
264
+ version: "22.2.6",
265
+ type: RadioButtonComponent,
266
+ isStandalone: true,
267
+ selector: "mona-radio-button",
268
+ inputs: {
269
+ ariaDescribedBy: {
270
+ classPropertyName: "ariaDescribedBy",
271
+ publicName: "aria-describedby",
272
+ isSignal: true,
273
+ isRequired: false,
274
+ transformFunction: null
275
+ },
276
+ ariaLabel: {
277
+ classPropertyName: "ariaLabel",
278
+ publicName: "aria-label",
279
+ isSignal: true,
280
+ isRequired: false,
281
+ transformFunction: null
282
+ },
283
+ ariaLabelledBy: {
284
+ classPropertyName: "ariaLabelledBy",
285
+ publicName: "aria-labelledby",
286
+ isSignal: true,
287
+ isRequired: false,
288
+ transformFunction: null
289
+ },
290
+ disabled: {
291
+ classPropertyName: "disabled",
292
+ publicName: "disabled",
293
+ isSignal: true,
294
+ isRequired: false,
295
+ transformFunction: null
296
+ },
297
+ inputId: {
298
+ classPropertyName: "inputId",
299
+ publicName: "inputId",
300
+ isSignal: true,
301
+ isRequired: false,
302
+ transformFunction: null
303
+ },
304
+ invalid: {
305
+ classPropertyName: "invalid",
306
+ publicName: "invalid",
307
+ isSignal: true,
308
+ isRequired: false,
309
+ transformFunction: null
310
+ },
311
+ label: {
312
+ classPropertyName: "label",
313
+ publicName: "label",
314
+ isSignal: true,
315
+ isRequired: false,
316
+ transformFunction: null
317
+ },
318
+ labelPosition: {
319
+ classPropertyName: "labelPosition",
320
+ publicName: "labelPosition",
321
+ isSignal: true,
322
+ isRequired: false,
323
+ transformFunction: null
324
+ },
325
+ labelSize: {
326
+ classPropertyName: "labelSize",
327
+ publicName: "labelSize",
328
+ isSignal: true,
329
+ isRequired: false,
330
+ transformFunction: null
331
+ },
332
+ name: {
333
+ classPropertyName: "name",
334
+ publicName: "name",
335
+ isSignal: true,
336
+ isRequired: false,
337
+ transformFunction: null
338
+ },
339
+ radioValue: {
340
+ classPropertyName: "radioValue",
341
+ publicName: "radioValue",
342
+ isSignal: true,
343
+ isRequired: false,
344
+ transformFunction: null
345
+ },
346
+ readonly: {
347
+ classPropertyName: "readonly",
348
+ publicName: "readonly",
349
+ isSignal: true,
350
+ isRequired: false,
351
+ transformFunction: null
352
+ },
353
+ required: {
354
+ classPropertyName: "required",
355
+ publicName: "required",
356
+ isSignal: true,
357
+ isRequired: false,
358
+ transformFunction: null
359
+ },
360
+ rounded: {
361
+ classPropertyName: "rounded",
362
+ publicName: "rounded",
363
+ isSignal: true,
364
+ isRequired: false,
365
+ transformFunction: null
366
+ },
367
+ touched: {
368
+ classPropertyName: "touched",
369
+ publicName: "touched",
370
+ isSignal: true,
371
+ isRequired: false,
372
+ transformFunction: null
373
+ },
374
+ userClass: {
375
+ classPropertyName: "userClass",
376
+ publicName: "class",
377
+ isSignal: true,
378
+ isRequired: false,
379
+ transformFunction: null
380
+ },
381
+ value: {
382
+ classPropertyName: "value",
383
+ publicName: "value",
384
+ isSignal: true,
385
+ isRequired: false,
386
+ transformFunction: null
387
+ }
388
+ },
389
+ outputs: {
390
+ inputBlur: "inputBlur",
391
+ inputClick: "inputClick",
392
+ inputFocus: "inputFocus",
393
+ touch: "touch",
394
+ value: "valueChange"
395
+ },
396
+ host: { properties: {
397
+ "attr.aria-describedby": "null",
398
+ "attr.aria-label": "null",
399
+ "attr.aria-labelledby": "null",
400
+ "attr.data-readonly": "effectiveReadonly() || null",
401
+ "attr.data-selected": "selected()",
402
+ "attr.data-disabled": "effectiveDisabled()"
403
+ } },
404
+ viewQueries: [{
405
+ propertyName: "inputRef",
406
+ first: true,
407
+ predicate: ["input"],
408
+ descendants: true,
409
+ isSignal: true
410
+ }],
411
+ ngImport: i0,
412
+ template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
413
+ dependencies: [{
414
+ kind: "ngmodule",
415
+ type: FormsModule
416
+ }, {
417
+ kind: "directive",
418
+ type: NgTemplateOutlet,
419
+ selector: "[ngTemplateOutlet]",
420
+ inputs: [
421
+ "ngTemplateOutletContext",
422
+ "ngTemplateOutlet",
423
+ "ngTemplateOutletInjector"
424
+ ]
425
+ }]
426
+ });
427
+ }
428
+ };
429
+ i0.ɵɵngDeclareClassMetadata({
430
+ minVersion: "12.0.0",
431
+ version: "22.2.6",
432
+ ngImport: i0,
433
+ type: RadioButtonComponent,
434
+ decorators: [{
435
+ type: Component,
436
+ args: [{
437
+ selector: "mona-radio-button",
438
+ imports: [FormsModule, NgTemplateOutlet],
439
+ host: {
440
+ "[attr.aria-describedby]": "null",
441
+ "[attr.aria-label]": "null",
442
+ "[attr.aria-labelledby]": "null",
443
+ "[attr.data-readonly]": "effectiveReadonly() || null",
444
+ "[attr.data-selected]": "selected()",
445
+ "[attr.data-disabled]": "effectiveDisabled()"
446
+ },
447
+ template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
448
+ }]
449
+ }],
450
+ ctorParameters: () => [],
451
+ propDecorators: {
452
+ inputRef: [{
453
+ type: i0.ViewChild,
454
+ args: ["input", { isSignal: true }]
455
+ }],
456
+ ariaDescribedBy: [{
457
+ type: i0.Input,
458
+ args: [{
459
+ isSignal: true,
460
+ alias: "aria-describedby",
461
+ required: false
462
+ }]
463
+ }],
464
+ ariaLabel: [{
465
+ type: i0.Input,
466
+ args: [{
467
+ isSignal: true,
468
+ alias: "aria-label",
469
+ required: false
470
+ }]
471
+ }],
472
+ ariaLabelledBy: [{
473
+ type: i0.Input,
474
+ args: [{
475
+ isSignal: true,
476
+ alias: "aria-labelledby",
477
+ required: false
478
+ }]
479
+ }],
480
+ disabled: [{
481
+ type: i0.Input,
482
+ args: [{
483
+ isSignal: true,
484
+ alias: "disabled",
485
+ required: false
486
+ }]
487
+ }],
488
+ inputBlur: [{
489
+ type: i0.Output,
490
+ args: ["inputBlur"]
491
+ }],
492
+ inputClick: [{
493
+ type: i0.Output,
494
+ args: ["inputClick"]
495
+ }],
496
+ inputFocus: [{
497
+ type: i0.Output,
498
+ args: ["inputFocus"]
499
+ }],
500
+ inputId: [{
501
+ type: i0.Input,
502
+ args: [{
503
+ isSignal: true,
504
+ alias: "inputId",
505
+ required: false
506
+ }]
507
+ }],
508
+ invalid: [{
509
+ type: i0.Input,
510
+ args: [{
511
+ isSignal: true,
512
+ alias: "invalid",
513
+ required: false
514
+ }]
515
+ }],
516
+ label: [{
517
+ type: i0.Input,
518
+ args: [{
519
+ isSignal: true,
520
+ alias: "label",
521
+ required: false
522
+ }]
523
+ }],
524
+ labelPosition: [{
525
+ type: i0.Input,
526
+ args: [{
527
+ isSignal: true,
528
+ alias: "labelPosition",
529
+ required: false
530
+ }]
531
+ }],
532
+ labelSize: [{
533
+ type: i0.Input,
534
+ args: [{
535
+ isSignal: true,
536
+ alias: "labelSize",
537
+ required: false
538
+ }]
539
+ }],
540
+ name: [{
541
+ type: i0.Input,
542
+ args: [{
543
+ isSignal: true,
544
+ alias: "name",
545
+ required: false
546
+ }]
547
+ }],
548
+ radioValue: [{
549
+ type: i0.Input,
550
+ args: [{
551
+ isSignal: true,
552
+ alias: "radioValue",
553
+ required: false
554
+ }]
555
+ }],
556
+ readonly: [{
557
+ type: i0.Input,
558
+ args: [{
559
+ isSignal: true,
560
+ alias: "readonly",
561
+ required: false
562
+ }]
563
+ }],
564
+ required: [{
565
+ type: i0.Input,
566
+ args: [{
567
+ isSignal: true,
568
+ alias: "required",
569
+ required: false
570
+ }]
571
+ }],
572
+ rounded: [{
573
+ type: i0.Input,
574
+ args: [{
575
+ isSignal: true,
576
+ alias: "rounded",
577
+ required: false
578
+ }]
579
+ }],
580
+ touch: [{
581
+ type: i0.Output,
582
+ args: ["touch"]
583
+ }],
584
+ touched: [{
585
+ type: i0.Input,
586
+ args: [{
587
+ isSignal: true,
588
+ alias: "touched",
589
+ required: false
590
+ }]
591
+ }],
592
+ userClass: [{
593
+ type: i0.Input,
594
+ args: [{
595
+ isSignal: true,
596
+ alias: "class",
597
+ required: false
598
+ }]
599
+ }],
600
+ value: [{
601
+ type: i0.Input,
602
+ args: [{
603
+ isSignal: true,
604
+ alias: "value",
605
+ required: false
606
+ }]
607
+ }, {
608
+ type: i0.Output,
609
+ args: ["valueChange"]
610
+ }]
611
+ }
612
+ });
613
+ var RadioGroupComponent = class RadioGroupComponent {
614
+ #generatedName;
615
+ #hostElementRef;
616
+ #label;
617
+ #selectionVersion;
618
+ constructor() {
619
+ this.#generatedName = createElementControlId();
620
+ this.#hostElementRef = inject(ElementRef);
621
+ this.#label = injectLabelAssociation({
622
+ activate: () => this.focus(),
623
+ ariaLabel: () => this.ariaLabel(),
624
+ ariaLabelledBy: () => this.ariaLabelledBy()
625
+ });
626
+ this.#selectionVersion = signal(0, ...ngDevMode ? [{ debugName: "#selectionVersion" }] : /* istanbul ignore next */ []);
627
+ this.classes = computed(() => twMerge(radioGroupThemeVariants({ orientation: this.orientation() }), this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
628
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
629
+ this.invalidState = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
630
+ this.labelledBy = this.#label.labelledBy;
631
+ this.ariaDescribedBy = input("", {
632
+ ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
633
+ alias: "aria-describedby"
634
+ });
635
+ this.ariaLabel = input("", {
636
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
637
+ alias: "aria-label"
638
+ });
639
+ this.ariaLabelledBy = input("", {
640
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
641
+ alias: "aria-labelledby"
642
+ });
643
+ this.context = {
644
+ disabled: this.effectiveDisabled,
645
+ invalid: this.invalidState,
646
+ name: computed(() => this.name() || this.#generatedName),
647
+ readonly: computed(() => this.readonly()),
648
+ required: computed(() => this.required()),
649
+ select: (value) => this.#select(value),
650
+ selectionVersion: this.#selectionVersion,
651
+ value: computed(() => this.value())
652
+ };
653
+ this.disabled = input(false, {
654
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
655
+ transform: booleanAttribute
656
+ });
657
+ this.invalid = input(false, {
658
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
659
+ transform: booleanAttribute
660
+ });
661
+ this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
662
+ this.orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
663
+ this.readonly = input(false, {
664
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
665
+ transform: booleanAttribute
666
+ });
667
+ this.required = input(false, {
668
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
669
+ transform: booleanAttribute
670
+ });
671
+ this.touch = output();
672
+ this.touched = input(false, {
673
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
674
+ transform: booleanAttribute
675
+ });
676
+ this.userClass = input("", {
677
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
678
+ alias: "class"
679
+ });
680
+ this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
681
+ afterNextRender(() => {
682
+ if (isDevMode() && !this.labelledBy() && !this.ariaLabel()) console.warn("[Mona Radio Group] A radio group needs an accessible name. Set aria-label, aria-labelledby or use a mona-label.", this.#hostElementRef.nativeElement);
683
+ });
684
+ }
685
+ focus(options) {
686
+ const host = this.#hostElementRef.nativeElement;
687
+ (host.querySelector("input[type='radio']:checked:not(:disabled)") ?? host.querySelector("input[type='radio']:not(:disabled)"))?.focus(options);
688
+ }
689
+ setLabelledBy(id) {
690
+ this.#label.setLabelledBy(id);
691
+ }
692
+ #select(value) {
693
+ this.value.set(value);
694
+ this.#selectionVersion.update((version) => version + 1);
695
+ this.touch.emit();
696
+ }
697
+ onFocusOut(event) {
698
+ const nextTarget = event.relatedTarget;
699
+ if (nextTarget instanceof Node && this.#hostElementRef.nativeElement.contains(nextTarget)) return;
700
+ this.touch.emit();
701
+ }
702
+ static {
703
+ this.ɵfac = i0.ɵɵngDeclareFactory({
704
+ minVersion: "12.0.0",
705
+ version: "22.2.6",
706
+ ngImport: i0,
707
+ type: RadioGroupComponent,
708
+ deps: [],
709
+ target: i0.ɵɵFactoryTarget.Component
710
+ });
711
+ }
712
+ static {
713
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
714
+ minVersion: "17.1.0",
715
+ version: "22.2.6",
716
+ type: RadioGroupComponent,
717
+ isStandalone: true,
718
+ selector: "mona-radio-group",
719
+ inputs: {
720
+ ariaDescribedBy: {
721
+ classPropertyName: "ariaDescribedBy",
722
+ publicName: "aria-describedby",
723
+ isSignal: true,
724
+ isRequired: false,
725
+ transformFunction: null
726
+ },
727
+ ariaLabel: {
728
+ classPropertyName: "ariaLabel",
729
+ publicName: "aria-label",
730
+ isSignal: true,
731
+ isRequired: false,
732
+ transformFunction: null
733
+ },
734
+ ariaLabelledBy: {
735
+ classPropertyName: "ariaLabelledBy",
736
+ publicName: "aria-labelledby",
737
+ isSignal: true,
738
+ isRequired: false,
739
+ transformFunction: null
740
+ },
741
+ disabled: {
742
+ classPropertyName: "disabled",
743
+ publicName: "disabled",
744
+ isSignal: true,
745
+ isRequired: false,
746
+ transformFunction: null
747
+ },
748
+ invalid: {
749
+ classPropertyName: "invalid",
750
+ publicName: "invalid",
751
+ isSignal: true,
752
+ isRequired: false,
753
+ transformFunction: null
754
+ },
755
+ name: {
756
+ classPropertyName: "name",
757
+ publicName: "name",
758
+ isSignal: true,
759
+ isRequired: false,
760
+ transformFunction: null
761
+ },
762
+ orientation: {
763
+ classPropertyName: "orientation",
764
+ publicName: "orientation",
765
+ isSignal: true,
766
+ isRequired: false,
767
+ transformFunction: null
768
+ },
769
+ readonly: {
770
+ classPropertyName: "readonly",
771
+ publicName: "readonly",
772
+ isSignal: true,
773
+ isRequired: false,
774
+ transformFunction: null
775
+ },
776
+ required: {
777
+ classPropertyName: "required",
778
+ publicName: "required",
779
+ isSignal: true,
780
+ isRequired: false,
781
+ transformFunction: null
782
+ },
783
+ touched: {
784
+ classPropertyName: "touched",
785
+ publicName: "touched",
786
+ isSignal: true,
787
+ isRequired: false,
788
+ transformFunction: null
789
+ },
790
+ userClass: {
791
+ classPropertyName: "userClass",
792
+ publicName: "class",
793
+ isSignal: true,
794
+ isRequired: false,
795
+ transformFunction: null
796
+ },
797
+ value: {
798
+ classPropertyName: "value",
799
+ publicName: "value",
800
+ isSignal: true,
801
+ isRequired: false,
802
+ transformFunction: null
803
+ }
804
+ },
805
+ outputs: {
806
+ touch: "touch",
807
+ value: "valueChange"
808
+ },
809
+ host: {
810
+ attributes: { "role": "radiogroup" },
811
+ listeners: { "focusout": "onFocusOut($event)" },
812
+ properties: {
813
+ "attr.aria-describedby": "ariaDescribedBy() || null",
814
+ "attr.aria-disabled": "effectiveDisabled() || null",
815
+ "attr.aria-invalid": "invalidState() ? 'true' : null",
816
+ "attr.aria-label": "ariaLabel() || null",
817
+ "attr.aria-labelledby": "labelledBy()",
818
+ "attr.aria-orientation": "orientation()",
819
+ "attr.aria-readonly": "readonly() || null",
820
+ "attr.aria-required": "required() || null",
821
+ "attr.data-disabled": "effectiveDisabled() || null",
822
+ "attr.data-readonly": "readonly() || null",
823
+ "class": "classes()"
824
+ }
825
+ },
826
+ providers: [{
827
+ provide: MONA_RADIO_GROUP,
828
+ useFactory: () => inject(RadioGroupComponent).context
829
+ }],
830
+ ngImport: i0,
831
+ template: `<ng-content />`,
832
+ isInline: true
833
+ });
834
+ }
835
+ };
836
+ i0.ɵɵngDeclareClassMetadata({
837
+ minVersion: "12.0.0",
838
+ version: "22.2.6",
839
+ ngImport: i0,
840
+ type: RadioGroupComponent,
841
+ decorators: [{
842
+ type: Component,
843
+ args: [{
844
+ selector: "mona-radio-group",
845
+ template: `<ng-content />`,
846
+ providers: [{
847
+ provide: MONA_RADIO_GROUP,
848
+ useFactory: () => inject(RadioGroupComponent).context
849
+ }],
850
+ host: {
851
+ role: "radiogroup",
852
+ "[attr.aria-describedby]": "ariaDescribedBy() || null",
853
+ "[attr.aria-disabled]": "effectiveDisabled() || null",
854
+ "[attr.aria-invalid]": "invalidState() ? 'true' : null",
855
+ "[attr.aria-label]": "ariaLabel() || null",
856
+ "[attr.aria-labelledby]": "labelledBy()",
857
+ "[attr.aria-orientation]": "orientation()",
858
+ "[attr.aria-readonly]": "readonly() || null",
859
+ "[attr.aria-required]": "required() || null",
860
+ "[attr.data-disabled]": "effectiveDisabled() || null",
861
+ "[attr.data-readonly]": "readonly() || null",
862
+ "[class]": "classes()",
863
+ "(focusout)": "onFocusOut($event)"
864
+ }
865
+ }]
866
+ }],
867
+ ctorParameters: () => [],
868
+ propDecorators: {
869
+ ariaDescribedBy: [{
870
+ type: i0.Input,
871
+ args: [{
872
+ isSignal: true,
873
+ alias: "aria-describedby",
874
+ required: false
875
+ }]
876
+ }],
877
+ ariaLabel: [{
878
+ type: i0.Input,
879
+ args: [{
880
+ isSignal: true,
881
+ alias: "aria-label",
882
+ required: false
883
+ }]
884
+ }],
885
+ ariaLabelledBy: [{
886
+ type: i0.Input,
887
+ args: [{
888
+ isSignal: true,
889
+ alias: "aria-labelledby",
890
+ required: false
891
+ }]
892
+ }],
893
+ disabled: [{
894
+ type: i0.Input,
895
+ args: [{
896
+ isSignal: true,
897
+ alias: "disabled",
898
+ required: false
899
+ }]
900
+ }],
901
+ invalid: [{
902
+ type: i0.Input,
903
+ args: [{
904
+ isSignal: true,
905
+ alias: "invalid",
906
+ required: false
907
+ }]
908
+ }],
909
+ name: [{
910
+ type: i0.Input,
911
+ args: [{
912
+ isSignal: true,
913
+ alias: "name",
914
+ required: false
915
+ }]
916
+ }],
917
+ orientation: [{
918
+ type: i0.Input,
919
+ args: [{
920
+ isSignal: true,
921
+ alias: "orientation",
922
+ required: false
923
+ }]
924
+ }],
925
+ readonly: [{
926
+ type: i0.Input,
927
+ args: [{
928
+ isSignal: true,
929
+ alias: "readonly",
930
+ required: false
931
+ }]
932
+ }],
933
+ required: [{
934
+ type: i0.Input,
935
+ args: [{
936
+ isSignal: true,
937
+ alias: "required",
938
+ required: false
939
+ }]
940
+ }],
941
+ touch: [{
942
+ type: i0.Output,
943
+ args: ["touch"]
944
+ }],
945
+ touched: [{
946
+ type: i0.Input,
947
+ args: [{
948
+ isSignal: true,
949
+ alias: "touched",
950
+ required: false
951
+ }]
952
+ }],
953
+ userClass: [{
954
+ type: i0.Input,
955
+ args: [{
956
+ isSignal: true,
957
+ alias: "class",
958
+ required: false
959
+ }]
960
+ }],
961
+ value: [{
962
+ type: i0.Input,
963
+ args: [{
964
+ isSignal: true,
965
+ alias: "value",
966
+ required: false
967
+ }]
968
+ }, {
969
+ type: i0.Output,
970
+ args: ["valueChange"]
971
+ }]
972
+ }
973
+ });
974
+ var RadioButtonDirective = class RadioButtonDirective {
975
+ constructor() {
976
+ this.classes = computed(() => {
977
+ const rounded = this.rounded();
978
+ return radioButtonDirectiveThemeVariants({ rounded });
979
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
980
+ this.inputInvalid = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []);
981
+ this.invalid = input(false, {
982
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
983
+ transform: booleanAttribute
984
+ });
985
+ this.rounded = input("full", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
986
+ this.touched = input(false, {
987
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
988
+ transform: booleanAttribute
989
+ });
990
+ }
991
+ static {
992
+ this.ɵfac = i0.ɵɵngDeclareFactory({
993
+ minVersion: "12.0.0",
994
+ version: "22.2.6",
995
+ ngImport: i0,
996
+ type: RadioButtonDirective,
997
+ deps: [],
998
+ target: i0.ɵɵFactoryTarget.Directive
999
+ });
1000
+ }
1001
+ static {
1002
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1003
+ minVersion: "17.1.0",
1004
+ version: "22.2.6",
1005
+ type: RadioButtonDirective,
1006
+ isStandalone: true,
1007
+ selector: "input[type='radio'][monaRadioButton]",
1008
+ inputs: {
1009
+ invalid: {
1010
+ classPropertyName: "invalid",
1011
+ publicName: "invalid",
1012
+ isSignal: true,
1013
+ isRequired: false,
1014
+ transformFunction: null
1015
+ },
1016
+ rounded: {
1017
+ classPropertyName: "rounded",
1018
+ publicName: "rounded",
1019
+ isSignal: true,
1020
+ isRequired: false,
1021
+ transformFunction: null
1022
+ },
1023
+ touched: {
1024
+ classPropertyName: "touched",
1025
+ publicName: "touched",
1026
+ isSignal: true,
1027
+ isRequired: false,
1028
+ transformFunction: null
1029
+ }
1030
+ },
1031
+ host: { properties: {
1032
+ "attr.aria-invalid": "inputInvalid() || null",
1033
+ "attr.data-invalid": "inputInvalid() || null",
1034
+ "class": "classes()"
1035
+ } },
1036
+ ngImport: i0
1037
+ });
1038
+ }
1039
+ };
1040
+ i0.ɵɵngDeclareClassMetadata({
1041
+ minVersion: "12.0.0",
1042
+ version: "22.2.6",
1043
+ ngImport: i0,
1044
+ type: RadioButtonDirective,
1045
+ decorators: [{
1046
+ type: Directive,
1047
+ args: [{
1048
+ selector: "input[type='radio'][monaRadioButton]",
1049
+ host: {
1050
+ "[attr.aria-invalid]": "inputInvalid() || null",
1051
+ "[attr.data-invalid]": "inputInvalid() || null",
1052
+ "[class]": "classes()"
1053
+ }
1054
+ }]
1055
+ }],
1056
+ propDecorators: {
1057
+ invalid: [{
1058
+ type: i0.Input,
1059
+ args: [{
1060
+ isSignal: true,
1061
+ alias: "invalid",
1062
+ required: false
1063
+ }]
1064
+ }],
1065
+ rounded: [{
1066
+ type: i0.Input,
1067
+ args: [{
1068
+ isSignal: true,
1069
+ alias: "rounded",
1070
+ required: false
1071
+ }]
1072
+ }],
1073
+ touched: [{
1074
+ type: i0.Input,
1075
+ args: [{
1076
+ isSignal: true,
1077
+ alias: "touched",
1078
+ required: false
1079
+ }]
1080
+ }]
1081
+ }
1082
+ });
615
1083
  export { RadioButtonComponent, RadioButtonDirective, RadioGroupComponent };
616
- //# sourceMappingURL=nanahoshi-mona-ui-radio-button.mjs.map
1084
+
1085
+ //# sourceMappingURL=nanahoshi-mona-ui-radio-button.mjs.map