@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
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Tabs component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { type ElementRef, EventEmitter, type OnInit, type QueryList, TemplateRef } from '@angular/core';
7
+ import type { TabItem, UIClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Tabs component.
11
+ *
12
+ * The host is the root `<div>` (`div[mol-tabs]`). Implements the WAI-ARIA APG
13
+ * "automatic activation" tabs pattern: roving tabindex, Left/Right/Home/End
14
+ * move both focus and the active tab, and disabled tabs are skipped. Item
15
+ * `icon` and `content` are node values (templates); `label` is a string or a
16
+ * node value.
17
+ */
18
+ export declare class Tabs implements OnInit {
19
+ /** The tabs. */
20
+ items: TabItem<string>[];
21
+ /** Controlled active value. */
22
+ value?: string;
23
+ /** Initial active value for the uncontrolled form. */
24
+ defaultValue?: string;
25
+ /** Tab-list visual variant. */
26
+ variant?: 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded';
27
+ /** Tab size. */
28
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
29
+ /** Whether tabs stretch to fill the list. */
30
+ fitted?: boolean;
31
+ /** Extra classes for the root. */
32
+ className?: string;
33
+ /** Inline style object (React camelCase). */
34
+ style?: Record<string, unknown>;
35
+ /** `data-testid`. */
36
+ testId?: string;
37
+ /** Fires with the selected tab's value (React's `onChange`). */
38
+ readonly change: EventEmitter<string>;
39
+ /** The tab buttons (for focus movement). */
40
+ tabButtons?: QueryList<ElementRef<HTMLButtonElement>>;
41
+ /** The per-instance id base (the normalizer renumbers ids). */
42
+ readonly idBase: string;
43
+ /** The uncontrolled active value. */
44
+ private readonly internalValue;
45
+ /**
46
+ * The current class map.
47
+ * @returns The UIClassMap.
48
+ */
49
+ cm(): UIClassMap;
50
+ /**
51
+ * Seeds the uncontrolled value once, at mount, like React's
52
+ * `useState(defaultValue || items[0]?.value)`: reordering the tabs later keeps
53
+ * the active tab rather than activating whichever tab is now first.
54
+ */
55
+ ngOnInit(): void;
56
+ /**
57
+ * The active tab value: the controlled `value`, else the uncontrolled one.
58
+ * @returns The active value.
59
+ */
60
+ activeValue(): string | undefined;
61
+ /**
62
+ * The tab button id for a value.
63
+ * @param value - The tab value.
64
+ * @returns The id.
65
+ */
66
+ tabId(value: string): string;
67
+ /**
68
+ * The tabpanel id for a value.
69
+ * @param value - The tab value.
70
+ * @returns The id.
71
+ */
72
+ panelId(value: string): string;
73
+ /**
74
+ * The tab-list class list.
75
+ * @returns The class string.
76
+ */
77
+ listClasses(): string;
78
+ /**
79
+ * The tab-button class list.
80
+ * @returns The class string.
81
+ */
82
+ triggerClasses(): string;
83
+ /**
84
+ * The tabpanel class list.
85
+ * @returns The class string.
86
+ */
87
+ contentClasses(): string;
88
+ /**
89
+ * Serializes the root's inline style.
90
+ * @returns The style attribute text.
91
+ */
92
+ hostStyle(): string | null;
93
+ /**
94
+ * Narrows a node-valued prop to a TemplateRef.
95
+ *
96
+ * @param value - The prop value.
97
+ * @returns The template, or null.
98
+ */
99
+ asTemplate(value: unknown): TemplateRef<unknown> | null;
100
+ /**
101
+ * A plain-string node value's text.
102
+ *
103
+ * @param value - The prop value.
104
+ * @returns The text, or empty.
105
+ */
106
+ nodeText(value: unknown): string;
107
+ /**
108
+ * Whether the active tab has content (React renders no panel without it).
109
+ * @returns True when content is given.
110
+ */
111
+ hasContent(): boolean;
112
+ /**
113
+ * The active tab's content as a template.
114
+ * @returns The template, or null for a plain string.
115
+ */
116
+ activeContent(): TemplateRef<unknown> | null;
117
+ /**
118
+ * The active tab's plain-string content.
119
+ * @returns The text, or empty.
120
+ */
121
+ contentText(): string;
122
+ /**
123
+ * Selects a tab and notifies the caller (React's `selectTab`).
124
+ * @param tabValue - The tab value.
125
+ */
126
+ selectTab(tabValue: string): void;
127
+ /**
128
+ * The APG keyboard model: Left/Right/Home/End move focus AND selection.
129
+ * @param event - The key event.
130
+ */
131
+ handleKeyDown(event: KeyboardEvent): void;
132
+ /**
133
+ * Moves focus to the tab with the given value (React's `tabRefs.focus()`).
134
+ * @param value - The tab value.
135
+ */
136
+ private focusTab;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<Tabs, never>;
138
+ static ɵcmp: i0.ɵɵComponentDeclaration<Tabs, "div[mol-tabs]", never, { "items": { "alias": "items"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "fitted": { "alias": "fitted"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
139
+ }
140
+ //# sourceMappingURL=tabs.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.component.d.ts","sourceRoot":"","sources":["../../src/components/tabs.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,MAAM,EAEX,KAAK,SAAS,EAEd,WAAW,EAEZ,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAO3D;;;;;;;;GAQG;AACH,qBAoEa,IAAK,YAAW,MAAM;IACjC,gBAAgB;IAChB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAK;IAC7B,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,cAAc,GAAG,eAAe,CAAA;IAChE,gBAAgB;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACvC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,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AAI;IAKjC;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IA4BzC;;;OAGG;IACH,OAAO,CAAC,QAAQ;yCA5ML,IAAI;2CAAJ,IAAI;CAgNhB"}
@@ -0,0 +1,390 @@
1
+ /**
2
+ * Tabs component (React parity).
3
+ *
4
+ * @module
5
+ */
6
+ import { Component, EventEmitter, Output, signal, TemplateRef, ViewChildren, } from '@angular/core';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ import { nextInstanceId } from '../utilities/ids.js';
9
+ import { styleText } from '../utilities/style.js';
10
+ import { MolTemplateOutlet } from './template-outlet.directive.js';
11
+ import * as i0 from "@angular/core";
12
+ const _c0 = ["tabBtn"];
13
+ const _forTrack0 = ($index, $item) => $item.value;
14
+ function Tabs_For_2_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
15
+ i0.ɵɵelementContainer(0, 6);
16
+ } if (rf & 2) {
17
+ i0.ɵɵproperty("molTemplateOutlet", ctx);
18
+ } }
19
+ function Tabs_For_2_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
20
+ i0.ɵɵtext(0);
21
+ } if (rf & 2) {
22
+ const item_r2 = i0.ɵɵnextContext(2).$implicit;
23
+ const ctx_r2 = i0.ɵɵnextContext();
24
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.nodeText(item_r2.icon), " ");
25
+ } }
26
+ function Tabs_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
27
+ i0.ɵɵelementStart(0, "span");
28
+ i0.ɵɵconditionalCreate(1, Tabs_For_2_Conditional_2_Conditional_1_Template, 1, 1, "ng-container", 6)(2, Tabs_For_2_Conditional_2_Conditional_2_Template, 1, 1);
29
+ i0.ɵɵelementEnd();
30
+ } if (rf & 2) {
31
+ let tmp_13_0;
32
+ const item_r2 = i0.ɵɵnextContext().$implicit;
33
+ const ctx_r2 = i0.ɵɵnextContext();
34
+ i0.ɵɵclassMap(ctx_r2.cm().tabTriggerIcon);
35
+ i0.ɵɵadvance();
36
+ i0.ɵɵconditional((tmp_13_0 = ctx_r2.asTemplate(item_r2.icon)) ? 1 : 2, tmp_13_0);
37
+ } }
38
+ function Tabs_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
39
+ i0.ɵɵelementContainer(0, 6);
40
+ } if (rf & 2) {
41
+ i0.ɵɵproperty("molTemplateOutlet", ctx);
42
+ } }
43
+ function Tabs_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
44
+ i0.ɵɵtext(0);
45
+ } if (rf & 2) {
46
+ const item_r2 = i0.ɵɵnextContext().$implicit;
47
+ const ctx_r2 = i0.ɵɵnextContext();
48
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.nodeText(item_r2.label), " ");
49
+ } }
50
+ function Tabs_For_2_Template(rf, ctx) { if (rf & 1) {
51
+ const _r1 = i0.ɵɵgetCurrentView();
52
+ i0.ɵɵelementStart(0, "button", 4, 0);
53
+ i0.ɵɵlistener("click", function Tabs_For_2_Template_button_click_0_listener() { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.selectTab(item_r2.value)); });
54
+ i0.ɵɵconditionalCreate(2, Tabs_For_2_Conditional_2_Template, 3, 3, "span", 5);
55
+ i0.ɵɵconditionalCreate(3, Tabs_For_2_Conditional_3_Template, 1, 1, "ng-container", 6)(4, Tabs_For_2_Conditional_4_Template, 1, 1);
56
+ i0.ɵɵelementEnd();
57
+ } if (rf & 2) {
58
+ let tmp_19_0;
59
+ const item_r2 = ctx.$implicit;
60
+ const ctx_r2 = i0.ɵɵnextContext();
61
+ i0.ɵɵclassMap(ctx_r2.triggerClasses());
62
+ i0.ɵɵproperty("id", ctx_r2.tabId(item_r2.value))("disabled", !!item_r2.disabled);
63
+ i0.ɵɵattribute("aria-selected", item_r2.value === ctx_r2.activeValue() ? "true" : "false")("aria-controls", ctx_r2.panelId(item_r2.value))("data-state", item_r2.value === ctx_r2.activeValue() ? "active" : "inactive")("tabindex", item_r2.value === ctx_r2.activeValue() ? 0 : -1);
64
+ i0.ɵɵadvance(2);
65
+ i0.ɵɵconditional(item_r2.icon ? 2 : -1);
66
+ i0.ɵɵadvance();
67
+ i0.ɵɵconditional((tmp_19_0 = ctx_r2.asTemplate(item_r2.label)) ? 3 : 4, tmp_19_0);
68
+ } }
69
+ function Tabs_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
70
+ i0.ɵɵelementContainer(0, 6);
71
+ } if (rf & 2) {
72
+ i0.ɵɵproperty("molTemplateOutlet", ctx);
73
+ } }
74
+ function Tabs_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
75
+ i0.ɵɵtext(0);
76
+ } if (rf & 2) {
77
+ const ctx_r2 = i0.ɵɵnextContext(2);
78
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.contentText(), " ");
79
+ } }
80
+ function Tabs_Conditional_3_Template(rf, ctx) { if (rf & 1) {
81
+ i0.ɵɵelementStart(0, "div", 7);
82
+ i0.ɵɵconditionalCreate(1, Tabs_Conditional_3_Conditional_1_Template, 1, 1, "ng-container", 6)(2, Tabs_Conditional_3_Conditional_2_Template, 1, 1);
83
+ i0.ɵɵelementEnd();
84
+ } if (rf & 2) {
85
+ let tmp_4_0;
86
+ const ctx_r2 = i0.ɵɵnextContext();
87
+ i0.ɵɵclassMap(ctx_r2.contentClasses());
88
+ i0.ɵɵproperty("id", ctx_r2.panelId(ctx_r2.activeValue() ?? ""));
89
+ i0.ɵɵattribute("aria-labelledby", ctx_r2.tabId(ctx_r2.activeValue() ?? ""));
90
+ i0.ɵɵadvance();
91
+ i0.ɵɵconditional((tmp_4_0 = ctx_r2.activeContent()) ? 1 : 2, tmp_4_0);
92
+ } }
93
+ /**
94
+ * Tabs component.
95
+ *
96
+ * The host is the root `<div>` (`div[mol-tabs]`). Implements the WAI-ARIA APG
97
+ * "automatic activation" tabs pattern: roving tabindex, Left/Right/Home/End
98
+ * move both focus and the active tab, and disabled tabs are skipped. Item
99
+ * `icon` and `content` are node values (templates); `label` is a string or a
100
+ * node value.
101
+ */
102
+ export class Tabs {
103
+ /** The tabs. */
104
+ items = [];
105
+ /** Controlled active value. */
106
+ value;
107
+ /** Initial active value for the uncontrolled form. */
108
+ defaultValue;
109
+ /** Tab-list visual variant. */
110
+ variant;
111
+ /** Tab size. */
112
+ size;
113
+ /** Whether tabs stretch to fill the list. */
114
+ fitted;
115
+ /** Extra classes for the root. */
116
+ className;
117
+ /** Inline style object (React camelCase). */
118
+ style;
119
+ /** `data-testid`. */
120
+ testId;
121
+ /** Fires with the selected tab's value (React's `onChange`). */
122
+ change = new EventEmitter();
123
+ /** The tab buttons (for focus movement). */
124
+ tabButtons;
125
+ /** The per-instance id base (the normalizer renumbers ids). */
126
+ idBase = nextInstanceId();
127
+ /** The uncontrolled active value. */
128
+ internalValue = signal(undefined, /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []));
130
+ /**
131
+ * The current class map.
132
+ * @returns The UIClassMap.
133
+ */
134
+ cm() {
135
+ return getClassMap();
136
+ }
137
+ /**
138
+ * Seeds the uncontrolled value once, at mount, like React's
139
+ * `useState(defaultValue || items[0]?.value)`: reordering the tabs later keeps
140
+ * the active tab rather than activating whichever tab is now first.
141
+ */
142
+ ngOnInit() {
143
+ this.internalValue.set(this.defaultValue || this.items[0]?.value);
144
+ }
145
+ /**
146
+ * The active tab value: the controlled `value`, else the uncontrolled one.
147
+ * @returns The active value.
148
+ */
149
+ activeValue() {
150
+ if (this.value !== undefined)
151
+ return this.value;
152
+ return this.internalValue();
153
+ }
154
+ /**
155
+ * The tab button id for a value.
156
+ * @param value - The tab value.
157
+ * @returns The id.
158
+ */
159
+ tabId(value) {
160
+ return `${this.idBase}-tab-${value}`;
161
+ }
162
+ /**
163
+ * The tabpanel id for a value.
164
+ * @param value - The tab value.
165
+ * @returns The id.
166
+ */
167
+ panelId(value) {
168
+ return `${this.idBase}-tabpanel-${value}`;
169
+ }
170
+ /**
171
+ * The tab-list class list.
172
+ * @returns The class string.
173
+ */
174
+ listClasses() {
175
+ return this.cm().cn(this.cm().tabsList({ variant: this.variant, size: this.size }), this.fitted && this.cm().tabsFitted);
176
+ }
177
+ /**
178
+ * The tab-button class list.
179
+ * @returns The class string.
180
+ */
181
+ triggerClasses() {
182
+ return this.cm().cn(this.cm().tabsTrigger({ variant: this.variant, size: this.size }), this.fitted && this.cm().tabTriggerFitted);
183
+ }
184
+ /**
185
+ * The tabpanel class list.
186
+ * @returns The class string.
187
+ */
188
+ contentClasses() {
189
+ return this.cm().tabsContent({ variant: this.variant, size: this.size });
190
+ }
191
+ /**
192
+ * Serializes the root's inline style.
193
+ * @returns The style attribute text.
194
+ */
195
+ hostStyle() {
196
+ return styleText(this.style);
197
+ }
198
+ /**
199
+ * Narrows a node-valued prop to a TemplateRef.
200
+ *
201
+ * @param value - The prop value.
202
+ * @returns The template, or null.
203
+ */
204
+ asTemplate(value) {
205
+ return value instanceof TemplateRef ? value : null;
206
+ }
207
+ /**
208
+ * A plain-string node value's text.
209
+ *
210
+ * @param value - The prop value.
211
+ * @returns The text, or empty.
212
+ */
213
+ nodeText(value) {
214
+ return typeof value === 'string' ? value : '';
215
+ }
216
+ /**
217
+ * Whether the active tab has content (React renders no panel without it).
218
+ * @returns True when content is given.
219
+ */
220
+ hasContent() {
221
+ const active = this.items.find((item) => item.value === this.activeValue());
222
+ return !!active?.content;
223
+ }
224
+ /**
225
+ * The active tab's content as a template.
226
+ * @returns The template, or null for a plain string.
227
+ */
228
+ activeContent() {
229
+ const active = this.items.find((item) => item.value === this.activeValue());
230
+ return active ? this.asTemplate(active.content) : null;
231
+ }
232
+ /**
233
+ * The active tab's plain-string content.
234
+ * @returns The text, or empty.
235
+ */
236
+ contentText() {
237
+ const active = this.items.find((item) => item.value === this.activeValue());
238
+ return this.nodeText(active?.content);
239
+ }
240
+ /**
241
+ * Selects a tab and notifies the caller (React's `selectTab`).
242
+ * @param tabValue - The tab value.
243
+ */
244
+ selectTab(tabValue) {
245
+ if (this.value === undefined)
246
+ this.internalValue.set(tabValue);
247
+ this.change.emit(tabValue);
248
+ }
249
+ /**
250
+ * The APG keyboard model: Left/Right/Home/End move focus AND selection.
251
+ * @param event - The key event.
252
+ */
253
+ handleKeyDown(event) {
254
+ const enabled = this.items.filter((item) => !item.disabled);
255
+ if (enabled.length === 0)
256
+ return;
257
+ const active = this.activeValue();
258
+ const currentIndex = enabled.findIndex((item) => item.value === active);
259
+ let nextIndex;
260
+ switch (event.key) {
261
+ case 'ArrowRight':
262
+ nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % enabled.length;
263
+ break;
264
+ case 'ArrowLeft':
265
+ nextIndex = currentIndex === -1 ? 0 : (currentIndex - 1 + enabled.length) % enabled.length;
266
+ break;
267
+ case 'Home':
268
+ nextIndex = 0;
269
+ break;
270
+ case 'End':
271
+ nextIndex = enabled.length - 1;
272
+ break;
273
+ default:
274
+ return;
275
+ }
276
+ event.preventDefault();
277
+ const nextValue = enabled[nextIndex].value;
278
+ this.selectTab(nextValue);
279
+ this.focusTab(nextValue);
280
+ }
281
+ /**
282
+ * Moves focus to the tab with the given value (React's `tabRefs.focus()`).
283
+ * @param value - The tab value.
284
+ */
285
+ focusTab(value) {
286
+ const match = this.tabButtons?.find((ref) => ref.nativeElement.id === this.tabId(value));
287
+ match?.nativeElement.focus();
288
+ }
289
+ static ɵfac = function Tabs_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Tabs)(); };
290
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Tabs, selectors: [["div", "mol-tabs", ""]], viewQuery: function Tabs_Query(rf, ctx) { if (rf & 1) {
291
+ i0.ɵɵviewQuery(_c0, 5);
292
+ } if (rf & 2) {
293
+ let _t;
294
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabButtons = _t);
295
+ } }, hostVars: 5, hostBindings: function Tabs_HostBindings(rf, ctx) { if (rf & 2) {
296
+ i0.ɵɵattribute("data-testid", ctx.testId);
297
+ i0.ɵɵstyleMap(ctx.hostStyle());
298
+ i0.ɵɵclassMap(ctx.className);
299
+ } }, inputs: { items: "items", value: "value", defaultValue: "defaultValue", variant: "variant", size: "size", fitted: "fitted", className: "className", style: "style", testId: "testId" }, outputs: { change: "change" }, decls: 4, vars: 3, consts: [["tabBtn", ""], ["role", "tablist", 3, "keydown"], ["type", "button", "role", "tab", 3, "id", "disabled", "class"], ["role", "tabpanel", 3, "id", "class"], ["type", "button", "role", "tab", 3, "click", "id", "disabled"], [3, "class"], [3, "molTemplateOutlet"], ["role", "tabpanel", 3, "id"]], template: function Tabs_Template(rf, ctx) { if (rf & 1) {
300
+ i0.ɵɵelementStart(0, "div", 1);
301
+ i0.ɵɵlistener("keydown", function Tabs_Template_div_keydown_0_listener($event) { return ctx.handleKeyDown($event); });
302
+ i0.ɵɵrepeaterCreate(1, Tabs_For_2_Template, 5, 10, "button", 2, _forTrack0);
303
+ i0.ɵɵelementEnd();
304
+ i0.ɵɵconditionalCreate(3, Tabs_Conditional_3_Template, 3, 5, "div", 3);
305
+ } if (rf & 2) {
306
+ i0.ɵɵclassMap(ctx.listClasses());
307
+ i0.ɵɵadvance();
308
+ i0.ɵɵrepeater(ctx.items);
309
+ i0.ɵɵadvance(2);
310
+ i0.ɵɵconditional(ctx.hasContent() ? 3 : -1);
311
+ } }, dependencies: [MolTemplateOutlet], encapsulation: 2 });
312
+ }
313
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Tabs, [{
314
+ type: Component,
315
+ args: [{
316
+ selector: 'div[mol-tabs]',
317
+ standalone: true,
318
+ imports: [MolTemplateOutlet],
319
+ inputs: [
320
+ 'items',
321
+ 'value',
322
+ 'defaultValue',
323
+ 'variant',
324
+ 'size',
325
+ 'fitted',
326
+ 'className',
327
+ 'style',
328
+ 'testId',
329
+ ],
330
+ outputs: ['change'],
331
+ host: {
332
+ '[class]': 'className',
333
+ '[style]': 'hostStyle()',
334
+ '[attr.data-testid]': 'testId',
335
+ },
336
+ template: `<div [class]="listClasses()" role="tablist" (keydown)="handleKeyDown($event)">
337
+ @for (item of items; track item.value) {
338
+ <button
339
+ #tabBtn
340
+ [id]="tabId(item.value)"
341
+ type="button"
342
+ role="tab"
343
+ [attr.aria-selected]="item.value === activeValue() ? 'true' : 'false'"
344
+ [attr.aria-controls]="panelId(item.value)"
345
+ [attr.data-state]="item.value === activeValue() ? 'active' : 'inactive'"
346
+ [attr.tabindex]="item.value === activeValue() ? 0 : -1"
347
+ [disabled]="!!item.disabled"
348
+ (click)="selectTab(item.value)"
349
+ [class]="triggerClasses()"
350
+ >
351
+ @if (item.icon) {
352
+ <span [class]="cm().tabTriggerIcon">
353
+ @if (asTemplate(item.icon); as iconTpl) {
354
+ <ng-container [molTemplateOutlet]="iconTpl"></ng-container>
355
+ } @else {
356
+ {{ nodeText(item.icon) }}
357
+ }
358
+ </span>
359
+ }
360
+ @if (asTemplate(item.label); as labelTpl) {
361
+ <ng-container [molTemplateOutlet]="labelTpl"></ng-container>
362
+ } @else {
363
+ {{ nodeText(item.label) }}
364
+ }
365
+ </button>
366
+ }
367
+ </div>
368
+ @if (hasContent()) {
369
+ <div
370
+ role="tabpanel"
371
+ [id]="panelId(activeValue() ?? '')"
372
+ [attr.aria-labelledby]="tabId(activeValue() ?? '')"
373
+ [class]="contentClasses()"
374
+ >
375
+ @if (activeContent(); as contentTpl) {
376
+ <ng-container [molTemplateOutlet]="contentTpl"></ng-container>
377
+ } @else {
378
+ {{ contentText() }}
379
+ }
380
+ </div>
381
+ }`,
382
+ }]
383
+ }], null, { change: [{
384
+ type: Output
385
+ }], tabButtons: [{
386
+ type: ViewChildren,
387
+ args: ['tabBtn']
388
+ }] }); })();
389
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Tabs, { className: "Tabs", filePath: "components/tabs.component.ts", lineNumber: 103 }); })();
390
+ //# sourceMappingURL=tabs.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.component.js","sourceRoot":"","sources":["../../src/components/tabs.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAET,YAAY,EAEZ,MAAM,EAEN,MAAM,EACN,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;;;;;IAkDlD,2BAA2D;;IAA7C,uCAA6B;;;IAE3C,YACF;;;;IADE,8DACF;;;IALF,4BAAoC;IAGhC,AAFF,mGAAyC,0DAEhC;IAGX,iBAAO;;;;;IAND,yCAA6B;IACjC,cAIC;IAJD,gFAIC;;;IAIH,2BAA4D;;IAA9C,uCAA8B;;;IAE5C,YACF;;;;IADE,+DACF;;;;IA1BF,oCAYC;IAFC,0LAAS,+BAAqB,KAAC;IAG/B,6EAAiB;IAWf,AAFF,qFAA2C,4CAElC;IAGX,iBAAS;;;;;IAhBP,sCAA0B;IAF1B,AAPA,gDAAwB,gCAOI;;IAI5B,eAQC;IARD,uCAQC;IACD,cAIC;IAJD,iFAIC;;;IAYD,2BAA8D;;IAAhD,uCAAgC;;;IAE9C,YACF;;;IADE,qDACF;;;IAVF,8BAKC;IAGG,AAFF,6FAAsC,oDAE7B;IAGX,iBAAM;;;;IAPJ,sCAA0B;IAF1B,+DAAmC;;IAInC,cAIC;IAJD,qEAIC;;AAzET;;;;;;;;GAQG;AAqEH,MAAM,OAAO,IAAI;IACf,gBAAgB;IAChB,KAAK,GAAsB,EAAE,CAAA;IAC7B,+BAA+B;IAC/B,KAAK,CAAS;IACd,sDAAsD;IACtD,YAAY,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iFAiEhB,IAAI;cApEhB,SAAS;eAAC;gBACT,QAAQ,EAAE,eAAe;gBACzB,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,iBAAiB,CAAC;gBAC5B,MAAM,EAAE;oBACN,OAAO;oBACP,OAAO;oBACP,cAAc;oBACd,SAAS;oBACT,MAAM;oBACN,QAAQ;oBACR,WAAW;oBACX,OAAO;oBACP,QAAQ;iBACT;gBACD,OAAO,EAAE,CAAC,QAAQ,CAAC;gBACnB,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,SAAS,EAAE,aAAa;oBACxB,oBAAoB,EAAE,QAAQ;iBAC/B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6CN;aACL;;kBAsBE,MAAM;;kBAGN,YAAY;mBAAC,QAAQ;;kFAxBX,IAAI"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Renders a `TemplateRef` where the host element sits (Angular's
3
+ * `NgTemplateOutlet` without the `@angular/common` dependency).
4
+ *
5
+ * Used for node-valued props the adapter passes as `TemplateRef`s: a data
6
+ * prop's `icon` (`items[0].icon`), render functions, or a node that must be
7
+ * placed inside a template's own structure rather than projected directly.
8
+ *
9
+ * @module
10
+ */
11
+ import { type TemplateRef } from '@angular/core';
12
+ import * as i0 from "@angular/core";
13
+ /**
14
+ * Instantiates a template at the directive's host position and re-instantiates
15
+ * it when the template changes.
16
+ */
17
+ export declare class MolTemplateOutlet {
18
+ private readonly vcr;
19
+ private current;
20
+ private view?;
21
+ /** The live context object shared with the rendered view. */
22
+ private context;
23
+ /**
24
+ * The template to render (a React node value in template form).
25
+ *
26
+ * @param template - The template, or null/undefined to render nothing.
27
+ */
28
+ set molTemplateOutlet(template: TemplateRef<unknown> | null | undefined);
29
+ /**
30
+ * The template context (React's render-function arguments, e.g. a table
31
+ * cell's `{ $implicit, a0, a1, a2 }`). The properties of the view's own
32
+ * context object are updated in place — replacing the object is deprecated.
33
+ *
34
+ * @param context - The context object.
35
+ */
36
+ set molTemplateOutletContext(context: Record<string, unknown> | null | undefined);
37
+ /**
38
+ * The current template context.
39
+ * @returns The context object.
40
+ */
41
+ get molTemplateOutletContext(): Record<string, unknown>;
42
+ /**
43
+ * The template currently rendered.
44
+ * @returns The template, or null.
45
+ */
46
+ get molTemplateOutlet(): TemplateRef<unknown> | null;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<MolTemplateOutlet, never>;
48
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MolTemplateOutlet, "[molTemplateOutlet]", never, { "molTemplateOutlet": { "alias": "molTemplateOutlet"; "required": false; }; "molTemplateOutletContext": { "alias": "molTemplateOutletContext"; "required": false; }; }, {}, never, never, true, never>;
49
+ }
50
+ //# sourceMappingURL=template-outlet.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-outlet.directive.d.ts","sourceRoot":"","sources":["../../src/components/template-outlet.directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAKL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;;AAEtB;;;GAGG;AACH,qBAIa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA2B;IAC/C,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,IAAI,CAAC,CAA0B;IACvC,6DAA6D;IAC7D,OAAO,CAAC,OAAO,CAA8B;IAE7C;;;;OAIG;IACH,IAAa,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EAM/E;IAED;;;;;;OAMG;IACH,IAAa,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EAOxF;IAED;;;OAGG;IACH,IAAI,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEtD;IAED;;;OAGG;IACH,IAAI,iBAAiB,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAEnD;yCAlDU,iBAAiB;2CAAjB,iBAAiB;CAmD7B"}