ngwr 15.4.0 → 15.6.0

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 (678) hide show
  1. package/README.md +3 -4
  2. package/affix/styles/_index.scss +2 -0
  3. package/alert/styles/_index.scss +18 -0
  4. package/anchor/styles/_index.scss +1 -0
  5. package/avatar/styles/_index.scss +44 -4
  6. package/back-top/styles/_index.scss +1 -0
  7. package/badge/styles/_index.scss +1 -0
  8. package/breadcrumbs/styles/_index.scss +1 -0
  9. package/burger/styles/_index.scss +1 -0
  10. package/button/styles/_index.scss +1 -0
  11. package/calendar/styles/_index.scss +1 -0
  12. package/card/styles/_index.scss +1 -0
  13. package/carousel/styles/_index.scss +1 -0
  14. package/cascader/styles/_index.scss +1 -0
  15. package/charts/bar-chart/styles/_index.scss +1 -0
  16. package/charts/boxplot-chart/styles/_index.scss +1 -0
  17. package/charts/bullet-chart/styles/_index.scss +1 -0
  18. package/charts/calendar-heatmap/styles/_index.scss +1 -0
  19. package/charts/candlestick-chart/styles/_index.scss +1 -0
  20. package/charts/chart-legend/styles/_index.scss +1 -0
  21. package/charts/donut-chart/styles/_index.scss +1 -0
  22. package/charts/funnel-chart/styles/_index.scss +1 -0
  23. package/charts/gauge/styles/_index.scss +1 -0
  24. package/charts/heatmap-chart/styles/_index.scss +1 -0
  25. package/charts/line-chart/styles/_index.scss +1 -0
  26. package/charts/meter-group/styles/_index.scss +1 -0
  27. package/charts/radar-chart/styles/_index.scss +1 -0
  28. package/charts/scatter-chart/styles/_index.scss +1 -0
  29. package/charts/sparkline/styles/_index.scss +2 -0
  30. package/charts/treemap-chart/styles/_index.scss +1 -0
  31. package/charts/waterfall-chart/styles/_index.scss +1 -0
  32. package/checkbox/styles/_index.scss +1 -0
  33. package/collapse/styles/_index.scss +1 -0
  34. package/color-picker/styles/_index.scss +1 -0
  35. package/command-palette/styles/_index.scss +1 -0
  36. package/comment/styles/_index.scss +271 -0
  37. package/compare/styles/_index.scss +1 -0
  38. package/context-menu/styles/_index.scss +1 -0
  39. package/counter/styles/_index.scss +1 -0
  40. package/date-picker/styles/_index.scss +1 -0
  41. package/density/styles/_index.scss +2 -0
  42. package/descriptions/styles/_index.scss +1 -0
  43. package/dialog/styles/_index.scss +7 -0
  44. package/divider/styles/_index.scss +1 -0
  45. package/drawer/styles/_index.scss +1 -0
  46. package/dropdown/styles/_index.scss +1 -0
  47. package/editor/styles/_index.scss +1 -0
  48. package/empty/styles/_index.scss +1 -0
  49. package/event-calendar/styles/_index.scss +1 -0
  50. package/fesm2022/ngwr-affix.mjs +2 -0
  51. package/fesm2022/ngwr-affix.mjs.map +1 -1
  52. package/fesm2022/ngwr-alert.mjs +7 -3
  53. package/fesm2022/ngwr-alert.mjs.map +1 -1
  54. package/fesm2022/ngwr-anchor.mjs +2 -0
  55. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  56. package/fesm2022/ngwr-avatar.mjs +71 -6
  57. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  58. package/fesm2022/ngwr-back-top.mjs +2 -0
  59. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  60. package/fesm2022/ngwr-badge.mjs +9 -0
  61. package/fesm2022/ngwr-badge.mjs.map +1 -1
  62. package/fesm2022/ngwr-breadcrumbs.mjs +7 -2
  63. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  64. package/fesm2022/ngwr-burger.mjs +5 -0
  65. package/fesm2022/ngwr-burger.mjs.map +1 -1
  66. package/fesm2022/ngwr-button.mjs +6 -0
  67. package/fesm2022/ngwr-button.mjs.map +1 -1
  68. package/fesm2022/ngwr-calendar.mjs +2 -0
  69. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  70. package/fesm2022/ngwr-card.mjs +11 -2
  71. package/fesm2022/ngwr-card.mjs.map +1 -1
  72. package/fesm2022/ngwr-carousel.mjs +6 -0
  73. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  74. package/fesm2022/ngwr-cascader.mjs +3 -3
  75. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-bar-chart.mjs +2 -1
  77. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-boxplot-chart.mjs +2 -0
  79. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-bullet-chart.mjs +2 -1
  81. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +2 -0
  83. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +2 -1
  85. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  86. package/fesm2022/ngwr-charts-chart-legend.mjs +9 -0
  87. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -0
  89. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  90. package/fesm2022/ngwr-charts-funnel-chart.mjs +5 -1
  91. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  92. package/fesm2022/ngwr-charts-gauge.mjs +5 -1
  93. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  94. package/fesm2022/ngwr-charts-heatmap-chart.mjs +2 -1
  95. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  96. package/fesm2022/ngwr-charts-line-chart.mjs +2 -1
  97. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  98. package/fesm2022/ngwr-charts-meter-group.mjs +5 -0
  99. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  100. package/fesm2022/ngwr-charts-radar-chart.mjs +2 -1
  101. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  102. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -1
  103. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  104. package/fesm2022/ngwr-charts-sparkline.mjs +5 -0
  105. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  106. package/fesm2022/ngwr-charts-treemap-chart.mjs +2 -0
  107. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  108. package/fesm2022/ngwr-charts-waterfall-chart.mjs +2 -0
  109. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  110. package/fesm2022/ngwr-checkbox.mjs +9 -1
  111. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  112. package/fesm2022/ngwr-collapse.mjs +11 -2
  113. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  114. package/fesm2022/ngwr-color-picker.mjs +3 -1
  115. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  116. package/fesm2022/ngwr-command-palette.mjs +2 -1
  117. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  118. package/fesm2022/ngwr-comment-testing.mjs +60 -0
  119. package/fesm2022/ngwr-comment-testing.mjs.map +1 -0
  120. package/fesm2022/ngwr-comment.mjs +524 -0
  121. package/fesm2022/ngwr-comment.mjs.map +1 -0
  122. package/fesm2022/ngwr-compare.mjs +2 -1
  123. package/fesm2022/ngwr-compare.mjs.map +1 -1
  124. package/fesm2022/ngwr-context-menu.mjs +12 -2
  125. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  126. package/fesm2022/ngwr-counter.mjs +17 -23
  127. package/fesm2022/ngwr-counter.mjs.map +1 -1
  128. package/fesm2022/ngwr-date-picker.mjs +17 -2
  129. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  130. package/fesm2022/ngwr-density.mjs +2 -1
  131. package/fesm2022/ngwr-density.mjs.map +1 -1
  132. package/fesm2022/ngwr-descriptions.mjs +9 -0
  133. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  134. package/fesm2022/ngwr-dialog-testing.mjs +14 -0
  135. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-dialog.mjs +315 -136
  137. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  138. package/fesm2022/ngwr-directives.mjs +7 -4
  139. package/fesm2022/ngwr-directives.mjs.map +1 -1
  140. package/fesm2022/ngwr-divider.mjs +2 -0
  141. package/fesm2022/ngwr-divider.mjs.map +1 -1
  142. package/fesm2022/ngwr-drawer.mjs +22 -3
  143. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  144. package/fesm2022/ngwr-dropdown.mjs +11 -2
  145. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  146. package/fesm2022/ngwr-editor.mjs +3 -2
  147. package/fesm2022/ngwr-editor.mjs.map +1 -1
  148. package/fesm2022/ngwr-empty.mjs +5 -0
  149. package/fesm2022/ngwr-empty.mjs.map +1 -1
  150. package/fesm2022/ngwr-event-calendar.mjs +5 -1
  151. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  152. package/fesm2022/ngwr-file-upload.mjs +2 -1
  153. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  154. package/fesm2022/ngwr-form.mjs +10 -0
  155. package/fesm2022/ngwr-form.mjs.map +1 -1
  156. package/fesm2022/ngwr-graph.mjs +2 -1
  157. package/fesm2022/ngwr-graph.mjs.map +1 -1
  158. package/fesm2022/ngwr-hotkey.mjs +86 -6
  159. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-ar.mjs +22 -3
  161. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-cs.mjs +22 -3
  163. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-de.mjs +22 -3
  165. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-en.mjs +22 -3
  167. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-es.mjs +22 -3
  169. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-fr.mjs +22 -3
  171. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-he.mjs +22 -3
  173. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-hi.mjs +22 -3
  175. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-id.mjs +22 -3
  177. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-it.mjs +22 -3
  179. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-ja.mjs +22 -3
  181. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-ko.mjs +22 -3
  183. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-nl.mjs +22 -3
  185. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-pl.mjs +22 -3
  187. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-pt.mjs +22 -3
  189. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-ru.mjs +22 -3
  191. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-sv.mjs +22 -3
  193. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-tr.mjs +22 -3
  195. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n-uk.mjs +22 -3
  197. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  198. package/fesm2022/ngwr-i18n-vi.mjs +22 -3
  199. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  200. package/fesm2022/ngwr-i18n-zh-tw.mjs +22 -3
  201. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  202. package/fesm2022/ngwr-i18n-zh.mjs +22 -3
  203. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  204. package/fesm2022/ngwr-icon.mjs +2 -0
  205. package/fesm2022/ngwr-icon.mjs.map +1 -1
  206. package/fesm2022/ngwr-image-cropper.mjs +2 -1
  207. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  208. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  209. package/fesm2022/ngwr-input-number.mjs +110 -12
  210. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  211. package/fesm2022/ngwr-input-otp.mjs +2 -1
  212. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  213. package/fesm2022/ngwr-input.mjs +20 -2
  214. package/fesm2022/ngwr-input.mjs.map +1 -1
  215. package/fesm2022/ngwr-keyboard.mjs +79 -18
  216. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  217. package/fesm2022/ngwr-knob.mjs +5 -1
  218. package/fesm2022/ngwr-knob.mjs.map +1 -1
  219. package/fesm2022/ngwr-layout.mjs +21 -3
  220. package/fesm2022/ngwr-layout.mjs.map +1 -1
  221. package/fesm2022/ngwr-lightbox.mjs +3 -3
  222. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  223. package/fesm2022/ngwr-list.mjs +7 -2
  224. package/fesm2022/ngwr-list.mjs.map +1 -1
  225. package/fesm2022/ngwr-load-state-testing.mjs +43 -0
  226. package/fesm2022/ngwr-load-state-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-load-state.mjs +495 -0
  228. package/fesm2022/ngwr-load-state.mjs.map +1 -0
  229. package/fesm2022/ngwr-mention.mjs +48 -20
  230. package/fesm2022/ngwr-mention.mjs.map +1 -1
  231. package/fesm2022/ngwr-page-header.mjs +49 -2
  232. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  233. package/fesm2022/ngwr-pagination.mjs +3 -1
  234. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  235. package/fesm2022/ngwr-pipes.mjs +40 -1
  236. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  237. package/fesm2022/ngwr-platform.mjs +134 -2
  238. package/fesm2022/ngwr-platform.mjs.map +1 -1
  239. package/fesm2022/ngwr-popconfirm.mjs +6 -1
  240. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  241. package/fesm2022/ngwr-popover.mjs +10 -1
  242. package/fesm2022/ngwr-popover.mjs.map +1 -1
  243. package/fesm2022/ngwr-progress.mjs +5 -0
  244. package/fesm2022/ngwr-progress.mjs.map +1 -1
  245. package/fesm2022/ngwr-pull-to-refresh.mjs +2 -1
  246. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  247. package/fesm2022/ngwr-qr.mjs +2 -1
  248. package/fesm2022/ngwr-qr.mjs.map +1 -1
  249. package/fesm2022/ngwr-radio.mjs +6 -1
  250. package/fesm2022/ngwr-radio.mjs.map +1 -1
  251. package/fesm2022/ngwr-rating.mjs +5 -1
  252. package/fesm2022/ngwr-rating.mjs.map +1 -1
  253. package/fesm2022/ngwr-result.mjs +17 -0
  254. package/fesm2022/ngwr-result.mjs.map +1 -1
  255. package/fesm2022/ngwr-schema-form.mjs +9 -2
  256. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  257. package/fesm2022/ngwr-segmented.mjs +2 -0
  258. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  259. package/fesm2022/ngwr-select.mjs +65 -17
  260. package/fesm2022/ngwr-select.mjs.map +1 -1
  261. package/fesm2022/ngwr-sidebar.mjs +2 -0
  262. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  263. package/fesm2022/ngwr-skeleton.mjs +30 -5
  264. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  265. package/fesm2022/ngwr-slider.mjs +26 -4
  266. package/fesm2022/ngwr-slider.mjs.map +1 -1
  267. package/fesm2022/ngwr-sortable-list.mjs +9 -3
  268. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  269. package/fesm2022/ngwr-speed-dial.mjs +2 -0
  270. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  271. package/fesm2022/ngwr-spinner.mjs +5 -0
  272. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  273. package/fesm2022/ngwr-splitter.mjs +2 -1
  274. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  275. package/fesm2022/ngwr-statistic.mjs +7 -1
  276. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  277. package/fesm2022/ngwr-stepper.mjs +6 -0
  278. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  279. package/fesm2022/ngwr-storage.mjs +54 -33
  280. package/fesm2022/ngwr-storage.mjs.map +1 -1
  281. package/fesm2022/ngwr-switch.mjs +5 -1
  282. package/fesm2022/ngwr-switch.mjs.map +1 -1
  283. package/fesm2022/ngwr-table.mjs +153 -39
  284. package/fesm2022/ngwr-table.mjs.map +1 -1
  285. package/fesm2022/ngwr-tabs.mjs +3 -1
  286. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  287. package/fesm2022/ngwr-textarea.mjs +2 -0
  288. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  289. package/fesm2022/ngwr-timeline.mjs +9 -0
  290. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  291. package/fesm2022/ngwr-toast.mjs +6 -1
  292. package/fesm2022/ngwr-toast.mjs.map +1 -1
  293. package/fesm2022/ngwr-toolbar.mjs +5 -0
  294. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  295. package/fesm2022/ngwr-tour.mjs +6 -2
  296. package/fesm2022/ngwr-tour.mjs.map +1 -1
  297. package/fesm2022/ngwr-transfer.mjs +6 -1
  298. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  299. package/fesm2022/ngwr-tree.mjs +2 -1
  300. package/fesm2022/ngwr-tree.mjs.map +1 -1
  301. package/fesm2022/ngwr-typography.mjs +5 -0
  302. package/fesm2022/ngwr-typography.mjs.map +1 -1
  303. package/fesm2022/ngwr-utils-router.mjs +165 -0
  304. package/fesm2022/ngwr-utils-router.mjs.map +1 -0
  305. package/fesm2022/ngwr-utils.mjs +374 -3
  306. package/fesm2022/ngwr-utils.mjs.map +1 -1
  307. package/fesm2022/ngwr-version.mjs +1 -1
  308. package/fesm2022/ngwr-version.mjs.map +1 -1
  309. package/fesm2022/ngwr-window.mjs +4 -1
  310. package/fesm2022/ngwr-window.mjs.map +1 -1
  311. package/file-upload/styles/_index.scss +1 -0
  312. package/form/styles/_index.scss +1 -0
  313. package/graph/styles/_index.scss +1 -0
  314. package/i18n/ar.json +22 -3
  315. package/i18n/cs.json +22 -3
  316. package/i18n/de.json +22 -3
  317. package/i18n/en.json +22 -3
  318. package/i18n/es.json +22 -3
  319. package/i18n/fr.json +22 -3
  320. package/i18n/he.json +22 -3
  321. package/i18n/hi.json +22 -3
  322. package/i18n/id.json +22 -3
  323. package/i18n/it.json +22 -3
  324. package/i18n/ja.json +22 -3
  325. package/i18n/ko.json +22 -3
  326. package/i18n/nl.json +22 -3
  327. package/i18n/pl.json +22 -3
  328. package/i18n/pt.json +22 -3
  329. package/i18n/ru.json +22 -3
  330. package/i18n/sv.json +22 -3
  331. package/i18n/tr.json +22 -3
  332. package/i18n/uk.json +22 -3
  333. package/i18n/vi.json +22 -3
  334. package/i18n/zh-TW.json +22 -3
  335. package/i18n/zh.json +22 -3
  336. package/icon/styles/_index.scss +1 -0
  337. package/image-cropper/styles/_index.scss +1 -0
  338. package/input/styles/_index.scss +1 -0
  339. package/input-number/styles/_index.scss +1 -0
  340. package/input-otp/styles/_index.scss +1 -0
  341. package/keyboard/styles/_index.scss +1 -0
  342. package/knob/styles/_index.scss +1 -0
  343. package/layout/styles/_index.scss +1 -0
  344. package/lightbox/styles/_index.scss +1 -0
  345. package/list/styles/_index.scss +1 -0
  346. package/llms-full.txt +45 -279
  347. package/llms.txt +16 -16
  348. package/load-state/styles/_index.scss +49 -0
  349. package/loading-bar/styles/_index.scss +1 -0
  350. package/mcp/catalog.js +3 -3
  351. package/mention/styles/_index.scss +1 -0
  352. package/package.json +23 -212
  353. package/page-header/styles/_index.scss +82 -0
  354. package/pagination/styles/_index.scss +1 -0
  355. package/popconfirm/styles/_index.scss +1 -0
  356. package/popover/styles/_index.scss +1 -0
  357. package/progress/styles/_index.scss +1 -0
  358. package/pull-to-refresh/styles/_index.scss +1 -0
  359. package/qr/styles/_index.scss +1 -0
  360. package/radio/styles/_index.scss +1 -0
  361. package/rating/styles/_index.scss +1 -0
  362. package/result/styles/_index.scss +1 -0
  363. package/schema-form/styles/_index.scss +1 -0
  364. package/schematics/component-style/index.js +1 -1
  365. package/schematics/component-style/schema.json +1 -1
  366. package/schematics/use/rule.js +0 -1
  367. package/schematics/use/symbol-map.json +8 -28
  368. package/schematics/utility/global-styles.js +3 -3
  369. package/segmented/styles/_index.scss +1 -0
  370. package/select/styles/_index.scss +1 -0
  371. package/sidebar/styles/_index.scss +1 -0
  372. package/skeleton/styles/_index.scss +65 -29
  373. package/skills/ngwr/SKILL.md +3 -4
  374. package/skills/ngwr/references/catalog.md +5 -47
  375. package/skills/ngwr/references/setup.md +1 -2
  376. package/slider/styles/_index.scss +1 -0
  377. package/sortable-list/styles/_index.scss +1 -0
  378. package/speed-dial/styles/_index.scss +1 -0
  379. package/spinner/styles/_index.scss +1 -0
  380. package/splitter/styles/_index.scss +1 -0
  381. package/statistic/styles/_index.scss +1 -0
  382. package/stepper/styles/_index.scss +1 -0
  383. package/styles/_animations.scss +0 -4
  384. package/switch/styles/_index.scss +1 -0
  385. package/table/styles/_index.scss +18 -0
  386. package/tabs/styles/_index.scss +1 -0
  387. package/textarea/styles/_index.scss +1 -0
  388. package/theme/styles/_focus.scss +0 -6
  389. package/theme/styles/_index.scss +6 -0
  390. package/theme/styles/_loaded.scss +29 -0
  391. package/theme/styles/_motion.scss +1 -0
  392. package/timeline/styles/_index.scss +1 -0
  393. package/toast/styles/_index.scss +1 -0
  394. package/toolbar/styles/_index.scss +1 -0
  395. package/tour/styles/_index.scss +1 -0
  396. package/transfer/styles/_index.scss +1 -0
  397. package/tree/styles/_index.scss +1 -0
  398. package/types/ngwr-alert.d.ts +10 -1
  399. package/types/ngwr-avatar.d.ts +49 -0
  400. package/types/ngwr-badge.d.ts +4 -2
  401. package/types/ngwr-breadcrumbs.d.ts +1 -0
  402. package/types/ngwr-burger.d.ts +1 -0
  403. package/types/ngwr-button.d.ts +2 -1
  404. package/types/ngwr-card.d.ts +2 -0
  405. package/types/ngwr-carousel.d.ts +3 -3
  406. package/types/ngwr-charts-chart-legend.d.ts +1 -0
  407. package/types/ngwr-charts-donut-chart.d.ts +1 -0
  408. package/types/ngwr-charts-funnel-chart.d.ts +1 -0
  409. package/types/ngwr-charts-gauge.d.ts +1 -0
  410. package/types/ngwr-charts-meter-group.d.ts +1 -0
  411. package/types/ngwr-charts-scatter-chart.d.ts +1 -0
  412. package/types/ngwr-charts-sparkline.d.ts +1 -0
  413. package/types/ngwr-checkbox.d.ts +2 -0
  414. package/types/ngwr-collapse.d.ts +2 -0
  415. package/types/ngwr-comment-testing.d.ts +90 -0
  416. package/types/ngwr-comment.d.ts +306 -0
  417. package/types/ngwr-compare.d.ts +1 -1
  418. package/types/ngwr-context-menu.d.ts +2 -0
  419. package/types/ngwr-counter.d.ts +12 -8
  420. package/types/ngwr-descriptions.d.ts +2 -0
  421. package/types/ngwr-dialog-testing.d.ts +7 -0
  422. package/types/ngwr-dialog.d.ts +113 -6
  423. package/types/ngwr-directives.d.ts +7 -3
  424. package/types/ngwr-divider.d.ts +1 -1
  425. package/types/ngwr-drawer.d.ts +5 -1
  426. package/types/ngwr-dropdown.d.ts +16 -3
  427. package/types/ngwr-empty.d.ts +1 -0
  428. package/types/ngwr-event-calendar.d.ts +1 -0
  429. package/types/ngwr-form.d.ts +2 -0
  430. package/types/ngwr-hotkey.d.ts +60 -3
  431. package/types/ngwr-image-cropper.d.ts +1 -1
  432. package/types/ngwr-input-number-testing.d.ts +5 -0
  433. package/types/ngwr-input-number.d.ts +91 -12
  434. package/types/ngwr-input.d.ts +4 -0
  435. package/types/ngwr-keyboard.d.ts +28 -1
  436. package/types/ngwr-knob.d.ts +1 -0
  437. package/types/ngwr-layout.d.ts +4 -0
  438. package/types/ngwr-list.d.ts +1 -0
  439. package/types/ngwr-load-state-testing.d.ts +65 -0
  440. package/types/ngwr-load-state.d.ts +269 -0
  441. package/types/ngwr-mention.d.ts +27 -7
  442. package/types/ngwr-page-header.d.ts +60 -8
  443. package/types/ngwr-pipes.d.ts +19 -0
  444. package/types/ngwr-platform.d.ts +73 -7
  445. package/types/ngwr-popconfirm.d.ts +3 -2
  446. package/types/ngwr-progress.d.ts +2 -1
  447. package/types/ngwr-radio.d.ts +1 -0
  448. package/types/ngwr-rating.d.ts +1 -0
  449. package/types/ngwr-result.d.ts +4 -0
  450. package/types/ngwr-schema-form.d.ts +1 -0
  451. package/types/ngwr-select.d.ts +75 -27
  452. package/types/ngwr-skeleton.d.ts +22 -2
  453. package/types/ngwr-slider.d.ts +21 -0
  454. package/types/ngwr-sortable-list.d.ts +2 -1
  455. package/types/ngwr-spinner.d.ts +1 -0
  456. package/types/ngwr-splitter.d.ts +1 -1
  457. package/types/ngwr-statistic.d.ts +1 -0
  458. package/types/ngwr-stepper.d.ts +2 -1
  459. package/types/ngwr-storage.d.ts +33 -3
  460. package/types/ngwr-switch.d.ts +1 -0
  461. package/types/ngwr-table.d.ts +181 -45
  462. package/types/ngwr-timeline.d.ts +3 -1
  463. package/types/ngwr-toolbar.d.ts +1 -0
  464. package/types/ngwr-tour.d.ts +1 -0
  465. package/types/ngwr-transfer.d.ts +1 -0
  466. package/types/ngwr-typography.d.ts +1 -0
  467. package/types/ngwr-utils-router.d.ts +95 -0
  468. package/types/ngwr-utils.d.ts +339 -2
  469. package/types/ngwr-version.d.ts +1 -1
  470. package/typography/styles/_index.scss +1 -0
  471. package/virtual-scroll/styles/_index.scss +1 -0
  472. package/window/styles/_index.scss +1 -0
  473. package/bits/aurora/aurora.scss +0 -1
  474. package/bits/aurora/styles/_index.scss +0 -8
  475. package/bits/aurora/styles/_rules.scss +0 -36
  476. package/bits/blur-text/blur-text.scss +0 -1
  477. package/bits/blur-text/styles/_index.scss +0 -27
  478. package/bits/border-glow/border-glow.scss +0 -4
  479. package/bits/border-glow/styles/_index.scss +0 -15
  480. package/bits/border-glow/styles/_rules.scss +0 -259
  481. package/bits/circular-text/circular-text.scss +0 -1
  482. package/bits/circular-text/styles/_index.scss +0 -15
  483. package/bits/circular-text/styles/_rules.scss +0 -60
  484. package/bits/click-spark/click-spark.scss +0 -5
  485. package/bits/click-spark/styles/_index.scss +0 -11
  486. package/bits/click-spark/styles/_rules.scss +0 -20
  487. package/bits/decrypt-text/decrypt-text.scss +0 -1
  488. package/bits/decrypt-text/styles/_index.scss +0 -15
  489. package/bits/decrypt-text/styles/_rules.scss +0 -40
  490. package/bits/dot-grid/dot-grid.scss +0 -1
  491. package/bits/dot-grid/styles/_index.scss +0 -8
  492. package/bits/dot-grid/styles/_rules.scss +0 -54
  493. package/bits/falling-text/falling-text.scss +0 -1
  494. package/bits/falling-text/styles/_index.scss +0 -15
  495. package/bits/falling-text/styles/_rules.scss +0 -44
  496. package/bits/glitch-text/glitch-text.scss +0 -1
  497. package/bits/glitch-text/styles/_index.scss +0 -15
  498. package/bits/glitch-text/styles/_rules.scss +0 -161
  499. package/bits/gradient-text/gradient-text.scss +0 -1
  500. package/bits/gradient-text/styles/_index.scss +0 -15
  501. package/bits/gradient-text/styles/_rules.scss +0 -118
  502. package/bits/iridescence/iridescence.scss +0 -1
  503. package/bits/iridescence/styles/_index.scss +0 -8
  504. package/bits/iridescence/styles/_rules.scss +0 -72
  505. package/bits/marquee/marquee.scss +0 -1
  506. package/bits/marquee/styles/_index.scss +0 -15
  507. package/bits/marquee/styles/_rules.scss +0 -203
  508. package/bits/ripple-grid/ripple-grid.scss +0 -1
  509. package/bits/ripple-grid/styles/_index.scss +0 -8
  510. package/bits/ripple-grid/styles/_rules.scss +0 -63
  511. package/bits/rotating-text/rotating-text.scss +0 -1
  512. package/bits/rotating-text/styles/_index.scss +0 -39
  513. package/bits/shiny-text/shiny-text.scss +0 -1
  514. package/bits/shiny-text/styles/_index.scss +0 -15
  515. package/bits/shiny-text/styles/_rules.scss +0 -121
  516. package/bits/splash-cursor/splash-cursor.scss +0 -1
  517. package/bits/splash-cursor/styles/_index.scss +0 -28
  518. package/bits/split-text/split-text.scss +0 -1
  519. package/bits/split-text/styles/_index.scss +0 -35
  520. package/bits/spotlight-card/spotlight-card.scss +0 -1
  521. package/bits/spotlight-card/styles/_index.scss +0 -15
  522. package/bits/spotlight-card/styles/_rules.scss +0 -52
  523. package/bits/star-border/star-border.scss +0 -1
  524. package/bits/star-border/styles/_index.scss +0 -15
  525. package/bits/star-border/styles/_rules.scss +0 -126
  526. package/bits/threads/styles/_index.scss +0 -8
  527. package/bits/threads/styles/_rules.scss +0 -76
  528. package/bits/threads/threads.scss +0 -1
  529. package/bits/tilt-card/styles/_index.scss +0 -15
  530. package/bits/tilt-card/styles/_rules.scss +0 -56
  531. package/bits/tilt-card/tilt-card.scss +0 -1
  532. package/bits/typewriter/styles/_index.scss +0 -15
  533. package/bits/typewriter/styles/_rules.scss +0 -45
  534. package/bits/typewriter/typewriter.scss +0 -1
  535. package/bits/waves/styles/_index.scss +0 -15
  536. package/bits/waves/styles/_rules.scss +0 -54
  537. package/bits/waves/waves.scss +0 -1
  538. package/fesm2022/ngwr-bits-aurora.mjs +0 -461
  539. package/fesm2022/ngwr-bits-aurora.mjs.map +0 -1
  540. package/fesm2022/ngwr-bits-blur-text-testing.mjs +0 -49
  541. package/fesm2022/ngwr-bits-blur-text-testing.mjs.map +0 -1
  542. package/fesm2022/ngwr-bits-blur-text.mjs +0 -337
  543. package/fesm2022/ngwr-bits-blur-text.mjs.map +0 -1
  544. package/fesm2022/ngwr-bits-border-glow-testing.mjs +0 -147
  545. package/fesm2022/ngwr-bits-border-glow-testing.mjs.map +0 -1
  546. package/fesm2022/ngwr-bits-border-glow.mjs +0 -561
  547. package/fesm2022/ngwr-bits-border-glow.mjs.map +0 -1
  548. package/fesm2022/ngwr-bits-circular-text-testing.mjs +0 -63
  549. package/fesm2022/ngwr-bits-circular-text-testing.mjs.map +0 -1
  550. package/fesm2022/ngwr-bits-circular-text.mjs +0 -228
  551. package/fesm2022/ngwr-bits-circular-text.mjs.map +0 -1
  552. package/fesm2022/ngwr-bits-click-spark.mjs +0 -304
  553. package/fesm2022/ngwr-bits-click-spark.mjs.map +0 -1
  554. package/fesm2022/ngwr-bits-confetti.mjs +0 -175
  555. package/fesm2022/ngwr-bits-confetti.mjs.map +0 -1
  556. package/fesm2022/ngwr-bits-decrypt-text-testing.mjs +0 -62
  557. package/fesm2022/ngwr-bits-decrypt-text-testing.mjs.map +0 -1
  558. package/fesm2022/ngwr-bits-decrypt-text.mjs +0 -525
  559. package/fesm2022/ngwr-bits-decrypt-text.mjs.map +0 -1
  560. package/fesm2022/ngwr-bits-dot-grid-testing.mjs +0 -40
  561. package/fesm2022/ngwr-bits-dot-grid-testing.mjs.map +0 -1
  562. package/fesm2022/ngwr-bits-dot-grid.mjs +0 -479
  563. package/fesm2022/ngwr-bits-dot-grid.mjs.map +0 -1
  564. package/fesm2022/ngwr-bits-falling-text-testing.mjs +0 -56
  565. package/fesm2022/ngwr-bits-falling-text-testing.mjs.map +0 -1
  566. package/fesm2022/ngwr-bits-falling-text.mjs +0 -418
  567. package/fesm2022/ngwr-bits-falling-text.mjs.map +0 -1
  568. package/fesm2022/ngwr-bits-fuzzy-text-testing.mjs +0 -38
  569. package/fesm2022/ngwr-bits-fuzzy-text-testing.mjs.map +0 -1
  570. package/fesm2022/ngwr-bits-fuzzy-text.mjs +0 -715
  571. package/fesm2022/ngwr-bits-fuzzy-text.mjs.map +0 -1
  572. package/fesm2022/ngwr-bits-glitch-text-testing.mjs +0 -63
  573. package/fesm2022/ngwr-bits-glitch-text-testing.mjs.map +0 -1
  574. package/fesm2022/ngwr-bits-glitch-text.mjs +0 -172
  575. package/fesm2022/ngwr-bits-glitch-text.mjs.map +0 -1
  576. package/fesm2022/ngwr-bits-gradient-text-testing.mjs +0 -89
  577. package/fesm2022/ngwr-bits-gradient-text-testing.mjs.map +0 -1
  578. package/fesm2022/ngwr-bits-gradient-text.mjs +0 -217
  579. package/fesm2022/ngwr-bits-gradient-text.mjs.map +0 -1
  580. package/fesm2022/ngwr-bits-iridescence-testing.mjs +0 -31
  581. package/fesm2022/ngwr-bits-iridescence-testing.mjs.map +0 -1
  582. package/fesm2022/ngwr-bits-iridescence.mjs +0 -591
  583. package/fesm2022/ngwr-bits-iridescence.mjs.map +0 -1
  584. package/fesm2022/ngwr-bits-marquee-testing.mjs +0 -126
  585. package/fesm2022/ngwr-bits-marquee-testing.mjs.map +0 -1
  586. package/fesm2022/ngwr-bits-marquee.mjs +0 -451
  587. package/fesm2022/ngwr-bits-marquee.mjs.map +0 -1
  588. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs +0 -40
  589. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs.map +0 -1
  590. package/fesm2022/ngwr-bits-ripple-grid.mjs +0 -806
  591. package/fesm2022/ngwr-bits-ripple-grid.mjs.map +0 -1
  592. package/fesm2022/ngwr-bits-rotating-text-testing.mjs +0 -50
  593. package/fesm2022/ngwr-bits-rotating-text-testing.mjs.map +0 -1
  594. package/fesm2022/ngwr-bits-rotating-text.mjs +0 -413
  595. package/fesm2022/ngwr-bits-rotating-text.mjs.map +0 -1
  596. package/fesm2022/ngwr-bits-shiny-text-testing.mjs +0 -92
  597. package/fesm2022/ngwr-bits-shiny-text-testing.mjs.map +0 -1
  598. package/fesm2022/ngwr-bits-shiny-text.mjs +0 -315
  599. package/fesm2022/ngwr-bits-shiny-text.mjs.map +0 -1
  600. package/fesm2022/ngwr-bits-splash-cursor-testing.mjs +0 -25
  601. package/fesm2022/ngwr-bits-splash-cursor-testing.mjs.map +0 -1
  602. package/fesm2022/ngwr-bits-splash-cursor.mjs +0 -1282
  603. package/fesm2022/ngwr-bits-splash-cursor.mjs.map +0 -1
  604. package/fesm2022/ngwr-bits-split-text-testing.mjs +0 -54
  605. package/fesm2022/ngwr-bits-split-text-testing.mjs.map +0 -1
  606. package/fesm2022/ngwr-bits-split-text.mjs +0 -378
  607. package/fesm2022/ngwr-bits-split-text.mjs.map +0 -1
  608. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs +0 -113
  609. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs.map +0 -1
  610. package/fesm2022/ngwr-bits-spotlight-card.mjs +0 -228
  611. package/fesm2022/ngwr-bits-spotlight-card.mjs.map +0 -1
  612. package/fesm2022/ngwr-bits-star-border-testing.mjs +0 -57
  613. package/fesm2022/ngwr-bits-star-border-testing.mjs.map +0 -1
  614. package/fesm2022/ngwr-bits-star-border.mjs +0 -162
  615. package/fesm2022/ngwr-bits-star-border.mjs.map +0 -1
  616. package/fesm2022/ngwr-bits-threads-testing.mjs +0 -41
  617. package/fesm2022/ngwr-bits-threads-testing.mjs.map +0 -1
  618. package/fesm2022/ngwr-bits-threads.mjs +0 -482
  619. package/fesm2022/ngwr-bits-threads.mjs.map +0 -1
  620. package/fesm2022/ngwr-bits-tilt-card-testing.mjs +0 -83
  621. package/fesm2022/ngwr-bits-tilt-card-testing.mjs.map +0 -1
  622. package/fesm2022/ngwr-bits-tilt-card.mjs +0 -260
  623. package/fesm2022/ngwr-bits-tilt-card.mjs.map +0 -1
  624. package/fesm2022/ngwr-bits-typewriter-testing.mjs +0 -61
  625. package/fesm2022/ngwr-bits-typewriter-testing.mjs.map +0 -1
  626. package/fesm2022/ngwr-bits-typewriter.mjs +0 -469
  627. package/fesm2022/ngwr-bits-typewriter.mjs.map +0 -1
  628. package/fesm2022/ngwr-bits-waves-testing.mjs +0 -37
  629. package/fesm2022/ngwr-bits-waves-testing.mjs.map +0 -1
  630. package/fesm2022/ngwr-bits-waves.mjs +0 -865
  631. package/fesm2022/ngwr-bits-waves.mjs.map +0 -1
  632. package/types/ngwr-bits-aurora.d.ts +0 -114
  633. package/types/ngwr-bits-blur-text-testing.d.ts +0 -162
  634. package/types/ngwr-bits-blur-text.d.ts +0 -135
  635. package/types/ngwr-bits-border-glow-testing.d.ts +0 -230
  636. package/types/ngwr-bits-border-glow.d.ts +0 -166
  637. package/types/ngwr-bits-circular-text-testing.d.ts +0 -178
  638. package/types/ngwr-bits-circular-text.d.ts +0 -70
  639. package/types/ngwr-bits-click-spark.d.ts +0 -101
  640. package/types/ngwr-bits-confetti.d.ts +0 -80
  641. package/types/ngwr-bits-decrypt-text-testing.d.ts +0 -204
  642. package/types/ngwr-bits-decrypt-text.d.ts +0 -135
  643. package/types/ngwr-bits-dot-grid-testing.d.ts +0 -92
  644. package/types/ngwr-bits-dot-grid.d.ts +0 -158
  645. package/types/ngwr-bits-falling-text-testing.d.ts +0 -170
  646. package/types/ngwr-bits-falling-text.d.ts +0 -95
  647. package/types/ngwr-bits-fuzzy-text-testing.d.ts +0 -112
  648. package/types/ngwr-bits-fuzzy-text.d.ts +0 -208
  649. package/types/ngwr-bits-glitch-text-testing.d.ts +0 -183
  650. package/types/ngwr-bits-glitch-text.d.ts +0 -60
  651. package/types/ngwr-bits-gradient-text-testing.d.ts +0 -168
  652. package/types/ngwr-bits-gradient-text.d.ts +0 -73
  653. package/types/ngwr-bits-iridescence-testing.d.ts +0 -85
  654. package/types/ngwr-bits-iridescence.d.ts +0 -244
  655. package/types/ngwr-bits-marquee-testing.d.ts +0 -266
  656. package/types/ngwr-bits-marquee.d.ts +0 -188
  657. package/types/ngwr-bits-ripple-grid-testing.d.ts +0 -96
  658. package/types/ngwr-bits-ripple-grid.d.ts +0 -299
  659. package/types/ngwr-bits-rotating-text-testing.d.ts +0 -173
  660. package/types/ngwr-bits-rotating-text.d.ts +0 -127
  661. package/types/ngwr-bits-shiny-text-testing.d.ts +0 -147
  662. package/types/ngwr-bits-shiny-text.d.ts +0 -131
  663. package/types/ngwr-bits-splash-cursor-testing.d.ts +0 -77
  664. package/types/ngwr-bits-splash-cursor.d.ts +0 -162
  665. package/types/ngwr-bits-split-text-testing.d.ts +0 -191
  666. package/types/ngwr-bits-split-text.d.ts +0 -163
  667. package/types/ngwr-bits-spotlight-card-testing.d.ts +0 -279
  668. package/types/ngwr-bits-spotlight-card.d.ts +0 -94
  669. package/types/ngwr-bits-star-border-testing.d.ts +0 -117
  670. package/types/ngwr-bits-star-border.d.ts +0 -62
  671. package/types/ngwr-bits-threads-testing.d.ts +0 -97
  672. package/types/ngwr-bits-threads.d.ts +0 -216
  673. package/types/ngwr-bits-tilt-card-testing.d.ts +0 -140
  674. package/types/ngwr-bits-tilt-card.d.ts +0 -94
  675. package/types/ngwr-bits-typewriter-testing.d.ts +0 -201
  676. package/types/ngwr-bits-typewriter.d.ts +0 -165
  677. package/types/ngwr-bits-waves-testing.d.ts +0 -103
  678. package/types/ngwr-bits-waves.d.ts +0 -142
