ngwr 8.0.0 → 9.0.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 (431) hide show
  1. package/README.md +75 -28
  2. package/action-sheet/styles/_index.scss +93 -0
  3. package/alert/styles/_index.scss +10 -10
  4. package/anchor/styles/_index.scss +3 -3
  5. package/back-top/styles/_index.scss +1 -1
  6. package/badge/styles/_tag.scss +3 -3
  7. package/bar-chart/styles/_index.scss +4 -4
  8. package/border-glow/styles/_index.scss +3 -3
  9. package/breadcrumbs/styles/_index.scss +3 -3
  10. package/burger/styles/_index.scss +1 -1
  11. package/button/styles/_index.scss +4 -4
  12. package/calendar/styles/_index.scss +4 -4
  13. package/calendar-heatmap/styles/_index.scss +3 -3
  14. package/card/styles/_index.scss +5 -5
  15. package/carousel/styles/_index.scss +5 -5
  16. package/cascader/styles/_index.scss +15 -15
  17. package/checkbox/styles/_index.scss +20 -5
  18. package/collapse/styles/_index.scss +6 -6
  19. package/color-picker/styles/_index.scss +15 -9
  20. package/command-palette/styles/_index.scss +19 -16
  21. package/compare/styles/_index.scss +3 -3
  22. package/context-menu/styles/_index.scss +16 -6
  23. package/counter/styles/_index.scss +12 -1
  24. package/date-picker/styles/_index.scss +8 -8
  25. package/descriptions/styles/_index.scss +9 -9
  26. package/dialog/styles/_index.scss +7 -6
  27. package/divider/styles/_index.scss +2 -2
  28. package/donut-chart/styles/_index.scss +3 -3
  29. package/drag-drop/styles/_index.scss +11 -6
  30. package/drawer/styles/_index.scss +15 -6
  31. package/dropdown/styles/_index.scss +5 -5
  32. package/empty/styles/_index.scss +4 -4
  33. package/fesm2022/ngwr-action-sheet.mjs +81 -0
  34. package/fesm2022/ngwr-action-sheet.mjs.map +1 -0
  35. package/fesm2022/ngwr-affix.mjs +3 -3
  36. package/fesm2022/ngwr-alert.mjs +4 -4
  37. package/fesm2022/ngwr-alert.mjs.map +1 -1
  38. package/fesm2022/ngwr-anchor.mjs +4 -4
  39. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  40. package/fesm2022/ngwr-aurora.mjs +5 -4
  41. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  42. package/fesm2022/ngwr-avatar.mjs +4 -4
  43. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  44. package/fesm2022/ngwr-back-top.mjs +4 -4
  45. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  46. package/fesm2022/ngwr-badge.mjs +8 -8
  47. package/fesm2022/ngwr-badge.mjs.map +1 -1
  48. package/fesm2022/ngwr-bar-chart.mjs +4 -4
  49. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  50. package/fesm2022/ngwr-blur-text.mjs +3 -3
  51. package/fesm2022/ngwr-border-glow.mjs +4 -4
  52. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  53. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  54. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngwr-burger.mjs +4 -4
  56. package/fesm2022/ngwr-burger.mjs.map +1 -1
  57. package/fesm2022/ngwr-button.mjs +8 -8
  58. package/fesm2022/ngwr-button.mjs.map +1 -1
  59. package/fesm2022/ngwr-calendar-heatmap.mjs +4 -4
  60. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  61. package/fesm2022/ngwr-calendar.mjs +4 -4
  62. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  63. package/fesm2022/ngwr-card.mjs +11 -11
  64. package/fesm2022/ngwr-card.mjs.map +1 -1
  65. package/fesm2022/ngwr-carousel.mjs +7 -7
  66. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  67. package/fesm2022/ngwr-cascader.mjs +52 -60
  68. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  69. package/fesm2022/ngwr-checkbox.mjs +74 -106
  70. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  71. package/fesm2022/ngwr-circular-text.mjs +5 -4
  72. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  73. package/fesm2022/ngwr-click-spark.mjs +5 -4
  74. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  75. package/fesm2022/ngwr-clipboard.mjs +4 -4
  76. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  77. package/fesm2022/ngwr-collapse.mjs +12 -12
  78. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  79. package/fesm2022/ngwr-color-picker.mjs +58 -66
  80. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  81. package/fesm2022/ngwr-command-palette.mjs +4 -4
  82. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  83. package/fesm2022/ngwr-compare.mjs +4 -4
  84. package/fesm2022/ngwr-compare.mjs.map +1 -1
  85. package/fesm2022/ngwr-confetti.mjs +3 -3
  86. package/fesm2022/ngwr-context-menu.mjs +86 -15
  87. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  88. package/fesm2022/ngwr-cookie.mjs +19 -6
  89. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  90. package/fesm2022/ngwr-counter.mjs +26 -12
  91. package/fesm2022/ngwr-counter.mjs.map +1 -1
  92. package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
  93. package/fesm2022/ngwr-date-adapter-luxon.mjs +3 -3
  94. package/fesm2022/ngwr-date-adapter.mjs +10 -5
  95. package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
  96. package/fesm2022/ngwr-date-picker.mjs +128 -123
  97. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  98. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  99. package/fesm2022/ngwr-density.mjs +7 -7
  100. package/fesm2022/ngwr-density.mjs.map +1 -1
  101. package/fesm2022/ngwr-descriptions.mjs +7 -7
  102. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  103. package/fesm2022/ngwr-dialog.mjs +16 -16
  104. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  105. package/fesm2022/ngwr-directives.mjs +21 -15
  106. package/fesm2022/ngwr-directives.mjs.map +1 -1
  107. package/fesm2022/ngwr-divider.mjs +4 -4
  108. package/fesm2022/ngwr-divider.mjs.map +1 -1
  109. package/fesm2022/ngwr-donut-chart.mjs +4 -4
  110. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  111. package/fesm2022/ngwr-drag-drop.mjs +10 -9
  112. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  113. package/fesm2022/ngwr-drawer.mjs +19 -18
  114. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  115. package/fesm2022/ngwr-dropdown.mjs +13 -12
  116. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  117. package/fesm2022/ngwr-empty.mjs +4 -4
  118. package/fesm2022/ngwr-empty.mjs.map +1 -1
  119. package/fesm2022/ngwr-falling-text.mjs +5 -4
  120. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  121. package/fesm2022/ngwr-file-upload.mjs +58 -60
  122. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  123. package/fesm2022/ngwr-form.mjs +11 -11
  124. package/fesm2022/ngwr-form.mjs.map +1 -1
  125. package/fesm2022/ngwr-fuzzy-text.mjs +5 -4
  126. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  127. package/fesm2022/ngwr-gauge.mjs +4 -4
  128. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  129. package/fesm2022/ngwr-glitch-text.mjs +4 -4
  130. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  131. package/fesm2022/ngwr-gradient-text.mjs +4 -4
  132. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  133. package/fesm2022/ngwr-hotkey.mjs +7 -7
  134. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  135. package/fesm2022/ngwr-i18n.mjs +10 -10
  136. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  137. package/fesm2022/ngwr-icon-adapters-lucide.mjs +6 -7
  138. package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
  139. package/fesm2022/ngwr-icon.mjs +4 -4
  140. package/fesm2022/ngwr-icon.mjs.map +1 -1
  141. package/fesm2022/ngwr-image-cropper.mjs +6 -5
  142. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  143. package/fesm2022/ngwr-input-number.mjs +56 -73
  144. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  145. package/fesm2022/ngwr-input-otp.mjs +46 -52
  146. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  147. package/fesm2022/ngwr-input.mjs +17 -17
  148. package/fesm2022/ngwr-input.mjs.map +1 -1
  149. package/fesm2022/ngwr-keyboard.mjs +4 -4
  150. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  151. package/fesm2022/ngwr-knob.mjs +47 -58
  152. package/fesm2022/ngwr-knob.mjs.map +1 -1
  153. package/fesm2022/ngwr-layout.mjs +16 -16
  154. package/fesm2022/ngwr-layout.mjs.map +1 -1
  155. package/fesm2022/ngwr-lightbox.mjs +7 -6
  156. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  157. package/fesm2022/ngwr-line-chart.mjs +4 -4
  158. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  159. package/fesm2022/ngwr-list.mjs +8 -8
  160. package/fesm2022/ngwr-list.mjs.map +1 -1
  161. package/fesm2022/ngwr-loading-bar.mjs +7 -7
  162. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  163. package/fesm2022/ngwr-marquee.mjs +6 -5
  164. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  165. package/fesm2022/ngwr-media.mjs +4 -4
  166. package/fesm2022/ngwr-media.mjs.map +1 -1
  167. package/fesm2022/ngwr-mention.mjs +15 -9
  168. package/fesm2022/ngwr-mention.mjs.map +1 -1
  169. package/fesm2022/ngwr-meta.mjs +7 -7
  170. package/fesm2022/ngwr-meta.mjs.map +1 -1
  171. package/fesm2022/ngwr-meter-group.mjs +4 -4
  172. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  173. package/fesm2022/ngwr-overlay.mjs +9 -4
  174. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  175. package/fesm2022/ngwr-page-header.mjs +4 -4
  176. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  177. package/fesm2022/ngwr-pagination.mjs +4 -4
  178. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  179. package/fesm2022/ngwr-pipes.mjs +21 -21
  180. package/fesm2022/ngwr-platform.mjs +169 -5
  181. package/fesm2022/ngwr-platform.mjs.map +1 -1
  182. package/fesm2022/ngwr-popconfirm.mjs +7 -7
  183. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  184. package/fesm2022/ngwr-popover.mjs +7 -7
  185. package/fesm2022/ngwr-popover.mjs.map +1 -1
  186. package/fesm2022/ngwr-progress.mjs +4 -4
  187. package/fesm2022/ngwr-progress.mjs.map +1 -1
  188. package/fesm2022/ngwr-pull-to-refresh.mjs +172 -0
  189. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -0
  190. package/fesm2022/ngwr-qr.mjs +5 -5
  191. package/fesm2022/ngwr-qr.mjs.map +1 -1
  192. package/fesm2022/ngwr-radio.mjs +27 -52
  193. package/fesm2022/ngwr-radio.mjs.map +1 -1
  194. package/fesm2022/ngwr-rating.mjs +35 -48
  195. package/fesm2022/ngwr-rating.mjs.map +1 -1
  196. package/fesm2022/ngwr-result.mjs +13 -13
  197. package/fesm2022/ngwr-result.mjs.map +1 -1
  198. package/fesm2022/ngwr-rotating-text.mjs +15 -4
  199. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  200. package/fesm2022/ngwr-scroll.mjs +4 -4
  201. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  202. package/fesm2022/ngwr-segmented.mjs +3 -3
  203. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  204. package/fesm2022/ngwr-select.mjs +289 -85
  205. package/fesm2022/ngwr-select.mjs.map +1 -1
  206. package/fesm2022/ngwr-shiny-text.mjs +7 -7
  207. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  208. package/fesm2022/ngwr-sidebar.mjs +4 -4
  209. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  210. package/fesm2022/ngwr-skeleton.mjs +4 -4
  211. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  212. package/fesm2022/ngwr-slider.mjs +79 -73
  213. package/fesm2022/ngwr-slider.mjs.map +1 -1
  214. package/fesm2022/ngwr-sparkline.mjs +4 -4
  215. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  216. package/fesm2022/ngwr-speed-dial.mjs +13 -5
  217. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  218. package/fesm2022/ngwr-spinner.mjs +4 -4
  219. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  220. package/fesm2022/ngwr-splash-cursor.mjs +4 -4
  221. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  222. package/fesm2022/ngwr-split-text.mjs +3 -3
  223. package/fesm2022/ngwr-splitter.mjs +4 -4
  224. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  225. package/fesm2022/ngwr-spotlight-card.mjs +7 -7
  226. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  227. package/fesm2022/ngwr-squircle.mjs +7 -7
  228. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  229. package/fesm2022/ngwr-star-border.mjs +4 -4
  230. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  231. package/fesm2022/ngwr-statistic.mjs +65 -10
  232. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  233. package/fesm2022/ngwr-stepper.mjs +8 -8
  234. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  235. package/fesm2022/ngwr-storage.mjs +4 -4
  236. package/fesm2022/ngwr-storage.mjs.map +1 -1
  237. package/fesm2022/ngwr-switch.mjs +16 -48
  238. package/fesm2022/ngwr-switch.mjs.map +1 -1
  239. package/fesm2022/ngwr-table.mjs +824 -20
  240. package/fesm2022/ngwr-table.mjs.map +1 -1
  241. package/fesm2022/ngwr-tabs.mjs +9 -8
  242. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  243. package/fesm2022/ngwr-textarea.mjs +18 -50
  244. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  245. package/fesm2022/ngwr-theme.mjs +20 -5
  246. package/fesm2022/ngwr-theme.mjs.map +1 -1
  247. package/fesm2022/ngwr-tilt-card.mjs +27 -11
  248. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  249. package/fesm2022/ngwr-timeline.mjs +7 -7
  250. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  251. package/fesm2022/ngwr-toast.mjs +10 -10
  252. package/fesm2022/ngwr-toast.mjs.map +1 -1
  253. package/fesm2022/ngwr-toolbar.mjs +4 -4
  254. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  255. package/fesm2022/ngwr-tree.mjs +280 -84
  256. package/fesm2022/ngwr-tree.mjs.map +1 -1
  257. package/fesm2022/ngwr-typewriter.mjs +10 -5
  258. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  259. package/fesm2022/ngwr-typography.mjs +4 -4
  260. package/fesm2022/ngwr-typography.mjs.map +1 -1
  261. package/fesm2022/ngwr-validators.mjs +1 -1
  262. package/fesm2022/ngwr-validators.mjs.map +1 -1
  263. package/fesm2022/ngwr-version.mjs +1 -1
  264. package/fesm2022/ngwr-version.mjs.map +1 -1
  265. package/fesm2022/ngwr-virtual-scroll.mjs +9 -7
  266. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  267. package/fesm2022/ngwr-waves.mjs +6 -5
  268. package/fesm2022/ngwr-waves.mjs.map +1 -1
  269. package/fesm2022/ngwr-window.mjs +16 -15
  270. package/fesm2022/ngwr-window.mjs.map +1 -1
  271. package/file-upload/styles/_index.scss +11 -11
  272. package/form/styles/_index.scss +4 -4
  273. package/gauge/styles/_index.scss +2 -2
  274. package/glitch-text/styles/_index.scss +1 -1
  275. package/gradient-text/styles/_index.scss +1 -1
  276. package/image-cropper/styles/_index.scss +5 -4
  277. package/input/styles/_index.scss +9 -9
  278. package/input-number/styles/_index.scss +1 -1
  279. package/input-otp/styles/_index.scss +5 -5
  280. package/keyboard/styles/_index.scss +5 -5
  281. package/knob/styles/_index.scss +6 -2
  282. package/layout/styles/_index.scss +12 -12
  283. package/lightbox/styles/_index.scss +10 -8
  284. package/line-chart/styles/_index.scss +5 -5
  285. package/list/styles/_index.scss +3 -3
  286. package/llms-full.txt +31 -5
  287. package/llms.txt +48 -32
  288. package/marquee/styles/_index.scss +1 -1
  289. package/mention/styles/_index.scss +4 -4
  290. package/meter-group/styles/_index.scss +4 -4
  291. package/overlay/styles/_index.scss +8 -0
  292. package/package.json +21 -9
  293. package/page-header/styles/_index.scss +4 -4
  294. package/pagination/styles/_index.scss +3 -3
  295. package/popconfirm/styles/_index.scss +3 -3
  296. package/popover/styles/_index.scss +5 -5
  297. package/progress/styles/_index.scss +1 -1
  298. package/pull-to-refresh/styles/_index.scss +38 -0
  299. package/radio/styles/_index.scss +4 -4
  300. package/rating/styles/_index.scss +1 -1
  301. package/result/styles/_index.scss +3 -3
  302. package/schematics/migrations/v9/index.js +71 -0
  303. package/schematics/migrations.json +5 -0
  304. package/schematics/ng-add/schema.json +1 -1
  305. package/schematics/use/symbol-map.json +13 -0
  306. package/segmented/styles/_index.scss +4 -4
  307. package/select/styles/_index.scss +53 -18
  308. package/shiny-text/styles/_index.scss +4 -4
  309. package/sidebar/styles/_index.scss +12 -12
  310. package/slider/styles/_index.scss +5 -5
  311. package/speed-dial/styles/_index.scss +22 -6
  312. package/splash-cursor/styles/_index.scss +1 -0
  313. package/splitter/styles/_index.scss +7 -4
  314. package/spotlight-card/styles/_index.scss +7 -7
  315. package/star-border/styles/_index.scss +3 -3
  316. package/statistic/styles/_index.scss +51 -4
  317. package/stepper/styles/_index.scss +6 -6
  318. package/styles/_typography.scss +4 -1
  319. package/styles.scss +2 -0
  320. package/switch/styles/_index.scss +4 -4
  321. package/table/styles/_index.scss +447 -17
  322. package/tabs/styles/_index.scss +3 -3
  323. package/textarea/styles/_index.scss +7 -7
  324. package/theme/styles/_colors.scss +27 -3
  325. package/tilt-card/styles/_index.scss +4 -4
  326. package/timeline/styles/_index.scss +7 -6
  327. package/toast/styles/_index.scss +11 -11
  328. package/toolbar/styles/_index.scss +4 -4
  329. package/tree/styles/_index.scss +45 -15
  330. package/types/ngwr-action-sheet.d.ts +75 -0
  331. package/types/ngwr-alert.d.ts +1 -1
  332. package/types/ngwr-anchor.d.ts +1 -1
  333. package/types/ngwr-avatar.d.ts +1 -1
  334. package/types/ngwr-back-top.d.ts +1 -1
  335. package/types/ngwr-badge.d.ts +4 -4
  336. package/types/ngwr-bar-chart.d.ts +1 -1
  337. package/types/ngwr-breadcrumbs.d.ts +1 -1
  338. package/types/ngwr-burger.d.ts +1 -1
  339. package/types/ngwr-button.d.ts +3 -3
  340. package/types/ngwr-calendar-heatmap.d.ts +1 -1
  341. package/types/ngwr-calendar.d.ts +1 -1
  342. package/types/ngwr-card.d.ts +1 -1
  343. package/types/ngwr-carousel.d.ts +1 -1
  344. package/types/ngwr-cascader.d.ts +27 -16
  345. package/types/ngwr-checkbox.d.ts +63 -43
  346. package/types/ngwr-clipboard.d.ts +1 -1
  347. package/types/ngwr-collapse.d.ts +3 -3
  348. package/types/ngwr-color-picker.d.ts +24 -19
  349. package/types/ngwr-command-palette.d.ts +1 -1
  350. package/types/ngwr-compare.d.ts +1 -1
  351. package/types/ngwr-context-menu.d.ts +25 -1
  352. package/types/ngwr-cookie.d.ts +7 -1
  353. package/types/ngwr-counter.d.ts +9 -2
  354. package/types/ngwr-date-picker.d.ts +36 -23
  355. package/types/ngwr-density.d.ts +1 -1
  356. package/types/ngwr-descriptions.d.ts +1 -1
  357. package/types/ngwr-dialog.d.ts +1 -1
  358. package/types/ngwr-directives.d.ts +1 -0
  359. package/types/ngwr-divider.d.ts +2 -2
  360. package/types/ngwr-donut-chart.d.ts +1 -1
  361. package/types/ngwr-drag-drop.d.ts +1 -1
  362. package/types/ngwr-drawer.d.ts +1 -1
  363. package/types/ngwr-dropdown.d.ts +1 -1
  364. package/types/ngwr-empty.d.ts +1 -1
  365. package/types/ngwr-file-upload.d.ts +28 -17
  366. package/types/ngwr-form.d.ts +2 -2
  367. package/types/ngwr-gauge.d.ts +1 -1
  368. package/types/ngwr-hotkey.d.ts +1 -1
  369. package/types/ngwr-i18n.d.ts +1 -1
  370. package/types/ngwr-icon-adapters-lucide.d.ts +5 -3
  371. package/types/ngwr-icon.d.ts +1 -1
  372. package/types/ngwr-image-cropper.d.ts +1 -1
  373. package/types/ngwr-input-number.d.ts +25 -19
  374. package/types/ngwr-input-otp.d.ts +23 -17
  375. package/types/ngwr-input.d.ts +2 -2
  376. package/types/ngwr-keyboard.d.ts +1 -1
  377. package/types/ngwr-knob.d.ts +24 -19
  378. package/types/ngwr-layout.d.ts +1 -1
  379. package/types/ngwr-lightbox.d.ts +1 -1
  380. package/types/ngwr-line-chart.d.ts +1 -1
  381. package/types/ngwr-list.d.ts +1 -1
  382. package/types/ngwr-loading-bar.d.ts +1 -1
  383. package/types/ngwr-marquee.d.ts +1 -1
  384. package/types/ngwr-media.d.ts +1 -1
  385. package/types/ngwr-mention.d.ts +1 -1
  386. package/types/ngwr-meta.d.ts +1 -1
  387. package/types/ngwr-meter-group.d.ts +1 -1
  388. package/types/ngwr-page-header.d.ts +1 -1
  389. package/types/ngwr-pagination.d.ts +1 -1
  390. package/types/ngwr-platform.d.ts +93 -2
  391. package/types/ngwr-popconfirm.d.ts +3 -3
  392. package/types/ngwr-progress.d.ts +2 -2
  393. package/types/ngwr-pull-to-refresh.d.ts +69 -0
  394. package/types/ngwr-qr.d.ts +1 -1
  395. package/types/ngwr-radio.d.ts +25 -22
  396. package/types/ngwr-rating.d.ts +28 -20
  397. package/types/ngwr-result.d.ts +1 -1
  398. package/types/ngwr-rotating-text.d.ts +1 -0
  399. package/types/ngwr-scroll.d.ts +1 -1
  400. package/types/ngwr-segmented.d.ts +1 -1
  401. package/types/ngwr-select.d.ts +93 -26
  402. package/types/ngwr-sidebar.d.ts +1 -1
  403. package/types/ngwr-skeleton.d.ts +2 -2
  404. package/types/ngwr-slider.d.ts +35 -21
  405. package/types/ngwr-sparkline.d.ts +1 -1
  406. package/types/ngwr-speed-dial.d.ts +8 -2
  407. package/types/ngwr-spinner.d.ts +1 -1
  408. package/types/ngwr-splitter.d.ts +1 -1
  409. package/types/ngwr-squircle.d.ts +1 -1
  410. package/types/ngwr-statistic.d.ts +40 -5
  411. package/types/ngwr-stepper.d.ts +2 -2
  412. package/types/ngwr-storage.d.ts +1 -1
  413. package/types/ngwr-switch.d.ts +20 -16
  414. package/types/ngwr-table.d.ts +417 -6
  415. package/types/ngwr-tabs.d.ts +1 -1
  416. package/types/ngwr-textarea.d.ts +21 -18
  417. package/types/ngwr-theme.d.ts +7 -2
  418. package/types/ngwr-tilt-card.d.ts +3 -0
  419. package/types/ngwr-timeline.d.ts +1 -1
  420. package/types/ngwr-toast.d.ts +1 -1
  421. package/types/ngwr-toolbar.d.ts +1 -1
  422. package/types/ngwr-tree.d.ts +100 -19
  423. package/types/ngwr-typography.d.ts +1 -1
  424. package/types/ngwr-validators.d.ts +1 -1
  425. package/types/ngwr-version.d.ts +1 -1
  426. package/types/ngwr-virtual-scroll.d.ts +1 -1
  427. package/types/ngwr-window.d.ts +1 -1
  428. package/typography/styles/_index.scss +11 -11
  429. package/virtual-scroll/styles/_index.scss +1 -1
  430. package/waves/styles/_index.scss +1 -1
  431. package/window/styles/_index.scss +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-radio.mjs","sources":["../../../projects/lib/radio/tokens/radio-group.token.ts","../../../projects/lib/radio/radio.ts","../../../projects/lib/radio/radio.html","../../../projects/lib/radio/radio-group.ts","../../../projects/lib/radio/ngwr-radio.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 { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Contract a radio uses to talk to its parent `<wr-radio-group>`.\n *\n * @internal\n */\nexport interface WrRadioGroupContext {\n /** Shared `name` attribute applied to every native input in the group. */\n readonly name: Signal<string>;\n /** Currently selected value. */\n readonly value: Signal<unknown>;\n /** Whether the entire group is disabled. */\n readonly isDisabled: Signal<boolean>;\n /** Select the given value. */\n select(value: unknown): void;\n /** Mark the group as touched (called on blur from any child). */\n touch(): void;\n}\n\n/**\n * Token a `<wr-radio>` injects to participate in its parent `<wr-radio-group>`\n * — reads the selected value, shares the `name` attribute, and signals\n * selection / blur back up.\n *\n * @internal\n */\nexport const WR_RADIO_GROUP = new InjectionToken<WrRadioGroupContext>('WR_RADIO_GROUP');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { randomId } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP } from './tokens';\n\n/**\n * Single-choice option. Must be a child of `<wr-radio-group>`.\n *\n * @example\n * ```html\n * <wr-radio-group [(ngModel)]=\"size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/components/radio\n */\nexport type WrRadioSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-radio',\n templateUrl: './radio.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n imports: [WrIcon],\n})\nexport class WrRadio {\n /** Stable id used to associate the native input with its label. */\n readonly id = input<string>(randomId('wr-radio'));\n\n /** Value selected when this radio is checked. */\n readonly value = input.required<unknown>();\n\n /**\n * Optional icon name rendered inside the dot when checked, in place of the\n * default solid circle. Use any registered NGWR icon.\n */\n readonly icon = input<WrIconName | null>(null);\n\n /** Control size — shares the `--wr-control-*` contract. @default 'md' */\n readonly size = input<WrRadioSize>('md');\n\n /**\n * Disable just this option. The group can also be disabled as a whole via\n * `<wr-radio-group disabled>`; either source disables this radio.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n private readonly group = inject(WR_RADIO_GROUP, { optional: true });\n\n constructor() {\n if (!this.group) {\n throw new Error('[NGWR] <wr-radio> must be used inside <wr-radio-group>.');\n }\n }\n\n protected readonly name = computed(() => this.group?.name() ?? '');\n protected readonly checked = computed(() => this.group?.value() === this.value());\n /** Effective disabled — this option's own `disabled` or the group's. */\n protected readonly isDisabled = computed(() => this.disabled() || (this.group?.isDisabled() ?? false));\n\n protected readonly classes = computed(() => {\n const parts = ['wr-radio'];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-radio--${size}`);\n if (this.checked()) parts.push('wr-radio--checked');\n if (this.isDisabled()) parts.push('wr-radio--disabled');\n if (this.icon()) parts.push('wr-radio--has-icon');\n return parts.join(' ');\n });\n\n protected onSelect(): void {\n if (this.isDisabled()) return;\n this.group?.select(this.value());\n }\n\n protected onBlur(): void {\n this.group?.touch();\n }\n}\n","<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, forwardRef, input, signal } from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { noop, randomId } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP, type WrRadioGroupContext } from './tokens';\n\n/**\n * Hosts a group of `<wr-radio>` children as a single-value selection.\n *\n * Implements `ControlValueAccessor` — the group's `value` is the\n * currently selected radio's `value`.\n *\n * @example\n * ```html\n * <wr-radio-group [(ngModel)]=\"size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/components/radio\n */\n@Component({\n selector: 'wr-radio-group',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-radio-group', role: 'radiogroup' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrRadioGroup),\n multi: true,\n },\n {\n provide: WR_RADIO_GROUP,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrRadioGroup),\n },\n ],\n})\nexport class WrRadioGroup implements ControlValueAccessor, WrRadioGroupContext {\n /**\n * Shared `name` attribute. Defaults to a random id so multiple groups\n * on the same page don't collide.\n */\n readonly name = input<string>(randomId('wr-radio-group'));\n\n /**\n * Disable the whole group. Also set by Angular forms via `setDisabledState`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n readonly value = signal<unknown>(null);\n\n private readonly disabledFromCva = signal(false);\n\n /** Effective disabled state — true if either source disables. */\n readonly isDisabled = computed(() => this.disabled() || this.disabledFromCva());\n\n private onChange: (value: unknown) => void = noop;\n private onTouched: () => void = noop;\n\n // WrRadioGroupContext\n\n select(value: unknown): void {\n if (this.isDisabled()) return;\n this.value.set(value);\n this.onChange(value);\n }\n\n touch(): void {\n this.onTouched();\n }\n\n // ControlValueAccessor\n\n writeValue(value: unknown): void {\n this.value.set(value);\n }\n\n registerOnChange(fn: (value: unknown) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledFromCva.set(coerceBooleanProperty(isDisabled));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;AAKG;AAsBH;;;;;;AAMG;MACU,cAAc,GAAG,IAAI,cAAc,CAAsB,gBAAgB;;AClCtF;;;;;AAKG;MAiCU,OAAO,CAAA;;AAET,IAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,UAAU,CAAC;2EAAC;;IAGxC,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAW;AAE1C;;;AAGG;IACM,IAAI,GAAG,KAAK,CAAoB,IAAI;6EAAC;;IAGrC,IAAI,GAAG,KAAK,CAAc,IAAI;6EAAC;AAExC;;;;;AAKG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;IAErD,KAAK,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEnE,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACf,YAAA,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC;QAC5E;IACF;AAEmB,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE;6EAAC;AAC/C,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC,KAAK,EAAE;gFAAC;;IAE9D,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,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,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;;AAE1B,4BAAA,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC;AAC3C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,cAAc;;AAEvB,4BAAA,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC;AAC5C,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AClDD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-radio.mjs","sources":["../../../projects/lib/radio/tokens/radio-group.token.ts","../../../projects/lib/radio/radio.ts","../../../projects/lib/radio/radio.html","../../../projects/lib/radio/radio-group.ts","../../../projects/lib/radio/ngwr-radio.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 { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Contract a radio uses to talk to its parent `<wr-radio-group>`.\n *\n * @internal\n */\nexport interface WrRadioGroupContext {\n /** Shared `name` attribute applied to every native input in the group. */\n readonly name: Signal<string>;\n /** Currently selected value. */\n readonly value: Signal<unknown>;\n /** Whether the entire group is disabled. */\n readonly isDisabled: Signal<boolean>;\n /** Select the given value. */\n select(value: unknown): void;\n /**\n * Mark the group as touched (called on blur from any child). Named\n * `markTouched` rather than `touch` so it doesn't clash with the\n * `FormUiControl.touch` output the group now exposes for signal forms.\n */\n markTouched(): void;\n}\n\n/**\n * Token a `<wr-radio>` injects to participate in its parent `<wr-radio-group>`\n * — reads the selected value, shares the `name` attribute, and signals\n * selection / blur back up.\n *\n * @internal\n */\nexport const WR_RADIO_GROUP = new InjectionToken<WrRadioGroupContext>('WR_RADIO_GROUP');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { randomId } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP } from './tokens';\n\n/**\n * Single-choice option. Must be a child of `<wr-radio-group>`.\n *\n * @example\n * ```html\n * <wr-radio-group [(ngModel)]=\"size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/radio\n */\nexport type WrRadioSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-radio',\n templateUrl: './radio.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n imports: [WrIcon],\n})\nexport class WrRadio {\n /** Stable id used to associate the native input with its label. */\n readonly id = input<string>(randomId('wr-radio'));\n\n /** Value selected when this radio is checked. */\n readonly value = input.required<unknown>();\n\n /**\n * Optional icon name rendered inside the dot when checked, in place of the\n * default solid circle. Use any registered NGWR icon.\n */\n readonly icon = input<WrIconName | null>(null);\n\n /** Control size — shares the `--wr-control-*` contract. @default 'md' */\n readonly size = input<WrRadioSize>('md');\n\n /**\n * Disable just this option. The group can also be disabled as a whole via\n * `<wr-radio-group disabled>`; either source disables this radio.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n private readonly group = inject(WR_RADIO_GROUP, { optional: true });\n\n constructor() {\n if (!this.group) {\n throw new Error('[NGWR] <wr-radio> must be used inside <wr-radio-group>.');\n }\n }\n\n protected readonly name = computed(() => this.group?.name() ?? '');\n protected readonly checked = computed(() => this.group?.value() === this.value());\n /** Effective disabled — this option's own `disabled` or the group's. */\n protected readonly isDisabled = computed(() => this.disabled() || (this.group?.isDisabled() ?? false));\n\n protected readonly classes = computed(() => {\n const parts = ['wr-radio'];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-radio--${size}`);\n if (this.checked()) parts.push('wr-radio--checked');\n if (this.isDisabled()) parts.push('wr-radio--disabled');\n if (this.icon()) parts.push('wr-radio--has-icon');\n return parts.join(' ');\n });\n\n protected onSelect(): void {\n if (this.isDisabled()) return;\n this.group?.select(this.value());\n }\n\n protected onBlur(): void {\n this.group?.markTouched();\n }\n}\n","<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, computed, forwardRef, input, model, output } from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { randomId } from 'ngwr/utils';\n\nimport { WR_RADIO_GROUP, type WrRadioGroupContext } from './tokens';\n\n/**\n * Hosts a group of `<wr-radio>` children as a single-value selection.\n *\n * A signal-forms native control: it implements `FormValueControl<unknown>`, so\n * `[formField]` binds to its `value` model — the currently selected radio's\n * `value`. `[(value)]` works standalone. Classic `[(ngModel)]` / reactive forms\n * keep working through Angular's bridge.\n *\n * @example\n * ```html\n * <wr-radio-group [formField]=\"form.size\">\n * <wr-radio value=\"sm\">Small</wr-radio>\n * <wr-radio value=\"md\">Medium</wr-radio>\n * <wr-radio value=\"lg\">Large</wr-radio>\n * </wr-radio-group>\n * ```\n *\n * @see https://ngwr.dev/reference/components/radio\n */\n@Component({\n selector: 'wr-radio-group',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-radio-group', role: 'radiogroup' },\n providers: [\n {\n provide: WR_RADIO_GROUP,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrRadioGroup),\n },\n ],\n})\nexport class WrRadioGroup implements FormValueControl<unknown>, WrRadioGroupContext {\n /**\n * Shared `name` attribute. Defaults to a random id so multiple groups\n * on the same page don't collide. (Also the `FormUiControl.name` slot.)\n */\n readonly name = input<string>(randomId('wr-radio-group'));\n\n /**\n * Disable the whole group. Bound automatically from the field's disabled\n * state when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** The selected radio's value. Bound by `[formField]`, or two-way via `[(value)]`. */\n readonly value = model<unknown>(null);\n\n /** Emitted on blur from any child so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /** Effective disabled state (WrRadioGroupContext). */\n readonly isDisabled = computed(() => this.disabled());\n\n // WrRadioGroupContext\n\n select(value: unknown): void {\n if (this.isDisabled()) return;\n this.value.set(value);\n }\n\n markTouched(): void {\n this.touch.emit();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AA0BH;;;;;;AAMG;MACU,cAAc,GAAG,IAAI,cAAc,CAAsB,gBAAgB;;ACtCtF;;;;;AAKG;MAiCU,OAAO,CAAA;;AAET,IAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,UAAU,CAAC;2EAAC;;IAGxC,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAW;AAE1C;;;AAGG;IACM,IAAI,GAAG,KAAK,CAAoB,IAAI;6EAAC;;IAGrC,IAAI,GAAG,KAAK,CAAc,IAAI;6EAAC;AAExC;;;;;AAKG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;IAErD,KAA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AAE;AACrD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,cAAc;;AAEvB,4BAAA,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC;AAC5C,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC9CD;;AAEG;;;;"}
@@ -1,8 +1,7 @@
1
1
  import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
- import { input, signal, computed, forwardRef, ViewEncapsulation, Component } from '@angular/core';
4
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import { clamp, noop } from 'ngwr/utils';
3
+ import { input, model, output, signal, computed, effect, ViewEncapsulation, Component } from '@angular/core';
4
+ import { clamp } from 'ngwr/utils';
6
5
 
7
6
  /**
8
7
  * @license
@@ -17,7 +16,12 @@ class WrRating {
17
16
  step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: (v) => (Number(v) === 0.5 ? 0.5 : 1) });
18
17
  /** Read-only — value is displayed but not interactive. @default false */
19
18
  readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
20
- /** Disable interaction. @default false */
19
+ /**
20
+ * Disable interaction. Bound automatically from the field's disabled state
21
+ * when used with `[formField]`.
22
+ *
23
+ * @default false
24
+ */
21
25
  disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
22
26
  /** Control size — scales the icons + gaps. @default 'md' */
23
27
  size = input('md', /* @ts-ignore */
@@ -25,17 +29,15 @@ class WrRating {
25
29
  /** Accessible label. @default 'Rating' */
26
30
  ariaLabel = input('Rating', /* @ts-ignore */
27
31
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
28
- /** Last committed value (mirrored from the CVA). */
29
- value = signal(null, /* @ts-ignore */
32
+ /** The rating. Bound by `[formField]`, or two-way via `[(value)]`. */
33
+ value = model(null, /* @ts-ignore */
30
34
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
35
+ /** Emitted on blur so a bound field can mark itself touched. */
36
+ touch = output();
31
37
  /** Transient hover preview — overrides `value` for display when set. */
32
38
  hoverValue = signal(null, /* @ts-ignore */
33
39
  ...(ngDevMode ? [{ debugName: "hoverValue" }] : /* istanbul ignore next */ []));
34
- disabledFromCva = signal(false, /* @ts-ignore */
35
- ...(ngDevMode ? [{ debugName: "disabledFromCva" }] : /* istanbul ignore next */ []));
36
- effectiveDisabled = computed(() => this.disabled() || this.disabledFromCva(), /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
38
- interactive = computed(() => !this.effectiveDisabled() && !this.readonly(), /* @ts-ignore */
40
+ interactive = computed(() => !this.disabled() && !this.readonly(), /* @ts-ignore */
39
41
  ...(ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []));
40
42
  /** What we actually render — hover wins while hovering. */
41
43
  displayValue = computed(() => this.hoverValue() ?? this.value() ?? 0, /* @ts-ignore */
@@ -49,30 +51,28 @@ class WrRating {
49
51
  parts.push(`wr-rating--${size}`);
50
52
  if (this.readonly())
51
53
  parts.push('wr-rating--readonly');
52
- if (this.effectiveDisabled())
54
+ if (this.disabled())
53
55
  parts.push('wr-rating--disabled');
54
56
  return parts.join(' ');
55
57
  }, /* @ts-ignore */
56
58
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
59
+ constructor() {
60
+ // A model can be written to anything (`[formField]` / `[(value)]`); keep the
61
+ // rating in range by re-clamping out-of-bounds external writes to `[0, count]`.
62
+ // (This is the clamp the old CVA `writeValue` used to apply.)
63
+ effect(() => {
64
+ const v = this.value();
65
+ if (v === null || v === undefined)
66
+ return;
67
+ const clamped = clamp(Number(v), 0, this.count());
68
+ if (clamped !== v)
69
+ this.value.set(clamped);
70
+ });
71
+ }
57
72
  /** Fill ratio for slot `i` in `[0, 1]` — drives the CSS clip width. */
58
73
  fillFor(i) {
59
74
  return clamp(this.displayValue() - i, 0, 1);
60
75
  }
61
- // ControlValueAccessor
62
- onChange = noop;
63
- onTouched = noop;
64
- writeValue(value) {
65
- this.value.set(value === null || value === undefined ? null : clamp(Number(value), 0, this.count()));
66
- }
67
- registerOnChange(fn) {
68
- this.onChange = fn;
69
- }
70
- registerOnTouched(fn) {
71
- this.onTouched = fn;
72
- }
73
- setDisabledState(isDisabled) {
74
- this.disabledFromCva.set(coerceBooleanProperty(isDisabled));
75
- }
76
76
  // Template handlers
77
77
  onSlotMove(event, index) {
78
78
  if (!this.interactive())
@@ -122,6 +122,9 @@ class WrRating {
122
122
  event.preventDefault();
123
123
  this.commit(next);
124
124
  }
125
+ onBlur() {
126
+ this.touch.emit();
127
+ }
125
128
  // Internals
126
129
  /** Convert a mouse position over slot `index` to a snapped value. */
127
130
  computeValue(event, index) {
@@ -136,30 +139,14 @@ class WrRating {
136
139
  commit(value) {
137
140
  this.value.set(value);
138
141
  this.hoverValue.set(null);
139
- this.onChange(value);
140
- this.onTouched();
141
142
  }
142
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrRating, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrRating, isStandalone: true, selector: "wr-rating", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, providers: [
144
- {
145
- provide: NG_VALUE_ACCESSOR,
146
- // eslint-disable-next-line @angular-eslint/no-forward-ref
147
- useExisting: forwardRef(() => WrRating),
148
- multi: true,
149
- },
150
- ], ngImport: i0, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
143
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrRating, deps: [], target: i0.ɵɵFactoryTarget.Component });
144
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrRating, isStandalone: true, selector: "wr-rating", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
151
145
  }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrRating, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrRating, decorators: [{
153
147
  type: Component,
154
- args: [{ selector: 'wr-rating', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, providers: [
155
- {
156
- provide: NG_VALUE_ACCESSOR,
157
- // eslint-disable-next-line @angular-eslint/no-forward-ref
158
- useExisting: forwardRef(() => WrRating),
159
- multi: true,
160
- },
161
- ], template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n" }]
162
- }], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
148
+ args: [{ selector: 'wr-rating', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n" }]
149
+ }], ctorParameters: () => [], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
163
150
 
164
151
  /**
165
152
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-rating.mjs","sources":["../../../projects/lib/rating/rating.ts","../../../projects/lib/rating/rating.html","../../../projects/lib/rating/ngwr-rating.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 { Component, ViewEncapsulation, computed, forwardRef, input, signal } from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { clamp, noop } from 'ngwr/utils';\n\n/**\n * Star rating input. Click or hover to set a value; supports half-star\n * increments via `step=\"0.5\"`. Implements `ControlValueAccessor` — value\n * is `number | null` (clamped to `[0, count]`).\n *\n * Keyboard: `←` / `→` bump by `step`, `Home` / `End` jump to 0 / max.\n * Clicking the current value clears it (toggle off).\n *\n * @example\n * ```html\n * <wr-rating [(ngModel)]=\"score\" />\n * <wr-rating [(ngModel)]=\"score\" [count]=\"10\" step=\"0.5\" />\n * <wr-rating [ngModel]=\"4.5\" [readonly]=\"true\" />\n * ```\n *\n * @see https://ngwr.dev/components/rating\n */\nexport type WrRatingSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-rating',\n templateUrl: './rating.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrRating),\n multi: true,\n },\n ],\n})\nexport class WrRating implements ControlValueAccessor {\n /** Total number of slots. @default 5 */\n readonly count = input(5, { transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 5)) });\n\n /** Step granularity — `1` for whole stars, `0.5` for halves. @default 1 */\n readonly step = input(1 as 0.5 | 1, {\n transform: (v: unknown): 0.5 | 1 => (Number(v) === 0.5 ? 0.5 : 1),\n });\n\n /** Read-only — value is displayed but not interactive. @default false */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Control size — scales the icons + gaps. @default 'md' */\n readonly size = input<WrRatingSize>('md');\n\n /** Accessible label. @default 'Rating' */\n readonly ariaLabel = input<string>('Rating');\n\n /** Last committed value (mirrored from the CVA). */\n protected readonly value = signal<number | null>(null);\n\n /** Transient hover preview — overrides `value` for display when set. */\n protected readonly hoverValue = signal<number | null>(null);\n\n private readonly disabledFromCva = signal(false);\n\n protected readonly effectiveDisabled = computed(() => this.disabled() || this.disabledFromCva());\n\n protected readonly interactive = computed(() => !this.effectiveDisabled() && !this.readonly());\n\n /** What we actually render — hover wins while hovering. */\n protected readonly displayValue = computed(() => this.hoverValue() ?? this.value() ?? 0);\n\n protected readonly slots = computed(() => Array.from({ length: this.count() }, (_, i) => i));\n\n protected readonly classes = computed(() => {\n const parts = ['wr-rating'];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-rating--${size}`);\n if (this.readonly()) parts.push('wr-rating--readonly');\n if (this.effectiveDisabled()) parts.push('wr-rating--disabled');\n return parts.join(' ');\n });\n\n /** Fill ratio for slot `i` in `[0, 1]` — drives the CSS clip width. */\n protected fillFor(i: number): number {\n return clamp(this.displayValue() - i, 0, 1);\n }\n\n // ControlValueAccessor\n\n private onChange: (value: number | null) => void = noop;\n private onTouched: () => void = noop;\n\n writeValue(value: number | null): void {\n this.value.set(value === null || value === undefined ? null : clamp(Number(value), 0, this.count()));\n }\n\n registerOnChange(fn: (value: number | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledFromCva.set(coerceBooleanProperty(isDisabled));\n }\n\n // Template handlers\n\n protected onSlotMove(event: MouseEvent, index: number): void {\n if (!this.interactive()) return;\n this.hoverValue.set(this.computeValue(event, index));\n }\n\n protected onLeave(): void {\n this.hoverValue.set(null);\n }\n\n protected onSlotClick(event: MouseEvent, index: number): void {\n if (!this.interactive()) return;\n const next = this.computeValue(event, index);\n // Click the current value → clear it.\n const final = next === this.value() ? null : next;\n this.commit(final);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (!this.interactive()) return;\n const max = this.count();\n const step = this.step();\n const current = this.value() ?? 0;\n let next: number | null;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next = clamp(current + step, 0, max);\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next = clamp(current - step, 0, max);\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = max;\n break;\n case 'Delete':\n case 'Backspace':\n next = null;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.commit(next);\n }\n\n // Internals\n\n /** Convert a mouse position over slot `index` to a snapped value. */\n private computeValue(event: MouseEvent, index: number): number {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const ratio = clamp((event.clientX - rect.left) / rect.width, 0, 1);\n const raw = index + ratio;\n const step = this.step();\n const snapped = Math.ceil(raw / step) * step;\n return clamp(snapped, step, this.count());\n }\n\n private commit(value: number | null): void {\n this.value.set(value);\n this.hoverValue.set(null);\n this.onChange(value);\n this.onTouched();\n }\n}\n","<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;MAyCU,QAAQ,CAAA;;IAEV,KAAK,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,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;;AAGhG,IAAA,IAAI,GAAG,KAAK,CAAC,CAAY,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,MAAA,EAAA,8BAAA,EAAA,CAAA,EAChC,SAAS,EAAE,CAAC,CAAU,MAAe,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,GACjE;;IAGO,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAG7D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAG7D,IAAI,GAAG,KAAK,CAAe,IAAI;6EAAC;;IAGhC,SAAS,GAAG,KAAK,CAAS,QAAQ;kFAAC;;IAGzB,KAAK,GAAG,MAAM,CAAgB,IAAI;8EAAC;;IAGnC,UAAU,GAAG,MAAM,CAAgB,IAAI;mFAAC;IAE1C,e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KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,SAAA,EATR;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;;AAE1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,QAAQ,CAAC;AACvC,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5CH,05DA+CA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDDa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAdpB,SAAS;+BACE,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,SAAA,EACrB;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;;AAE1B,4BAAA,WAAW,EAAE,UAAU,CAAC,cAAc,CAAC;AACvC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,05DAAA,EAAA;;;AE5CH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-rating.mjs","sources":["../../../projects/lib/rating/rating.ts","../../../projects/lib/rating/rating.html","../../../projects/lib/rating/ngwr-rating.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 { Component, ViewEncapsulation, computed, effect, input, model, output, signal } from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { clamp } from 'ngwr/utils';\n\n/**\n * Star rating input. Click or hover to set a value; supports half-star\n * increments via `step=\"0.5\"`. Value is `number | null` (clamped to\n * `[0, count]`).\n *\n * A signal-forms native control: it implements `FormValueControl<number | null>`,\n * so `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone.\n *\n * Keyboard: `←` / `→` bump by `step`, `Home` / `End` jump to 0 / max.\n * Clicking the current value clears it (toggle off).\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-rating [formField]=\"form.score\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-rating [(value)]=\"score\" [count]=\"10\" step=\"0.5\" />\n * <wr-rating [value]=\"4.5\" [readonly]=\"true\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/rating\n */\nexport type WrRatingSize = 'sm' | 'md' | 'lg';\n\n@Component({\n selector: 'wr-rating',\n templateUrl: './rating.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrRating implements FormValueControl<number | null> {\n /** Total number of slots. @default 5 */\n readonly count = input(5, { transform: (v: unknown): number => Math.max(1, coerceNumberProperty(v, 5)) });\n\n /** Step granularity — `1` for whole stars, `0.5` for halves. @default 1 */\n readonly step = input(1 as 0.5 | 1, {\n transform: (v: unknown): 0.5 | 1 => (Number(v) === 0.5 ? 0.5 : 1),\n });\n\n /** Read-only — value is displayed but not interactive. @default false */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Disable interaction. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Control size — scales the icons + gaps. @default 'md' */\n readonly size = input<WrRatingSize>('md');\n\n /** Accessible label. @default 'Rating' */\n readonly ariaLabel = input<string>('Rating');\n\n /** The rating. Bound by `[formField]`, or two-way via `[(value)]`. */\n readonly value = model<number | null>(null);\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /** Transient hover preview — overrides `value` for display when set. */\n protected readonly hoverValue = signal<number | null>(null);\n\n protected readonly interactive = computed(() => !this.disabled() && !this.readonly());\n\n /** What we actually render — hover wins while hovering. */\n protected readonly displayValue = computed(() => this.hoverValue() ?? this.value() ?? 0);\n\n protected readonly slots = computed(() => Array.from({ length: this.count() }, (_, i) => i));\n\n protected readonly classes = computed(() => {\n const parts = ['wr-rating'];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-rating--${size}`);\n if (this.readonly()) parts.push('wr-rating--readonly');\n if (this.disabled()) parts.push('wr-rating--disabled');\n return parts.join(' ');\n });\n\n constructor() {\n // A model can be written to anything (`[formField]` / `[(value)]`); keep the\n // rating in range by re-clamping out-of-bounds external writes to `[0, count]`.\n // (This is the clamp the old CVA `writeValue` used to apply.)\n effect(() => {\n const v = this.value();\n if (v === null || v === undefined) return;\n const clamped = clamp(Number(v), 0, this.count());\n if (clamped !== v) this.value.set(clamped);\n });\n }\n\n /** Fill ratio for slot `i` in `[0, 1]` — drives the CSS clip width. */\n protected fillFor(i: number): number {\n return clamp(this.displayValue() - i, 0, 1);\n }\n\n // Template handlers\n\n protected onSlotMove(event: MouseEvent, index: number): void {\n if (!this.interactive()) return;\n this.hoverValue.set(this.computeValue(event, index));\n }\n\n protected onLeave(): void {\n this.hoverValue.set(null);\n }\n\n protected onSlotClick(event: MouseEvent, index: number): void {\n if (!this.interactive()) return;\n const next = this.computeValue(event, index);\n // Click the current value → clear it.\n const final = next === this.value() ? null : next;\n this.commit(final);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (!this.interactive()) return;\n const max = this.count();\n const step = this.step();\n const current = this.value() ?? 0;\n let next: number | null;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next = clamp(current + step, 0, max);\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next = clamp(current - step, 0, max);\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = max;\n break;\n case 'Delete':\n case 'Backspace':\n next = null;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.commit(next);\n }\n\n protected onBlur(): void {\n this.touch.emit();\n }\n\n // Internals\n\n /** Convert a mouse position over slot `index` to a snapped value. */\n private computeValue(event: MouseEvent, index: number): number {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const ratio = clamp((event.clientX - rect.left) / rect.width, 0, 1);\n const raw = index + ratio;\n const step = this.step();\n const snapped = Math.ceil(raw / step) * step;\n return clamp(snapped, step, this.count());\n }\n\n private commit(value: number | null): void {\n this.value.set(value);\n this.hoverValue.set(null);\n }\n}\n","<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"interactive() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;MAwCU,QAAQ,CAAA;;IAEV,KAAK,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,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;;AAGhG,IAAA,IAAI,GAAG,KAAK,CAAC,CAAY,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,MAAA,EAAA,8BAAA,EAAA,CAAA,EAChC,SAAS,EAAE,CAAC,CAAU,MAAe,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,GACjE;;IAGO,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEtE;;;;;AAKG;IACM,QAAQ,GAAG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,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI;QAC5C,OAAO,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3C;AAEQ,IAAA,MAAM,CAAC,KAAoB,EAAA;AACjC,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACrB,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;IAC3B;uGA3IW,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,ohCC7CrB,w6DAgDA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDHa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBANpB,SAAS;+BACE,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,w6DAAA,EAAA;;;AE3ClC;;AAEG;;;;"}
@@ -22,7 +22,7 @@ import { input, computed, ViewEncapsulation, Component } from '@angular/core';
22
22
  * </wr-result>
23
23
  * ```
24
24
  *
25
- * @see https://ngwr.dev/components/result
25
+ * @see https://ngwr.dev/reference/components/result
26
26
  */
27
27
  class WrResult {
28
28
  title = input('', /* @ts-ignore */
@@ -33,10 +33,10 @@ class WrResult {
33
33
  ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
34
34
  classes = computed(() => `wr-result wr-result--${this.status()}`, /* @ts-ignore */
35
35
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult, deps: [], target: i0.ɵɵFactoryTarget.Component });
37
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrResult, isStandalone: true, selector: "wr-result", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
36
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult, deps: [], target: i0.ɵɵFactoryTarget.Component });
37
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrResult, isStandalone: true, selector: "wr-result", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
38
38
  }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult, decorators: [{
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult, decorators: [{
40
40
  type: Component,
41
41
  args: [{ selector: 'wr-result', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\n</div>\n" }]
42
42
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }] } });
@@ -62,10 +62,10 @@ class WrResult404 {
62
62
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
63
63
  description = input("Sorry, the page you visited doesn't exist.", /* @ts-ignore */
64
64
  ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
65
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult404, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: WrResult404, isStandalone: true, selector: "wr-result-404", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<wr-result status="warning" [title]="title()" [description]="description()"><ng-content /></wr-result>`, isInline: true, dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult404, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: WrResult404, isStandalone: true, selector: "wr-result-404", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<wr-result status="warning" [title]="title()" [description]="description()"><ng-content /></wr-result>`, isInline: true, dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
67
67
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult404, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult404, decorators: [{
69
69
  type: Component,
70
70
  args: [{
71
71
  selector: 'wr-result-404',
@@ -80,10 +80,10 @@ class WrResult403 {
80
80
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
81
81
  description = input("Sorry, you're not authorized to view this page.", /* @ts-ignore */
82
82
  ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult403, deps: [], target: i0.ɵɵFactoryTarget.Component });
84
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: WrResult403, isStandalone: true, selector: "wr-result-403", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<wr-result status="error" [title]="title()" [description]="description()"><ng-content /></wr-result>`, isInline: true, dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult403, deps: [], target: i0.ɵɵFactoryTarget.Component });
84
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: WrResult403, isStandalone: true, selector: "wr-result-403", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<wr-result status="error" [title]="title()" [description]="description()"><ng-content /></wr-result>`, isInline: true, dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
85
85
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult403, decorators: [{
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult403, decorators: [{
87
87
  type: Component,
88
88
  args: [{
89
89
  selector: 'wr-result-403',
@@ -98,10 +98,10 @@ class WrResult500 {
98
98
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
99
99
  description = input('Sorry, something went wrong.', /* @ts-ignore */
100
100
  ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
101
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult500, deps: [], target: i0.ɵɵFactoryTarget.Component });
102
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: WrResult500, isStandalone: true, selector: "wr-result-500", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<wr-result status="error" [title]="title()" [description]="description()"><ng-content /></wr-result>`, isInline: true, dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
101
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult500, deps: [], target: i0.ɵɵFactoryTarget.Component });
102
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: WrResult500, isStandalone: true, selector: "wr-result-500", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<wr-result status="error" [title]="title()" [description]="description()"><ng-content /></wr-result>`, isInline: true, dependencies: [{ kind: "component", type: WrResult, selector: "wr-result", inputs: ["title", "description", "status"] }], encapsulation: i0.ViewEncapsulation.None });
103
103
  }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrResult500, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrResult500, decorators: [{
105
105
  type: Component,
106
106
  args: [{
107
107
  selector: 'wr-result-500',
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-result.mjs","sources":["../../../projects/lib/result/result.ts","../../../projects/lib/result/result.html","../../../projects/lib/result/presets.ts","../../../projects/lib/result/ngwr-result.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 { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport type { WrResultStatus } from './interfaces';\n\n/**\n * Large-illustration result / empty-state. Use after a successful action,\n * for empty list states, or 404 / 500 pages.\n *\n * @example\n * ```html\n * <wr-result status=\"success\" title=\"Submitted!\" description=\"We'll be in touch.\">\n * <button wrButton color=\"primary\" wrResultExtra>Continue</button>\n * </wr-result>\n *\n * <wr-result status=\"empty\" title=\"No projects yet\">\n * <button wrButton wrResultExtra>Create one</button>\n * </wr-result>\n * ```\n *\n * @see https://ngwr.dev/components/result\n */\n@Component({\n selector: 'wr-result',\n templateUrl: './result.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrResult {\n readonly title = input<string>('');\n readonly description = input<string>('');\n readonly status = input<WrResultStatus>('info');\n\n protected readonly classes = computed(() => `wr-result wr-result--${this.status()}`);\n}\n\nexport type { WrResultStatus } from './interfaces';\n","<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { WrResult } from './result';\n\n/**\n * Pre-set 404 result. Override `title` / `description` for localisation.\n *\n * @example\n * ```html\n * <wr-result-404>\n * <button wrButton wrResultExtra>Back home</button>\n * </wr-result-404>\n * ```\n */\n@Component({\n selector: 'wr-result-404',\n template: `<wr-result status=\"warning\" [title]=\"title()\" [description]=\"description()\"><ng-content /></wr-result>`,\n encapsulation: ViewEncapsulation.None,\n imports: [WrResult],\n})\nexport class WrResult404 {\n readonly title = input<string>('404');\n readonly description = input<string>(\"Sorry, the page you visited doesn't exist.\");\n}\n\n/** Pre-set 403 result — forbidden / no access. */\n@Component({\n selector: 'wr-result-403',\n template: `<wr-result status=\"error\" [title]=\"title()\" [description]=\"description()\"><ng-content /></wr-result>`,\n encapsulation: ViewEncapsulation.None,\n imports: [WrResult],\n})\nexport class WrResult403 {\n readonly title = input<string>('403');\n readonly description = input<string>(\"Sorry, you're not authorized to view this page.\");\n}\n\n/** Pre-set 500 result — internal server error. */\n@Component({\n selector: 'wr-result-500',\n template: `<wr-result status=\"error\" [title]=\"title()\" [description]=\"description()\"><ng-content /></wr-result>`,\n encapsulation: ViewEncapsulation.None,\n imports: [WrResult],\n})\nexport class WrResult500 {\n readonly title = input<string>('500');\n readonly description = input<string>('Sorry, something went wrong.');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;;;;AAgBG;MAOU,QAAQ,CAAA;IACV,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;IACzB,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;IAC/B,MAAM,GAAG,KAAK,CAAiB,MAAM;+EAAC;IAE5B,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,qBAAA,EAAwB,IAAI,CAAC,MAAM,EAAE,CAAA,CAAE;gFAAC;uGALzE,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,8fClCrB,6tEAsEA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDpCa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBANpB,SAAS;+BACE,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,6tEAAA,EAAA;;;AEhClC;;;;;AAKG;AAMH;;;;;;;;;AASG;MAOU,WAAW,CAAA;IACb,KAAK,GAAG,KAAK,CAAS,KAAK;8EAAC;IAC5B,WAAW,GAAG,KAAK,CAAS,4CAA4C;oFAAC;uGAFvE,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,KAAA,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A,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAJZ,CAAA,oGAAA,CAAsG,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAEtG,QAAQ,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,aAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,CAAA,oGAAA,CAAsG;oBAChH,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,OAAO,EAAE,CAAC,QAAQ,CAAC;AACpB,iBAAA;;;AClDD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-result.mjs","sources":["../../../projects/lib/result/result.ts","../../../projects/lib/result/result.html","../../../projects/lib/result/presets.ts","../../../projects/lib/result/ngwr-result.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 { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport type { WrResultStatus } from './interfaces';\n\n/**\n * Large-illustration result / empty-state. Use after a successful action,\n * for empty list states, or 404 / 500 pages.\n *\n * @example\n * ```html\n * <wr-result status=\"success\" title=\"Submitted!\" description=\"We'll be in touch.\">\n * <button wrButton color=\"primary\" wrResultExtra>Continue</button>\n * </wr-result>\n *\n * <wr-result status=\"empty\" title=\"No projects yet\">\n * <button wrButton wrResultExtra>Create one</button>\n * </wr-result>\n * ```\n *\n * @see https://ngwr.dev/reference/components/result\n */\n@Component({\n selector: 'wr-result',\n templateUrl: './result.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n})\nexport class WrResult {\n readonly title = input<string>('');\n readonly description = input<string>('');\n readonly status = input<WrResultStatus>('info');\n\n protected readonly classes = computed(() => `wr-result wr-result--${this.status()}`);\n}\n\nexport type { WrResultStatus } from './interfaces';\n","<div class=\"wr-result__icon\" aria-hidden=\"true\">\n @switch (status()) {\n @case ('success') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M20 32 L28 40 L44 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 18 L32 36 M32 44 L32 46\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M22 22 L42 42 M42 22 L22 42\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('empty') {\n <svg width=\"72\" height=\"56\" viewBox=\"0 0 72 56\">\n <rect x=\"6\" y=\"14\" width=\"60\" height=\"36\" rx=\"4\" fill=\"currentColor\" opacity=\"0.12\" />\n <path d=\"M6 26 L36 26 L40 20 L66 20\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n </svg>\n }\n @default {\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\">\n <circle cx=\"32\" cy=\"32\" r=\"28\" fill=\"currentColor\" opacity=\"0.12\" />\n <path\n d=\"M32 20 L32 36 M32 42 L32 44\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n }\n</div>\n\n@if (title()) {\n <h2 class=\"wr-result__title\">{{ title() }}</h2>\n}\n@if (description()) {\n <p class=\"wr-result__description\">{{ description() }}</p>\n}\n\n<div class=\"wr-result__extra\">\n <ng-content select=\"[wrResultExtra]\" />\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { WrResult } from './result';\n\n/**\n * Pre-set 404 result. Override `title` / `description` for localisation.\n *\n * @example\n * ```html\n * <wr-result-404>\n * <button wrButton wrResultExtra>Back home</button>\n * </wr-result-404>\n * ```\n */\n@Component({\n selector: 'wr-result-404',\n template: `<wr-result status=\"warning\" [title]=\"title()\" [description]=\"description()\"><ng-content /></wr-result>`,\n encapsulation: ViewEncapsulation.None,\n imports: [WrResult],\n})\nexport class WrResult404 {\n readonly title = input<string>('404');\n readonly description = input<string>(\"Sorry, the page you visited doesn't exist.\");\n}\n\n/** Pre-set 403 result — forbidden / no access. */\n@Component({\n selector: 'wr-result-403',\n template: `<wr-result status=\"error\" [title]=\"title()\" [description]=\"description()\"><ng-content /></wr-result>`,\n encapsulation: ViewEncapsulation.None,\n imports: [WrResult],\n})\nexport class WrResult403 {\n readonly title = input<string>('403');\n readonly description = input<string>(\"Sorry, you're not authorized to view this page.\");\n}\n\n/** Pre-set 500 result — internal server error. */\n@Component({\n selector: 'wr-result-500',\n template: `<wr-result status=\"error\" [title]=\"title()\" [description]=\"description()\"><ng-content /></wr-result>`,\n encapsulation: ViewEncapsulation.None,\n imports: [WrResult],\n})\nexport class WrResult500 {\n readonly title = input<string>('500');\n readonly description = input<string>('Sorry, something went wrong.');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;;;;AAgBG;MAOU,QAAQ,CAAA;IACV,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;IACzB,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;IAC/B,MAAM,GAAG,KAAK,CAAiB,MAAM;+EAAC;IAE5B,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,qBAAA,EAAwB,IAAI,CAAC,MAAM,EAAE,CAAA,CAAE;gFAAC;uGALzE,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,8fClCrB,6tEAsEA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDpCa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBANpB,SAAS;+BACE,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EAAA,6tEAAA,EAAA;;;AEhClC;;;;;AAKG;AAMH;;;;;;;;;AASG;MAOU,WAAW,CAAA;IACb,KAAK,GAAG,KAAK,CAAS,KAAK;8EAAC;IAC5B,WAAW,GAAG,KAAK,CAAS,4CAA4C;oFAAC;uGAFvE,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,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,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAJZ,CAAA,oGAAA,CAAsG,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAEtG,QAAQ,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,aAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,CAAA,oGAAA,CAAsG;oBAChH,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,OAAO,EAAE,CAAC,QAAQ,CAAC;AACpB,iBAAA;;;AClDD;;AAEG;;;;"}
@@ -99,6 +99,7 @@ class WrRotatingText {
99
99
  platform = inject(WrPlatform);
100
100
  timerId;
101
101
  isAnimating = false;
102
+ destroyed = false;
102
103
  constructor() {
103
104
  if (!this.isBrowser)
104
105
  return;
@@ -109,7 +110,10 @@ class WrRotatingText {
109
110
  this.auto();
110
111
  this.restartTimer();
111
112
  });
112
- this.destroyRef.onDestroy(() => clearInterval(this.timerId));
113
+ this.destroyRef.onDestroy(() => {
114
+ clearInterval(this.timerId);
115
+ this.destroyed = true;
116
+ });
113
117
  }
114
118
  // Public imperative API
115
119
  next() {
@@ -156,6 +160,13 @@ class WrRotatingText {
156
160
  return;
157
161
  this.isAnimating = true;
158
162
  await this.animateOut();
163
+ // `animateOut` is an async gap, and a transition already in flight outlives
164
+ // the component: navigating away destroys it, and `clearInterval` only
165
+ // stops FUTURE ticks — not this call. Everything below touches the view, so
166
+ // resuming on a destroyed component throws NG0911 ("View has already been
167
+ // destroyed") and warns NG0953 (emit on a destroyed `OutputRef`).
168
+ if (this.destroyed)
169
+ return;
159
170
  this.index.set(target);
160
171
  this.nextChange.emit(target);
161
172
  // Animate in only AFTER Angular has rendered the new word's spans. A single
@@ -251,10 +262,10 @@ class WrRotatingText {
251
262
  return i * stagger;
252
263
  }
253
264
  }
254
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrRotatingText, deps: [], target: i0.ɵɵFactoryTarget.Component });
255
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: WrRotatingText, isStandalone: true, selector: "wr-rotating-text", inputs: { texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: true, transformFunction: null }, rotationInterval: { classPropertyName: "rotationInterval", publicName: "rotationInterval", isSignal: true, isRequired: false, transformFunction: null }, splitBy: { classPropertyName: "splitBy", publicName: "splitBy", isSignal: true, isRequired: false, transformFunction: null }, auto: { classPropertyName: "auto", publicName: "auto", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, easing: { classPropertyName: "easing", publicName: "easing", isSignal: true, isRequired: false, transformFunction: null }, staggerDuration: { classPropertyName: "staggerDuration", publicName: "staggerDuration", isSignal: true, isRequired: false, transformFunction: null }, staggerFrom: { classPropertyName: "staggerFrom", publicName: "staggerFrom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nextChange: "nextChange" }, host: { classAttribute: "wr-rotating-text" }, ngImport: i0, template: "<!-- Screen-reader-only live region with the canonical text. -->\n<span class=\"wr-rotating-text__sr-only\">{{ current() }}</span>\n\n<!-- Animated visual content. -->\n<span class=\"wr-rotating-text__inner\" aria-hidden=\"true\">\n @for (word of words(); track $index) {\n <span class=\"wr-rotating-text__word\">\n @for (char of word.characters; track $index) {\n <span class=\"wr-rotating-text__char\">{{ char }}</span>\n }\n @if (word.needsSpace) {\n <span class=\"wr-rotating-text__space\">&nbsp;</span>\n }\n </span>\n }\n</span>\n", styles: [".wr-rotating-text{display:inline-flex;align-items:center;overflow:hidden;vertical-align:bottom}.wr-rotating-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-rotating-text__inner{display:inline-flex;flex-wrap:wrap}.wr-rotating-text__word{display:inline-flex;align-items:center}.wr-rotating-text__char{display:inline-block;will-change:transform,opacity}.wr-rotating-text__space{display:inline;white-space:pre}\n"], encapsulation: i0.ViewEncapsulation.None });
265
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrRotatingText, deps: [], target: i0.ɵɵFactoryTarget.Component });
266
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrRotatingText, isStandalone: true, selector: "wr-rotating-text", inputs: { texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: true, transformFunction: null }, rotationInterval: { classPropertyName: "rotationInterval", publicName: "rotationInterval", isSignal: true, isRequired: false, transformFunction: null }, splitBy: { classPropertyName: "splitBy", publicName: "splitBy", isSignal: true, isRequired: false, transformFunction: null }, auto: { classPropertyName: "auto", publicName: "auto", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, easing: { classPropertyName: "easing", publicName: "easing", isSignal: true, isRequired: false, transformFunction: null }, staggerDuration: { classPropertyName: "staggerDuration", publicName: "staggerDuration", isSignal: true, isRequired: false, transformFunction: null }, staggerFrom: { classPropertyName: "staggerFrom", publicName: "staggerFrom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nextChange: "nextChange" }, host: { classAttribute: "wr-rotating-text" }, ngImport: i0, template: "<!-- Screen-reader-only live region with the canonical text. -->\n<span class=\"wr-rotating-text__sr-only\">{{ current() }}</span>\n\n<!-- Animated visual content. -->\n<span class=\"wr-rotating-text__inner\" aria-hidden=\"true\">\n @for (word of words(); track $index) {\n <span class=\"wr-rotating-text__word\">\n @for (char of word.characters; track $index) {\n <span class=\"wr-rotating-text__char\">{{ char }}</span>\n }\n @if (word.needsSpace) {\n <span class=\"wr-rotating-text__space\">&nbsp;</span>\n }\n </span>\n }\n</span>\n", styles: [".wr-rotating-text{display:inline-flex;align-items:center;overflow:hidden;vertical-align:bottom}.wr-rotating-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-rotating-text__inner{display:inline-flex;flex-wrap:wrap}.wr-rotating-text__word{display:inline-flex;align-items:center}.wr-rotating-text__char{display:inline-block;will-change:transform,opacity}.wr-rotating-text__space{display:inline;white-space:pre}\n"], encapsulation: i0.ViewEncapsulation.None });
256
267
  }
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: WrRotatingText, decorators: [{
268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrRotatingText, decorators: [{
258
269
  type: Component,
259
270
  args: [{ selector: 'wr-rotating-text', encapsulation: ViewEncapsulation.None, host: { class: 'wr-rotating-text' }, template: "<!-- Screen-reader-only live region with the canonical text. -->\n<span class=\"wr-rotating-text__sr-only\">{{ current() }}</span>\n\n<!-- Animated visual content. -->\n<span class=\"wr-rotating-text__inner\" aria-hidden=\"true\">\n @for (word of words(); track $index) {\n <span class=\"wr-rotating-text__word\">\n @for (char of word.characters; track $index) {\n <span class=\"wr-rotating-text__char\">{{ char }}</span>\n }\n @if (word.needsSpace) {\n <span class=\"wr-rotating-text__space\">&nbsp;</span>\n }\n </span>\n }\n</span>\n", styles: [".wr-rotating-text{display:inline-flex;align-items:center;overflow:hidden;vertical-align:bottom}.wr-rotating-text__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.wr-rotating-text__inner{display:inline-flex;flex-wrap:wrap}.wr-rotating-text__word{display:inline-flex;align-items:center}.wr-rotating-text__char{display:inline-block;will-change:transform,opacity}.wr-rotating-text__space{display:inline;white-space:pre}\n"] }]
260
271
  }], ctorParameters: () => [], propDecorators: { texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: true }] }], rotationInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotationInterval", required: false }] }], splitBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "splitBy", required: false }] }], auto: [{ type: i0.Input, args: [{ isSignal: true, alias: "auto", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], easing: [{ type: i0.Input, args: [{ isSignal: true, alias: "easing", required: false }] }], staggerDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerDuration", required: false }] }], staggerFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerFrom", required: false }] }], nextChange: [{ type: i0.Output, args: ["nextChange"] }] } });