@molecule/app-ui-angular 1.0.6 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +11740 -1143
  2. package/dist/components/accordion.component.d.ts +114 -0
  3. package/dist/components/accordion.component.d.ts.map +1 -0
  4. package/dist/components/accordion.component.js +286 -0
  5. package/dist/components/accordion.component.js.map +1 -0
  6. package/dist/components/alert.component.d.ts +81 -37
  7. package/dist/components/alert.component.d.ts.map +1 -1
  8. package/dist/components/alert.component.js +232 -146
  9. package/dist/components/alert.component.js.map +1 -1
  10. package/dist/components/auth-guard.component.d.ts +94 -0
  11. package/dist/components/auth-guard.component.d.ts.map +1 -0
  12. package/dist/components/auth-guard.component.js +212 -0
  13. package/dist/components/auth-guard.component.js.map +1 -0
  14. package/dist/components/avatar.component.d.ts +97 -0
  15. package/dist/components/avatar.component.d.ts.map +1 -0
  16. package/dist/components/avatar.component.js +216 -0
  17. package/dist/components/avatar.component.js.map +1 -0
  18. package/dist/components/badge.component.d.ts +27 -12
  19. package/dist/components/badge.component.d.ts.map +1 -1
  20. package/dist/components/badge.component.js +47 -47
  21. package/dist/components/badge.component.js.map +1 -1
  22. package/dist/components/button.component.d.ts +96 -14
  23. package/dist/components/button.component.d.ts.map +1 -1
  24. package/dist/components/button.component.js +232 -87
  25. package/dist/components/button.component.js.map +1 -1
  26. package/dist/components/card.component.d.ts +135 -0
  27. package/dist/components/card.component.d.ts.map +1 -0
  28. package/dist/components/card.component.js +291 -0
  29. package/dist/components/card.component.js.map +1 -0
  30. package/dist/components/checkbox.component.d.ts +102 -29
  31. package/dist/components/checkbox.component.d.ts.map +1 -1
  32. package/dist/components/checkbox.component.js +222 -113
  33. package/dist/components/checkbox.component.js.map +1 -1
  34. package/dist/components/confirm-button.component.d.ts +130 -0
  35. package/dist/components/confirm-button.component.d.ts.map +1 -0
  36. package/dist/components/confirm-button.component.js +322 -0
  37. package/dist/components/confirm-button.component.js.map +1 -0
  38. package/dist/components/confirm-dialog.component.d.ts +60 -0
  39. package/dist/components/confirm-dialog.component.d.ts.map +1 -0
  40. package/dist/components/confirm-dialog.component.js +152 -0
  41. package/dist/components/confirm-dialog.component.js.map +1 -0
  42. package/dist/components/dropdown.component.d.ts +313 -0
  43. package/dist/components/dropdown.component.d.ts.map +1 -0
  44. package/dist/components/dropdown.component.js +919 -0
  45. package/dist/components/dropdown.component.js.map +1 -0
  46. package/dist/components/empty-state.component.d.ts +73 -0
  47. package/dist/components/empty-state.component.d.ts.map +1 -0
  48. package/dist/components/empty-state.component.js +180 -0
  49. package/dist/components/empty-state.component.js.map +1 -0
  50. package/dist/components/floating-input.component.d.ts +86 -0
  51. package/dist/components/floating-input.component.d.ts.map +1 -0
  52. package/dist/components/floating-input.component.js +167 -0
  53. package/dist/components/floating-input.component.js.map +1 -0
  54. package/dist/components/form-field.component.d.ts +111 -0
  55. package/dist/components/form-field.component.d.ts.map +1 -0
  56. package/dist/components/form-field.component.js +300 -0
  57. package/dist/components/form-field.component.js.map +1 -0
  58. package/dist/components/form.component.d.ts +77 -0
  59. package/dist/components/form.component.d.ts.map +1 -0
  60. package/dist/components/form.component.js +222 -0
  61. package/dist/components/form.component.js.map +1 -0
  62. package/dist/components/icon.component.d.ts +85 -0
  63. package/dist/components/icon.component.d.ts.map +1 -0
  64. package/dist/components/icon.component.js +187 -0
  65. package/dist/components/icon.component.js.map +1 -0
  66. package/dist/components/index.d.ts +49 -0
  67. package/dist/components/index.d.ts.map +1 -1
  68. package/dist/components/index.js +49 -0
  69. package/dist/components/index.js.map +1 -1
  70. package/dist/components/input.component.d.ts +157 -54
  71. package/dist/components/input.component.d.ts.map +1 -1
  72. package/dist/components/input.component.js +437 -222
  73. package/dist/components/input.component.js.map +1 -1
  74. package/dist/components/label.component.d.ts +29 -0
  75. package/dist/components/label.component.d.ts.map +1 -0
  76. package/dist/components/label.component.js +60 -0
  77. package/dist/components/label.component.js.map +1 -0
  78. package/dist/components/language-picker.component.d.ts +124 -0
  79. package/dist/components/language-picker.component.d.ts.map +1 -0
  80. package/dist/components/language-picker.component.js +305 -0
  81. package/dist/components/language-picker.component.js.map +1 -0
  82. package/dist/components/layout.component.d.ts +167 -0
  83. package/dist/components/layout.component.d.ts.map +1 -0
  84. package/dist/components/layout.component.js +364 -0
  85. package/dist/components/layout.component.js.map +1 -0
  86. package/dist/components/load-error-banner.component.d.ts +103 -0
  87. package/dist/components/load-error-banner.component.d.ts.map +1 -0
  88. package/dist/components/load-error-banner.component.js +263 -0
  89. package/dist/components/load-error-banner.component.js.map +1 -0
  90. package/dist/components/modal.component.d.ts +125 -95
  91. package/dist/components/modal.component.d.ts.map +1 -1
  92. package/dist/components/modal.component.js +458 -271
  93. package/dist/components/modal.component.js.map +1 -1
  94. package/dist/components/molecule/alert.component.d.ts +77 -0
  95. package/dist/components/molecule/alert.component.d.ts.map +1 -0
  96. package/dist/components/molecule/alert.component.js +229 -0
  97. package/dist/components/molecule/alert.component.js.map +1 -0
  98. package/dist/components/molecule/badge.component.d.ts +27 -0
  99. package/dist/components/molecule/badge.component.d.ts.map +1 -0
  100. package/dist/components/molecule/badge.component.js +79 -0
  101. package/dist/components/molecule/badge.component.js.map +1 -0
  102. package/dist/components/molecule/button.component.d.ts +38 -0
  103. package/dist/components/molecule/button.component.d.ts.map +1 -0
  104. package/dist/components/molecule/button.component.js +137 -0
  105. package/dist/components/molecule/button.component.js.map +1 -0
  106. package/dist/components/molecule/checkbox.component.d.ts +53 -0
  107. package/dist/components/molecule/checkbox.component.d.ts.map +1 -0
  108. package/dist/components/molecule/checkbox.component.js +166 -0
  109. package/dist/components/molecule/checkbox.component.js.map +1 -0
  110. package/dist/components/molecule/index.d.ts +18 -0
  111. package/dist/components/molecule/index.d.ts.map +1 -0
  112. package/dist/components/molecule/index.js +18 -0
  113. package/dist/components/molecule/index.js.map +1 -0
  114. package/dist/components/molecule/input.component.d.ts +93 -0
  115. package/dist/components/molecule/input.component.d.ts.map +1 -0
  116. package/dist/components/molecule/input.component.js +314 -0
  117. package/dist/components/molecule/input.component.js.map +1 -0
  118. package/dist/components/molecule/modal.component.d.ts +148 -0
  119. package/dist/components/molecule/modal.component.d.ts.map +1 -0
  120. package/dist/components/molecule/modal.component.js +382 -0
  121. package/dist/components/molecule/modal.component.js.map +1 -0
  122. package/dist/components/molecule/radio-group.component.d.ts +63 -0
  123. package/dist/components/molecule/radio-group.component.d.ts.map +1 -0
  124. package/dist/components/molecule/radio-group.component.js +208 -0
  125. package/dist/components/molecule/radio-group.component.js.map +1 -0
  126. package/dist/components/molecule/select.component.d.ts +72 -0
  127. package/dist/components/molecule/select.component.d.ts.map +1 -0
  128. package/dist/components/molecule/select.component.js +274 -0
  129. package/dist/components/molecule/select.component.js.map +1 -0
  130. package/dist/components/molecule/spinner.component.d.ts +42 -0
  131. package/dist/components/molecule/spinner.component.d.ts.map +1 -0
  132. package/dist/components/molecule/spinner.component.js +122 -0
  133. package/dist/components/molecule/spinner.component.js.map +1 -0
  134. package/dist/components/molecule/switch.component.d.ts +54 -0
  135. package/dist/components/molecule/switch.component.d.ts.map +1 -0
  136. package/dist/components/molecule/switch.component.js +148 -0
  137. package/dist/components/molecule/switch.component.js.map +1 -0
  138. package/dist/components/molecule/toast.component.d.ts +98 -0
  139. package/dist/components/molecule/toast.component.d.ts.map +1 -0
  140. package/dist/components/molecule/toast.component.js +305 -0
  141. package/dist/components/molecule/toast.component.js.map +1 -0
  142. package/dist/components/molecule/tooltip.component.d.ts +77 -0
  143. package/dist/components/molecule/tooltip.component.d.ts.map +1 -0
  144. package/dist/components/molecule/tooltip.component.js +316 -0
  145. package/dist/components/molecule/tooltip.component.js.map +1 -0
  146. package/dist/components/optimistic-toggle-button.component.d.ts +125 -0
  147. package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -0
  148. package/dist/components/optimistic-toggle-button.component.js +296 -0
  149. package/dist/components/optimistic-toggle-button.component.js.map +1 -0
  150. package/dist/components/page-header.component.d.ts +77 -0
  151. package/dist/components/page-header.component.d.ts.map +1 -0
  152. package/dist/components/page-header.component.js +225 -0
  153. package/dist/components/page-header.component.js.map +1 -0
  154. package/dist/components/page-shell.component.d.ts +101 -0
  155. package/dist/components/page-shell.component.d.ts.map +1 -0
  156. package/dist/components/page-shell.component.js +221 -0
  157. package/dist/components/page-shell.component.js.map +1 -0
  158. package/dist/components/pagination.component.d.ts +137 -0
  159. package/dist/components/pagination.component.d.ts.map +1 -0
  160. package/dist/components/pagination.component.js +419 -0
  161. package/dist/components/pagination.component.js.map +1 -0
  162. package/dist/components/panel-close.component.d.ts +43 -0
  163. package/dist/components/panel-close.component.d.ts.map +1 -0
  164. package/dist/components/panel-close.component.js +75 -0
  165. package/dist/components/panel-close.component.js.map +1 -0
  166. package/dist/components/progress.component.d.ts +84 -0
  167. package/dist/components/progress.component.d.ts.map +1 -0
  168. package/dist/components/progress.component.js +219 -0
  169. package/dist/components/progress.component.js.map +1 -0
  170. package/dist/components/prompt-dialog.component.d.ts +121 -0
  171. package/dist/components/prompt-dialog.component.d.ts.map +1 -0
  172. package/dist/components/prompt-dialog.component.js +332 -0
  173. package/dist/components/prompt-dialog.component.js.map +1 -0
  174. package/dist/components/radio-group.component.d.ts +66 -34
  175. package/dist/components/radio-group.component.d.ts.map +1 -1
  176. package/dist/components/radio-group.component.js +146 -125
  177. package/dist/components/radio-group.component.js.map +1 -1
  178. package/dist/components/responsive-app-shell.component.d.ts +408 -0
  179. package/dist/components/responsive-app-shell.component.d.ts.map +1 -0
  180. package/dist/components/responsive-app-shell.component.js +1144 -0
  181. package/dist/components/responsive-app-shell.component.js.map +1 -0
  182. package/dist/components/select.component.d.ts +135 -38
  183. package/dist/components/select.component.d.ts.map +1 -1
  184. package/dist/components/select.component.js +373 -181
  185. package/dist/components/select.component.js.map +1 -1
  186. package/dist/components/separator.component.d.ts +39 -0
  187. package/dist/components/separator.component.d.ts.map +1 -0
  188. package/dist/components/separator.component.js +73 -0
  189. package/dist/components/separator.component.js.map +1 -0
  190. package/dist/components/sidebar-user-card.component.d.ts +106 -0
  191. package/dist/components/sidebar-user-card.component.d.ts.map +1 -0
  192. package/dist/components/sidebar-user-card.component.js +277 -0
  193. package/dist/components/sidebar-user-card.component.js.map +1 -0
  194. package/dist/components/skeleton.component.d.ts +100 -0
  195. package/dist/components/skeleton.component.d.ts.map +1 -0
  196. package/dist/components/skeleton.component.js +214 -0
  197. package/dist/components/skeleton.component.js.map +1 -0
  198. package/dist/components/spinner.component.d.ts +36 -19
  199. package/dist/components/spinner.component.d.ts.map +1 -1
  200. package/dist/components/spinner.component.js +69 -71
  201. package/dist/components/spinner.component.js.map +1 -1
  202. package/dist/components/switch.component.d.ts +72 -29
  203. package/dist/components/switch.component.d.ts.map +1 -1
  204. package/dist/components/switch.component.js +163 -91
  205. package/dist/components/switch.component.js.map +1 -1
  206. package/dist/components/table.component.d.ts +193 -0
  207. package/dist/components/table.component.d.ts.map +1 -0
  208. package/dist/components/table.component.js +550 -0
  209. package/dist/components/table.component.js.map +1 -0
  210. package/dist/components/tabs.component.d.ts +140 -0
  211. package/dist/components/tabs.component.d.ts.map +1 -0
  212. package/dist/components/tabs.component.js +390 -0
  213. package/dist/components/tabs.component.js.map +1 -0
  214. package/dist/components/template-outlet.directive.d.ts +50 -0
  215. package/dist/components/template-outlet.directive.d.ts.map +1 -0
  216. package/dist/components/template-outlet.directive.js +81 -0
  217. package/dist/components/template-outlet.directive.js.map +1 -0
  218. package/dist/components/textarea.component.d.ts +151 -0
  219. package/dist/components/textarea.component.d.ts.map +1 -0
  220. package/dist/components/textarea.component.js +340 -0
  221. package/dist/components/textarea.component.js.map +1 -0
  222. package/dist/components/theme-toggle.component.d.ts +58 -0
  223. package/dist/components/theme-toggle.component.d.ts.map +1 -0
  224. package/dist/components/theme-toggle.component.js +124 -0
  225. package/dist/components/theme-toggle.component.js.map +1 -0
  226. package/dist/components/toast.component.d.ts +237 -49
  227. package/dist/components/toast.component.d.ts.map +1 -1
  228. package/dist/components/toast.component.js +636 -201
  229. package/dist/components/toast.component.js.map +1 -1
  230. package/dist/components/tooltip.component.d.ts +95 -45
  231. package/dist/components/tooltip.component.d.ts.map +1 -1
  232. package/dist/components/tooltip.component.js +372 -221
  233. package/dist/components/tooltip.component.js.map +1 -1
  234. package/dist/components/user-menu-popover.component.d.ts +283 -0
  235. package/dist/components/user-menu-popover.component.d.ts.map +1 -0
  236. package/dist/components/user-menu-popover.component.js +646 -0
  237. package/dist/components/user-menu-popover.component.js.map +1 -0
  238. package/dist/components/user-menu.component.d.ts +95 -0
  239. package/dist/components/user-menu.component.d.ts.map +1 -0
  240. package/dist/components/user-menu.component.js +218 -0
  241. package/dist/components/user-menu.component.js.map +1 -0
  242. package/dist/hooks/index.d.ts +7 -0
  243. package/dist/hooks/index.d.ts.map +1 -0
  244. package/dist/hooks/index.js +7 -0
  245. package/dist/hooks/index.js.map +1 -0
  246. package/dist/hooks/use-is-desktop.d.ts +22 -0
  247. package/dist/hooks/use-is-desktop.d.ts.map +1 -0
  248. package/dist/hooks/use-is-desktop.js +37 -0
  249. package/dist/hooks/use-is-desktop.js.map +1 -0
  250. package/dist/index.d.ts +32 -17
  251. package/dist/index.d.ts.map +1 -1
  252. package/dist/index.js +32 -17
  253. package/dist/index.js.map +1 -1
  254. package/dist/types.d.ts +1 -1
  255. package/dist/types.d.ts.map +1 -1
  256. package/dist/utilities/dom-context.d.ts +42 -0
  257. package/dist/utilities/dom-context.d.ts.map +1 -0
  258. package/dist/utilities/dom-context.js +66 -0
  259. package/dist/utilities/dom-context.js.map +1 -0
  260. package/dist/utilities/focus.d.ts +32 -0
  261. package/dist/utilities/focus.d.ts.map +1 -0
  262. package/dist/utilities/focus.js +47 -0
  263. package/dist/utilities/focus.js.map +1 -0
  264. package/dist/utilities/form-field-context.d.ts +34 -0
  265. package/dist/utilities/form-field-context.d.ts.map +1 -0
  266. package/dist/utilities/form-field-context.js +28 -0
  267. package/dist/utilities/form-field-context.js.map +1 -0
  268. package/dist/utilities/form-submit-error.d.ts +17 -0
  269. package/dist/utilities/form-submit-error.d.ts.map +1 -0
  270. package/dist/utilities/form-submit-error.js +42 -0
  271. package/dist/utilities/form-submit-error.js.map +1 -0
  272. package/dist/utilities/icon-markup.d.ts +17 -0
  273. package/dist/utilities/icon-markup.d.ts.map +1 -0
  274. package/dist/utilities/icon-markup.js +46 -0
  275. package/dist/utilities/icon-markup.js.map +1 -0
  276. package/dist/utilities/ids.d.ts +15 -0
  277. package/dist/utilities/ids.d.ts.map +1 -0
  278. package/dist/utilities/ids.js +19 -0
  279. package/dist/utilities/ids.js.map +1 -0
  280. package/dist/utilities/index.d.ts +11 -0
  281. package/dist/utilities/index.d.ts.map +1 -1
  282. package/dist/utilities/index.js +11 -0
  283. package/dist/utilities/index.js.map +1 -1
  284. package/dist/utilities/initials.d.ts +13 -0
  285. package/dist/utilities/initials.d.ts.map +1 -0
  286. package/dist/utilities/initials.js +23 -0
  287. package/dist/utilities/initials.js.map +1 -0
  288. package/dist/utilities/node-value.d.ts +31 -0
  289. package/dist/utilities/node-value.d.ts.map +1 -0
  290. package/dist/utilities/node-value.js +37 -0
  291. package/dist/utilities/node-value.js.map +1 -0
  292. package/dist/utilities/optimistic-value.d.ts +81 -0
  293. package/dist/utilities/optimistic-value.d.ts.map +1 -0
  294. package/dist/utilities/optimistic-value.js +154 -0
  295. package/dist/utilities/optimistic-value.js.map +1 -0
  296. package/dist/utilities/render-icon.d.ts +77 -7
  297. package/dist/utilities/render-icon.d.ts.map +1 -1
  298. package/dist/utilities/render-icon.js +123 -33
  299. package/dist/utilities/render-icon.js.map +1 -1
  300. package/dist/utilities/rest-attrs.d.ts +21 -0
  301. package/dist/utilities/rest-attrs.d.ts.map +1 -0
  302. package/dist/utilities/rest-attrs.js +37 -0
  303. package/dist/utilities/rest-attrs.js.map +1 -0
  304. package/dist/utilities/style.d.ts +23 -0
  305. package/dist/utilities/style.d.ts.map +1 -0
  306. package/dist/utilities/style.js +86 -0
  307. package/dist/utilities/style.js.map +1 -0
  308. package/package.json +6 -4