@@ -0,0 +1,271 @@
1
+ @use '../../theme/styles' as theme;
2
+
3
+ // Styles for the entry points this component's own markup renders.
4
+ //
5
+ // v15 removed the `@use 'ngwr'` umbrella: a consumer writes one `@use` per
6
+ // component they place, and never learns about the ones a component places
7
+ // INSIDE itself. Sass deduplicates `@use` within a compilation, so an app that
8
+ // also loads one of these by hand still emits it once.
9
+ @use '../../button/styles' as button-styles; // WrButton
10
+ @use '../../textarea/styles' as textarea-styles; // WrTextarea
11
+ @include theme.loaded('comment');
12
+
13
+ .wr-comment {
14
+ --wr-comment-gap: var(--wr-space-md);
15
+ --wr-comment-head-gap: var(--wr-space-sm);
16
+ --wr-comment-body-gap: var(--wr-space-xs);
17
+ --wr-comment-actions-gap: var(--wr-space-sm);
18
+ --wr-comment-font-family: var(--wr-font-family-base);
19
+ --wr-comment-font-size: var(--wr-text-sm);
20
+ --wr-comment-line-height: var(--wr-text-sm-leading);
21
+ --wr-comment-author-color: var(--wr-color-on-surface);
22
+ --wr-comment-author-font-weight: var(--wr-font-weight-semibold);
23
+ --wr-comment-time-color: var(--wr-color-on-surface-muted);
24
+ --wr-comment-time-font-size: var(--wr-text-xs);
25
+ --wr-comment-body-color: var(--wr-color-on-surface);
26
+ // Replies: how far one level steps in, and the room between them.
27
+ --wr-comment-indent: var(--wr-space-xl);
28
+ --wr-comment-replies-gap: var(--wr-space-lg);
29
+ --wr-comment-replies-margin-top: var(--wr-space-lg);
30
+ // Bubble variant. The reader's own side is a filled intent with its
31
+ // `-contrast` label; the other side is a neutral fill with surface text.
32
+ --wr-comment-bubble-bg: var(--wr-color-fill);
33
+ --wr-comment-bubble-color: var(--wr-color-on-surface);
34
+ --wr-comment-bubble-time-color: var(--wr-color-on-surface-muted);
35
+ --wr-comment-bubble-radius: var(--wr-border-radius-lg);
36
+ --wr-comment-bubble-padding-y: var(--wr-space-sm);
37
+ --wr-comment-bubble-padding-x: var(--wr-space-md);
38
+ --wr-comment-bubble-max-width: 80%;
39
+
40
+ display: flex;
41
+ flex-wrap: wrap;
42
+ align-items: flex-start;
43
+ gap: var(--wr-comment-gap);
44
+ // Claim the full row even when nested in a flex-row demo wrapper.
45
+ flex: 1 1 100%;
46
+ width: 100%;
47
+ min-width: 0;
48
+ font-family: var(--wr-comment-font-family);
49
+ font-size: var(--wr-comment-font-size);
50
+ line-height: var(--wr-comment-line-height);
51
+ color: var(--wr-comment-body-color);
52
+
53
+ &__avatar {
54
+ flex: 0 0 auto;
55
+ display: flex;
56
+
57
+ &:empty {
58
+ display: none;
59
+ }
60
+ }
61
+
62
+ &__main {
63
+ flex: 1 1 0;
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: var(--wr-comment-body-gap);
67
+ min-width: 0;
68
+ }
69
+
70
+ &__head {
71
+ display: flex;
72
+ flex-wrap: wrap;
73
+ align-items: baseline;
74
+ gap: var(--wr-comment-head-gap);
75
+ min-width: 0;
76
+
77
+ &:empty {
78
+ display: none;
79
+ }
80
+ }
81
+
82
+ &__author {
83
+ color: var(--wr-comment-author-color);
84
+ font-weight: var(--wr-comment-author-font-weight);
85
+ overflow-wrap: anywhere;
86
+ }
87
+
88
+ &__time {
89
+ color: var(--wr-comment-time-color);
90
+ font-size: var(--wr-comment-time-font-size);
91
+ }
92
+
93
+ &__body {
94
+ min-width: 0;
95
+ // A pasted URL or a token with no break opportunity would otherwise push
96
+ // the row past its column.
97
+ overflow-wrap: anywhere;
98
+ // Text from the composer holds the lines Shift+Enter made.
99
+ white-space: pre-line;
100
+ }
101
+
102
+ &__actions {
103
+ display: flex;
104
+ flex-wrap: wrap;
105
+ align-items: center;
106
+ gap: var(--wr-comment-actions-gap);
107
+
108
+ &:empty {
109
+ display: none;
110
+ }
111
+ }
112
+
113
+ &__replies {
114
+ flex: 1 1 100%;
115
+ display: flex;
116
+ flex-direction: column;
117
+ gap: var(--wr-comment-replies-gap);
118
+ margin-top: var(--wr-comment-replies-margin-top);
119
+ padding-inline-start: var(--wr-comment-indent);
120
+ min-width: 0;
121
+
122
+ &:empty {
123
+ display: none;
124
+ }
125
+
126
+ // The third level and deeper sit flush with their parent: each step takes
127
+ // the indent plus an avatar column, and a phone has no body width left to
128
+ // give after two.
129
+ .wr-comment__replies .wr-comment__replies {
130
+ padding-inline-start: 0;
131
+ }
132
+ }
133
+
134
+ // One step on a phone: the second level is flush too.
135
+ @media (max-width: 480px) {
136
+ &__replies .wr-comment__replies {
137
+ padding-inline-start: 0;
138
+ }
139
+ }
140
+
141
+ // Bubble variant: the body is a chat bubble, the head sits inside it, and the
142
+ // whole row leans to one inline side. Logical properties and `row-reverse`
143
+ // only, so `dir="rtl"` mirrors the log on its own.
144
+ &--bubble {
145
+ flex-wrap: nowrap;
146
+
147
+ .wr-comment__main {
148
+ flex: 0 1 auto;
149
+ max-width: var(--wr-comment-bubble-max-width);
150
+ gap: 0;
151
+ padding: var(--wr-comment-bubble-padding-y) var(--wr-comment-bubble-padding-x);
152
+ background: var(--wr-comment-bubble-bg);
153
+ color: var(--wr-comment-bubble-color);
154
+ @include theme.smooth-br(var(--wr-comment-bubble-radius));
155
+ }
156
+
157
+ .wr-comment__head {
158
+ gap: var(--wr-comment-head-gap);
159
+ }
160
+
161
+ .wr-comment__author {
162
+ color: inherit;
163
+ }
164
+
165
+ .wr-comment__time {
166
+ color: var(--wr-comment-bubble-time-color);
167
+ }
168
+
169
+ .wr-comment__actions {
170
+ margin-top: var(--wr-comment-body-gap);
171
+ }
172
+ }
173
+
174
+ &--end {
175
+ --wr-comment-bubble-bg: var(--wr-color-primary);
176
+ --wr-comment-bubble-color: var(--wr-color-primary-contrast);
177
+ --wr-comment-bubble-time-color: var(--wr-color-primary-contrast);
178
+
179
+ flex-direction: row-reverse;
180
+ }
181
+ }
182
+
183
+ .wr-comment-composer {
184
+ --wr-comment-composer-bg: var(--wr-color-surface);
185
+ --wr-comment-composer-border: var(--wr-border-base);
186
+ --wr-comment-composer-ring: transparent;
187
+ --wr-comment-composer-radius: var(--wr-control-radius-md);
188
+ --wr-comment-composer-gap: var(--wr-space-xs);
189
+ --wr-comment-composer-padding: var(--wr-space-xs);
190
+ // 36px: one row of the md field (20px line, 8px padding a side) less its
191
+ // border, so the button sits inside the row it sends.
192
+ --wr-comment-composer-send-size: 2.25rem;
193
+
194
+ display: flex;
195
+ align-items: flex-end;
196
+ gap: var(--wr-comment-composer-gap);
197
+ // Claim the full row even when nested in a flex-row demo wrapper.
198
+ flex: 1 1 100%;
199
+ width: 100%;
200
+ min-width: 0;
201
+ padding: var(--wr-comment-composer-padding);
202
+ background: var(--wr-comment-composer-bg);
203
+ border: 1px solid var(--wr-comment-composer-border);
204
+ @include theme.smooth-br(var(--wr-comment-composer-radius));
205
+ box-shadow: 0 0 0 3px var(--wr-comment-composer-ring);
206
+ transition:
207
+ border-color var(--wr-transition-base),
208
+ box-shadow var(--wr-transition-base);
209
+
210
+ // The frame carries the focus state, so the field inside draws none of its
211
+ // own: no border, no ring, no fill, in every state.
212
+ &:focus-within {
213
+ --wr-comment-composer-border: var(--wr-color-primary);
214
+ --wr-comment-composer-ring: color-mix(in srgb, var(--wr-color-primary) 15%, transparent);
215
+ }
216
+
217
+ &--disabled {
218
+ --wr-comment-composer-bg: var(--wr-color-fill);
219
+
220
+ cursor: not-allowed;
221
+ }
222
+
223
+ &--readonly {
224
+ --wr-comment-composer-bg: var(--wr-color-fill);
225
+ }
226
+
227
+ &__field {
228
+ flex: 1 1 auto;
229
+ min-width: 0;
230
+
231
+ &.wr-textarea,
232
+ &.wr-textarea--focused,
233
+ &.wr-textarea--disabled,
234
+ &.wr-textarea--readonly {
235
+ --wr-textarea-bg: transparent;
236
+ --wr-textarea-border: transparent;
237
+ --wr-textarea-ring: transparent;
238
+ }
239
+ }
240
+
241
+ &__actions {
242
+ flex: 0 0 auto;
243
+ display: flex;
244
+ align-items: center;
245
+ gap: var(--wr-comment-composer-gap);
246
+
247
+ &:empty {
248
+ display: none;
249
+ }
250
+ }
251
+
252
+ &__send {
253
+ flex: 0 0 auto;
254
+ width: var(--wr-comment-composer-send-size);
255
+ height: var(--wr-comment-composer-send-size);
256
+ padding: 0;
257
+
258
+ @include theme.touch-target;
259
+
260
+ .wr-icon__svg {
261
+ display: block;
262
+ width: 1.125rem;
263
+ height: 1.125rem;
264
+ }
265
+
266
+ // The glyph points toward the inline end, so it turns with the direction.
267
+ [dir='rtl'] & .wr-icon__svg {
268
+ transform: scaleX(-1);
269
+ }
270
+ }
271
+ }
@@ -1,4 +1,5 @@
1
1
  @use '../../theme/styles' as theme;
