@molecule/app-ui-angular 1.0.5 → 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 +11742 -1145
  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 +10 -5
@@ -1,54 +1,97 @@
1
1
  /**
2
- * Angular Switch UI component with UIClassMap-driven styling.
2
+ * Switch component (React parity).
3
3
  *
4
4
  * @module
5
5
  */
6
- import { EventEmitter } from '@angular/core';
6
+ import { type AfterViewChecked, ElementRef, EventEmitter } from '@angular/core';
7
7
  import type { ColorVariant, Size, UIClassMap } from '@molecule/app-ui';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
- * Angular Switch UI component with UIClassMap-driven styling.
10
+ * Switch component.
11
+ *
12
+ * React's root is a fragment (hidden native checkbox + label); the host
13
+ * element is unwrapped by the DOM normalizer (`data-parity-unwrap`) and
14
+ * `display: contents` keeps real layout fragment-like. Clicking the visible
15
+ * button clicks the hidden checkbox, whose GENUINE native `change` event is
16
+ * forwarded as the `change` output.
11
17
  */
12
- export declare class MoleculeSwitch {
13
- label?: string;
14
- checked: boolean;
15
- size: Size;
18
+ export declare class Switch implements AfterViewChecked {
19
+ /** Switch label (text, or projected `[slot=label]` nodes). */
20
+ label?: unknown;
21
+ /** Whether the switch is on. */
22
+ checked?: boolean;
23
+ /** Switch size. */
24
+ size?: Size;
25
+ /** Switch color. */
16
26
  color?: ColorVariant;
27
+ /** Extra classes joined onto the switch classes. */
17
28
  className?: string;
18
- style?: Record<string, string>;
29
+ /** Inline style object (React camelCase). */
30
+ style?: Record<string, unknown>;
31
+ /** `data-testid` for the button. */
19
32
  testId?: string;
20
- disabled: boolean;
21
- checkedChange: EventEmitter<boolean>;
33
+ /** Disables the switch. */
34
+ disabled?: boolean;
35
+ /** The genuine native `change` event of the hidden checkbox. */
36
+ readonly change: EventEmitter<Event>;
37
+ /** The hidden native checkbox. */
38
+ hiddenInput?: ElementRef<HTMLInputElement>;
39
+ /** The visible trigger button (React's `...rest` spread target). */
40
+ trigger?: ElementRef<HTMLButtonElement>;
41
+ /** The label text wrapper. */
42
+ labelSlot?: ElementRef<HTMLSpanElement>;
43
+ private readonly host;
44
+ private hasLabel;
45
+ private readonly sync;
46
+ /**
47
+ * The current class map.
48
+ * @returns The UIClassMap.
49
+ */
50
+ cm(): UIClassMap;
51
+ /**
52
+ * The data-state of the switch and thumb.
53
+ * @returns `checked` or `unchecked`.
54
+ */
55
+ state(): 'checked' | 'unchecked';
22
56
  /**
23
- * Retrieves the current UI class map.
24
- * @returns The UIClassMap instance for styling.
57
+ * Computes the switch button class list.
58
+ * @returns The class string.
25
59
  */
26
- get cm(): UIClassMap;
60
+ classes(): string;
27
61
  /**
28
- * Computes the current checked/unchecked state string.
29
- * @returns The state string, either "checked" or "unchecked".
62
+ * Computes the label class list.
63
+ * @returns The class string.
30
64
  */
31
- get state(): string;
65
+ labelClasses(): string;
32
66
  /**
33
- * Computes the CSS classes for the switch wrapper label.
34
- * @returns The wrapper class name string.
67
+ * Serializes the inline style for the button.
68
+ * @returns The style attribute text.
35
69
  */
36
- get wrapperClasses(): string;
70
+ hostStyle(): string | null;
37
71
  /**
38
- * Computes the combined CSS classes for the switch button.
39
- * @returns The switch class name string.
72
+ * Clicking the button clicks the hidden checkbox (unless disabled or the
73
+ * event was vetoed), exactly like React's handler.
74
+ *
75
+ * @param event - The button click event.
40
76
  */
41
- get switchClasses(): string;
77
+ handleClick(event: Event): void;
42
78
  /**
43
- * Computes the CSS classes for the switch thumb indicator.
44
- * @returns The thumb class name string.
79
+ * Forwards the hidden checkbox's genuine native `change` event (React
80
+ * forwards the raw browser event, not a React synthetic one) and then
81
+ * restores the controlled value, like React's controlled-input state
82
+ * restore (the input mirrors the `checked` prop, never free user state).
83
+ * The event's propagation stops here so the host-level `change` binding
84
+ * does not record it a second time.
85
+ *
86
+ * @param event - The native change event.
45
87
  */
46
- get thumbClasses(): string;
88
+ handleChange(event: Event): void;
47
89
  /**
48
- * Handles the switch toggle action.
90
+ * Moves rest attributes onto the button and applies React's
91
+ * `{!!label && <span>}` label condition after queries resolve.
49
92
  */
50
- onToggle(): void;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeSwitch, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeSwitch, "mol-switch", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, true, never>;
93
+ ngAfterViewChecked(): void;
94
+ static ɵfac: i0.ɵɵFactoryDeclaration<Switch, never>;
95
+ static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "mol-switch", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; }, never, ["[slot=label]"], true, never>;
53
96
  }
