@slotted/angular 0.1.0-beta.29 → 0.1.0-beta.30

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 (397) hide show
  1. package/docs/AGENTS.snippet.md +1 -1
  2. package/docs/accordion.json +5 -5
  3. package/docs/accordion.md +12 -12
  4. package/docs/action-bar.json +20 -20
  5. package/docs/action-bar.md +28 -28
  6. package/docs/action-sheet.json +4 -4
  7. package/docs/action-sheet.md +12 -12
  8. package/docs/alert.json +10 -10
  9. package/docs/alert.md +16 -16
  10. package/docs/app-shell.examples.md +7 -7
  11. package/docs/app-shell.json +13 -13
  12. package/docs/app-shell.md +3 -3
  13. package/docs/avatar-group.json +1 -1
  14. package/docs/avatar-group.md +1 -1
  15. package/docs/avatar.json +10 -10
  16. package/docs/avatar.md +9 -9
  17. package/docs/badge.json +3 -3
  18. package/docs/badge.md +3 -3
  19. package/docs/breadcrumb.json +2 -2
  20. package/docs/breadcrumb.md +2 -2
  21. package/docs/button-group.json +1 -1
  22. package/docs/button-group.md +1 -1
  23. package/docs/button.json +11 -11
  24. package/docs/button.md +7 -7
  25. package/docs/calendar.json +4 -4
  26. package/docs/calendar.md +3 -3
  27. package/docs/card.json +2 -2
  28. package/docs/card.md +2 -2
  29. package/docs/carousel.json +10 -10
  30. package/docs/carousel.md +11 -11
  31. package/docs/chart.examples.md +32 -32
  32. package/docs/chart.json +33 -33
  33. package/docs/chart.md +4 -4
  34. package/docs/checkbox-group.examples.md +13 -13
  35. package/docs/checkbox-group.json +7 -7
  36. package/docs/checkbox-group.md +2 -2
  37. package/docs/checkbox.examples.md +7 -7
  38. package/docs/checkbox.json +6 -6
  39. package/docs/checkbox.md +3 -3
  40. package/docs/code-block.json +1 -1
  41. package/docs/code-block.md +1 -1
  42. package/docs/collapsible.json +11 -11
  43. package/docs/collapsible.md +19 -19
  44. package/docs/color-picker.json +26 -26
  45. package/docs/color-picker.md +16 -16
  46. package/docs/combobox.json +2 -2
  47. package/docs/combobox.md +2 -2
  48. package/docs/context-menu.json +1 -1
  49. package/docs/context-menu.md +1 -1
  50. package/docs/currency-field.examples.md +3 -3
  51. package/docs/currency-field.json +6 -6
  52. package/docs/currency-field.md +4 -4
  53. package/docs/dashboard-grid.json +1 -1
  54. package/docs/data-grid.examples.md +1 -1
  55. package/docs/data-grid.json +2 -2
  56. package/docs/data-grid.props.md +1 -1
  57. package/docs/date-field.json +3 -3
  58. package/docs/date-field.md +5 -5
  59. package/docs/date-picker.json +1 -1
  60. package/docs/date-range-picker.json +1 -1
  61. package/docs/datetime-field.json +4 -4
  62. package/docs/datetime-field.md +9 -9
  63. package/docs/datetime-picker.json +1 -1
  64. package/docs/datetime-range-picker.examples.md +3 -3
  65. package/docs/datetime-range-picker.json +4 -4
  66. package/docs/datetime-range-picker.md +2 -2
  67. package/docs/description-list.json +5 -5
  68. package/docs/description-list.md +4 -4
  69. package/docs/detail-panel.json +10 -10
  70. package/docs/detail-panel.md +12 -12
  71. package/docs/dialog.examples.md +5 -5
  72. package/docs/dialog.json +10 -10
  73. package/docs/dialog.md +2 -2
  74. package/docs/dialog.props.md +2 -2
  75. package/docs/drawer.examples.md +13 -13
  76. package/docs/drawer.json +6 -6
  77. package/docs/event-calendar.examples.md +3 -3
  78. package/docs/event-calendar.json +5 -5
  79. package/docs/event-calendar.md +2 -2
  80. package/docs/field-group.json +6 -6
  81. package/docs/field-group.md +11 -11
  82. package/docs/field.examples.md +3 -3
  83. package/docs/field.json +4 -4
  84. package/docs/field.md +1 -1
  85. package/docs/form.json +8 -8
  86. package/docs/form.md +12 -12
  87. package/docs/fullscreen.json +4 -4
  88. package/docs/fullscreen.md +7 -7
  89. package/docs/guidelines/async-feedback.md +2 -2
  90. package/docs/guidelines/builders.md +1 -1
  91. package/docs/guidelines/composition.md +4 -4
  92. package/docs/guidelines/conversations.md +1 -1
  93. package/docs/guidelines/index.md +2 -2
  94. package/docs/guidelines/layout-alignment.md +5 -5
  95. package/docs/guidelines/overviews.md +3 -3
  96. package/docs/guidelines/own-elements.md +7 -7
  97. package/docs/guidelines/record-pages.md +1 -1
  98. package/docs/highlight.json +9 -9
  99. package/docs/highlight.md +14 -14
  100. package/docs/icon.json +2 -2
  101. package/docs/icon.md +2 -2
  102. package/docs/image.json +3 -3
  103. package/docs/image.md +3 -3
  104. package/docs/import-export-center.json +23 -23
  105. package/docs/import-export-center.md +17 -17
  106. package/docs/inline-message.json +15 -15
  107. package/docs/inline-message.md +22 -22
  108. package/docs/inline.json +1 -1
  109. package/docs/inline.md +1 -1
  110. package/docs/kbd.json +2 -2
  111. package/docs/kbd.md +2 -2
  112. package/docs/link.json +6 -6
  113. package/docs/link.md +6 -6
  114. package/docs/list-item.json +1 -1
  115. package/docs/list-item.md +1 -1
  116. package/docs/list.json +1 -1
  117. package/docs/listbox.json +1 -1
  118. package/docs/listbox.md +1 -1
  119. package/docs/loading-overlay.json +3 -3
  120. package/docs/loading-overlay.md +3 -3
  121. package/docs/message-scroller.json +1 -1
  122. package/docs/message-scroller.md +1 -1
  123. package/docs/message.json +11 -11
  124. package/docs/message.md +17 -17
  125. package/docs/multi-select.json +1 -1
  126. package/docs/notification-center.json +16 -16
  127. package/docs/notification-center.md +18 -22
  128. package/docs/number-field.examples.md +3 -3
  129. package/docs/number-field.json +3 -3
  130. package/docs/otp-input.json +10 -10
  131. package/docs/otp-input.md +13 -13
  132. package/docs/page-header.json +9 -9
  133. package/docs/page-header.md +20 -22
  134. package/docs/pagination.json +2 -2
  135. package/docs/pagination.md +1 -1
  136. package/docs/popover.examples.md +1 -1
  137. package/docs/popover.json +3 -3
  138. package/docs/popover.md +1 -1
  139. package/docs/progress-indicator.json +4 -4
  140. package/docs/progress-indicator.md +4 -4
  141. package/docs/prompt-composer.json +4 -4
  142. package/docs/prompt-composer.md +5 -5
  143. package/docs/prose.json +1 -1
  144. package/docs/prose.md +1 -1
  145. package/docs/radio-group.examples.md +19 -19
  146. package/docs/radio-group.json +12 -12
  147. package/docs/radio-group.md +3 -3
  148. package/docs/rating.json +23 -23
  149. package/docs/rating.md +25 -34
  150. package/docs/result-state.json +12 -12
  151. package/docs/result-state.md +17 -17
  152. package/docs/saved-views.json +1 -1
  153. package/docs/scroll-area.json +5 -5
  154. package/docs/scroll-area.md +6 -6
  155. package/docs/section.json +6 -6
  156. package/docs/section.md +12 -12
  157. package/docs/segmented-control.json +14 -14
  158. package/docs/segmented-control.md +32 -32
  159. package/docs/skeleton.json +1 -1
  160. package/docs/skeleton.md +1 -1
  161. package/docs/skills/build-own-element/SKILL.md +3 -3
  162. package/docs/skills/compose-screen/SKILL.md +2 -2
  163. package/docs/skills/index.md +2 -2
  164. package/docs/skills/review-screen/SKILL.md +3 -3
  165. package/docs/skills/theme-app/SKILL.md +9 -9
  166. package/docs/skills/waiting-states/SKILL.md +1 -1
  167. package/docs/slider.json +8 -8
  168. package/docs/slider.md +12 -12
  169. package/docs/sparkline.json +8 -8
  170. package/docs/sparkline.md +6 -6
  171. package/docs/split-button.json +11 -11
  172. package/docs/split-button.md +25 -27
  173. package/docs/stack.json +1 -1
  174. package/docs/stack.md +1 -1
  175. package/docs/stat-card.json +3 -3
  176. package/docs/stat-card.md +2 -2
  177. package/docs/status-indicator.json +8 -8
  178. package/docs/status-indicator.md +5 -5
  179. package/docs/stepper.json +4 -4
  180. package/docs/stepper.md +4 -4
  181. package/docs/switch.json +5 -5
  182. package/docs/switch.md +7 -7
  183. package/docs/table-of-contents.json +11 -11
  184. package/docs/table-of-contents.md +12 -12
  185. package/docs/table.examples.md +1 -1
  186. package/docs/table.json +1 -1
  187. package/docs/tabs.json +1 -1
  188. package/docs/tabs.md +1 -1
  189. package/docs/tag.json +17 -17
  190. package/docs/tag.md +14 -14
  191. package/docs/tags-input.json +1 -1
  192. package/docs/tags-input.md +1 -1
  193. package/docs/text-field.examples.md +6 -6
  194. package/docs/text-field.json +4 -4
  195. package/docs/textarea.examples.md +7 -7
  196. package/docs/textarea.json +3 -3
  197. package/docs/time-field.json +3 -3
  198. package/docs/time-field.md +6 -6
  199. package/docs/time-picker.json +5 -5
  200. package/docs/time-picker.md +6 -6
  201. package/docs/time-range-picker.examples.md +5 -5
  202. package/docs/time-range-picker.json +5 -5
  203. package/docs/time-range-picker.md +1 -1
  204. package/docs/toast.json +6 -6
  205. package/docs/toast.md +6 -6
  206. package/docs/toggle-group.json +12 -12
  207. package/docs/toggle-group.md +28 -28
  208. package/docs/toggle.json +8 -8
  209. package/docs/toggle.md +7 -7
  210. package/docs/tokens.md +15 -15
  211. package/docs/toolbar.json +11 -11
  212. package/docs/toolbar.md +23 -23
  213. package/docs/tooltip.json +3 -3
  214. package/docs/tooltip.md +3 -3
  215. package/docs/top-navigation.examples.md +11 -15
  216. package/docs/top-navigation.json +9 -9
  217. package/docs/top-navigation.md +7 -7
  218. package/docs/tour.json +9 -9
  219. package/docs/tour.md +6 -6
  220. package/docs/typography.json +2 -2
  221. package/docs/typography.md +2 -2
  222. package/docs/upload.examples.md +3 -3
  223. package/docs/upload.json +9 -9
  224. package/docs/upload.md +4 -4
  225. package/fesm2022/slotted-angular-alert.mjs +2 -2
  226. package/fesm2022/slotted-angular-alert.mjs.map +1 -1
  227. package/fesm2022/slotted-angular-app-shell.mjs +10 -10
  228. package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
  229. package/fesm2022/slotted-angular-avatar-group.mjs +4 -4
  230. package/fesm2022/slotted-angular-avatar-group.mjs.map +1 -1
  231. package/fesm2022/slotted-angular-avatar.mjs +3 -3
  232. package/fesm2022/slotted-angular-avatar.mjs.map +1 -1
  233. package/fesm2022/slotted-angular-badge.mjs +1 -1
  234. package/fesm2022/slotted-angular-badge.mjs.map +1 -1
  235. package/fesm2022/slotted-angular-breadcrumb.mjs +1 -1
  236. package/fesm2022/slotted-angular-breadcrumb.mjs.map +1 -1
  237. package/fesm2022/slotted-angular-button-group.mjs +1 -1
  238. package/fesm2022/slotted-angular-button-group.mjs.map +1 -1
  239. package/fesm2022/slotted-angular-button.mjs +2 -2
  240. package/fesm2022/slotted-angular-button.mjs.map +1 -1
  241. package/fesm2022/slotted-angular-card.mjs +1 -1
  242. package/fesm2022/slotted-angular-card.mjs.map +1 -1
  243. package/fesm2022/slotted-angular-chart.mjs +2 -2
  244. package/fesm2022/slotted-angular-chart.mjs.map +1 -1
  245. package/fesm2022/slotted-angular-checkbox.mjs +1 -1
  246. package/fesm2022/slotted-angular-checkbox.mjs.map +1 -1
  247. package/fesm2022/slotted-angular-code-block.mjs +1 -1
  248. package/fesm2022/slotted-angular-code-block.mjs.map +1 -1
  249. package/fesm2022/slotted-angular-collapsible.mjs +1 -1
  250. package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
  251. package/fesm2022/slotted-angular-color-picker.mjs +6 -6
  252. package/fesm2022/slotted-angular-color-picker.mjs.map +1 -1
  253. package/fesm2022/slotted-angular-column-manager.mjs +3 -1
  254. package/fesm2022/slotted-angular-column-manager.mjs.map +1 -1
  255. package/fesm2022/slotted-angular-currency-field.mjs +2 -2
  256. package/fesm2022/slotted-angular-currency-field.mjs.map +1 -1
  257. package/fesm2022/slotted-angular-data-grid.mjs +1 -1
  258. package/fesm2022/slotted-angular-data-grid.mjs.map +1 -1
  259. package/fesm2022/slotted-angular-datetime-field.mjs +1 -1
  260. package/fesm2022/slotted-angular-datetime-field.mjs.map +1 -1
  261. package/fesm2022/slotted-angular-datetime-range-picker.mjs +6 -6
  262. package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
  263. package/fesm2022/slotted-angular-description-list.mjs +3 -3
  264. package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
  265. package/fesm2022/slotted-angular-dialog.mjs +3 -3
  266. package/fesm2022/slotted-angular-dialog.mjs.map +1 -1
  267. package/fesm2022/slotted-angular-drawer.mjs +1 -1
  268. package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
  269. package/fesm2022/slotted-angular-event-calendar.mjs +3 -3
  270. package/fesm2022/slotted-angular-event-calendar.mjs.map +1 -1
  271. package/fesm2022/slotted-angular-field.mjs +2 -2
  272. package/fesm2022/slotted-angular-field.mjs.map +1 -1
  273. package/fesm2022/slotted-angular-form.mjs +6 -6
  274. package/fesm2022/slotted-angular-form.mjs.map +1 -1
  275. package/fesm2022/slotted-angular-grid.mjs +2 -2
  276. package/fesm2022/slotted-angular-grid.mjs.map +1 -1
  277. package/fesm2022/slotted-angular-highlight.mjs +1 -1
  278. package/fesm2022/slotted-angular-highlight.mjs.map +1 -1
  279. package/fesm2022/slotted-angular-icon.mjs +3 -3
  280. package/fesm2022/slotted-angular-icon.mjs.map +1 -1
  281. package/fesm2022/slotted-angular-import-export-center.mjs +10 -10
  282. package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -1
  283. package/fesm2022/slotted-angular-inline-message.mjs +4 -4
  284. package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
  285. package/fesm2022/slotted-angular-inline.mjs +3 -3
  286. package/fesm2022/slotted-angular-inline.mjs.map +1 -1
  287. package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
  288. package/fesm2022/slotted-angular-list.mjs +1 -1
  289. package/fesm2022/slotted-angular-list.mjs.map +1 -1
  290. package/fesm2022/slotted-angular-listbox.mjs +2 -2
  291. package/fesm2022/slotted-angular-listbox.mjs.map +1 -1
  292. package/fesm2022/slotted-angular-loading-overlay.mjs +3 -3
  293. package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
  294. package/fesm2022/slotted-angular-menu.mjs +2 -2
  295. package/fesm2022/slotted-angular-menu.mjs.map +1 -1
  296. package/fesm2022/slotted-angular-message-scroller.mjs +1 -1
  297. package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -1
  298. package/fesm2022/slotted-angular-notification-center.mjs +3 -3
  299. package/fesm2022/slotted-angular-notification-center.mjs.map +1 -1
  300. package/fesm2022/slotted-angular-number-field.mjs +1 -1
  301. package/fesm2022/slotted-angular-number-field.mjs.map +1 -1
  302. package/fesm2022/slotted-angular-otp-input.mjs +1 -1
  303. package/fesm2022/slotted-angular-otp-input.mjs.map +1 -1
  304. package/fesm2022/slotted-angular-popover.mjs +2 -2
  305. package/fesm2022/slotted-angular-popover.mjs.map +1 -1
  306. package/fesm2022/slotted-angular-progress-indicator.mjs +2 -2
  307. package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
  308. package/fesm2022/slotted-angular-radio-group.mjs +2 -2
  309. package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
  310. package/fesm2022/slotted-angular-rating.mjs +5 -5
  311. package/fesm2022/slotted-angular-rating.mjs.map +1 -1
  312. package/fesm2022/slotted-angular-result-state.mjs.map +1 -1
  313. package/fesm2022/slotted-angular-segmented-control.mjs +1 -1
  314. package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -1
  315. package/fesm2022/slotted-angular-slider.mjs +3 -3
  316. package/fesm2022/slotted-angular-slider.mjs.map +1 -1
  317. package/fesm2022/slotted-angular-stack.mjs +2 -2
  318. package/fesm2022/slotted-angular-stack.mjs.map +1 -1
  319. package/fesm2022/slotted-angular-status-indicator.mjs +1 -1
  320. package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
  321. package/fesm2022/slotted-angular-switch.mjs.map +1 -1
  322. package/fesm2022/slotted-angular-table.mjs +2 -2
  323. package/fesm2022/slotted-angular-table.mjs.map +1 -1
  324. package/fesm2022/slotted-angular-tabs.mjs.map +1 -1
  325. package/fesm2022/slotted-angular-tag.mjs +1 -1
  326. package/fesm2022/slotted-angular-tag.mjs.map +1 -1
  327. package/fesm2022/slotted-angular-tags-input.mjs +1 -1
  328. package/fesm2022/slotted-angular-tags-input.mjs.map +1 -1
  329. package/fesm2022/slotted-angular-theme.mjs.map +1 -1
  330. package/fesm2022/slotted-angular-time-range-picker.mjs +6 -6
  331. package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
  332. package/fesm2022/slotted-angular-toast.mjs +2 -2
  333. package/fesm2022/slotted-angular-toast.mjs.map +1 -1
  334. package/fesm2022/slotted-angular-toggle-group.mjs.map +1 -1
  335. package/fesm2022/slotted-angular-toggle.mjs.map +1 -1
  336. package/fesm2022/slotted-angular-tour.mjs +3 -3
  337. package/fesm2022/slotted-angular-tour.mjs.map +1 -1
  338. package/fesm2022/slotted-angular-typography.mjs +1 -1
  339. package/fesm2022/slotted-angular-typography.mjs.map +1 -1
  340. package/fesm2022/slotted-angular-upload.mjs +2 -2
  341. package/fesm2022/slotted-angular-upload.mjs.map +1 -1
  342. package/fesm2022/slotted-angular-wizard.mjs +6 -6
  343. package/fesm2022/slotted-angular-wizard.mjs.map +1 -1
  344. package/package.json +15 -3
  345. package/types/slotted-angular-alert.d.ts +3 -3
  346. package/types/slotted-angular-app-shell.d.ts +4 -4
  347. package/types/slotted-angular-avatar-group.d.ts +3 -3
  348. package/types/slotted-angular-avatar.d.ts +6 -6
  349. package/types/slotted-angular-badge.d.ts +3 -3
  350. package/types/slotted-angular-breadcrumb.d.ts +1 -1
  351. package/types/slotted-angular-button-group.d.ts +1 -1
  352. package/types/slotted-angular-button.d.ts +2 -2
  353. package/types/slotted-angular-card.d.ts +1 -1
  354. package/types/slotted-angular-chart.d.ts +2 -2
  355. package/types/slotted-angular-checkbox.d.ts +1 -1
  356. package/types/slotted-angular-code-block.d.ts +1 -1
  357. package/types/slotted-angular-collapsible.d.ts +1 -1
  358. package/types/slotted-angular-color-picker.d.ts +6 -6
  359. package/types/slotted-angular-column-manager.d.ts +1 -1
  360. package/types/slotted-angular-column-manager.d.ts.map +1 -1
  361. package/types/slotted-angular-currency-field.d.ts +1 -1
  362. package/types/slotted-angular-data-grid.d.ts +1 -1
  363. package/types/slotted-angular-datetime-range-picker.d.ts +1 -1
  364. package/types/slotted-angular-description-list.d.ts +1 -1
  365. package/types/slotted-angular-field.d.ts +2 -2
  366. package/types/slotted-angular-form.d.ts +1 -1
  367. package/types/slotted-angular-highlight.d.ts +1 -1
  368. package/types/slotted-angular-icon.d.ts +2 -2
  369. package/types/slotted-angular-import-export-center.d.ts +9 -9
  370. package/types/slotted-angular-inline-message.d.ts +3 -3
  371. package/types/slotted-angular-inline.d.ts +1 -1
  372. package/types/slotted-angular-kbd.d.ts +1 -1
  373. package/types/slotted-angular-list.d.ts +1 -1
  374. package/types/slotted-angular-listbox.d.ts +2 -2
  375. package/types/slotted-angular-loading-overlay.d.ts +3 -3
  376. package/types/slotted-angular-menu.d.ts +1 -1
  377. package/types/slotted-angular-message-scroller.d.ts +1 -1
  378. package/types/slotted-angular-notification-center.d.ts +4 -4
  379. package/types/slotted-angular-otp-input.d.ts +1 -1
  380. package/types/slotted-angular-progress-indicator.d.ts +2 -2
  381. package/types/slotted-angular-radio-group.d.ts +2 -2
  382. package/types/slotted-angular-rating.d.ts +2 -2
  383. package/types/slotted-angular-result-state.d.ts +1 -1
  384. package/types/slotted-angular-segmented-control.d.ts +2 -2
  385. package/types/slotted-angular-status-indicator.d.ts +2 -2
  386. package/types/slotted-angular-switch.d.ts +1 -1
  387. package/types/slotted-angular-table.d.ts +1 -1
  388. package/types/slotted-angular-tabs.d.ts +1 -1
  389. package/types/slotted-angular-tag.d.ts +3 -3
  390. package/types/slotted-angular-tags-input.d.ts +1 -1
  391. package/types/slotted-angular-theme.d.ts +1 -1
  392. package/types/slotted-angular-time-range-picker.d.ts +1 -1
  393. package/types/slotted-angular-toast.d.ts +4 -4
  394. package/types/slotted-angular-toggle-group.d.ts +1 -1
  395. package/types/slotted-angular-toggle.d.ts +1 -1
  396. package/types/slotted-angular-tour.d.ts +2 -2
  397. package/types/slotted-angular-wizard.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-form.mjs","sources":["../../form/src/form-defaults.ts","../../form/src/form-actions.ts","../../form/src/form.ts","../../form/src/slotted-angular-form.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { Signal } from '@angular/core';\nimport type { FormErrorEntry, FormErrors } from '@slotted/core/form';\n\n/**\n * When the form checks its own controls. `submit` is the default and\n * re-validates on every change afterwards: telling a reader an answer is wrong\n * before they have finished writing it is noise, and telling them nothing after\n * they have fixed it is worse.\n */\nexport type FormValidate = 'submit' | 'blur' | 'change' | 'none';\n\n/** Where focus goes after a submit that found something wrong. */\nexport type FormErrorFocus = 'summary' | 'control' | 'none';\n\n/** Whether the family renders the summary itself. */\nexport type FormSummaryMode = 'auto' | 'none';\n\n/** How the action row is arranged along the inline axis. */\nexport type FormActionsAlign = 'end' | 'start' | 'between' | 'stretch';\n\nexport interface FormDefaults {\n align: FormActionsAlign;\n errorFocus: FormErrorFocus;\n nativeValidation: boolean;\n summary: FormSummaryMode;\n summaryDescription: string | undefined;\n validate: FormValidate;\n}\n\nconst FALLBACK: FormDefaults = {\n align: 'end',\n errorFocus: 'summary',\n nativeValidation: false,\n summary: 'auto',\n summaryDescription: undefined,\n validate: 'submit',\n};\n\nexport const FORM_DEFAULTS = new InjectionToken<FormDefaults>('slotted form defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its forms behave: when they validate, where\n * focus goes after a failed submit, and how its action row is arranged. A form\n * that states any of them itself still wins. The summary's heading comes from\n * the language in force (`provideSlotted`).\n */\nexport function provideFormDefaults(defaults: Partial<FormDefaults>) {\n return {\n provide: FORM_DEFAULTS,\n useFactory: (): FormDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectFormDefaults(): FormDefaults {\n return inject(FORM_DEFAULTS);\n}\n\n/** One validation failure Angular reported, as the registry receives it. */\nexport interface FormErrorMessageContext {\n /** The `name` the control is submitted under, which is the key in the group. */\n name: string;\n /** The key `AbstractControl.errors` used — `required`, `minlength`, and so on. */\n key: string;\n /** Whatever the validator put beside the key. */\n detail: unknown;\n}\n\n/**\n * How a Reactive Forms validation failure the application's own validator\n * reports becomes a sentence.\n *\n * Angular's validators report a key and a shape — `{ required: true }`,\n * `{ minlength: { requiredLength: 8, actualLength: 3 } }` — and never a\n * message. The built-in keys (`required`, `email`, `min`, `max`, `minlength`,\n * `maxlength`, `pattern`) are written by the `form` catalog's `errors.*`\n * messages in the language in force; a validator the application adds names\n * its own message here, and an entry for a built-in key replaces the catalog's.\n */\nexport type FormErrorMessages = Record<string, (context: FormErrorMessageContext) => string>;\n\nexport const SL_FORM_ERROR_MESSAGES = new InjectionToken<FormErrorMessages>(\n 'slotted form error messages',\n { providedIn: 'root', factory: () => ({}) },\n);\n\n/** Names the sentences the application's own validators are written as. */\nexport function provideFormErrorMessages(messages: FormErrorMessages) {\n return { provide: SL_FORM_ERROR_MESSAGES, useValue: messages };\n}\n\nexport function injectFormErrorMessages(): FormErrorMessages {\n return inject(SL_FORM_ERROR_MESSAGES);\n}\n\n/**\n * What the summary needs from the form around it.\n *\n * It is an abstract class rather than an import so the two classes can depend\n * on each other without a cycle — the shape `field` and `text-field` already\n * have.\n */\nexport abstract class SlFormOwner {\n abstract readonly entries: Signal<readonly FormErrorEntry[]>;\n abstract readonly errors: Signal<FormErrors>;\n abstract readonly summaryId: Signal<string>;\n abstract readonly resolvedSummaryTitle: Signal<string>;\n abstract readonly resolvedSummaryDescription: Signal<string | undefined>;\n abstract readonly resolvedAlign: Signal<FormActionsAlign>;\n /** Called by whichever summary is on the page, so focus can reach the region. */\n abstract registerSummary(element: HTMLElement | null): void;\n}\n","import { computed, Directive, inject, input } from '@angular/core';\n\nimport { SlFormOwner } from './form-defaults';\nimport type { FormActionsAlign } from './form-defaults';\n\n/**\n * The row a form's actions stand in.\n *\n * `inline` can end-align a row of buttons. What it cannot do without a query\n * the consumer writes for every form is the reflow: below the form's own\n * container width every action takes the whole width, in a column, with the\n * primary one first — a reader's thumb is at the bottom of a phone and their\n * eye at the end of a row.\n */\n@Directive({\n selector: '[slFormActions]',\n standalone: true,\n exportAs: 'slFormActions',\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'actions',\n 'data-part-actions': '',\n '[attr.data-align]': 'resolvedAlign()',\n },\n})\nexport class SlFormActions {\n /** Defaults to the form's own `align`, then to the token, then to `end`. */\n readonly align = input<FormActionsAlign | undefined>(undefined);\n\n private readonly form = inject(SlFormOwner, { optional: true });\n\n protected readonly resolvedAlign = computed(\n () => this.align() ?? this.form?.resolvedAlign() ?? 'end',\n );\n}\n\n/**\n * What the form says about the whole record — a live preview, a summary in\n * words, a help panel — beside the column of fields on a wide form, and after\n * the last field on a narrow one.\n */\n@Directive({\n selector: '[slFormAside]',\n standalone: true,\n exportAs: 'slFormAside',\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'aside',\n 'data-part-aside': '',\n },\n})\nexport class SlFormAside {}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { AfterViewInit, OnInit } from '@angular/core';\nimport { ControlContainer } from '@angular/forms';\nimport type { AbstractControl, FormArray, FormGroup } from '@angular/forms';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport {\n collectValidity,\n hasErrors,\n isDirty,\n mergeErrors,\n namedControls,\n normaliseErrors,\n orderErrors,\n withoutError,\n} from '@slotted/core/form';\nimport type { FormErrorInput, FormErrors } from '@slotted/core/form';\nimport { formMessages, type FormMessages, type PartialMessages } from '@slotted/core/i18n';\nimport { createControllable } from '@slotted/core/state';\nimport type { ChangeReason, ChangeRequest } from '@slotted/core/state';\n\nimport { injectFormDefaults, injectFormErrorMessages, SlFormOwner } from './form-defaults';\nimport type {\n FormActionsAlign,\n FormErrorFocus,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nexport type {\n FormActionsAlign,\n FormDefaults,\n FormErrorFocus,\n FormErrorMessageContext,\n FormErrorMessages,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nlet summaryCounter = 0;\n\n/**\n * The summary of everything wrong with the form: a focusable region with a\n * heading, and a link per error pointing at the control it is about.\n *\n * It is the GOV.UK error summary, item for item — \"move keyboard focus to the\n * error summary\", \"include the heading\", \"link to each of the answers that have\n * validation errors\", \"make sure the error messages in the error summary are\n * worded the same as those which appear next to the inputs\". The last one is\n * free here: one map feeds the summary and the field.\n *\n * The form renders this itself under `summary=\"auto\"`. A consumer who wants it\n * somewhere else writes `summary=\"none\"` and puts `slFormSummary` on their own\n * element.\n */\n@Component({\n selector: '[slFormSummary]',\n standalone: true,\n exportAs: 'slFormSummary',\n template: `<h2 data-part=\"summary-title\" data-part-summary-title=\"\" [attr.id]=\"form.summaryId()\">\n {{ form.resolvedSummaryTitle() }}\n </h2>\n @if (form.resolvedSummaryDescription(); as description) {\n <p>{{ description }}</p>\n }\n <ul data-part=\"summary-list\" data-part-summary-list=\"\">\n @for (entry of form.entries(); track entry.name) {\n @for (message of entry.messages; track message) {\n <li>\n @if (entry.id) {\n <a\n data-part=\"summary-item\"\n data-part-summary-item=\"\"\n [attr.href]=\"'#' + entry.id\"\n (click)=\"focus($event, entry.id)\"\n >\n {{ message }}\n </a>\n } @else {\n <span data-part=\"summary-item\" data-part-summary-item=\"\">{{ message }}</span>\n }\n </li>\n }\n }\n </ul>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'summary',\n 'data-part-summary': '',\n role: 'alert',\n tabindex: '-1',\n '[attr.aria-labelledby]': 'form.summaryId()',\n },\n})\nexport class SlFormSummary implements AfterViewInit {\n protected readonly form = inject(SlFormOwner);\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n ngAfterViewInit() {\n this.form.registerSummary(this.element);\n }\n\n /**\n * The fragment is not followed. A link that navigated would write the\n * control's identifier into the address bar and add an entry to the history\n * of a page that never left; focusing the control is the whole of what the\n * link is for, and the browser scrolls it into view with the focus.\n */\n protected focus(event: Event, id: string) {\n const target = this.element.ownerDocument.getElementById(id);\n if (target === null) return;\n event.preventDefault();\n target.focus();\n }\n}\n\n/**\n * A form, its errors and its row of actions.\n *\n * **It owns the errors and nothing else.** `docs/component-features.md` § 6 puts\n * the boundary there: the family coordinates submission, validation, global\n * messages and focus \"sem possuir o estado de cada framework\". Values come from\n * `FormData`, validity from `checkValidity()` and from Reactive Forms, and the\n * values themselves stay with whichever of the two owns them.\n *\n * **`novalidate` is written, and constraint validation still runs.** The\n * attribute stops the browser drawing its own bubble beside a control whose\n * error the `field` is already showing; `checkValidity()` is called explicitly\n * and each control's `validationMessage` is the platform's localized string.\n *\n * **Reactive Forms is the second source.** When there is a `ControlContainer`,\n * every control is marked touched at submit and each failing one becomes a\n * sentence: a built-in validator's through the catalog's `errors.*` messages,\n * an application's own through `SL_FORM_ERROR_MESSAGES`.\n *\n * **Signal Forms needs nothing here.** Angular 22's `[field]` binds a control\n * through its `ControlValueAccessor`, which every Slotted control provides, so\n * they work under it today and this family adds no second integration.\n */\n@Component({\n selector: 'form[slForm]',\n standalone: true,\n exportAs: 'slForm',\n imports: [SlFormSummary],\n template: `@if (showsOwnSummary()) {\n <div slFormSummary></div>\n }\n <ng-content />`,\n styleUrl: '../../../styles/src/form/form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }],\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.novalidate]': \"resolvedNativeValidation() ? null : ''\",\n '[attr.aria-busy]': \"submitting() ? 'true' : null\",\n '[attr.data-invalid]': \"hasAnyError() ? '' : null\",\n '[attr.data-loading]': \"submitting() ? '' : null\",\n '[attr.data-disabled]': \"disabled() ? '' : null\",\n '(submit)': 'onSubmit($event)',\n '(reset)': 'onReset()',\n '(input)': 'onInput($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class SlForm implements SlFormOwner, OnInit {\n /**\n * Present means the consumer owns the error map, for the life of the\n * component. Keyed by the `name` attribute of the control each error is about.\n */\n readonly errorsInput = input<FormErrorInput | undefined>(undefined, { alias: 'errors' });\n /** The errors an uncontrolled form starts from, read once. */\n readonly defaultErrors = input<FormErrorInput | undefined>(undefined);\n\n readonly validate = input<FormValidate | undefined>(undefined);\n readonly errorFocus = input<FormErrorFocus | undefined>(undefined);\n readonly summary = input<FormSummaryMode | undefined>(undefined);\n readonly summaryDescription = input<string | undefined>(undefined);\n readonly align = input<FormActionsAlign | undefined>(undefined);\n /**\n * Words laid over the catalog of the language in force, key by key: the\n * summary's heading (`summaryTitle`) and the built-in validators' sentences\n * (`errors.*`).\n */\n readonly messages = input<PartialMessages<FormMessages> | undefined>(undefined);\n /** Lets the browser draw its own validation bubble. Off by default. */\n readonly nativeValidation = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (raw) => (raw === undefined ? undefined : booleanAttribute(raw)),\n });\n /** Marks the form and every control in it as unavailable. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Marks the form busy for work the family did not start — a mutation a\n * consumer's own client is running. It is merged with the family's own\n * submission, so either one puts the root in its busy state.\n */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Registers a `beforeunload` guard while anything in the form has been\n * edited. Off by default: a guard nobody asked for is a trap.\n */\n readonly guardUnsaved = input(false, { transform: booleanAttribute });\n\n /** One output for one transition, carrying the reason and `cancel()`. */\n readonly errorsChange = output<ChangeRequest<FormErrors>>();\n /**\n * Emitted when the form submits and nothing is wrong with it. The values are\n * read from `FormData`, and `errors` is how a handler publishes what a server\n * answered.\n */\n readonly formSubmit = output<{\n values: Record<string, FormDataEntryValue | FormDataEntryValue[]>;\n event: SubmitEvent;\n /** Publishes a server's answer, and moves focus the way a failed submit does. */\n errors: (errors: FormErrorInput) => void;\n /** Holds the form in its busy state until the promise settles. */\n pending: (work: Promise<FormErrorInput | void>) => void;\n }>();\n\n private readonly element = inject<ElementRef<HTMLFormElement>>(ElementRef).nativeElement;\n private readonly defaults = injectFormDefaults();\n private readonly errorMessages = injectFormErrorMessages();\n /** The family's words in the language in force, with this form's `messages` laid over them. */\n readonly t = injectMessages(formMessages, this.messages);\n /** The Reactive Forms group around this element, when a consumer wrote one. */\n private readonly container = inject(ControlContainer, { optional: true, self: true });\n private readonly writtenNoValidate = inject(new HostAttributeToken('novalidate'), {\n optional: true,\n });\n\n private readonly own = signal<FormErrors>({});\n private readonly controls = signal<{ name: string; id: string | undefined }[]>([]);\n private summaryElement: HTMLElement | null = null;\n /** Set when a publish should be followed by the focus a failed submit moves. */\n private pendingFocus = false;\n private readonly ownSubmitting = signal(false);\n /** Either the family's own submission or a consumer's own work. */\n protected readonly submitting = computed(() => this.ownSubmitting() || this.loading());\n private readonly submitted = signal(false);\n\n private readonly external = computed(() => normaliseErrors(this.errorsInput()));\n private readonly controlled = computed(() => this.errorsInput() !== undefined);\n\n readonly errors = computed(() => (this.controlled() ? this.external() : this.own()));\n readonly entries = computed(() => orderErrors(this.errors(), this.controls()));\n protected readonly hasAnyError = computed(() => hasErrors(this.errors()));\n\n readonly summaryId = signal(`slotted-form-summary-${(summaryCounter += 1)}`);\n readonly resolvedSummaryTitle = computed(() => this.t('summaryTitle'));\n readonly resolvedSummaryDescription = computed(\n () => this.summaryDescription() ?? this.defaults.summaryDescription,\n );\n readonly resolvedAlign = computed(() => this.align() ?? this.defaults.align);\n protected readonly resolvedValidate = computed(() => this.validate() ?? this.defaults.validate);\n protected readonly resolvedErrorFocus = computed(\n () => this.errorFocus() ?? this.defaults.errorFocus,\n );\n protected readonly resolvedSummary = computed(() => this.summary() ?? this.defaults.summary);\n protected readonly resolvedNativeValidation = computed(\n () =>\n this.nativeValidation() ??\n (this.writtenNoValidate === null ? this.defaults.nativeValidation : false),\n );\n protected readonly showsOwnSummary = computed(\n () => this.resolvedSummary() === 'auto' && this.entries().length > 0,\n );\n\n constructor() {\n this.attachUnloadGuard();\n }\n\n ngOnInit() {\n this.own.set(normaliseErrors(this.defaultErrors()));\n this.readControls();\n }\n\n /**\n * The summary says when it exists, and takes the focus a failed submit asked\n * for. The move waits for the region rather than racing it: the errors and\n * the element that shows them are published in the same change, and a\n * `focus()` called before the region rendered would land on nothing.\n */\n registerSummary(element: HTMLElement | null) {\n this.summaryElement = element;\n if (element === null || !this.pendingFocus) return;\n this.pendingFocus = false;\n element.focus();\n }\n\n /** Runs validation now and publishes what it found. */\n validateNow(): FormErrors {\n const found = this.collect();\n this.publish(found, 'programmatic', undefined);\n return found;\n }\n\n /** Submits as though the submit button had been pressed. */\n submit() {\n this.element.requestSubmit();\n }\n\n /** Resets the controls and clears the errors. */\n reset() {\n this.element.reset();\n }\n\n /** Moves focus where a failed submit would have moved it. */\n focusFirstError() {\n const focus = this.resolvedErrorFocus();\n if (focus === 'none') return;\n if (focus === 'summary' && this.summaryElement !== null) {\n this.summaryElement.focus();\n return;\n }\n const first = this.entries()[0];\n if (first === undefined) return;\n const control = this.element.elements.namedItem(first.name);\n const element = control instanceof RadioNodeList ? control[0] : control;\n if (element instanceof HTMLElement) element.focus();\n }\n\n protected onSubmit(event: SubmitEvent) {\n this.submitted.set(true);\n this.readControls();\n\n if (this.submitting()) {\n /* A second submit while one is pending is refused. */\n event.preventDefault();\n return;\n }\n\n const found = this.resolvedValidate() === 'none' ? this.external() : this.collect();\n\n if (hasErrors(found)) {\n event.preventDefault();\n this.publish(found, 'submit', event);\n return;\n }\n\n this.publish({}, 'submit', event);\n event.preventDefault();\n\n const data = new FormData(this.element);\n const values: Record<string, FormDataEntryValue | FormDataEntryValue[]> = {};\n for (const key of new Set(data.keys())) {\n const all = data.getAll(key);\n values[key] = all.length > 1 ? all : (all[0] as FormDataEntryValue);\n }\n\n this.formSubmit.emit({\n values,\n event,\n errors: (errors) => this.publish(normaliseErrors(errors), 'submit', event),\n pending: (work) => {\n this.ownSubmitting.set(true);\n void work\n .then((settled) => {\n if (settled !== undefined && settled !== null) {\n this.publish(normaliseErrors(settled), 'submit', event);\n }\n })\n .finally(() => this.ownSubmitting.set(false));\n },\n });\n }\n\n protected onReset() {\n this.submitted.set(false);\n this.publish({}, 'clear', undefined);\n }\n\n /**\n * A server error is dropped when the control it names is edited. After a\n * failed submit under `validate=\"change\"`, the whole form is checked again\n * instead, because a reader who has seen the list is fixing it.\n */\n protected onInput(event: Event) {\n const name = nameOf(event.target);\n if (name === null) return;\n\n if (this.resolvedValidate() === 'change' && this.submitted()) {\n this.publish(this.collect(), 'keyboard', event, false);\n return;\n }\n const next = withoutError(this.errors(), name);\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * On blur only the control that lost focus is checked. Running the whole form\n * would tell a reader that six fields they have not reached yet are wrong,\n * which is the noise `validate=\"submit\"` exists to avoid.\n */\n protected onFocusOut(event: Event) {\n if (this.resolvedValidate() !== 'blur') return;\n const name = nameOf(event.target);\n if (name === null) return;\n\n const found = this.collect();\n const messages = found[name];\n const next =\n messages === undefined\n ? withoutError(this.errors(), name)\n : mergeErrors(this.errors(), { [name]: messages });\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * Three sources, latest last: whatever a server sent, the platform's own\n * constraint validation, and Reactive Forms.\n */\n private collect(): FormErrors {\n return mergeErrors(this.external(), collectValidity(this.element), this.angularErrors());\n }\n\n /**\n * Every failing control in the group around this form, as a sentence. Angular\n * reports a key and a shape and never a message, because a message is the\n * application's and so is its language; the registry is where it is written.\n */\n private angularErrors(): FormErrors {\n const group = this.container?.control as FormGroup | FormArray | null | undefined;\n if (group === null || group === undefined) return {};\n group.markAllAsTouched();\n\n const found: Record<string, string[]> = {};\n for (const [name, control] of Object.entries(\n group.controls as Record<string, AbstractControl>,\n )) {\n const errors = control.errors;\n if (errors === null || control.disabled) continue;\n const messages = Object.entries(errors)\n .map(\n ([key, detail]) =>\n this.errorMessages[key]?.({ name, key, detail }) ?? this.builtInMessage(key, detail),\n )\n .filter((message): message is string => typeof message === 'string');\n if (messages.length > 0) found[name] = messages;\n }\n return found;\n }\n\n /**\n * The sentence for one of Angular's own validators, from the catalog; for a\n * key the catalog does not know, nothing — the application's validator names\n * its own message through `SL_FORM_ERROR_MESSAGES`.\n */\n private builtInMessage(key: string, detail: unknown): string | undefined {\n const shape = (detail ?? {}) as { min?: unknown; max?: unknown; requiredLength?: unknown };\n switch (key) {\n case 'required':\n return this.t('errors.required');\n case 'email':\n return this.t('errors.email');\n case 'min':\n return this.t('errors.min', { min: Number(shape.min) });\n case 'max':\n return this.t('errors.max', { max: Number(shape.max) });\n case 'minlength':\n return this.t('errors.minlength', { length: Number(shape.requiredLength) });\n case 'maxlength':\n return this.t('errors.maxlength', { length: Number(shape.requiredLength) });\n case 'pattern':\n return this.t('errors.pattern');\n default:\n return undefined;\n }\n }\n\n private readControls() {\n this.controls.set(namedControls(this.element));\n }\n\n private publish(\n next: FormErrors,\n reason: ChangeReason,\n source: Event | undefined,\n moveFocus = true,\n ) {\n this.readControls();\n\n let cancelled = false;\n const state = createControllable<FormErrors>({\n controlled: undefined,\n initial: this.errors(),\n equals: sameErrors,\n onRequest: (pending) => {\n this.errorsChange.emit(pending);\n cancelled = pending.cancelled;\n },\n });\n state.request(next, reason, source);\n if (cancelled) return;\n\n if (!this.controlled()) this.own.set(next);\n\n if (!moveFocus || !hasErrors(next) || this.resolvedErrorFocus() === 'none') return;\n /* A summary that has not been rendered yet takes the focus when it is, and\n one that is already on the page takes it now. */\n if (this.resolvedErrorFocus() === 'summary' && this.summaryElement === null) {\n this.pendingFocus = true;\n return;\n }\n this.focusFirstError();\n }\n\n /**\n * The guard nobody else ships. It is off by default, because a page that\n * refuses to close after a reader typed one character is a trap.\n */\n private attachUnloadGuard() {\n const onBeforeUnload = (event: BeforeUnloadEvent) => {\n if (!this.guardUnsaved() || this.submitting()) return;\n if (!isDirty(this.element)) return;\n event.preventDefault();\n };\n\n window.addEventListener('beforeunload', onBeforeUnload);\n inject(DestroyRef).onDestroy(() => window.removeEventListener('beforeunload', onBeforeUnload));\n }\n}\n\nfunction nameOf(target: EventTarget | null): string | null {\n if (!(target instanceof HTMLElement)) return null;\n const name = (target as { name?: string }).name;\n return typeof name === 'string' && name !== '' ? name : null;\n}\n\nfunction sameErrors(a: FormErrors, b: FormErrors) {\n const names = Object.keys(a);\n if (names.length !== Object.keys(b).length) return false;\n return names.every(\n (name) =>\n b[name] !== undefined &&\n a[name]!.length === b[name]!.length &&\n a[name]!.every((message, index) => message === b[name]![index]),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AA8BA,MAAM,QAAQ,GAAiB;AAC7B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,kBAAkB,EAAE,SAAS;AAC7B,IAAA,QAAQ,EAAE,QAAQ;CACnB;MAEY,aAAa,GAAG,IAAI,cAAc,CAAe,uBAAuB,EAAE;AACrF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;;;;;AAKG;AACG,SAAU,mBAAmB,CAAC,QAA+B,EAAA;IACjE,OAAO;AACL,QAAA,OAAO,EAAE,aAAa;AACtB,QAAA,UAAU,EAAE,OAAqB,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KAC/D;AACH;SAEgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B;AAyBO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CACtD,6BAA6B,EAC7B,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAG7C;AACM,SAAU,wBAAwB,CAAC,QAA2B,EAAA;IAClE,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,QAAQ,EAAE;AAChE;SAEgB,uBAAuB,GAAA;AACrC,IAAA,OAAO,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AA0B,EAAA;AACxC,IAAA,IAAI,EAAE,MAAM,YAAY,WAAW,CAAC;AAAE,QAAA,OAAO,IAAI;AACjD,IAAA,MAAM,IAAI,GAAI,MAA4B,CAAC,IAAI;AAC/C,IAAA,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,GAAG,IAAI,GAAG,IAAI;AAC9D;AAEA,SAAS,UAAU,CAAC,CAAa,EAAE,CAAa,EAAA;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5B,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AACxD,IAAA,OAAO,KAAK,CAAC,KAAK,CAChB,CAAC,IAAI,KACH,CAAC,CAAC,IAAI,CAAC,KAAK,SAAS;QACrB,CAAC,CAAC,IAAI,CAAE,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,CAAE,CAAC,MAAM;QACnC,CAAC,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,KAAK,OAAO,KAAK,CAAC,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,CAAC,CAClE;AACH;;AC7iBA;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-form.mjs","sources":["../../form/src/form-defaults.ts","../../form/src/form-actions.ts","../../form/src/form.ts","../../form/src/slotted-angular-form.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { Signal } from '@angular/core';\nimport type { FormErrorEntry, FormErrors } from '@slotted/core/form';\n\n/**\n * When the form checks its own controls. `submit` is the default and\n * re-validates on every change afterwards: telling a reader an answer is wrong\n * before they have finished writing it is noise, and telling them nothing after\n * they have fixed it is worse.\n */\nexport type FormValidate = 'submit' | 'blur' | 'change' | 'none';\n\n/** Where focus goes after a submit that found something wrong. */\nexport type FormErrorFocus = 'summary' | 'control' | 'none';\n\n/** Whether the family renders the summary itself. */\nexport type FormSummaryMode = 'auto' | 'none';\n\n/** How the action row is arranged along the inline axis. */\nexport type FormActionsAlign = 'end' | 'start' | 'between' | 'stretch';\n\nexport interface FormDefaults {\n align: FormActionsAlign;\n errorFocus: FormErrorFocus;\n nativeValidation: boolean;\n summary: FormSummaryMode;\n summaryDescription: string | undefined;\n validate: FormValidate;\n}\n\nconst FALLBACK: FormDefaults = {\n align: 'end',\n errorFocus: 'summary',\n nativeValidation: false,\n summary: 'auto',\n summaryDescription: undefined,\n validate: 'submit',\n};\n\nexport const FORM_DEFAULTS = new InjectionToken<FormDefaults>('slotted form defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its forms behave: when they validate, where\n * focus goes after a failed submit, and how its action row is arranged. A form\n * that states any of them itself still wins. The summary's heading comes from\n * the language in force (`provideSlotted`).\n */\nexport function provideFormDefaults(defaults: Partial<FormDefaults>) {\n return {\n provide: FORM_DEFAULTS,\n useFactory: (): FormDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectFormDefaults(): FormDefaults {\n return inject(FORM_DEFAULTS);\n}\n\n/** One validation failure Angular reported, as the registry receives it. */\nexport interface FormErrorMessageContext {\n /** The `name` the control is submitted under, which is the key in the group. */\n name: string;\n /** The key `AbstractControl.errors` used — `required`, `minlength`, and so on. */\n key: string;\n /** Whatever the validator put beside the key. */\n detail: unknown;\n}\n\n/**\n * How a Reactive Forms validation failure the application's own validator\n * reports becomes a sentence.\n *\n * Angular's validators report a key and a shape — `{ required: true }`,\n * `{ minlength: { requiredLength: 8, actualLength: 3 } }` — and never a\n * message. The built-in keys (`required`, `email`, `min`, `max`, `minlength`,\n * `maxlength`, `pattern`) are written by the `form` catalog's `errors.*`\n * messages in the language in force; a validator the application adds names\n * its own message here, and an entry for a built-in key replaces the catalog's.\n */\nexport type FormErrorMessages = Record<string, (context: FormErrorMessageContext) => string>;\n\nexport const SL_FORM_ERROR_MESSAGES = new InjectionToken<FormErrorMessages>(\n 'slotted form error messages',\n { providedIn: 'root', factory: () => ({}) },\n);\n\n/** Names the sentences the application's own validators are written as. */\nexport function provideFormErrorMessages(messages: FormErrorMessages) {\n return { provide: SL_FORM_ERROR_MESSAGES, useValue: messages };\n}\n\nexport function injectFormErrorMessages(): FormErrorMessages {\n return inject(SL_FORM_ERROR_MESSAGES);\n}\n\n/**\n * What the summary needs from the form around it.\n *\n * It is an abstract class rather than an import so the two classes can depend\n * on each other without a cycle — the shape `field` and `text-field` already\n * have.\n */\nexport abstract class SlFormOwner {\n abstract readonly entries: Signal<readonly FormErrorEntry[]>;\n abstract readonly errors: Signal<FormErrors>;\n abstract readonly summaryId: Signal<string>;\n abstract readonly resolvedSummaryTitle: Signal<string>;\n abstract readonly resolvedSummaryDescription: Signal<string | undefined>;\n abstract readonly resolvedAlign: Signal<FormActionsAlign>;\n /** Called by whichever summary is on the page, so focus can reach the region. */\n abstract registerSummary(element: HTMLElement | null): void;\n}\n","import { computed, Directive, inject, input } from '@angular/core';\n\nimport { SlFormOwner } from './form-defaults';\nimport type { FormActionsAlign } from './form-defaults';\n\n/**\n * The row a form's actions stand in.\n *\n * `inline` can end-align a row of buttons. What it cannot do without a query\n * the consumer writes for every form is the reflow: below the form's own\n * container width every action takes the whole width, in a column, with the\n * primary one first — a reader's thumb is at the bottom of a phone and their\n * eye at the end of a row.\n */\n@Directive({\n selector: '[slFormActions]',\n standalone: true,\n exportAs: 'slFormActions',\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'actions',\n 'data-part-actions': '',\n '[attr.data-align]': 'resolvedAlign()',\n },\n})\nexport class SlFormActions {\n /** Defaults to the form's own `align`, then to the token, then to `end`. */\n readonly align = input<FormActionsAlign | undefined>(undefined);\n\n private readonly form = inject(SlFormOwner, { optional: true });\n\n protected readonly resolvedAlign = computed(\n () => this.align() ?? this.form?.resolvedAlign() ?? 'end',\n );\n}\n\n/**\n * What the form says about the whole record — a live preview, a summary in\n * words, a help panel — beside the column of fields on a wide form, and after\n * the last field on a narrow one.\n */\n@Directive({\n selector: '[slFormAside]',\n standalone: true,\n exportAs: 'slFormAside',\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'aside',\n 'data-part-aside': '',\n },\n})\nexport class SlFormAside {}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { AfterViewInit, OnInit } from '@angular/core';\nimport { ControlContainer } from '@angular/forms';\nimport type { AbstractControl, FormArray, FormGroup } from '@angular/forms';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport {\n collectValidity,\n hasErrors,\n isDirty,\n mergeErrors,\n namedControls,\n normalizeErrors,\n orderErrors,\n withoutError,\n} from '@slotted/core/form';\nimport type { FormErrorInput, FormErrors } from '@slotted/core/form';\nimport { formMessages, type FormMessages, type PartialMessages } from '@slotted/core/i18n';\nimport { createControllable } from '@slotted/core/state';\nimport type { ChangeReason, ChangeRequest } from '@slotted/core/state';\n\nimport { injectFormDefaults, injectFormErrorMessages, SlFormOwner } from './form-defaults';\nimport type {\n FormActionsAlign,\n FormErrorFocus,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nexport type {\n FormActionsAlign,\n FormDefaults,\n FormErrorFocus,\n FormErrorMessageContext,\n FormErrorMessages,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nlet summaryCounter = 0;\n\n/**\n * The summary of everything wrong with the form: a focusable region with a\n * heading, and a link per error pointing at the control it is about.\n *\n * It is the GOV.UK error summary, item for item — \"move keyboard focus to the\n * error summary\", \"include the heading\", \"link to each of the answers that have\n * validation errors\", \"make sure the error messages in the error summary are\n * worded the same as those which appear next to the inputs\". The last one is\n * free here: one map feeds the summary and the field.\n *\n * The form renders this itself under `summary=\"auto\"`. A consumer who wants it\n * somewhere else writes `summary=\"none\"` and puts `slFormSummary` on their own\n * element.\n */\n@Component({\n selector: '[slFormSummary]',\n standalone: true,\n exportAs: 'slFormSummary',\n template: `<h2 data-part=\"summary-title\" data-part-summary-title=\"\" [attr.id]=\"form.summaryId()\">\n {{ form.resolvedSummaryTitle() }}\n </h2>\n @if (form.resolvedSummaryDescription(); as description) {\n <p>{{ description }}</p>\n }\n <ul data-part=\"summary-list\" data-part-summary-list=\"\">\n @for (entry of form.entries(); track entry.name) {\n @for (message of entry.messages; track message) {\n <li>\n @if (entry.id) {\n <a\n data-part=\"summary-item\"\n data-part-summary-item=\"\"\n [attr.href]=\"'#' + entry.id\"\n (click)=\"focus($event, entry.id)\"\n >\n {{ message }}\n </a>\n } @else {\n <span data-part=\"summary-item\" data-part-summary-item=\"\">{{ message }}</span>\n }\n </li>\n }\n }\n </ul>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'summary',\n 'data-part-summary': '',\n role: 'alert',\n tabindex: '-1',\n '[attr.aria-labelledby]': 'form.summaryId()',\n },\n})\nexport class SlFormSummary implements AfterViewInit {\n protected readonly form = inject(SlFormOwner);\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n ngAfterViewInit() {\n this.form.registerSummary(this.element);\n }\n\n /**\n * The fragment is not followed. A link that navigated would write the\n * control's identifier into the address bar and add an entry to the history\n * of a page that never left; focusing the control is the whole of what the\n * link is for, and the browser scrolls it into view with the focus.\n */\n protected focus(event: Event, id: string) {\n const target = this.element.ownerDocument.getElementById(id);\n if (target === null) return;\n event.preventDefault();\n target.focus();\n }\n}\n\n/**\n * A form, its errors and its row of actions.\n *\n * **It owns the errors and nothing else.** `docs/component-features.md` § 6 puts\n * the boundary there: the family coordinates submission, validation, global\n * messages and focus \"without owning each framework's state\". Values come from\n * `FormData`, validity from `checkValidity()` and from Reactive Forms, and the\n * values themselves stay with whichever of the two owns them.\n *\n * **`novalidate` is written, and constraint validation still runs.** The\n * attribute stops the browser drawing its own bubble beside a control whose\n * error the `field` is already showing; `checkValidity()` is called explicitly\n * and each control's `validationMessage` is the platform's localized string.\n *\n * **Reactive Forms is the second source.** When there is a `ControlContainer`,\n * every control is marked touched at submit and each failing one becomes a\n * sentence: a built-in validator's through the catalog's `errors.*` messages,\n * an application's own through `SL_FORM_ERROR_MESSAGES`.\n *\n * **Signal Forms needs nothing here.** Angular 22's `[field]` binds a control\n * through its `ControlValueAccessor`, which every Slotted control provides, so\n * they work under it today and this family adds no second integration.\n */\n@Component({\n selector: 'form[slForm]',\n standalone: true,\n exportAs: 'slForm',\n imports: [SlFormSummary],\n template: `@if (showsOwnSummary()) {\n <div slFormSummary></div>\n }\n <ng-content />`,\n styleUrl: '../../../styles/src/form/form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }],\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.novalidate]': \"resolvedNativeValidation() ? null : ''\",\n '[attr.aria-busy]': \"submitting() ? 'true' : null\",\n '[attr.data-invalid]': \"hasAnyError() ? '' : null\",\n '[attr.data-loading]': \"submitting() ? '' : null\",\n '[attr.data-disabled]': \"disabled() ? '' : null\",\n '(submit)': 'onSubmit($event)',\n '(reset)': 'onReset()',\n '(input)': 'onInput($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class SlForm implements SlFormOwner, OnInit {\n /**\n * Present means the consumer owns the error map, for the life of the\n * component. Keyed by the `name` attribute of the control each error is about.\n */\n readonly errorsInput = input<FormErrorInput | undefined>(undefined, { alias: 'errors' });\n /** The errors an uncontrolled form starts from, read once. */\n readonly defaultErrors = input<FormErrorInput | undefined>(undefined);\n\n readonly validate = input<FormValidate | undefined>(undefined);\n readonly errorFocus = input<FormErrorFocus | undefined>(undefined);\n readonly summary = input<FormSummaryMode | undefined>(undefined);\n readonly summaryDescription = input<string | undefined>(undefined);\n readonly align = input<FormActionsAlign | undefined>(undefined);\n /**\n * Words laid over the catalog of the language in force, key by key: the\n * summary's heading (`summaryTitle`) and the built-in validators' sentences\n * (`errors.*`).\n */\n readonly messages = input<PartialMessages<FormMessages> | undefined>(undefined);\n /** Lets the browser draw its own validation bubble. Off by default. */\n readonly nativeValidation = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (raw) => (raw === undefined ? undefined : booleanAttribute(raw)),\n });\n /** Marks the form and every control in it as unavailable. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Marks the form busy for work the family did not start — a mutation a\n * consumer's own client is running. It is merged with the family's own\n * submission, so either one puts the root in its busy state.\n */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Registers a `beforeunload` guard while anything in the form has been\n * edited. Off by default: a guard nobody asked for is a trap.\n */\n readonly guardUnsaved = input(false, { transform: booleanAttribute });\n\n /** One output for one transition, carrying the reason and `cancel()`. */\n readonly errorsChange = output<ChangeRequest<FormErrors>>();\n /**\n * Emitted when the form submits and nothing is wrong with it. The values are\n * read from `FormData`, and `errors` is how a handler publishes what a server\n * answered.\n */\n readonly formSubmit = output<{\n values: Record<string, FormDataEntryValue | FormDataEntryValue[]>;\n event: SubmitEvent;\n /** Publishes a server's answer, and moves focus the way a failed submit does. */\n errors: (errors: FormErrorInput) => void;\n /** Holds the form in its busy state until the promise settles. */\n pending: (work: Promise<FormErrorInput | void>) => void;\n }>();\n\n private readonly element = inject<ElementRef<HTMLFormElement>>(ElementRef).nativeElement;\n private readonly defaults = injectFormDefaults();\n private readonly errorMessages = injectFormErrorMessages();\n /** The family's words in the language in force, with this form's `messages` laid over them. */\n readonly t = injectMessages(formMessages, this.messages);\n /** The Reactive Forms group around this element, when a consumer wrote one. */\n private readonly container = inject(ControlContainer, { optional: true, self: true });\n private readonly writtenNoValidate = inject(new HostAttributeToken('novalidate'), {\n optional: true,\n });\n\n private readonly own = signal<FormErrors>({});\n private readonly controls = signal<{ name: string; id: string | undefined }[]>([]);\n private summaryElement: HTMLElement | null = null;\n /** Set when a publish should be followed by the focus a failed submit moves. */\n private pendingFocus = false;\n private readonly ownSubmitting = signal(false);\n /** Either the family's own submission or a consumer's own work. */\n protected readonly submitting = computed(() => this.ownSubmitting() || this.loading());\n private readonly submitted = signal(false);\n\n private readonly external = computed(() => normalizeErrors(this.errorsInput()));\n private readonly controlled = computed(() => this.errorsInput() !== undefined);\n\n readonly errors = computed(() => (this.controlled() ? this.external() : this.own()));\n readonly entries = computed(() => orderErrors(this.errors(), this.controls()));\n protected readonly hasAnyError = computed(() => hasErrors(this.errors()));\n\n readonly summaryId = signal(`slotted-form-summary-${(summaryCounter += 1)}`);\n readonly resolvedSummaryTitle = computed(() => this.t('summaryTitle'));\n readonly resolvedSummaryDescription = computed(\n () => this.summaryDescription() ?? this.defaults.summaryDescription,\n );\n readonly resolvedAlign = computed(() => this.align() ?? this.defaults.align);\n protected readonly resolvedValidate = computed(() => this.validate() ?? this.defaults.validate);\n protected readonly resolvedErrorFocus = computed(\n () => this.errorFocus() ?? this.defaults.errorFocus,\n );\n protected readonly resolvedSummary = computed(() => this.summary() ?? this.defaults.summary);\n protected readonly resolvedNativeValidation = computed(\n () =>\n this.nativeValidation() ??\n (this.writtenNoValidate === null ? this.defaults.nativeValidation : false),\n );\n protected readonly showsOwnSummary = computed(\n () => this.resolvedSummary() === 'auto' && this.entries().length > 0,\n );\n\n constructor() {\n this.attachUnloadGuard();\n }\n\n ngOnInit() {\n this.own.set(normalizeErrors(this.defaultErrors()));\n this.readControls();\n }\n\n /**\n * The summary says when it exists, and takes the focus a failed submit asked\n * for. The move waits for the region rather than racing it: the errors and\n * the element that shows them are published in the same change, and a\n * `focus()` called before the region rendered would land on nothing.\n */\n registerSummary(element: HTMLElement | null) {\n this.summaryElement = element;\n if (element === null || !this.pendingFocus) return;\n this.pendingFocus = false;\n element.focus();\n }\n\n /** Runs validation now and publishes what it found. */\n validateNow(): FormErrors {\n const found = this.collect();\n this.publish(found, 'programmatic', undefined);\n return found;\n }\n\n /** Submits as though the submit button had been pressed. */\n submit() {\n this.element.requestSubmit();\n }\n\n /** Resets the controls and clears the errors. */\n reset() {\n this.element.reset();\n }\n\n /** Moves focus where a failed submit would have moved it. */\n focusFirstError() {\n const focus = this.resolvedErrorFocus();\n if (focus === 'none') return;\n if (focus === 'summary' && this.summaryElement !== null) {\n this.summaryElement.focus();\n return;\n }\n const first = this.entries()[0];\n if (first === undefined) return;\n const control = this.element.elements.namedItem(first.name);\n const element = control instanceof RadioNodeList ? control[0] : control;\n if (element instanceof HTMLElement) element.focus();\n }\n\n protected onSubmit(event: SubmitEvent) {\n this.submitted.set(true);\n this.readControls();\n\n if (this.submitting()) {\n /* A second submit while one is pending is refused. */\n event.preventDefault();\n return;\n }\n\n const found = this.resolvedValidate() === 'none' ? this.external() : this.collect();\n\n if (hasErrors(found)) {\n event.preventDefault();\n this.publish(found, 'submit', event);\n return;\n }\n\n this.publish({}, 'submit', event);\n event.preventDefault();\n\n const data = new FormData(this.element);\n const values: Record<string, FormDataEntryValue | FormDataEntryValue[]> = {};\n for (const key of new Set(data.keys())) {\n const all = data.getAll(key);\n values[key] = all.length > 1 ? all : (all[0] as FormDataEntryValue);\n }\n\n this.formSubmit.emit({\n values,\n event,\n errors: (errors) => this.publish(normalizeErrors(errors), 'submit', event),\n pending: (work) => {\n this.ownSubmitting.set(true);\n void work\n .then((settled) => {\n if (settled !== undefined && settled !== null) {\n this.publish(normalizeErrors(settled), 'submit', event);\n }\n })\n .finally(() => this.ownSubmitting.set(false));\n },\n });\n }\n\n protected onReset() {\n this.submitted.set(false);\n this.publish({}, 'clear', undefined);\n }\n\n /**\n * A server error is dropped when the control it names is edited. After a\n * failed submit under `validate=\"change\"`, the whole form is checked again\n * instead, because a reader who has seen the list is fixing it.\n */\n protected onInput(event: Event) {\n const name = nameOf(event.target);\n if (name === null) return;\n\n if (this.resolvedValidate() === 'change' && this.submitted()) {\n this.publish(this.collect(), 'keyboard', event, false);\n return;\n }\n const next = withoutError(this.errors(), name);\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * On blur only the control that lost focus is checked. Running the whole form\n * would tell a reader that six fields they have not reached yet are wrong,\n * which is the noise `validate=\"submit\"` exists to avoid.\n */\n protected onFocusOut(event: Event) {\n if (this.resolvedValidate() !== 'blur') return;\n const name = nameOf(event.target);\n if (name === null) return;\n\n const found = this.collect();\n const messages = found[name];\n const next =\n messages === undefined\n ? withoutError(this.errors(), name)\n : mergeErrors(this.errors(), { [name]: messages });\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * Three sources, latest last: whatever a server sent, the platform's own\n * constraint validation, and Reactive Forms.\n */\n private collect(): FormErrors {\n return mergeErrors(this.external(), collectValidity(this.element), this.angularErrors());\n }\n\n /**\n * Every failing control in the group around this form, as a sentence. Angular\n * reports a key and a shape and never a message, because a message is the\n * application's and so is its language; the registry is where it is written.\n */\n private angularErrors(): FormErrors {\n const group = this.container?.control as FormGroup | FormArray | null | undefined;\n if (group === null || group === undefined) return {};\n group.markAllAsTouched();\n\n const found: Record<string, string[]> = {};\n for (const [name, control] of Object.entries(\n group.controls as Record<string, AbstractControl>,\n )) {\n const errors = control.errors;\n if (errors === null || control.disabled) continue;\n const messages = Object.entries(errors)\n .map(\n ([key, detail]) =>\n this.errorMessages[key]?.({ name, key, detail }) ?? this.builtInMessage(key, detail),\n )\n .filter((message): message is string => typeof message === 'string');\n if (messages.length > 0) found[name] = messages;\n }\n return found;\n }\n\n /**\n * The sentence for one of Angular's own validators, from the catalog; for a\n * key the catalog does not know, nothing — the application's validator names\n * its own message through `SL_FORM_ERROR_MESSAGES`.\n */\n private builtInMessage(key: string, detail: unknown): string | undefined {\n const shape = (detail ?? {}) as { min?: unknown; max?: unknown; requiredLength?: unknown };\n switch (key) {\n case 'required':\n return this.t('errors.required');\n case 'email':\n return this.t('errors.email');\n case 'min':\n return this.t('errors.min', { min: Number(shape.min) });\n case 'max':\n return this.t('errors.max', { max: Number(shape.max) });\n case 'minlength':\n return this.t('errors.minlength', { length: Number(shape.requiredLength) });\n case 'maxlength':\n return this.t('errors.maxlength', { length: Number(shape.requiredLength) });\n case 'pattern':\n return this.t('errors.pattern');\n default:\n return undefined;\n }\n }\n\n private readControls() {\n this.controls.set(namedControls(this.element));\n }\n\n private publish(\n next: FormErrors,\n reason: ChangeReason,\n source: Event | undefined,\n moveFocus = true,\n ) {\n this.readControls();\n\n let cancelled = false;\n const state = createControllable<FormErrors>({\n controlled: undefined,\n initial: this.errors(),\n equals: sameErrors,\n onRequest: (pending) => {\n this.errorsChange.emit(pending);\n cancelled = pending.cancelled;\n },\n });\n state.request(next, reason, source);\n if (cancelled) return;\n\n if (!this.controlled()) this.own.set(next);\n\n if (!moveFocus || !hasErrors(next) || this.resolvedErrorFocus() === 'none') return;\n /* A summary that has not been rendered yet takes the focus when it is, and\n one that is already on the page takes it now. */\n if (this.resolvedErrorFocus() === 'summary' && this.summaryElement === null) {\n this.pendingFocus = true;\n return;\n }\n this.focusFirstError();\n }\n\n /**\n * The guard nobody else ships. It is off by default, because a page that\n * refuses to close after a reader typed one character is a trap.\n */\n private attachUnloadGuard() {\n const onBeforeUnload = (event: BeforeUnloadEvent) => {\n if (!this.guardUnsaved() || this.submitting()) return;\n if (!isDirty(this.element)) return;\n event.preventDefault();\n };\n\n window.addEventListener('beforeunload', onBeforeUnload);\n inject(DestroyRef).onDestroy(() => window.removeEventListener('beforeunload', onBeforeUnload));\n }\n}\n\nfunction nameOf(target: EventTarget | null): string | null {\n if (!(target instanceof HTMLElement)) return null;\n const name = (target as { name?: string }).name;\n return typeof name === 'string' && name !== '' ? name : null;\n}\n\nfunction sameErrors(a: FormErrors, b: FormErrors) {\n const names = Object.keys(a);\n if (names.length !== Object.keys(b).length) return false;\n return names.every(\n (name) =>\n b[name] !== undefined &&\n a[name]!.length === b[name]!.length &&\n a[name]!.every((message, index) => message === b[name]![index]),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AA8BA,MAAM,QAAQ,GAAiB;AAC7B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,kBAAkB,EAAE,SAAS;AAC7B,IAAA,QAAQ,EAAE,QAAQ;CACnB;MAEY,aAAa,GAAG,IAAI,cAAc,CAAe,uBAAuB,EAAE;AACrF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;;;;;AAKG;AACG,SAAU,mBAAmB,CAAC,QAA+B,EAAA;IACjE,OAAO;AACL,QAAA,OAAO,EAAE,aAAa;AACtB,QAAA,UAAU,EAAE,OAAqB,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KAC/D;AACH;SAEgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B;AAyBO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CACtD,6BAA6B,EAC7B,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE;AAG7C;AACM,SAAU,wBAAwB,CAAC,QAA2B,EAAA;IAClE,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,QAAQ,EAAE;AAChE;SAEgB,uBAAuB,GAAA;AACrC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAC;AACvC;AAEA;;;;;;AAMG;MACmB,WAAW,CAAA;AAShC;;AC7GD;;;;;;;;AAQG;MAcU,aAAa,CAAA;;IAEf,KAAK,GAAG,KAAK,CAA+B,SAAS;8EA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,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,GAAG,IAAI,GAAG,IAAI;AAC9D;AAEA,SAAS,UAAU,CAAC,CAAa,EAAE,CAAa,EAAA;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5B,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AACxD,IAAA,OAAO,KAAK,CAAC,KAAK,CAChB,CAAC,IAAI,KACH,CAAC,CAAC,IAAI,CAAC,KAAK,SAAS;QACrB,CAAC,CAAC,IAAI,CAAE,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,CAAE,CAAC,MAAM;QACnC,CAAC,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,KAAK,OAAO,KAAK,CAAC,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,CAAC,CAClE;AACH;;AC7iBA;;AAEG;;"}
@@ -44,8 +44,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
44
44
  '[attr.data-columns]': 'columns() ?? null',
45
45
  '[attr.data-min-item-width]': 'minItemWidth() ?? null',
46
46
  '[attr.data-align]': 'align() ?? null',
47
- /* `align` is also an obsolete HTML attribute a browser still honours on a
48
- div, centring its text; written statically for the input it would stay. */
47
+ /* `align` is also an obsolete HTML attribute a browser still honors on a
48
+ div, centering its text; written statically for the input it would stay. */
49
49
  '[attr.align]': 'null',
50
50
  '[attr.data-justify]': 'justify() ?? null',
51
51
  '[style.--slotted-grid-columns]': 'columns() ?? null',
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-grid.mjs","sources":["../../grid/src/grid.ts","../../grid/src/slotted-angular-grid.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A step on the space scale. Separation is chosen from the scale rather than\n * stated as a length, so a theme retunes every layout at once and no component\n * invents a rhythm of its own. `0` is the absence of separation.\n */\nexport type GridGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/**\n * A ceiling on the number of tracks, not a promise of them. The grid drops a\n * column whenever keeping it would take a cell below `minItemWidth`.\n */\nexport type GridColumns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/** The narrowest a cell may become before the grid drops a column. */\nexport type GridMinItemWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Across the flow, which for a cell is the block axis. */\nexport type GridAlign = 'start' | 'center' | 'end' | 'stretch';\n\n/** Along the flow, which for a cell is the inline axis. */\nexport type GridJustify = 'start' | 'center' | 'end' | 'stretch';\n\n/**\n * Grid arranges its children across two axes and reflows by measuring itself\n * rather than the viewport, so no breakpoint appears anywhere in the family. It\n * paints nothing and adds no semantics: the element is the one the consumer\n * wrote.\n *\n * It is not the APG grid widget. There is no `role=\"grid\"`, no cell and no\n * arrow-key navigation: this family lays children out, and the children keep\n * whatever semantics they already had.\n *\n * The count travels as a custom property as well as an attribute, because a\n * track function cannot read an integer from an attribute.\n */\n@Component({\n selector: '[slGrid]',\n standalone: true,\n exportAs: 'slGrid',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/grid/grid.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'grid',\n 'data-ui-grid': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-gap]': 'gap() ?? null',\n '[attr.data-columns]': 'columns() ?? null',\n '[attr.data-min-item-width]': 'minItemWidth() ?? null',\n '[attr.data-align]': 'align() ?? null',\n /* `align` is also an obsolete HTML attribute a browser still honours on a\n div, centring its text; written statically for the input it would stay. */\n '[attr.align]': 'null',\n '[attr.data-justify]': 'justify() ?? null',\n '[style.--slotted-grid-columns]': 'columns() ?? null',\n },\n})\nexport class SlGrid {\n /** Positions a child across the flow, inside its own cell. */\n readonly align = input<GridAlign>();\n /** At most this many tracks. Absent, the grid fits as many as it can. */\n readonly columns = input<GridColumns>();\n /** Separation between cells, as a step on the space scale. */\n readonly gap = input<GridGap>();\n /** Positions a child along the flow, inside its own cell. */\n readonly justify = input<GridJustify>();\n /** The narrowest a cell may become before a column is dropped. */\n readonly minItemWidth = input<GridMinItemWidth>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAwBA;;;;;;;;;;;;AAYG;MAyBU,MAAM,CAAA;;AAER,IAAA,KAAK,GAAG,KAAK;yFAAa;;AAE1B,IAAA,OAAO,GAAG,KAAK;2FAAe;;AAE9B,IAAA,GAAG,GAAG,KAAK;uFAAW;;AAEtB,IAAA,OAAO,GAAG,KAAK;2FAAe;;AAE9B,IAAA,YAAY,GAAG,KAAK;gGAAoB;uGAVtC,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,knCApBP,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ytEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAoB1B,MAAM,EAAA,UAAA,EAAA,CAAA;kBAxBlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,UAAA,EACR,IAAI,EAAA,QAAA,EACN,QAAQ,YACR,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,MAAM;AACjB,wBAAA,cAAc,EAAE,EAAE;AAClB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,gBAAgB,EAAE,EAAE;AACpB,wBAAA,iBAAiB,EAAE,eAAe;AAClC,wBAAA,qBAAqB,EAAE,mBAAmB;AAC1C,wBAAA,4BAA4B,EAAE,wBAAwB;AACtD,wBAAA,mBAAmB,EAAE,iBAAiB;AACtC;AAC6E;AAC7E,wBAAA,cAAc,EAAE,MAAM;AACtB,wBAAA,qBAAqB,EAAE,mBAAmB;AAC1C,wBAAA,gCAAgC,EAAE,mBAAmB;AACtD,qBAAA,EAAA,MAAA,EAAA,CAAA,ytEAAA,CAAA,EAAA;;;AC3DH;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-grid.mjs","sources":["../../grid/src/grid.ts","../../grid/src/slotted-angular-grid.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A step on the space scale. Separation is chosen from the scale rather than\n * stated as a length, so a theme retunes every layout at once and no component\n * invents a rhythm of its own. `0` is the absence of separation.\n */\nexport type GridGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/**\n * A ceiling on the number of tracks, not a promise of them. The grid drops a\n * column whenever keeping it would take a cell below `minItemWidth`.\n */\nexport type GridColumns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/** The narrowest a cell may become before the grid drops a column. */\nexport type GridMinItemWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Across the flow, which for a cell is the block axis. */\nexport type GridAlign = 'start' | 'center' | 'end' | 'stretch';\n\n/** Along the flow, which for a cell is the inline axis. */\nexport type GridJustify = 'start' | 'center' | 'end' | 'stretch';\n\n/**\n * Grid arranges its children across two axes and reflows by measuring itself\n * rather than the viewport, so no breakpoint appears anywhere in the family. It\n * paints nothing and adds no semantics: the element is the one the consumer\n * wrote.\n *\n * It is not the APG grid widget. There is no `role=\"grid\"`, no cell and no\n * arrow-key navigation: this family lays children out, and the children keep\n * whatever semantics they already had.\n *\n * The count travels as a custom property as well as an attribute, because a\n * track function cannot read an integer from an attribute.\n */\n@Component({\n selector: '[slGrid]',\n standalone: true,\n exportAs: 'slGrid',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/grid/grid.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'grid',\n 'data-ui-grid': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-gap]': 'gap() ?? null',\n '[attr.data-columns]': 'columns() ?? null',\n '[attr.data-min-item-width]': 'minItemWidth() ?? null',\n '[attr.data-align]': 'align() ?? null',\n /* `align` is also an obsolete HTML attribute a browser still honors on a\n div, centering its text; written statically for the input it would stay. */\n '[attr.align]': 'null',\n '[attr.data-justify]': 'justify() ?? null',\n '[style.--slotted-grid-columns]': 'columns() ?? null',\n },\n})\nexport class SlGrid {\n /** Positions a child across the flow, inside its own cell. */\n readonly align = input<GridAlign>();\n /** At most this many tracks. Absent, the grid fits as many as it can. */\n readonly columns = input<GridColumns>();\n /** Separation between cells, as a step on the space scale. */\n readonly gap = input<GridGap>();\n /** Positions a child along the flow, inside its own cell. */\n readonly justify = input<GridJustify>();\n /** The narrowest a cell may become before a column is dropped. */\n readonly minItemWidth = input<GridMinItemWidth>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAwBA;;;;;;;;;;;;AAYG;MAyBU,MAAM,CAAA;;AAER,IAAA,KAAK,GAAG,KAAK;yFAAa;;AAE1B,IAAA,OAAO,GAAG,KAAK;2FAAe;;AAE9B,IAAA,GAAG,GAAG,KAAK;uFAAW;;AAEtB,IAAA,OAAO,GAAG,KAAK;2FAAe;;AAE9B,IA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{ debugName: "query" }] : /* istanbul ignore next */ []));
66
66
  /**
67
67
  * Spans already found — by a server, by a fuzzy engine — in the text's own
68
- * code units. Wins over `query` and `matcher`; normalised like either.
68
+ * code units. Wins over `query` and `matcher`; normalized like either.
69
69
  */
70
70
  ranges = input(undefined, /* @ts-ignore */
71
71
  ...(ngDevMode ? [{ debugName: "ranges" }] : /* istanbul ignore next */ []));
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-highlight.mjs","sources":["../../highlight/src/highlight-defaults.ts","../../highlight/src/highlight.ts","../../highlight/src/slotted-angular-highlight.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nimport type { HighlightMatchOptions } from '@slotted/core/highlight';\n\nexport type {\n HighlightMatcher,\n HighlightMatchOptions,\n HighlightRange,\n HighlightRun,\n} from '@slotted/core/highlight';\n\nexport type HighlightOccurrences = NonNullable<HighlightMatchOptions['occurrences']>;\nexport type HighlightSensitivity = NonNullable<HighlightMatchOptions['sensitivity']>;\n\n/** What an application sets once for every mark under it. */\nexport interface HighlightDefaults {\n /** BCP 47. `undefined` asks the runtime. */\n locale: string | undefined;\n /** `base`: `resume` finds `Resumé`, as `typeahead` and `createFilter` compare. */\n sensitivity: HighlightSensitivity;\n /** `all`: every place a query appears; `first`: one span per query. */\n occurrences: HighlightOccurrences;\n}\n\nconst FALLBACK: HighlightDefaults = {\n locale: undefined,\n sensitivity: 'base',\n occurrences: 'all',\n};\n\nexport const HIGHLIGHT_DEFAULTS = new InjectionToken<HighlightDefaults>(\n 'slotted highlight defaults',\n {\n providedIn: 'root',\n factory: () => FALLBACK,\n },\n);\n\n/**\n * An application decides once which locale its marks compare in, how strict\n * the comparison is, and whether every occurrence is marked. A mark that\n * states any of them itself still wins: an explicit input is never overridden\n * by the token. A host — `combobox`, `select` — passes the locale its filter\n * used, which is the same rule from the other side.\n */\nexport function provideHighlightDefaults(defaults: Partial<HighlightDefaults>) {\n return {\n provide: HIGHLIGHT_DEFAULTS,\n useFactory: (): HighlightDefaults => ({\n locale: defaults.locale ?? FALLBACK.locale,\n sensitivity: defaults.sensitivity ?? FALLBACK.sensitivity,\n occurrences: defaults.occurrences ?? FALLBACK.occurrences,\n }),\n };\n}\n\n/** What a mark compares with here, before it states anything of its own. */\nexport function injectHighlightDefaults(): HighlightDefaults {\n return inject(HIGHLIGHT_DEFAULTS);\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { highlightRuns } from '@slotted/core/highlight';\nimport type { HighlightMatcher, HighlightRange } from '@slotted/core/highlight';\n\nimport { injectHighlightDefaults } from './highlight-defaults';\nimport type { HighlightOccurrences, HighlightSensitivity } from './highlight-defaults';\n\n/**\n * The spans of a text a query found, marked.\n *\n * The component is written on the consumer's own element — the `span` that\n * holds an option's label, the `p` under a find bar — which is the element\n * that holds the text and the reason this binding needs no `render` input:\n * substituting the element is Angular's default. The `mark` inside it is\n * fixed; it is the element the HTML Standard defines for the term searched\n * for inside a result.\n *\n * It is content, not a control: nothing here is focusable and nothing answers\n * a key. What is marked is decided by `@slotted/core/highlight`, the same scan\n * `combobox`'s filter decides with. `text` is a string and the runs are\n * slices of it; nothing is projected, because a `mark` inside projected\n * content would be HTML the family interpreted.\n *\n * Every space in this template is load-bearing: a newline between two nodes\n * collapses into a space, and a space between two runs is a space inside the\n * text.\n */\n@Component({\n selector: '[slHighlight]',\n standalone: true,\n exportAs: 'slHighlight',\n // prettier-ignore\n template: `@for (run of runs(); track $index) {@if (run.matched) {<mark data-part=\"match\" data-part-match=\"\" [attr.data-current]=\"run.index === current() ? '' : null\">{{ run.text }}</mark>} @else {{{ run.text }}}}`,\n styleUrl: '../../../styles/src/highlight/highlight.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'highlight',\n 'data-ui-highlight': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n})\nexport class SlHighlight {\n /**\n * The text, whole. It is the only content the family renders: nothing in it\n * is HTML, and a run is a slice of it.\n */\n readonly text = input.required<string>();\n /** One query or several. Empty and whitespace-only entries find nothing. */\n readonly query = input<string | readonly string[] | undefined>(undefined);\n /**\n * Spans already found — by a server, by a fuzzy engine — in the text's own\n * code units. Wins over `query` and `matcher`; normalised like either.\n */\n readonly ranges = input<readonly HighlightRange[] | undefined>(undefined);\n /** Replaces the default matcher. Loses to `ranges`. */\n readonly matcher = input<HighlightMatcher | undefined>(undefined);\n /**\n * The match a find bar is standing on, counting matches only. It is stated,\n * never moved: the family has no keyboard. Out of range marks nothing.\n */\n readonly current = input<number | undefined>(undefined);\n /** Defaults to the provider, then to the runtime's locale. */\n readonly locale = input<string | undefined>(undefined);\n /** Defaults to the provider, then to `base`. */\n readonly sensitivity = input<HighlightSensitivity | undefined>(undefined);\n /** Defaults to the provider, then to `all`. */\n readonly occurrences = input<HighlightOccurrences | undefined>(undefined);\n /**\n * Steps the marks down without claiming the row's semantics. The row above\n * already says it with `data-disabled`, and the sheet reads that too.\n */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n private readonly defaults = injectHighlightDefaults();\n\n /** The runs the template renders; a consumer counting matches reads it too. */\n readonly runs = computed(() =>\n highlightRuns(this.text(), {\n locale: this.locale() ?? this.defaults.locale,\n matcher: this.matcher(),\n occurrences: this.occurrences() ?? this.defaults.occurrences,\n query: this.query(),\n ranges: this.ranges(),\n sensitivity: this.sensitivity() ?? this.defaults.sensitivity,\n }),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAwBA,MAAM,QAAQ,GAAsB;AAClC,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,WAAW,EAAE,MAAM;AACnB,IAAA,WAAW,EAAE,KAAK;CACnB;MAEY,kBAAkB,GAAG,IAAI,cAAc,CAClD,4BAA4B,EAC5B;AACE,IAAA,UAAU,EA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,EAAA,MAAA,EAAA,CAAA,u8CAAA,CAAA,EAAA;;;AClDH;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-highlight.mjs","sources":["../../highlight/src/highlight-defaults.ts","../../highlight/src/highlight.ts","../../highlight/src/slotted-angular-highlight.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nimport type { HighlightMatchOptions } from '@slotted/core/highlight';\n\nexport type {\n HighlightMatcher,\n HighlightMatchOptions,\n HighlightRange,\n HighlightRun,\n} from '@slotted/core/highlight';\n\nexport type HighlightOccurrences = NonNullable<HighlightMatchOptions['occurrences']>;\nexport type HighlightSensitivity = NonNullable<HighlightMatchOptions['sensitivity']>;\n\n/** What an application sets once for every mark under it. */\nexport interface HighlightDefaults {\n /** BCP 47. `undefined` asks the runtime. */\n locale: string | undefined;\n /** `base`: `resume` finds `Resumé`, as `typeahead` and `createFilter` compare. */\n sensitivity: HighlightSensitivity;\n /** `all`: every place a query appears; `first`: one span per query. */\n occurrences: HighlightOccurrences;\n}\n\nconst FALLBACK: HighlightDefaults = {\n locale: undefined,\n sensitivity: 'base',\n occurrences: 'all',\n};\n\nexport const HIGHLIGHT_DEFAULTS = new InjectionToken<HighlightDefaults>(\n 'slotted highlight defaults',\n {\n providedIn: 'root',\n factory: () => FALLBACK,\n },\n);\n\n/**\n * An application decides once which locale its marks compare in, how strict\n * the comparison is, and whether every occurrence is marked. A mark that\n * states any of them itself still wins: an explicit input is never overridden\n * by the token. A host — `combobox`, `select` — passes the locale its filter\n * used, which is the same rule from the other side.\n */\nexport function provideHighlightDefaults(defaults: Partial<HighlightDefaults>) {\n return {\n provide: HIGHLIGHT_DEFAULTS,\n useFactory: (): HighlightDefaults => ({\n locale: defaults.locale ?? FALLBACK.locale,\n sensitivity: defaults.sensitivity ?? FALLBACK.sensitivity,\n occurrences: defaults.occurrences ?? FALLBACK.occurrences,\n }),\n };\n}\n\n/** What a mark compares with here, before it states anything of its own. */\nexport function injectHighlightDefaults(): HighlightDefaults {\n return inject(HIGHLIGHT_DEFAULTS);\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { highlightRuns } from '@slotted/core/highlight';\nimport type { HighlightMatcher, HighlightRange } from '@slotted/core/highlight';\n\nimport { injectHighlightDefaults } from './highlight-defaults';\nimport type { HighlightOccurrences, HighlightSensitivity } from './highlight-defaults';\n\n/**\n * The spans of a text a query found, marked.\n *\n * The component is written on the consumer's own element — the `span` that\n * holds an option's label, the `p` under a find bar — which is the element\n * that holds the text and the reason this binding needs no `render` input:\n * substituting the element is Angular's default. The `mark` inside it is\n * fixed; it is the element the HTML Standard defines for the term searched\n * for inside a result.\n *\n * It is content, not a control: nothing here is focusable and nothing answers\n * a key. What is marked is decided by `@slotted/core/highlight`, the same scan\n * `combobox`'s filter decides with. `text` is a string and the runs are\n * slices of it; nothing is projected, because a `mark` inside projected\n * content would be HTML the family interpreted.\n *\n * Every space in this template is load-bearing: a newline between two nodes\n * collapses into a space, and a space between two runs is a space inside the\n * text.\n */\n@Component({\n selector: '[slHighlight]',\n standalone: true,\n exportAs: 'slHighlight',\n // prettier-ignore\n template: `@for (run of runs(); track $index) {@if (run.matched) {<mark data-part=\"match\" data-part-match=\"\" [attr.data-current]=\"run.index === current() ? '' : null\">{{ run.text }}</mark>} @else {{{ run.text }}}}`,\n styleUrl: '../../../styles/src/highlight/highlight.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'highlight',\n 'data-ui-highlight': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n})\nexport class SlHighlight {\n /**\n * The text, whole. It is the only content the family renders: nothing in it\n * is HTML, and a run is a slice of it.\n */\n readonly text = input.required<string>();\n /** One query or several. Empty and whitespace-only entries find nothing. */\n readonly query = input<string | readonly string[] | undefined>(undefined);\n /**\n * Spans already found — by a server, by a fuzzy engine — in the text's own\n * code units. Wins over `query` and `matcher`; normalized like either.\n */\n readonly ranges = input<readonly HighlightRange[] | undefined>(undefined);\n /** Replaces the default matcher. Loses to `ranges`. */\n readonly matcher = input<HighlightMatcher | undefined>(undefined);\n /**\n * The match a find bar is standing on, counting matches only. It is stated,\n * never moved: the family has no keyboard. Out of range marks nothing.\n */\n readonly current = input<number | undefined>(undefined);\n /** Defaults to the provider, then to the runtime's locale. */\n readonly locale = input<string | undefined>(undefined);\n /** Defaults to the provider, then to `base`. */\n readonly sensitivity = input<HighlightSensitivity | undefined>(undefined);\n /** Defaults to the provider, then to `all`. */\n readonly occurrences = input<HighlightOccurrences | undefined>(undefined);\n /**\n * Steps the marks down without claiming the row's semantics. The row above\n * already says it with `data-disabled`, and the sheet reads that too.\n */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n private readonly defaults = injectHighlightDefaults();\n\n /** The runs the template renders; a consumer counting matches reads it too. */\n readonly runs = computed(() =>\n highlightRuns(this.text(), {\n locale: this.locale() ?? this.defaults.locale,\n matcher: this.matcher(),\n occurrences: this.occurrences() ?? this.defaults.occurrences,\n query: this.query(),\n ranges: this.ranges(),\n sensitivity: this.sensitivity() ?? this.defaults.sensitivity,\n }),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAwBA,MAAM,QAAQ,GAAsB;AAClC,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,WAAW,EAAE,MAAM;AACnB,IAAA,WAAW,EAAE,KAAK;CACnB;MAEY,kBAAkB,GAAG,IAAI,cAAc,CAClD,4BAA4B,EAC5B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAGH;;;;;;AAMG;AACG,SAAU,wBAAwB,CAAC,QAAoC,EAAA;IAC3E,OAAO;AACL,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,UAAU,EAAE,OAA0B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AAK,EAAE;AACnB,QAAA,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;QACrB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW;KAC7D,CAAC;6EACH;uGA5CU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,25CAZZ,CAAA,0MAAA,CAA4M,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,u8CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAY3M,WAAW,EAAA,UAAA,EAAA,CAAA;kBAjBvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,UAAA,EACb,IAAI,EAAA,QAAA,EACN,aAAa,YAEb,CAAA,0MAAA,CAA4M,EAAA,eAAA,EAErM,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,mBAAmB,EAAE,EAAE;AACvB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,gBAAgB,EAAE,EAAE;AACpB,wBAAA,sBAAsB,EAAE,wBAAwB;AACjD,qBAAA,EAAA,MAAA,EAAA,CAAA,u8CAAA,CAAA,EAAA;;;AClDH;;AAEG;;"}
@@ -6,7 +6,7 @@ let sequence = 0;
6
6
  /**
7
7
  * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide
8
8
  * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.
9
- * It goes inside a `slIcon` box, which owns the size, the colour, the
9
+ * It goes inside a `slIcon` box, which owns the size, the color, the
10
10
  * alignment and the name; the glyph owns only the drawing. Every family draws
11
11
  * its own icons — a close button's cross, a pager's chevrons — with this
12
12
  * element, and never with a pseudo-element or a mask of its own.
@@ -249,7 +249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
249
249
  }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], solid: [{ type: i0.Input, args: [{ isSignal: true, alias: "solid", required: false }] }] } });
250
250
 
251
251
  /**
252
- * `inherit` is the absence of a colour rather than a colour of its own, so it
252
+ * `inherit` is the absence of a color rather than a color of its own, so it
253
253
  * removes the attribute and lets the surface decide.
254
254
  */
255
255
  function toneAttribute(tone) {
@@ -260,7 +260,7 @@ function toneAttribute(tone) {
260
260
  * Icon is the box a glyph is drawn in, not the glyph. The library ships no
261
261
  * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,
262
262
  * anything that renders one — and this family owns the size it is drawn at,
263
- * the colour it inherits, where it sits against a line of text, and whether it
263
+ * the color it inherits, where it sits against a line of text, and whether it
264
264
  * mirrors where reading runs the other way.
265
265
  *
266
266
  * The selector is the bare attribute, so the consumer writes the element. It
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-icon.mjs","sources":["../../icon/src/glyph.ts","../../icon/src/icon.types.ts","../../icon/src/icon.ts","../../icon/src/slotted-angular-icon.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport {\n GLYPH_VIEW_BOX,\n GLYPHS,\n isStatusGlyph,\n STATUS_GLYPH_GRIDS,\n STATUS_GLYPHS,\n} from '@slotted/core/glyph';\nimport type { GlyphDrawing, GlyphName, StatusGlyphGrid } from '@slotted/core/glyph';\n\nlet sequence = 0;\n\n/**\n * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide\n * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.\n * It goes inside a `slIcon` box, which owns the size, the colour, the\n * alignment and the name; the glyph owns only the drawing. Every family draws\n * its own icons — a close button's cross, a pager's chevrons — with this\n * element, and never with a pseudo-element or a mask of its own.\n *\n * `solid` draws a status mark the way a tone's badge reads: the glyph's first\n * shape filled, and the symbol inside it cut out of the fill by an SVG\n * `<mask>`, so whatever lies behind shows through the symbol on any ground.\n *\n * A status mark (`status-*`) is always solid, and is drawn once per grid it\n * was drawn on; `icon.css` shows the grid the icon box is sized for.\n *\n * The children carry the `svg:` namespace because the template is parsed apart\n * from its host: an unprefixed `<path>` would be created as an HTML element.\n */\n@Component({\n selector: 'svg[slGlyph]',\n standalone: true,\n template: `@if (grids(); as grids) {\n @for (grid of grids; track grid.size) {\n <svg:svg [attr.data-grid]=\"grid.size\" [attr.viewBox]=\"'0 0 ' + grid.size + ' ' + grid.size\">\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId + '-' + grid.size\"\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"grid.size\"\n [attr.height]=\"grid.size\"\n >\n <svg:rect fill=\"#fff\" [attr.width]=\"grid.size\" [attr.height]=\"grid.size\" />\n @for (d of grid.drawing.holes; track $index) {\n <svg:path [attr.d]=\"d\" fill=\"#000\" />\n }\n @for (d of grid.drawing.strokes; track $index) {\n <svg:path\n [attr.d]=\"d\"\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n />\n }\n </svg:mask>\n </svg:defs>\n <svg:path\n [attr.d]=\"grid.drawing.shape\"\n fill=\"currentColor\"\n [attr.mask]=\"'url(#' + maskId + '-' + grid.size + ')'\"\n [attr.stroke]=\"grid.drawing.shapeStroke === 0 ? null : 'currentColor'\"\n [attr.stroke-linejoin]=\"grid.drawing.shapeStroke === 0 ? null : 'round'\"\n [attr.stroke-width]=\"grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke\"\n />\n </svg:svg>\n }\n } @else {\n @if (solid()) {\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId\"\n maskUnits=\"userSpaceOnUse\"\n x=\"-2\"\n y=\"-2\"\n width=\"28\"\n height=\"28\"\n >\n <svg:rect x=\"-2\" y=\"-2\" width=\"28\" height=\"28\" fill=\"#fff\" />\n <svg:g\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n >\n @for (d of symbol(); track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n </svg:g>\n </svg:mask>\n </svg:defs>\n }\n <svg:g [attr.transform]=\"transform()\">\n @if (solid()) {\n <svg:path\n [attr.d]=\"drawing().paths[0]\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n [attr.mask]=\"'url(#' + maskId + ')'\"\n />\n } @else {\n @for (d of drawing().paths; track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n }\n </svg:g>\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'aria-hidden': 'true',\n focusable: 'false',\n 'data-part': 'glyph',\n 'data-part-glyph': '',\n '[attr.data-glyph]': 'name()',\n '[attr.viewBox]': \"grids() ? '0 0 16 16' : viewBox\",\n '[attr.data-solid]': \"painted() ? null : ''\",\n '[attr.fill]': \"painted() ? (stroked() ? 'none' : 'currentColor') : null\",\n '[attr.stroke]': \"painted() && stroked() ? 'currentColor' : null\",\n '[attr.stroke-width]': 'painted() && stroked() ? drawing().strokeWidth : null',\n '[attr.stroke-linecap]': \"painted() && stroked() ? 'round' : null\",\n '[attr.stroke-linejoin]': \"painted() && stroked() ? 'round' : null\",\n },\n})\nexport class SlGlyph {\n /** One of the library's own icons: its glyph token without `--slotted-icon-`. */\n readonly name = input.required<GlyphName>();\n /**\n * The first shape filled and the symbol cut out of it — a tone's status\n * mark. For glyphs whose first shape encloses the rest (`circle-*`,\n * `triangle-alert`).\n */\n readonly solid = input(false, { transform: booleanAttribute });\n\n protected readonly maskId = `sl-glyph-${String((sequence += 1))}`;\n\n protected readonly viewBox = GLYPH_VIEW_BOX;\n /** A status mark's drawing on each of its grids; `null` for a Lucide glyph. */\n protected readonly grids = computed<readonly { size: number; drawing: StatusGlyphGrid }[] | null>(\n () => {\n const name = this.name();\n return isStatusGlyph(name)\n ? STATUS_GLYPH_GRIDS.map((size) => ({ size, drawing: STATUS_GLYPHS[name][size] }))\n : null;\n },\n );\n /** Painted by the root's own fill or stroke rather than by a solid shape. */\n protected readonly painted = computed(() => !this.solid() && this.grids() === null);\n /* A status mark has no Lucide drawing, and reads none: `dot` only keeps the signal typed. */\n protected readonly drawing = computed<GlyphDrawing>(() => {\n const name = this.name();\n return isStatusGlyph(name) ? GLYPHS.dot : GLYPHS[name];\n });\n protected readonly symbol = computed(() => this.drawing().paths.slice(1));\n protected readonly stroked = computed(() => this.drawing().paint === 'stroke');\n protected readonly transform = computed(() => {\n const [dx, dy] = this.drawing().offset;\n return dx === 0 && dy === 0 ? null : `translate(${dx} ${dy})`;\n });\n}\n","/**\n * Three steps read the control icon scale, which the theme restates per\n * density. `text` follows the type the icon sits in, because a control-sized\n * glyph inside a display heading is not an icon.\n */\nexport type IconSize = 'text' | 'sm' | 'md' | 'lg';\n\nexport type IconTone =\n | 'inherit'\n | 'default'\n | 'muted'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inverse';\n\n/**\n * `inherit` is the absence of a colour rather than a colour of its own, so it\n * removes the attribute and lets the surface decide.\n */\nexport function toneAttribute(tone: IconTone | undefined): string | null {\n return tone === undefined || tone === 'inherit' ? null : tone;\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { toneAttribute } from './icon.types';\nimport type { IconSize, IconTone } from './icon.types';\n\n/**\n * Icon is the box a glyph is drawn in, not the glyph. The library ships no\n * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,\n * anything that renders one — and this family owns the size it is drawn at,\n * the colour it inherits, where it sits against a line of text, and whether it\n * mirrors where reading runs the other way.\n *\n * The selector is the bare attribute, so the consumer writes the element. It\n * is a component rather than a directive only because a directive carries no\n * `styleUrl`, and that also means it cannot sit on `<ng-icon>` itself: Angular\n * refuses two components on one element, so the box is always written.\n */\n@Component({\n selector: '[slIcon]',\n standalone: true,\n exportAs: 'slIcon',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/icon/icon.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'icon',\n 'data-ui-icon': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'size() ?? null',\n '[attr.data-tone]': 'toneAttribute()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'named() ? null : \"true\"',\n },\n})\nexport class SlIcon {\n readonly directional = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly size = input<IconSize>();\n readonly tone = input<IconTone>();\n\n /**\n * A name the consumer wrote on the element counts as much as the input, and\n * has to be read rather than assumed absent: a host binding that wrote\n * `null` would delete the consumer's own `aria-label` and hide the icon it\n * named, which is a silent defect in the likeliest mistake. `aria-labelledby`\n * is read and never written, so the attribute the consumer put there stays\n * exactly as written.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.writtenLabel);\n\n /**\n * The icon is decorative when it has no name and meaningful when it has one,\n * which is why there is no `decorative` input: named and hidden cannot both\n * be true.\n */\n protected readonly named = computed(\n () => this.ariaLabel() !== null || this.writtenLabelledBy !== null,\n );\n\n /**\n * `role=\"img\"` requires a name, so it appears only once there is one, and a\n * role the consumer chose is left alone.\n */\n protected readonly role = computed(() =>\n this.writtenRole === null ? (this.named() ? 'img' : null) : this.writtenRole,\n );\n\n protected readonly toneAttribute = computed(() => toneAttribute(this.tone()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAgBA,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;AAiBG;MAsGU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAa;AAC3C;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3C,MAAM,GAAG,CAAA,SAAA,EAAY,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAA,CAAE;IAE9C,OAAO,GAAG,cAAc;;AAExB,IAAA,KAAK,GAAG,QAAQ,CACjC,MAAK;AACH,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;QACxB,OAAO,aAAa,CAAC,IAAI;cACrB,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;cAC/E,IAAI;IACV,CAAC;8EACF;;AAEkB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,IAAI;gFAAC;;AAEhE,IAAA,OAAO,GAAG,QAAQ,CAAe,MAAK;AACvD,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;AACxB,QAAA,OAAO,aAAa,CAAC,IAAI,C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AAA;;;AC7CH;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-icon.mjs","sources":["../../icon/src/glyph.ts","../../icon/src/icon.types.ts","../../icon/src/icon.ts","../../icon/src/slotted-angular-icon.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport {\n GLYPH_VIEW_BOX,\n GLYPHS,\n isStatusGlyph,\n STATUS_GLYPH_GRIDS,\n STATUS_GLYPHS,\n} from '@slotted/core/glyph';\nimport type { GlyphDrawing, GlyphName, StatusGlyphGrid } from '@slotted/core/glyph';\n\nlet sequence = 0;\n\n/**\n * Glyph is the library's own artwork, drawn as a real `<svg>`: the Lucide\n * geometry `@slotted/core/glyph` holds, stroked or filled with `currentColor`.\n * It goes inside a `slIcon` box, which owns the size, the color, the\n * alignment and the name; the glyph owns only the drawing. Every family draws\n * its own icons — a close button's cross, a pager's chevrons — with this\n * element, and never with a pseudo-element or a mask of its own.\n *\n * `solid` draws a status mark the way a tone's badge reads: the glyph's first\n * shape filled, and the symbol inside it cut out of the fill by an SVG\n * `<mask>`, so whatever lies behind shows through the symbol on any ground.\n *\n * A status mark (`status-*`) is always solid, and is drawn once per grid it\n * was drawn on; `icon.css` shows the grid the icon box is sized for.\n *\n * The children carry the `svg:` namespace because the template is parsed apart\n * from its host: an unprefixed `<path>` would be created as an HTML element.\n */\n@Component({\n selector: 'svg[slGlyph]',\n standalone: true,\n template: `@if (grids(); as grids) {\n @for (grid of grids; track grid.size) {\n <svg:svg [attr.data-grid]=\"grid.size\" [attr.viewBox]=\"'0 0 ' + grid.size + ' ' + grid.size\">\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId + '-' + grid.size\"\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n [attr.width]=\"grid.size\"\n [attr.height]=\"grid.size\"\n >\n <svg:rect fill=\"#fff\" [attr.width]=\"grid.size\" [attr.height]=\"grid.size\" />\n @for (d of grid.drawing.holes; track $index) {\n <svg:path [attr.d]=\"d\" fill=\"#000\" />\n }\n @for (d of grid.drawing.strokes; track $index) {\n <svg:path\n [attr.d]=\"d\"\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n />\n }\n </svg:mask>\n </svg:defs>\n <svg:path\n [attr.d]=\"grid.drawing.shape\"\n fill=\"currentColor\"\n [attr.mask]=\"'url(#' + maskId + '-' + grid.size + ')'\"\n [attr.stroke]=\"grid.drawing.shapeStroke === 0 ? null : 'currentColor'\"\n [attr.stroke-linejoin]=\"grid.drawing.shapeStroke === 0 ? null : 'round'\"\n [attr.stroke-width]=\"grid.drawing.shapeStroke === 0 ? null : grid.drawing.shapeStroke\"\n />\n </svg:svg>\n }\n } @else {\n @if (solid()) {\n <svg:defs>\n <svg:mask\n [attr.id]=\"maskId\"\n maskUnits=\"userSpaceOnUse\"\n x=\"-2\"\n y=\"-2\"\n width=\"28\"\n height=\"28\"\n >\n <svg:rect x=\"-2\" y=\"-2\" width=\"28\" height=\"28\" fill=\"#fff\" />\n <svg:g\n fill=\"none\"\n stroke=\"#000\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n >\n @for (d of symbol(); track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n </svg:g>\n </svg:mask>\n </svg:defs>\n }\n <svg:g [attr.transform]=\"transform()\">\n @if (solid()) {\n <svg:path\n [attr.d]=\"drawing().paths[0]\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n [attr.stroke-width]=\"drawing().strokeWidth\"\n [attr.mask]=\"'url(#' + maskId + ')'\"\n />\n } @else {\n @for (d of drawing().paths; track $index) {\n <svg:path [attr.d]=\"d\" />\n }\n }\n </svg:g>\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'aria-hidden': 'true',\n focusable: 'false',\n 'data-part': 'glyph',\n 'data-part-glyph': '',\n '[attr.data-glyph]': 'name()',\n '[attr.viewBox]': \"grids() ? '0 0 16 16' : viewBox\",\n '[attr.data-solid]': \"painted() ? null : ''\",\n '[attr.fill]': \"painted() ? (stroked() ? 'none' : 'currentColor') : null\",\n '[attr.stroke]': \"painted() && stroked() ? 'currentColor' : null\",\n '[attr.stroke-width]': 'painted() && stroked() ? drawing().strokeWidth : null',\n '[attr.stroke-linecap]': \"painted() && stroked() ? 'round' : null\",\n '[attr.stroke-linejoin]': \"painted() && stroked() ? 'round' : null\",\n },\n})\nexport class SlGlyph {\n /** One of the library's own icons: its glyph token without `--slotted-icon-`. */\n readonly name = input.required<GlyphName>();\n /**\n * The first shape filled and the symbol cut out of it — a tone's status\n * mark. For glyphs whose first shape encloses the rest (`circle-*`,\n * `triangle-alert`).\n */\n readonly solid = input(false, { transform: booleanAttribute });\n\n protected readonly maskId = `sl-glyph-${String((sequence += 1))}`;\n\n protected readonly viewBox = GLYPH_VIEW_BOX;\n /** A status mark's drawing on each of its grids; `null` for a Lucide glyph. */\n protected readonly grids = computed<readonly { size: number; drawing: StatusGlyphGrid }[] | null>(\n () => {\n const name = this.name();\n return isStatusGlyph(name)\n ? STATUS_GLYPH_GRIDS.map((size) => ({ size, drawing: STATUS_GLYPHS[name][size] }))\n : null;\n },\n );\n /** Painted by the root's own fill or stroke rather than by a solid shape. */\n protected readonly painted = computed(() => !this.solid() && this.grids() === null);\n /* A status mark has no Lucide drawing, and reads none: `dot` only keeps the signal typed. */\n protected readonly drawing = computed<GlyphDrawing>(() => {\n const name = this.name();\n return isStatusGlyph(name) ? GLYPHS.dot : GLYPHS[name];\n });\n protected readonly symbol = computed(() => this.drawing().paths.slice(1));\n protected readonly stroked = computed(() => this.drawing().paint === 'stroke');\n protected readonly transform = computed(() => {\n const [dx, dy] = this.drawing().offset;\n return dx === 0 && dy === 0 ? null : `translate(${dx} ${dy})`;\n });\n}\n","/**\n * Three steps read the control icon scale, which the theme restates per\n * density. `text` follows the type the icon sits in, because a control-sized\n * glyph inside a display heading is not an icon.\n */\nexport type IconSize = 'text' | 'sm' | 'md' | 'lg';\n\nexport type IconTone =\n | 'inherit'\n | 'default'\n | 'muted'\n | 'accent'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inverse';\n\n/**\n * `inherit` is the absence of a color rather than a color of its own, so it\n * removes the attribute and lets the surface decide.\n */\nexport function toneAttribute(tone: IconTone | undefined): string | null {\n return tone === undefined || tone === 'inherit' ? null : tone;\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { toneAttribute } from './icon.types';\nimport type { IconSize, IconTone } from './icon.types';\n\n/**\n * Icon is the box a glyph is drawn in, not the glyph. The library ships no\n * catalogue: the artwork is the consumer's — an `ng-icon`, an inline `svg`,\n * anything that renders one — and this family owns the size it is drawn at,\n * the color it inherits, where it sits against a line of text, and whether it\n * mirrors where reading runs the other way.\n *\n * The selector is the bare attribute, so the consumer writes the element. It\n * is a component rather than a directive only because a directive carries no\n * `styleUrl`, and that also means it cannot sit on `<ng-icon>` itself: Angular\n * refuses two components on one element, so the box is always written.\n */\n@Component({\n selector: '[slIcon]',\n standalone: true,\n exportAs: 'slIcon',\n template: '<ng-content></ng-content>',\n styleUrl: '../../../styles/src/icon/icon.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'icon',\n 'data-ui-icon': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'size() ?? null',\n '[attr.data-tone]': 'toneAttribute()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'role()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'named() ? null : \"true\"',\n },\n})\nexport class SlIcon {\n readonly directional = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly size = input<IconSize>();\n readonly tone = input<IconTone>();\n\n /**\n * A name the consumer wrote on the element counts as much as the input, and\n * has to be read rather than assumed absent: a host binding that wrote\n * `null` would delete the consumer's own `aria-label` and hide the icon it\n * named, which is a silent defect in the likeliest mistake. `aria-labelledby`\n * is read and never written, so the attribute the consumer put there stays\n * exactly as written.\n */\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n\n protected readonly ariaLabel = computed(() => this.label() ?? this.writtenLabel);\n\n /**\n * The icon is decorative when it has no name and meaningful when it has one,\n * which is why there is no `decorative` input: named and hidden cannot both\n * be true.\n */\n protected readonly named = computed(\n () => this.ariaLabel() !== null || this.writtenLabelledBy !== null,\n );\n\n /**\n * `role=\"img\"` requires a name, so it appears only once there is one, and a\n * role the consumer chose is left alone.\n */\n protected readonly role = computed(() =>\n this.writtenRole === null ? (this.named() ? 'img' : null) : this.writtenRole,\n );\n\n protected readonly toneAttribute = computed(() => toneAttribute(this.tone()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAgBA,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;AAiBG;MAsGU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAa;AAC3C;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE3C,MAAM,GAAG,CAAA,SAAA,EAAY,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE,CAAA,CAAE;IAE9C,OAAO,GAAG,cAAc;;AAExB,IAAA,KAAK,GAAG,QAAQ,CACjC,MAAK;AACH,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;QACxB,OAAO,aAAa,CAAC,IAA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BAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,MAAM;AACjB,wBAAA,cAAc,EAAE,EAAE;AAClB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,gBAAgB,EAAE,EAAE;AACpB,wBAAA,kBAAkB,EAAE,gBAAgB;AACpC,wBAAA,kBAAkB,EAAE,iBAAiB;AACrC,wBAAA,yBAAyB,EAAE,2BAA2B;AACtD,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,oBAAoB,EAAE,yBAAyB;AAChD,qBAAA,EAAA,MAAA,EAAA,CAAA,m5DAAA,CAAA,EAAA;;;AC7CH;;AAEG;;"}
@@ -27,8 +27,8 @@ const FALLBACK = {
27
27
  };
28
28
  const IMPORT_EXPORT_CENTER_DEFAULTS = new InjectionToken('slotted import-export-center defaults', { providedIn: 'root', factory: () => FALLBACK });
29
29
  /**
30
- * An application decides once how its job centre reads — the size, the rank,
31
- * how history loads, how time is written and in which zone. A centre that
30
+ * An application decides once how its job center reads — the size, the rank,
31
+ * how history loads, how time is written and in which zone. A center that
32
32
  * states any of them still wins. Its words and the locale come from the
33
33
  * language in force (`provideSlotted`).
34
34
  */
@@ -190,7 +190,7 @@ function sameKeys(a, b) {
190
190
  *
191
191
  * ```html
192
192
  * <ng-template slImportExportJobActions let-job>
193
- * <a slButtonLink size="sm" variant="ghost" [href]="'/jobs/' + job.key">Abrir</a>
193
+ * <a slButtonLink size="sm" variant="ghost" [href]="'/jobs/' + job.key">Open</a>
194
194
  * </ng-template>
195
195
  * ```
196
196
  */
@@ -289,10 +289,10 @@ class SlImportExportCenter {
289
289
  /** Words laid over the catalog of the language in force, key by key. */
290
290
  messages = input(undefined, /* @ts-ignore */
291
291
  ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
292
- /** The view an unbound centre starts on, read once. */
292
+ /** The view an unbound center starts on, read once. */
293
293
  defaultView = input(undefined, /* @ts-ignore */
294
294
  ...(ngDevMode ? [{ debugName: "defaultView" }] : /* istanbul ignore next */ []));
295
- /** The keys an unbound centre starts with shown, read once. */
295
+ /** The keys an unbound center starts with shown, read once. */
296
296
  defaultExpanded = input(undefined, /* @ts-ignore */
297
297
  ...(ngDevMode ? [{ debugName: "defaultExpanded" }] : /* istanbul ignore next */ []));
298
298
  /** The current view. Two-way. */
@@ -340,7 +340,7 @@ class SlImportExportCenter {
340
340
  ...(ngDevMode ? [{ debugName: "localeValue" }] : /* istanbul ignore next */ []));
341
341
  timeZoneValue = computed(() => this.timeZone() ?? this.defaults.timeZone, /* @ts-ignore */
342
342
  ...(ngDevMode ? [{ debugName: "timeZoneValue" }] : /* istanbul ignore next */ []));
343
- /** The family's words in the language in force, with this centre's `messages` laid over them. */
343
+ /** The family's words in the language in force, with this center's `messages` laid over them. */
344
344
  t = injectMessages(importExportCenterMessages, this.messages);
345
345
  labelledBy = computed(() => this.writtenLabel !== null ? null : (this.writtenLabelledBy ?? this.titleId), /* @ts-ignore */
346
346
  ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
@@ -626,7 +626,7 @@ class SlImportExportCenter {
626
626
  });
627
627
  const moved = state.request(next, reason, source);
628
628
  /* The model is the state: written once the request is accepted, which is
629
- what `[(view)]` binds and what an unbound centre keeps. */
629
+ what `[(view)]` binds and what an unbound center keeps. */
630
630
  if (!cancelled && moved)
631
631
  this.view.set(next);
632
632
  }
@@ -1815,16 +1815,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
1815
1815
  }], ctorParameters: () => [], propDecorators: { jobs: [{ type: i0.Input, args: [{ isSignal: true, alias: "jobs", required: true }] }], views: [{ type: i0.Input, args: [{ isSignal: true, alias: "views", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], growing: [{ type: i0.Input, args: [{ isSignal: true, alias: "growing", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], hasMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasMore", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], defaultView: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultView", required: false }] }], defaultExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultExpanded", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], viewRequest: [{ type: i0.Output, args: ["viewRequest"] }], expandedRequest: [{ type: i0.Output, args: ["expandedRequest"] }], cancelRequest: [{ type: i0.Output, args: ["cancelRequest"] }], retryRequest: [{ type: i0.Output, args: ["retryRequest"] }], removeRequest: [{ type: i0.Output, args: ["removeRequest"] }], downloadRequest: [{ type: i0.Output, args: ["downloadRequest"] }], openRequest: [{ type: i0.Output, args: ["openRequest"] }], loadMoreRequest: [{ type: i0.Output, args: ["loadMoreRequest"] }], reloadRequest: [{ type: i0.Output, args: ["reloadRequest"] }], listElement: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }], jobActionsTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SlImportExportJobActions), { isSignal: true }] }] } });
1816
1816
 
1817
1817
  /**
1818
- * A toast that points at a job, for a page that is not the centre: the job
1818
+ * A toast that points at a job, for a page that is not the center: the job
1819
1819
  * started, finished, finished with failed rows, failed. Called once in an
1820
1820
  * injection context where the application keeps its jobs — the shell — so
1821
1821
  * the reader hears of a job that finishes while they work elsewhere.
1822
1822
  *
1823
1823
  * The toast only points. It carries no progress, no cancel and no download;
1824
- * its one action is the consumer's View, which takes the reader to the centre
1824
+ * its one action is the consumer's View, which takes the reader to the center
1825
1825
  * and calls its `reveal(key)`. Its id is the job's key under
1826
1826
  * `import-export-center:`, so the finishing notice replaces the starting one
1827
- * in place. Its announcement is the sentence the centre says for the same
1827
+ * in place. Its announcement is the sentence the center says for the same
1828
1828
  * transition, which the shared announcer does not repeat when both are
1829
1829
  * mounted. The jobs present the first time the signal is read made no move
1830
1830
  * the reader saw, and get no toast.