@@ -0,0 +1,382 @@
1
+ /**
2
+ * Angular Modal UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { ChangeDetectionStrategy, Component, EventEmitter, inject, Input, Output, } from '@angular/core';
7
+ import { DomSanitizer } from '@angular/platform-browser';
8
+ import { useTranslation } from '@molecule/app-angular';
9
+ import { getClassMap } from '@molecule/app-ui';
10
+ import { getIconSvg } from '../../utilities/icon-markup.js';
11
+ import * as i0 from "@angular/core";
12
+ const _c0 = ["*", [["", "modal-footer", ""]]];
13
+ const _c1 = ["*", "[modal-footer]"];
14
+ function MoleculeModal_Conditional_0_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
15
+ i0.ɵɵdomElementStart(0, "h2", 6);
16
+ i0.ɵɵtext(1);
17
+ i0.ɵɵdomElementEnd();
18
+ } if (rf & 2) {
19
+ const ctx_r1 = i0.ɵɵnextContext(3);
20
+ i0.ɵɵclassMap(ctx_r1.titleClass);
21
+ i0.ɵɵadvance();
22
+ i0.ɵɵtextInterpolate(ctx_r1.title);
23
+ } }
24
+ function MoleculeModal_Conditional_0_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
25
+ i0.ɵɵdomElement(0, "div");
26
+ } }
27
+ function MoleculeModal_Conditional_0_Conditional_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
28
+ const _r3 = i0.ɵɵgetCurrentView();
29
+ i0.ɵɵdomElementStart(0, "button", 7);
30
+ i0.ɵɵdomListener("click", function MoleculeModal_Conditional_0_Conditional_3_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.close.emit()); });
31
+ i0.ɵɵdomElement(1, "span", 8);
32
+ i0.ɵɵdomElementEnd();
33
+ } if (rf & 2) {
34
+ const ctx_r1 = i0.ɵɵnextContext(3);
35
+ i0.ɵɵclassMap(ctx_r1.closeClass);
36
+ i0.ɵɵattribute("aria-label", ctx_r1.closeAriaLabel);
37
+ i0.ɵɵadvance();
38
+ i0.ɵɵdomProperty("innerHTML", ctx_r1.closeIconSvg, i0.ɵɵsanitizeHtml);
39
+ } }
40
+ function MoleculeModal_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
41
+ i0.ɵɵdomElementStart(0, "div");
42
+ i0.ɵɵconditionalCreate(1, MoleculeModal_Conditional_0_Conditional_3_Conditional_1_Template, 2, 3, "h2", 4)(2, MoleculeModal_Conditional_0_Conditional_3_Conditional_2_Template, 1, 0, "div");
43
+ i0.ɵɵconditionalCreate(3, MoleculeModal_Conditional_0_Conditional_3_Conditional_3_Template, 2, 4, "button", 5);
44
+ i0.ɵɵdomElementEnd();
45
+ } if (rf & 2) {
46
+ const ctx_r1 = i0.ɵɵnextContext(2);
47
+ i0.ɵɵclassMap(ctx_r1.headerClass);
48
+ i0.ɵɵadvance();
49
+ i0.ɵɵconditional(ctx_r1.title ? 1 : ctx_r1.showCloseButton ? 2 : -1);
50
+ i0.ɵɵadvance(2);
51
+ i0.ɵɵconditional(ctx_r1.showCloseButton ? 3 : -1);
52
+ } }
53
+ function MoleculeModal_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
54
+ i0.ɵɵdomElementStart(0, "div");
55
+ i0.ɵɵprojection(1, 1);
56
+ i0.ɵɵdomElementEnd();
57
+ } if (rf & 2) {
58
+ const ctx_r1 = i0.ɵɵnextContext(2);
59
+ i0.ɵɵclassMap(ctx_r1.footerClass);
60
+ } }
61
+ function MoleculeModal_Conditional_0_Template(rf, ctx) { if (rf & 1) {
62
+ const _r1 = i0.ɵɵgetCurrentView();
63
+ i0.ɵɵdomElement(0, "div", 0);
64
+ i0.ɵɵdomElementStart(1, "div", 1);
65
+ i0.ɵɵdomListener("click", function MoleculeModal_Conditional_0_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onOverlayClick($event)); });
66
+ i0.ɵɵdomElementStart(2, "div", 2);
67
+ i0.ɵɵdomListener("click", function MoleculeModal_Conditional_0_Template_div_click_2_listener($event) { return $event.stopPropagation(); });
68
+ i0.ɵɵconditionalCreate(3, MoleculeModal_Conditional_0_Conditional_3_Template, 4, 4, "div", 3);
69
+ i0.ɵɵdomElementStart(4, "div");
70
+ i0.ɵɵprojection(5);
71
+ i0.ɵɵdomElementEnd();
72
+ i0.ɵɵconditionalCreate(6, MoleculeModal_Conditional_0_Conditional_6_Template, 2, 2, "div", 3);
73
+ i0.ɵɵdomElementEnd()();
74
+ } if (rf & 2) {
75
+ const ctx_r1 = i0.ɵɵnextContext();
76
+ i0.ɵɵclassMap(ctx_r1.overlayClass);
77
+ i0.ɵɵadvance();
78
+ i0.ɵɵstyleMap(ctx_r1.wrapperStyle);
79
+ i0.ɵɵclassMap(ctx_r1.wrapperClass);
80
+ i0.ɵɵadvance();
81
+ i0.ɵɵstyleMap(ctx_r1.style);
82
+ i0.ɵɵclassMap(ctx_r1.contentClasses);
83
+ i0.ɵɵattribute("aria-labelledby", ctx_r1.title ? "modal-title" : null)("data-testid", ctx_r1.testId);
84
+ i0.ɵɵadvance();
85
+ i0.ɵɵconditional(ctx_r1.title || ctx_r1.showCloseButton ? 3 : -1);
86
+ i0.ɵɵadvance();
87
+ i0.ɵɵclassMap(ctx_r1.bodyClass);
88
+ i0.ɵɵadvance(2);
89
+ i0.ɵɵconditional(ctx_r1.hasFooter ? 6 : -1);
90
+ } }
91
+ /**
92
+ * Get the inline style for the modal centering wrapper. `dialogWrapper` has
93
+ * no dedicated ClassMap resolver option (it's a fixed token, not a
94
+ * `{ centered }`-parameterized one), so a top-anchored (non-centered) layout
95
+ * is expressed via the one inline-style exception the workspace styling rule
96
+ * allows for values ClassMap genuinely cannot express.
97
+ *
98
+ * A standalone function (rather than a class member) so it's unit-testable
99
+ * without constructing `MoleculeModal` — the class can't be `new`'d outside
100
+ * an Angular injection context (`sanitizer = inject(DomSanitizer)` runs at
101
+ * field-initializer time).
102
+ * @param centered - Whether the modal is vertically centered.
103
+ * @returns An inline style object, or `undefined` when centered.
104
+ */
105
+ export function getModalWrapperStyle(centered) {
106
+ return centered ? undefined : { alignItems: 'flex-start' };
107
+ }
108
+ /**
109
+ * Angular Modal UI component with UIClassMap-driven styling.
110
+ *
111
+ * `centered` (default `true`) vertically centers the dialog; `centered:
112
+ * false` top-anchors it instead, via `getModalWrapperStyle()`.
113
+ */
114
+ /**
115
+ * Molecule Modal class.
116
+ * @deprecated Use the React-named component `Modal` instead.
117
+ */
118
+ export class MoleculeModal {
119
+ open = false;
120
+ title;
121
+ size = 'md';
122
+ showCloseButton = true;
123
+ closeLabel;
124
+ closeOnOverlayClick = true;
125
+ closeOnEscape = true;
126
+ centered = true;
127
+ preventScroll = true;
128
+ hasFooter = false;
129
+ className;
130
+ style;
131
+ testId;
132
+ close = new EventEmitter();
133
+ /**
134
+ * Reactive translation, read in the injection context. Its `t` reads the
135
+ * locale, so the view re-renders the text on a locale switch (the static `t`
136
+ * does not).
137
+ */
138
+ i18n = useTranslation();
139
+ /**
140
+ * Retrieves the current UI class map.
141
+ * @returns The UIClassMap instance for styling.
142
+ */
143
+ get cm() {
144
+ return getClassMap();
145
+ }
146
+ /**
147
+ * Computes the accessible close button label.
148
+ * @returns The localized aria-label for the close button.
149
+ */
150
+ get closeAriaLabel() {
151
+ return this.closeLabel || this.i18n.t('ui.modal.close', undefined, { defaultValue: 'Close' });
152
+ }
153
+ boundEscapeHandler = this.handleEscape.bind(this);
154
+ /**
155
+ * Retrieves the CSS class for the modal wrapper.
156
+ * @returns The wrapper class name string.
157
+ */
158
+ get wrapperClass() {
159
+ return this.cm.dialogWrapper;
160
+ }
161
+ /**
162
+ * Retrieves the inline style for the modal centering wrapper.
163
+ * @returns An inline style object, or `undefined` when centered.
164
+ */
165
+ get wrapperStyle() {
166
+ return getModalWrapperStyle(this.centered);
167
+ }
168
+ /**
169
+ * Retrieves the CSS class for the modal body.
170
+ * @returns The body class name string.
171
+ */
172
+ get bodyClass() {
173
+ return this.cm.dialogBody;
174
+ }
175
+ /**
176
+ * Retrieves the CSS class for the modal overlay.
177
+ * @returns The overlay class name string.
178
+ */
179
+ get overlayClass() {
180
+ return this.cm.dialogOverlay;
181
+ }
182
+ /**
183
+ * Retrieves the CSS class for the modal header.
184
+ * @returns The header class name string.
185
+ */
186
+ get headerClass() {
187
+ return this.cm.dialogHeader;
188
+ }
189
+ /**
190
+ * Retrieves the CSS class for the modal footer.
191
+ * @returns The footer class name string.
192
+ */
193
+ get footerClass() {
194
+ return this.cm.dialogFooter;
195
+ }
196
+ /**
197
+ * Retrieves the CSS class for the modal title.
198
+ * @returns The title class name string.
199
+ */
200
+ get titleClass() {
201
+ return this.cm.dialogTitle;
202
+ }
203
+ /**
204
+ * Retrieves the CSS class for the close button.
205
+ * @returns The close button class name string.
206
+ */
207
+ get closeClass() {
208
+ return this.cm.dialogClose;
209
+ }
210
+ sanitizer = inject(DomSanitizer);
211
+ /**
212
+ * Generates the SVG markup for the close button icon.
213
+ * @returns The sanitized SVG for the close icon.
214
+ */
215
+ get closeIconSvg() {
216
+ return this.sanitizer.bypassSecurityTrustHtml(getIconSvg('x-mark', this.cm.iconMd));
217
+ }
218
+ /**
219
+ * Computes the combined CSS classes for the modal content.
220
+ * @returns The modal content class name string.
221
+ */
222
+ get contentClasses() {
223
+ return this.cm.cn(this.cm.modal({ size: this.size }), this.className);
224
+ }
225
+ /**
226
+ * Initializes event listeners on component creation.
227
+ */
228
+ ngOnInit() {
229
+ this.updateListeners();
230
+ }
231
+ /**
232
+ * Handles input property changes.
233
+ * @param changes - The changed input properties.
234
+ */
235
+ ngOnChanges(changes) {
236
+ if (changes['open']) {
237
+ this.updateListeners();
238
+ this.updateBodyScroll();
239
+ }
240
+ }
241
+ /**
242
+ * Cleans up event listeners and body scroll on component destruction.
243
+ */
244
+ ngOnDestroy() {
245
+ document.removeEventListener('keydown', this.boundEscapeHandler);
246
+ if (this.preventScroll) {
247
+ document.body.style.overflow = '';
248
+ }
249
+ }
250
+ /**
251
+ * Adds or removes the keyboard escape listener based on open state.
252
+ */
253
+ updateListeners() {
254
+ if (this.open) {
255
+ document.addEventListener('keydown', this.boundEscapeHandler);
256
+ }
257
+ else {
258
+ document.removeEventListener('keydown', this.boundEscapeHandler);
259
+ }
260
+ }
261
+ /**
262
+ * Updates the document body overflow based on open state.
263
+ */
264
+ updateBodyScroll() {
265
+ if (this.preventScroll) {
266
+ document.body.style.overflow = this.open ? 'hidden' : '';
267
+ }
268
+ }
269
+ /**
270
+ * Handles escape key press to close the modal.
271
+ * @param e - The keyboard event.
272
+ */
273
+ handleEscape(e) {
274
+ if (this.closeOnEscape && e.key === 'Escape') {
275
+ this.close.emit();
276
+ }
277
+ }
278
+ /**
279
+ * Handles overlay click to close the modal.
280
+ * @param event - The mouse event from the overlay click.
281
+ */
282
+ onOverlayClick(event) {
283
+ if (this.closeOnOverlayClick && event.target === event.currentTarget) {
284
+ this.close.emit();
285
+ }
286
+ }
287
+ static ɵfac = function MoleculeModal_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeModal)(); };
288
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeModal, selectors: [["mol-modal"]], inputs: { open: "open", title: "title", size: "size", showCloseButton: "showCloseButton", closeLabel: "closeLabel", closeOnOverlayClick: "closeOnOverlayClick", closeOnEscape: "closeOnEscape", centered: "centered", preventScroll: "preventScroll", hasFooter: "hasFooter", className: "className", style: "style", testId: "testId" }, outputs: { close: "close" }, features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c1, decls: 1, vars: 1, consts: [["aria-hidden", "true"], [3, "click"], ["role", "dialog", "aria-modal", "true", 3, "click"], [3, "class"], ["id", "modal-title", 3, "class"], ["type", "button", 3, "class"], ["id", "modal-title"], ["type", "button", 3, "click"], [3, "innerHTML"]], template: function MoleculeModal_Template(rf, ctx) { if (rf & 1) {
289
+ i0.ɵɵprojectionDef(_c0);
290
+ i0.ɵɵconditionalCreate(0, MoleculeModal_Conditional_0_Template, 7, 16);
291
+ } if (rf & 2) {
292
+ i0.ɵɵconditional(ctx.open ? 0 : -1);
293
+ } }, encapsulation: 2 });
294
+ }
295
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeModal, [{
296
+ type: Component,
297
+ args: [{
298
+ selector: 'mol-modal',
299
+ standalone: true,
300
+ changeDetection: ChangeDetectionStrategy.OnPush,
301
+ template: `
302
+ @if (open) {
303
+ <!-- Overlay background -->
304
+ <div [class]="overlayClass" aria-hidden="true"></div>
305
+
306
+ <!-- Centering wrapper -->
307
+ <div [class]="wrapperClass" [style]="wrapperStyle" (click)="onOverlayClick($event)">
308
+ <!-- Content -->
309
+ <div
310
+ role="dialog"
311
+ aria-modal="true"
312
+ [attr.aria-labelledby]="title ? 'modal-title' : null"
313
+ [class]="contentClasses"
314
+ [style]="style"
315
+ [attr.data-testid]="testId"
316
+ (click)="$event.stopPropagation()"
317
+ >
318
+ @if (title || showCloseButton) {
319
+ <div [class]="headerClass">
320
+ @if (title) {
321
+ <h2 id="modal-title" [class]="titleClass">{{ title }}</h2>
322
+ } @else if (showCloseButton) {
323
+ <div></div>
324
+ }
325
+ @if (showCloseButton) {
326
+ <button
327
+ type="button"
328
+ (click)="close.emit()"
329
+ [class]="closeClass"
330
+ [attr.aria-label]="closeAriaLabel"
331
+ >
332
+ <span [innerHTML]="closeIconSvg"></span>
333
+ </button>
334
+ }
335
+ </div>
336
+ }
337
+
338
+ <div [class]="bodyClass">
339
+ <ng-content></ng-content>
340
+ </div>
341
+
342
+ @if (hasFooter) {
343
+ <div [class]="footerClass">
344
+ <ng-content select="[modal-footer]"></ng-content>
345
+ </div>
346
+ }
347
+ </div>
348
+ </div>
349
+ }
350
+ `,
351
+ }]
352
+ }], null, { open: [{
353
+ type: Input
354
+ }], title: [{
355
+ type: Input
356
+ }], size: [{
357
+ type: Input
358
+ }], showCloseButton: [{
359
+ type: Input
360
+ }], closeLabel: [{
361
+ type: Input
362
+ }], closeOnOverlayClick: [{
363
+ type: Input
364
+ }], closeOnEscape: [{
365
+ type: Input
366
+ }], centered: [{
367
+ type: Input
368
+ }], preventScroll: [{
369
+ type: Input
370
+ }], hasFooter: [{
371
+ type: Input
372
+ }], className: [{
373
+ type: Input
374
+ }], style: [{
375
+ type: Input
376
+ }], testId: [{
377
+ type: Input
378
+ }], close: [{
379
+ type: Output
380
+ }] }); })();
381
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeModal, { className: "MoleculeModal", filePath: "components/molecule/modal.component.ts", lineNumber: 110 }); })();
382
+ //# sourceMappingURL=modal.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.component.js","sourceRoot":"","sources":["../../../src/components/molecule/modal.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,YAAY,EACZ,MAAM,EACN,KAAK,EAIL,MAAM,GAEP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,YAAY,EAAiB,MAAM,2BAA2B,CAAA;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;;;;;IAkD3C,gCAA0C;IAAA,YAAW;IAAA,oBAAK;;;IAArC,gCAAoB;IAAC,cAAW;IAAX,kCAAW;;;IAErD,yBAAW;;;;IAGX,oCAKC;IAHC,iNAAS,mBAAY,KAAC;IAItB,6BAAwC;IAC1C,oBAAS;;;IAJP,gCAAoB;;IAGd,cAA0B;IAA1B,qEAA0B;;;IAbtC,8BAA2B;IAGvB,AAFF,0GAAa,kFAEiB;IAG9B,8GAAuB;IAUzB,oBAAM;;;IAhBD,iCAAqB;IACxB,cAIC;IAJD,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GAAG,KAAK,QAAQ,EAAE,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;QACnB,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,cAAc,CAAC,KAAiB;QAC9B,IAAI,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,aAAa,EAAE,CAAC;YACrE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;QACnB,CAAC;IACH,CAAC;uGA9LU,aAAa;6DAAb,aAAa;;YAtDtB,sEAAY;;YAAZ,mCA+CC;;;iFAOQ,aAAa;cA3DzB,SAAS;eAAC;gBACT,QAAQ,EAAE,WAAW;gBACrB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDT;aACF;;kBAME,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kFAfI,aAAa"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Angular RadioGroup UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { EventEmitter } from '@angular/core';
7
+ import type { RadioOption, Size, UIClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Angular RadioGroup UI component with UIClassMap-driven styling.
11
+ */
12
+ export declare class MoleculeRadioGroup {
13
+ options: RadioOption<string>[];
14
+ value?: string;
15
+ size?: Size;
16
+ label?: string;
17
+ direction: 'horizontal' | 'vertical';
18
+ error?: string;
19
+ className?: string;
20
+ style?: Record<string, string>;
21
+ testId?: string;
22
+ disabled: boolean;
23
+ valueChange: EventEmitter<string>;
24
+ /**
25
+ * Retrieves the current UI class map.
26
+ * @returns The UIClassMap instance for styling.
27
+ */
28
+ get cm(): UIClassMap;
29
+ /**
30
+ * Computes the CSS classes for the radio group label.
31
+ * @returns The group label class name string.
32
+ */
33
+ get groupLabelClasses(): string;
34
+ /**
35
+ * Computes the CSS classes for the layout direction.
36
+ * @returns The direction layout class name string.
37
+ */
38
+ get directionClasses(): string;
39
+ /**
40
+ * Computes the CSS classes for radio input elements.
41
+ * @returns The radio input class name string.
42
+ */
43
+ get radioClasses(): string;
44
+ /**
45
+ * Computes the CSS classes for the error message.
46
+ * @returns The error class name string.
47
+ */
48
+ get errorClasses(): string;
49
+ /**
50
+ * Computes the CSS classes for an individual radio option label.
51
+ * @param option - The radio option to compute classes for.
52
+ * @returns The option label class name string.
53
+ */
54
+ getOptionLabelClasses(option: RadioOption<string>): string;
55
+ /**
56
+ * Handles radio option selection change.
57
+ * @param optionValue - The value of the selected radio option.
58
+ */
59
+ onRadioChange(optionValue: string): void;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeRadioGroup, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeRadioGroup, "mol-radio-group", never, { "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "error": { "alias": "error"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
62
+ }
63
+ //# sourceMappingURL=radio-group.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.component.d.ts","sourceRoot":"","sources":["../../../src/components/molecule/radio-group.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsC,YAAY,EAAiB,MAAM,eAAe,CAAA;AAE/F,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGrE;;GAEG;AACH,qBA0Ca,kBAAkB;IACpB,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAK;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,YAAY,GAAG,UAAU,CAAa;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,UAAQ;IAEf,WAAW,uBAA6B;IAElD;;;OAGG;IACH,IAAI,EAAE,IAAI,UAAU,CAEnB;IAED;;;OAGG;IACH,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED;;;OAGG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;;;OAIG;IACH,qBAAqB,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM;IAK1D;;;OAGG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;yCApE7B,kBAAkB;2CAAlB,kBAAkB;CAuE9B"}
@@ -0,0 +1,208 @@
1
+ /**
2
+ * Angular RadioGroup UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ const _forTrack0 = ($index, $item) => $item.value;
10
+ function MoleculeRadioGroup_Conditional_1_Template(rf, ctx) { if (rf & 1) {
11
+ i0.ɵɵdomElementStart(0, "div");
12
+ i0.ɵɵtext(1);
13
+ i0.ɵɵdomElementEnd();
14
+ } if (rf & 2) {
15
+ const ctx_r0 = i0.ɵɵnextContext();
16
+ i0.ɵɵclassMap(ctx_r0.groupLabelClasses);
17
+ i0.ɵɵadvance();
18
+ i0.ɵɵtextInterpolate(ctx_r0.label);
19
+ } }
20
+ function MoleculeRadioGroup_For_4_Template(rf, ctx) { if (rf & 1) {
21
+ const _r2 = i0.ɵɵgetCurrentView();
22
+ i0.ɵɵdomElementStart(0, "label")(1, "input", 2);
23
+ i0.ɵɵdomListener("change", function MoleculeRadioGroup_For_4_Template_input_change_1_listener() { const option_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onRadioChange(option_r3.value)); });
24
+ i0.ɵɵdomElementEnd();
25
+ i0.ɵɵdomElementStart(2, "span");
26
+ i0.ɵɵtext(3);
27
+ i0.ɵɵdomElementEnd()();
28
+ } if (rf & 2) {
29
+ const option_r3 = ctx.$implicit;
30
+ const ctx_r0 = i0.ɵɵnextContext();
31
+ i0.ɵɵclassMap(ctx_r0.getOptionLabelClasses(option_r3));
32
+ i0.ɵɵadvance();
33
+ i0.ɵɵclassMap(ctx_r0.radioClasses);
34
+ i0.ɵɵdomProperty("name", ctx_r0.label)("value", option_r3.value)("checked", ctx_r0.value === option_r3.value)("disabled", ctx_r0.disabled || option_r3.disabled);
35
+ i0.ɵɵattribute("data-state", ctx_r0.value === option_r3.value ? "checked" : "unchecked");
36
+ i0.ɵɵadvance();
37
+ i0.ɵɵclassMap(ctx_r0.cm.controlText);
38
+ i0.ɵɵadvance();
39
+ i0.ɵɵtextInterpolate(option_r3.label);
40
+ } }
41
+ function MoleculeRadioGroup_Conditional_5_Template(rf, ctx) { if (rf & 1) {
42
+ i0.ɵɵdomElementStart(0, "p");
43
+ i0.ɵɵtext(1);
44
+ i0.ɵɵdomElementEnd();
45
+ } if (rf & 2) {
46
+ const ctx_r0 = i0.ɵɵnextContext();
47
+ i0.ɵɵclassMap(ctx_r0.errorClasses);
48
+ i0.ɵɵadvance();
49
+ i0.ɵɵtextInterpolate(ctx_r0.error);
50
+ } }
51
+ /**
52
+ * Angular RadioGroup UI component with UIClassMap-driven styling.
53
+ */
54
+ /**
55
+ * Molecule Radio Group class.
56
+ * @deprecated Use the React-named component `RadioGroup` instead.
57
+ */
58
+ export class MoleculeRadioGroup {
59
+ options = [];
60
+ value;
61
+ size;
62
+ label;
63
+ direction = 'vertical';
64
+ error;
65
+ className;
66
+ style;
67
+ testId;
68
+ disabled = false;
69
+ valueChange = new EventEmitter();
70
+ /**
71
+ * Retrieves the current UI class map.
72
+ * @returns The UIClassMap instance for styling.
73
+ */
74
+ get cm() {
75
+ return getClassMap();
76
+ }
77
+ /**
78
+ * Computes the CSS classes for the radio group label.
79
+ * @returns The group label class name string.
80
+ */
81
+ get groupLabelClasses() {
82
+ return this.cm.cn(this.cm.label({}), this.cm.radioGroupLabel);
83
+ }
84
+ /**
85
+ * Computes the CSS classes for the layout direction.
86
+ * @returns The direction layout class name string.
87
+ */
88
+ get directionClasses() {
89
+ return this.cm.radioGroupLayout(this.direction);
90
+ }
91
+ /**
92
+ * Computes the CSS classes for radio input elements.
93
+ * @returns The radio input class name string.
94
+ */
95
+ get radioClasses() {
96
+ return this.cm.cn(this.cm.radio({ error: !!this.error }), this.cm.cursorPointer);
97
+ }
98
+ /**
99
+ * Computes the CSS classes for the error message.
100
+ * @returns The error class name string.
101
+ */
102
+ get errorClasses() {
103
+ return this.cm.cn(this.cm.formError, this.cm.sp('mt', 1));
104
+ }
105
+ /**
106
+ * Computes the CSS classes for an individual radio option label.
107
+ * @param option - The radio option to compute classes for.
108
+ * @returns The option label class name string.
109
+ */
110
+ getOptionLabelClasses(option) {
111
+ const isDisabled = this.disabled || option.disabled;
112
+ return this.cm.cn(this.cm.controlLabel, isDisabled && this.cm.controlDisabled);
113
+ }
114
+ /**
115
+ * Handles radio option selection change.
116
+ * @param optionValue - The value of the selected radio option.
117
+ */
118
+ onRadioChange(optionValue) {
119
+ this.valueChange.emit(optionValue);
120
+ }
121
+ static ɵfac = function MoleculeRadioGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeRadioGroup)(); };
122
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeRadioGroup, selectors: [["mol-radio-group"]], inputs: { options: "options", value: "value", size: "size", label: "label", direction: "direction", error: "error", className: "className", style: "style", testId: "testId", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, decls: 6, vars: 10, consts: [["role", "radiogroup"], [3, "class"], ["type", "radio", 3, "change", "name", "value", "checked", "disabled"]], template: function MoleculeRadioGroup_Template(rf, ctx) { if (rf & 1) {
123
+ i0.ɵɵdomElementStart(0, "div", 0);
124
+ i0.ɵɵconditionalCreate(1, MoleculeRadioGroup_Conditional_1_Template, 2, 3, "div", 1);
125
+ i0.ɵɵdomElementStart(2, "div");
126
+ i0.ɵɵrepeaterCreate(3, MoleculeRadioGroup_For_4_Template, 4, 12, "label", 1, _forTrack0);
127
+ i0.ɵɵdomElementEnd();
128
+ i0.ɵɵconditionalCreate(5, MoleculeRadioGroup_Conditional_5_Template, 2, 3, "p", 1);
129
+ i0.ɵɵdomElementEnd();
130
+ } if (rf & 2) {
131
+ i0.ɵɵstyleMap(ctx.style);
132
+ i0.ɵɵclassMap(ctx.className);
133
+ i0.ɵɵattribute("data-testid", ctx.testId)("aria-label", ctx.label);
134
+ i0.ɵɵadvance();
135
+ i0.ɵɵconditional(ctx.label ? 1 : -1);
136
+ i0.ɵɵadvance();
137
+ i0.ɵɵclassMap(ctx.directionClasses);
138
+ i0.ɵɵadvance();
139
+ i0.ɵɵrepeater(ctx.options);
140
+ i0.ɵɵadvance(2);
141
+ i0.ɵɵconditional(ctx.error ? 5 : -1);
142
+ } }, encapsulation: 2 });
143
+ }
144
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeRadioGroup, [{
145
+ type: Component,
146
+ args: [{
147
+ selector: 'mol-radio-group',
148
+ standalone: true,
149
+ changeDetection: ChangeDetectionStrategy.OnPush,
150
+ template: `
151
+ <div
152
+ [class]="className"
153
+ [style]="style"
154
+ [attr.data-testid]="testId"
155
+ role="radiogroup"
156
+ [attr.aria-label]="label"
157
+ >
158
+ @if (label) {
159
+ <div [class]="groupLabelClasses">{{ label }}</div>
160
+ }
161
+ <div [class]="directionClasses">
162
+ @for (option of options; track option.value) {
163
+ <label [class]="getOptionLabelClasses(option)">
164
+ <input
165
+ type="radio"
166
+ [name]="label"
167
+ [value]="option.value"
168
+ [checked]="value === option.value"
169
+ [disabled]="disabled || option.disabled"
170
+ [attr.data-state]="value === option.value ? 'checked' : 'unchecked'"
171
+ [class]="radioClasses"
172
+ (change)="onRadioChange(option.value)"
173
+ />
174
+ <span [class]="cm.controlText">{{ option.label }}</span>
175
+ </label>
176
+ }
177
+ </div>
178
+ @if (error) {
179
+ <p [class]="errorClasses">{{ error }}</p>
180
+ }
181
+ </div>
182
+ `,
183
+ }]
184
+ }], null, { options: [{
185
+ type: Input
186
+ }], value: [{
187
+ type: Input
188
+ }], size: [{
189
+ type: Input
190
+ }], label: [{
191
+ type: Input
192
+ }], direction: [{
193
+ type: Input
194
+ }], error: [{
195
+ type: Input
196
+ }], className: [{
197
+ type: Input
198
+ }], style: [{
199
+ type: Input
200
+ }], testId: [{
201
+ type: Input
202
+ }], disabled: [{
203
+ type: Input
204
+ }], valueChange: [{
205
+ type: Output
206
+ }] }); })();
207
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeRadioGroup, { className: "MoleculeRadioGroup", filePath: "components/molecule/radio-group.component.ts", lineNumber: 57 }); })();
208
+ //# sourceMappingURL=radio-group.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.component.js","sourceRoot":"","sources":["../../../src/components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