@molecule/app-ui-angular 1.0.6 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +11740 -1143
  2. package/dist/components/accordion.component.d.ts +114 -0
  3. package/dist/components/accordion.component.d.ts.map +1 -0
  4. package/dist/components/accordion.component.js +286 -0
  5. package/dist/components/accordion.component.js.map +1 -0
  6. package/dist/components/alert.component.d.ts +81 -37
  7. package/dist/components/alert.component.d.ts.map +1 -1
  8. package/dist/components/alert.component.js +232 -146
  9. package/dist/components/alert.component.js.map +1 -1
  10. package/dist/components/auth-guard.component.d.ts +94 -0
  11. package/dist/components/auth-guard.component.d.ts.map +1 -0
  12. package/dist/components/auth-guard.component.js +212 -0
  13. package/dist/components/auth-guard.component.js.map +1 -0
  14. package/dist/components/avatar.component.d.ts +97 -0
  15. package/dist/components/avatar.component.d.ts.map +1 -0
  16. package/dist/components/avatar.component.js +216 -0
  17. package/dist/components/avatar.component.js.map +1 -0
  18. package/dist/components/badge.component.d.ts +27 -12
  19. package/dist/components/badge.component.d.ts.map +1 -1
  20. package/dist/components/badge.component.js +47 -47
  21. package/dist/components/badge.component.js.map +1 -1
  22. package/dist/components/button.component.d.ts +96 -14
  23. package/dist/components/button.component.d.ts.map +1 -1
  24. package/dist/components/button.component.js +232 -87
  25. package/dist/components/button.component.js.map +1 -1
  26. package/dist/components/card.component.d.ts +135 -0
  27. package/dist/components/card.component.d.ts.map +1 -0
  28. package/dist/components/card.component.js +291 -0
  29. package/dist/components/card.component.js.map +1 -0
  30. package/dist/components/checkbox.component.d.ts +102 -29
  31. package/dist/components/checkbox.component.d.ts.map +1 -1
  32. package/dist/components/checkbox.component.js +222 -113
  33. package/dist/components/checkbox.component.js.map +1 -1
  34. package/dist/components/confirm-button.component.d.ts +130 -0
  35. package/dist/components/confirm-button.component.d.ts.map +1 -0
  36. package/dist/components/confirm-button.component.js +322 -0
  37. package/dist/components/confirm-button.component.js.map +1 -0
  38. package/dist/components/confirm-dialog.component.d.ts +60 -0
  39. package/dist/components/confirm-dialog.component.d.ts.map +1 -0
  40. package/dist/components/confirm-dialog.component.js +152 -0
  41. package/dist/components/confirm-dialog.component.js.map +1 -0
  42. package/dist/components/dropdown.component.d.ts +313 -0
  43. package/dist/components/dropdown.component.d.ts.map +1 -0
  44. package/dist/components/dropdown.component.js +919 -0
  45. package/dist/components/dropdown.component.js.map +1 -0
  46. package/dist/components/empty-state.component.d.ts +73 -0
  47. package/dist/components/empty-state.component.d.ts.map +1 -0
  48. package/dist/components/empty-state.component.js +180 -0
  49. package/dist/components/empty-state.component.js.map +1 -0
  50. package/dist/components/floating-input.component.d.ts +86 -0
  51. package/dist/components/floating-input.component.d.ts.map +1 -0
  52. package/dist/components/floating-input.component.js +167 -0
  53. package/dist/components/floating-input.component.js.map +1 -0
  54. package/dist/components/form-field.component.d.ts +111 -0
  55. package/dist/components/form-field.component.d.ts.map +1 -0
  56. package/dist/components/form-field.component.js +300 -0
  57. package/dist/components/form-field.component.js.map +1 -0
  58. package/dist/components/form.component.d.ts +77 -0
  59. package/dist/components/form.component.d.ts.map +1 -0
  60. package/dist/components/form.component.js +222 -0
  61. package/dist/components/form.component.js.map +1 -0
  62. package/dist/components/icon.component.d.ts +85 -0
  63. package/dist/components/icon.component.d.ts.map +1 -0
  64. package/dist/components/icon.component.js +187 -0
  65. package/dist/components/icon.component.js.map +1 -0
  66. package/dist/components/index.d.ts +49 -0
  67. package/dist/components/index.d.ts.map +1 -1
  68. package/dist/components/index.js +49 -0
  69. package/dist/components/index.js.map +1 -1
  70. package/dist/components/input.component.d.ts +157 -54
  71. package/dist/components/input.component.d.ts.map +1 -1
  72. package/dist/components/input.component.js +437 -222
  73. package/dist/components/input.component.js.map +1 -1
  74. package/dist/components/label.component.d.ts +29 -0
  75. package/dist/components/label.component.d.ts.map +1 -0
  76. package/dist/components/label.component.js +60 -0
  77. package/dist/components/label.component.js.map +1 -0
  78. package/dist/components/language-picker.component.d.ts +124 -0
  79. package/dist/components/language-picker.component.d.ts.map +1 -0
  80. package/dist/components/language-picker.component.js +305 -0
  81. package/dist/components/language-picker.component.js.map +1 -0
  82. package/dist/components/layout.component.d.ts +167 -0
  83. package/dist/components/layout.component.d.ts.map +1 -0
  84. package/dist/components/layout.component.js +364 -0
  85. package/dist/components/layout.component.js.map +1 -0
  86. package/dist/components/load-error-banner.component.d.ts +103 -0
  87. package/dist/components/load-error-banner.component.d.ts.map +1 -0
  88. package/dist/components/load-error-banner.component.js +263 -0
  89. package/dist/components/load-error-banner.component.js.map +1 -0
  90. package/dist/components/modal.component.d.ts +125 -95
  91. package/dist/components/modal.component.d.ts.map +1 -1
  92. package/dist/components/modal.component.js +458 -271
  93. package/dist/components/modal.component.js.map +1 -1
  94. package/dist/components/molecule/alert.component.d.ts +77 -0
  95. package/dist/components/molecule/alert.component.d.ts.map +1 -0
  96. package/dist/components/molecule/alert.component.js +229 -0
  97. package/dist/components/molecule/alert.component.js.map +1 -0
  98. package/dist/components/molecule/badge.component.d.ts +27 -0
  99. package/dist/components/molecule/badge.component.d.ts.map +1 -0
  100. package/dist/components/molecule/badge.component.js +79 -0
  101. package/dist/components/molecule/badge.component.js.map +1 -0
  102. package/dist/components/molecule/button.component.d.ts +38 -0
  103. package/dist/components/molecule/button.component.d.ts.map +1 -0
  104. package/dist/components/molecule/button.component.js +137 -0
  105. package/dist/components/molecule/button.component.js.map +1 -0
  106. package/dist/components/molecule/checkbox.component.d.ts +53 -0
  107. package/dist/components/molecule/checkbox.component.d.ts.map +1 -0
  108. package/dist/components/molecule/checkbox.component.js +166 -0
  109. package/dist/components/molecule/checkbox.component.js.map +1 -0
  110. package/dist/components/molecule/index.d.ts +18 -0
  111. package/dist/components/molecule/index.d.ts.map +1 -0
  112. package/dist/components/molecule/index.js +18 -0
  113. package/dist/components/molecule/index.js.map +1 -0
  114. package/dist/components/molecule/input.component.d.ts +93 -0
  115. package/dist/components/molecule/input.component.d.ts.map +1 -0
  116. package/dist/components/molecule/input.component.js +314 -0
  117. package/dist/components/molecule/input.component.js.map +1 -0
  118. package/dist/components/molecule/modal.component.d.ts +148 -0
  119. package/dist/components/molecule/modal.component.d.ts.map +1 -0
  120. package/dist/components/molecule/modal.component.js +382 -0
  121. package/dist/components/molecule/modal.component.js.map +1 -0
  122. package/dist/components/molecule/radio-group.component.d.ts +63 -0
  123. package/dist/components/molecule/radio-group.component.d.ts.map +1 -0
  124. package/dist/components/molecule/radio-group.component.js +208 -0
  125. package/dist/components/molecule/radio-group.component.js.map +1 -0
  126. package/dist/components/molecule/select.component.d.ts +72 -0
  127. package/dist/components/molecule/select.component.d.ts.map +1 -0
  128. package/dist/components/molecule/select.component.js +274 -0
  129. package/dist/components/molecule/select.component.js.map +1 -0
  130. package/dist/components/molecule/spinner.component.d.ts +42 -0
  131. package/dist/components/molecule/spinner.component.d.ts.map +1 -0
  132. package/dist/components/molecule/spinner.component.js +122 -0
  133. package/dist/components/molecule/spinner.component.js.map +1 -0
  134. package/dist/components/molecule/switch.component.d.ts +54 -0
  135. package/dist/components/molecule/switch.component.d.ts.map +1 -0
  136. package/dist/components/molecule/switch.component.js +148 -0
  137. package/dist/components/molecule/switch.component.js.map +1 -0
  138. package/dist/components/molecule/toast.component.d.ts +98 -0
  139. package/dist/components/molecule/toast.component.d.ts.map +1 -0
  140. package/dist/components/molecule/toast.component.js +305 -0
  141. package/dist/components/molecule/toast.component.js.map +1 -0
  142. package/dist/components/molecule/tooltip.component.d.ts +77 -0
  143. package/dist/components/molecule/tooltip.component.d.ts.map +1 -0
  144. package/dist/components/molecule/tooltip.component.js +316 -0
  145. package/dist/components/molecule/tooltip.component.js.map +1 -0
  146. package/dist/components/optimistic-toggle-button.component.d.ts +125 -0
  147. package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -0
  148. package/dist/components/optimistic-toggle-button.component.js +296 -0
  149. package/dist/components/optimistic-toggle-button.component.js.map +1 -0
  150. package/dist/components/page-header.component.d.ts +77 -0
  151. package/dist/components/page-header.component.d.ts.map +1 -0
  152. package/dist/components/page-header.component.js +225 -0
  153. package/dist/components/page-header.component.js.map +1 -0
  154. package/dist/components/page-shell.component.d.ts +101 -0
  155. package/dist/components/page-shell.component.d.ts.map +1 -0
  156. package/dist/components/page-shell.component.js +221 -0
  157. package/dist/components/page-shell.component.js.map +1 -0
  158. package/dist/components/pagination.component.d.ts +137 -0
  159. package/dist/components/pagination.component.d.ts.map +1 -0
  160. package/dist/components/pagination.component.js +419 -0
  161. package/dist/components/pagination.component.js.map +1 -0
  162. package/dist/components/panel-close.component.d.ts +43 -0
  163. package/dist/components/panel-close.component.d.ts.map +1 -0
  164. package/dist/components/panel-close.component.js +75 -0
  165. package/dist/components/panel-close.component.js.map +1 -0
  166. package/dist/components/progress.component.d.ts +84 -0
  167. package/dist/components/progress.component.d.ts.map +1 -0
  168. package/dist/components/progress.component.js +219 -0
  169. package/dist/components/progress.component.js.map +1 -0
  170. package/dist/components/prompt-dialog.component.d.ts +121 -0
  171. package/dist/components/prompt-dialog.component.d.ts.map +1 -0
  172. package/dist/components/prompt-dialog.component.js +332 -0
  173. package/dist/components/prompt-dialog.component.js.map +1 -0
  174. package/dist/components/radio-group.component.d.ts +66 -34
  175. package/dist/components/radio-group.component.d.ts.map +1 -1
  176. package/dist/components/radio-group.component.js +146 -125
  177. package/dist/components/radio-group.component.js.map +1 -1
  178. package/dist/components/responsive-app-shell.component.d.ts +408 -0
  179. package/dist/components/responsive-app-shell.component.d.ts.map +1 -0
  180. package/dist/components/responsive-app-shell.component.js +1144 -0
  181. package/dist/components/responsive-app-shell.component.js.map +1 -0
  182. package/dist/components/select.component.d.ts +135 -38
  183. package/dist/components/select.component.d.ts.map +1 -1
  184. package/dist/components/select.component.js +373 -181
  185. package/dist/components/select.component.js.map +1 -1
  186. package/dist/components/separator.component.d.ts +39 -0
  187. package/dist/components/separator.component.d.ts.map +1 -0
  188. package/dist/components/separator.component.js +73 -0
  189. package/dist/components/separator.component.js.map +1 -0
  190. package/dist/components/sidebar-user-card.component.d.ts +106 -0
  191. package/dist/components/sidebar-user-card.component.d.ts.map +1 -0
  192. package/dist/components/sidebar-user-card.component.js +277 -0
  193. package/dist/components/sidebar-user-card.component.js.map +1 -0
  194. package/dist/components/skeleton.component.d.ts +100 -0
  195. package/dist/components/skeleton.component.d.ts.map +1 -0
  196. package/dist/components/skeleton.component.js +214 -0
  197. package/dist/components/skeleton.component.js.map +1 -0
  198. package/dist/components/spinner.component.d.ts +36 -19
  199. package/dist/components/spinner.component.d.ts.map +1 -1
  200. package/dist/components/spinner.component.js +69 -71
  201. package/dist/components/spinner.component.js.map +1 -1
  202. package/dist/components/switch.component.d.ts +72 -29
  203. package/dist/components/switch.component.d.ts.map +1 -1
  204. package/dist/components/switch.component.js +163 -91
  205. package/dist/components/switch.component.js.map +1 -1
  206. package/dist/components/table.component.d.ts +193 -0
  207. package/dist/components/table.component.d.ts.map +1 -0
  208. package/dist/components/table.component.js +550 -0
  209. package/dist/components/table.component.js.map +1 -0
  210. package/dist/components/tabs.component.d.ts +140 -0
  211. package/dist/components/tabs.component.d.ts.map +1 -0
  212. package/dist/components/tabs.component.js +390 -0
  213. package/dist/components/tabs.component.js.map +1 -0
  214. package/dist/components/template-outlet.directive.d.ts +50 -0
  215. package/dist/components/template-outlet.directive.d.ts.map +1 -0
  216. package/dist/components/template-outlet.directive.js +81 -0
  217. package/dist/components/template-outlet.directive.js.map +1 -0
  218. package/dist/components/textarea.component.d.ts +151 -0
  219. package/dist/components/textarea.component.d.ts.map +1 -0
  220. package/dist/components/textarea.component.js +340 -0
  221. package/dist/components/textarea.component.js.map +1 -0
  222. package/dist/components/theme-toggle.component.d.ts +58 -0
  223. package/dist/components/theme-toggle.component.d.ts.map +1 -0
  224. package/dist/components/theme-toggle.component.js +124 -0
  225. package/dist/components/theme-toggle.component.js.map +1 -0
  226. package/dist/components/toast.component.d.ts +237 -49
  227. package/dist/components/toast.component.d.ts.map +1 -1
  228. package/dist/components/toast.component.js +636 -201
  229. package/dist/components/toast.component.js.map +1 -1
  230. package/dist/components/tooltip.component.d.ts +95 -45
  231. package/dist/components/tooltip.component.d.ts.map +1 -1
  232. package/dist/components/tooltip.component.js +372 -221
  233. package/dist/components/tooltip.component.js.map +1 -1
  234. package/dist/components/user-menu-popover.component.d.ts +283 -0
  235. package/dist/components/user-menu-popover.component.d.ts.map +1 -0
  236. package/dist/components/user-menu-popover.component.js +646 -0
  237. package/dist/components/user-menu-popover.component.js.map +1 -0
  238. package/dist/components/user-menu.component.d.ts +95 -0
  239. package/dist/components/user-menu.component.d.ts.map +1 -0
  240. package/dist/components/user-menu.component.js +218 -0
  241. package/dist/components/user-menu.component.js.map +1 -0
  242. package/dist/hooks/index.d.ts +7 -0
  243. package/dist/hooks/index.d.ts.map +1 -0
  244. package/dist/hooks/index.js +7 -0
  245. package/dist/hooks/index.js.map +1 -0
  246. package/dist/hooks/use-is-desktop.d.ts +22 -0
  247. package/dist/hooks/use-is-desktop.d.ts.map +1 -0
  248. package/dist/hooks/use-is-desktop.js +37 -0
  249. package/dist/hooks/use-is-desktop.js.map +1 -0
  250. package/dist/index.d.ts +32 -17
  251. package/dist/index.d.ts.map +1 -1
  252. package/dist/index.js +32 -17
  253. package/dist/index.js.map +1 -1
  254. package/dist/types.d.ts +1 -1
  255. package/dist/types.d.ts.map +1 -1
  256. package/dist/utilities/dom-context.d.ts +42 -0
  257. package/dist/utilities/dom-context.d.ts.map +1 -0
  258. package/dist/utilities/dom-context.js +66 -0
  259. package/dist/utilities/dom-context.js.map +1 -0
  260. package/dist/utilities/focus.d.ts +32 -0
  261. package/dist/utilities/focus.d.ts.map +1 -0
  262. package/dist/utilities/focus.js +47 -0
  263. package/dist/utilities/focus.js.map +1 -0
  264. package/dist/utilities/form-field-context.d.ts +34 -0
  265. package/dist/utilities/form-field-context.d.ts.map +1 -0
  266. package/dist/utilities/form-field-context.js +28 -0
  267. package/dist/utilities/form-field-context.js.map +1 -0
  268. package/dist/utilities/form-submit-error.d.ts +17 -0
  269. package/dist/utilities/form-submit-error.d.ts.map +1 -0
  270. package/dist/utilities/form-submit-error.js +42 -0
  271. package/dist/utilities/form-submit-error.js.map +1 -0
  272. package/dist/utilities/icon-markup.d.ts +17 -0
  273. package/dist/utilities/icon-markup.d.ts.map +1 -0
  274. package/dist/utilities/icon-markup.js +46 -0
  275. package/dist/utilities/icon-markup.js.map +1 -0
  276. package/dist/utilities/ids.d.ts +15 -0
  277. package/dist/utilities/ids.d.ts.map +1 -0
  278. package/dist/utilities/ids.js +19 -0
  279. package/dist/utilities/ids.js.map +1 -0
  280. package/dist/utilities/index.d.ts +11 -0
  281. package/dist/utilities/index.d.ts.map +1 -1
  282. package/dist/utilities/index.js +11 -0
  283. package/dist/utilities/index.js.map +1 -1
  284. package/dist/utilities/initials.d.ts +13 -0
  285. package/dist/utilities/initials.d.ts.map +1 -0
  286. package/dist/utilities/initials.js +23 -0
  287. package/dist/utilities/initials.js.map +1 -0
  288. package/dist/utilities/node-value.d.ts +31 -0
  289. package/dist/utilities/node-value.d.ts.map +1 -0
  290. package/dist/utilities/node-value.js +37 -0
  291. package/dist/utilities/node-value.js.map +1 -0
  292. package/dist/utilities/optimistic-value.d.ts +81 -0
  293. package/dist/utilities/optimistic-value.d.ts.map +1 -0
  294. package/dist/utilities/optimistic-value.js +154 -0
  295. package/dist/utilities/optimistic-value.js.map +1 -0
  296. package/dist/utilities/render-icon.d.ts +77 -7
  297. package/dist/utilities/render-icon.d.ts.map +1 -1
  298. package/dist/utilities/render-icon.js +123 -33
  299. package/dist/utilities/render-icon.js.map +1 -1
  300. package/dist/utilities/rest-attrs.d.ts +21 -0
  301. package/dist/utilities/rest-attrs.d.ts.map +1 -0
  302. package/dist/utilities/rest-attrs.js +37 -0
  303. package/dist/utilities/rest-attrs.js.map +1 -0
  304. package/dist/utilities/style.d.ts +23 -0
  305. package/dist/utilities/style.d.ts.map +1 -0
  306. package/dist/utilities/style.js +86 -0
  307. package/dist/utilities/style.js.map +1 -0
  308. package/package.json +6 -4