2
+ @include theme.loaded('compare');
2
3
 
3
4
  .wr-compare {
4
5
  display: block;
@@ -13,6 +13,7 @@
13
13
  // Sass deduplicates `@use` within a compilation, so an app that also loads one of
14
14
  // these by hand still emits it once.
15
15
  @use '../../icon/styles' as icon-styles; // WrIcon
16
+ @include theme.loaded('context-menu');
16
17
 
17
18
  .wr-context-menu-overlay {
18
19
  z-index: var(--wr-z-overlay, 1000);
@@ -1,4 +1,5 @@
1
1
  @use '../../theme/styles' as theme;
2
+ @include theme.loaded('counter');
2
3
 
3
4
  .wr-counter {
4
5
  display: inline-flex;
@@ -14,6 +14,7 @@
14
14
  // these by hand still emits it once.
15
15
  @use '../../calendar/styles' as calendar-styles; // WrCalendar
16
16
  @use '../../input/styles' as input-styles; // WrInput
17
+ @include theme.loaded('date-picker');
17
18
 
18
19
  // The refusal's live region — a screen reader's copy of what the border says. One
19
20
  // element per block, since a BEM class is public API: the range picker's is its own.
@@ -1,3 +1,5 @@
1
+ @use '../../theme/styles/loaded' as theme;
2
+ @include theme.loaded('density');
1
3
  // Density multipliers. Components multiply their paddings (and the
2
4
  // occasional height / line-height) by these scalars via `calc()`.
3
5
  //
@@ -1,4 +1,5 @@
1
1
  @use '../../theme/styles' as theme;
2
+ @include theme.loaded('descriptions');
2
3
 
3
4
  .wr-descriptions {
4
5
  --wr-descriptions-font-family: var(--wr-font-family-base);
@@ -1,5 +1,12 @@
1
1
  @use '../../theme/styles' as theme;
2
2
 
3
+ // Styles for the entry point this component's own markup renders: `confirm()`
4
+ // mounts two `wr-btn`, and a consumer who writes `@use 'ngwr/dialog'` never
5
+ // learns about them. Sass deduplicates `@use`, so an app that also loads the
6
+ // button by hand still emits it once.
7
+ @use '../../button/styles' as button-styles; // WrButton
8
+ @include theme.loaded('dialog');
9
+
3
10
  // CDK Overlay base styles are usually loaded once by the consumer.
4
11
  // We re-emit the minimal `cdk-overlay-*` rules so a standalone `@use
5
12
  // 'ngwr/dialog'` works without manually pulling CDK's prebuilt CSS.
@@ -1,4 +1,5 @@
1
1
  @use '../../theme/styles' as theme;
2
+ @include theme.loaded('divider');
2
3
 
3
4
  .wr-divider {
4
5
  // Defaults — line color/style/width drive the ::before and ::after
@@ -1,4 +1,5 @@
1
1
  @use '../../theme/styles' as theme;
2
+ @include theme.loaded('drawer');
2
3
 
3
4
  .wr-drawer-backdrop {
4
5
  background: var(--wr-color-overlay);
@@ -14,6 +14,7 @@
14
14
  // Sass deduplicates `@use` within a compilation, so an app that also loads one of
15
15
  // these by hand still emits it once.
16
16
  @use '../../icon/styles' as icon-styles; // WrIcon
17
+ @include theme.loaded('dropdown');
17
18
 
18
19
  /// Gap between the trigger and the menu, as pane padding on the edge facing the
19
20
  /// trigger. Padding rather than a CDK offset so a pointer crossing it is still
@@ -15,6 +15,7 @@
15
15
  @use '../../button/styles' as button-styles; // WrButton
16
16
  @use '../../input/styles' as input-styles; // WrInput
17
17
  @use '../../popover/styles' as popover-styles; // WrPopover
18
+ @include theme.loaded('editor');
18
19
 
19
20
  .wr-editor {
20
21
  display: flex;
@@ -13,6 +13,7 @@
13
13
  // Sass deduplicates `@use` within a compilation, so an app that also loads one of
14
14
  // these by hand still emits it once.
15
15
  @use '../../icon/styles' as icon-styles; // WrIcon
16
+ @include theme.loaded('empty');
16
17
 
17
18
  .wr-empty {
18
19
  --wr-empty-gap: var(--wr-space-sm);
@@ -36,6 +36,7 @@
36
36
  // Sass deduplicates `@use` within a compilation, so an app that also loads one of
37
37
  // these by hand still emits it once.
38
38
  @use '../../button/styles' as button-styles; // WrButton
39
+ @include styles.loaded('event-calendar');
39
40
 
40
41
  .wr-event-calendar {
41
42
  --wr-event-calendar-slot-height: 1.5rem;
@@ -2,6 +2,7 @@ import * as i0 from "@angular/core";
2
2
  import { DestroyRef, Directive, ElementRef, Injector, PLATFORM_ID, afterNextRender, effect, inject, input, output } from "@angular/core";
3
3
  import { coerceNumberProperty } from "@angular/cdk/coercion";
4
4
  import { isPlatformBrowser } from "@angular/common";
5
+ import { wrCheckStyles } from "ngwr/utils";
5
6
  /**
6
7
  * @license
7
8
  *
@@ -87,6 +88,7 @@ var WrAffix = class WrAffix {
87
88
  isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
88
89
  injector = inject(Injector);
89
90
  constructor() {
91
+ if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("affix");
90
92
  if (!this.isBrowser) return;
91
93
  afterNextRender(() => {
92
94
  const el = this.host.nativeElement;
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-affix.mjs","names":[],"sources":["../../../projects/lib/affix/affix.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n PLATFORM_ID,\n afterNextRender,\n effect,\n inject,\n input,\n output,\n} from '@angular/core';\n\n/**\n * The element a `position: sticky` host actually pins against.\n *\n * Walks up looking for an ancestor that scrolls — `overflow` anything but\n * `visible` on an axis, and a box that can actually be scrolled. `null` means\n * the document scroller, which is both what the browser uses and what\n * `IntersectionObserver` takes for \"the viewport\".\n *\n * A `getComputedStyle` read per ancestor, once per observer construction —\n * cheap, and the only way to answer the question: CSS resolves it internally\n * and exposes nothing.\n */\nfunction scrollParent(el: HTMLElement): HTMLElement | null {\n for (let node = el.parentElement; node !== null; node = node.parentElement) {\n if (node === document.body || node === document.documentElement) break;\n const style = getComputedStyle(node);\n const scrolls = /auto|scroll|overlay|hidden/.test(`${style.overflowY} ${style.overflowX}`);\n if (scrolls && node.scrollHeight > node.clientHeight) return node;\n }\n return null;\n}\n\n/**\n * Whether a parent lays its children out as flex or grid items, where a flow\n * sentinel is not inert: a flex container puts a `gap` on each side of it, and\n * a grid container gives it a cell of its own, shifting every item after it. A\n * computed value, so `inline-flex` and `inline-grid` answer the same.\n */\nfunction laysOutItems(parent: HTMLElement): boolean {\n return /\\b(?:inline-)?(?:flex|grid)\\b/.test(getComputedStyle(parent).display);\n}\n\n/**\n * Every out-of-flow affix in one parent shares that parent's containing-block\n * claim, so only the last one to leave gives it back — sticky group headers in\n * one filtered list come and go in any order. `inline` is the parent's own\n * inline `position`, kept only when the fallback in `claimContainer` wrote one.\n */\nconst containers = new WeakMap<HTMLElement, { count: number; inline: string | null }>();\n\n/**\n * Makes `parent` the containing block of the absolutely positioned sentinels\n * inside it, and returns the release.\n *\n * An absolute box scrolls with a scroller's content only when its containing\n * block sits inside that scroller, and the nearest positioned ancestor may well\n * be outside it — so inside a nested scroller the sentinel would hold still while\n * the host scrolled away, and the state would never flip.\n *\n * The parent is TAGGED rather than styled: `ngwr/affix` gives\n * `.wr-affix__container` its `position: relative` under `:where()`, at zero\n * specificity, so any position the author gives the parent still wins, a media\n * query included. An inline `position` would beat all of them for the\n * directive's whole lifetime. Only when nothing positions the parent once it is\n * tagged — the stylesheet is not loaded — is `relative` written inline, and the\n * last release puts the inline value back.\n */\nfunction claimContainer(parent: HTMLElement): () => void {\n let claim = containers.get(parent);\n if (!claim) {\n parent.classList.add('wr-affix__container');\n const positioned = /relative|absolute|fixed|sticky/.test(getComputedStyle(parent).position);\n claim = { count: 0, inline: positioned ? null : parent.style.position };\n if (!positioned) parent.style.position = 'relative';\n containers.set(parent, claim);\n }\n claim.count++;\n\n const held = claim;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (--held.count > 0) return;\n containers.delete(parent);\n parent.classList.remove('wr-affix__container');\n if (held.inline !== null && parent.style.position === 'relative') parent.style.position = held.inline;\n };\n}\n\n/**\n * Takes the sentinel out of a flex or grid parent's layout and keeps it on the\n * host's natural top edge. Returns the teardown.\n *\n * Absolutely positioned and zero-sized, so neither a gap nor a track is made\n * for it — which leaves its place to be measured. Two choices follow:\n *\n * - **The parent becomes the containing block** — see `claimContainer`.\n * - **The host is measured with sticky switched off.** A stuck element's\n * `offsetTop` already includes the sticky shift, and the sentinel marks the\n * line the host leaves its natural place at. Static and sticky lay out\n * identically in flow, so nothing else moves, and both writes land before\n * the next paint.\n *\n * Re-measured whenever the parent, the host or anything laid out before the host\n * changes size — those are what move the host's top — and whenever the parent's\n * children change: an element inserted above the host moves it without resizing\n * a fixed-height scroll panel, and becomes one more thing to watch.\n */\nfunction pinOutOfFlow(host: HTMLElement, parent: HTMLElement, sentinel: HTMLElement): () => void {\n const release = claimContainer(parent);\n\n const measure = (): void => {\n const position = host.style.position;\n host.style.position = 'static';\n const top = host.offsetTop;\n const left = host.offsetLeft;\n host.style.position = position;\n sentinel.style.top = `${top}px`;\n // Physical on purpose: `offsetLeft` is physical too, so the pair lines up in either direction.\n sentinel.style.left = `${left}px`;\n };\n measure();\n\n const resize = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(() => measure());\n const watchLayout = (): void => {\n if (!resize) return;\n resize.disconnect();\n resize.observe(parent);\n for (let node: Element | null = host; node; node = node.previousElementSibling) {\n if (node !== sentinel) resize.observe(node);\n }\n };\n watchLayout();\n\n const children =\n typeof MutationObserver === 'undefined'\n ? null\n : new MutationObserver(() => {\n watchLayout();\n measure();\n });\n children?.observe(parent, { childList: true });\n\n return () => {\n resize?.disconnect();\n children?.disconnect();\n release();\n };\n}\n\n/**\n * Stick-on-scroll directive. Combines native CSS `position: sticky` with\n * an `IntersectionObserver`-driven `wr-affix--active` state class, so consumers\n * can style the element differently while it's pinned (e.g. add a\n * shadow, change the background, shrink the height).\n *\n * The host gets `position: sticky; top: ${offsetTop}px;` inline. A tiny\n * sentinel `<div>` is inserted just before the host — when the sentinel\n * scrolls out of view, the host is \"stuck\" and gets `wr-affix--active`\n * + an `(wrAffixChange)` emission.\n *\n * In block layout the sentinel is a zero-height flow element. In a flex or grid\n * parent (read once, after the first render) it is absolutely positioned and\n * zero-sized instead, so it adds no gap and takes no grid cell. It is placed on\n * the host's natural top edge and re-placed when the parent, the host or an\n * element before the host resizes, or when the parent's children change. That\n * needs the parent as its containing block: the parent is tagged\n * `wr-affix__container`, which `ngwr/affix` makes `position: relative` at zero\n * specificity, so a position the author gives it still wins. The tag comes off\n * when the last affix in that parent is destroyed.\n *\n * Works inside any scroll container without configuration: CSS sticky picks\n * the nearest scrollable ancestor, and the observer watching for the pinned\n * state is given that same element as its root — see `scrollParent`. Without\n * that second half the two measured different lines, and the state never\n * flipped inside a nested scroller.\n *\n * @example\n * ```html\n * <header wrAffix [wrAffixOffsetTop]=\"0\">\n * <!-- adds a shadow once stuck -->\n * </header>\n * ```\n *\n * ```scss\n * header.wr-affix.wr-affix--active {\n * box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n * }\n * ```\n */\n@Directive({\n selector: '[wrAffix]',\n host: {\n class: 'wr-affix',\n '[style.position]': '\"sticky\"',\n '[style.top.px]': 'offsetTop()',\n },\n})\nexport class WrAffix {\n /** Pixels from the top of the scroll container when stuck. @default 0 */\n readonly offsetTop = input(0, {\n alias: 'wrAffixOffsetTop',\n transform: (v: unknown): number => coerceNumberProperty(v, 0),\n });\n\n /**\n * Fires when the element pins or unpins — `true` once it has stuck, `false`\n * when it returns to the flow. Use it to swap a shadow or a compact layout.\n */\n // eslint-disable-next-line @angular-eslint/no-output-rename -- keep wr-prefixed binding to match `[wrAffix]`\n readonly affixChange = output<boolean>({ alias: 'wrAffixChange' });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n /**\n * `afterNextRender`'s callback is not an injection context, and the observer\n * cannot exist before the sentinel it watches — so the effect that rebuilds it\n * is handed the injector explicitly.\n */\n private readonly injector = inject(Injector);\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => {\n const el = this.host.nativeElement;\n const parent = el.parentElement;\n if (!parent) return;\n\n // Sentinel: an empty zero-height block placed immediately before\n // the host. When the sentinel scrolls out of view, the host is\n // necessarily \"stuck\" at the configured offset.\n const sentinel = el.ownerDocument.createElement('div');\n sentinel.className = 'wr-affix__sentinel';\n sentinel.setAttribute('aria-hidden', 'true');\n // In a flex or grid parent a flow element is an item with a gap or a cell\n // of its own, so there it leaves the flow — see `pinOutOfFlow`.\n const outOfFlow = laysOutItems(parent);\n sentinel.style.cssText = outOfFlow\n ? 'position:absolute;width:0;height:0;margin:0;padding:0;pointer-events:none;'\n : 'height:0;width:100%;margin:0;padding:0;pointer-events:none;';\n parent.insertBefore(sentinel, el);\n const unpin = outOfFlow ? pinOutOfFlow(el, parent, sentinel) : null;\n\n // The observer reports STATE, not transitions: it delivers an entry for the\n // sentinel as soon as it starts watching it — before anything has scrolled —\n // and can repeat a state the host is already in (a resize, another crossing of\n // the same threshold). `affixChange` is documented as the transition, so it\n // only fires on one. The starting state is \"not affixed\", which is what the\n // element already renders as, so that first entry is silent.\n let affixed = false;\n\n let observer: IntersectionObserver | null = null;\n\n // `rootMargin` is fixed for an observer's lifetime, so a changed offset means\n // a NEW observer. Without this the two halves of the offset drifted apart:\n // `[style.top.px]` is a live binding, so a header that animates its offset\n // pinned at the new line while still flipping state at the old one.\n // Re-observing re-delivers the current state, which the transition guard\n // above absorbs when nothing has actually changed.\n effect(\n onCleanup => {\n const offset = this.offsetTop();\n\n // The observer's ROOT has to be the element the host sticks to, not\n // the viewport. `position: sticky` pins against the nearest\n // SCROLLING ancestor, and an observer with no root measures against\n // the viewport — so inside any nested scroller whose top sits below\n // the viewport's, `rootBounds.top` was 0 while the host pinned at\n // the container's own top. The direction guard below then computed\n // `false` at the one crossing it was ever handed, and because\n // `isIntersecting` stays false afterwards no further callback came:\n // `wr-affix--active` was never added and `(wrAffixChange)` never\n // emitted, for the whole scroll. The JSDoc promised the opposite —\n // \"works inside any scroll container without configuration\" — and\n // the docs page's own demo is exactly that shape.\n const root = scrollParent(el);\n\n observer = new IntersectionObserver(\n ([entry]) => {\n // NOT `!entry.isIntersecting` on its own. A sentinel is outside\n // the root in TWO directions, and only one of them means the\n // header has stuck: above the line because the page scrolled past\n // it, or below it because the host simply starts further down the\n // page than the first screen. The bare negation called both\n // \"affixed\", so any sticky element below the fold reported\n // `affixed = true` and painted `.wr-affix--active` on its very\n // first observer callback — before a pixel had scrolled — and\n // emitted a transition that never happened.\n //\n // `rootBounds.top` is the offset line (the negative `rootMargin`\n // above moves it), so a sentinel above it has genuinely gone by.\n const rootTop = entry.rootBounds?.top ?? offset;\n const next = !entry.isIntersecting && entry.boundingClientRect.top < rootTop;\n if (next === affixed) return;\n\n affixed = next;\n el.classList.toggle('wr-affix--active', next);\n this.affixChange.emit(next);\n },\n {\n // `null` is the document scroller, which is what the browser\n // uses for a host with no scrolling ancestor.\n root,\n // Trigger when the sentinel's top crosses the offset line. NEGATED\n // rather than prefixed with a minus: a negative offset is valid sticky\n // CSS (the host pins partly above the edge), and the prefix turned\n // `-10` into `--10px`, which the constructor refuses with a\n // SyntaxError — so the state never flipped at all. Negated, a\n // negative offset GROWS the root above its edge, which is where the\n // host pins.\n rootMargin: `${-offset}px 0px 0px 0px`,\n threshold: [0],\n }\n );\n observer.observe(sentinel);\n\n onCleanup(() => observer?.disconnect());\n },\n { injector: this.injector }\n );\n\n this.destroyRef.onDestroy(() => {\n observer?.disconnect();\n unpin?.();\n sentinel.remove();\n el.classList.remove('wr-affix--active');\n });\n });\n }\n}\n"],"mappings":";;;;;;;;;;AAkCA,SAAS,aAAa,IAAe;CACnC,KAAK,IAAI,OAAO,GAAG,eAAe,SAAS,MAAM,OAAO,KAAK,eAAe;EAC1E,IAAI,SAAS,SAAS,QAAQ,SAAS,SAAS,iBAAiB;EACjE,MAAM,QAAQ,iBAAiB,IAAI;EAEnC,IADgB,6BAA6B,KAAK,GAAG,MAAM,UAAS,GAAI,MAAM,WAC1E,KAAW,KAAK,eAAe,KAAK,cAAc,OAAO;CAC/D;CACA,OAAO;AACT;AAQA,SAAS,aAAa,QAAmB;CACvC,OAAO,gCAAgC,KAAK,iBAAiB,MAAM,CAAC,CAAC,OAAO;AAC9E;AAQA,MAAM,6BAAa,IAAI,QAAO;AAmB9B,SAAS,eAAe,QAAmB;CACzC,IAAI,QAAQ,WAAW,IAAI,MAAM;CACjC,IAAI,CAAC,OAAO;EACV,OAAO,UAAU,IAAI,qBAAqB;EAC1C,MAAM,aAAa,iCAAiC,KAAK,iBAAiB,MAAM,CAAC,CAAC,QAAQ;EAC1F,QAAQ;GAAE,OAAO;GAAG,QAAQ,aAAa,OAAO,OAAO,MAAM;EAAQ;EACrE,IAAI,CAAC,YAAY,OAAO,MAAM,WAAW;EACzC,WAAW,IAAI,QAAQ,KAAK;CAC9B;C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AA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAO,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAP,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAO,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,WAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,SAAA,EAAA,aAAA,gBAAA;EAAA,MAAA;GAAA,YAAA;IAAA,kBAAA;IAAA,gBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAAP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EARnB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,OAAO;IACP,oBAAoB;IACpB,kBAAkB;GACnB;EACF,CAAA"}
1
+ {"version":3,"file":"ngwr-affix.mjs","names":[],"sources":["../../../projects/lib/affix/affix.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n PLATFORM_ID,\n afterNextRender,\n effect,\n inject,\n input,\n output,\n} from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * The element a `position: sticky` host actually pins against.\n *\n * Walks up looking for an ancestor that scrolls — `overflow` anything but\n * `visible` on an axis, and a box that can actually be scrolled. `null` means\n * the document scroller, which is both what the browser uses and what\n * `IntersectionObserver` takes for \"the viewport\".\n *\n * A `getComputedStyle` read per ancestor, once per observer construction —\n * cheap, and the only way to answer the question: CSS resolves it internally\n * and exposes nothing.\n */\nfunction scrollParent(el: HTMLElement): HTMLElement | null {\n for (let node = el.parentElement; node !== null; node = node.parentElement) {\n if (node === document.body || node === document.documentElement) break;\n const style = getComputedStyle(node);\n const scrolls = /auto|scroll|overlay|hidden/.test(`${style.overflowY} ${style.overflowX}`);\n if (scrolls && node.scrollHeight > node.clientHeight) return node;\n }\n return null;\n}\n\n/**\n * Whether a parent lays its children out as flex or grid items, where a flow\n * sentinel is not inert: a flex container puts a `gap` on each side of it, and\n * a grid container gives it a cell of its own, shifting every item after it. A\n * computed value, so `inline-flex` and `inline-grid` answer the same.\n */\nfunction laysOutItems(parent: HTMLElement): boolean {\n return /\\b(?:inline-)?(?:flex|grid)\\b/.test(getComputedStyle(parent).display);\n}\n\n/**\n * Every out-of-flow affix in one parent shares that parent's containing-block\n * claim, so only the last one to leave gives it back — sticky group headers in\n * one filtered list come and go in any order. `inline` is the parent's own\n * inline `position`, kept only when the fallback in `claimContainer` wrote one.\n */\nconst containers = new WeakMap<HTMLElement, { count: number; inline: string | null }>();\n\n/**\n * Makes `parent` the containing block of the absolutely positioned sentinels\n * inside it, and returns the release.\n *\n * An absolute box scrolls with a scroller's content only when its containing\n * block sits inside that scroller, and the nearest positioned ancestor may well\n * be outside it — so inside a nested scroller the sentinel would hold still while\n * the host scrolled away, and the state would never flip.\n *\n * The parent is TAGGED rather than styled: `ngwr/affix` gives\n * `.wr-affix__container` its `position: relative` under `:where()`, at zero\n * specificity, so any position the author gives the parent still wins, a media\n * query included. An inline `position` would beat all of them for the\n * directive's whole lifetime. Only when nothing positions the parent once it is\n * tagged — the stylesheet is not loaded — is `relative` written inline, and the\n * last release puts the inline value back.\n */\nfunction claimContainer(parent: HTMLElement): () => void {\n let claim = containers.get(parent);\n if (!claim) {\n parent.classList.add('wr-affix__container');\n const positioned = /relative|absolute|fixed|sticky/.test(getComputedStyle(parent).position);\n claim = { count: 0, inline: positioned ? null : parent.style.position };\n if (!positioned) parent.style.position = 'relative';\n containers.set(parent, claim);\n }\n claim.count++;\n\n const held = claim;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (--held.count > 0) return;\n containers.delete(parent);\n parent.classList.remove('wr-affix__container');\n if (held.inline !== null && parent.style.position === 'relative') parent.style.position = held.inline;\n };\n}\n\n/**\n * Takes the sentinel out of a flex or grid parent's layout and keeps it on the\n * host's natural top edge. Returns the teardown.\n *\n * Absolutely positioned and zero-sized, so neither a gap nor a track is made\n * for it — which leaves its place to be measured. Two choices follow:\n *\n * - **The parent becomes the containing block** — see `claimContainer`.\n * - **The host is measured with sticky switched off.** A stuck element's\n * `offsetTop` already includes the sticky shift, and the sentinel marks the\n * line the host leaves its natural place at. Static and sticky lay out\n * identically in flow, so nothing else moves, and both writes land before\n * the next paint.\n *\n * Re-measured whenever the parent, the host or anything laid out before the host\n * changes size — those are what move the host's top — and whenever the parent's\n * children change: an element inserted above the host moves it without resizing\n * a fixed-height scroll panel, and becomes one more thing to watch.\n */\nfunction pinOutOfFlow(host: HTMLElement, parent: HTMLElement, sentinel: HTMLElement): () => void {\n const release = claimContainer(parent);\n\n const measure = (): void => {\n const position = host.style.position;\n host.style.position = 'static';\n const top = host.offsetTop;\n const left = host.offsetLeft;\n host.style.position = position;\n sentinel.style.top = `${top}px`;\n // Physical on purpose: `offsetLeft` is physical too, so the pair lines up in either direction.\n sentinel.style.left = `${left}px`;\n };\n measure();\n\n const resize = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(() => measure());\n const watchLayout = (): void => {\n if (!resize) return;\n resize.disconnect();\n resize.observe(parent);\n for (let node: Element | null = host; node; node = node.previousElementSibling) {\n if (node !== sentinel) resize.observe(node);\n }\n };\n watchLayout();\n\n const children =\n typeof MutationObserver === 'undefined'\n ? null\n : new MutationObserver(() => {\n watchLayout();\n measure();\n });\n children?.observe(parent, { childList: true });\n\n return () => {\n resize?.disconnect();\n children?.disconnect();\n release();\n };\n}\n\n/**\n * Stick-on-scroll directive. Combines native CSS `position: sticky` with\n * an `IntersectionObserver`-driven `wr-affix--active` state class, so consumers\n * can style the element differently while it's pinned (e.g. add a\n * shadow, change the background, shrink the height).\n *\n * The host gets `position: sticky; top: ${offsetTop}px;` inline. A tiny\n * sentinel `<div>` is inserted just before the host — when the sentinel\n * scrolls out of view, the host is \"stuck\" and gets `wr-affix--active`\n * + an `(wrAffixChange)` emission.\n *\n * In block layout the sentinel is a zero-height flow element. In a flex or grid\n * parent (read once, after the first render) it is absolutely positioned and\n * zero-sized instead, so it adds no gap and takes no grid cell. It is placed on\n * the host's natural top edge and re-placed when the parent, the host or an\n * element before the host resizes, or when the parent's children change. That\n * needs the parent as its containing block: the parent is tagged\n * `wr-affix__container`, which `ngwr/affix` makes `position: relative` at zero\n * specificity, so a position the author gives it still wins. The tag comes off\n * when the last affix in that parent is destroyed.\n *\n * Works inside any scroll container without configuration: CSS sticky picks\n * the nearest scrollable ancestor, and the observer watching for the pinned\n * state is given that same element as its root — see `scrollParent`. Without\n * that second half the two measured different lines, and the state never\n * flipped inside a nested scroller.\n *\n * @example\n * ```html\n * <header wrAffix [wrAffixOffsetTop]=\"0\">\n * <!-- adds a shadow once stuck -->\n * </header>\n * ```\n *\n * ```scss\n * header.wr-affix.wr-affix--active {\n * box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n * }\n * ```\n */\n@Directive({\n selector: '[wrAffix]',\n host: {\n class: 'wr-affix',\n '[style.position]': '\"sticky\"',\n '[style.top.px]': 'offsetTop()',\n },\n})\nexport class WrAffix {\n /** Pixels from the top of the scroll container when stuck. @default 0 */\n readonly offsetTop = input(0, {\n alias: 'wrAffixOffsetTop',\n transform: (v: unknown): number => coerceNumberProperty(v, 0),\n });\n\n /**\n * Fires when the element pins or unpins — `true` once it has stuck, `false`\n * when it returns to the flow. Use it to swap a shadow or a compact layout.\n */\n // eslint-disable-next-line @angular-eslint/no-output-rename -- keep wr-prefixed binding to match `[wrAffix]`\n readonly affixChange = output<boolean>({ alias: 'wrAffixChange' });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n /**\n * `afterNextRender`'s callback is not an injection context, and the observer\n * cannot exist before the sentinel it watches — so the effect that rebuilds it\n * is handed the injector explicitly.\n */\n private readonly injector = inject(Injector);\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('affix');\n if (!this.isBrowser) return;\n\n afterNextRender(() => {\n const el = this.host.nativeElement;\n const parent = el.parentElement;\n if (!parent) return;\n\n // Sentinel: an empty zero-height block placed immediately before\n // the host. When the sentinel scrolls out of view, the host is\n // necessarily \"stuck\" at the configured offset.\n const sentinel = el.ownerDocument.createElement('div');\n sentinel.className = 'wr-affix__sentinel';\n sentinel.setAttribute('aria-hidden', 'true');\n // In a flex or grid parent a flow element is an item with a gap or a cell\n // of its own, so there it leaves the flow — see `pinOutOfFlow`.\n const outOfFlow = laysOutItems(parent);\n sentinel.style.cssText = outOfFlow\n ? 'position:absolute;width:0;height:0;margin:0;padding:0;pointer-events:none;'\n : 'height:0;width:100%;margin:0;padding:0;pointer-events:none;';\n parent.insertBefore(sentinel, el);\n const unpin = outOfFlow ? pinOutOfFlow(el, parent, sentinel) : null;\n\n // The observer reports STATE, not transitions: it delivers an entry for the\n // sentinel as soon as it starts watching it — before anything has scrolled —\n // and can repeat a state the host is already in (a resize, another crossing of\n // the same threshold). `affixChange` is documented as the transition, so it\n // only fires on one. The starting state is \"not affixed\", which is what the\n // element already renders as, so that first entry is silent.\n let affixed = false;\n\n let observer: IntersectionObserver | null = null;\n\n // `rootMargin` is fixed for an observer's lifetime, so a changed offset means\n // a NEW observer. Without this the two halves of the offset drifted apart:\n // `[style.top.px]` is a live binding, so a header that animates its offset\n // pinned at the new line while still flipping state at the old one.\n // Re-observing re-delivers the current state, which the transition guard\n // above absorbs when nothing has actually changed.\n effect(\n onCleanup => {\n const offset = this.offsetTop();\n\n // The observer's ROOT has to be the element the host sticks to, not\n // the viewport. `position: sticky` pins against the nearest\n // SCROLLING ancestor, and an observer with no root measures against\n // the viewport — so inside any nested scroller whose top sits below\n // the viewport's, `rootBounds.top` was 0 while the host pinned at\n // the container's own top. The direction guard below then computed\n // `false` at the one crossing it was ever handed, and because\n // `isIntersecting` stays false afterwards no further callback came:\n // `wr-affix--active` was never added and `(wrAffixChange)` never\n // emitted, for the whole scroll. The JSDoc promised the opposite —\n // \"works inside any scroll container without configuration\" — and\n // the docs page's own demo is exactly that shape.\n const root = scrollParent(el);\n\n observer = new IntersectionObserver(\n ([entry]) => {\n // NOT `!entry.isIntersecting` on its own. A sentinel is outside\n // the root in TWO directions, and only one of them means the\n // header has stuck: above the line because the page scrolled past\n // it, or below it because the host simply starts further down the\n // page than the first screen. The bare negation called both\n // \"affixed\", so any sticky element below the fold reported\n // `affixed = true` and painted `.wr-affix--active` on its very\n // first observer callback — before a pixel had scrolled — and\n // emitted a transition that never happened.\n //\n // `rootBounds.top` is the offset line (the negative `rootMargin`\n // above moves it), so a sentinel above it has genuinely gone by.\n const rootTop = entry.rootBounds?.top ?? offset;\n const next = !entry.isIntersecting && entry.boundingClientRect.top < rootTop;\n if (next === affixed) return;\n\n affixed = next;\n el.classList.toggle('wr-affix--active', next);\n this.affixChange.emit(next);\n },\n {\n // `null` is the document scroller, which is what the browser\n // uses for a host with no scrolling ancestor.\n root,\n // Trigger when the sentinel's top crosses the offset line. NEGATED\n // rather than prefixed with a minus: a negative offset is valid sticky\n // CSS (the host pins partly above the edge), and the prefix turned\n // `-10` into `--10px`, which the constructor refuses with a\n // SyntaxError — so the state never flipped at all. Negated, a\n // negative offset GROWS the root above its edge, which is where the\n // host pins.\n rootMargin: `${-offset}px 0px 0px 0px`,\n threshold: [0],\n }\n );\n observer.observe(sentinel);\n\n onCleanup(() => observer?.disconnect());\n },\n { injector: this.injector }\n );\n\n this.destroyRef.onDestroy(() => {\n observer?.disconnect();\n unpin?.();\n sentinel.remove();\n el.classList.remove('wr-affix--active');\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AA,gBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAAP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EARnB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,OAAO;IACP,oBAAoB;IACpB,kBAAkB;GACnB;EACF,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
3
3
  import { coerceBooleanProperty } from "@angular/cdk/coercion";
4
+ import { getFocusableElements, wrCheckStyles } from "ngwr/utils";
4
5
  import { useI18nText } from "ngwr/i18n";
5
6
  import { WrIcon } from "ngwr/icon";
6
- import { getFocusableElements } from "ngwr/utils";
7
7
  /**
8
8
  * @license
9
9
  *
@@ -11,6 +11,9 @@ import { getFocusableElements } from "ngwr/utils";
11
11
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
12
12
  */
13
13
  var WrAlert = class WrAlert {
14
+ constructor() {
15
+ if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("alert");
16
+ }
14
17
  closeLabel = input(null, ...ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []);
15
18
  resolvedCloseLabel = useI18nText(this.closeLabel, "alert.close", "Close alert");
16
19
  title = input(null, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
@@ -125,7 +128,7 @@ var WrAlert = class WrAlert {
125
128
  "attr.aria-live": "liveLevel()"
126
129
  } },
127
130
  ngImport: i0,
128
- template: "@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n",
131
+ template: "@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n <div class=\"wr-alert__actions\"><ng-content select=\"[wrAlertActions]\" /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n",
129
132
  dependencies: [{
130
133
  kind: "component",
131
134
  type: WrIcon,
@@ -152,9 +155,10 @@ i0.ɵɵngDeclareClassMetadata({
152
155
  "[attr.role]": "liveRole()",
153
156
  "[attr.aria-live]": "liveLevel()"
154
157
  },
155
- template: "@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n"
158
+ template: "@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n <div class=\"wr-alert__actions\"><ng-content select=\"[wrAlertActions]\" /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n"
156
159
  }]
157
160
  }],
161
+ ctorParameters: () => [],
158
162
  propDecorators: {
159
163
  closeLabel: [{
160
164
  type: i0.Input,
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-alert.mjs","names":[],"sources":["../../../projects/lib/alert/alert.ts","../../../projects/lib/alert/alert.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { getFocusableElements } from 'ngwr/utils';\n\nimport type { WrAlertType } from './types';\n\n/**\n * Inline status banner. Use for feedback messages — saved/failed/notice etc.\n * Content placed inside renders below the message, in `.wr-alert__content`.\n *\n * @example\n * ```html\n * <wr-alert title=\"Saved\" message=\"Your changes are live.\" type=\"success\" />\n * <wr-alert title=\"Failed\" type=\"danger\" closable (closed)=\"onClose()\" />\n * <wr-alert title=\"Sync failed\" type=\"danger\">Request <code>8f2c41</code> timed out.</wr-alert>\n * ```\n *\n * @see https://ngwr.dev/reference/components/alert\n */\n@Component({\n selector: 'wr-alert',\n templateUrl: './alert.html',\n imports: [WrIcon],\n encapsulation: ViewEncapsulation.None,\n host: {\n // `title` is an input, and a static attribute that feeds an input is ALSO\n // written onto the host — where the browser shows it as a native tooltip\n // over the whole component, and where it feeds the accessible name of any\n // element that has a role. `<wr-alert title=\"Heads up\">` is the documented\n // spelling, so every page writing it shipped both. A bound `[title]` never\n // did this, which is why the two forms behaved differently for no reason a\n // reader could see.\n '[attr.title]': 'null',\n '[class]': 'classes()',\n '[attr.role]': 'liveRole()',\n '[attr.aria-live]': 'liveLevel()',\n },\n})\nexport class WrAlert {\n /** Accessible name. Falls back to `alert.close`, then `'Close alert'`. */\n readonly closeLabel = input<string | null>(null);\n\n protected readonly resolvedCloseLabel = useI18nText(this.closeLabel, 'alert.close', 'Close alert');\n\n /**\n * Optional headline shown at the top of the alert.\n *\n * @default null\n */\n readonly title = input<string | null>(null);\n\n /**\n * Visual variant.\n *\n * @default 'info'\n */\n readonly type = input<WrAlertType>('info');\n\n /**\n * Override the default per-type icon with any ngwr icon name.\n *\n * @default null\n */\n readonly iconName = input<WrIconName | null>(null);\n\n /**\n * Optional secondary message rendered below the title.\n *\n * @default null\n */\n readonly message = input<string | null>(null);\n\n /**\n * When `true`, renders a leading status icon matching the `type`.\n * Pass `false` to hide. Ignored when `iconName` is set.\n *\n * @default true\n */\n readonly icon = input(true, { transform: coerceBooleanProperty });\n\n /**\n * When `true`, renders a close button.\n *\n * @default false\n */\n readonly closable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Emitted when the user dismisses the alert via the close button. If the close\n * button had focus, focus moves on to the next focusable element after the alert\n * (or the one before it, when nothing follows) — unless a `(closed)` handler has\n * placed it somewhere itself.\n */\n readonly closed = output<void>();\n\n protected readonly dismissed = signal(false);\n\n protected readonly classes = computed(() => {\n const parts = ['wr-alert', `wr-alert--${this.type()}`];\n if (this.dismissed()) parts.push('wr-alert--dismissed');\n return parts.join(' ');\n });\n\n /** Escalate role/aria-live for danger/warning alerts. */\n protected readonly liveRole = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' ? 'alert' : 'status'\n );\n protected readonly liveLevel = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' || this.type() === 'warning' ? 'assertive' : 'polite'\n );\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n protected onClose(): void {\n const host = this.host.nativeElement;\n const hadFocus = host.contains(host.ownerDocument.activeElement);\n this.dismissed.set(true);\n this.closed.emit();\n if (hadFocus) afterNextRender(() => this.handOnFocus(), { injector: this.injector });\n }\n\n /**\n * The close button is removed with the rest of the content, and a focused element\n * that leaves the DOM drops the caret on `<body>`: a keyboard user's next Tab, and\n * a screen reader's reading position, started over from the top of the page. Run\n * after the render that removed it, so a `(closed)` handler that moved focus on\n * purpose is seen and left alone.\n */\n private handOnFocus(): void {\n const host = this.host.nativeElement;\n const doc = host.ownerDocument;\n const active = doc.activeElement;\n if (active && active !== doc.body) return;\n // Tab stops only: a roving composite parks its other items at -1. The host has\n // nothing focusable left inside it, so every stop is either before or after it.\n const stops = getFocusableElements(doc.body).filter(el => el.tabIndex >= 0);\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n const after = stops.findIndex(el => (host.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0);\n (after >= 0 ? stops[after] : stops.at(-1))?.focus();\n }\n}\n","@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n"],"mappings":";;;;;;;;;;;;AA2DA,IAAa,UAAb,MAAa,QAAO;CAET,aAAa,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE7B,qBAAqB,YAAY,KAAK,YAAY,eAAe,aAAa;CAOxF,QAAQ,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAOlC,OAAO,MAAmB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAOjC,WAAW,MAAyB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAOzC,UAAU,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAQpC,OAAO,MAAM,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,OAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAOrD,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAQ1D,SAAS,OAAM;CAEL,YAAY,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA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eACF,kBAAkB;GAAI,MAC/B;IAQJ,gBAAgB;IAChB,WAAW;IACX,eAAe;IACf,oBAAoB;GACrB;GAAA,UAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-alert.mjs","names":[],"sources":["../../../projects/lib/alert/alert.ts","../../../projects/lib/alert/alert.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { getFocusableElements, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrAlertType } from './types';\n\n/**\n * Inline status banner. Use for feedback messages — saved/failed/notice etc.\n * Content placed inside renders below the message, in `.wr-alert__content`.\n *\n * Slots:\n *\n * - **Default** — text under the message.\n * - **`[wrAlertActions]`** — buttons under the message, in a row that wraps.\n *\n * @example\n * ```html\n * <wr-alert title=\"Saved\" message=\"Your changes are live.\" type=\"success\" />\n * <wr-alert title=\"Failed\" type=\"danger\" closable (closed)=\"onClose()\" />\n * <wr-alert title=\"Sync failed\" type=\"danger\">Request <code>8f2c41</code> timed out.</wr-alert>\n * <wr-alert title=\"Update available\" type=\"info\">\n * <wr-btn wrAlertActions size=\"sm\" (click)=\"update()\">Install</wr-btn>\n * </wr-alert>\n * ```\n *\n * @see https://ngwr.dev/reference/components/alert\n */\n@Component({\n selector: 'wr-alert',\n templateUrl: './alert.html',\n imports: [WrIcon],\n encapsulation: ViewEncapsulation.None,\n host: {\n // `title` is an input, and a static attribute that feeds an input is ALSO\n // written onto the host — where the browser shows it as a native tooltip\n // over the whole component, and where it feeds the accessible name of any\n // element that has a role. `<wr-alert title=\"Heads up\">` is the documented\n // spelling, so every page writing it shipped both. A bound `[title]` never\n // did this, which is why the two forms behaved differently for no reason a\n // reader could see.\n '[attr.title]': 'null',\n '[class]': 'classes()',\n '[attr.role]': 'liveRole()',\n '[attr.aria-live]': 'liveLevel()',\n },\n})\nexport class WrAlert {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('alert');\n }\n\n /** Accessible name. Falls back to `alert.close`, then `'Close alert'`. */\n readonly closeLabel = input<string | null>(null);\n\n protected readonly resolvedCloseLabel = useI18nText(this.closeLabel, 'alert.close', 'Close alert');\n\n /**\n * Optional headline shown at the top of the alert.\n *\n * @default null\n */\n readonly title = input<string | null>(null);\n\n /**\n * Visual variant.\n *\n * @default 'info'\n */\n readonly type = input<WrAlertType>('info');\n\n /**\n * Override the default per-type icon with any ngwr icon name.\n *\n * @default null\n */\n readonly iconName = input<WrIconName | null>(null);\n\n /**\n * Optional secondary message rendered below the title.\n *\n * @default null\n */\n readonly message = input<string | null>(null);\n\n /**\n * When `true`, renders a leading status icon matching the `type`.\n * Pass `false` to hide. Ignored when `iconName` is set.\n *\n * @default true\n */\n readonly icon = input(true, { transform: coerceBooleanProperty });\n\n /**\n * When `true`, renders a close button.\n *\n * @default false\n */\n readonly closable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Emitted when the user dismisses the alert via the close button. If the close\n * button had focus, focus moves on to the next focusable element after the alert\n * (or the one before it, when nothing follows) — unless a `(closed)` handler has\n * placed it somewhere itself.\n */\n readonly closed = output<void>();\n\n protected readonly dismissed = signal(false);\n\n protected readonly classes = computed(() => {\n const parts = ['wr-alert', `wr-alert--${this.type()}`];\n if (this.dismissed()) parts.push('wr-alert--dismissed');\n return parts.join(' ');\n });\n\n /** Escalate role/aria-live for danger/warning alerts. */\n protected readonly liveRole = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' ? 'alert' : 'status'\n );\n protected readonly liveLevel = computed(() =>\n this.dismissed() ? null : this.type() === 'danger' || this.type() === 'warning' ? 'assertive' : 'polite'\n );\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n protected onClose(): void {\n const host = this.host.nativeElement;\n const hadFocus = host.contains(host.ownerDocument.activeElement);\n this.dismissed.set(true);\n this.closed.emit();\n if (hadFocus) afterNextRender(() => this.handOnFocus(), { injector: this.injector });\n }\n\n /**\n * The close button is removed with the rest of the content, and a focused element\n * that leaves the DOM drops the caret on `<body>`: a keyboard user's next Tab, and\n * a screen reader's reading position, started over from the top of the page. Run\n * after the render that removed it, so a `(closed)` handler that moved focus on\n * purpose is seen and left alone.\n */\n private handOnFocus(): void {\n const host = this.host.nativeElement;\n const doc = host.ownerDocument;\n const active = doc.activeElement;\n if (active && active !== doc.body) return;\n // Tab stops only: a roving composite parks its other items at -1. The host has\n // nothing focusable left inside it, so every stop is either before or after it.\n const stops = getFocusableElements(doc.body).filter(el => el.tabIndex >= 0);\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n const after = stops.findIndex(el => (host.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0);\n (after >= 0 ? stops[after] : stops.at(-1))?.focus();\n }\n}\n","@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n <!-- An OCTAGON, and the shape is the point. `danger` used to be a\n circle holding a bar over a dot, which is the vertical mirror of\n the `i` the @default branch draws — at the rendered 18px the two\n differ only by where a 1.5px gap sits. The stop-sign silhouette\n reads at that size and survives greyscale, which a mirrored gap\n does not. -->\n @case ('danger') {\n <path\n d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\"\n />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n <!-- A bar, not the exclamation mark `danger` used to carry: `neutral`\n emitted that glyph byte for byte. The icon is the whole difference\n between these two, because what the component actually paints —\n `danger-ink` #a32a33 (L 0.0968) against `on-surface-muted` #5f6c7d\n (L 0.1464) on tints 1.036:1 apart — is a hue difference and little\n else. -->\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M8 12h8\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n <div class=\"wr-alert__content\"><ng-content /></div>\n <div class=\"wr-alert__actions\"><ng-content select=\"[wrAlertActions]\" /></div>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n"],"mappings":";;;;;;;;;;;;AAmEA,IAAa,UAAb,MAAa,QAAO;CAClB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,OAAO;CAC1E;CAGS,aAAa,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE7B,qBAAqB,YAAY,KAAK,YAAY,eAAe,aAAa;CAOxF,QAAQ,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAOlC,OAAO,MAAmB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAOjC,WAAW,MAAyB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAOzC,UAAU,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAQpC,OAAO,MAAM,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,OAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAOrD,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAQ1D,SAAS,OAAM;CAEL,YAAY,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAEzB,UAAU,eAAc;EACzC,MAAM,QAAQ,CAAC,YAAY,aAAa,KAAK,KAA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