@molecule/app-ui-angular 1.0.6 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +11710 -1117
  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 +97 -29
  31. package/dist/components/checkbox.component.d.ts.map +1 -1
  32. package/dist/components/checkbox.component.js +222 -117
  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/controlled-checked.directive.d.ts +45 -0
  43. package/dist/components/controlled-checked.directive.d.ts.map +1 -0
  44. package/dist/components/controlled-checked.directive.js +74 -0
  45. package/dist/components/controlled-checked.directive.js.map +1 -0
  46. package/dist/components/dropdown.component.d.ts +313 -0
  47. package/dist/components/dropdown.component.d.ts.map +1 -0
  48. package/dist/components/dropdown.component.js +919 -0
  49. package/dist/components/dropdown.component.js.map +1 -0
  50. package/dist/components/empty-state.component.d.ts +73 -0
  51. package/dist/components/empty-state.component.d.ts.map +1 -0
  52. package/dist/components/empty-state.component.js +180 -0
  53. package/dist/components/empty-state.component.js.map +1 -0
  54. package/dist/components/floating-input.component.d.ts +86 -0
  55. package/dist/components/floating-input.component.d.ts.map +1 -0
  56. package/dist/components/floating-input.component.js +167 -0
  57. package/dist/components/floating-input.component.js.map +1 -0
  58. package/dist/components/form-field.component.d.ts +111 -0
  59. package/dist/components/form-field.component.d.ts.map +1 -0
  60. package/dist/components/form-field.component.js +300 -0
  61. package/dist/components/form-field.component.js.map +1 -0
  62. package/dist/components/form.component.d.ts +77 -0
  63. package/dist/components/form.component.d.ts.map +1 -0
  64. package/dist/components/form.component.js +222 -0
  65. package/dist/components/form.component.js.map +1 -0
  66. package/dist/components/icon.component.d.ts +85 -0
  67. package/dist/components/icon.component.d.ts.map +1 -0
  68. package/dist/components/icon.component.js +187 -0
  69. package/dist/components/icon.component.js.map +1 -0
  70. package/dist/components/index.d.ts +49 -0
  71. package/dist/components/index.d.ts.map +1 -1
  72. package/dist/components/index.js +49 -0
  73. package/dist/components/index.js.map +1 -1
  74. package/dist/components/input.component.d.ts +157 -54
  75. package/dist/components/input.component.d.ts.map +1 -1
  76. package/dist/components/input.component.js +437 -222
  77. package/dist/components/input.component.js.map +1 -1
  78. package/dist/components/label.component.d.ts +29 -0
  79. package/dist/components/label.component.d.ts.map +1 -0
  80. package/dist/components/label.component.js +60 -0
  81. package/dist/components/label.component.js.map +1 -0
  82. package/dist/components/language-picker.component.d.ts +124 -0
  83. package/dist/components/language-picker.component.d.ts.map +1 -0
  84. package/dist/components/language-picker.component.js +305 -0
  85. package/dist/components/language-picker.component.js.map +1 -0
  86. package/dist/components/layout.component.d.ts +167 -0
  87. package/dist/components/layout.component.d.ts.map +1 -0
  88. package/dist/components/layout.component.js +364 -0
  89. package/dist/components/layout.component.js.map +1 -0
  90. package/dist/components/load-error-banner.component.d.ts +103 -0
  91. package/dist/components/load-error-banner.component.d.ts.map +1 -0
  92. package/dist/components/load-error-banner.component.js +263 -0
  93. package/dist/components/load-error-banner.component.js.map +1 -0
  94. package/dist/components/modal.component.d.ts +125 -95
  95. package/dist/components/modal.component.d.ts.map +1 -1
  96. package/dist/components/modal.component.js +458 -271
  97. package/dist/components/modal.component.js.map +1 -1
  98. package/dist/components/molecule/alert.component.d.ts +77 -0
  99. package/dist/components/molecule/alert.component.d.ts.map +1 -0
  100. package/dist/components/molecule/alert.component.js +229 -0
  101. package/dist/components/molecule/alert.component.js.map +1 -0
  102. package/dist/components/molecule/badge.component.d.ts +27 -0
  103. package/dist/components/molecule/badge.component.d.ts.map +1 -0
  104. package/dist/components/molecule/badge.component.js +79 -0
  105. package/dist/components/molecule/badge.component.js.map +1 -0
  106. package/dist/components/molecule/button.component.d.ts +38 -0
  107. package/dist/components/molecule/button.component.d.ts.map +1 -0
  108. package/dist/components/molecule/button.component.js +137 -0
  109. package/dist/components/molecule/button.component.js.map +1 -0
  110. package/dist/components/molecule/checkbox.component.d.ts +53 -0
  111. package/dist/components/molecule/checkbox.component.d.ts.map +1 -0
  112. package/dist/components/molecule/checkbox.component.js +166 -0
  113. package/dist/components/molecule/checkbox.component.js.map +1 -0
  114. package/dist/components/molecule/index.d.ts +18 -0
  115. package/dist/components/molecule/index.d.ts.map +1 -0
  116. package/dist/components/molecule/index.js +18 -0
  117. package/dist/components/molecule/index.js.map +1 -0
  118. package/dist/components/molecule/input.component.d.ts +93 -0
  119. package/dist/components/molecule/input.component.d.ts.map +1 -0
  120. package/dist/components/molecule/input.component.js +314 -0
  121. package/dist/components/molecule/input.component.js.map +1 -0
  122. package/dist/components/molecule/modal.component.d.ts +148 -0
  123. package/dist/components/molecule/modal.component.d.ts.map +1 -0
  124. package/dist/components/molecule/modal.component.js +382 -0
  125. package/dist/components/molecule/modal.component.js.map +1 -0
  126. package/dist/components/molecule/radio-group.component.d.ts +63 -0
  127. package/dist/components/molecule/radio-group.component.d.ts.map +1 -0
  128. package/dist/components/molecule/radio-group.component.js +208 -0
  129. package/dist/components/molecule/radio-group.component.js.map +1 -0
  130. package/dist/components/molecule/select.component.d.ts +72 -0
  131. package/dist/components/molecule/select.component.d.ts.map +1 -0
  132. package/dist/components/molecule/select.component.js +274 -0
  133. package/dist/components/molecule/select.component.js.map +1 -0
  134. package/dist/components/molecule/spinner.component.d.ts +42 -0
  135. package/dist/components/molecule/spinner.component.d.ts.map +1 -0
  136. package/dist/components/molecule/spinner.component.js +122 -0
  137. package/dist/components/molecule/spinner.component.js.map +1 -0
  138. package/dist/components/molecule/switch.component.d.ts +54 -0
  139. package/dist/components/molecule/switch.component.d.ts.map +1 -0
  140. package/dist/components/molecule/switch.component.js +148 -0
  141. package/dist/components/molecule/switch.component.js.map +1 -0
  142. package/dist/components/molecule/toast.component.d.ts +98 -0
  143. package/dist/components/molecule/toast.component.d.ts.map +1 -0
  144. package/dist/components/molecule/toast.component.js +305 -0
  145. package/dist/components/molecule/toast.component.js.map +1 -0
  146. package/dist/components/molecule/tooltip.component.d.ts +77 -0
  147. package/dist/components/molecule/tooltip.component.d.ts.map +1 -0
  148. package/dist/components/molecule/tooltip.component.js +316 -0
  149. package/dist/components/molecule/tooltip.component.js.map +1 -0
  150. package/dist/components/optimistic-toggle-button.component.d.ts +125 -0
  151. package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -0
  152. package/dist/components/optimistic-toggle-button.component.js +296 -0
  153. package/dist/components/optimistic-toggle-button.component.js.map +1 -0
  154. package/dist/components/page-header.component.d.ts +77 -0
  155. package/dist/components/page-header.component.d.ts.map +1 -0
  156. package/dist/components/page-header.component.js +225 -0
  157. package/dist/components/page-header.component.js.map +1 -0
  158. package/dist/components/page-shell.component.d.ts +101 -0
  159. package/dist/components/page-shell.component.d.ts.map +1 -0
  160. package/dist/components/page-shell.component.js +221 -0
  161. package/dist/components/page-shell.component.js.map +1 -0
  162. package/dist/components/pagination.component.d.ts +137 -0
  163. package/dist/components/pagination.component.d.ts.map +1 -0
  164. package/dist/components/pagination.component.js +419 -0
  165. package/dist/components/pagination.component.js.map +1 -0
  166. package/dist/components/panel-close.component.d.ts +43 -0
  167. package/dist/components/panel-close.component.d.ts.map +1 -0
  168. package/dist/components/panel-close.component.js +75 -0
  169. package/dist/components/panel-close.component.js.map +1 -0
  170. package/dist/components/progress.component.d.ts +84 -0
  171. package/dist/components/progress.component.d.ts.map +1 -0
  172. package/dist/components/progress.component.js +219 -0
  173. package/dist/components/progress.component.js.map +1 -0
  174. package/dist/components/prompt-dialog.component.d.ts +121 -0
  175. package/dist/components/prompt-dialog.component.d.ts.map +1 -0
  176. package/dist/components/prompt-dialog.component.js +332 -0
  177. package/dist/components/prompt-dialog.component.js.map +1 -0
  178. package/dist/components/radio-group.component.d.ts +66 -34
  179. package/dist/components/radio-group.component.d.ts.map +1 -1
  180. package/dist/components/radio-group.component.js +157 -134
  181. package/dist/components/radio-group.component.js.map +1 -1
  182. package/dist/components/responsive-app-shell.component.d.ts +408 -0
  183. package/dist/components/responsive-app-shell.component.d.ts.map +1 -0
  184. package/dist/components/responsive-app-shell.component.js +1144 -0
  185. package/dist/components/responsive-app-shell.component.js.map +1 -0
  186. package/dist/components/select.component.d.ts +135 -38
  187. package/dist/components/select.component.d.ts.map +1 -1
  188. package/dist/components/select.component.js +373 -181
  189. package/dist/components/select.component.js.map +1 -1
  190. package/dist/components/separator.component.d.ts +39 -0
  191. package/dist/components/separator.component.d.ts.map +1 -0
  192. package/dist/components/separator.component.js +73 -0
  193. package/dist/components/separator.component.js.map +1 -0
  194. package/dist/components/sidebar-user-card.component.d.ts +106 -0
  195. package/dist/components/sidebar-user-card.component.d.ts.map +1 -0
  196. package/dist/components/sidebar-user-card.component.js +277 -0
  197. package/dist/components/sidebar-user-card.component.js.map +1 -0
  198. package/dist/components/skeleton.component.d.ts +100 -0
  199. package/dist/components/skeleton.component.d.ts.map +1 -0
  200. package/dist/components/skeleton.component.js +214 -0
  201. package/dist/components/skeleton.component.js.map +1 -0
  202. package/dist/components/spinner.component.d.ts +36 -19
  203. package/dist/components/spinner.component.d.ts.map +1 -1
  204. package/dist/components/spinner.component.js +69 -71
  205. package/dist/components/spinner.component.js.map +1 -1
  206. package/dist/components/switch.component.d.ts +72 -29
  207. package/dist/components/switch.component.d.ts.map +1 -1
  208. package/dist/components/switch.component.js +168 -95
  209. package/dist/components/switch.component.js.map +1 -1
  210. package/dist/components/table.component.d.ts +193 -0
  211. package/dist/components/table.component.d.ts.map +1 -0
  212. package/dist/components/table.component.js +550 -0
  213. package/dist/components/table.component.js.map +1 -0
  214. package/dist/components/tabs.component.d.ts +140 -0
  215. package/dist/components/tabs.component.d.ts.map +1 -0
  216. package/dist/components/tabs.component.js +390 -0
  217. package/dist/components/tabs.component.js.map +1 -0
  218. package/dist/components/template-outlet.directive.d.ts +50 -0
  219. package/dist/components/template-outlet.directive.d.ts.map +1 -0
  220. package/dist/components/template-outlet.directive.js +81 -0
  221. package/dist/components/template-outlet.directive.js.map +1 -0
  222. package/dist/components/textarea.component.d.ts +151 -0
  223. package/dist/components/textarea.component.d.ts.map +1 -0
  224. package/dist/components/textarea.component.js +340 -0
  225. package/dist/components/textarea.component.js.map +1 -0
  226. package/dist/components/theme-toggle.component.d.ts +58 -0
  227. package/dist/components/theme-toggle.component.d.ts.map +1 -0
  228. package/dist/components/theme-toggle.component.js +124 -0
  229. package/dist/components/theme-toggle.component.js.map +1 -0
  230. package/dist/components/toast.component.d.ts +237 -49
  231. package/dist/components/toast.component.d.ts.map +1 -1
  232. package/dist/components/toast.component.js +636 -201
  233. package/dist/components/toast.component.js.map +1 -1
  234. package/dist/components/tooltip.component.d.ts +95 -45
  235. package/dist/components/tooltip.component.d.ts.map +1 -1
  236. package/dist/components/tooltip.component.js +372 -221
  237. package/dist/components/tooltip.component.js.map +1 -1
  238. package/dist/components/user-menu-popover.component.d.ts +283 -0
  239. package/dist/components/user-menu-popover.component.d.ts.map +1 -0
  240. package/dist/components/user-menu-popover.component.js +646 -0
  241. package/dist/components/user-menu-popover.component.js.map +1 -0
  242. package/dist/components/user-menu.component.d.ts +95 -0
  243. package/dist/components/user-menu.component.d.ts.map +1 -0
  244. package/dist/components/user-menu.component.js +218 -0
  245. package/dist/components/user-menu.component.js.map +1 -0
  246. package/dist/hooks/index.d.ts +7 -0
  247. package/dist/hooks/index.d.ts.map +1 -0
  248. package/dist/hooks/index.js +7 -0
  249. package/dist/hooks/index.js.map +1 -0
  250. package/dist/hooks/use-is-desktop.d.ts +22 -0
  251. package/dist/hooks/use-is-desktop.d.ts.map +1 -0
  252. package/dist/hooks/use-is-desktop.js +37 -0
  253. package/dist/hooks/use-is-desktop.js.map +1 -0
  254. package/dist/index.d.ts +32 -17
  255. package/dist/index.d.ts.map +1 -1
  256. package/dist/index.js +32 -17
  257. package/dist/index.js.map +1 -1
  258. package/dist/types.d.ts +1 -1
  259. package/dist/types.d.ts.map +1 -1
  260. package/dist/utilities/dom-context.d.ts +42 -0
  261. package/dist/utilities/dom-context.d.ts.map +1 -0
  262. package/dist/utilities/dom-context.js +66 -0
  263. package/dist/utilities/dom-context.js.map +1 -0
  264. package/dist/utilities/focus.d.ts +32 -0
  265. package/dist/utilities/focus.d.ts.map +1 -0
  266. package/dist/utilities/focus.js +47 -0
  267. package/dist/utilities/focus.js.map +1 -0
  268. package/dist/utilities/form-field-context.d.ts +34 -0
  269. package/dist/utilities/form-field-context.d.ts.map +1 -0
  270. package/dist/utilities/form-field-context.js +28 -0
  271. package/dist/utilities/form-field-context.js.map +1 -0
  272. package/dist/utilities/form-submit-error.d.ts +17 -0
  273. package/dist/utilities/form-submit-error.d.ts.map +1 -0
  274. package/dist/utilities/form-submit-error.js +42 -0
  275. package/dist/utilities/form-submit-error.js.map +1 -0
  276. package/dist/utilities/icon-markup.d.ts +17 -0
  277. package/dist/utilities/icon-markup.d.ts.map +1 -0
  278. package/dist/utilities/icon-markup.js +46 -0
  279. package/dist/utilities/icon-markup.js.map +1 -0
  280. package/dist/utilities/ids.d.ts +15 -0
  281. package/dist/utilities/ids.d.ts.map +1 -0
  282. package/dist/utilities/ids.js +19 -0
  283. package/dist/utilities/ids.js.map +1 -0
  284. package/dist/utilities/index.d.ts +11 -0
  285. package/dist/utilities/index.d.ts.map +1 -1
  286. package/dist/utilities/index.js +11 -0
  287. package/dist/utilities/index.js.map +1 -1
  288. package/dist/utilities/initials.d.ts +13 -0
  289. package/dist/utilities/initials.d.ts.map +1 -0
  290. package/dist/utilities/initials.js +23 -0
  291. package/dist/utilities/initials.js.map +1 -0
  292. package/dist/utilities/node-value.d.ts +31 -0
  293. package/dist/utilities/node-value.d.ts.map +1 -0
  294. package/dist/utilities/node-value.js +37 -0
  295. package/dist/utilities/node-value.js.map +1 -0
  296. package/dist/utilities/optimistic-value.d.ts +81 -0
  297. package/dist/utilities/optimistic-value.d.ts.map +1 -0
  298. package/dist/utilities/optimistic-value.js +154 -0
  299. package/dist/utilities/optimistic-value.js.map +1 -0
  300. package/dist/utilities/render-icon.d.ts +77 -7
  301. package/dist/utilities/render-icon.d.ts.map +1 -1
  302. package/dist/utilities/render-icon.js +123 -33
  303. package/dist/utilities/render-icon.js.map +1 -1
  304. package/dist/utilities/rest-attrs.d.ts +21 -0
  305. package/dist/utilities/rest-attrs.d.ts.map +1 -0
  306. package/dist/utilities/rest-attrs.js +37 -0
  307. package/dist/utilities/rest-attrs.js.map +1 -0
  308. package/dist/utilities/style.d.ts +23 -0
  309. package/dist/utilities/style.d.ts.map +1 -0
  310. package/dist/utilities/style.js +86 -0
  311. package/dist/utilities/style.js.map +1 -0
  312. package/package.json +6 -4
