ngwr 14.8.0 → 14.9.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 (447) hide show
  1. package/README.md +66 -332
  2. package/alert/styles/_index.scss +10 -0
  3. package/avatar/styles/_index.scss +18 -7
  4. package/badge/styles/_index.scss +7 -0
  5. package/badge/styles/_tag.scss +7 -1
  6. package/button/styles/_index.scss +6 -0
  7. package/cascader/styles/_rules.scss +1 -1
  8. package/checkbox/styles/_index.scss +4 -0
  9. package/command-palette/styles/_index.scss +1 -1
  10. package/divider/styles/_index.scss +2 -0
  11. package/editor/styles/_index.scss +441 -0
  12. package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -1
  13. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  14. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  15. package/fesm2022/ngwr-affix.mjs +3 -3
  16. package/fesm2022/ngwr-affix.mjs.map +1 -1
  17. package/fesm2022/ngwr-alert.mjs +3 -3
  18. package/fesm2022/ngwr-alert.mjs.map +1 -1
  19. package/fesm2022/ngwr-anchor.mjs +3 -3
  20. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  21. package/fesm2022/ngwr-aurora.mjs +3 -3
  22. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  23. package/fesm2022/ngwr-avatar.mjs +3 -3
  24. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  25. package/fesm2022/ngwr-back-top.mjs +3 -3
  26. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  27. package/fesm2022/ngwr-badge.mjs +28 -13
  28. package/fesm2022/ngwr-badge.mjs.map +1 -1
  29. package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
  30. package/fesm2022/ngwr-bar-chart.mjs +3 -3
  31. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  32. package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -1
  33. package/fesm2022/ngwr-blur-text.mjs +3 -3
  34. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  35. package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -1
  36. package/fesm2022/ngwr-border-glow.mjs +3 -3
  37. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  38. package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
  39. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  40. package/fesm2022/ngwr-burger.mjs +3 -3
  41. package/fesm2022/ngwr-burger.mjs.map +1 -1
  42. package/fesm2022/ngwr-button-testing.mjs.map +1 -1
  43. package/fesm2022/ngwr-button.mjs +6 -6
  44. package/fesm2022/ngwr-button.mjs.map +1 -1
  45. package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
  46. package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
  47. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  48. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  49. package/fesm2022/ngwr-calendar.mjs +3 -3
  50. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  51. package/fesm2022/ngwr-card.mjs +9 -9
  52. package/fesm2022/ngwr-card.mjs.map +1 -1
  53. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  54. package/fesm2022/ngwr-carousel.mjs +6 -6
  55. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  56. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  57. package/fesm2022/ngwr-cascader.mjs +4 -4
  58. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  59. package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
  60. package/fesm2022/ngwr-checkbox.mjs +6 -6
  61. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  62. package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -1
  63. package/fesm2022/ngwr-circular-text.mjs +3 -3
  64. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  65. package/fesm2022/ngwr-click-spark.mjs +3 -3
  66. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  67. package/fesm2022/ngwr-clipboard.mjs +3 -3
  68. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  69. package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
  70. package/fesm2022/ngwr-collapse.mjs +9 -9
  71. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  72. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  73. package/fesm2022/ngwr-color-picker.mjs +6 -6
  74. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-command-palette.mjs +3 -3
  77. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  78. package/fesm2022/ngwr-compare.mjs +3 -3
  79. package/fesm2022/ngwr-compare.mjs.map +1 -1
  80. package/fesm2022/ngwr-confetti.mjs +3 -3
  81. package/fesm2022/ngwr-confetti.mjs.map +1 -1
  82. package/fesm2022/ngwr-config.mjs.map +1 -1
  83. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  84. package/fesm2022/ngwr-context-menu.mjs +12 -12
  85. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  86. package/fesm2022/ngwr-cookie.mjs +3 -3
  87. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  88. package/fesm2022/ngwr-counter.mjs +6 -6
  89. package/fesm2022/ngwr-counter.mjs.map +1 -1
  90. package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
  91. package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
  92. package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
  93. package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -1
  94. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  95. package/fesm2022/ngwr-date-picker.mjs +21 -21
  96. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  97. package/fesm2022/ngwr-date.mjs +3 -3
  98. package/fesm2022/ngwr-date.mjs.map +1 -1
  99. package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -1
  100. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  101. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  102. package/fesm2022/ngwr-density.mjs +6 -6
  103. package/fesm2022/ngwr-density.mjs.map +1 -1
  104. package/fesm2022/ngwr-descriptions.mjs +6 -6
  105. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  106. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-dialog.mjs +15 -15
  108. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  109. package/fesm2022/ngwr-directives.mjs +12 -12
  110. package/fesm2022/ngwr-directives.mjs.map +1 -1
  111. package/fesm2022/ngwr-divider.mjs +3 -3
  112. package/fesm2022/ngwr-divider.mjs.map +1 -1
  113. package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
  114. package/fesm2022/ngwr-donut-chart.mjs +3 -3
  115. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  116. package/fesm2022/ngwr-drag-drop.mjs +6 -6
  117. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  118. package/fesm2022/ngwr-drawer-testing.mjs.map +1 -1
  119. package/fesm2022/ngwr-drawer.mjs +18 -18
  120. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  122. package/fesm2022/ngwr-dropdown.mjs +9 -9
  123. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  124. package/fesm2022/ngwr-editor-testing.mjs +568 -0
  125. package/fesm2022/ngwr-editor-testing.mjs.map +1 -0
  126. package/fesm2022/ngwr-editor.mjs +2601 -0
  127. package/fesm2022/ngwr-editor.mjs.map +1 -0
  128. package/fesm2022/ngwr-empty.mjs +3 -3
  129. package/fesm2022/ngwr-empty.mjs.map +1 -1
  130. package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
  131. package/fesm2022/ngwr-event-calendar.mjs +6 -6
  132. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  133. package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
  134. package/fesm2022/ngwr-falling-text.mjs +3 -3
  135. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  136. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  137. package/fesm2022/ngwr-file-upload.mjs +3 -3
  138. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  139. package/fesm2022/ngwr-form-testing.mjs.map +1 -1
  140. package/fesm2022/ngwr-form.mjs +9 -9
  141. package/fesm2022/ngwr-form.mjs.map +1 -1
  142. package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -1
  143. package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
  144. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  145. package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
  146. package/fesm2022/ngwr-gauge.mjs +3 -3
  147. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  148. package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
  149. package/fesm2022/ngwr-glitch-text.mjs +3 -3
  150. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  151. package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
  152. package/fesm2022/ngwr-gradient-text.mjs +3 -3
  153. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  154. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  155. package/fesm2022/ngwr-graph.mjs +6 -6
  156. package/fesm2022/ngwr-graph.mjs.map +1 -1
  157. package/fesm2022/ngwr-hotkey.mjs +6 -6
  158. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ar.mjs +29 -0
  160. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-cs.mjs +29 -0
  162. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-de.mjs +29 -0
  164. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-en.mjs +34 -0
  166. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-es.mjs +29 -0
  168. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-fr.mjs +29 -0
  170. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-he.mjs +29 -0
  172. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-hi.mjs +29 -0
  174. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-id.mjs +29 -0
  176. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-it.mjs +29 -0
  178. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-ja.mjs +29 -0
  180. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-ko.mjs +29 -0
  182. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n-nl.mjs +29 -0
  184. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  185. package/fesm2022/ngwr-i18n-pl.mjs +29 -0
  186. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  187. package/fesm2022/ngwr-i18n-pt.mjs +29 -0
  188. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  189. package/fesm2022/ngwr-i18n-ru.mjs +29 -0
  190. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  191. package/fesm2022/ngwr-i18n-sv.mjs +29 -0
  192. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  193. package/fesm2022/ngwr-i18n-tr.mjs +29 -0
  194. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  195. package/fesm2022/ngwr-i18n-uk.mjs +29 -0
  196. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  197. package/fesm2022/ngwr-i18n-vi.mjs +29 -0
  198. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  199. package/fesm2022/ngwr-i18n-zh-TW.mjs +29 -0
  200. package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
  201. package/fesm2022/ngwr-i18n-zh.mjs +29 -0
  202. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  203. package/fesm2022/ngwr-i18n.mjs +9 -9
  204. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  205. package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
  206. package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
  207. package/fesm2022/ngwr-icon.mjs +6 -6
  208. package/fesm2022/ngwr-icon.mjs.map +1 -1
  209. package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
  210. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  211. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  212. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  213. package/fesm2022/ngwr-input-number.mjs +3 -3
  214. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  215. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
  216. package/fesm2022/ngwr-input-otp.mjs +3 -3
  217. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  218. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  219. package/fesm2022/ngwr-input.mjs +15 -15
  220. package/fesm2022/ngwr-input.mjs.map +1 -1
  221. package/fesm2022/ngwr-keyboard.mjs +3 -3
  222. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  223. package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
  224. package/fesm2022/ngwr-knob.mjs +3 -3
  225. package/fesm2022/ngwr-knob.mjs.map +1 -1
  226. package/fesm2022/ngwr-layout.mjs +15 -15
  227. package/fesm2022/ngwr-layout.mjs.map +1 -1
  228. package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
  229. package/fesm2022/ngwr-lightbox.mjs +3 -3
  230. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  231. package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
  232. package/fesm2022/ngwr-line-chart.mjs +3 -3
  233. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  234. package/fesm2022/ngwr-list.mjs +6 -6
  235. package/fesm2022/ngwr-list.mjs.map +1 -1
  236. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  237. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  238. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  239. package/fesm2022/ngwr-markdown-testing.mjs.map +1 -1
  240. package/fesm2022/ngwr-markdown.mjs +798 -17
  241. package/fesm2022/ngwr-markdown.mjs.map +1 -1
  242. package/fesm2022/ngwr-marquee-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-marquee.mjs +3 -3
  244. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  245. package/fesm2022/ngwr-media.mjs +3 -3
  246. package/fesm2022/ngwr-media.mjs.map +1 -1
  247. package/fesm2022/ngwr-mention-testing.mjs.map +1 -1
  248. package/fesm2022/ngwr-mention.mjs +6 -6
  249. package/fesm2022/ngwr-mention.mjs.map +1 -1
  250. package/fesm2022/ngwr-meta.mjs +6 -6
  251. package/fesm2022/ngwr-meta.mjs.map +1 -1
  252. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
  253. package/fesm2022/ngwr-meter-group.mjs +3 -3
  254. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  255. package/fesm2022/ngwr-overlay.mjs +6 -6
  256. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  257. package/fesm2022/ngwr-page-header.mjs +3 -3
  258. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  259. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  260. package/fesm2022/ngwr-pagination.mjs +3 -3
  261. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  262. package/fesm2022/ngwr-pipes.mjs +21 -21
  263. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  264. package/fesm2022/ngwr-platform.mjs +9 -9
  265. package/fesm2022/ngwr-platform.mjs.map +1 -1
  266. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  267. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  268. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  269. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-popover.mjs +12 -12
  271. package/fesm2022/ngwr-popover.mjs.map +1 -1
  272. package/fesm2022/ngwr-progress.mjs +3 -3
  273. package/fesm2022/ngwr-progress.mjs.map +1 -1
  274. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  275. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  276. package/fesm2022/ngwr-qr.mjs +3 -3
  277. package/fesm2022/ngwr-qr.mjs.map +1 -1
  278. package/fesm2022/ngwr-radio-testing.mjs.map +1 -1
  279. package/fesm2022/ngwr-radio.mjs +6 -6
  280. package/fesm2022/ngwr-radio.mjs.map +1 -1
  281. package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
  282. package/fesm2022/ngwr-rating.mjs +3 -3
  283. package/fesm2022/ngwr-rating.mjs.map +1 -1
  284. package/fesm2022/ngwr-result.mjs +12 -12
  285. package/fesm2022/ngwr-result.mjs.map +1 -1
  286. package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  288. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  289. package/fesm2022/ngwr-schema-form.mjs +3 -3
  290. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  291. package/fesm2022/ngwr-scroll.mjs +3 -3
  292. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  293. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
  294. package/fesm2022/ngwr-segmented.mjs +3 -3
  295. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  296. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  297. package/fesm2022/ngwr-select.mjs +12 -12
  298. package/fesm2022/ngwr-select.mjs.map +1 -1
  299. package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -1
  300. package/fesm2022/ngwr-shiny-text.mjs +6 -6
  301. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  302. package/fesm2022/ngwr-sidebar.mjs +3 -3
  303. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  304. package/fesm2022/ngwr-skeleton.mjs +3 -3
  305. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  306. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  307. package/fesm2022/ngwr-slider.mjs +3 -3
  308. package/fesm2022/ngwr-slider.mjs.map +1 -1
  309. package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -1
  310. package/fesm2022/ngwr-sparkline.mjs +3 -3
  311. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  312. package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
  313. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  314. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  315. package/fesm2022/ngwr-spinner.mjs +3 -3
  316. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  317. package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -1
  318. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  319. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  320. package/fesm2022/ngwr-split-text-testing.mjs.map +1 -1
  321. package/fesm2022/ngwr-split-text.mjs +3 -3
  322. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  323. package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
  324. package/fesm2022/ngwr-splitter.mjs +3 -3
  325. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  326. package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -1
  327. package/fesm2022/ngwr-spotlight-card.mjs +6 -6
  328. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  329. package/fesm2022/ngwr-squircle.mjs +6 -6
  330. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  331. package/fesm2022/ngwr-star-border-testing.mjs.map +1 -1
  332. package/fesm2022/ngwr-star-border.mjs +3 -3
  333. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  334. package/fesm2022/ngwr-statistic.mjs +9 -9
  335. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  336. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
  337. package/fesm2022/ngwr-stepper.mjs +6 -6
  338. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  339. package/fesm2022/ngwr-storage.mjs +3 -3
  340. package/fesm2022/ngwr-storage.mjs.map +1 -1
  341. package/fesm2022/ngwr-switch-testing.mjs.map +1 -1
  342. package/fesm2022/ngwr-switch.mjs +3 -3
  343. package/fesm2022/ngwr-switch.mjs.map +1 -1
  344. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  345. package/fesm2022/ngwr-table.mjs +18 -18
  346. package/fesm2022/ngwr-table.mjs.map +1 -1
  347. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  348. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  349. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  350. package/fesm2022/ngwr-tabs.mjs +6 -6
  351. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  352. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  353. package/fesm2022/ngwr-textarea.mjs +3 -3
  354. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  355. package/fesm2022/ngwr-theme.mjs +3 -3
  356. package/fesm2022/ngwr-theme.mjs.map +1 -1
  357. package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -1
  358. package/fesm2022/ngwr-tilt-card.mjs +6 -6
  359. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  360. package/fesm2022/ngwr-timeline.mjs +6 -6
  361. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  362. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  363. package/fesm2022/ngwr-toast.mjs +9 -9
  364. package/fesm2022/ngwr-toast.mjs.map +1 -1
  365. package/fesm2022/ngwr-toolbar.mjs +3 -3
  366. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  367. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  368. package/fesm2022/ngwr-tour.mjs +6 -6
  369. package/fesm2022/ngwr-tour.mjs.map +1 -1
  370. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  371. package/fesm2022/ngwr-transfer.mjs +3 -3
  372. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  373. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  374. package/fesm2022/ngwr-tree.mjs +3 -3
  375. package/fesm2022/ngwr-tree.mjs.map +1 -1
  376. package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
  377. package/fesm2022/ngwr-typewriter.mjs +3 -3
  378. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  379. package/fesm2022/ngwr-typography.mjs +7 -3
  380. package/fesm2022/ngwr-typography.mjs.map +1 -1
  381. package/fesm2022/ngwr-utils.mjs.map +1 -1
  382. package/fesm2022/ngwr-validators.mjs.map +1 -1
  383. package/fesm2022/ngwr-version.mjs +1 -1
  384. package/fesm2022/ngwr-version.mjs.map +1 -1
  385. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  386. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  387. package/fesm2022/ngwr-waves-testing.mjs.map +1 -1
  388. package/fesm2022/ngwr-waves.mjs +3 -3
  389. package/fesm2022/ngwr-waves.mjs.map +1 -1
  390. package/fesm2022/ngwr-window-testing.mjs.map +1 -1
  391. package/fesm2022/ngwr-window.mjs +12 -12
  392. package/fesm2022/ngwr-window.mjs.map +1 -1
  393. package/form/styles/_index.scss +5 -0
  394. package/i18n/ar.json +29 -0
  395. package/i18n/cs.json +29 -0
  396. package/i18n/de.json +29 -0
  397. package/i18n/en.json +29 -0
  398. package/i18n/es.json +29 -0
  399. package/i18n/fr.json +29 -0
  400. package/i18n/he.json +29 -0
  401. package/i18n/hi.json +29 -0
  402. package/i18n/id.json +29 -0
  403. package/i18n/it.json +29 -0
  404. package/i18n/ja.json +29 -0
  405. package/i18n/ko.json +29 -0
  406. package/i18n/nl.json +29 -0
  407. package/i18n/pl.json +29 -0
  408. package/i18n/pt.json +29 -0
  409. package/i18n/ru.json +29 -0
  410. package/i18n/sv.json +29 -0
  411. package/i18n/tr.json +29 -0
  412. package/i18n/uk.json +29 -0
  413. package/i18n/vi.json +29 -0
  414. package/i18n/zh-TW.json +29 -0
  415. package/i18n/zh.json +29 -0
  416. package/input/styles/_index.scss +5 -1
  417. package/input-otp/styles/_index.scss +5 -5
  418. package/llms-full.txt +11 -1
  419. package/llms.txt +188 -132
  420. package/mcp/providers.js +2 -2
  421. package/mcp/server.js +1 -1
  422. package/overlay/styles/_arrow.scss +3 -0
  423. package/package.json +43 -2
  424. package/progress/styles/_index.scss +4 -0
  425. package/radio/styles/_index.scss +4 -1
  426. package/schematics/use/symbol-map.json +1 -0
  427. package/select/styles/_index.scss +3 -3
  428. package/sidebar/styles/_index.scss +10 -0
  429. package/skeleton/styles/_index.scss +3 -0
  430. package/skills/ngwr/SKILL.md +5 -5
  431. package/skills/ngwr/references/catalog.md +2 -0
  432. package/skills/ngwr/references/setup.md +3 -3
  433. package/styles.scss +1 -0
  434. package/table/styles/_index.scss +7 -0
  435. package/textarea/styles/_index.scss +12 -3
  436. package/theme/styles/_colors.scss +39 -13
  437. package/theme/styles/_contrast.scss +9 -7
  438. package/toast/styles/_index.scss +4 -0
  439. package/tree/styles/_index.scss +1 -1
  440. package/types/ngwr-badge.d.ts +22 -7
  441. package/types/ngwr-config.d.ts +12 -0
  442. package/types/ngwr-editor-testing.d.ts +378 -0
  443. package/types/ngwr-editor.d.ts +449 -0
  444. package/types/ngwr-markdown.d.ts +61 -2
  445. package/types/ngwr-typography.d.ts +4 -0
  446. package/types/ngwr-version.d.ts +1 -1
  447. package/typography/styles/_index.scss +16 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-star-border-testing.mjs","sources":["../../../projects/lib/star-border/testing/wr-star-border-harness.ts","../../../projects/lib/star-border/testing/ngwr-star-border-testing.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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrStarBorderHarnessFilters } from './interfaces';\n\n/** Read one declaration out of an inline `style` attribute, or `null` when it is not there. */\nfunction inlineStyle(style: string | null, property: string): string | null {\n for (const declaration of (style ?? '').split(';')) {\n const colon = declaration.indexOf(':');\n if (colon === -1) continue;\n if (declaration.slice(0, colon).trim() !== property) continue;\n return declaration.slice(colon + 1).trim();\n }\n return null;\n}\n\n/**\n * Test harness for `<wr-star-border>` and for the `[wr-star-border]` attribute form.\n *\n * **There is no `getRayCount()`, and no `hasTopRay()`.** `rays=\"single\"` does not remove\n * the top ray: both spans are always in the DOM and the stylesheet hides one with\n * `display: none`. A count would answer 2 in both modes — flatly contradicting the input\n * that was set — so the variant is read as {@link isSingleRay}, off the modifier class\n * the CSS itself keys on. That class is public API, and it is the honest observable.\n *\n * Nothing here reports on the motion either. The sweep is a `@keyframes` rule in a\n * stylesheet a unit test never loads, so `animationName` is `''` and `getAnimations()` is\n * empty whether the component works or not; `mode=\"hover\"` is a bare `:hover` selector\n * with no state behind it, which is why there is no `hover()` to pair with anything; and\n * the reduced-motion escape is a media query with no mirror in TypeScript, so the DOM is\n * identical for a user who asked for less motion and one who did not.\n *\n * **The inline values are read off the `style` attribute rather than through\n * `getCssValue()`, and that is not a jsdom concession.** The stylesheet declares its own\n * `--wr-star-border-color` and `--wr-star-border-speed` on `.wr-star-border`, so in a\n * real browser a computed read answers with the stylesheet's default at exactly the\n * moment the host binding is the thing that broke. What the component wrote is the only\n * value nothing else can forge.\n *\n * On the attribute form the host's `[class]` binding MERGES with the classes the consumer\n * already put there, so read the variants through {@link isHoverOnly} and\n * {@link isSingleRay} rather than comparing a whole `className` — the latter passes only\n * as long as the host happens to carry nothing else.\n *\n * @example\n * ```ts\n * const loader = TestbedHarnessEnvironment.loader(fixture);\n * const border = await loader.getHarness(WrStarBorderHarness);\n *\n * expect(await border.getText()).toBe('Upgrade');\n * expect(await border.getSpeedSeconds()).toBe(6);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrStarBorderHarness extends ComponentHarness {\n static hostSelector = 'wr-star-border, [wr-star-border]';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrStarBorderHarnessFilters = {}): HarnessPredicate<WrStarBorderHarness> {\n return new HarnessPredicate(WrStarBorderHarness, options).addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text)\n );\n }\n\n /**\n * The projected content's text, trimmed.\n *\n * Read from the inner panel rather than from the host, which would pick up anything the\n * rays ever came to hold. They are empty spans today, so the two agree — but the panel\n * is the slot the content was put in, and it is the thing a reader actually sees.\n */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-star-border__inner')()).text();\n }\n\n /** Whether the rays wait for the pointer (`mode=\"hover\"`) instead of running always. */\n async isHoverOnly(): Promise<boolean> {\n return (await this.host()).hasClass('wr-star-border--hover');\n }\n\n /**\n * Whether only the bottom ray is drawn (`rays=\"single\"`).\n *\n * From the modifier class, because the DOM cannot be asked: both ray spans are rendered\n * in both modes and the top one is hidden in CSS. See this class's docs.\n */\n async isSingleRay(): Promise<boolean> {\n return (await this.host()).hasClass('wr-star-border--single');\n }\n\n /**\n * The ray colour as the consumer passed it — a CSS value, not a resolved one — or\n * `null` when none was given.\n *\n * `null` is the common case and a real answer rather than a missing one: with no\n * `[color]` the theme decides, primary on a light surface and white on a dark one, and\n * a component that started writing a colour of its own there would silently take that\n * choice away.\n */\n async getRayColor(): Promise<string | null> {\n return this.hostStyle('--wr-star-border-color');\n }\n\n /**\n * How long one ray sweep takes, in seconds.\n *\n * Refuses a value that lost its unit rather than parsing the number out of it. The\n * component builds this string from a plain number input and the stylesheet drops it\n * straight into `animation-duration`, where a bare `6` is invalid — the declaration is\n * discarded, the stylesheet's own default takes over, and nothing about the page looks\n * wrong. A `parseFloat` would report 6 either way.\n */\n async getSpeedSeconds(): Promise<number> {\n const raw = await this.hostStyle('--wr-star-border-speed');\n const match = /^(-?\\d*\\.?\\d+)s$/.exec(raw ?? '');\n\n if (!match) {\n throw new Error(\n `WrStarBorderHarness.getSpeedSeconds(): \\`--wr-star-border-speed\\` reads \"${raw}\" rather than a value in ` +\n 'seconds. The stylesheet uses it as an animation-duration, so anything without the unit is an invalid ' +\n 'declaration and the rays fall back to the default sweep.'\n );\n }\n return Number(match[1]);\n }\n\n /**\n * How far the rays bleed past the inner panel, in pixels.\n *\n * Read off the host's `padding`, which is where `[thickness]` lands: the component\n * writes the SHORTHAND, `<n>px 0`. Worth knowing on the attribute form — an inline\n * shorthand wins the cascade, so a `<button wr-star-border>` loses whatever padding its\n * own classes gave it, horizontal included. The visible padding lives on the inner\n * panel, so this is a bleed measurement rather than a spacing one.\n *\n * Throws when the host's padding is not that shape, which means either the binding\n * stopped arriving or something else is writing the property inline.\n */\n async getThickness(): Promise<number> {\n const raw = await this.hostStyle('padding');\n const match = /^(-?\\d*\\.?\\d+)px\\s+0(?:px)?$/.exec(raw ?? '');\n\n if (!match) {\n throw new Error(\n `WrStarBorderHarness.getThickness(): the host's inline padding reads \"${raw}\" rather than the ` +\n '`<n>px 0` shorthand the component writes from [thickness]. Either the binding is gone, or something ' +\n 'else is setting padding inline on the same element.'\n );\n }\n return Number(match[1]);\n }\n\n /**\n * Whether every ray is kept out of the accessible tree.\n *\n * The one question worth asking about both spans at once — not how many there are, but\n * whether either has stopped being decoration. They carry no text and mean nothing, so\n * a ray that reached a screen reader would be an empty announcement in the middle of a\n * button. Answered for all of them together, so one ray losing the attribute is enough\n * to report `false`.\n */\n async areRaysDecorative(): Promise<boolean> {\n const rays = await this.locatorForAll('.wr-star-border__ray')();\n\n if (rays.length === 0) {\n throw new Error(\n 'WrStarBorderHarness.areRaysDecorative(): there are no rays at all. Both spans are rendered in every ' +\n 'mode — `rays=\"single\"` hides one in CSS rather than dropping it — so none of them is a broken template ' +\n 'rather than a variant.'\n );\n }\n\n const hidden = await Promise.all(rays.map(ray => ray.getAttribute('aria-hidden')));\n return hidden.every(value => value === 'true');\n }\n\n /** Read one declaration off the host's inline `style` — see this class's docs for why not `getCssValue()`. */\n private async hostStyle(property: string): Promise<string | null> {\n return inlineStyle(await (await this.host()).getAttribute('style'), property);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;AACA,SAAS,WAAW,CAAC,KAAoB,EAAE,QAAgB,EAAA;AACzD,IAAA,KAAK,MAAM,WAAW,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE;QAClD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE;AAClB,QAAA,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,QAAQ;YAAE;QACrD,OAAO,WAAW,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;IAC5C;AACA,IAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACG,MAAO,mBAAoB,SAAQ,gBAAgB,CAA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AAK,CAAC,CAAC,CAAC,CAAC;IACzB;AAEA;;;;;;;;;;;AAWG;AACH,IAAA,MAAM,YAAY,GAAA;QAChB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC3C,MAAM,KAAK,GAAG,8BAA8B,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;QAE5D,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,MAAM,IAAI,KAAK,CACb,CAAA,qEAAA,EAAwE,GAAG,CAAA,kBAAA,CAAoB;gBAC7F,sGAAsG;AACtG,gBAAA,qDAAqD,CACxD;QACH;AACA,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB;AAEA;;;;;;;;AAQG;AACH,IAAA,MAAM,iBAAiB,GAAA;QACrB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE;AAE/D,QAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CACb,sGAAsG;gBACpG,yGAAyG;AACzG,gBAAA,wBAAwB,CAC3B;QACH;QAEA,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;AAClF,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;IAChD;;IAGQ,MAAM,SAAS,CAAC,QAAgB,EAAA;AACtC,QAAA,OAAO,WAAW,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAC/E;;;AC1LF;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-star-border-testing.mjs","sources":["../../../projects/lib/star-border/testing/wr-star-border-harness.ts","../../../projects/lib/star-border/testing/ngwr-star-border-testing.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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrStarBorderHarnessFilters } from './interfaces';\n\n/** Read one declaration out of an inline `style` attribute, or `null` when it is not there. */\nfunction inlineStyle(style: string | null, property: string): string | null {\n for (const declaration of (style ?? '').split(';')) {\n const colon = declaration.indexOf(':');\n if (colon === -1) continue;\n if (declaration.slice(0, colon).trim() !== property) continue;\n return declaration.slice(colon + 1).trim();\n }\n return null;\n}\n\n/**\n * Test harness for `<wr-star-border>` and for the `[wr-star-border]` attribute form.\n *\n * **There is no `getRayCount()`, and no `hasTopRay()`.** `rays=\"single\"` does not remove\n * the top ray: both spans are always in the DOM and the stylesheet hides one with\n * `display: none`. A count would answer 2 in both modes — flatly contradicting the input\n * that was set — so the variant is read as {@link isSingleRay}, off the modifier class\n * the CSS itself keys on. That class is public API, and it is the honest observable.\n *\n * Nothing here reports on the motion either. The sweep is a `@keyframes` rule in a\n * stylesheet a unit test never loads, so `animationName` is `''` and `getAnimations()` is\n * empty whether the component works or not; `mode=\"hover\"` is a bare `:hover` selector\n * with no state behind it, which is why there is no `hover()` to pair with anything; and\n * the reduced-motion escape is a media query with no mirror in TypeScript, so the DOM is\n * identical for a user who asked for less motion and one who did not.\n *\n * **The inline values are read off the `style` attribute rather than through\n * `getCssValue()`, and that is not a jsdom concession.** The stylesheet declares its own\n * `--wr-star-border-color` and `--wr-star-border-speed` on `.wr-star-border`, so in a\n * real browser a computed read answers with the stylesheet's default at exactly the\n * moment the host binding is the thing that broke. What the component wrote is the only\n * value nothing else can forge.\n *\n * On the attribute form the host's `[class]` binding MERGES with the classes the consumer\n * already put there, so read the variants through {@link isHoverOnly} and\n * {@link isSingleRay} rather than comparing a whole `className` — the latter passes only\n * as long as the host happens to carry nothing else.\n *\n * @example\n * ```ts\n * const loader = TestbedHarnessEnvironment.loader(fixture);\n * const border = await loader.getHarness(WrStarBorderHarness);\n *\n * expect(await border.getText()).toBe('Upgrade');\n * expect(await border.getSpeedSeconds()).toBe(6);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrStarBorderHarness extends ComponentHarness {\n static hostSelector = 'wr-star-border, [wr-star-border]';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrStarBorderHarnessFilters = {}): HarnessPredicate<WrStarBorderHarness> {\n return new HarnessPredicate(WrStarBorderHarness, options).addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text)\n );\n }\n\n /**\n * The projected content's text, trimmed.\n *\n * Read from the inner panel rather than from the host, which would pick up anything the\n * rays ever came to hold. They are empty spans today, so the two agree — but the panel\n * is the slot the content was put in, and it is the thing a reader actually sees.\n */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-star-border__inner')()).text();\n }\n\n /** Whether the rays wait for the pointer (`mode=\"hover\"`) instead of running always. */\n async isHoverOnly(): Promise<boolean> {\n return (await this.host()).hasClass('wr-star-border--hover');\n }\n\n /**\n * Whether only the bottom ray is drawn (`rays=\"single\"`).\n *\n * From the modifier class, because the DOM cannot be asked: both ray spans are rendered\n * in both modes and the top one is hidden in CSS. See this class's docs.\n */\n async isSingleRay(): Promise<boolean> {\n return (await this.host()).hasClass('wr-star-border--single');\n }\n\n /**\n * The ray colour as the consumer passed it — a CSS value, not a resolved one — or\n * `null` when none was given.\n *\n * `null` is the common case and a real answer rather than a missing one: with no\n * `[color]` the theme decides, primary on a light surface and white on a dark one, and\n * a component that started writing a colour of its own there would silently take that\n * choice away.\n */\n async getRayColor(): Promise<string | null> {\n return this.hostStyle('--wr-star-border-color');\n }\n\n /**\n * How long one ray sweep takes, in seconds.\n *\n * Refuses a value that lost its unit rather than parsing the number out of it. The\n * component builds this string from a plain number input and the stylesheet drops it\n * straight into `animation-duration`, where a bare `6` is invalid — the declaration is\n * discarded, the stylesheet's own default takes over, and nothing about the page looks\n * wrong. A `parseFloat` would report 6 either way.\n */\n async getSpeedSeconds(): Promise<number> {\n const raw = await this.hostStyle('--wr-star-border-speed');\n const match = /^(-?\\d*\\.?\\d+)s$/.exec(raw ?? '');\n\n if (!match) {\n throw new Error(\n `WrStarBorderHarness.getSpeedSeconds(): \\`--wr-star-border-speed\\` reads \"${raw}\" rather than a value in ` +\n 'seconds. The stylesheet uses it as an animation-duration, so anything without the unit is an invalid ' +\n 'declaration and the rays fall back to the default sweep.'\n );\n }\n return Number(match[1]);\n }\n\n /**\n * How far the rays bleed past the inner panel, in pixels.\n *\n * Read off the host's `padding`, which is where `[thickness]` lands: the component\n * writes the SHORTHAND, `<n>px 0`. Worth knowing on the attribute form — an inline\n * shorthand wins the cascade, so a `<button wr-star-border>` loses whatever padding its\n * own classes gave it, horizontal included. The visible padding lives on the inner\n * panel, so this is a bleed measurement rather than a spacing one.\n *\n * Throws when the host's padding is not that shape, which means either the binding\n * stopped arriving or something else is writing the property inline.\n */\n async getThickness(): Promise<number> {\n const raw = await this.hostStyle('padding');\n const match = /^(-?\\d*\\.?\\d+)px\\s+0(?:px)?$/.exec(raw ?? '');\n\n if (!match) {\n throw new Error(\n `WrStarBorderHarness.getThickness(): the host's inline padding reads \"${raw}\" rather than the ` +\n '`<n>px 0` shorthand the component writes from [thickness]. Either the binding is gone, or something ' +\n 'else is setting padding inline on the same element.'\n );\n }\n return Number(match[1]);\n }\n\n /**\n * Whether every ray is kept out of the accessible tree.\n *\n * The one question worth asking about both spans at once — not how many there are, but\n * whether either has stopped being decoration. They carry no text and mean nothing, so\n * a ray that reached a screen reader would be an empty announcement in the middle of a\n * button. Answered for all of them together, so one ray losing the attribute is enough\n * to report `false`.\n */\n async areRaysDecorative(): Promise<boolean> {\n const rays = await this.locatorForAll('.wr-star-border__ray')();\n\n if (rays.length === 0) {\n throw new Error(\n 'WrStarBorderHarness.areRaysDecorative(): there are no rays at all. Both spans are rendered in every ' +\n 'mode — `rays=\"single\"` hides one in CSS rather than dropping it — so none of them is a broken template ' +\n 'rather than a variant.'\n );\n }\n\n const hidden = await Promise.all(rays.map(ray => ray.getAttribute('aria-hidden')));\n return hidden.every(value => value === 'true');\n }\n\n /** Read one declaration off the host's inline `style` — see this class's docs for why not `getCssValue()`. */\n private async hostStyle(property: string): Promise<string | null> {\n return inlineStyle(await (await this.host()).getAttribute('style'), property);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;AACA,SAAS,WAAW,CAAC,KAAoB,EAAE,QAAgB,EAAA;AACzD,IAAA,KAAK,MAAM,WAAW,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE;QAClD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE;AAClB,QAAA,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,QAAQ;YAAE;QACrD,OAAO,WAAW,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;IAC5C;AACA,IAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACG,MAAO,mBAAoB,SAAQ,gBAAgB,CAAA;AACvD,IAAA,OAAO,YAAY,GAAG,kCAAkC;;AAGxD,IAAA,OAAO,IAAI,CAAC,OAAA,GAAsC,EAAE,EAAA;AAClD,QAAA,OAAO,IAAI,gBAAgB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KACtG,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAA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EAAA,EAAwE,GAAG,CAAA,kBAAA,CAAoB;gBAC7F,sGAAsG;AACtG,gBAAA,qDAAqD,CACxD;QACH;AACA,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB;AAEA;;;;;;;;AAQG;AACH,IAAA,MAAM,iBAAiB,GAAA;QACrB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE;AAE/D,QAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CACb,sGAAsG;gBACpG,yGAAyG;AACzG,gBAAA,wBAAwB,CAC3B;QACH;QAEA,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;AAClF,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;IAChD;;IAGQ,MAAM,SAAS,CAAC,QAAgB,EAAA;AACtC,QAAA,OAAO,WAAW,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAC/E;;;AC1LF;;AAEG;;"}
@@ -51,10 +51,10 @@ class WrStarBorder {
51
51
  parts.push('wr-star-border--single');
52
52
  return parts.join(' ');
53
53
  };
54
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStarBorder, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrStarBorder, isStandalone: true, selector: "wr-star-border, [wr-star-border]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, rays: { classPropertyName: "rays", publicName: "rays", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "style.--wr-star-border-color": "color()", "style.--wr-star-border-speed": "speed() + \"s\"", "style.padding": "thickness() + \"px 0\"" } }, ngImport: i0, template: "<span class=\"wr-star-border__ray wr-star-border__ray--bottom\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__ray wr-star-border__ray--top\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__inner\"><ng-content /></span>\n", styles: [".wr-star-border{--wr-star-border-color: var(--wr-color-primary);--wr-star-border-speed: 6s;--wr-star-border-radius: 20px;--wr-star-border-stop: 16%;--wr-star-border-opacity: 1;display:inline-block;position:relative;border:0;background:transparent;border-radius:var(--wr-star-border-radius);overflow:hidden;cursor:inherit}.wr-star-border__ray{position:absolute;display:block;width:300%;height:50%;opacity:var(--wr-star-border-opacity);border-radius:50%;background:radial-gradient(circle,var(--wr-star-border-color),transparent var(--wr-star-border-stop));animation:wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate;z-index:0}.wr-star-border__ray--bottom{bottom:-12px;right:-250%}.wr-star-border__ray--top{top:-12px;left:-250%;animation-name:wr-star-border-top}.wr-star-border--single .wr-star-border__ray--top{display:none}.wr-star-border--hover .wr-star-border__ray{opacity:0;animation:none}.wr-star-border--hover:hover .wr-star-border__ray{animation:wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate}.wr-star-border--hover:hover .wr-star-border__ray--top{animation-name:wr-star-border-top}.wr-star-border__inner{position:relative;display:block;border:1px solid var(--wr-color-outline);background:var(--wr-color-surface);color:var(--wr-color-on-surface);font-size:1rem;text-align:center;padding:1rem 1.625rem;border-radius:var(--wr-star-border-radius);z-index:1}@keyframes wr-star-border-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}@keyframes wr-star-border-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){.wr-star-border__ray{animation:none!important;opacity:0!important}}\n"], encapsulation: i0.ViewEncapsulation.None });
54
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStarBorder, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: WrStarBorder, isStandalone: true, selector: "wr-star-border, [wr-star-border]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, rays: { classPropertyName: "rays", publicName: "rays", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "style.--wr-star-border-color": "color()", "style.--wr-star-border-speed": "speed() + \"s\"", "style.padding": "thickness() + \"px 0\"" } }, ngImport: i0, template: "<span class=\"wr-star-border__ray wr-star-border__ray--bottom\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__ray wr-star-border__ray--top\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__inner\"><ng-content /></span>\n", styles: [".wr-star-border{--wr-star-border-color: var(--wr-color-primary);--wr-star-border-speed: 6s;--wr-star-border-radius: 20px;--wr-star-border-stop: 16%;--wr-star-border-opacity: 1;display:inline-block;position:relative;border:0;background:transparent;border-radius:var(--wr-star-border-radius);overflow:hidden;cursor:inherit}.wr-star-border__ray{position:absolute;display:block;width:300%;height:50%;opacity:var(--wr-star-border-opacity);border-radius:50%;background:radial-gradient(circle,var(--wr-star-border-color),transparent var(--wr-star-border-stop));animation:wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate;z-index:0}.wr-star-border__ray--bottom{bottom:-12px;right:-250%}.wr-star-border__ray--top{top:-12px;left:-250%;animation-name:wr-star-border-top}.wr-star-border--single .wr-star-border__ray--top{display:none}.wr-star-border--hover .wr-star-border__ray{opacity:0;animation:none}.wr-star-border--hover:hover .wr-star-border__ray{animation:wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate}.wr-star-border--hover:hover .wr-star-border__ray--top{animation-name:wr-star-border-top}.wr-star-border__inner{position:relative;display:block;border:1px solid var(--wr-color-outline);background:var(--wr-color-surface);color:var(--wr-color-on-surface);font-size:1rem;text-align:center;padding:1rem 1.625rem;border-radius:var(--wr-star-border-radius);z-index:1}@keyframes wr-star-border-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}@keyframes wr-star-border-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){.wr-star-border__ray{animation:none!important;opacity:0!important}}\n"], encapsulation: i0.ViewEncapsulation.None });
56
56
  }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStarBorder, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStarBorder, decorators: [{
58
58
  type: Component,
59
59
  args: [{ selector: 'wr-star-border, [wr-star-border]', encapsulation: ViewEncapsulation.None, host: {
60
60
  '[class]': 'classes()',
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-star-border.mjs","sources":["../../../projects/lib/star-border/star-border.ts","../../../projects/lib/star-border/star-border.html","../../../projects/lib/star-border/ngwr-star-border.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 * Angular adaptation of the StarBorder effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/animations/star-border\n *\n * Extends the original with `mode` (always animating vs hover-only) and\n * `rays` (mirrored pair vs a single ray).\n */\n\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrStarBorderMode, WrStarBorderRays } from './interfaces';\n\n/**\n * Star border — radial \"comet\" rays orbiting the top and bottom edges of\n * a rounded container. Project any content; it sits on a themed inner\n * panel above the rays.\n *\n * Works as an element or as an attribute on buttons / links.\n *\n * @example\n * ```html\n * <wr-star-border>Star border</wr-star-border>\n * <button wr-star-border mode=\"hover\" rays=\"single\">Hover me</button>\n * ```\n *\n * @see https://ngwr.dev/animations/star-border\n */\n@Component({\n selector: 'wr-star-border, [wr-star-border]',\n templateUrl: './star-border.html',\n styleUrl: './star-border.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '[style.--wr-star-border-color]': 'color()',\n '[style.--wr-star-border-speed]': 'speed() + \"s\"',\n '[style.padding]': 'thickness() + \"px 0\"',\n },\n})\nexport class WrStarBorder {\n /** Ray colour. When unset, the theme decides: primary on light, white on dark. */\n readonly color = input<string | null>(null);\n\n /** Seconds per ray sweep. @default 6 */\n readonly speed = input(6, { transform: numAttr(6) });\n\n /** Vertical bleed of the rays past the inner panel, in px. @default 1 */\n readonly thickness = input(1, { transform: numAttr(1) });\n\n /** `'infinite'` animates always; `'hover'` only while hovered. @default 'infinite' */\n readonly mode = input<WrStarBorderMode>('infinite');\n\n /** `'mirror'` runs rays along both edges; `'single'` only the bottom. @default 'mirror' */\n readonly rays = input<WrStarBorderRays>('mirror');\n\n protected readonly classes = (): string => {\n const parts = ['wr-star-border'];\n if (this.mode() === 'hover') parts.push('wr-star-border--hover');\n if (this.rays() === 'single') parts.push('wr-star-border--single');\n return parts.join(' ');\n };\n}\n\nexport type { WrStarBorderMode, WrStarBorderRays } from './interfaces';\n","<span class=\"wr-star-border__ray wr-star-border__ray--bottom\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__ray wr-star-border__ray--top\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__inner\"><ng-content /></span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;AAWG;AAQH;;;;;;;;;;;;;;AAcG;MAaU,YAAY,CAAA;;IAEd,KAAK,GAAG,KAAK,CAAgB,IAAI;8EAAC;;AAGlC,IAAA,KAAK,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAA,CAAG;;AAG3C,IAAA,SAAS,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,WAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAA,CAAG;;IAG/C,IAAI,GAAG,KAAK,CAAmB,UAAU;6EAAC;;IAG1C,IAAI,GAAG,KAAK,CAAmB,QAAQ;6EAAC;IAE9B,OAAO,GAAG,MAAa;AACxC,QAAA,MAAM,KAAK,GAAG,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,OAAO;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC;AAChE,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,QAAQ;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC;AAClE,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AACxB,IAAA,CAAC;uGArBU,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,+3BC9CzB,wPAGA,EAAA,MAAA,EAAA,CAAA,2sDAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FD2Ca,YAAY,EAAA,UAAA,EAAA,CAAA;kBAZxB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kCAAkC,EAAA,aAAA,EAG7B,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,gCAAgC,EAAE,SAAS;AAC3C,wBAAA,gCAAgC,EAAE,eAAe;AACjD,wBAAA,iBAAiB,EAAE,sBAAsB;AAC1C,qBAAA,EAAA,QAAA,EAAA,wPAAA,EAAA,MAAA,EAAA,CAAA,2sDAAA,CAAA,EAAA;;;AE5CH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-star-border.mjs","sources":["../../../projects/lib/star-border/star-border.ts","../../../projects/lib/star-border/star-border.html","../../../projects/lib/star-border/ngwr-star-border.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 * Angular adaptation of the StarBorder effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/animations/star-border\n *\n * Extends the original with `mode` (always animating vs hover-only) and\n * `rays` (mirrored pair vs a single ray).\n */\n\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrStarBorderMode, WrStarBorderRays } from './interfaces';\n\n/**\n * Star border — radial \"comet\" rays orbiting the top and bottom edges of\n * a rounded container. Project any content; it sits on a themed inner\n * panel above the rays.\n *\n * Works as an element or as an attribute on buttons / links.\n *\n * @example\n * ```html\n * <wr-star-border>Star border</wr-star-border>\n * <button wr-star-border mode=\"hover\" rays=\"single\">Hover me</button>\n * ```\n *\n * @see https://ngwr.dev/animations/star-border\n */\n@Component({\n selector: 'wr-star-border, [wr-star-border]',\n templateUrl: './star-border.html',\n styleUrl: './star-border.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '[style.--wr-star-border-color]': 'color()',\n '[style.--wr-star-border-speed]': 'speed() + \"s\"',\n '[style.padding]': 'thickness() + \"px 0\"',\n },\n})\nexport class WrStarBorder {\n /** Ray colour. When unset, the theme decides: primary on light, white on dark. */\n readonly color = input<string | null>(null);\n\n /** Seconds per ray sweep. @default 6 */\n readonly speed = input(6, { transform: numAttr(6) });\n\n /** Vertical bleed of the rays past the inner panel, in px. @default 1 */\n readonly thickness = input(1, { transform: numAttr(1) });\n\n /** `'infinite'` animates always; `'hover'` only while hovered. @default 'infinite' */\n readonly mode = input<WrStarBorderMode>('infinite');\n\n /** `'mirror'` runs rays along both edges; `'single'` only the bottom. @default 'mirror' */\n readonly rays = input<WrStarBorderRays>('mirror');\n\n protected readonly classes = (): string => {\n const parts = ['wr-star-border'];\n if (this.mode() === 'hover') parts.push('wr-star-border--hover');\n if (this.rays() === 'single') parts.push('wr-star-border--single');\n return parts.join(' ');\n };\n}\n\nexport type { WrStarBorderMode, WrStarBorderRays } from './interfaces';\n","<span class=\"wr-star-border__ray wr-star-border__ray--bottom\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__ray wr-star-border__ray--top\" aria-hidden=\"true\"></span>\n<span class=\"wr-star-border__inner\"><ng-content /></span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;AAWG;AAQH;;;;;;;;;;;;;;AAcG;MAaU,YAAY,CAAA;;IAEd,KAAK,GAAG,KAAK,CAAgB,IAAI;8EAAC;;AAGlC,IAAA,KAAK,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,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AAE,WAAW;AACtB,wBAAA,gCAAgC,EAAE,SAAS;AAC3C,wBAAA,gCAAgC,EAAE,eAAe;AACjD,wBAAA,iBAAiB,EAAE,sBAAsB;AAC1C,qBAAA,EAAA,QAAA,EAAA,wPAAA,EAAA,MAAA,EAAA,CAAA,2sDAAA,CAAA,EAAA;;;AE5CH;;AAEG;;"}
@@ -166,10 +166,10 @@ class WrStatistic {
166
166
  return this.deltaFormat({ value, suffix: this.resolvedDeltaSuffix() });
167
167
  }, /* @ts-ignore */
168
168
  ...(ngDevMode ? [{ debugName: "deltaText" }] : /* istanbul ignore next */ []));
169
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatistic, deps: [], target: i0.ɵɵFactoryTarget.Component });
170
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrStatistic, isStandalone: true, selector: "wr-statistic", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, precision: { classPropertyName: "precision", publicName: "precision", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaSuffix: { classPropertyName: "deltaSuffix", publicName: "deltaSuffix", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-statistic" }, ngImport: i0, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrCountUp, selector: "wr-count-up", inputs: ["from", "to", "duration", "delay", "easing", "trigger", "direction", "decimals", "prefix", "suffix", "grouping"], outputs: ["started", "completed"] }], encapsulation: i0.ViewEncapsulation.None });
169
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStatistic, deps: [], target: i0.ɵɵFactoryTarget.Component });
170
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: WrStatistic, isStandalone: true, selector: "wr-statistic", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, precision: { classPropertyName: "precision", publicName: "precision", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaSuffix: { classPropertyName: "deltaSuffix", publicName: "deltaSuffix", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-statistic" }, ngImport: i0, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrCountUp, selector: "wr-count-up", inputs: ["from", "to", "duration", "delay", "easing", "trigger", "direction", "decimals", "prefix", "suffix", "grouping"], outputs: ["started", "completed"] }], encapsulation: i0.ViewEncapsulation.None });
171
171
  }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatistic, decorators: [{
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStatistic, decorators: [{
173
173
  type: Component,
174
174
  args: [{ selector: 'wr-statistic', encapsulation: ViewEncapsulation.None, host: { class: 'wr-statistic' }, imports: [WrCountUp], template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n" }]
175
175
  }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], precision: [{ type: i0.Input, args: [{ isSignal: true, alias: "precision", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], deltaSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaSuffix", required: false }] }] } });
@@ -328,10 +328,10 @@ class WrStatisticCountdown {
328
328
  this.countdownEnd.emit();
329
329
  }
330
330
  }
331
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticCountdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
332
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrStatisticCountdown, isStandalone: true, selector: "wr-statistic-countdown", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, endText: { classPropertyName: "endText", publicName: "endText", isSignal: true, isRequired: false, transformFunction: null }, tickMs: { classPropertyName: "tickMs", publicName: "tickMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { countdownEnd: "countdownEnd" }, host: { classAttribute: "wr-statistic" }, ngImport: i0, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
331
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStatisticCountdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
332
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: WrStatisticCountdown, isStandalone: true, selector: "wr-statistic-countdown", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, endText: { classPropertyName: "endText", publicName: "endText", isSignal: true, isRequired: false, transformFunction: null }, tickMs: { classPropertyName: "tickMs", publicName: "tickMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { countdownEnd: "countdownEnd" }, host: { classAttribute: "wr-statistic" }, ngImport: i0, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
333
333
  }
334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticCountdown, decorators: [{
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStatisticCountdown, decorators: [{
335
335
  type: Component,
336
336
  args: [{ selector: 'wr-statistic-countdown', encapsulation: ViewEncapsulation.None, host: { class: 'wr-statistic' }, template: "@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n" }]
337
337
  }], ctorParameters: () => [], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], endText: [{ type: i0.Input, args: [{ isSignal: true, alias: "endText", required: false }] }], tickMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickMs", required: false }] }], countdownEnd: [{ type: i0.Output, args: ["countdownEnd"] }] } });
@@ -374,10 +374,10 @@ class WrStatisticGroup {
374
374
  * width allows. @default 0
375
375
  */
376
376
  columns = input(0, { ...(ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {}), transform: (v) => Math.max(0, coerceNumberProperty(v, 0)) });
377
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
378
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrStatisticGroup, isStandalone: true, selector: "wr-statistic-group", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--wr-statistic-group-min": "min()", "style.--wr-statistic-group-columns": "columns() || null" }, classAttribute: "wr-statistic-group" }, ngImport: i0, template: '<div class="wr-statistic-group__grid"><ng-content /></div>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
377
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStatisticGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
378
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: WrStatisticGroup, isStandalone: true, selector: "wr-statistic-group", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--wr-statistic-group-min": "min()", "style.--wr-statistic-group-columns": "columns() || null" }, classAttribute: "wr-statistic-group" }, ngImport: i0, template: '<div class="wr-statistic-group__grid"><ng-content /></div>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
379
379
  }
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStatisticGroup, decorators: [{
380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStatisticGroup, decorators: [{
381
381
  type: Component,
382
382
  args: [{
383
383
  selector: 'wr-statistic-group',
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-statistic.mjs","sources":["../../../projects/lib/statistic/statistic.ts","../../../projects/lib/statistic/statistic.html","../../../projects/lib/statistic/statistic-countdown.ts","../../../projects/lib/statistic/statistic-countdown.html","../../../projects/lib/statistic/statistic-group.ts","../../../projects/lib/statistic/ngwr-statistic.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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { WrCountUp } from 'ngwr/counter';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\n/**\n * KPI card — label + big number + optional prefix/suffix + delta. Pair\n * with `<wr-statistic-group>` for a responsive dashboard grid.\n *\n * When `value` is numeric the number counts up (eased) from its previous\n * value to the new one on every change — see `animate`. String values and\n * `prefers-reduced-motion` render instantly.\n *\n * @example\n * ```html\n * <wr-statistic label=\"Active users\" [value]=\"12345\" suffix=\"users\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [precision]=\"1\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic',\n templateUrl: './statistic.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n imports: [WrCountUp],\n})\nexport class WrStatistic {\n private readonly platform = inject(WrPlatform);\n private readonly locale = inject(LOCALE_ID);\n\n readonly label = input<string>('');\n\n /** The number (or string) to display in the main slot. */\n readonly value = input<number | string | null>(null);\n\n /** Prefix glyph / symbol (e.g. `'$'`). */\n readonly prefix = input<string>('');\n\n /** Suffix glyph / unit (e.g. `'%'`, `'kg'`). */\n readonly suffix = input<string>('');\n\n /** Fixed number of decimals applied to numeric values. @default 0 */\n readonly precision = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Count up to a new numeric `value` instead of swapping instantly. Always\n * off for string values or under `prefers-reduced-motion`. @default true\n */\n readonly animate = input(true, { transform: coerceBooleanProperty });\n\n /** Count-up duration (ms). @default 700 */\n readonly duration = input(700, { transform: numAttr(700) });\n\n /**\n * The current value coerced to a finite number, or `null` when `value` is\n * a non-numeric string / empty / nullish (rendered as-is).\n */\n protected readonly numericValue = computed<number | null>(() => {\n const raw = this.value();\n if (raw === null || raw === '') return null;\n const n = typeof raw === 'number' ? raw : coerceNumberProperty(raw, Number.NaN);\n return Number.isFinite(n) ? n : null;\n });\n\n /** Whether the value should count up (browser, numeric, opted-in, motion allowed). */\n protected readonly animated = computed<boolean>(\n () =>\n this.platform.isBrowser && this.animate() && !this.platform.prefersReducedMotion() && this.numericValue() !== null\n );\n\n /** Animation start — the previously-rendered numeric value (0 on first paint). */\n protected readonly animateFrom = signal(0);\n\n /** Bookkeeping: the last numeric value seen, fed back as the next `from`. */\n private readonly lastNumeric = signal(0);\n\n constructor() {\n // Whenever the numeric value changes, snapshot the prior value as the\n // count-up start, then remember the new one for the next transition.\n effect(() => {\n const next = this.numericValue();\n if (next === null) return;\n untracked(() => {\n this.animateFrom.set(this.lastNumeric());\n this.lastNumeric.set(next);\n });\n });\n }\n\n /**\n * Static (non-animated) display string. Numeric values honour `precision`\n * and locale grouping so they match the count-up output; everything else\n * renders verbatim with an em-dash fallback.\n */\n protected readonly displayValue = computed<string>(() => {\n const n = this.numericValue();\n if (n !== null) {\n return new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: this.precision(),\n maximumFractionDigits: this.precision(),\n }).format(n);\n }\n // `numericValue` above already reads `''` as \"no value\"; rendering it\n // verbatim put an empty card on screen instead of the placeholder.\n const raw = this.value();\n return raw === null || raw === undefined || raw === '' ? '—' : String(raw);\n });\n\n /**\n * Optional delta vs previous period — shown as `+x.x%` (or `-x.x%`).\n * Use `deltaSuffix` to change the trailing unit.\n */\n readonly delta = input<number | null>(null, {\n transform: (v: unknown): number | null => {\n if (v === null || v === undefined || v === '') return null;\n const n = coerceNumberProperty(v, Number.NaN);\n return Number.isFinite(n) ? n : null;\n },\n });\n\n // The default moved from the literal `'%'` to `null` so the catalog gets a\n // say. `%` is a string the LIBRARY owns and no locale could reach: a locale\n // that writes it differently — or writes it as a word — had nowhere to put\n // that but a per-instance binding on every `<wr-statistic>` on the page. A\n // bound value still wins, exactly as before, which is what makes this safe.\n /** Unit appended to the delta value. Falls back to `statistic.deltaSuffix`, then `'%'`. */\n readonly deltaSuffix = input<string | null>(null);\n\n protected readonly hasDelta = computed(() => this.delta() !== null);\n\n protected readonly deltaDirection = computed<'up' | 'down' | 'flat'>(() => {\n const d = this.delta();\n if (d === null || d === 0) return 'flat';\n return d > 0 ? 'up' : 'down';\n });\n\n protected readonly resolvedDeltaSuffix = useI18nText(this.deltaSuffix, 'statistic.deltaSuffix', '%');\n\n /** `{{value}}{{suffix}}` — the join, so a locale owns the space before the unit. */\n private readonly deltaFormat = useI18nFormatter('statistic.delta', '{{value}}{{suffix}}');\n\n /**\n * The delta chip, e.g. `+12.4%`.\n *\n * It was `` `${sign}${d}${suffix}` ``, printed one line under a value that\n * goes through `Intl.NumberFormat` — so the two disagreed inside one\n * component: ar-SA showed `١٬٢٣٤٬٥٦٧٫٨٩` above a Latin `12.4%`, and de-DE\n * `1.234.567,89` above `+12.4%`. The sign comes from `signDisplay`, which also\n * fixes the RTL half of it: `+` written by hand is a neutral character that\n * the BiDi algorithm moves to the other end of the number.\n *\n * The digit count is taken from the number rather than from `precision()`,\n * which describes the VALUE and not the delta — so what renders is the same\n * digits as before, in the locale's own numerals. One exception, and it is an\n * improvement rather than a regression: a magnitude JavaScript prints in\n * exponent notation (`1e-7`, `1e+21`) used to reach the DOM that way and is\n * now formatted as a number.\n */\n protected readonly deltaText = computed(() => {\n const d = this.delta();\n if (d === null) return '';\n const decimals = Math.min(20, (String(Math.abs(d)).split('.')[1] ?? '').length);\n const value = new Intl.NumberFormat(this.locale, {\n signDisplay: 'exceptZero',\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(d);\n return this.deltaFormat({ value, suffix: this.resolvedDeltaSuffix() });\n });\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n","/**\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 { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\n// Helpers\n\nfunction toMs(value: Date | string | number): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value === 'number') return value;\n return new Date(value).getTime();\n}\n\nfunction pad(n: number, width: number): string {\n return String(n).padStart(width, '0');\n}\n\nfunction formatRemaining(ms: number, fmt: string): string {\n const days = Math.floor(ms / 86_400_000);\n const hours = Math.floor((ms % 86_400_000) / 3_600_000);\n const minutes = Math.floor((ms % 3_600_000) / 60_000);\n const seconds = Math.floor((ms % 60_000) / 1000);\n const millis = ms % 1000;\n // Single-pass tokenizer so we never re-scan output for tokens. The\n // previous sequential `.replace()` chain leaked: e.g. `D days HH:mm:ss`\n // → `1 day42 11:59:42` because the `/s/g` step at the end re-matched\n // the literal `s` inside `days`. Longest-token-first ordering inside\n // the alternation handles `DD`>`D`, `HH`>`H`, `mm`>`m`, `SSS`>`ss`>`s`.\n return fmt.replace(/(?<![A-Za-z])(?:SSS|DD|HH|mm|ss|D|H|m|s)(?![A-Za-z])/g, token => {\n switch (token) {\n case 'DD':\n return pad(days, 2);\n case 'D':\n return String(days);\n case 'HH':\n return pad(hours, 2);\n case 'H':\n return String(hours);\n case 'mm':\n return pad(minutes, 2);\n case 'm':\n return String(minutes);\n case 'ss':\n return pad(seconds, 2);\n case 's':\n return String(seconds);\n case 'SSS':\n return pad(millis, 3);\n default:\n return token;\n }\n });\n}\n\n/**\n * Live-counting variant of `<wr-statistic>` that targets a future date\n * and ticks down to zero. The format string uses Day/Hour/Minute/Second\n * tokens (`D`, `H`, `m`, `s`, double for zero-padded, plus `SSS` for\n * milliseconds).\n *\n * @example\n * ```html\n * <wr-statistic-countdown\n * label=\"Launch in\"\n * [target]=\"launchDate\"\n * format=\"D days HH:mm:ss\"\n * (countdownEnd)=\"onLive()\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-countdown',\n templateUrl: './statistic-countdown.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n})\nexport class WrStatisticCountdown {\n /** Target date / timestamp the countdown is running down to. */\n readonly target = input.required<Date | string | number>();\n\n /** Label rendered above the value. */\n readonly label = input<string>('');\n\n /**\n * Format string. Tokens: `D`/`DD` (days), `H`/`HH` (hours),\n * `m`/`mm` (minutes), `s`/`ss` (seconds), `SSS` (milliseconds).\n * Double-letter forms zero-pad to width 2. @default 'HH:mm:ss'\n */\n readonly format = input<string>('HH:mm:ss');\n\n /** Optional text shown once the countdown reaches zero. */\n readonly endText = input<string | null>(null);\n\n /**\n * Tick interval in ms. Drop to ~16 for `SSS` (millisecond display). Floored\n * at one frame — `0` (or an unparseable value) asked `setInterval` to run as\n * fast as the browser would allow, which is a busy loop, not a countdown.\n * @default 1000\n */\n readonly tickMs = input(1000, { transform: (v: unknown): number => Math.max(16, numAttr(1000)(v)) });\n\n /** Fires once when the countdown crosses zero. */\n readonly countdownEnd = output<void>();\n\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly targetMs = computed(() => toMs(this.target()));\n\n /**\n * Milliseconds left, or `null` when `target` does not parse to a date at all.\n * `new Date('nope').getTime()` is `NaN`, and `NaN` propagated all the way to\n * the screen as `NaN:NaN:NaN` — and, worse, `tick` compared it to `0` and so\n * never fired `countdownEnd`, while a guard that only clamped the text would\n * have fired it immediately for a target that was never reached.\n */\n private remainingMs(): number | null {\n const target = this.targetMs();\n return Number.isFinite(target) ? Math.max(0, target - Date.now()) : null;\n }\n\n /** Remaining milliseconds (live signal). */\n protected readonly remaining = signal(0);\n protected readonly finished = signal(false);\n\n protected readonly display = computed(() => {\n if (this.finished() && this.endText() != null) return this.endText()!;\n return formatRemaining(this.remaining(), this.format());\n });\n\n constructor() {\n // Seed once synchronously so SSR / first paint shows a sane value.\n effect(() => {\n const ms = this.remainingMs();\n this.remaining.set(ms ?? 0);\n this.finished.set(ms === 0);\n });\n\n if (!this.isBrowser) return;\n\n // The interval is REBUILT when `tickMs` changes, which is what makes the\n // input bindable rather than an authoring-time constant. Read once from\n // inside `afterNextRender` it was a plain, untracked read, so\n // `[tickMs]=\"precise() ? 16 : 1000\"` kept whatever period the first frame\n // saw and nothing looked wrong — the countdown still counted. Same shape\n // `wr-rotating-text` uses for its own rotation period; the `onCleanup` is\n // what keeps a period change from leaving the old interval running beside\n // the new one.\n effect(onCleanup => {\n const handle = setInterval(() => this.tick(), this.tickMs());\n onCleanup(() => clearInterval(handle));\n });\n }\n\n private tick(): void {\n const ms = this.remainingMs();\n if (ms === null) return;\n this.remaining.set(ms);\n if (ms === 0 && !this.finished()) {\n this.finished.set(true);\n this.countdownEnd.emit();\n }\n }\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n","/**\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Dashboard grid for `<wr-statistic>` cards. The column count follows the\n * group's OWN width — an intrinsic container-query grid sized by its box, not\n * a viewport media query — so it reflows correctly inside any column, card, or\n * split pane. Columns are never narrower than `min`; `columns` optionally caps\n * how many ever sit side by side on a wide container.\n *\n * @example\n * ```html\n * <wr-statistic-group [columns]=\"4\" min=\"11rem\">\n * <wr-statistic label=\"Active users\" [value]=\"12345\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [delta]=\"-0.4\" />\n * <wr-statistic label=\"Sessions\" [value]=\"48210\" />\n * </wr-statistic-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-group',\n template: '<div class=\"wr-statistic-group__grid\"><ng-content /></div>',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-statistic-group',\n '[style.--wr-statistic-group-min]': 'min()',\n '[style.--wr-statistic-group-columns]': 'columns() || null',\n },\n})\nexport class WrStatisticGroup {\n /**\n * Minimum width of each column before the grid reflows to fewer columns.\n * Any CSS length — smaller packs more cards per row. @default '12rem'\n */\n readonly min = input<string>('12rem');\n\n /**\n * Cap on how many columns ever sit side by side on a wide container. `0`\n * (default) leaves it uncapped — fit as many `min`-wide columns as the\n * width allows. @default 0\n */\n readonly columns = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAoBH;;;;;;;;;;;;;;;;AAgBG;MAQU,WAAW,CAAA;AACL,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;IAElC,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;;IAGzB,KAAK,GAAG,KAAK,CAAyB,IAAI;8EAAC;;IAG3C,MAAM,GAAG,KAAK,CAAS,EAAE;+EAAC;;IAG1B,MAAM,GAAG,KAAK,CAAS,EAAE;+EAAC;;IAG1B,SAAS,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,WAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAA,CAAG;AAE7G;;;AAGG;IACM,OAAO,GAAG,KAAK,CAAC,IAAI,+EAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;AAG3D,IAAA,QAAQ,GAAG,KAAK,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BAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,kCAAkC,EAAE,OAAO;AAC3C,wBAAA,sCAAsC,EAAE,mBAAmB;AAC5D,qBAAA;AACF,iBAAA;;;ACtCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-statistic.mjs","sources":["../../../projects/lib/statistic/statistic.ts","../../../projects/lib/statistic/statistic.html","../../../projects/lib/statistic/statistic-countdown.ts","../../../projects/lib/statistic/statistic-countdown.html","../../../projects/lib/statistic/statistic-group.ts","../../../projects/lib/statistic/ngwr-statistic.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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\n\nimport { WrCountUp } from 'ngwr/counter';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\n/**\n * KPI card — label + big number + optional prefix/suffix + delta. Pair\n * with `<wr-statistic-group>` for a responsive dashboard grid.\n *\n * When `value` is numeric the number counts up (eased) from its previous\n * value to the new one on every change — see `animate`. String values and\n * `prefers-reduced-motion` render instantly.\n *\n * @example\n * ```html\n * <wr-statistic label=\"Active users\" [value]=\"12345\" suffix=\"users\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [precision]=\"1\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic',\n templateUrl: './statistic.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n imports: [WrCountUp],\n})\nexport class WrStatistic {\n private readonly platform = inject(WrPlatform);\n private readonly locale = inject(LOCALE_ID);\n\n readonly label = input<string>('');\n\n /** The number (or string) to display in the main slot. */\n readonly value = input<number | string | null>(null);\n\n /** Prefix glyph / symbol (e.g. `'$'`). */\n readonly prefix = input<string>('');\n\n /** Suffix glyph / unit (e.g. `'%'`, `'kg'`). */\n readonly suffix = input<string>('');\n\n /** Fixed number of decimals applied to numeric values. @default 0 */\n readonly precision = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Count up to a new numeric `value` instead of swapping instantly. Always\n * off for string values or under `prefers-reduced-motion`. @default true\n */\n readonly animate = input(true, { transform: coerceBooleanProperty });\n\n /** Count-up duration (ms). @default 700 */\n readonly duration = input(700, { transform: numAttr(700) });\n\n /**\n * The current value coerced to a finite number, or `null` when `value` is\n * a non-numeric string / empty / nullish (rendered as-is).\n */\n protected readonly numericValue = computed<number | null>(() => {\n const raw = this.value();\n if (raw === null || raw === '') return null;\n const n = typeof raw === 'number' ? raw : coerceNumberProperty(raw, Number.NaN);\n return Number.isFinite(n) ? n : null;\n });\n\n /** Whether the value should count up (browser, numeric, opted-in, motion allowed). */\n protected readonly animated = computed<boolean>(\n () =>\n this.platform.isBrowser && this.animate() && !this.platform.prefersReducedMotion() && this.numericValue() !== null\n );\n\n /** Animation start — the previously-rendered numeric value (0 on first paint). */\n protected readonly animateFrom = signal(0);\n\n /** Bookkeeping: the last numeric value seen, fed back as the next `from`. */\n private readonly lastNumeric = signal(0);\n\n constructor() {\n // Whenever the numeric value changes, snapshot the prior value as the\n // count-up start, then remember the new one for the next transition.\n effect(() => {\n const next = this.numericValue();\n if (next === null) return;\n untracked(() => {\n this.animateFrom.set(this.lastNumeric());\n this.lastNumeric.set(next);\n });\n });\n }\n\n /**\n * Static (non-animated) display string. Numeric values honour `precision`\n * and locale grouping so they match the count-up output; everything else\n * renders verbatim with an em-dash fallback.\n */\n protected readonly displayValue = computed<string>(() => {\n const n = this.numericValue();\n if (n !== null) {\n return new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: this.precision(),\n maximumFractionDigits: this.precision(),\n }).format(n);\n }\n // `numericValue` above already reads `''` as \"no value\"; rendering it\n // verbatim put an empty card on screen instead of the placeholder.\n const raw = this.value();\n return raw === null || raw === undefined || raw === '' ? '—' : String(raw);\n });\n\n /**\n * Optional delta vs previous period — shown as `+x.x%` (or `-x.x%`).\n * Use `deltaSuffix` to change the trailing unit.\n */\n readonly delta = input<number | null>(null, {\n transform: (v: unknown): number | null => {\n if (v === null || v === undefined || v === '') return null;\n const n = coerceNumberProperty(v, Number.NaN);\n return Number.isFinite(n) ? n : null;\n },\n });\n\n // The default moved from the literal `'%'` to `null` so the catalog gets a\n // say. `%` is a string the LIBRARY owns and no locale could reach: a locale\n // that writes it differently — or writes it as a word — had nowhere to put\n // that but a per-instance binding on every `<wr-statistic>` on the page. A\n // bound value still wins, exactly as before, which is what makes this safe.\n /** Unit appended to the delta value. Falls back to `statistic.deltaSuffix`, then `'%'`. */\n readonly deltaSuffix = input<string | null>(null);\n\n protected readonly hasDelta = computed(() => this.delta() !== null);\n\n protected readonly deltaDirection = computed<'up' | 'down' | 'flat'>(() => {\n const d = this.delta();\n if (d === null || d === 0) return 'flat';\n return d > 0 ? 'up' : 'down';\n });\n\n protected readonly resolvedDeltaSuffix = useI18nText(this.deltaSuffix, 'statistic.deltaSuffix', '%');\n\n /** `{{value}}{{suffix}}` — the join, so a locale owns the space before the unit. */\n private readonly deltaFormat = useI18nFormatter('statistic.delta', '{{value}}{{suffix}}');\n\n /**\n * The delta chip, e.g. `+12.4%`.\n *\n * It was `` `${sign}${d}${suffix}` ``, printed one line under a value that\n * goes through `Intl.NumberFormat` — so the two disagreed inside one\n * component: ar-SA showed `١٬٢٣٤٬٥٦٧٫٨٩` above a Latin `12.4%`, and de-DE\n * `1.234.567,89` above `+12.4%`. The sign comes from `signDisplay`, which also\n * fixes the RTL half of it: `+` written by hand is a neutral character that\n * the BiDi algorithm moves to the other end of the number.\n *\n * The digit count is taken from the number rather than from `precision()`,\n * which describes the VALUE and not the delta — so what renders is the same\n * digits as before, in the locale's own numerals. One exception, and it is an\n * improvement rather than a regression: a magnitude JavaScript prints in\n * exponent notation (`1e-7`, `1e+21`) used to reach the DOM that way and is\n * now formatted as a number.\n */\n protected readonly deltaText = computed(() => {\n const d = this.delta();\n if (d === null) return '';\n const decimals = Math.min(20, (String(Math.abs(d)).split('.')[1] ?? '').length);\n const value = new Intl.NumberFormat(this.locale, {\n signDisplay: 'exceptZero',\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(d);\n return this.deltaFormat({ value, suffix: this.resolvedDeltaSuffix() });\n });\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n @if (prefix()) {\n <span class=\"wr-statistic__prefix\">{{ prefix() }}</span>\n }\n @if (animated()) {\n <wr-count-up\n class=\"wr-statistic__number\"\n [from]=\"animateFrom()\"\n [to]=\"numericValue() ?? 0\"\n [decimals]=\"precision()\"\n [duration]=\"duration()\"\n />\n } @else {\n <span class=\"wr-statistic__number\">{{ displayValue() }}</span>\n }\n @if (suffix()) {\n <span class=\"wr-statistic__suffix\">{{ suffix() }}</span>\n }\n</div>\n@if (hasDelta()) {\n <div [class]=\"`wr-statistic__delta wr-statistic__delta--${deltaDirection()}`\">\n @if (deltaDirection() === 'up') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 1 L9 8 L1 8 Z\" fill=\"currentColor\" />\n </svg>\n } @else if (deltaDirection() === 'down') {\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M5 9 L9 2 L1 2 Z\" fill=\"currentColor\" />\n </svg>\n }\n <span>{{ deltaText() }}</span>\n </div>\n}\n","/**\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 { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { numAttr } from 'ngwr/utils';\n\n// Helpers\n\nfunction toMs(value: Date | string | number): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value === 'number') return value;\n return new Date(value).getTime();\n}\n\nfunction pad(n: number, width: number): string {\n return String(n).padStart(width, '0');\n}\n\nfunction formatRemaining(ms: number, fmt: string): string {\n const days = Math.floor(ms / 86_400_000);\n const hours = Math.floor((ms % 86_400_000) / 3_600_000);\n const minutes = Math.floor((ms % 3_600_000) / 60_000);\n const seconds = Math.floor((ms % 60_000) / 1000);\n const millis = ms % 1000;\n // Single-pass tokenizer so we never re-scan output for tokens. The\n // previous sequential `.replace()` chain leaked: e.g. `D days HH:mm:ss`\n // → `1 day42 11:59:42` because the `/s/g` step at the end re-matched\n // the literal `s` inside `days`. Longest-token-first ordering inside\n // the alternation handles `DD`>`D`, `HH`>`H`, `mm`>`m`, `SSS`>`ss`>`s`.\n return fmt.replace(/(?<![A-Za-z])(?:SSS|DD|HH|mm|ss|D|H|m|s)(?![A-Za-z])/g, token => {\n switch (token) {\n case 'DD':\n return pad(days, 2);\n case 'D':\n return String(days);\n case 'HH':\n return pad(hours, 2);\n case 'H':\n return String(hours);\n case 'mm':\n return pad(minutes, 2);\n case 'm':\n return String(minutes);\n case 'ss':\n return pad(seconds, 2);\n case 's':\n return String(seconds);\n case 'SSS':\n return pad(millis, 3);\n default:\n return token;\n }\n });\n}\n\n/**\n * Live-counting variant of `<wr-statistic>` that targets a future date\n * and ticks down to zero. The format string uses Day/Hour/Minute/Second\n * tokens (`D`, `H`, `m`, `s`, double for zero-padded, plus `SSS` for\n * milliseconds).\n *\n * @example\n * ```html\n * <wr-statistic-countdown\n * label=\"Launch in\"\n * [target]=\"launchDate\"\n * format=\"D days HH:mm:ss\"\n * (countdownEnd)=\"onLive()\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-countdown',\n templateUrl: './statistic-countdown.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-statistic' },\n})\nexport class WrStatisticCountdown {\n /** Target date / timestamp the countdown is running down to. */\n readonly target = input.required<Date | string | number>();\n\n /** Label rendered above the value. */\n readonly label = input<string>('');\n\n /**\n * Format string. Tokens: `D`/`DD` (days), `H`/`HH` (hours),\n * `m`/`mm` (minutes), `s`/`ss` (seconds), `SSS` (milliseconds).\n * Double-letter forms zero-pad to width 2. @default 'HH:mm:ss'\n */\n readonly format = input<string>('HH:mm:ss');\n\n /** Optional text shown once the countdown reaches zero. */\n readonly endText = input<string | null>(null);\n\n /**\n * Tick interval in ms. Drop to ~16 for `SSS` (millisecond display). Floored\n * at one frame — `0` (or an unparseable value) asked `setInterval` to run as\n * fast as the browser would allow, which is a busy loop, not a countdown.\n * @default 1000\n */\n readonly tickMs = input(1000, { transform: (v: unknown): number => Math.max(16, numAttr(1000)(v)) });\n\n /** Fires once when the countdown crosses zero. */\n readonly countdownEnd = output<void>();\n\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly targetMs = computed(() => toMs(this.target()));\n\n /**\n * Milliseconds left, or `null` when `target` does not parse to a date at all.\n * `new Date('nope').getTime()` is `NaN`, and `NaN` propagated all the way to\n * the screen as `NaN:NaN:NaN` — and, worse, `tick` compared it to `0` and so\n * never fired `countdownEnd`, while a guard that only clamped the text would\n * have fired it immediately for a target that was never reached.\n */\n private remainingMs(): number | null {\n const target = this.targetMs();\n return Number.isFinite(target) ? Math.max(0, target - Date.now()) : null;\n }\n\n /** Remaining milliseconds (live signal). */\n protected readonly remaining = signal(0);\n protected readonly finished = signal(false);\n\n protected readonly display = computed(() => {\n if (this.finished() && this.endText() != null) return this.endText()!;\n return formatRemaining(this.remaining(), this.format());\n });\n\n constructor() {\n // Seed once synchronously so SSR / first paint shows a sane value.\n effect(() => {\n const ms = this.remainingMs();\n this.remaining.set(ms ?? 0);\n this.finished.set(ms === 0);\n });\n\n if (!this.isBrowser) return;\n\n // The interval is REBUILT when `tickMs` changes, which is what makes the\n // input bindable rather than an authoring-time constant. Read once from\n // inside `afterNextRender` it was a plain, untracked read, so\n // `[tickMs]=\"precise() ? 16 : 1000\"` kept whatever period the first frame\n // saw and nothing looked wrong — the countdown still counted. Same shape\n // `wr-rotating-text` uses for its own rotation period; the `onCleanup` is\n // what keeps a period change from leaving the old interval running beside\n // the new one.\n effect(onCleanup => {\n const handle = setInterval(() => this.tick(), this.tickMs());\n onCleanup(() => clearInterval(handle));\n });\n }\n\n private tick(): void {\n const ms = this.remainingMs();\n if (ms === null) return;\n this.remaining.set(ms);\n if (ms === 0 && !this.finished()) {\n this.finished.set(true);\n this.countdownEnd.emit();\n }\n }\n}\n","@if (label()) {\n <div class=\"wr-statistic__label\">{{ label() }}</div>\n}\n<div class=\"wr-statistic__value\">\n <span class=\"wr-statistic__number\">{{ display() }}</span>\n</div>\n","/**\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Dashboard grid for `<wr-statistic>` cards. The column count follows the\n * group's OWN width — an intrinsic container-query grid sized by its box, not\n * a viewport media query — so it reflows correctly inside any column, card, or\n * split pane. Columns are never narrower than `min`; `columns` optionally caps\n * how many ever sit side by side on a wide container.\n *\n * @example\n * ```html\n * <wr-statistic-group [columns]=\"4\" min=\"11rem\">\n * <wr-statistic label=\"Active users\" [value]=\"12345\" />\n * <wr-statistic label=\"Revenue\" [value]=\"9512\" prefix=\"$\" [delta]=\"12.4\" />\n * <wr-statistic label=\"Churn\" [value]=\"1.8\" suffix=\"%\" [delta]=\"-0.4\" />\n * <wr-statistic label=\"Sessions\" [value]=\"48210\" />\n * </wr-statistic-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/statistic\n */\n@Component({\n selector: 'wr-statistic-group',\n template: '<div class=\"wr-statistic-group__grid\"><ng-content /></div>',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-statistic-group',\n '[style.--wr-statistic-group-min]': 'min()',\n '[style.--wr-statistic-group-columns]': 'columns() || null',\n },\n})\nexport class WrStatisticGroup {\n /**\n * Minimum width of each column before the grid reflows to fewer columns.\n * Any CSS length — smaller packs more cards per row. @default '12rem'\n */\n readonly min = input<string>('12rem');\n\n /**\n * Cap on how many columns ever sit side by side on a wide container. `0`\n * (default) leaves it uncapped — fit as many `min`-wide columns as the\n * width allows. @default 0\n */\n readonly columns = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAoBH;;;;;;;;;;;;;;;;AAgBG;MAQU,WAAW,CAAA;AACL,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;IAElC,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;;IAGzB,KAAK,GAAG,KAAK,CAAyB,IAAI;8EAAC;;IAG3C,MAAM,GAAG,KAAK,CAAS,EAAE;+EAAC;;IAG1B,MAAM,GAAG,KAAK,CAAS,EAAE;+EAAC;;IAG1B,SAAS,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,WAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAAS,EAAE,CAAC,CAAU,KAAa,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAA,CAAG;AAE7G;;;AAGG;IACM,OAAO,GAAG,KAA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AoB;AAC9B,oBAAA,QAAQ,EAAE,4DAA4D;oBACtE,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,kCAAkC,EAAE,OAAO;AAC3C,wBAAA,sCAAsC,EAAE,mBAAmB;AAC5D,qBAAA;AACF,iBAAA;;;ACtCD;;AAEG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-stepper-testing.mjs","sources":["../../../projects/lib/stepper/testing/wr-stepper-harness-text.ts","../../../projects/lib/stepper/testing/wr-step-harness.ts","../../../projects/lib/stepper/testing/wr-stepper-harness.ts","../../../projects/lib/stepper/testing/ngwr-stepper-testing.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\n/**\n * Collapse the whitespace inside a header or a step body to the line a user reads.\n *\n * `TestElement.text()` only trims the ends, and neither of the two things read here\n * is one text node: a header's label span holds the label, the \"optional\" badge and\n * the description as siblings, and a step body is whatever the consumer projected.\n * The template's own indentation is not the problem — Angular's default\n * `preserveWhitespaces: false` drops whitespace-only text nodes at compile time —\n * but a value carrying a newline is, and so is a consumer app compiled with\n * `preserveWhitespaces: true`. Every run becomes one space so a spec can assert the\n * rendered line either way.\n */\nexport function wrStepperHarnessText(text: string): string {\n return text.replace(/\\s+/g, ' ').trim();\n}\n","/**\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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrStepHarnessFilters } from './interfaces';\nimport { wrStepperHarnessText } from './wr-stepper-harness-text';\n\n/**\n * Test harness for one step of a `<wr-stepper>` — the step as the HEADER STRIP\n * publishes it: its label, its state, and the one control that navigates to it.\n *\n * A step is two pieces of DOM in two different places. The `<wr-step>` the consumer\n * wrote is projected into the stepper's body region; the header this harness hosts on\n * is generated next to it, in the `<ol>` above. Nothing links the two — no\n * `aria-controls`, no id on the body — so `WrStepperHarness.getActiveStepText()` is\n * where the body is read, and this answers what the wizard says about the step.\n *\n * Two states that look alike here are deliberately separate, because the component\n * treats them separately: {@link isDisabled} is the step's own `disabled` input\n * (switched off, whatever else happens), and {@link isReachable} is whether a click\n * would land right now — which a `linear` stepper takes away from every step ahead of\n * the gate without disabling any of them.\n *\n * @example\n * ```ts\n * const [review] = await stepper.getSteps({ label: 'Review' });\n *\n * expect(await review.isOptional()).toBe(true);\n * expect(await review.isReachable()).toBe(false);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrStepHarness extends ComponentHarness {\n /**\n * The header `<li>`, which is the whole step as far as the strip is concerned.\n *\n * Not `.wr-stepper__header-button`: the state modifiers (`--active`, `--completed`,\n * `--disabled`) land on the `<li>`, and the button is a child of it.\n */\n static hostSelector = '.wr-stepper__header';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrStepHarnessFilters = {}): HarnessPredicate<WrStepHarness> {\n return new HarnessPredicate(WrStepHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('active', options.active, async (harness, active) => (await harness.isActive()) === active)\n .addOption(\n 'completed',\n options.completed,\n async (harness, completed) => (await harness.isCompleted()) === completed\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption(\n 'reachable',\n options.reachable,\n async (harness, reachable) => (await harness.isReachable()) === reachable\n )\n .addOption('optional', options.optional, async (harness, optional) => (await harness.isOptional()) === optional);\n }\n\n private readonly button = this.locatorFor('button.wr-stepper__header-button');\n\n /**\n * The step's label, and only the label.\n *\n * The \"optional\" badge and the description are siblings of the label text inside\n * the same span, so both are excluded — a step addressed by label should be\n * addressable whether or not it also carries a description.\n */\n async getLabel(): Promise<string> {\n const label = await this.locatorFor('.wr-stepper__label')();\n return wrStepperHarnessText(await label.text({ exclude: '.wr-stepper__optional, .wr-stepper__description' }));\n }\n\n /** The secondary line under the label, or `null` when the step defines none. */\n async getDescription(): Promise<string | null> {\n const description = await this.locatorForOptional('.wr-stepper__description')();\n return description ? wrStepperHarnessText(await description.text()) : null;\n }\n\n /** Whether the header flags the step as optional. */\n async isOptional(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-stepper__optional')()) !== null;\n }\n\n /**\n * What a screen reader announces for the header button.\n *\n * The indicator is excluded because it is `aria-hidden`: the step number and the\n * completed tick are decoration, deliberately, since the label and\n * `aria-current=\"step\"` already carry what they would repeat. What IS announced is\n * the label plus the \"optional\" badge and the description — so this is the method\n * that notices when one of those stops being part of the name.\n */\n async getAccessibleName(): Promise<string> {\n const button = await this.button();\n return wrStepperHarnessText(await button.text({ exclude: '.wr-stepper__indicator' }));\n }\n\n /**\n * Whether this is the step the wizard is showing.\n *\n * From `aria-current=\"step\"` rather than the `--active` class, because that is the\n * only place the wizard's position is published to a screen reader, and the two can\n * only ever disagree by way of a bug.\n */\n async isActive(): Promise<boolean> {\n return (await (await this.button()).getAttribute('aria-current')) === 'step';\n }\n\n /**\n * Whether the step is shown as done.\n *\n * Read from the `--completed` class, and there is no ARIA alternative to prefer:\n * completion reaches the page as that class plus a tick glyph that is\n * `aria-hidden`, so a screen-reader user hears the label and nothing else. The\n * class is the whole of what exists.\n *\n * Completion is derived from the active index — every step before it — unless a\n * step's own `completed` input overrides it, which is how a `linear` wizard opens\n * its gate. So a step after the active one can be completed too.\n */\n async isCompleted(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper__header--completed');\n }\n\n /**\n * Whether the step is switched off by its own `disabled` input.\n *\n * The `--disabled` class is exactly that input, which is why it is read here rather\n * than the button's `disabled`: the button is also disabled for a step that is\n * merely behind a `linear` gate, and those are different facts about the wizard.\n * See {@link isReachable} for the one about right now.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper__header--disabled');\n }\n\n /**\n * Whether a click on this header would move the wizard here.\n *\n * Read from the button's `disabled` PROPERTY, because that is the enforcement and\n * not the paint: the component disables the header for a step its own input\n * switched off AND for one a `linear` gate has not opened yet. It is also what puts\n * the header in or out of the tab order — a `disabled` button cannot be focused at\n * all, so an unreachable step is off the keyboard entirely rather than focusable and\n * inert the way `aria-disabled` would leave it.\n */\n async isReachable(): Promise<boolean> {\n return !(await (await this.button()).getProperty<boolean>('disabled'));\n }\n\n /**\n * Navigate to this step by clicking its header, the way a user does.\n *\n * A click, not a keypress: the header is a real `<button>`, so Enter and Space\n * activate it through the browser's native activation — behaviour jsdom does not\n * implement, leaving nothing for a key to drive. A no-arg CDK click needs no\n * coordinate and no hit test, so the absent layout costs nothing here.\n *\n * Throws when the header refuses, rather than clicking and resolving quietly: the\n * component's guard would drop the click and the wizard would still be showing the\n * old step three assertions later. Reach for `WrStepperHarness.goTo()` when you\n * want the failure to name WHICH earlier step is holding the gate shut.\n */\n async select(): Promise<void> {\n if (!(await this.isReachable())) {\n throw new Error(\n `WrStepHarness.select(): the header for \"${await this.getLabel()}\" refuses a click — the step carries ` +\n '`disabled`, or the stepper is `linear` and an earlier step has not reported itself complete.'\n );\n }\n await (await this.button()).click();\n }\n\n /** Move keyboard focus to the header. A header that is not reachable cannot take it. */\n async focus(): Promise<void> {\n return (await this.button()).focus();\n }\n\n /** Whether the header currently has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.button()).isFocused();\n }\n}\n","/**\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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrStepHarnessFilters, WrStepperHarnessFilters } from './interfaces';\nimport { WrStepHarness } from './wr-step-harness';\nimport { wrStepperHarnessText } from './wr-stepper-harness-text';\n\n/**\n * Test harness for `<wr-stepper>` — the root of a two-part family with\n * {@link WrStepHarness}, which is one step of it.\n *\n * Steps are addressed by their index or their LABEL, the two things a consumer can\n * see; there is no key or id on a `<wr-step>` to address it by.\n *\n * Navigation here always goes through the HEADER STRIP, because that is the only\n * control the component renders — a wizard's Next and Back buttons are the\n * consumer's own, and they call `WrStepper.next()` / `prev()`. That distinction is\n * not cosmetic: the imperative API does NOT consult `linear`, so it walks straight\n * past a gate that refuses the equivalent header click. {@link next} and\n * {@link goTo} therefore refuse exactly where a user would be refused, and a spec\n * covering the wizard's own buttons should drive those buttons (through their own\n * harness) instead of these.\n *\n * @example\n * ```ts\n * const wizard = await loader.getHarness(WrStepperHarness);\n *\n * expect(await wizard.getStepLabels()).toEqual(['Account', 'Address', 'Review']);\n * expect(await wizard.canGoTo(2)).toBe(false);\n * await wizard.goToLabel('Address');\n * expect(await wizard.getActiveStepText()).toBe('Address body');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrStepperHarness extends ComponentHarness {\n static hostSelector = 'wr-stepper';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrStepperHarnessFilters = {}): HarnessPredicate<WrStepperHarness> {\n return new HarnessPredicate(WrStepperHarness, options)\n .addOption('stepLabel', options.stepLabel, async (harness, label) => {\n for (const stepLabel of await harness.getStepLabels()) {\n if (await HarnessPredicate.stringMatches(stepLabel, label)) return true;\n }\n return false;\n })\n .addOption(\n 'orientation',\n options.orientation,\n async (harness, orientation) => (await harness.getOrientation()) === orientation\n )\n .addOption('linear', options.linear, async (harness, linear) => (await harness.isLinear()) === linear);\n }\n\n private readonly headerList = this.locatorFor('ol.wr-stepper__headers');\n\n /**\n * The layout direction the stepper was ASKED for.\n *\n * Unusually for this library both values carry a class, so neither is read as the\n * absence of the other. What the class cannot tell you is how the strip actually\n * laid itself out: a `responsive` horizontal stepper drops to the vertical layout\n * when its own box is too narrow, and that reflow is a container query — the class\n * never changes. No unit test can see the difference in any case, jsdom having no\n * layout at all; assert the opt-in with {@link isResponsive} instead.\n */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n return (await (await this.host()).hasClass('wr-stepper--vertical')) ? 'vertical' : 'horizontal';\n }\n\n /** Whether the stepper locks the steps after the last completed one. */\n async isLinear(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper--linear');\n }\n\n /** Whether the stepper may reflow to the vertical layout in a narrow container. */\n async isResponsive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper--responsive');\n }\n\n /**\n * The role the header strip announces — `list`.\n *\n * An `<ol>` is a list already, so the explicit role looks redundant and is not: the\n * stylesheet removes the markers, and Safari drops list semantics from a list with\n * `list-style: none`. Losing it costs the \"list, 3 items\" a VoiceOver user hears,\n * which is how they learn how long the wizard is before starting it.\n */\n async getListRole(): Promise<string | null> {\n return (await this.headerList()).getAttribute('role');\n }\n\n /** The wizard's steps, in order. */\n async getSteps(filters: WrStepHarnessFilters = {}): Promise<WrStepHarness[]> {\n return this.locatorForAll(WrStepHarness.with(filters))();\n }\n\n /** The label of every step, in order. */\n async getStepLabels(): Promise<string[]> {\n const steps = await this.getSteps();\n return Promise.all(steps.map(step => step.getLabel()));\n }\n\n /**\n * The index of the step the wizard is showing, from the header announcing\n * `aria-current=\"step\"`.\n *\n * Throws when no header does, which is a state a stepper can genuinely be in: one\n * with no `<wr-step>` children renders its (empty) header strip and no body. A `-1`\n * here would be read as \"the first step\" by the next line of a spec. An\n * out-of-range `active` is NOT such a state — `WrStepper` clamps the two-way model\n * back into the step list, not only inside `goTo()`.\n */\n async getActiveIndex(): Promise<number> {\n const steps = await this.getSteps();\n for (let index = 0; index < steps.length; index++) {\n if (await steps[index].isActive()) return index;\n }\n\n throw new Error(\n 'WrStepperHarness.getActiveIndex(): no header announces `aria-current=\"step\"` — this stepper has ' +\n 'no <wr-step> children, so there is no step for it to be on. An out-of-range `active` cannot ' +\n 'produce this: WrStepper clamps the bound index to the step list.'\n );\n }\n\n /** The label of the step the wizard is showing. Throws when there is no current step. */\n async getActiveLabel(): Promise<string> {\n const steps = await this.getSteps();\n return steps[await this.getActiveIndex()].getLabel();\n }\n\n /** The labels of the steps shown as done, in order. Derived completion and overrides both. */\n async getCompletedLabels(): Promise<string[]> {\n const steps = await this.getSteps({ completed: true });\n return Promise.all(steps.map(step => step.getLabel()));\n }\n\n /**\n * The labels of the headers a Tab press can reach, in order.\n *\n * A stepper does NOT rove focus: unlike a tab strip, the header list is not one tab\n * stop with arrow keys inside it — every reachable header is its own stop, and the\n * component authors no `tabindex` at all. So the question \"which step is active\" has\n * two different answers, and this is the other one: the current step is not\n * necessarily in this list. A step disabled by its own input keeps\n * `aria-current=\"step\"` while its button drops out of the tab order entirely, and a\n * `linear` stepper takes every locked header off the keyboard the same way.\n */\n async getTabStopLabels(): Promise<string[]> {\n const steps = await this.getSteps({ reachable: true });\n return Promise.all(steps.map(step => step.getLabel()));\n }\n\n /** The label of the header that currently has focus, or `null` when focus is elsewhere. */\n async getFocusedLabel(): Promise<string | null> {\n for (const step of await this.getSteps()) {\n if (await step.isFocused()) return step.getLabel();\n }\n return null;\n }\n\n /**\n * Whether the wizard would let a user navigate to this step right now — the question\n * a `linear` stepper exists to answer `false` to.\n *\n * Throws for an index that is not a step, rather than answering `false`: \"you cannot\n * go there\" and \"there is no there\" are different findings.\n */\n async canGoTo(index: number): Promise<boolean> {\n return (await this.stepAt(index)).isReachable();\n }\n\n /**\n * Navigate to the step at `index` by clicking its header.\n *\n * Throws when the wizard refuses, naming the cause — the step's own `disabled`, or\n * the `linear` gate and which earlier step is holding it shut. Silence would be\n * worse than a failure here: the component drops a click on a locked header without\n * a sound, so a spec would go on to assert against the step it was already showing.\n */\n async goTo(index: number): Promise<void> {\n const step = await this.stepAt(index);\n\n if (!(await step.isReachable())) {\n throw new Error(\n `WrStepperHarness.goTo(${index}): the header for \"${await step.getLabel()}\" refuses a click — ` +\n `${await this.refusal(index)}. Note that \\`WrStepper.goTo()\\` and \\`next()\\` move anyway: the gate is ` +\n \"on the header click, so a wizard's own Next button has to check for itself.\"\n );\n }\n\n await step.select();\n\n if (!(await step.isActive())) {\n throw new Error(\n `WrStepperHarness.goTo(${index}): the header for \"${await step.getLabel()}\" was clicked and the wizard ` +\n 'is still showing another step — its `active` model reached nothing, so a two-way `[(active)]` binding ' +\n 'is overwriting it or the click is not wired.'\n );\n }\n }\n\n /**\n * Navigate to the step with this label — a string matches exactly, a RegExp is\n * tested. Throws naming the labels that do exist when nothing matches.\n */\n async goToLabel(label: string | RegExp): Promise<void> {\n const labels = await this.getStepLabels();\n for (let index = 0; index < labels.length; index++) {\n if (await HarnessPredicate.stringMatches(labels[index], label)) return this.goTo(index);\n }\n\n throw new Error(\n `WrStepperHarness.goToLabel(): no step is labelled ${JSON.stringify(String(label))}. This wizard has: ` +\n `${labels.join(', ')}.`\n );\n }\n\n /**\n * Move to the next step through its header — subject to the same gate a user is.\n *\n * In a `linear` wizard that gate is shut until the CURRENT step reports itself\n * complete (its own `completed` input; derived completion only ever covers steps\n * before the active one), so this throws there. That is not the harness being\n * strict: it is the header a user has, and the reason a linear wizard needs its own\n * Next button, which calls `WrStepper.next()` and is not gated at all.\n *\n * Throws on the last step, where the component's own `next()` clamps in silence.\n */\n async next(): Promise<void> {\n const index = await this.getActiveIndex();\n const steps = await this.getSteps();\n\n if (index === steps.length - 1) {\n throw new Error(\n `WrStepperHarness.next(): the wizard is already on its last step (\"${await steps[index].getLabel()}\") — ` +\n 'there is nothing after it. `WrStepper.next()` clamps silently instead of saying so.'\n );\n }\n\n await this.goTo(index + 1);\n }\n\n /**\n * Move to the previous step through its header. Throws on the first step, where\n * `WrStepper.prev()` clamps in silence.\n *\n * Going back is normally allowed even in a `linear` wizard — every step at or before\n * the active one is reachable — but a step its own input disabled stays out of\n * reach in both directions.\n */\n async previous(): Promise<void> {\n const index = await this.getActiveIndex();\n\n if (index === 0) {\n throw new Error(\n 'WrStepperHarness.previous(): the wizard is already on its first step — there is nothing before it. ' +\n '`WrStepper.prev()` clamps silently instead of saying so.'\n );\n }\n\n await this.goTo(index - 1);\n }\n\n /**\n * The text of the step body the wizard is showing.\n *\n * Which body shows is CSS-only: every `<wr-step>` renders, and the stepper hides all\n * but one with `display: none` through the `--active` class. So this reads the class,\n * and in a unit test it has to — jsdom loads no stylesheet, which makes\n * `fixture.nativeElement.textContent` the text of ALL the steps at once and any\n * \"is the body showing\" assertion built on it meaningless.\n */\n async getActiveStepText(): Promise<string> {\n const active = await this.locatorForOptional('.wr-stepper__body .wr-step--active')();\n if (!active) {\n throw new Error(\n 'WrStepperHarness.getActiveStepText(): no step body is showing — the bound `active` index is outside ' +\n 'the step list, or this stepper has no <wr-step> children.'\n );\n }\n return wrStepperHarnessText(await active.text());\n }\n\n /**\n * The text of EVERY step body, in order, showing or not.\n *\n * The list being complete is the point: a step is hidden by a class rather than\n * dropped by an `@if`, so it mounts once and keeps its state — a half-filled form on\n * step 1 is still filled after a trip to step 3. Anything that turned the body into\n * a conditional block would keep every other assertion in a spec passing and quietly\n * reset the wizard.\n */\n async getStepTexts(): Promise<string[]> {\n const bodies = await this.locatorForAll('.wr-stepper__body > wr-step')();\n return Promise.all(bodies.map(async body => wrStepperHarnessText(await body.text())));\n }\n\n /** The step at `index`, or a failure that says how long the wizard is. */\n private async stepAt(index: number): Promise<WrStepHarness> {\n const steps = await this.getSteps();\n const step = steps[index];\n if (!step) {\n throw new Error(\n `WrStepperHarness: there is no step ${index} — this wizard has ${steps.length} ` +\n `${steps.length === 1 ? 'step' : 'steps'}${steps.length ? `: ${(await this.getStepLabels()).join(', ')}` : ''}.`\n );\n }\n return step;\n }\n\n /** Why the header at `index` is refusing a click, in the component's own order of causes. */\n private async refusal(index: number): Promise<string> {\n const steps = await this.getSteps();\n\n // The step's own input wins in the component too: `isReachable()` answers `false`\n // for a disabled step before it ever looks at the gate.\n if (await steps[index].isDisabled()) return 'the step carries `disabled`';\n\n if (await this.isLinear()) {\n for (let before = 0; before < index; before++) {\n if (!(await steps[before].isCompleted())) {\n return (\n 'the stepper is `linear` and step ' +\n `${before + 1} (\"${await steps[before].getLabel()}\") has not reported itself complete`\n );\n }\n }\n }\n\n return 'its header button is disabled';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAEH;;;;;;;;;;;AAWG;AACG,SAAU,oBAAoB,CAAC,IAAY,EAAA;IAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE;AACzC;;ACrBA;;;;;AAKG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACG,MAAO,aAAc,SAAQ,gBAAgB,CAAA;AACjD;;;;;AAKG;AACH,IAAA,OAAO,YAAY,GAAG,qBAAqB;;AAG3C,IAAA,OAAO,IAAI,CAAC,OAAA,GAAgC,EAAE,EAAA;AAC5C,QAAA,OAAO,IAAI,gBAAgB,CAAC,aAAa,EAAE,OAAO;aAC/C,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;aAC/G,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,OAAO,EAAE,MAAM,KAAK,CAAC,MAAM,OAAO,CAAC,QAAQ,EAAE,MAAM,MAAM;aACpG,SAAS,CACR,WAAW,EACX,OAAO,CAAC,SAAS,EACjB,OAAO,OAAO,EAAE,SAAS,KAAK,CAAC,MAAM,OAAO,CAAC,WAAW,EAAE,MAAM,SAAS;aAE1E,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;aAC9G,SAAS,CACR,WAAW,EACX,OAAO,CAAC,SAAS,EACjB,OAAO,OAAO,EAAE,SAAS,KAAK,CAAC,M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,CACnH;QACH;AACA,QAAA,OAAO,IAAI;IACb;;IAGQ,MAAM,OAAO,CAAC,KAAa,EAAA;AACjC,QAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE;;;AAInC,QAAA,IAAI,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAAE,YAAA,OAAO,6BAA6B;AAEzE,QAAA,IAAI,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE;AACzB,YAAA,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE;AAC7C,gBAAA,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE;AACxC,oBAAA,QACE,mCAAmC;AACnC,wBAAA,CAAA,EAAG,MAAM,GAAG,CAAC,CAAA,GAAA,EAAM,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAA,mCAAA,CAAqC;gBAE1F;YACF;QACF;AAEA,QAAA,OAAO,+BAA+B;IACxC;;;ACnVF;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-stepper-testing.mjs","sources":["../../../projects/lib/stepper/testing/wr-stepper-harness-text.ts","../../../projects/lib/stepper/testing/wr-step-harness.ts","../../../projects/lib/stepper/testing/wr-stepper-harness.ts","../../../projects/lib/stepper/testing/ngwr-stepper-testing.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\n/**\n * Collapse the whitespace inside a header or a step body to the line a user reads.\n *\n * `TestElement.text()` only trims the ends, and neither of the two things read here\n * is one text node: a header's label span holds the label, the \"optional\" badge and\n * the description as siblings, and a step body is whatever the consumer projected.\n * The template's own indentation is not the problem — Angular's default\n * `preserveWhitespaces: false` drops whitespace-only text nodes at compile time —\n * but a value carrying a newline is, and so is a consumer app compiled with\n * `preserveWhitespaces: true`. Every run becomes one space so a spec can assert the\n * rendered line either way.\n */\nexport function wrStepperHarnessText(text: string): string {\n return text.replace(/\\s+/g, ' ').trim();\n}\n","/**\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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrStepHarnessFilters } from './interfaces';\nimport { wrStepperHarnessText } from './wr-stepper-harness-text';\n\n/**\n * Test harness for one step of a `<wr-stepper>` — the step as the HEADER STRIP\n * publishes it: its label, its state, and the one control that navigates to it.\n *\n * A step is two pieces of DOM in two different places. The `<wr-step>` the consumer\n * wrote is projected into the stepper's body region; the header this harness hosts on\n * is generated next to it, in the `<ol>` above. Nothing links the two — no\n * `aria-controls`, no id on the body — so `WrStepperHarness.getActiveStepText()` is\n * where the body is read, and this answers what the wizard says about the step.\n *\n * Two states that look alike here are deliberately separate, because the component\n * treats them separately: {@link isDisabled} is the step's own `disabled` input\n * (switched off, whatever else happens), and {@link isReachable} is whether a click\n * would land right now — which a `linear` stepper takes away from every step ahead of\n * the gate without disabling any of them.\n *\n * @example\n * ```ts\n * const [review] = await stepper.getSteps({ label: 'Review' });\n *\n * expect(await review.isOptional()).toBe(true);\n * expect(await review.isReachable()).toBe(false);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrStepHarness extends ComponentHarness {\n /**\n * The header `<li>`, which is the whole step as far as the strip is concerned.\n *\n * Not `.wr-stepper__header-button`: the state modifiers (`--active`, `--completed`,\n * `--disabled`) land on the `<li>`, and the button is a child of it.\n */\n static hostSelector = '.wr-stepper__header';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrStepHarnessFilters = {}): HarnessPredicate<WrStepHarness> {\n return new HarnessPredicate(WrStepHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('active', options.active, async (harness, active) => (await harness.isActive()) === active)\n .addOption(\n 'completed',\n options.completed,\n async (harness, completed) => (await harness.isCompleted()) === completed\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption(\n 'reachable',\n options.reachable,\n async (harness, reachable) => (await harness.isReachable()) === reachable\n )\n .addOption('optional', options.optional, async (harness, optional) => (await harness.isOptional()) === optional);\n }\n\n private readonly button = this.locatorFor('button.wr-stepper__header-button');\n\n /**\n * The step's label, and only the label.\n *\n * The \"optional\" badge and the description are siblings of the label text inside\n * the same span, so both are excluded — a step addressed by label should be\n * addressable whether or not it also carries a description.\n */\n async getLabel(): Promise<string> {\n const label = await this.locatorFor('.wr-stepper__label')();\n return wrStepperHarnessText(await label.text({ exclude: '.wr-stepper__optional, .wr-stepper__description' }));\n }\n\n /** The secondary line under the label, or `null` when the step defines none. */\n async getDescription(): Promise<string | null> {\n const description = await this.locatorForOptional('.wr-stepper__description')();\n return description ? wrStepperHarnessText(await description.text()) : null;\n }\n\n /** Whether the header flags the step as optional. */\n async isOptional(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-stepper__optional')()) !== null;\n }\n\n /**\n * What a screen reader announces for the header button.\n *\n * The indicator is excluded because it is `aria-hidden`: the step number and the\n * completed tick are decoration, deliberately, since the label and\n * `aria-current=\"step\"` already carry what they would repeat. What IS announced is\n * the label plus the \"optional\" badge and the description — so this is the method\n * that notices when one of those stops being part of the name.\n */\n async getAccessibleName(): Promise<string> {\n const button = await this.button();\n return wrStepperHarnessText(await button.text({ exclude: '.wr-stepper__indicator' }));\n }\n\n /**\n * Whether this is the step the wizard is showing.\n *\n * From `aria-current=\"step\"` rather than the `--active` class, because that is the\n * only place the wizard's position is published to a screen reader, and the two can\n * only ever disagree by way of a bug.\n */\n async isActive(): Promise<boolean> {\n return (await (await this.button()).getAttribute('aria-current')) === 'step';\n }\n\n /**\n * Whether the step is shown as done.\n *\n * Read from the `--completed` class, and there is no ARIA alternative to prefer:\n * completion reaches the page as that class plus a tick glyph that is\n * `aria-hidden`, so a screen-reader user hears the label and nothing else. The\n * class is the whole of what exists.\n *\n * Completion is derived from the active index — every step before it — unless a\n * step's own `completed` input overrides it, which is how a `linear` wizard opens\n * its gate. So a step after the active one can be completed too.\n */\n async isCompleted(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper__header--completed');\n }\n\n /**\n * Whether the step is switched off by its own `disabled` input.\n *\n * The `--disabled` class is exactly that input, which is why it is read here rather\n * than the button's `disabled`: the button is also disabled for a step that is\n * merely behind a `linear` gate, and those are different facts about the wizard.\n * See {@link isReachable} for the one about right now.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper__header--disabled');\n }\n\n /**\n * Whether a click on this header would move the wizard here.\n *\n * Read from the button's `disabled` PROPERTY, because that is the enforcement and\n * not the paint: the component disables the header for a step its own input\n * switched off AND for one a `linear` gate has not opened yet. It is also what puts\n * the header in or out of the tab order — a `disabled` button cannot be focused at\n * all, so an unreachable step is off the keyboard entirely rather than focusable and\n * inert the way `aria-disabled` would leave it.\n */\n async isReachable(): Promise<boolean> {\n return !(await (await this.button()).getProperty<boolean>('disabled'));\n }\n\n /**\n * Navigate to this step by clicking its header, the way a user does.\n *\n * A click, not a keypress: the header is a real `<button>`, so Enter and Space\n * activate it through the browser's native activation — behaviour jsdom does not\n * implement, leaving nothing for a key to drive. A no-arg CDK click needs no\n * coordinate and no hit test, so the absent layout costs nothing here.\n *\n * Throws when the header refuses, rather than clicking and resolving quietly: the\n * component's guard would drop the click and the wizard would still be showing the\n * old step three assertions later. Reach for `WrStepperHarness.goTo()` when you\n * want the failure to name WHICH earlier step is holding the gate shut.\n */\n async select(): Promise<void> {\n if (!(await this.isReachable())) {\n throw new Error(\n `WrStepHarness.select(): the header for \"${await this.getLabel()}\" refuses a click — the step carries ` +\n '`disabled`, or the stepper is `linear` and an earlier step has not reported itself complete.'\n );\n }\n await (await this.button()).click();\n }\n\n /** Move keyboard focus to the header. A header that is not reachable cannot take it. */\n async focus(): Promise<void> {\n return (await this.button()).focus();\n }\n\n /** Whether the header currently has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.button()).isFocused();\n }\n}\n","/**\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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrStepHarnessFilters, WrStepperHarnessFilters } from './interfaces';\nimport { WrStepHarness } from './wr-step-harness';\nimport { wrStepperHarnessText } from './wr-stepper-harness-text';\n\n/**\n * Test harness for `<wr-stepper>` — the root of a two-part family with\n * {@link WrStepHarness}, which is one step of it.\n *\n * Steps are addressed by their index or their LABEL, the two things a consumer can\n * see; there is no key or id on a `<wr-step>` to address it by.\n *\n * Navigation here always goes through the HEADER STRIP, because that is the only\n * control the component renders — a wizard's Next and Back buttons are the\n * consumer's own, and they call `WrStepper.next()` / `prev()`. That distinction is\n * not cosmetic: the imperative API does NOT consult `linear`, so it walks straight\n * past a gate that refuses the equivalent header click. {@link next} and\n * {@link goTo} therefore refuse exactly where a user would be refused, and a spec\n * covering the wizard's own buttons should drive those buttons (through their own\n * harness) instead of these.\n *\n * @example\n * ```ts\n * const wizard = await loader.getHarness(WrStepperHarness);\n *\n * expect(await wizard.getStepLabels()).toEqual(['Account', 'Address', 'Review']);\n * expect(await wizard.canGoTo(2)).toBe(false);\n * await wizard.goToLabel('Address');\n * expect(await wizard.getActiveStepText()).toBe('Address body');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrStepperHarness extends ComponentHarness {\n static hostSelector = 'wr-stepper';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrStepperHarnessFilters = {}): HarnessPredicate<WrStepperHarness> {\n return new HarnessPredicate(WrStepperHarness, options)\n .addOption('stepLabel', options.stepLabel, async (harness, label) => {\n for (const stepLabel of await harness.getStepLabels()) {\n if (await HarnessPredicate.stringMatches(stepLabel, label)) return true;\n }\n return false;\n })\n .addOption(\n 'orientation',\n options.orientation,\n async (harness, orientation) => (await harness.getOrientation()) === orientation\n )\n .addOption('linear', options.linear, async (harness, linear) => (await harness.isLinear()) === linear);\n }\n\n private readonly headerList = this.locatorFor('ol.wr-stepper__headers');\n\n /**\n * The layout direction the stepper was ASKED for.\n *\n * Unusually for this library both values carry a class, so neither is read as the\n * absence of the other. What the class cannot tell you is how the strip actually\n * laid itself out: a `responsive` horizontal stepper drops to the vertical layout\n * when its own box is too narrow, and that reflow is a container query — the class\n * never changes. No unit test can see the difference in any case, jsdom having no\n * layout at all; assert the opt-in with {@link isResponsive} instead.\n */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n return (await (await this.host()).hasClass('wr-stepper--vertical')) ? 'vertical' : 'horizontal';\n }\n\n /** Whether the stepper locks the steps after the last completed one. */\n async isLinear(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper--linear');\n }\n\n /** Whether the stepper may reflow to the vertical layout in a narrow container. */\n async isResponsive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-stepper--responsive');\n }\n\n /**\n * The role the header strip announces — `list`.\n *\n * An `<ol>` is a list already, so the explicit role looks redundant and is not: the\n * stylesheet removes the markers, and Safari drops list semantics from a list with\n * `list-style: none`. Losing it costs the \"list, 3 items\" a VoiceOver user hears,\n * which is how they learn how long the wizard is before starting it.\n */\n async getListRole(): Promise<string | null> {\n return (await this.headerList()).getAttribute('role');\n }\n\n /** The wizard's steps, in order. */\n async getSteps(filters: WrStepHarnessFilters = {}): Promise<WrStepHarness[]> {\n return this.locatorForAll(WrStepHarness.with(filters))();\n }\n\n /** The label of every step, in order. */\n async getStepLabels(): Promise<string[]> {\n const steps = await this.getSteps();\n return Promise.all(steps.map(step => step.getLabel()));\n }\n\n /**\n * The index of the step the wizard is showing, from the header announcing\n * `aria-current=\"step\"`.\n *\n * Throws when no header does, which is a state a stepper can genuinely be in: one\n * with no `<wr-step>` children renders its (empty) header strip and no body. A `-1`\n * here would be read as \"the first step\" by the next line of a spec. An\n * out-of-range `active` is NOT such a state — `WrStepper` clamps the two-way model\n * back into the step list, not only inside `goTo()`.\n */\n async getActiveIndex(): Promise<number> {\n const steps = await this.getSteps();\n for (let index = 0; index < steps.length; index++) {\n if (await steps[index].isActive()) return index;\n }\n\n throw new Error(\n 'WrStepperHarness.getActiveIndex(): no header announces `aria-current=\"step\"` — this stepper has ' +\n 'no <wr-step> children, so there is no step for it to be on. An out-of-range `active` cannot ' +\n 'produce this: WrStepper clamps the bound index to the step list.'\n );\n }\n\n /** The label of the step the wizard is showing. Throws when there is no current step. */\n async getActiveLabel(): Promise<string> {\n const steps = await this.getSteps();\n return steps[await this.getActiveIndex()].getLabel();\n }\n\n /** The labels of the steps shown as done, in order. Derived completion and overrides both. */\n async getCompletedLabels(): Promise<string[]> {\n const steps = await this.getSteps({ completed: true });\n return Promise.all(steps.map(step => step.getLabel()));\n }\n\n /**\n * The labels of the headers a Tab press can reach, in order.\n *\n * A stepper does NOT rove focus: unlike a tab strip, the header list is not one tab\n * stop with arrow keys inside it — every reachable header is its own stop, and the\n * component authors no `tabindex` at all. So the question \"which step is active\" has\n * two different answers, and this is the other one: the current step is not\n * necessarily in this list. A step disabled by its own input keeps\n * `aria-current=\"step\"` while its button drops out of the tab order entirely, and a\n * `linear` stepper takes every locked header off the keyboard the same way.\n */\n async getTabStopLabels(): Promise<string[]> {\n const steps = await this.getSteps({ reachable: true });\n return Promise.all(steps.map(step => step.getLabel()));\n }\n\n /** The label of the header that currently has focus, or `null` when focus is elsewhere. */\n async getFocusedLabel(): Promise<string | null> {\n for (const step of await this.getSteps()) {\n if (await step.isFocused()) return step.getLabel();\n }\n return null;\n }\n\n /**\n * Whether the wizard would let a user navigate to this step right now — the question\n * a `linear` stepper exists to answer `false` to.\n *\n * Throws for an index that is not a step, rather than answering `false`: \"you cannot\n * go there\" and \"there is no there\" are different findings.\n */\n async canGoTo(index: number): Promise<boolean> {\n return (await this.stepAt(index)).isReachable();\n }\n\n /**\n * Navigate to the step at `index` by clicking its header.\n *\n * Throws when the wizard refuses, naming the cause — the step's own `disabled`, or\n * the `linear` gate and which earlier step is holding it shut. Silence would be\n * worse than a failure here: the component drops a click on a locked header without\n * a sound, so a spec would go on to assert against the step it was already showing.\n */\n async goTo(index: number): Promise<void> {\n const step = await this.stepAt(index);\n\n if (!(await step.isReachable())) {\n throw new Error(\n `WrStepperHarness.goTo(${index}): the header for \"${await step.getLabel()}\" refuses a click — ` +\n `${await this.refusal(index)}. Note that \\`WrStepper.goTo()\\` and \\`next()\\` move anyway: the gate is ` +\n \"on the header click, so a wizard's own Next button has to check for itself.\"\n );\n }\n\n await step.select();\n\n if (!(await step.isActive())) {\n throw new Error(\n `WrStepperHarness.goTo(${index}): the header for \"${await step.getLabel()}\" was clicked and the wizard ` +\n 'is still showing another step — its `active` model reached nothing, so a two-way `[(active)]` binding ' +\n 'is overwriting it or the click is not wired.'\n );\n }\n }\n\n /**\n * Navigate to the step with this label — a string matches exactly, a RegExp is\n * tested. Throws naming the labels that do exist when nothing matches.\n */\n async goToLabel(label: string | RegExp): Promise<void> {\n const labels = await this.getStepLabels();\n for (let index = 0; index < labels.length; index++) {\n if (await HarnessPredicate.stringMatches(labels[index], label)) return this.goTo(index);\n }\n\n throw new Error(\n `WrStepperHarness.goToLabel(): no step is labelled ${JSON.stringify(String(label))}. This wizard has: ` +\n `${labels.join(', ')}.`\n );\n }\n\n /**\n * Move to the next step through its header — subject to the same gate a user is.\n *\n * In a `linear` wizard that gate is shut until the CURRENT step reports itself\n * complete (its own `completed` input; derived completion only ever covers steps\n * before the active one), so this throws there. That is not the harness being\n * strict: it is the header a user has, and the reason a linear wizard needs its own\n * Next button, which calls `WrStepper.next()` and is not gated at all.\n *\n * Throws on the last step, where the component's own `next()` clamps in silence.\n */\n async next(): Promise<void> {\n const index = await this.getActiveIndex();\n const steps = await this.getSteps();\n\n if (index === steps.length - 1) {\n throw new Error(\n `WrStepperHarness.next(): the wizard is already on its last step (\"${await steps[index].getLabel()}\") — ` +\n 'there is nothing after it. `WrStepper.next()` clamps silently instead of saying so.'\n );\n }\n\n await this.goTo(index + 1);\n }\n\n /**\n * Move to the previous step through its header. Throws on the first step, where\n * `WrStepper.prev()` clamps in silence.\n *\n * Going back is normally allowed even in a `linear` wizard — every step at or before\n * the active one is reachable — but a step its own input disabled stays out of\n * reach in both directions.\n */\n async previous(): Promise<void> {\n const index = await this.getActiveIndex();\n\n if (index === 0) {\n throw new Error(\n 'WrStepperHarness.previous(): the wizard is already on its first step — there is nothing before it. ' +\n '`WrStepper.prev()` clamps silently instead of saying so.'\n );\n }\n\n await this.goTo(index - 1);\n }\n\n /**\n * The text of the step body the wizard is showing.\n *\n * Which body shows is CSS-only: every `<wr-step>` renders, and the stepper hides all\n * but one with `display: none` through the `--active` class. So this reads the class,\n * and in a unit test it has to — jsdom loads no stylesheet, which makes\n * `fixture.nativeElement.textContent` the text of ALL the steps at once and any\n * \"is the body showing\" assertion built on it meaningless.\n */\n async getActiveStepText(): Promise<string> {\n const active = await this.locatorForOptional('.wr-stepper__body .wr-step--active')();\n if (!active) {\n throw new Error(\n 'WrStepperHarness.getActiveStepText(): no step body is showing — the bound `active` index is outside ' +\n 'the step list, or this stepper has no <wr-step> children.'\n );\n }\n return wrStepperHarnessText(await active.text());\n }\n\n /**\n * The text of EVERY step body, in order, showing or not.\n *\n * The list being complete is the point: a step is hidden by a class rather than\n * dropped by an `@if`, so it mounts once and keeps its state — a half-filled form on\n * step 1 is still filled after a trip to step 3. Anything that turned the body into\n * a conditional block would keep every other assertion in a spec passing and quietly\n * reset the wizard.\n */\n async getStepTexts(): Promise<string[]> {\n const bodies = await this.locatorForAll('.wr-stepper__body > wr-step')();\n return Promise.all(bodies.map(async body => wrStepperHarnessText(await body.text())));\n }\n\n /** The step at `index`, or a failure that says how long the wizard is. */\n private async stepAt(index: number): Promise<WrStepHarness> {\n const steps = await this.getSteps();\n const step = steps[index];\n if (!step) {\n throw new Error(\n `WrStepperHarness: there is no step ${index} — this wizard has ${steps.length} ` +\n `${steps.length === 1 ? 'step' : 'steps'}${steps.length ? `: ${(await this.getStepLabels()).join(', ')}` : ''}.`\n );\n }\n return step;\n }\n\n /** Why the header at `index` is refusing a click, in the component's own order of causes. */\n private async refusal(index: number): Promise<string> {\n const steps = await this.getSteps();\n\n // The step's own input wins in the component too: `isReachable()` answers `false`\n // for a disabled step before it ever looks at the gate.\n if (await steps[index].isDisabled()) return 'the step carries `disabled`';\n\n if (await this.isLinear()) {\n for (let before = 0; before < index; before++) {\n if (!(await steps[before].isCompleted())) {\n return (\n 'the stepper is `linear` and step ' +\n `${before + 1} (\"${await steps[before].getLabel()}\") has not reported itself complete`\n );\n }\n }\n }\n\n return 'its header button is disabled';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAEH;;;;;;;;;;;AAWG;AACG,SAAU,oBAAoB,CAAC,IAAY,EAAA;IAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE;AACzC;;ACrBA;;;;;AAKG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACG,MAAO,aAAc,SAAQ,gBAAgB,CAAA;AACjD;;;;;AAKG;AACH,IAAA,OAAO,YAAY,GAAG,qBAAqB;;AAG3C,IAAA,OAAO,IAAI,CAAC,OAAA,GAAgC,EAAE,EAAA;AAC5C,QAAA,OAAO,IAAI,gBAAgB,CAAC,aAAa,EAAE,OAAO;aAC/C,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;aAC/G,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,OAA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...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
58
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrStep, isStandalone: true, selector: "wr-step", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-step--active": "isActive()" }, classAttribute: "wr-step" }, ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: WrStep, isStandalone: true, selector: "wr-step", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-step--active": "isActive()" }, classAttribute: "wr-step" }, ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStep, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStep, decorators: [{
62
62
  type: Component,
63
63
  args: [{
64
64
  selector: 'wr-step',
@@ -192,8 +192,8 @@ class WrStepper {
192
192
  prev() {
193
193
  this.goTo(this.active() - 1);
194
194
  }
195
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
196
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrStepper, isStandalone: true, selector: "wr-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, host: { properties: { "class": "classes()" } }, providers: [
195
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
196
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: WrStepper, isStandalone: true, selector: "wr-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, host: { properties: { "class": "classes()" } }, providers: [
197
197
  {
198
198
  provide: WR_STEPPER,
199
199
  // eslint-disable-next-line @angular-eslint/no-forward-ref
@@ -201,7 +201,7 @@ class WrStepper {
201
201
  },
202
202
  ], queries: [{ propertyName: "steps", predicate: WrStep, isSignal: true }], ngImport: i0, template: "<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (step.optional()) {\n <small class=\"wr-stepper__optional\">{{ optionalLabel() }}</small>\n }\n @if (step.description()) {\n <small class=\"wr-stepper__description\">{{ step.description() }}</small>\n }\n </span>\n </button>\n @if (!$last) {\n <span class=\"wr-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n</ol>\n\n<div class=\"wr-stepper__body\">\n <ng-content />\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
203
203
  }
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrStepper, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrStepper, decorators: [{
205
205
  type: Component,
206
206
  args: [{ selector: 'wr-stepper', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, providers: [
207
207
  {