@@ -0,0 +1,42 @@
1
+ /**
2
+ * DOM-scoped provider lookup — Angular's stand-in for React context.
3
+ *
4
+ * React context flows through the rendered tree, including projected
5
+ * children. Angular DI does not: `<ng-content>` nodes keep their declaration
6
+ * site's injector, so a provider declared on a wrapper component is invisible
7
+ * to components projected inside it. Contexts here are therefore registered
8
+ * on the provider's host ELEMENT and looked up by walking the DOM ancestors —
9
+ * the same "nearest enclosing provider in the rendered tree" semantics React
10
+ * has.
11
+ *
12
+ * @module
13
+ */
14
+ /**
15
+ * Registers a context value on a provider's host element.
16
+ *
17
+ * @param host - The provider component's host element.
18
+ * @param value - The context value.
19
+ */
20
+ export declare function provideDomContext(host: Element, value: unknown): void;
21
+ /**
22
+ * Removes a registration (on provider destroy).
23
+ *
24
+ * @param host - The provider component's host element.
25
+ */
26
+ export declare function removeDomContext(host: Element): void;
27
+ /**
28
+ * Finds the nearest enclosing context value for a consumer's element.
29
+ *
30
+ * @param start - The consumer's element (its own registrations are ignored —
31
+ * a provider's children see the provider, the provider does not see itself).
32
+ * @returns The nearest registered value, or `undefined` when there is none.
33
+ */
34
+ export declare function findDomContext<T>(start: Element | null): T | undefined;
35
+ /**
36
+ * Finds the nearest enclosing context INCLUDING the element itself.
37
+ *
38
+ * @param start - The element to start from.
39
+ * @returns The nearest registered value, or `undefined` when there is none.
40
+ */
41
+ export declare function findDomContextIncludingSelf<T>(start: Element | null): T | undefined;
42
+ //# sourceMappingURL=dom-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-context.d.ts","sourceRoot":"","sources":["../../src/utilities/dom-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,CAAC,GAAG,SAAS,CAQtE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,CAAC,GAAG,SAAS,CAQnF"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * DOM-scoped provider lookup — Angular's stand-in for React context.
3
+ *
4
+ * React context flows through the rendered tree, including projected
5
+ * children. Angular DI does not: `<ng-content>` nodes keep their declaration
6
+ * site's injector, so a provider declared on a wrapper component is invisible
7
+ * to components projected inside it. Contexts here are therefore registered
8
+ * on the provider's host ELEMENT and looked up by walking the DOM ancestors —
9
+ * the same "nearest enclosing provider in the rendered tree" semantics React
10
+ * has.
11
+ *
12
+ * @module
13
+ */
14
+ /** Registrations keyed by host element. */
15
+ const registrations = new WeakMap();
16
+ /**
17
+ * Registers a context value on a provider's host element.
18
+ *
19
+ * @param host - The provider component's host element.
20
+ * @param value - The context value.
21
+ */
22
+ export function provideDomContext(host, value) {
23
+ registrations.set(host, value);
24
+ }
25
+ /**
26
+ * Removes a registration (on provider destroy).
27
+ *
28
+ * @param host - The provider component's host element.
29
+ */
30
+ export function removeDomContext(host) {
31
+ registrations.delete(host);
32
+ }
33
+ /**
34
+ * Finds the nearest enclosing context value for a consumer's element.
35
+ *
36
+ * @param start - The consumer's element (its own registrations are ignored —
37
+ * a provider's children see the provider, the provider does not see itself).
38
+ * @returns The nearest registered value, or `undefined` when there is none.
39
+ */
40
+ export function findDomContext(start) {
41
+ let el = start ? start.parentElement : null;
42
+ while (el) {
43
+ const value = registrations.get(el);
44
+ if (value !== undefined)
45
+ return value;
46
+ el = el.parentElement;
47
+ }
48
+ return undefined;
49
+ }
50
+ /**
51
+ * Finds the nearest enclosing context INCLUDING the element itself.
52
+ *
53
+ * @param start - The element to start from.
54
+ * @returns The nearest registered value, or `undefined` when there is none.
55
+ */
56
+ export function findDomContextIncludingSelf(start) {
57
+ let el = start;
58
+ while (el) {
59
+ const value = registrations.get(el);
60
+ if (value !== undefined)
61
+ return value;
62
+ el = el.parentElement;
63
+ }
64
+ return undefined;
65
+ }
66
+ //# sourceMappingURL=dom-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-context.js","sourceRoot":"","sources":["../../src/utilities/dom-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,2CAA2C;AAC3C,MAAM,aAAa,GAAG,IAAI,OAAO,EAAoB,CAAA;AAErD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAa,EAAE,KAAc;IAC7D,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAC5C,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAI,KAAqB;IACrD,IAAI,EAAE,GAAmB,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAA;IAC3D,OAAO,EAAE,EAAE,CAAC;QACV,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACnC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,KAAU,CAAA;QAC1C,EAAE,GAAG,EAAE,CAAC,aAAa,CAAA;IACvB,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAI,KAAqB;IAClE,IAAI,EAAE,GAAmB,KAAK,CAAA;IAC9B,OAAO,EAAE,EAAE,CAAC;QACV,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACnC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,KAAU,CAAA;QAC1C,EAAE,GAAG,EAAE,CAAC,aAAa,CAAA;IACvB,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Focus helpers shared by the dialog-pattern components (Modal, drawers).
3
+ *
4
+ * @module
5
+ */
6
+ /** Elements the WAI-ARIA APG dialog pattern treats as tab-stops for the focus trap. */
7
+ export declare const FOCUSABLE_SELECTOR = "a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
8
+ /**
9
+ * Returns the tab-stop elements inside a container, in DOM (tab) order.
10
+ *
11
+ * @param container - The element to search within.
12
+ * @returns The focusable descendants, in document order.
13
+ */
14
+ export declare function getFocusableElements(container: HTMLElement): HTMLElement[];
15
+ /**
16
+ * Reference-counted body scroll lock. Two dialogs can be open at once (a
17
+ * drawer with a confirm above it); a shared counter means closing either one
18
+ * only restores `overflow` when the last one closes.
19
+ *
20
+ * One counter per call site family — React keeps Modal's and the responsive
21
+ * shell drawer's counters in separate module scopes, so each `createScrollLock()`
22
+ * result is independent, matching that behavior.
23
+ *
24
+ * @returns Lock/unlock functions with a shared reference count.
25
+ */
26
+ export declare function createScrollLock(): {
27
+ /** Locks body scroll on the first caller; later callers just increment the count. */
28
+ lock: () => void;
29
+ /** Decrements the count; restores the original overflow only once it reaches zero. */
30
+ unlock: () => void;
31
+ };
32
+ //# sourceMappingURL=focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/utilities/focus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,gJAC8G,CAAA;AAE7I;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,EAAE,CAE1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI;IAClC,qFAAqF;IACrF,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,sFAAsF;IACtF,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAkBA"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Focus helpers shared by the dialog-pattern components (Modal, drawers).
3
+ *
4
+ * @module
5
+ */
6
+ /** Elements the WAI-ARIA APG dialog pattern treats as tab-stops for the focus trap. */
7
+ export const FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
8
+ /**
9
+ * Returns the tab-stop elements inside a container, in DOM (tab) order.
10
+ *
11
+ * @param container - The element to search within.
12
+ * @returns The focusable descendants, in document order.
13
+ */
14
+ export function getFocusableElements(container) {
15
+ return Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR));
16
+ }
17
+ /**
18
+ * Reference-counted body scroll lock. Two dialogs can be open at once (a
19
+ * drawer with a confirm above it); a shared counter means closing either one
20
+ * only restores `overflow` when the last one closes.
21
+ *
22
+ * One counter per call site family — React keeps Modal's and the responsive
23
+ * shell drawer's counters in separate module scopes, so each `createScrollLock()`
24
+ * result is independent, matching that behavior.
25
+ *
26
+ * @returns Lock/unlock functions with a shared reference count.
27
+ */
28
+ export function createScrollLock() {
29
+ let count = 0;
30
+ let previousBodyOverflow = '';
31
+ return {
32
+ lock() {
33
+ if (count === 0) {
34
+ previousBodyOverflow = document.body.style.overflow;
35
+ document.body.style.overflow = 'hidden';
36
+ }
37
+ count += 1;
38
+ },
39
+ unlock() {
40
+ count = Math.max(0, count - 1);
41
+ if (count === 0) {
42
+ document.body.style.overflow = previousBodyOverflow;
43
+ }
44
+ },
45
+ };
46
+ }
47
+ //# sourceMappingURL=focus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.js","sourceRoot":"","sources":["../../src/utilities/focus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,uFAAuF;AACvF,MAAM,CAAC,MAAM,kBAAkB,GAC7B,2IAA2I,CAAA;AAE7I;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAsB;IACzD,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAc,kBAAkB,CAAC,CAAC,CAAA;AAChF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB;IAM9B,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,oBAAoB,GAAG,EAAE,CAAA;IAC7B,OAAO;QACL,IAAI;YACF,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChB,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA;gBACnD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAA;YACzC,CAAC;YACD,KAAK,IAAI,CAAC,CAAA;QACZ,CAAC;QACD,MAAM;YACJ,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;YAC9B,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,oBAAoB,CAAA;YACrD,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Form-field context — Angular's stand-in for React's `cloneElement`
3
+ * injection in `FormField`.
4
+ *
5
+ * React's `FormField` clones a single child element, adding `id`,
6
+ * `aria-describedby` and `aria-invalid` to its props. Angular cannot clone a
7
+ * projected component, so `FormField` registers these values on its host
8
+ * element (`utilities/dom-context.ts`) and the field components
9
+ * (`Input`, `Select`, `Textarea`, `Checkbox`) read the nearest enclosing
10
+ * registration.
11
+ *
12
+ * @module
13
+ */
14
+ /** The values `FormField` injects into its single child field. */
15
+ export interface FormFieldContext {
16
+ /** The field id (`FormField`'s `name`, or a generated id). */
17
+ id?: string;
18
+ /** The id of the error/hint paragraph the field should describe itself with. */
19
+ describedBy?: string;
20
+ /** Whether the field is invalid (`FormField` render an error). */
21
+ invalid?: boolean;
22
+ }
23
+ /**
24
+ * Finds the nearest enclosing `FormField` context for a field's host element.
25
+ *
26
+ * Resolved on every read: the field's own view is created before `FormField`
27
+ * moves its projected children into place, so a value captured once at
28
+ * construction could be stale.
29
+ *
30
+ * @param host - The field component's host element.
31
+ * @returns The context, or null outside a `FormField`.
32
+ */
33
+ export declare function fieldContext(host: Element | null): FormFieldContext | null;
34
+ //# sourceMappingURL=form-field-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field-context.d.ts","sourceRoot":"","sources":["../../src/utilities/form-field-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,gBAAgB,GAAG,IAAI,CAE1E"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Form-field context — Angular's stand-in for React's `cloneElement`
3
+ * injection in `FormField`.
4
+ *
5
+ * React's `FormField` clones a single child element, adding `id`,
6
+ * `aria-describedby` and `aria-invalid` to its props. Angular cannot clone a
7
+ * projected component, so `FormField` registers these values on its host
8
+ * element (`utilities/dom-context.ts`) and the field components
9
+ * (`Input`, `Select`, `Textarea`, `Checkbox`) read the nearest enclosing
10
+ * registration.
11
+ *
12
+ * @module
13
+ */
14
+ import { findDomContext } from './dom-context.js';
15
+ /**
16
+ * Finds the nearest enclosing `FormField` context for a field's host element.
17
+ *
18
+ * Resolved on every read: the field's own view is created before `FormField`
19
+ * moves its projected children into place, so a value captured once at
20
+ * construction could be stale.
21
+ *
22
+ * @param host - The field component's host element.
23
+ * @returns The context, or null outside a `FormField`.
24
+ */
25
+ export function fieldContext(host) {
26
+ return findDomContext(host) ?? null;
27
+ }
28
+ //# sourceMappingURL=form-field-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field-context.js","sourceRoot":"","sources":["../../src/utilities/form-field-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAYjD;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,IAAoB;IAC/C,OAAO,cAAc,CAAmB,IAAI,CAAC,IAAI,IAAI,CAAA;AACvD,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Read displayable server validation messages without coupling to an HTTP
3
+ * transport. Port of `@molecule/app-ui-react`'s `formSubmitError`.
4
+ *
5
+ * @module
6
+ */
7
+ /**
8
+ * Reads auth/HTTP response bodies, field-error dictionaries and ordinary
9
+ * failures. Server text is rendered as text by Form; malformed or empty
10
+ * bodies use the fallback.
11
+ *
12
+ * @param error - A rejected submission or a controlled server error.
13
+ * @param fallback - The already translated generic failure message.
14
+ * @returns Nonempty messages suitable for a visible error list.
15
+ */
16
+ export declare function formSubmitErrorMessages(error: unknown, fallback: string): string[];
17
+ //# sourceMappingURL=form-submit-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-submit-error.d.ts","sourceRoot":"","sources":["../../src/utilities/form-submit-error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAgBlF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Read displayable server validation messages without coupling to an HTTP
3
+ * transport. Port of `@molecule/app-ui-react`'s `formSubmitError`.
4
+ *
5
+ * @module
6
+ */
7
+ /**
8
+ * Narrows a response envelope without depending on a transport's error class.
9
+ *
10
+ * @param value - Any value.
11
+ * @returns The value as a record when it is an object, else undefined.
12
+ */
13
+ function record(value) {
14
+ return value !== null && typeof value === 'object'
15
+ ? value
16
+ : undefined;
17
+ }
18
+ /**
19
+ * Reads auth/HTTP response bodies, field-error dictionaries and ordinary
20
+ * failures. Server text is rendered as text by Form; malformed or empty
21
+ * bodies use the fallback.
22
+ *
23
+ * @param error - A rejected submission or a controlled server error.
24
+ * @param fallback - The already translated generic failure message.
25
+ * @returns Nonempty messages suitable for a visible error list.
26
+ */
27
+ export function formSubmitErrorMessages(error, fallback) {
28
+ const failure = record(error);
29
+ const body = record(failure?.body ?? record(failure?.response)?.data ?? failure?.data ?? error);
30
+ const errors = body?.errors;
31
+ const text = (value) => typeof value === 'string' && value.trim().length > 0;
32
+ const messages = Array.isArray(errors)
33
+ ? errors.filter(text)
34
+ : Object.entries(record(errors) ?? {}).flatMap(([field, value]) => (Array.isArray(value) ? value : [value])
35
+ .filter(text)
36
+ .map((message) => `${field} ${message}`));
37
+ if (messages.length)
38
+ return messages;
39
+ const message = failure?.message ?? body?.message ?? body?.error ?? error;
40
+ return [text(message) ? message : fallback];
41
+ }
42
+ //# sourceMappingURL=form-submit-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-submit-error.js","sourceRoot":"","sources":["../../src/utilities/form-submit-error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAChD,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,SAAS,CAAA;AACf,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAc,EAAE,QAAgB;IACtE,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,IAAI,IAAI,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,IAAI,OAAO,EAAE,IAAI,IAAI,KAAK,CAAC,CAAA;IAC/F,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,CAAA;IAC3B,MAAM,IAAI,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC/C,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA;IACtD,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACpC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAC9D,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aACrC,MAAM,CAAC,IAAI,CAAC;aACZ,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,KAAK,IAAI,OAAO,EAAE,CAAC,CAC3C,CAAA;IACL,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAA;IACpC,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,IAAI,KAAK,CAAA;IACzE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;AAC7C,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Icon markup generation for the deprecated spike components.
3
+ *
4
+ * @module
5
+ */
6
+ import { type IconName } from '@molecule/app-icons';
7
+ /**
8
+ * Generates SVG markup string from an icon name.
9
+ *
10
+ * @param name - Icon name from the icon set
11
+ * @param className - CSS class for sizing
12
+ * @returns SVG markup string
13
+ *
14
+ * @deprecated Used only by the deprecated `Molecule*` spike components.
15
+ */
16
+ export declare function getIconSvg(name: IconName, className: string): string;
17
+ //# sourceMappingURL=icon-markup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-markup.d.ts","sourceRoot":"","sources":["../../src/utilities/icon-markup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE5D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA2BpE"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Icon markup generation for the deprecated spike components.
3
+ *
4
+ * @module
5
+ */
6
+ import { getIcon } from '@molecule/app-icons';
7
+ /**
8
+ * Generates SVG markup string from an icon name.
9
+ *
10
+ * @param name - Icon name from the icon set
11
+ * @param className - CSS class for sizing
12
+ * @returns SVG markup string
13
+ *
14
+ * @deprecated Used only by the deprecated `Molecule*` spike components.
15
+ */
16
+ export function getIconSvg(name, className) {
17
+ const icon = getIcon(name);
18
+ const viewBox = icon.viewBox || '0 0 20 20';
19
+ const fill = icon.fill || 'currentColor';
20
+ const attrs = [
21
+ `xmlns="http://www.w3.org/2000/svg"`,
22
+ `class="${className}"`,
23
+ `viewBox="${viewBox}"`,
24
+ `fill="${fill}"`,
25
+ ];
26
+ if (icon.stroke)
27
+ attrs.push(`stroke="${icon.stroke}"`);
28
+ if (icon.strokeWidth)
29
+ attrs.push(`stroke-width="${icon.strokeWidth}"`);
30
+ if (icon.strokeLinecap)
31
+ attrs.push(`stroke-linecap="${icon.strokeLinecap}"`);
32
+ if (icon.strokeLinejoin)
33
+ attrs.push(`stroke-linejoin="${icon.strokeLinejoin}"`);
34
+ const paths = icon.paths
35
+ .map((p) => {
36
+ const pathAttrs = [`d="${p.d}"`];
37
+ if (p.fillRule)
38
+ pathAttrs.push(`fill-rule="${p.fillRule}"`);
39
+ if (p.clipRule)
40
+ pathAttrs.push(`clip-rule="${p.clipRule}"`);
41
+ return `<path ${pathAttrs.join(' ')} />`;
42
+ })
43
+ .join('');
44
+ return `<svg ${attrs.join(' ')}>${paths}</svg>`;
45
+ }
46
+ //# sourceMappingURL=icon-markup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-markup.js","sourceRoot":"","sources":["../../src/utilities/icon-markup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAiB,MAAM,qBAAqB,CAAA;AAE5D;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,SAAiB;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,WAAW,CAAA;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,cAAc,CAAA;IAExC,MAAM,KAAK,GAAG;QACZ,oCAAoC;QACpC,UAAU,SAAS,GAAG;QACtB,YAAY,OAAO,GAAG;QACtB,SAAS,IAAI,GAAG;KACjB,CAAA;IAED,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IACtD,IAAI,IAAI,CAAC,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAA;IACtE,IAAI,IAAI,CAAC,aAAa;QAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAA;IAC5E,IAAI,IAAI,CAAC,cAAc;QAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;IAE/E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK;SACrB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QAChC,IAAI,CAAC,CAAC,QAAQ;YAAE,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAA;QAC3D,IAAI,CAAC,CAAC,QAAQ;YAAE,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAA;QAC3D,OAAO,SAAS,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAA;IAC1C,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAA;IAEX,OAAO,QAAQ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAA;AACjD,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Per-instance DOM id generation for React `useId()` parity.
3
+ *
4
+ * @module
5
+ */
6
+ /**
7
+ * Mints a unique DOM id. React's `useId()` produces per-render-instance ids
8
+ * that the conformance normalizer renumbers by document order, so the exact
9
+ * format does not matter — only uniqueness and stable per-instance identity
10
+ * (one call per logical id, kept in a field).
11
+ *
12
+ * @returns A unique id string.
13
+ */
14
+ export declare function nextInstanceId(): string;
15
+ //# sourceMappingURL=ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/utilities/ids.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAGvC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Per-instance DOM id generation for React `useId()` parity.
3
+ *
4
+ * @module
5
+ */
6
+ let counter = 0;
7
+ /**
8
+ * Mints a unique DOM id. React's `useId()` produces per-render-instance ids
9
+ * that the conformance normalizer renumbers by document order, so the exact
10
+ * format does not matter — only uniqueness and stable per-instance identity
11
+ * (one call per logical id, kept in a field).
12
+ *
13
+ * @returns A unique id string.
14
+ */
15
+ export function nextInstanceId() {
16
+ counter += 1;
17
+ return `mol-${counter.toString(36)}`;
18
+ }
19
+ //# sourceMappingURL=ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/utilities/ids.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,IAAI,OAAO,GAAG,CAAC,CAAA;AAEf;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,IAAI,CAAC,CAAA;IACZ,OAAO,OAAO,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAA;AACtC,CAAC"}
@@ -3,6 +3,17 @@
3
3
  *