@@ -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;;AAQtE;;;;;;;;GAQG;AACH,qBAuCa,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,220 @@
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';
11
+ import { MolControlledChecked } from './controlled-checked.directive.js';
8
12
  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
- } }
13
+ const _c0 = ["hiddenInput"];
14
+ const _c1 = ["trigger"];
15
+ const _c2 = ["labelSlot"];
16
+ const _c3 = [[["", "slot", "label"]]];
17
+ const _c4 = ["[slot=label]"];
18
+ const _c5 = a0 => ({ size: a0 });
19
19
  /**
20
- * Angular Switch UI component with UIClassMap-driven styling.
21
- */
22
- /**
23
- * Molecule Switch class.
20
+ * Switch component.
21
+ *
22
+ * React's root is a fragment (hidden native checkbox + label); the host
23
+ * element is unwrapped by the DOM normalizer (`data-parity-unwrap`) and
24
+ * `display: contents` keeps real layout fragment-like. Clicking the visible
25
+ * button clicks the hidden checkbox, whose GENUINE native `change` event is
26
+ * forwarded as the `change` output.
24
27
  */
25
- export class MoleculeSwitch {
28
+ export class Switch {
29
+ /** Switch label (text, or projected `[slot=label]` nodes). */
26
30
  label;
27
- checked = false;
28
- size = 'md';
31
+ /** Whether the switch is on. */
32
+ checked;
33
+ /** Switch size. */
34
+ size;
35
+ /** Switch color. */
29
36
  color;
37
+ /** Extra classes joined onto the switch classes. */
30
38
  className;
39
+ /** Inline style object (React camelCase). */
31
40
  style;
41
+ /** `data-testid` for the button. */
32
42
  testId;
33
- disabled = false;
34
- checkedChange = new EventEmitter();
43
+ /** Disables the switch. */
44
+ disabled;
45
+ /** The genuine native `change` event of the hidden checkbox. */
46
+ change = new EventEmitter();
47
+ /** The hidden native checkbox. */
48
+ hiddenInput;
49
+ /** The visible trigger button (React's `...rest` spread target). */
50
+ trigger;
51
+ /** The label text wrapper. */
52
+ labelSlot;
53
+ host = inject(ElementRef);
54
+ hasLabel = false;
55
+ sync = new SlotWrapper(inject(ElementRef), inject(Renderer2));
35
56
  /**
36
- * Retrieves the current UI class map.
37
- * @returns The UIClassMap instance for styling.
57
+ * The current class map.
58
+ * @returns The UIClassMap.
38
59
  */
39
- get cm() {
60
+ cm() {
40
61
  return getClassMap();
41
62
  }
42
63
  /**
43
- * Computes the current checked/unchecked state string.
44
- * @returns The state string, either "checked" or "unchecked".
64
+ * The data-state of the switch and thumb.
65
+ * @returns `checked` or `unchecked`.
45
66
  */
46
- get state() {
67
+ state() {
47
68
  return this.checked ? 'checked' : 'unchecked';
48
69
  }
49
70
  /**
50
- * Computes the CSS classes for the switch wrapper label.
51
- * @returns The wrapper class name string.
71
+ * Computes the switch button class list.
72
+ * @returns The class string.
73
+ */
74
+ classes() {
75
+ return this.cm().cn(this.cm().switchBase({ size: this.size ?? 'md', color: this.color }), this.className);
76
+ }
77
+ /**
78
+ * Computes the label class list.
79
+ * @returns The class string.
52
80
  */
53
- get wrapperClasses() {
54
- return this.cm.cn(this.cm.controlLabel, this.disabled && this.cm.controlDisabled);
81
+ labelClasses() {
82
+ return this.cm().cn(this.cm().controlLabel, this.disabled && this.cm().controlDisabled);
55
83
  }
56
84
  /**
57
- * Computes the combined CSS classes for the switch button.
58
- * @returns The switch class name string.
85
+ * Serializes the inline style for the button.
86
+ * @returns The style attribute text.
59
87
  */
60
- get switchClasses() {
61
- return this.cm.cn(this.cm.switchBase({ size: this.size }), this.className);
88
+ hostStyle() {
89
+ return styleText(this.style);
62
90
  }
63
91
  /**
64
- * Computes the CSS classes for the switch thumb indicator.
65
- * @returns The thumb class name string.
92
+ * Clicking the button clicks the hidden checkbox (unless disabled or the
93
+ * event was vetoed), exactly like React's handler.
94
+ *
95
+ * @param event - The button click event.
66
96
  */
67
- get thumbClasses() {
68
- return this.cm.switchThumb({ size: this.size });
97
+ handleClick(event) {
98
+ if (!this.disabled && !event.defaultPrevented)
99
+ this.hiddenInput?.nativeElement.click();
69
100
  }
70
101
  /**
71
- * Handles the switch toggle action.
102
+ * Forwards the hidden checkbox's genuine native `change` event (React
103
+ * forwards the raw browser event, not a React synthetic one) and then
104
+ * restores the controlled value, like React's controlled-input state
105
+ * restore (the input mirrors the `checked` prop, never free user state).
106
+ * The event's propagation stops here so the host-level `change` binding
107
+ * does not record it a second time.
108
+ *
109
+ * @param event - The native change event.
72
110
  */
73
- onToggle() {
74
- if (!this.disabled) {
75
- this.checkedChange.emit(!this.checked);
76
- }
111
+ handleChange(event) {
112
+ event.stopPropagation();
113
+ this.change.emit(event);
114
+ const input = this.hiddenInput?.nativeElement;
115
+ if (input)
116
+ input.checked = !!this.checked;
77
117
  }
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");
83
- i0.ɵɵdomElementEnd();
84
- i0.ɵɵconditionalCreate(3, MoleculeSwitch_Conditional_3_Template, 2, 3, "span", 1);
85
- i0.ɵɵdomElementEnd();
118
+ /**
119
+ * Moves rest attributes onto the button and applies React's
120
+ * `{!!label && <span>}` label condition after queries resolve.
121
+ */
122
+ ngAfterViewChecked() {
123
+ moveRestAttributes(this.host.nativeElement, this.trigger?.nativeElement);
124
+ this.hasLabel = !!this.label || hasNodes(this.labelSlot?.nativeElement);
125
+ this.sync.sync(this.labelSlot?.nativeElement, this.hasLabel, this.labelSlot?.nativeElement.parentElement ?? undefined);
126
+ }
127
+ static ɵfac = function Switch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Switch)(); };
128
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Switch, selectors: [["mol-switch"]], viewQuery: function Switch_Query(rf, ctx) { if (rf & 1) {
129
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5);
86
130
  } if (rf & 2) {
87
- i0.ɵɵclassMap(ctx.wrapperClasses);
88
- i0.ɵɵadvance();
89
- i0.ɵɵstyleMap(ctx.style);
90
- i0.ɵɵclassMap(ctx.switchClasses);
91
- i0.ɵɵdomProperty("disabled", ctx.disabled);
92
- i0.ɵɵattribute("aria-checked", ctx.checked)("data-state", ctx.state)("data-testid", ctx.testId);
131
+ let _t;
132
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.hiddenInput = _t.first);
133
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.trigger = _t.first);
134
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.labelSlot = _t.first);
135
+ } }, 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", "molChecked", "disabled"], ["type", "button", "role", "switch", 3, "click", "disabled"]], template: function Switch_Template(rf, ctx) { if (rf & 1) {
136
+ i0.ɵɵprojectionDef(_c3);
137
+ i0.ɵɵelementStart(0, "input", 3, 0);
138
+ i0.ɵɵlistener("change", function Switch_Template_input_change_0_listener($event) { return ctx.handleChange($event); });
139
+ i0.ɵɵelementEnd();
140
+ i0.ɵɵelementStart(2, "label")(3, "button", 4, 1);
141
+ i0.ɵɵlistener("click", function Switch_Template_button_click_3_listener($event) { return ctx.handleClick($event); });
142
+ i0.ɵɵelement(5, "span");
143
+ i0.ɵɵelementEnd();
144
+ i0.ɵɵelementStart(6, "span", null, 2);
145
+ i0.ɵɵtext(8);
146
+ i0.ɵɵprojection(9);
147
+ i0.ɵɵelementEnd()();
148
+ } if (rf & 2) {
149
+ i0.ɵɵclassMap(ctx.cm().srOnly);
150
+ i0.ɵɵproperty("molChecked", !!ctx.checked)("disabled", ctx.disabled);
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.ɵɵproperty("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);
98
- } }, encapsulation: 2 });
161
+ i0.ɵɵclassMap(ctx.cm().controlText);
162
+ i0.ɵɵadvance(2);
163
+ i0.ɵɵtextInterpolate(ctx.label);
164
+ } }, dependencies: [MolControlledChecked], 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
+ imports: [MolControlledChecked],
172
+ inputs: ['label', 'checked', 'size', 'color', 'className', 'style', 'testId', 'disabled'],
173
+ host: {
174
+ 'data-parity-unwrap': '',
175
+ style: 'display: contents',
176
+ },
177
+ template: `<input
178
+ type="checkbox"
179
+ [molChecked]="!!checked"
180
+ [disabled]="disabled"
181
+ aria-hidden="true"
182
+ tabindex="-1"
183
+ [class]="cm().srOnly"
184
+ (change)="handleChange($event)"
185
+ #hiddenInput
186
+ />
187
+ <label [class]="labelClasses()">
108
188
  <button
109
189
  type="button"
110
190
  role="switch"
111
- [attr.aria-checked]="checked"
191
+ [attr.aria-checked]="checked ? 'true' : 'false'"
112
192
  [disabled]="disabled"
113
- [attr.data-state]="state"
114
- [class]="switchClasses"
115
- [style]="style"
193
+ [attr.data-state]="state()"
194
+ (click)="handleClick($event)"
195
+ [class]="classes()"
196
+ [attr.style]="hostStyle()"
116
197
  [attr.data-testid]="testId"
117
- (click)="onToggle()"
198
+ #trigger
118
199
  >
119
- <span [attr.data-state]="state" [class]="thumbClasses"></span>
200
+ <span [attr.data-state]="state()" [class]="cm().switchThumb({ size: size ?? 'md' })"></span>
120
201
  </button>
121
- @if (label) {
122
- <span [class]="cm.controlText">{{ label }}</span>
123
- }
124
- </label>
125
- `,
202
+ <span [class]="cm().controlText" #labelSlot
203
+ >{{ label }}<ng-content select="[slot=label]"></ng-content
204
+ ></span>
205
+ </label>`,
126
206
  }]
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: [{
207
+ }], null, { change: [{
144
208
  type: Output
209
+ }], hiddenInput: [{
210
+ type: ViewChild,
211
+ args: ['hiddenInput']
212
+ }], trigger: [{
213
+ type: ViewChild,
214
+ args: ['trigger']
215
+ }], labelSlot: [{
216
+ type: ViewChild,
217
+ args: ['labelSlot']
145
218
  }] }); })();
146
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeSwitch, { className: "MoleculeSwitch", filePath: "components/switch.component.ts", lineNumber: 43 }); })();
219
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Switch, { className: "Switch", filePath: "components/switch.component.ts", lineNumber: 74 }); })();
147
220
  //# 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,EA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