54
97
  //# sourceMappingURL=switch.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component.d.ts","sourceRoot":"","sources":["../../src/components/switch.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsC,YAAY,EAAiB,MAAM,eAAe,CAAA;AAE/F,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGtE;;GAEG;AACH,qBA4Ba,cAAc;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,UAAQ;IACf,IAAI,EAAE,IAAI,CAAO;IACjB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,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,aAAa,wBAA8B;IAErD;;;OAGG;IACH,IAAI,EAAE,IAAI,UAAU,CAEnB;IAED;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;OAEG;IACH,QAAQ,IAAI,IAAI;yCAvDL,cAAc;2CAAd,cAAc;CA4D1B"}
1
+ {"version":3,"file":"switch.component.d.ts","sourceRoot":"","sources":["../../src/components/switch.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,gBAAgB,EAErB,UAAU,EACV,YAAY,EAKb,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAOtE;;;;;;;;GAQG;AACH,qBAsCa,MAAO,YAAW,gBAAgB;IAC7C,8DAA8D;IAC9D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,oBAAoB;IACpB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,gEAAgE;IACtD,QAAQ,CAAC,MAAM,sBAA4B;IAErD,kCAAkC;IACR,WAAW,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;IACpE,oEAAoE;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC7D,8BAA8B;IACN,SAAS,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAA;IAE/D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyD;IAE9E;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,KAAK,IAAI,SAAS,GAAG,WAAW;IAIhC;;;OAGG;IACH,OAAO,IAAI,MAAM;IAOjB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI/B;;;;;;;;;OASG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAOhC;;;OAGG;IACH,kBAAkB,IAAI,IAAI;yCA1Gf,MAAM;2CAAN,MAAM;CAmHlB"}
@@ -1,147 +1,219 @@
1
1
  /**
2
- * Angular Switch UI component with UIClassMap-driven styling.
2
+ * Switch component (React parity).
3
3
  *
4
4
  * @module
5
5
  */
6
- import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
6
+ import { Component, ElementRef, EventEmitter, inject, Output, Renderer2, ViewChild, } from '@angular/core';
7
7
  import { getClassMap } from '@molecule/app-ui';
8
+ import { moveRestAttributes } from '../utilities/rest-attrs.js';
9
+ import { styleText } from '../utilities/style.js';
10
+ import { hasNodes, SlotWrapper } from './button.component.js';
8
11
  import * as i0 from "@angular/core";
9
- function MoleculeSwitch_Conditional_3_Template(rf, ctx) { if (rf & 1) {
10
- i0.ɵɵdomElementStart(0, "span");
11
- i0.ɵɵtext(1);
12
- i0.ɵɵdomElementEnd();
13
- } if (rf & 2) {
14
- const ctx_r0 = i0.ɵɵnextContext();
15
- i0.ɵɵclassMap(ctx_r0.cm.controlText);
16
- i0.ɵɵadvance();
17
- i0.ɵɵtextInterpolate(ctx_r0.label);
18
- } }
12
+ const _c0 = ["hiddenInput"];
13
+ const _c1 = ["trigger"];
14
+ const _c2 = ["labelSlot"];
15
+ const _c3 = [[["", "slot", "label"]]];
16
+ const _c4 = ["[slot=label]"];
17
+ const _c5 = a0 => ({ size: a0 });
19
18
  /**
20
- * Angular Switch UI component with UIClassMap-driven styling.
21
- */
22
- /**
23
- * Molecule Switch class.
19
+ * Switch component.
20
+ *
21
+ * React's root is a fragment (hidden native checkbox + label); the host
22
+ * element is unwrapped by the DOM normalizer (`data-parity-unwrap`) and
23
+ * `display: contents` keeps real layout fragment-like. Clicking the visible
24
+ * button clicks the hidden checkbox, whose GENUINE native `change` event is
25
+ * forwarded as the `change` output.
24
26
  */
25
- export class MoleculeSwitch {
27
+ export class Switch {
28
+ /** Switch label (text, or projected `[slot=label]` nodes). */
26
29
  label;
27
- checked = false;
28
- size = 'md';
30
+ /** Whether the switch is on. */
31
+ checked;
32
+ /** Switch size. */
33
+ size;
34
+ /** Switch color. */
29
35
  color;
36
+ /** Extra classes joined onto the switch classes. */
30
37
  className;
38
+ /** Inline style object (React camelCase). */
31
39
  style;
40
+ /** `data-testid` for the button. */
32
41
  testId;
33
- disabled = false;
34
- checkedChange = new EventEmitter();
42
+ /** Disables the switch. */
43
+ disabled;
44
+ /** The genuine native `change` event of the hidden checkbox. */
45
+ change = new EventEmitter();
46
+ /** The hidden native checkbox. */
47
+ hiddenInput;
48
+ /** The visible trigger button (React's `...rest` spread target). */
49
+ trigger;
50
+ /** The label text wrapper. */
51
+ labelSlot;
52
+ host = inject(ElementRef);
53
+ hasLabel = false;
54
+ sync = new SlotWrapper(inject(ElementRef), inject(Renderer2));
35
55
  /**
36
- * Retrieves the current UI class map.
37
- * @returns The UIClassMap instance for styling.
56
+ * The current class map.
57
+ * @returns The UIClassMap.
38
58
  */
39
- get cm() {
59
+ cm() {
40
60
  return getClassMap();
41
61
  }
42
62
  /**
43
- * Computes the current checked/unchecked state string.
44
- * @returns The state string, either "checked" or "unchecked".
63
+ * The data-state of the switch and thumb.
64
+ * @returns `checked` or `unchecked`.
45
65
  */
46
- get state() {
66
+ state() {
47
67
  return this.checked ? 'checked' : 'unchecked';
48
68
  }
49
69
  /**
50
- * Computes the CSS classes for the switch wrapper label.
51
- * @returns The wrapper class name string.
70
+ * Computes the switch button class list.
71
+ * @returns The class string.
72
+ */
73
+ classes() {
74
+ return this.cm().cn(this.cm().switchBase({ size: this.size ?? 'md', color: this.color }), this.className);
75
+ }
76
+ /**
77
+ * Computes the label class list.
78
+ * @returns The class string.
52
79
  */
53
- get wrapperClasses() {
54
- return this.cm.cn(this.cm.controlLabel, this.disabled && this.cm.controlDisabled);
80
+ labelClasses() {
81
+ return this.cm().cn(this.cm().controlLabel, this.disabled && this.cm().controlDisabled);
55
82
  }
56
83
  /**
57
- * Computes the combined CSS classes for the switch button.
58
- * @returns The switch class name string.
84
+ * Serializes the inline style for the button.
85
+ * @returns The style attribute text.
59
86
  */
60
- get switchClasses() {
61
- return this.cm.cn(this.cm.switchBase({ size: this.size }), this.className);
87
+ hostStyle() {
88
+ return styleText(this.style);
62
89
  }
63
90
  /**
64
- * Computes the CSS classes for the switch thumb indicator.
65
- * @returns The thumb class name string.
91
+ * Clicking the button clicks the hidden checkbox (unless disabled or the
92
+ * event was vetoed), exactly like React's handler.
93
+ *
94
+ * @param event - The button click event.
66
95
  */
67
- get thumbClasses() {
68
- return this.cm.switchThumb({ size: this.size });
96
+ handleClick(event) {
97
+ if (!this.disabled && !event.defaultPrevented)
98
+ this.hiddenInput?.nativeElement.click();
69
99
  }
70
100
  /**
71
- * Handles the switch toggle action.
101
+ * Forwards the hidden checkbox's genuine native `change` event (React
102
+ * forwards the raw browser event, not a React synthetic one) and then
103
+ * restores the controlled value, like React's controlled-input state
104
+ * restore (the input mirrors the `checked` prop, never free user state).
105
+ * The event's propagation stops here so the host-level `change` binding
106
+ * does not record it a second time.
107
+ *
108
+ * @param event - The native change event.
72
109
  */
73
- onToggle() {
74
- if (!this.disabled) {
75
- this.checkedChange.emit(!this.checked);
76
- }
110
+ handleChange(event) {
111
+ event.stopPropagation();
112
+ this.change.emit(event);
113
+ const input = this.hiddenInput?.nativeElement;
114
+ if (input)
115
+ input.checked = !!this.checked;
77
116
  }
78
- static ɵfac = function MoleculeSwitch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeSwitch)(); };
79
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeSwitch, selectors: [["mol-switch"]], inputs: { label: "label", checked: "checked", size: "size", color: "color", className: "className", style: "style", testId: "testId", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, decls: 4, vars: 14, consts: [["type", "button", "role", "switch", 3, "click", "disabled"], [3, "class"]], template: function MoleculeSwitch_Template(rf, ctx) { if (rf & 1) {
80
- i0.ɵɵdomElementStart(0, "label")(1, "button", 0);
81
- i0.ɵɵdomListener("click", function MoleculeSwitch_Template_button_click_1_listener() { return ctx.onToggle(); });
82
- i0.ɵɵdomElement(2, "span");
117
+ /**
118
+ * Moves rest attributes onto the button and applies React's
119
+ * `{!!label && <span>}` label condition after queries resolve.
120
+ */
121
+ ngAfterViewChecked() {
122
+ moveRestAttributes(this.host.nativeElement, this.trigger?.nativeElement);
123
+ this.hasLabel = !!this.label || hasNodes(this.labelSlot?.nativeElement);
124
+ this.sync.sync(this.labelSlot?.nativeElement, this.hasLabel, this.labelSlot?.nativeElement.parentElement ?? undefined);
125
+ }
126
+ static ɵfac = function Switch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Switch)(); };
127
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Switch, selectors: [["mol-switch"]], viewQuery: function Switch_Query(rf, ctx) { if (rf & 1) {
128
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5);
129
+ } if (rf & 2) {
130
+ let _t;
131
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.hiddenInput = _t.first);
132
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.trigger = _t.first);
133
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.labelSlot = _t.first);
134
+ } }, hostAttrs: ["data-parity-unwrap", "", 2, "display", "contents"], inputs: { label: "label", checked: "checked", size: "size", color: "color", className: "className", style: "style", testId: "testId", disabled: "disabled" }, outputs: { change: "change" }, ngContentSelectors: _c4, decls: 10, vars: 21, consts: [["hiddenInput", ""], ["trigger", ""], ["labelSlot", ""], ["type", "checkbox", "aria-hidden", "true", "tabindex", "-1", 3, "change", "disabled"], ["type", "button", "role", "switch", 3, "click", "disabled"]], template: function Switch_Template(rf, ctx) { if (rf & 1) {
135
+ i0.ɵɵprojectionDef(_c3);
136
+ i0.ɵɵdomElementStart(0, "input", 3, 0);
137
+ i0.ɵɵdomListener("change", function Switch_Template_input_change_0_listener($event) { return ctx.handleChange($event); });
83
138
  i0.ɵɵdomElementEnd();
84
- i0.ɵɵconditionalCreate(3, MoleculeSwitch_Conditional_3_Template, 2, 3, "span", 1);
139
+ i0.ɵɵdomElementStart(2, "label")(3, "button", 4, 1);
140
+ i0.ɵɵdomListener("click", function Switch_Template_button_click_3_listener($event) { return ctx.handleClick($event); });
141
+ i0.ɵɵdomElement(5, "span");
85
142
  i0.ɵɵdomElementEnd();
143
+ i0.ɵɵdomElementStart(6, "span", null, 2);
144
+ i0.ɵɵtext(8);
145
+ i0.ɵɵprojection(9);
146
+ i0.ɵɵdomElementEnd()();
86
147
  } if (rf & 2) {
87
- i0.ɵɵclassMap(ctx.wrapperClasses);
88
- i0.ɵɵadvance();
89
- i0.ɵɵstyleMap(ctx.style);
90
- i0.ɵɵclassMap(ctx.switchClasses);
148
+ i0.ɵɵclassMap(ctx.cm().srOnly);
91
149
  i0.ɵɵdomProperty("disabled", ctx.disabled);
92
- i0.ɵɵattribute("aria-checked", ctx.checked)("data-state", ctx.state)("data-testid", ctx.testId);
150
+ i0.ɵɵattribute("checked", ctx.checked ? "" : null);
151
+ i0.ɵɵadvance(2);
152
+ i0.ɵɵclassMap(ctx.labelClasses());
93
153
  i0.ɵɵadvance();
94
- i0.ɵɵclassMap(ctx.thumbClasses);
95
- i0.ɵɵattribute("data-state", ctx.state);
154
+ i0.ɵɵclassMap(ctx.classes());
155
+ i0.ɵɵdomProperty("disabled", ctx.disabled);
156
+ i0.ɵɵattribute("aria-checked", ctx.checked ? "true" : "false")("data-state", ctx.state())("style", ctx.hostStyle(), i0.ɵɵsanitizeStyle)("data-testid", ctx.testId);
157
+ i0.ɵɵadvance(2);
158
+ i0.ɵɵclassMap(ctx.cm().switchThumb(i0.ɵɵpureFunction1(19, _c5, ctx.size ?? "md")));
159
+ i0.ɵɵattribute("data-state", ctx.state());
96
160
  i0.ɵɵadvance();
97
- i0.ɵɵconditional(ctx.label ? 3 : -1);
161
+ i0.ɵɵclassMap(ctx.cm().controlText);
162
+ i0.ɵɵadvance(2);
163
+ i0.ɵɵtextInterpolate(ctx.label);
98
164
  } }, encapsulation: 2 });
99
165
  }
100
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeSwitch, [{
166
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Switch, [{
101
167
  type: Component,
102
168
  args: [{
103
169
  selector: 'mol-switch',
104
170
  standalone: true,
105
- changeDetection: ChangeDetectionStrategy.OnPush,
106
- template: `
107
- <label [class]="wrapperClasses">
171
+ inputs: ['label', 'checked', 'size', 'color', 'className', 'style', 'testId', 'disabled'],
172
+ host: {
173
+ 'data-parity-unwrap': '',
174
+ style: 'display: contents',
175
+ },
176
+ template: `<input
177
+ type="checkbox"
178
+ [attr.checked]="checked ? '' : null"
179
+ [disabled]="disabled"
180
+ aria-hidden="true"
181
+ tabindex="-1"
182
+ [class]="cm().srOnly"
183
+ (change)="handleChange($event)"
184
+ #hiddenInput
185
+ />
186
+ <label [class]="labelClasses()">
108
187
  <button
109
188
  type="button"
110
189
  role="switch"
111
- [attr.aria-checked]="checked"
190
+ [attr.aria-checked]="checked ? 'true' : 'false'"
112
191
  [disabled]="disabled"
113
- [attr.data-state]="state"
114
- [class]="switchClasses"
115
- [style]="style"
192
+ [attr.data-state]="state()"
193
+ (click)="handleClick($event)"
194
+ [class]="classes()"
195
+ [attr.style]="hostStyle()"
116
196
  [attr.data-testid]="testId"
117
- (click)="onToggle()"
197
+ #trigger
118
198
  >
119
- <span [attr.data-state]="state" [class]="thumbClasses"></span>
199
+ <span [attr.data-state]="state()" [class]="cm().switchThumb({ size: size ?? 'md' })"></span>
120
200
  </button>
121
- @if (label) {
122
- <span [class]="cm.controlText">{{ label }}</span>
123
- }
124
- </label>
125
- `,
201
+ <span [class]="cm().controlText" #labelSlot
202
+ >{{ label }}<ng-content select="[slot=label]"></ng-content
203
+ ></span>
204
+ </label>`,
126
205
  }]
127
- }], null, { label: [{
128
- type: Input
129
- }], checked: [{
130
- type: Input
131
- }], size: [{
132
- type: Input
133
- }], color: [{
134
- type: Input
135
- }], className: [{
136
- type: Input
137
- }], style: [{
138
- type: Input
139
- }], testId: [{
140
- type: Input
141
- }], disabled: [{
142
- type: Input
143
- }], checkedChange: [{
206
+ }], null, { change: [{
144
207
  type: Output
208
+ }], hiddenInput: [{
209
+ type: ViewChild,
210
+ args: ['hiddenInput']
211
+ }], trigger: [{
212
+ type: ViewChild,
213
+ args: ['trigger']
214
+ }], labelSlot: [{
215
+ type: ViewChild,
216
+ args: ['labelSlot']
145
217
  }] }); })();
146
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeSwitch, { className: "MoleculeSwitch", filePath: "components/switch.component.ts", lineNumber: 43 }); })();
218
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Switch, { className: "Switch", filePath: "components/switch.component.ts", lineNumber: 72 }); })();
147
219
  //# sourceMappingURL=switch.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component.js","sourceRoot":"","sources":["../../src/components/switch.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;IAyBtC,+BAA+B;IAAA,YAAW;IAAA,oBAAO;;;IAA3C,oCAAwB;IAAC,cAAW;IAAX,kCAAW;;AAvBlD;;GAEG;AA0BH;;GAEG;AACH,MAAM,OAAO,cAAc;IAChB,KAAK,CAAS;IACd,OAAO,GAAG,KAAK,CAAA;IACf,IAAI,GAAS,IAAI,CAAA;IACjB,KAAK,CAAe;IACpB,SAAS,CAAS;IAClB,KAAK,CAAyB;IAC9B,MAAM,CAAS;IACf,QAAQ,GAAG,KAAK,CAAA;IAEf,aAAa,GAAG,IAAI,YAAY,EAAW,CAAA;IAErD;;;OAGG;IACH,IAAI,EAAE;QACJ,OAAO,WAAW,EAAE,CAAA;IACtB,CAAC;IAED;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAA;IAC/C,CAAC;IAED;;;OAGG;IACH,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,CAAA;IACnF,CAAC;IAED;;;OAGG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC5E,CAAC;IAED;;;OAGG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IACjD,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;wGA3DU,cAAc;6DAAd,cAAc;YAtBrB,AADF,gCAAgC,gBAW7B;YADC,8FAAS,cAAU,IAAC;YAEpB,0BAA8D;YAChE,oBAAS;YACT,iFAAa;YAGf,oBAAQ;;YAjBD,iCAAwB;YAQ3B,cAAe;YAAf,wBAAe;YADf,gCAAuB;YAFvB,0CAAqB;;YAOW,cAAsB;YAAtB,+BAAsB;;YAExD,cAEC;YAFD,oCAEC;;;iFAOM,cAAc;cA5B1B,SAAS;eAAC;gBACT,QAAQ,EAAE,YAAY;gBACtB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;GAmBT;aACF;;kBAKE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kFAVI,cAAc"}
1
+ {"version":3,"file":"switch.component.js","sourceRoot":"","sources":["../../src/components/switch.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;A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