4
4
  * @module
5
5
  */
6
+ export * from './dom-context.js';
7
+ export * from './focus.js';
8
+ export * from './form-field-context.js';
9
+ export * from './form-submit-error.js';
10
+ export * from './icon-markup.js';
11
+ export * from './ids.js';
12
+ export * from './initials.js';
13
+ export * from './node-value.js';
14
+ export * from './optimistic-value.js';
6
15
  export * from './render-icon.js';
16
+ export * from './rest-attrs.js';
17
+ export * from './style.js';
7
18
  export * from './utilities.js';
8
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
@@ -3,6 +3,17 @@
3
3
  *
4
4
  * @module
5
5
  */
6
+ export * from './dom-context.js';
7
+ export * from './focus.js';
8
+ export * from './form-field-context.js';
9
+ export * from './form-submit-error.js';
10
+ export * from './icon-markup.js';
11
+ export * from './ids.js';
12
+ export * from './initials.js';
13
+ export * from './node-value.js';
14
+ export * from './optimistic-value.js';
6
15
  export * from './render-icon.js';
16
+ export * from './rest-attrs.js';
17
+ export * from './style.js';
7
18
  export * from './utilities.js';
8
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Initials derivation for avatar fallbacks.
3
+ *
4
+ * @module
5
+ */
6
+ /**
7
+ * Compute up-to-two-letter initials from a display name or email.
8
+ *
9
+ * @param value - The name or email to derive initials from.
10
+ * @returns The uppercased initials, or `'?'` when no usable input is given.
11
+ */
12
+ export declare function getInitials(value: string | null | undefined): string;
13
+ //# sourceMappingURL=initials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initials.d.ts","sourceRoot":"","sources":["../../src/utilities/initials.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAQpE"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Initials derivation for avatar fallbacks.
3
+ *
4
+ * @module
5
+ */
6
+ /**
7
+ * Compute up-to-two-letter initials from a display name or email.
8
+ *
9
+ * @param value - The name or email to derive initials from.
10
+ * @returns The uppercased initials, or `'?'` when no usable input is given.
11
+ */
12
+ export function getInitials(value) {
13
+ if (!value)
14
+ return '?';
15
+ const cleaned = value.includes('@') ? value.split('@')[0] : value;
16
+ const parts = cleaned.split(/[\s._-]+/).filter(Boolean);
17
+ if (parts.length === 0)
18
+ return '?';
19
+ const first = parts[0]?.[0] ?? '';
20
+ const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : '';
21
+ return (first + last).toUpperCase().slice(0, 2) || '?';
22
+ }
23
+ //# sourceMappingURL=initials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initials.js","sourceRoot":"","sources":["../../src/utilities/initials.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAgC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,GAAG,CAAA;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAY,CAAC,CAAC,CAAC,KAAK,CAAA;IAC7E,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACvD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IAClC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IACjC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzE,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAA;AACxD,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Node-valued prop handling: the adapter projects node values either as
3
+ * `TemplateRef` inputs (inside data props like `items[0].header`) or as
4
+ * projected `[slot=…]` content; plain strings render as text.
5
+ *
6
+ * @module
7
+ */
8
+ import { TemplateRef } from '@angular/core';
9
+ /**
10
+ * Whether a node-valued prop arrived as a TemplateRef.
11
+ *
12
+ * @param value - The prop value.
13
+ * @returns The TemplateRef, or null for any other value.
14
+ */
15
+ export declare function asTemplate(value: unknown): TemplateRef<unknown> | null;
16
+ /**
17
+ * Renders a plain-string node value (React renders strings as text).
18
+ *
19
+ * @param value - The prop value.
20
+ * @returns The text, or empty.
21
+ */
22
+ export declare function nodeText(value: unknown): string;
23
+ /**
24
+ * Whether a node-valued prop was passed at all (presence check for
25
+ * conditional wrappers).
26
+ *
27
+ * @param value - The prop value.
28
+ * @returns True when given.
29
+ */
30
+ export declare function isGiven(value: unknown): boolean;
31
+ //# sourceMappingURL=node-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-value.d.ts","sourceRoot":"","sources":["../../src/utilities/node-value.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE/C"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Node-valued prop handling: the adapter projects node values either as
3
+ * `TemplateRef` inputs (inside data props like `items[0].header`) or as
4
+ * projected `[slot=…]` content; plain strings render as text.
5
+ *
6
+ * @module
7
+ */
8
+ import { TemplateRef } from '@angular/core';
9
+ /**
10
+ * Whether a node-valued prop arrived as a TemplateRef.
11
+ *
12
+ * @param value - The prop value.
13
+ * @returns The TemplateRef, or null for any other value.
14
+ */
15
+ export function asTemplate(value) {
16
+ return value instanceof TemplateRef ? value : null;
17
+ }
18
+ /**
19
+ * Renders a plain-string node value (React renders strings as text).
20
+ *
21
+ * @param value - The prop value.
22
+ * @returns The text, or empty.
23
+ */
24
+ export function nodeText(value) {
25
+ return typeof value === 'string' ? value : '';
26
+ }
27
+ /**
28
+ * Whether a node-valued prop was passed at all (presence check for
29
+ * conditional wrappers).
30
+ *
31
+ * @param value - The prop value.
32
+ * @returns True when given.
33
+ */
34
+ export function isGiven(value) {
35
+ return value !== undefined && value !== null;
36
+ }
37
+ //# sourceMappingURL=node-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-value.js","sourceRoot":"","sources":["../../src/utilities/node-value.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAC/C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAA;AAC9C,CAAC"}