ngwr 16.2.0 → 16.4.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 (418) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/carousel/styles/_index.scss +53 -1
  4. package/cascader/styles/_rules.scss +7 -0
  5. package/color-picker/styles/_index.scss +21 -0
  6. package/date-picker/styles/_index.scss +19 -0
  7. package/dropdown/styles/_index.scss +13 -19
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  10. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +3 -3
  12. package/fesm2022/ngwr-anchor.mjs +17 -6
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  16. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  17. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  18. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  19. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  20. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  21. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  22. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  25. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  27. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  28. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  29. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  32. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  33. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  34. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  35. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  36. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  37. package/fesm2022/ngwr-avatar.mjs +3 -3
  38. package/fesm2022/ngwr-back-top.mjs +3 -3
  39. package/fesm2022/ngwr-badge.mjs +129 -11
  40. package/fesm2022/ngwr-badge.mjs.map +1 -1
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  42. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  43. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  44. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  45. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  46. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-button.mjs +6 -6
  49. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  50. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-calendar.mjs +500 -73
  52. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  53. package/fesm2022/ngwr-card.mjs +9 -9
  54. package/fesm2022/ngwr-carousel-testing.mjs +24 -1
  55. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-carousel.mjs +73 -10
  57. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  58. package/fesm2022/ngwr-cascader.mjs +45 -37
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  61. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  63. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  65. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  66. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  67. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-core.mjs +3 -3
  69. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  70. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  72. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  73. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  74. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  75. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  77. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  79. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  81. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  83. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  87. package/fesm2022/ngwr-checkbox.mjs +6 -6
  88. package/fesm2022/ngwr-clipboard.mjs +3 -3
  89. package/fesm2022/ngwr-collapse.mjs +9 -9
  90. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  91. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  92. package/fesm2022/ngwr-color-picker.mjs +153 -37
  93. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  94. package/fesm2022/ngwr-command-palette.mjs +3 -3
  95. package/fesm2022/ngwr-comment.mjs +10 -6
  96. package/fesm2022/ngwr-comment.mjs.map +1 -1
  97. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  98. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-compare.mjs +3 -3
  100. package/fesm2022/ngwr-context-menu.mjs +28 -13
  101. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  102. package/fesm2022/ngwr-cookie.mjs +3 -3
  103. package/fesm2022/ngwr-copy-value.mjs +3 -3
  104. package/fesm2022/ngwr-counter.mjs +6 -6
  105. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  106. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-date-picker.mjs +342 -69
  108. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  109. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  110. package/fesm2022/ngwr-date.mjs +59 -8
  111. package/fesm2022/ngwr-date.mjs.map +1 -1
  112. package/fesm2022/ngwr-density.mjs +6 -6
  113. package/fesm2022/ngwr-descriptions.mjs +6 -6
  114. package/fesm2022/ngwr-dialog.mjs +18 -18
  115. package/fesm2022/ngwr-directives.mjs +15 -15
  116. package/fesm2022/ngwr-divider.mjs +3 -3
  117. package/fesm2022/ngwr-drawer.mjs +51 -29
  118. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  119. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  120. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown.mjs +70 -99
  122. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  123. package/fesm2022/ngwr-editor.mjs +4 -3
  124. package/fesm2022/ngwr-editor.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +3 -3
  126. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  127. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  128. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  129. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  130. package/fesm2022/ngwr-file-upload.mjs +279 -16
  131. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  132. package/fesm2022/ngwr-form.mjs +9 -9
  133. package/fesm2022/ngwr-form.mjs.map +1 -1
  134. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  135. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-graph.mjs +664 -43
  137. package/fesm2022/ngwr-graph.mjs.map +1 -1
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +27 -8
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +27 -8
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +27 -8
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +27 -8
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +27 -8
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +27 -8
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +27 -8
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +27 -8
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +27 -8
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +27 -8
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +27 -8
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +27 -8
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +27 -8
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +27 -8
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +27 -8
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +27 -8
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +27 -8
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +27 -8
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +27 -8
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +27 -8
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +27 -8
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  187. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  188. package/fesm2022/ngwr-input-number.mjs +68 -7
  189. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  190. package/fesm2022/ngwr-input-otp.mjs +23 -3
  191. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  192. package/fesm2022/ngwr-input-testing.mjs +24 -1
  193. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-input.mjs +152 -36
  195. package/fesm2022/ngwr-input.mjs.map +1 -1
  196. package/fesm2022/ngwr-keyboard.mjs +3 -3
  197. package/fesm2022/ngwr-knob.mjs +3 -3
  198. package/fesm2022/ngwr-layout.mjs +15 -15
  199. package/fesm2022/ngwr-lightbox.mjs +8 -8
  200. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  201. package/fesm2022/ngwr-list.mjs +8 -8
  202. package/fesm2022/ngwr-list.mjs.map +1 -1
  203. package/fesm2022/ngwr-load-state.mjs +15 -15
  204. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  205. package/fesm2022/ngwr-mention.mjs +6 -6
  206. package/fesm2022/ngwr-meta.mjs +6 -6
  207. package/fesm2022/ngwr-overlay.mjs +175 -13
  208. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  209. package/fesm2022/ngwr-page-header.mjs +3 -3
  210. package/fesm2022/ngwr-pagination.mjs +6 -3
  211. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  212. package/fesm2022/ngwr-pipes.mjs +31 -29
  213. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  214. package/fesm2022/ngwr-platform.mjs +9 -9
  215. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  216. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  218. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  219. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  220. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  221. package/fesm2022/ngwr-popover.mjs +58 -156
  222. package/fesm2022/ngwr-popover.mjs.map +1 -1
  223. package/fesm2022/ngwr-progress.mjs +50 -9
  224. package/fesm2022/ngwr-progress.mjs.map +1 -1
  225. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  226. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  228. package/fesm2022/ngwr-qr.mjs +3 -3
  229. package/fesm2022/ngwr-radio.mjs +6 -6
  230. package/fesm2022/ngwr-rating.mjs +3 -3
  231. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  232. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  233. package/fesm2022/ngwr-resizable.mjs +3 -3
  234. package/fesm2022/ngwr-result.mjs +12 -12
  235. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  236. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  237. package/fesm2022/ngwr-schema-form.mjs +416 -19
  238. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  239. package/fesm2022/ngwr-scroll.mjs +3 -3
  240. package/fesm2022/ngwr-segmented.mjs +3 -3
  241. package/fesm2022/ngwr-select-testing.mjs +19 -0
  242. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-select.mjs +361 -84
  244. package/fesm2022/ngwr-select.mjs.map +1 -1
  245. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  246. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  247. package/fesm2022/ngwr-sidebar.mjs +3 -3
  248. package/fesm2022/ngwr-skeleton.mjs +3 -3
  249. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  250. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  251. package/fesm2022/ngwr-slider.mjs +21 -3
  252. package/fesm2022/ngwr-slider.mjs.map +1 -1
  253. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  254. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  256. package/fesm2022/ngwr-spinner.mjs +3 -3
  257. package/fesm2022/ngwr-splitter.mjs +3 -3
  258. package/fesm2022/ngwr-statistic.mjs +9 -9
  259. package/fesm2022/ngwr-stepper.mjs +42 -11
  260. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  261. package/fesm2022/ngwr-storage.mjs +3 -3
  262. package/fesm2022/ngwr-switch.mjs +3 -3
  263. package/fesm2022/ngwr-table-testing.mjs +157 -3
  264. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-table.mjs +1051 -74
  266. package/fesm2022/ngwr-table.mjs.map +1 -1
  267. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  268. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  269. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-tabs.mjs +15 -10
  271. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  272. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  273. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  274. package/fesm2022/ngwr-textarea.mjs +128 -16
  275. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  276. package/fesm2022/ngwr-theme.mjs +3 -3
  277. package/fesm2022/ngwr-timeline.mjs +6 -6
  278. package/fesm2022/ngwr-toast.mjs +40 -19
  279. package/fesm2022/ngwr-toast.mjs.map +1 -1
  280. package/fesm2022/ngwr-toolbar.mjs +3 -3
  281. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  282. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tour.mjs +19 -15
  284. package/fesm2022/ngwr-tour.mjs.map +1 -1
  285. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  286. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-transfer.mjs +24 -5
  288. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  289. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  290. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  291. package/fesm2022/ngwr-tree.mjs +978 -79
  292. package/fesm2022/ngwr-tree.mjs.map +1 -1
  293. package/fesm2022/ngwr-typography.mjs +3 -3
  294. package/fesm2022/ngwr-utils-router.mjs +3 -3
  295. package/fesm2022/ngwr-utils.mjs +97 -1
  296. package/fesm2022/ngwr-utils.mjs.map +1 -1
  297. package/fesm2022/ngwr-version.mjs +1 -1
  298. package/fesm2022/ngwr-version.mjs.map +1 -1
  299. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-window.mjs +33 -22
  301. package/fesm2022/ngwr-window.mjs.map +1 -1
  302. package/file-upload/styles/_index.scss +156 -0
  303. package/graph/styles/_index.scss +87 -0
  304. package/i18n/ar.json +29 -8
  305. package/i18n/cs.json +29 -8
  306. package/i18n/de.json +29 -8
  307. package/i18n/en.json +29 -8
  308. package/i18n/es.json +29 -8
  309. package/i18n/fr.json +29 -8
  310. package/i18n/he.json +29 -8
  311. package/i18n/hi.json +29 -8
  312. package/i18n/id.json +29 -8
  313. package/i18n/it.json +29 -8
  314. package/i18n/ja.json +29 -8
  315. package/i18n/ko.json +29 -8
  316. package/i18n/nl.json +29 -8
  317. package/i18n/pl.json +29 -8
  318. package/i18n/pt.json +29 -8
  319. package/i18n/ru.json +29 -8
  320. package/i18n/sv.json +29 -8
  321. package/i18n/tr.json +29 -8
  322. package/i18n/uk.json +29 -8
  323. package/i18n/vi.json +29 -8
  324. package/i18n/zh-TW.json +29 -8
  325. package/i18n/zh.json +29 -8
  326. package/input/styles/_index.scss +68 -1
  327. package/input-otp/styles/_index.scss +14 -0
  328. package/llms-full.txt +53 -21
  329. package/llms.txt +57 -24
  330. package/overlay/styles/_arrow.scss +4 -4
  331. package/package.json +33 -1
  332. package/popconfirm/styles/_index.scss +3 -11
  333. package/progress/styles/_index.scss +32 -0
  334. package/schema-form/styles/_index.scss +78 -0
  335. package/schematics/collection.json +5 -0
  336. package/schematics/eject/index.js +158 -0
  337. package/schematics/eject/schema.js +8 -0
  338. package/schematics/eject/schema.json +24 -0
  339. package/schematics/eject/source.js +295 -0
  340. package/schematics/use/rule.js +2 -0
  341. package/schematics/use/symbol-map.json +5 -0
  342. package/select/styles/_index.scss +127 -22
  343. package/skills/ngwr/SKILL.md +31 -4
  344. package/skills/ngwr/references/catalog.md +9 -1
  345. package/slider/styles/_index.scss +22 -0
  346. package/table/styles/_index.scss +191 -3
  347. package/textarea/styles/_index.scss +80 -0
  348. package/theme/styles/_focus.scss +16 -1
  349. package/theme/styles/_motion.scss +5 -0
  350. package/transfer/styles/_index.scss +84 -0
  351. package/tree/styles/_index.scss +138 -5
  352. package/types/ngwr-alert-testing.d.ts +88 -0
  353. package/types/ngwr-badge.d.ts +72 -2
  354. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  355. package/types/ngwr-burger-testing.d.ts +51 -0
  356. package/types/ngwr-calendar-testing.d.ts +18 -6
  357. package/types/ngwr-calendar.d.ts +272 -22
  358. package/types/ngwr-carousel-testing.d.ts +27 -6
  359. package/types/ngwr-carousel.d.ts +42 -6
  360. package/types/ngwr-cascader.d.ts +13 -6
  361. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  362. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  363. package/types/ngwr-charts-line-chart.d.ts +7 -4
  364. package/types/ngwr-color-picker-testing.d.ts +15 -4
  365. package/types/ngwr-color-picker.d.ts +76 -6
  366. package/types/ngwr-compare-testing.d.ts +72 -0
  367. package/types/ngwr-context-menu.d.ts +2 -0
  368. package/types/ngwr-date-picker-testing.d.ts +23 -8
  369. package/types/ngwr-date-picker.d.ts +100 -9
  370. package/types/ngwr-date.d.ts +71 -1
  371. package/types/ngwr-drawer.d.ts +9 -0
  372. package/types/ngwr-dropdown-testing.d.ts +20 -0
  373. package/types/ngwr-dropdown.d.ts +26 -6
  374. package/types/ngwr-event-calendar.d.ts +66 -8
  375. package/types/ngwr-file-upload-testing.d.ts +31 -2
  376. package/types/ngwr-file-upload.d.ts +156 -3
  377. package/types/ngwr-form.d.ts +47 -3
  378. package/types/ngwr-graph-testing.d.ts +36 -3
  379. package/types/ngwr-graph.d.ts +309 -13
  380. package/types/ngwr-input-number-testing.d.ts +10 -0
  381. package/types/ngwr-input-number.d.ts +30 -1
  382. package/types/ngwr-input-otp.d.ts +10 -0
  383. package/types/ngwr-input-testing.d.ts +30 -0
  384. package/types/ngwr-input.d.ts +54 -3
  385. package/types/ngwr-overlay.d.ts +84 -5
  386. package/types/ngwr-pipes.d.ts +2 -1
  387. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  388. package/types/ngwr-popconfirm.d.ts +28 -3
  389. package/types/ngwr-popover-testing.d.ts +19 -2
  390. package/types/ngwr-popover.d.ts +22 -2
  391. package/types/ngwr-progress.d.ts +29 -1
  392. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  393. package/types/ngwr-resizable-testing.d.ts +116 -0
  394. package/types/ngwr-schema-form-testing.d.ts +260 -0
  395. package/types/ngwr-schema-form.d.ts +76 -6
  396. package/types/ngwr-select-testing.d.ts +20 -0
  397. package/types/ngwr-select.d.ts +149 -11
  398. package/types/ngwr-sidebar-testing.d.ts +176 -0
  399. package/types/ngwr-slider-testing.d.ts +3 -1
  400. package/types/ngwr-slider.d.ts +21 -1
  401. package/types/ngwr-sortable-list.d.ts +6 -0
  402. package/types/ngwr-stepper.d.ts +20 -11
  403. package/types/ngwr-table-testing.d.ts +122 -7
  404. package/types/ngwr-table.d.ts +572 -50
  405. package/types/ngwr-tabs-testing.d.ts +14 -17
  406. package/types/ngwr-tabs.d.ts +6 -0
  407. package/types/ngwr-textarea-testing.d.ts +10 -0
  408. package/types/ngwr-textarea.d.ts +48 -2
  409. package/types/ngwr-toast.d.ts +8 -1
  410. package/types/ngwr-tour-testing.d.ts +10 -0
  411. package/types/ngwr-tour.d.ts +11 -2
  412. package/types/ngwr-transfer-testing.d.ts +3 -0
  413. package/types/ngwr-transfer.d.ts +24 -1
  414. package/types/ngwr-tree-testing.d.ts +65 -1
  415. package/types/ngwr-tree.d.ts +335 -12
  416. package/types/ngwr-utils.d.ts +107 -1
  417. package/types/ngwr-version.d.ts +1 -1
  418. package/types/ngwr-window.d.ts +7 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-input-number-testing.mjs","names":[],"sources":["../../../projects/lib/input-number/testing/wr-input-number-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, TestKey, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrInputNumberHarnessFilters } from './types';\n\n/** The decimal + grouping characters `Intl` formats `locale` with. */\nfunction separatorsFor(locale?: string): { decimal: string; group: string } {\n const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\n return {\n decimal: parts.find(part => part.type === 'decimal')?.value ?? '.',\n group: parts.find(part => part.type === 'group')?.value ?? '',\n };\n}\n\n/**\n * Locale-formatted text back into a number — `null` when the text is empty or is\n * not a number at all.\n *\n * The same two-step the component parses with: drop the grouping character, then\n * normalise the decimal one to `.`. Doing it in that order matters, because in\n * half the world's locales the two are swapped and `Number('1.234,5')` is `NaN`\n * either way.\n */\nfunction parseNumber(text: string, locale?: string): number | null {\n const trimmed = text.trim();\n if (!trimmed) return null;\n\n const { decimal, group } = separatorsFor(locale);\n let normalised = group ? trimmed.split(group).join('') : trimmed;\n if (decimal !== '.') normalised = normalised.split(decimal).join('.');\n\n const parsed = Number(normalised);\n return Number.isFinite(parsed) ? parsed : null;\n}\n\n/**\n * Test harness for `<wr-input-number>`.\n *\n * The control is a `type=\"text\"` field plus a ▲▼ stepper column — deliberately\n * NOT an `<input type=\"number\">` and NOT a `role=\"spinbutton\"`, because it renders\n * grouped, locale-formatted text that a numeric input cannot hold. Two things\n * follow, and they shape this whole harness:\n *\n * - There is no `aria-valuenow` / `aria-valuemin` / `aria-valuemax` trio, and no\n * `min` / `max` / `step` attribute, anywhere in the DOM. So the value is read\n * out of the field's TEXT, and the bounds are read off the stepper buttons'\n * disabled state — which is precisely what a user is given, and the reason\n * {@link isIncrementDisabled} is named after the button rather than after \"at\n * the maximum\".\n * - The text and the value are different things, and the gap between them is this\n * control's trap. {@link getValueText} answers the raw characters;\n * {@link getValue} answers the number they spell. Mid-type the two disagree\n * with the MODEL as well: the component clamps and rounds on every keystroke\n * but leaves the typed text alone until blur, so a field showing `999` under\n * `[max]=\"10\"` has already committed `10`. Call {@link blur} — which is also\n * what emits `touch` — to make the field re-render from the committed value,\n * and assert the host's own signal when what you mean is \"the model\".\n *\n * Stepping has two paths and both are here: {@link increment} / {@link decrement}\n * click the buttons, {@link stepUp} / {@link stepDown} press ArrowUp / ArrowDown\n * on the field. The keyboard is the accessible path, and in a unit test it is\n * also the honest one — jsdom has no layout, so nothing that needs a hit test can\n * be driven by coordinates. `{ shift: true }` is this control's page-up: it steps\n * by ten. There is deliberately no `pageUp()` / `home()` / `end()`, because the\n * component handles the two arrow keys and nothing else.\n *\n * @example\n * ```ts\n * const qty = await loader.getHarness(WrInputNumberHarness.with({ placeholder: 'Quantity' }));\n *\n * await qty.setValue(4);\n * await qty.increment();\n * expect(await qty.getValue()).toBe(5);\n *\n * await qty.stepUp({ shift: true });\n * expect(await qty.isIncrementDisabled()).toBe(true); // [max]=\"15\"\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrInputNumberHarness extends ComponentHarness {\n static hostSelector = 'wr-input-number';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrInputNumberHarnessFilters = {}): HarnessPredicate<WrInputNumberHarness> {\n return new HarnessPredicate(WrInputNumberHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getValueText(), text))\n .addOption('value', options.value, async (harness, value) => (await harness.parsedValue()) === value)\n .addOption('placeholder', options.placeholder, (harness, placeholder) =>\n HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder)\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly field = this.locatorFor('input[wrInput]');\n\n /** The raw characters in the field — mid-typed, ungrouped or nonsense included. */\n async getValueText(): Promise<string> {\n return (await this.field()).getProperty<string>('value');\n }\n\n /**\n * The number the field is SHOWING, or `null` when it is empty.\n *\n * Empty is `null` rather than `0` because the control draws that distinction\n * too — a required-field check has to be able to tell \"nothing entered\" from \"a\n * deliberate zero\". Text that is not a number throws instead: answering `null`\n * there would report a half-typed `-` as an empty field.\n *\n * `locale` defaults to the test runtime's, which for a stock Node run is the\n * same `en-US` Angular's `LOCALE_ID` defaults to. The component formats with\n * `LOCALE_ID` and a harness cannot reach that injector, so an app that provides\n * its own must pass it: `getValue('de-DE')`. Reading `'1.234,5'` as en-US\n * silently answers `1.2345`.\n *\n * Under `mode=\"decimal\"` the field draws the same text over a string model,\n * and this still answers the number it spells: past sixteen digits that is a\n * rounding of the model. Read {@link getValueText} for the digits, and the\n * host's own signal for the string.\n */\n async getValue(locale?: string): Promise<number | null> {\n const text = await this.getValueText();\n if (!text.trim()) return null;\n\n const parsed = parseNumber(text, locale);\n if (parsed === null) {\n throw new Error(\n `WrInputNumberHarness.getValue(): the field is showing ${JSON.stringify(text)}, which is not a number in ` +\n `${locale ? `locale \"${locale}\"` : \"the test runtime's locale\"}. Mid-type the field holds text the ` +\n 'control has not accepted — read getValueText() for the characters, or blur() to make it re-render from ' +\n 'the committed value. If the app provides a LOCALE_ID of its own, pass it: getValue(\"de-DE\").'\n );\n }\n\n return parsed;\n }\n\n /**\n * Type a number into the field, replacing whatever is there.\n *\n * Written with the LOCALE's decimal separator rather than with `String(value)`:\n * in a comma-decimal locale `'1.5'` is read as `15`, because `.` is that\n * locale's THOUSANDS separator. Grouping is deliberately not added — nothing\n * requires it, and the field regroups itself on blur anyway.\n *\n * The field is cleared first, so the value passes through `null` on the way, as\n * it does for a user who selects all and types over it. The control parses every\n * keystroke, so `min` / `max` / `decimals` are applied AS YOU TYPE while the\n * text is left exactly as typed — see {@link getValue}.\n */\n async setValue(value: number, locale?: string): Promise<void> {\n if (!Number.isFinite(value)) {\n throw new Error(\n `WrInputNumberHarness.setValue(${value}): a field can only be typed a finite number. Use clear() to empty it.`\n );\n }\n\n const { decimal } = separatorsFor(locale);\n await this.setValueText(decimal === '.' ? String(value) : String(value).replace('.', decimal));\n }\n\n /**\n * Type raw characters into the field, replacing whatever is there.\n *\n * For everything a number cannot express: a partial entry (`'-'`, `'1.'`), an\n * already-grouped string, or plain nonsense. Nothing is normalised on the way\n * in, and — as with {@link setValue} — the field is cleared first.\n */\n async setValueText(text: string): Promise<void> {\n const field = await this.field();\n await field.clear();\n // `sendKeys('')` throws — clearing was the whole request.\n if (text) await field.sendKeys(text);\n }\n\n /** Empty the field, which sets the value to `null` — not to `0`. */\n async clear(): Promise<void> {\n await (await this.field()).clear();\n }\n\n /** Whether the ▲▼ column is rendered at all — `[showSteppers]=\"false\"` drops it. */\n async hasSteppers(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-input-number__steppers')()) !== null;\n }\n\n /**\n * Click ▲ once: up by `step`, clamped to `max`.\n *\n * A button at its bound — or on a disabled / readonly control — is `disabled`,\n * and the CDK does not deliver a click to a disabled element, so this is a\n * quiet no-op there rather than a throw. Ask {@link isIncrementDisabled} rather\n * than inferring the bound from a value that did not move. It throws only when\n * there is no stepper column to click.\n */\n async increment(): Promise<void> {\n await (await this.stepButton(1, 'increment')).click();\n }\n\n /** Click ▼ once: down by `step`, clamped to `min`. See {@link increment}. */\n async decrement(): Promise<void> {\n await (await this.stepButton(-1, 'decrement')).click();\n }\n\n /**\n * Whether ▲ refuses to step.\n *\n * Deliberately not named `isAtMax()`: the button is disabled at the maximum AND\n * on a disabled or readonly control, and it cannot tell you which. That\n * conflation is the control's own — it is what the user is offered — and the\n * name says so rather than promising a bound the DOM never publishes.\n */\n async isIncrementDisabled(): Promise<boolean> {\n return (await this.stepButton(1, 'isIncrementDisabled')).getProperty<boolean>('disabled');\n }\n\n /** Whether ▼ refuses to step — at the minimum, or on a locked control. */\n async isDecrementDisabled(): Promise<boolean> {\n return (await this.stepButton(-1, 'isDecrementDisabled')).getProperty<boolean>('disabled');\n }\n\n /**\n * Press ArrowUp on the field: up by `step`, or by TEN steps with\n * `{ shift: true }` — the control's page-up, since it handles no other keys.\n */\n async stepUp(options: { shift?: boolean } = {}): Promise<void> {\n await (await this.field()).sendKeys({ shift: options.shift === true }, TestKey.UP_ARROW);\n }\n\n /** Press ArrowDown on the field. See {@link stepUp} for the `shift` multiplier. */\n async stepDown(options: { shift?: boolean } = {}): Promise<void> {\n await (await this.field()).sendKeys({ shift: options.shift === true }, TestKey.DOWN_ARROW);\n }\n\n /** The `[prefix]` label (`'$'`), or `null` when the field has none. */\n async getPrefix(): Promise<string | null> {\n const prefix = await this.locatorForOptional('.wr-input-group__affix--prefix')();\n return prefix ? prefix.text() : null;\n }\n\n /**\n * The `[suffix]` label (`'kg'`), or `null` when the field has none.\n *\n * The stepper column rides in the same suffix slot and carries the same affix\n * class, so it is excluded here by name: a bare `--suffix` query answers with\n * the buttons' (empty) text for every field that has steppers and no suffix.\n */\n async getSuffix(): Promise<string | null> {\n const suffix = await this.locatorForOptional('.wr-input-group__affix--suffix:not(.wr-input-number__steppers)')();\n return suffix ? suffix.text() : null;\n }\n\n /** The field's placeholder. */\n async getPlaceholder(): Promise<string> {\n return (await this.field()).getProperty<string>('placeholder');\n }\n\n /**\n * The field's `aria-label`, or `null` when it carries none.\n *\n * Read from the native input, not from the host: an `aria-label` on a component\n * element does not reach the control inside it, which is why the component\n * takes an `ariaLabel` input and forwards it here.\n *\n * NOT the accessible name — `null` is the usual answer and usually correct.\n * Nothing is forwarded unless `[ariaLabel]` is bound: inside a\n * `<wr-form-field>` the name comes from the label's `for`, and standalone it\n * comes from the `placeholder` (see {@link getPlaceholder}), neither of which\n * is an attribute on this element.\n */\n async getAriaLabel(): Promise<string | null> {\n return (await this.field()).getAttribute('aria-label');\n }\n\n /**\n * Whether the field refuses interaction.\n *\n * The native control's `disabled` property, not the host's\n * `wr-input-number--disabled` modifier: the modifier is the styling hook, the\n * property is what actually blocks typing, drops the field out of the tab order\n * and is reported to assistive technology.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.field()).getProperty<boolean>('disabled');\n }\n\n /** Whether the field refuses new values while staying focusable and readable. */\n async isReadonly(): Promise<boolean> {\n return (await this.field()).getProperty<boolean>('readOnly');\n }\n\n /** Move focus to the field. While it is focused the control stops reformatting the text. */\n async focus(): Promise<void> {\n return (await this.field()).focus();\n }\n\n /**\n * Blur the field, which is what commits the display: the control re-renders the\n * text from its value — grouping it and applying `decimals` — and emits `touch`\n * so a bound `[formField]` can mark itself touched.\n */\n async blur(): Promise<void> {\n return (await this.field()).blur();\n }\n\n /** Whether the field currently has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.field()).isFocused();\n }\n\n /**\n * The shown value for predicates: `null` for an empty field AND for text that is\n * not a number, so a mid-typed field matches no `value` filter instead of\n * throwing the whole query.\n */\n private async parsedValue(): Promise<number | null> {\n return parseNumber(await this.getValueText());\n }\n\n /**\n * One of the two stepper buttons, BY POSITION — ▲ first, ▼ second.\n *\n * Not by `aria-label`: those strings resolve through the i18n catalog\n * (`inputNumber.increment` / `.decrement`) and an `[incrementLabel]` /\n * `[decrementLabel]` binding overrides them, so keying on them would make this\n * harness answer in whatever locale the app under test is configured for — the\n * same call `WrTimePanelHarness` makes about its own columns. Order is the\n * layout contract, and the spec pins it by asserting which way each button\n * moves the value.\n */\n private async stepButton(direction: 1 | -1, method: string): Promise<TestElement> {\n const buttons = await this.locatorForAll('.wr-input-number__step')();\n const button = buttons[direction === 1 ? 0 : 1];\n if (!button) {\n throw new Error(\n `WrInputNumberHarness.${method}(): this field has no stepper column — it was rendered with ` +\n '[showSteppers]=\"false\". Type a value with setValue(), or step it from the keyboard with stepUp() / ' +\n 'stepDown(), which work either way.'\n );\n }\n\n return button;\n }\n}\n"],"mappings":";;;;;;;AAY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,IAAI,CAAC,QACH,MAAM,IAAI,MACR,wBAAwB,OAAM,kMAEQ;EAI1C,OAAO;CACT"}
1
+ {"version":3,"file":"ngwr-input-number-testing.mjs","names":[],"sources":["../../../projects/lib/input-number/testing/wr-input-number-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, TestKey, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrInputNumberHarnessFilters } from './types';\n\n/** The decimal + grouping characters `Intl` formats `locale` with. */\nfunction separatorsFor(locale?: string): { decimal: string; group: string } {\n const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\n return {\n decimal: parts.find(part => part.type === 'decimal')?.value ?? '.',\n group: parts.find(part => part.type === 'group')?.value ?? '',\n };\n}\n\n/**\n * Locale-formatted text back into a number — `null` when the text is empty or is\n * not a number at all.\n *\n * The same two-step the component parses with: drop the grouping character, then\n * normalise the decimal one to `.`. Doing it in that order matters, because in\n * half the world's locales the two are swapped and `Number('1.234,5')` is `NaN`\n * either way.\n */\nfunction parseNumber(text: string, locale?: string): number | null {\n const trimmed = text.trim();\n if (!trimmed) return null;\n\n const { decimal, group } = separatorsFor(locale);\n let normalised = group ? trimmed.split(group).join('') : trimmed;\n if (decimal !== '.') normalised = normalised.split(decimal).join('.');\n\n const parsed = Number(normalised);\n return Number.isFinite(parsed) ? parsed : null;\n}\n\n/**\n * Test harness for `<wr-input-number>`.\n *\n * The control is a `type=\"text\"` field plus a ▲▼ stepper column — deliberately\n * NOT an `<input type=\"number\">` and NOT a `role=\"spinbutton\"`, because it renders\n * grouped, locale-formatted text that a numeric input cannot hold. Two things\n * follow, and they shape this whole harness:\n *\n * - There is no `aria-valuenow` / `aria-valuemin` / `aria-valuemax` trio, and no\n * `min` / `max` / `step` attribute, anywhere in the DOM. So the value is read\n * out of the field's TEXT, and the bounds are read off the stepper buttons'\n * disabled state — which is precisely what a user is given, and the reason\n * {@link isIncrementDisabled} is named after the button rather than after \"at\n * the maximum\".\n * - The text and the value are different things, and the gap between them is this\n * control's trap. {@link getValueText} answers the raw characters;\n * {@link getValue} answers the number they spell. Mid-type the two disagree\n * with the MODEL as well: the component clamps and rounds on every keystroke\n * but leaves the typed text alone until blur, so a field showing `999` under\n * `[max]=\"10\"` has already committed `10`. Call {@link blur} — which is also\n * what emits `touch` — to make the field re-render from the committed value,\n * and assert the host's own signal when what you mean is \"the model\".\n *\n * Stepping has two paths and both are here: {@link increment} / {@link decrement}\n * click the buttons, {@link stepUp} / {@link stepDown} press ArrowUp / ArrowDown\n * on the field. The keyboard is the accessible path, and in a unit test it is\n * also the honest one — jsdom has no layout, so nothing that needs a hit test can\n * be driven by coordinates. `{ shift: true }` is this control's page-up: it steps\n * by ten. There is deliberately no `pageUp()` / `home()` / `end()`, because the\n * component handles the two arrow keys and nothing else.\n *\n * @example\n * ```ts\n * const qty = await loader.getHarness(WrInputNumberHarness.with({ placeholder: 'Quantity' }));\n *\n * await qty.setValue(4);\n * await qty.increment();\n * expect(await qty.getValue()).toBe(5);\n *\n * await qty.stepUp({ shift: true });\n * expect(await qty.isIncrementDisabled()).toBe(true); // [max]=\"15\"\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrInputNumberHarness extends ComponentHarness {\n static hostSelector = 'wr-input-number';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrInputNumberHarnessFilters = {}): HarnessPredicate<WrInputNumberHarness> {\n return new HarnessPredicate(WrInputNumberHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getValueText(), text))\n .addOption('value', options.value, async (harness, value) => (await harness.parsedValue()) === value)\n .addOption('placeholder', options.placeholder, (harness, placeholder) =>\n HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder)\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly field = this.locatorFor('input[wrInput]');\n\n /** The raw characters in the field — mid-typed, ungrouped or nonsense included. */\n async getValueText(): Promise<string> {\n return (await this.field()).getProperty<string>('value');\n }\n\n /**\n * The number the field is SHOWING, or `null` when it is empty.\n *\n * Empty is `null` rather than `0` because the control draws that distinction\n * too — a required-field check has to be able to tell \"nothing entered\" from \"a\n * deliberate zero\". Text that is not a number throws instead: answering `null`\n * there would report a half-typed `-` as an empty field.\n *\n * `locale` defaults to the test runtime's, which for a stock Node run is the\n * same `en-US` Angular's `LOCALE_ID` defaults to. The component formats with\n * `LOCALE_ID` and a harness cannot reach that injector, so an app that provides\n * its own must pass it: `getValue('de-DE')`. Reading `'1.234,5'` as en-US\n * silently answers `1.2345`.\n *\n * Under `mode=\"decimal\"` the field draws the same text over a string model,\n * and this still answers the number it spells: past sixteen digits that is a\n * rounding of the model. Read {@link getValueText} for the digits, and the\n * host's own signal for the string.\n */\n async getValue(locale?: string): Promise<number | null> {\n const text = await this.getValueText();\n if (!text.trim()) return null;\n\n const parsed = parseNumber(text, locale);\n if (parsed === null) {\n throw new Error(\n `WrInputNumberHarness.getValue(): the field is showing ${JSON.stringify(text)}, which is not a number in ` +\n `${locale ? `locale \"${locale}\"` : \"the test runtime's locale\"}. Mid-type the field holds text the ` +\n 'control has not accepted — read getValueText() for the characters, or blur() to make it re-render from ' +\n 'the committed value. If the app provides a LOCALE_ID of its own, pass it: getValue(\"de-DE\").'\n );\n }\n\n return parsed;\n }\n\n /**\n * Type a number into the field, replacing whatever is there.\n *\n * Written with the LOCALE's decimal separator rather than with `String(value)`:\n * in a comma-decimal locale `'1.5'` is read as `15`, because `.` is that\n * locale's THOUSANDS separator. Grouping is deliberately not added — nothing\n * requires it, and the field regroups itself on blur anyway.\n *\n * The field is cleared first, so the value passes through `null` on the way, as\n * it does for a user who selects all and types over it. The control parses every\n * keystroke, so `min` / `max` / `decimals` are applied AS YOU TYPE while the\n * text is left exactly as typed — see {@link getValue}.\n */\n async setValue(value: number, locale?: string): Promise<void> {\n if (!Number.isFinite(value)) {\n throw new Error(\n `WrInputNumberHarness.setValue(${value}): a field can only be typed a finite number. Use clear() to empty it.`\n );\n }\n\n const { decimal } = separatorsFor(locale);\n await this.setValueText(decimal === '.' ? String(value) : String(value).replace('.', decimal));\n }\n\n /**\n * Type raw characters into the field, replacing whatever is there.\n *\n * For everything a number cannot express: a partial entry (`'-'`, `'1.'`), an\n * already-grouped string, or plain nonsense. Nothing is normalised on the way\n * in, and — as with {@link setValue} — the field is cleared first.\n */\n async setValueText(text: string): Promise<void> {\n const field = await this.field();\n await field.clear();\n // `sendKeys('')` throws — clearing was the whole request.\n if (text) await field.sendKeys(text);\n }\n\n /** Empty the field, which sets the value to `null` — not to `0`. */\n async clear(): Promise<void> {\n await (await this.field()).clear();\n }\n\n /** Whether the clear (×) button is on show: `clearable`, with text, neither disabled nor read-only. */\n async hasClearButton(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-input-group__clear')()) !== null;\n }\n\n /**\n * Click the clear (×) button, which sets the value to `null` and emits `touch`.\n * {@link clear} empties the field from the keyboard instead. Throws when the\n * button is not on show.\n */\n async clickClear(): Promise<void> {\n const button = await this.locatorForOptional('.wr-input-group__clear')();\n if (!button) {\n throw new Error(\n 'WrInputNumberHarness.clickClear(): no clear button. It shows on a `clearable` field ' +\n 'that has text and is neither disabled nor read-only.'\n );\n }\n await button.click();\n }\n\n /** Whether the field is drawing its `loading` spinner. */\n async isLoading(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-input-group__spinner')()) !== null;\n }\n\n /** Whether the ▲▼ column is rendered at all — `[showSteppers]=\"false\"` drops it. */\n async hasSteppers(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-input-number__steppers')()) !== null;\n }\n\n /**\n * Click ▲ once: up by `step`, clamped to `max`.\n *\n * A button at its bound — or on a disabled / readonly control — is `disabled`,\n * and the CDK does not deliver a click to a disabled element, so this is a\n * quiet no-op there rather than a throw. Ask {@link isIncrementDisabled} rather\n * than inferring the bound from a value that did not move. It throws only when\n * there is no stepper column to click.\n */\n async increment(): Promise<void> {\n await (await this.stepButton(1, 'increment')).click();\n }\n\n /** Click ▼ once: down by `step`, clamped to `min`. See {@link increment}. */\n async decrement(): Promise<void> {\n await (await this.stepButton(-1, 'decrement')).click();\n }\n\n /**\n * Whether ▲ refuses to step.\n *\n * Deliberately not named `isAtMax()`: the button is disabled at the maximum AND\n * on a disabled or readonly control, and it cannot tell you which. That\n * conflation is the control's own — it is what the user is offered — and the\n * name says so rather than promising a bound the DOM never publishes.\n */\n async isIncrementDisabled(): Promise<boolean> {\n return (await this.stepButton(1, 'isIncrementDisabled')).getProperty<boolean>('disabled');\n }\n\n /** Whether ▼ refuses to step — at the minimum, or on a locked control. */\n async isDecrementDisabled(): Promise<boolean> {\n return (await this.stepButton(-1, 'isDecrementDisabled')).getProperty<boolean>('disabled');\n }\n\n /**\n * Press ArrowUp on the field: up by `step`, or by TEN steps with\n * `{ shift: true }` — the control's page-up, since it handles no other keys.\n */\n async stepUp(options: { shift?: boolean } = {}): Promise<void> {\n await (await this.field()).sendKeys({ shift: options.shift === true }, TestKey.UP_ARROW);\n }\n\n /** Press ArrowDown on the field. See {@link stepUp} for the `shift` multiplier. */\n async stepDown(options: { shift?: boolean } = {}): Promise<void> {\n await (await this.field()).sendKeys({ shift: options.shift === true }, TestKey.DOWN_ARROW);\n }\n\n /** The `[prefix]` label (`'$'`), or `null` when the field has none. */\n async getPrefix(): Promise<string | null> {\n const prefix = await this.locatorForOptional('.wr-input-group__affix--prefix')();\n return prefix ? prefix.text() : null;\n }\n\n /**\n * The `[suffix]` label (`'kg'`), or `null` when the field has none.\n *\n * The stepper column rides in the same suffix slot and carries the same affix\n * class, so it is excluded here by name: a bare `--suffix` query answers with\n * the buttons' (empty) text for every field that has steppers and no suffix.\n */\n async getSuffix(): Promise<string | null> {\n const suffix = await this.locatorForOptional('.wr-input-group__affix--suffix:not(.wr-input-number__steppers)')();\n return suffix ? suffix.text() : null;\n }\n\n /** The field's placeholder. */\n async getPlaceholder(): Promise<string> {\n return (await this.field()).getProperty<string>('placeholder');\n }\n\n /**\n * The field's `aria-label`, or `null` when it carries none.\n *\n * Read from the native input, not from the host: an `aria-label` on a component\n * element does not reach the control inside it, which is why the component\n * takes an `ariaLabel` input and forwards it here.\n *\n * NOT the accessible name — `null` is the usual answer and usually correct.\n * Nothing is forwarded unless `[ariaLabel]` is bound: inside a\n * `<wr-form-field>` the name comes from the label's `for`, and standalone it\n * comes from the `placeholder` (see {@link getPlaceholder}), neither of which\n * is an attribute on this element.\n */\n async getAriaLabel(): Promise<string | null> {\n return (await this.field()).getAttribute('aria-label');\n }\n\n /**\n * Whether the field refuses interaction.\n *\n * The native control's `disabled` property, not the host's\n * `wr-input-number--disabled` modifier: the modifier is the styling hook, the\n * property is what actually blocks typing, drops the field out of the tab order\n * and is reported to assistive technology.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.field()).getProperty<boolean>('disabled');\n }\n\n /** Whether the field refuses new values while staying focusable and readable. */\n async isReadonly(): Promise<boolean> {\n return (await this.field()).getProperty<boolean>('readOnly');\n }\n\n /** Move focus to the field. While it is focused the control stops reformatting the text. */\n async focus(): Promise<void> {\n return (await this.field()).focus();\n }\n\n /**\n * Blur the field, which is what commits the display: the control re-renders the\n * text from its value — grouping it and applying `decimals` — and emits `touch`\n * so a bound `[formField]` can mark itself touched.\n */\n async blur(): Promise<void> {\n return (await this.field()).blur();\n }\n\n /** Whether the field currently has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.field()).isFocused();\n }\n\n /**\n * The shown value for predicates: `null` for an empty field AND for text that is\n * not a number, so a mid-typed field matches no `value` filter instead of\n * throwing the whole query.\n */\n private async parsedValue(): Promise<number | null> {\n return parseNumber(await this.getValueText());\n }\n\n /**\n * One of the two stepper buttons, BY POSITION — ▲ first, ▼ second.\n *\n * Not by `aria-label`: those strings resolve through the i18n catalog\n * (`inputNumber.increment` / `.decrement`) and an `[incrementLabel]` /\n * `[decrementLabel]` binding overrides them, so keying on them would make this\n * harness answer in whatever locale the app under test is configured for — the\n * same call `WrTimePanelHarness` makes about its own columns. Order is the\n * layout contract, and the spec pins it by asserting which way each button\n * moves the value.\n */\n private async stepButton(direction: 1 | -1, method: string): Promise<TestElement> {\n const buttons = await this.locatorForAll('.wr-input-number__step')();\n const button = buttons[direction === 1 ? 0 : 1];\n if (!button) {\n throw new Error(\n `WrInputNumberHarness.${method}(): this field has no stepper column — it was rendered with ` +\n '[showSteppers]=\"false\". Type a value with setValue(), or step it from the keyboard with stepUp() / ' +\n 'stepDown(), which work either way.'\n );\n }\n\n return button;\n }\n}\n"],"mappings":";;;;;;;AAYA,SAAS,cAAc,QAAe;CACpC,MAAM,QAAQ,IAAI,KAAK,aAAa,MAAM,CAAC,CAAC,cAAc,OAAO;CACjE,OAAO;EACL,SAAS,MAAM,MAAK,SAAQ,KAAK,SAAS,SAAS,CAAC,EAAE,SAAS;EAC/D,OAAO,MAAM,MAAK,SAAQ,KAAK,SAAS,OAAO,CAAC,EAAE,SAAS;CAC5D;AACH;AAWA,SAAS,YAAY,MAAc,QAAe;CAChD,MAAM,UAAU,KAAK,KAAI;CACzB,IAAI,CAAC,SAAS,OAAO;CAErB,MAAM,EAAE,SAAS,UAAU,cAAc,MAAM;CAC/C,IAAI,aAAa,QAAQ,QAAQ,MAAM,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI;CACzD,IAAI,YAAY,KAAK,aAAa,WAAW,MAAM,OAAO,CAAC,CAAC,KAAK,GAAG;CAEpE,MAAM,SAAS,OAAO,UAAU;CAChC,OAAO,OAAO,SAAS,MAAM,IAAI,SAAS;AAC5C;AA+CA,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CACxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAAS,iBAAi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,KAAI,IAAK;CAClC;CAGA,MAAM,iBAAc;EAClB,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,YAAoB,aAAa;CAC/D;CAeA,MAAM,eAAY;EAChB,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,aAAa,YAAY;CACvD;CAUA,MAAM,aAAU;EACd,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,YAAqB,UAAU;CAC7D;CAGA,MAAM,aAAU;EACd,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,YAAqB,UAAU;CAC7D;CAGA,MAAM,QAAK;EACT,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,MAAK;CACnC;CAOA,MAAM,OAAI;EACR,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,KAAI;CAClC;CAGA,MAAM,YAAS;EACb,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,UAAS;CACvC;CAOQ,MAAM,cAAW;EACvB,OAAO,YAAY,MAAM,KAAK,aAAY,CAAE;CAC9C;CAaQ,MAAM,WAAW,WAAmB,QAAc;EAExD,MAAM,UAAS,MADO,KAAK,cAAc,wBAAwB,CAAC,CAAA,EACnD,CAAQ,cAAc,IAAI,IAAI;EAC7C,IAAI,CAAC,QACH,MAAM,IAAI,MACR,wBAAwB,OAAM,kMAEQ;EAI1C,OAAO;CACT"}
@@ -86,6 +86,15 @@ var WrInputNumber = class WrInputNumber {
86
86
  decrementLabel = input(null, ...ngDevMode ? [{ debugName: "decrementLabel" }] : /* istanbul ignore next */ []);
87
87
  resolvedIncrement = useI18nText(this.incrementLabel, "inputNumber.increment", "Increment");
88
88
  resolvedDecrement = useI18nText(this.decrementLabel, "inputNumber.decrement", "Decrement");
89
+ clearable = input(false, {
90
+ ...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
91
+ transform: coerceBooleanProperty
92
+ });
93
+ clearLabel = input(null, ...ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []);
94
+ loading = input(false, {
95
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
96
+ transform: coerceBooleanProperty
97
+ });
89
98
  disabled = input(false, {
90
99
  ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
91
100
  transform: coerceBooleanProperty
@@ -200,7 +209,8 @@ var WrInputNumber = class WrInputNumber {
200
209
  this.text.set(this.format(next));
201
210
  return;
202
211
  }
203
- const raw = (this.value() ?? this.fallbackBase()) + units * stepSize;
212
+ const current = this.value();
213
+ const raw = (current !== null && Number.isFinite(current) ? current : this.fallbackBase()) + units * stepSize;
204
214
  const correctable = Math.abs(raw) < WrInputNumber.SAFE_ROUND_MAGNITUDE && Math.abs(stepSize) >= WrInputNumber.SAFE_ROUND_STEP;
205
215
  const next = this.constrain(correctable ? wrRound(raw, WrInputNumber.STEP_PRECISION) : raw);
206
216
  this.commit(next);
@@ -285,7 +295,7 @@ var WrInputNumber = class WrInputNumber {
285
295
  }
286
296
  static ɵfac = i0.ɵɵngDeclareFactory({
287
297
  minVersion: "12.0.0",
288
- version: "22.2.5",
298
+ version: "22.2.6",
289
299
  ngImport: i0,
290
300
  type: WrInputNumber,
291
301
  deps: [],
@@ -293,7 +303,7 @@ var WrInputNumber = class WrInputNumber {
293
303
  });
294
304
  static ɵcmp = i0.ɵɵngDeclareComponent({
295
305
  minVersion: "17.0.0",
296
- version: "22.2.5",
306
+ version: "22.2.6",
297
307
  type: WrInputNumber,
298
308
  isStandalone: true,
299
309
  selector: "wr-input-number",
@@ -396,6 +406,27 @@ var WrInputNumber = class WrInputNumber {
396
406
  isRequired: false,
397
407
  transformFunction: null
398
408
  },
409
+ clearable: {
410
+ classPropertyName: "clearable",
411
+ publicName: "clearable",
412
+ isSignal: true,
413
+ isRequired: false,
414
+ transformFunction: null
415
+ },
416
+ clearLabel: {
417
+ classPropertyName: "clearLabel",
418
+ publicName: "clearLabel",
419
+ isSignal: true,
420
+ isRequired: false,
421
+ transformFunction: null
422
+ },
423
+ loading: {
424
+ classPropertyName: "loading",
425
+ publicName: "loading",
426
+ isSignal: true,
427
+ isRequired: false,
428
+ transformFunction: null
429
+ },
399
430
  disabled: {
400
431
  classPropertyName: "disabled",
401
432
  publicName: "disabled",
@@ -434,7 +465,7 @@ var WrInputNumber = class WrInputNumber {
434
465
  isSignal: true
435
466
  }],
436
467
  ngImport: i0,
437
- template: "<wr-input-group [rounded]=\"rounded()\">\n @if (prefix(); as p) {\n <span wrInputPrefix>{{ p }}</span>\n }\n <input\n #input\n wrInput\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (suffix(); as s) {\n <span wrInputSuffix>{{ s }}</span>\n }\n @if (showSteppers()) {\n <div class=\"wr-input-number__steppers\" wrInputSuffix>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedIncrement()\"\n [disabled]=\"!interactive() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedDecrement()\"\n [disabled]=\"!interactive() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n </div>\n }\n</wr-input-group>\n",
468
+ template: "<wr-input-group\n [rounded]=\"rounded()\"\n [clearable]=\"clearable()\"\n [clearLabel]=\"clearLabel()\"\n [loading]=\"loading()\"\n (cleared)=\"touch.emit()\"\n>\n @if (prefix(); as p) {\n <span wrInputPrefix>{{ p }}</span>\n }\n <input\n #input\n wrInput\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (suffix(); as s) {\n <span wrInputSuffix>{{ s }}</span>\n }\n @if (showSteppers()) {\n <div class=\"wr-input-number__steppers\" wrInputSuffix>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedIncrement()\"\n [disabled]=\"!interactive() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedDecrement()\"\n [disabled]=\"!interactive() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n </div>\n }\n</wr-input-group>\n",
438
469
  dependencies: [
439
470
  {
440
471
  kind: "directive",
@@ -446,7 +477,13 @@ var WrInputNumber = class WrInputNumber {
446
477
  kind: "component",
447
478
  type: WrInputGroup,
448
479
  selector: "wr-input-group",
449
- inputs: ["rounded"]
480
+ inputs: [
481
+ "rounded",
482
+ "clearable",
483
+ "clearLabel",
484
+ "loading"
485
+ ],
486
+ outputs: ["cleared"]
450
487
  },
451
488
  {
452
489
  kind: "directive",
@@ -464,7 +501,7 @@ var WrInputNumber = class WrInputNumber {
464
501
  };
465
502
  i0.ɵɵngDeclareClassMetadata({
466
503
  minVersion: "12.0.0",
467
- version: "22.2.5",
504
+ version: "22.2.6",
468
505
  ngImport: i0,
469
506
  type: WrInputNumber,
470
507
  decorators: [{
@@ -482,7 +519,7 @@ i0.ɵɵngDeclareClassMetadata({
482
519
  WrInputPrefix,
483
520
  WrInputSuffix
484
521
  ],
485
- template: "<wr-input-group [rounded]=\"rounded()\">\n @if (prefix(); as p) {\n <span wrInputPrefix>{{ p }}</span>\n }\n <input\n #input\n wrInput\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (suffix(); as s) {\n <span wrInputSuffix>{{ s }}</span>\n }\n @if (showSteppers()) {\n <div class=\"wr-input-number__steppers\" wrInputSuffix>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedIncrement()\"\n [disabled]=\"!interactive() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedDecrement()\"\n [disabled]=\"!interactive() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n </div>\n }\n</wr-input-group>\n"
522
+ template: "<wr-input-group\n [rounded]=\"rounded()\"\n [clearable]=\"clearable()\"\n [clearLabel]=\"clearLabel()\"\n [loading]=\"loading()\"\n (cleared)=\"touch.emit()\"\n>\n @if (prefix(); as p) {\n <span wrInputPrefix>{{ p }}</span>\n }\n <input\n #input\n wrInput\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (suffix(); as s) {\n <span wrInputSuffix>{{ s }}</span>\n }\n @if (showSteppers()) {\n <div class=\"wr-input-number__steppers\" wrInputSuffix>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedIncrement()\"\n [disabled]=\"!interactive() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedDecrement()\"\n [disabled]=\"!interactive() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n </div>\n }\n</wr-input-group>\n"
486
523
  }]
487
524
  }],
488
525
  ctorParameters: () => [],
@@ -599,6 +636,30 @@ i0.ɵɵngDeclareClassMetadata({
599
636
  required: false
600
637
  }]
601
638
  }],
639
+ clearable: [{
640
+ type: i0.Input,
641
+ args: [{
642
+ isSignal: true,
643
+ alias: "clearable",
644
+ required: false
645
+ }]
646
+ }],
647
+ clearLabel: [{
648
+ type: i0.Input,
649
+ args: [{
650
+ isSignal: true,
651
+ alias: "clearLabel",
652
+ required: false
653
+ }]
654
+ }],
655
+ loading: [{
656
+ type: i0.Input,
657
+ args: [{
658
+ isSignal: true,
659
+ alias: "loading",
660
+ required: false
661
+ }]
662
+ }],
602
663
  disabled: [{
603
664
  type: i0.Input,
604
665
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-input-number.mjs","names":[],"sources":["../../../projects/lib/input-number/input-number.ts","../../../projects/lib/input-number/input-number.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrInput, WrInputGroup, WrInputPrefix, WrInputSuffix, type WrInputSize } from 'ngwr/input';\nimport {\n wrClamp,\n wrRound,\n wrCheckStyles,\n wrDecimal,\n wrDecimalAdd,\n wrDecimalCompare,\n wrDecimalMultiply,\n wrDecimalRound,\n} from 'ngwr/utils';\n\nimport type { WrInputNumberMode, WrInputNumberValue } from './types';\n\n/** Resolve the locale's decimal + grouping separators from `Intl.NumberFormat`. */\nfunction resolveSeparators(locale: string): { decimal: string; group: string } {\n const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\n const decimal = parts.find(p => p.type === 'decimal')?.value ?? '.';\n const group = parts.find(p => p.type === 'group')?.value ?? '';\n return { decimal, group };\n}\n\n/**\n * The ten digits `locale` writes, index 0 to 9 — empty when the system is\n * algorithmic. ar-EG prints `١٬٢٣٤٫٥`, and `Number()` reads none of those digits,\n * so an edit to the field's own display could never commit. A copy of the time\n * panel's helper in `ngwr/date-picker`, kept a copy for the reason given there.\n */\nfunction resolveNumerals(locale: string): readonly string[] {\n try {\n const formatter = new Intl.NumberFormat(locale, { useGrouping: false });\n const digits: string[] = [];\n for (let i = 0; i < 10; i++) {\n const digit = formatter.format(i);\n if ([...digit].length !== 1 || digits.includes(digit)) return [];\n digits.push(digit);\n }\n return digits;\n } catch {\n return [];\n }\n}\n\n/**\n * Characters a user types for a separator the locale prints as something else:\n * a keyboard sends a plain space where ru / uk / kk group with U+00A0 and fr with\n * U+202F, and a plain apostrophe where de-CH groups with U+2019.\n */\nfunction groupPattern(group: string): RegExp | null {\n if (!group) return null;\n if (/\\s/.test(group)) return /\\s/g;\n if (/['\\u2019]/.test(group)) return /['\\u2019]/g;\n return new RegExp(group.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'g');\n}\n\n/** A finite `min` / `max` as a decimal; an infinite one is no bound. */\nfunction decimalBound(bound: number): string | null {\n return Number.isFinite(bound) ? wrDecimal(bound) : null;\n}\n\n/**\n * `min` / `max` are numbers at runtime in either mode. The declared type is\n * `FormValueControl`'s, which names the bound after the value, so the number\n * is cast into it here and read back out in `minValue` / `maxValue`.\n */\nfunction asBound<M extends WrInputNumberMode>(bound: number): NonNullable<WrInputNumberValue<M>> {\n return bound as unknown as NonNullable<WrInputNumberValue<M>>;\n}\n\n/**\n * Numeric input with locale-aware formatting + ▲▼ stepper buttons.\n *\n * A signal-forms native control: it implements `FormValueControl`, so\n * `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone.\n *\n * Parses leniently while typing (allows partial input like `\"1.\"` or `\"-\"`),\n * re-formats with grouping + fixed decimals on blur.\n *\n * `M` is the `mode`, and it decides what `value` holds: `number | null` by\n * default, `string | null` under `mode=\"decimal\"`, where the digits are kept\n * exact (see `WrInputNumberValue`).\n *\n * Locale comes from Angular's `LOCALE_ID` — input-number intentionally does\n * NOT depend on `ngwr/date` so it can be used in date-free apps.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-input-number [formField]=\"form.qty\" [min]=\"0\" [max]=\"100\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-input-number [(value)]=\"price\" [decimals]=\"2\" suffix=\"USD\" />\n *\n * <!-- exact decimals: `amount` is a `string | null` such as '1234.56' -->\n * <wr-input-number mode=\"decimal\" [(value)]=\"amount\" [decimals]=\"2\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/input-number\n */\n@Component({\n selector: 'wr-input-number',\n templateUrl: './input-number.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-input-number', '[class]': 'classes()' },\n imports: [WrInput, WrInputGroup, WrInputPrefix, WrInputSuffix],\n})\nexport class WrInputNumber<M extends WrInputNumberMode = 'number'> implements FormValueControl<WrInputNumberValue<M>> {\n /**\n * What `value` holds. `'number'` is the engine's double. `'decimal'` keeps\n * the typed digits exact as a canonical string (`'1234.56'`: a `.` for the\n * point, no grouping), reads a decimal comma and pasted spaces, and steps,\n * clamps and rounds through `wrDecimal` from `ngwr/utils`, so `0.2` stepped\n * by `0.1` is `'0.3'`. A lone `.` or `,` is read in the locale's role: its\n * decimal separator is a point, its grouping character is grouping when\n * exactly three digits follow it (`1,234` in en-US is `'1234'`, but `0,125`\n * is `'0.125'`) and a point otherwise. With both present,\n * the last one is the point: `1,234.56` and `1.234,56` are `'1234.56'`.\n * Grouping comes in threes, so `1.2.3` is unreadable and the committed\n * value stays, as it does for any text the field cannot read.\n *\n * @default 'number'\n */\n readonly mode = input<M>('number' as M);\n\n private readonly decimal = computed(() => this.mode() === 'decimal');\n\n /** Minimum allowed value, a number in either mode. @default -Infinity */\n readonly min = input<NonNullable<WrInputNumberValue<M>> | undefined, unknown>(asBound<M>(Number.NEGATIVE_INFINITY), {\n transform: (v: unknown) => asBound<M>(coerceNumberProperty(v, Number.NEGATIVE_INFINITY)),\n });\n\n /** Maximum allowed value, a number in either mode. @default Infinity */\n readonly max = input<NonNullable<WrInputNumberValue<M>> | undefined, unknown>(asBound<M>(Number.POSITIVE_INFINITY), {\n transform: (v: unknown) => asBound<M>(coerceNumberProperty(v, Number.POSITIVE_INFINITY)),\n });\n\n private readonly minValue = computed(() => (this.min() as number | undefined) ?? Number.NEGATIVE_INFINITY);\n private readonly maxValue = computed(() => (this.max() as number | undefined) ?? Number.POSITIVE_INFINITY);\n\n /** Step used by stepper buttons + arrow keys. @default 1 */\n readonly step = input(1, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 1)) });\n\n /**\n * Fixed number of decimals. Rounds the value as it is COMMITTED, and fixes the\n * digits shown once the field reformats on blur. `null` keeps the entered\n * precision and formats with up to 20.\n *\n * Clamped to 0–100, the range `Intl.NumberFormat`'s `minimumFractionDigits` /\n * `maximumFractionDigits` accept — because it is the one numeric input on this\n * component that had no transform, and the value goes straight into the\n * formatter, which THROWS a `RangeError` outside that range rather than\n * degrading. A `[decimals]=\"-1\"` bound from a config object took the whole\n * component down on blur.\n *\n * @default null\n */\n readonly decimals = input<number | null, unknown>(null, {\n transform: (v: unknown): number | null =>\n v === null || v === undefined ? null : Math.min(100, Math.max(0, Math.trunc(coerceNumberProperty(v, 0)))),\n });\n\n /** Render the ▲▼ stepper column. @default true */\n readonly showSteppers = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Control size — forwarded to the field's `[size]`, and shares the\n * `--wr-control-*` contract. @default 'md'\n */\n readonly size = input<WrInputSize>('md');\n\n /** Pill-shaped corners — forwarded to the group AND the field. @default false */\n readonly rounded = input(false, { transform: coerceBooleanProperty });\n\n /** Optional prefix label (e.g. `\"$\"`). */\n readonly prefix = input<string>('');\n\n /** Optional suffix label (e.g. `\"kg\"`). */\n readonly suffix = input<string>('');\n\n /** Placeholder shown when the input is empty. */\n readonly placeholder = input<string>('');\n\n /**\n * Accessible name for the field. Unset, the field is named by whatever labels\n * it — there is deliberately no fallback here.\n *\n * It used to mirror the `placeholder`, and an `aria-label` OUTRANKS a\n * `<label>` in the accname order: inside a `<wr-form-field label=\"Quantity\">`\n * the very input that adopts the field's id announced the placeholder (\"0\")\n * instead, and a placeholder disappears as soon as the user types. Standalone\n * nothing was lost by dropping it — an input with no other name already falls\n * back to its own `placeholder` attribute, which is the name axe's `label`\n * rule accepts too.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = computed(() => {\n // Not `??`: an empty binding is no name at all, and an empty `aria-label` is\n // worse than none — it still wins the accname order, and announces nothing.\n const explicit = this.ariaLabel();\n if (explicit) return explicit;\n return null;\n });\n\n /** Increment button aria-label. Falls back to `inputNumber.increment`. */\n readonly incrementLabel = input<string | null>(null);\n\n /** Decrement button aria-label. Falls back to `inputNumber.decrement`. */\n readonly decrementLabel = input<string | null>(null);\n\n /**\n * The steppers are icon-only buttons, so these ARE their accessible names.\n * They were hard-coded English while the catalog carried the keys for them\n * unread — a Russian app announced \"Increment\".\n */\n protected readonly resolvedIncrement = useI18nText(this.incrementLabel, 'inputNumber.increment', 'Increment');\n protected readonly resolvedDecrement = useI18nText(this.decrementLabel, 'inputNumber.decrement', 'Decrement');\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Read-only — values cannot be changed (steppers + typing disabled). @default false */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The value, `null` when empty: a `number` in `'number'` mode, a canonical\n * decimal string in `'decimal'` mode. Bound by `[formField]`, or two-way via\n * `[(value)]`.\n */\n readonly value = model<WrInputNumberValue<M>>(null);\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n private readonly locale = inject(LOCALE_ID);\n private readonly separators = resolveSeparators(this.locale);\n private readonly numerals = resolveNumerals(this.locale);\n private readonly group = groupPattern(this.separators.group);\n\n /** Text currently in the input (may be partial / invalid mid-type). */\n protected readonly text = signal<string>('');\n\n /** Whether the input is focused. While true, the input handlers own `text`. */\n protected readonly focused = signal(false);\n\n private readonly field = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n protected readonly interactive = computed(() => !this.disabled() && !this.readonly());\n\n /** The value as the decimal core reads it; `null` when empty or unreadable. */\n private readonly decimalValue = computed(() => {\n const v = this.value();\n return v === null ? null : wrDecimal(v);\n });\n\n protected readonly atMin = computed(() => {\n if (this.decimal()) return this.atDecimalBound(this.minValue(), -1);\n const v = this.value() as number | null;\n return v !== null && v <= this.minValue();\n });\n\n protected readonly atMax = computed(() => {\n if (this.decimal()) return this.atDecimalBound(this.maxValue(), 1);\n const v = this.value() as number | null;\n return v !== null && v >= this.maxValue();\n });\n\n private atDecimalBound(bound: number, side: -1 | 1): boolean {\n const v = this.decimalValue();\n const limit = decimalBound(bound);\n if (v === null || limit === null) return false;\n const order = wrDecimalCompare(v, limit);\n return order !== null && order * side >= 0;\n }\n\n /**\n * The size and pill modifiers mirror what is bound down to the chrome, because\n * the stepper column belongs to neither half of it: the field carries\n * `wr-input--<size>`, the column is its SIBLING, and the group carries no size\n * at all. Without a modifier of its own the column drew one 10x6 chevron at\n * every size and ran its dividers into a pill's rounded end.\n */\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-input-number--${size}`);\n if (this.rounded()) parts.push('wr-input-number--rounded');\n if (this.disabled()) parts.push('wr-input-number--disabled');\n return parts.join(' ');\n });\n\n /**\n * Fraction digits the stepper rounds its arithmetic to when `decimals` says\n * nothing. High enough to leave a real value alone, low enough to erase the\n * binary-float tail that repeated stepping accumulates.\n */\n private static readonly STEP_PRECISION = 10;\n\n /**\n * Above this, the anti-drift round is skipped — it would MANUFACTURE drift.\n *\n * `wrRound(v, 10)` is `Math.round((v + EPSILON) * 1e10) / 1e10`, and the scale\n * factor is only exact while `v * 1e10` stays inside 2^53, i.e. |v| under\n * about 900,720. In practice the round-trip still recovers up to ~9.2e8 and\n * then breaks: `wrRound(1000000001, 10)` is `1000000000.9999999`, and since\n * `format` prints up to 20 fraction digits that tail reaches the screen —\n * and compounds, because the next press starts from it. Integer stepping at\n * that magnitude is exact in IEEE754 and needed no help; the only thing this\n * rounding exists to defend is `0.1 + 0.1 + 0.1`.\n */\n private static readonly SAFE_ROUND_MAGNITUDE = 1e6;\n\n /** Steps finer than this would be rounded away by {@link STEP_PRECISION}. */\n private static readonly SAFE_ROUND_STEP = 1e-9;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('input-number');\n // Keep the display `text` in sync with external writes to `value` (via\n // `[formField]` / `[(value)]`). While the user is editing, the input\n // handlers own `text`, so skip re-formatting to avoid clobbering partial\n // input (e.g. mid-typed grouping or a value that is still being clamped).\n effect(() => {\n const v = this.value();\n if (this.focused()) return;\n if (v === null || Number.isNaN(v)) {\n this.text.set('');\n return;\n }\n // SHOW WHAT THE MODEL HOLDS. It used to format `constrain(v)`, so a\n // `[max]=\"10\"` field handed 500 drew \"10\" over a model that still said\n // 500 — the display was the thing lying, not the model.\n //\n // The tempting repair is to write the clamp back so the two agree, and\n // that is worse: under `[formField]` the bounds arrive ONLY through the\n // schema's `min()` / `max()` rules (binding `[min]` next to `[formField]`\n // is an NG8022 compile error), so overwriting the value ERASES the very\n // error those rules exist to raise — and the write marks a pristine form\n // dirty, tripping unsaved-changes guards and opening every other\n // validator's message on first paint.\n //\n // So: `min` / `max` bound what this component's own edits may produce,\n // and a value written from outside is displayed as it is and left for\n // validation to judge.\n this.text.set(this.format(v));\n });\n }\n\n /**\n * Focus the text field — what Signal Forms calls to focus this control, from\n * `focusBoundControl()`. The host is a plain element, so without this the\n * call landed on something that cannot take focus and nothing moved.\n */\n focus(options?: FocusOptions): void {\n this.field().nativeElement.focus(options);\n }\n\n // Template handlers\n\n protected onInput(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n this.text.set(raw);\n if (!raw.trim()) {\n this.commit(null);\n return;\n }\n if (this.decimal()) {\n const parsed = this.parseDecimal(raw);\n if (parsed === null) return; // partial or unreadable - the committed value stays\n this.commit(this.constrainDecimal(parsed));\n return;\n }\n const parsed = this.parse(raw);\n if (parsed === null) return; // partial input — wait for more\n const next = this.constrain(parsed);\n this.commit(next);\n }\n\n protected onFocus(): void {\n this.focused.set(true);\n }\n\n protected onBlur(): void {\n // Flipping `focused` false lets the sync effect re-format `text` from the\n // committed `value` (e.g. `\"1.\"` → `\"1\"`, or grouping the final number).\n this.focused.set(false);\n this.touch.emit();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (!this.interactive()) return;\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') return;\n event.preventDefault();\n const direction = event.key === 'ArrowUp' ? 1 : -1;\n const multiplier = event.shiftKey ? 10 : 1;\n this.bump(direction * multiplier);\n }\n\n protected stepBy(direction: 1 | -1): void {\n if (!this.interactive()) return;\n this.bump(direction);\n }\n\n // Internals\n\n /** The one write to `value`: what a mode holds is decided above, not here. */\n private commit(next: number | string | null): void {\n this.value.set(next as WrInputNumberValue<M>);\n }\n\n private bump(units: number): void {\n const stepSize = this.step() || 1;\n if (this.decimal()) {\n const base = this.decimalValue() ?? wrDecimal(this.fallbackBase()) ?? '0';\n const next = this.constrainDecimal(wrDecimalAdd(base, wrDecimalMultiply(stepSize, units)) ?? base);\n this.commit(next);\n this.text.set(this.format(next));\n return;\n }\n const base = (this.value() as number | null) ?? this.fallbackBase();\n // `wrRound` before `constrain`, and only on the stepped ARITHMETIC. Binary\n // floats do not add: three presses of a `step=\"0.1\"` stepper produced\n // 0.30000000000000004, `constrain` only rounds when `decimals` is set, and\n // `format` prints up to 20 fraction digits — so the drift went into the\n // model AND onto the screen. Ten digits erases IEEE noise without\n // quantising a value the user typed (0.15000000000000002 stays 0.15, it\n // does not snap to the step grid).\n //\n // Guarded on BOTH ends, because outside them the correction is the thing\n // that corrupts: see SAFE_ROUND_MAGNITUDE, and a step finer than 1e-9 would\n // simply be rounded away to nothing.\n const raw = base + units * stepSize;\n const correctable =\n Math.abs(raw) < WrInputNumber.SAFE_ROUND_MAGNITUDE && Math.abs(stepSize) >= WrInputNumber.SAFE_ROUND_STEP;\n const next = this.constrain(correctable ? wrRound(raw, WrInputNumber.STEP_PRECISION) : raw);\n this.commit(next);\n this.text.set(this.format(next));\n }\n\n /** Choose a sensible starting point when bumping from `null`. */\n private fallbackBase(): number {\n if (Number.isFinite(this.minValue()) && this.minValue() > 0) return this.minValue();\n if (Number.isFinite(this.maxValue()) && this.maxValue() < 0) return this.maxValue();\n return 0;\n }\n\n private constrain(v: number): number {\n let next = wrClamp(v, this.minValue(), this.maxValue());\n const d = this.decimals();\n if (d !== null) next = wrRound(next, d);\n return next;\n }\n\n /** `constrain` for a decimal string: the bounds and `decimals` through the decimal core. */\n private constrainDecimal(v: string): string {\n let next = v;\n const min = decimalBound(this.minValue());\n const max = decimalBound(this.maxValue());\n if (min !== null && wrDecimalCompare(next, min) === -1) next = min;\n if (max !== null && wrDecimalCompare(next, max) === 1) next = max;\n const d = this.decimals();\n if (d !== null) next = wrDecimalRound(next, d) ?? next;\n return next;\n }\n\n /**\n * The locale's digits to ASCII, its minus sign (U+2212 in sv, fi, …) to a\n * hyphen, and the bidi marks it puts around a negative number dropped — every\n * one of them is in the text this field formats, and neither `Number()` nor\n * `wrDecimal` reads them.\n */\n private toAscii(text: string): string {\n return [...text]\n .map(ch => {\n const digit = this.numerals.indexOf(ch);\n return digit < 0 ? ch : String(digit);\n })\n .join('')\n .replace(/[\\u200e\\u200f\\u061c]/g, '')\n .replace(/\\u2212/g, '-');\n }\n\n /**\n * Decimal-mode parse: a canonical decimal string, or `null` for partial or\n * unreadable text. Spaces of every width and the Swiss apostrophe are\n * grouping; `.` and `,` are read by the rule on `mode`, and a separator read\n * as grouping has to come in threes, so `1.2.3` is unreadable rather than 123.\n */\n private parseDecimal(raw: string): string | null {\n // fa and ar-EG write U+066B and U+066C, which the `.` and `,` rule never sees.\n const { decimal, group } = this.separators;\n const ownMarks = decimal !== '.' && decimal !== ',';\n let text = this.toAscii(raw.trim()).replace(/[\\s'\\u2019]/g, '');\n if (ownMarks) text = text.replaceAll(group, '').replaceAll(decimal, '.');\n const separators = [...text.matchAll(/[.,]/g)];\n if (separators.length) {\n const last = separators[separators.length - 1];\n let point: number | null = last.index;\n if (separators.length === 1) {\n // Three digits after the locale's grouping character is grouping,\n // unless nothing or a lone zero precedes it: `0,125` is a fraction.\n const after = text.length - last.index - 1;\n const lead = text.slice(0, last.index);\n if (last[0] !== (ownMarks ? '.' : decimal) && after === 3 && !/^-?0?$/.test(lead)) point = null;\n } else if (separators.every(s => s[0] === last[0])) {\n point = null;\n }\n const groups = (point === null ? text : text.slice(0, point)).split(/[.,]/);\n if (groups.slice(1).some(group => group.length !== 3)) return null;\n text = point === null ? groups.join('') : `${groups.join('')}.${text.slice(point + 1)}`;\n }\n if (/^-?\\.?$/.test(text) || text.endsWith('.')) return null;\n return wrDecimal(text);\n }\n\n /** Parse a locale-formatted string. Returns `null` for partial / not-yet-numeric input. */\n private parse(raw: string): number | null {\n const trimmed = raw.trim();\n if (!trimmed) return null;\n let normalised = this.toAscii(trimmed);\n // Strip group separators, normalise the decimal separator to `.`.\n if (this.group) {\n normalised = normalised.replace(this.group, '');\n }\n if (this.separators.decimal !== '.') {\n normalised = normalised.split(this.separators.decimal).join('.');\n }\n // Partial inputs we don't want to clobber while the user is still typing:\n // `-`, `-.`, `.`, `1.`, `-1.` etc.\n if (/^-?\\.?$/.test(normalised) || normalised.endsWith('.')) return null;\n const n = Number(normalised);\n return Number.isFinite(n) ? n : null;\n }\n\n /** Format a value using `Intl.NumberFormat` for the active locale. */\n private format(v: number | string): string {\n const d = this.decimals();\n if (this.decimal()) {\n const canonical = wrDecimal(v);\n if (canonical === null) return String(v);\n // The string's own places, so `'1.50'` shows as typed; `decimals` fixes them.\n const point = canonical.indexOf('.');\n const places = d ?? Math.min(100, point < 0 ? 0 : canonical.length - point - 1);\n const formatter = new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: places,\n maximumFractionDigits: places,\n useGrouping: true,\n });\n // ES2023 formats a decimal string exactly; the lib typings here stop at ES2022.\n return formatter.format(canonical as unknown as number);\n }\n const formatter = new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: d ?? 0,\n maximumFractionDigits: d ?? 20,\n useGrouping: true,\n });\n return formatter.format(v as number);\n }\n}\n","<wr-input-group [rounded]=\"rounded()\">\n @if (prefix(); as p) {\n <span wrInputPrefix>{{ p }}</span>\n }\n <input\n #input\n wrInput\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (suffix(); as s) {\n <span wrInputSuffix>{{ s }}</span>\n }\n @if (showSteppers()) {\n <div class=\"wr-input-number__steppers\" wrInputSuffix>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedIncrement()\"\n [disabled]=\"!interactive() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedDecrement()\"\n [disabled]=\"!interactive() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n </div>\n }\n</wr-input-group>\n"],"mappings":";;;;;;;;;;;;AAwCA,SAAS,kBAAkB,QAAc;CACvC,MAAM,QAAQ,IAAI,KAAK,aAAa,MAAM,CAAC,CAAC,cAAc,OAAO;CAGjE,OAAO;EAAE,SAFO,MAAM,MAAK,MAAK,EAAE,SAAS,SAAS,CAAC,EAAE,SAAS;EAE9C,OADJ,MAAM,MAAK,MAAK,EAAE,SAAS,OAAO,CAAC,EAAE,SAAS;CACrC;AACzB;AAQA,SAAS,gBAAgB,QAAc;CACrC,IAAI;EACF,MAAM,YAAY,IAAI,KAAK,aAAa,QAAQ,EAAE,aAAa,MAAK,CAAE;EACtE,MAAM,SAAmB,CAAA;EACzB,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;GAC3B,MAAM,QAAQ,UAAU,OAAO,CAAC;GAChC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,WAAW,KAAK,OAAO,SAAS,KAAK,GAAG,OAAO,CAAA;GAC9D,OAAO,KAAK,KAAK;EACnB;EACA,OAAO;CACT,QAAQ;EACN,OAAO,CAAA;CACT;AACF;AAOA,SAAS,aAAa,OAAa;CACjC,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,KAAK,KAAK,KAAK,GAAG,OAAO;CAC7B,IAAI,YAAY,KAAK,KAAK,GAAG,OAAO;CACpC,OAAO,IAAI,OAAO,MAAM,QAAQ,uBAAuB,MAAM,GAAG,GAAG;AACrE;AAGA,SAAS,aAAa,OAAa;CACjC,OAAO,OAAO,SAAS,KAAK,IAAI,UAAU,KAAK,IAAI;AACrD;AAOA,SAAS,QAAqC,OAAa;CACzD,OAAO;AACT;AAwCA,IAAa,gBAAb,MAAa,cAAa;CAgBf,OAAO,MAAS,UAAc,GAAA,YAAA,CAAA,EAA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;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,OAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-input-number.mjs","names":[],"sources":["../../../projects/lib/input-number/input-number.ts","../../../projects/lib/input-number/input-number.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrInput, WrInputGroup, WrInputPrefix, WrInputSuffix, type WrInputSize } from 'ngwr/input';\nimport {\n wrClamp,\n wrRound,\n wrCheckStyles,\n wrDecimal,\n wrDecimalAdd,\n wrDecimalCompare,\n wrDecimalMultiply,\n wrDecimalRound,\n} from 'ngwr/utils';\n\nimport type { WrInputNumberMode, WrInputNumberValue } from './types';\n\n/** Resolve the locale's decimal + grouping separators from `Intl.NumberFormat`. */\nfunction resolveSeparators(locale: string): { decimal: string; group: string } {\n const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\n const decimal = parts.find(p => p.type === 'decimal')?.value ?? '.';\n const group = parts.find(p => p.type === 'group')?.value ?? '';\n return { decimal, group };\n}\n\n/**\n * The ten digits `locale` writes, index 0 to 9 — empty when the system is\n * algorithmic. ar-EG prints `١٬٢٣٤٫٥`, and `Number()` reads none of those digits,\n * so an edit to the field's own display could never commit. A copy of the time\n * panel's helper in `ngwr/date-picker`, kept a copy for the reason given there.\n */\nfunction resolveNumerals(locale: string): readonly string[] {\n try {\n const formatter = new Intl.NumberFormat(locale, { useGrouping: false });\n const digits: string[] = [];\n for (let i = 0; i < 10; i++) {\n const digit = formatter.format(i);\n if ([...digit].length !== 1 || digits.includes(digit)) return [];\n digits.push(digit);\n }\n return digits;\n } catch {\n return [];\n }\n}\n\n/**\n * Characters a user types for a separator the locale prints as something else:\n * a keyboard sends a plain space where ru / uk / kk group with U+00A0 and fr with\n * U+202F, and a plain apostrophe where de-CH groups with U+2019.\n */\nfunction groupPattern(group: string): RegExp | null {\n if (!group) return null;\n if (/\\s/.test(group)) return /\\s/g;\n if (/['\\u2019]/.test(group)) return /['\\u2019]/g;\n return new RegExp(group.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'g');\n}\n\n/** A finite `min` / `max` as a decimal; an infinite one is no bound. */\nfunction decimalBound(bound: number): string | null {\n return Number.isFinite(bound) ? wrDecimal(bound) : null;\n}\n\n/**\n * `min` / `max` are numbers at runtime in either mode. The declared type is\n * `FormValueControl`'s, which names the bound after the value, so the number\n * is cast into it here and read back out in `minValue` / `maxValue`.\n */\nfunction asBound<M extends WrInputNumberMode>(bound: number): NonNullable<WrInputNumberValue<M>> {\n return bound as unknown as NonNullable<WrInputNumberValue<M>>;\n}\n\n/**\n * Numeric input with locale-aware formatting + ▲▼ stepper buttons.\n *\n * A signal-forms native control: it implements `FormValueControl`, so\n * `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone.\n *\n * Parses leniently while typing (allows partial input like `\"1.\"` or `\"-\"`),\n * re-formats with grouping + fixed decimals on blur.\n *\n * `M` is the `mode`, and it decides what `value` holds: `number | null` by\n * default, `string | null` under `mode=\"decimal\"`, where the digits are kept\n * exact (see `WrInputNumberValue`).\n *\n * Locale comes from Angular's `LOCALE_ID` — input-number intentionally does\n * NOT depend on `ngwr/date` so it can be used in date-free apps.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-input-number [formField]=\"form.qty\" [min]=\"0\" [max]=\"100\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-input-number [(value)]=\"price\" [decimals]=\"2\" suffix=\"USD\" />\n *\n * <!-- exact decimals: `amount` is a `string | null` such as '1234.56' -->\n * <wr-input-number mode=\"decimal\" [(value)]=\"amount\" [decimals]=\"2\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/input-number\n */\n@Component({\n selector: 'wr-input-number',\n templateUrl: './input-number.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-input-number', '[class]': 'classes()' },\n imports: [WrInput, WrInputGroup, WrInputPrefix, WrInputSuffix],\n})\nexport class WrInputNumber<M extends WrInputNumberMode = 'number'> implements FormValueControl<WrInputNumberValue<M>> {\n /**\n * What `value` holds. `'number'` is the engine's double. `'decimal'` keeps\n * the typed digits exact as a canonical string (`'1234.56'`: a `.` for the\n * point, no grouping), reads a decimal comma and pasted spaces, and steps,\n * clamps and rounds through `wrDecimal` from `ngwr/utils`, so `0.2` stepped\n * by `0.1` is `'0.3'`. A lone `.` or `,` is read in the locale's role: its\n * decimal separator is a point, its grouping character is grouping when\n * exactly three digits follow it (`1,234` in en-US is `'1234'`, but `0,125`\n * is `'0.125'`) and a point otherwise. With both present,\n * the last one is the point: `1,234.56` and `1.234,56` are `'1234.56'`.\n * Grouping comes in threes, so `1.2.3` is unreadable and the committed\n * value stays, as it does for any text the field cannot read.\n *\n * @default 'number'\n */\n readonly mode = input<M>('number' as M);\n\n private readonly decimal = computed(() => this.mode() === 'decimal');\n\n /** Minimum allowed value, a number in either mode. @default -Infinity */\n readonly min = input<NonNullable<WrInputNumberValue<M>> | undefined, unknown>(asBound<M>(Number.NEGATIVE_INFINITY), {\n transform: (v: unknown) => asBound<M>(coerceNumberProperty(v, Number.NEGATIVE_INFINITY)),\n });\n\n /** Maximum allowed value, a number in either mode. @default Infinity */\n readonly max = input<NonNullable<WrInputNumberValue<M>> | undefined, unknown>(asBound<M>(Number.POSITIVE_INFINITY), {\n transform: (v: unknown) => asBound<M>(coerceNumberProperty(v, Number.POSITIVE_INFINITY)),\n });\n\n private readonly minValue = computed(() => (this.min() as number | undefined) ?? Number.NEGATIVE_INFINITY);\n private readonly maxValue = computed(() => (this.max() as number | undefined) ?? Number.POSITIVE_INFINITY);\n\n /** Step used by stepper buttons + arrow keys. @default 1 */\n readonly step = input(1, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 1)) });\n\n /**\n * Fixed number of decimals. Rounds the value as it is COMMITTED, and fixes the\n * digits shown once the field reformats on blur. `null` keeps the entered\n * precision and formats with up to 20.\n *\n * Clamped to 0–100, the range `Intl.NumberFormat`'s `minimumFractionDigits` /\n * `maximumFractionDigits` accept — because it is the one numeric input on this\n * component that had no transform, and the value goes straight into the\n * formatter, which THROWS a `RangeError` outside that range rather than\n * degrading. A `[decimals]=\"-1\"` bound from a config object took the whole\n * component down on blur.\n *\n * @default null\n */\n readonly decimals = input<number | null, unknown>(null, {\n transform: (v: unknown): number | null =>\n v === null || v === undefined ? null : Math.min(100, Math.max(0, Math.trunc(coerceNumberProperty(v, 0)))),\n });\n\n /** Render the ▲▼ stepper column. @default true */\n readonly showSteppers = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Control size — forwarded to the field's `[size]`, and shares the\n * `--wr-control-*` contract. @default 'md'\n */\n readonly size = input<WrInputSize>('md');\n\n /** Pill-shaped corners — forwarded to the group AND the field. @default false */\n readonly rounded = input(false, { transform: coerceBooleanProperty });\n\n /** Optional prefix label (e.g. `\"$\"`). */\n readonly prefix = input<string>('');\n\n /** Optional suffix label (e.g. `\"kg\"`). */\n readonly suffix = input<string>('');\n\n /** Placeholder shown when the input is empty. */\n readonly placeholder = input<string>('');\n\n /**\n * Accessible name for the field. Unset, the field is named by whatever labels\n * it — there is deliberately no fallback here.\n *\n * It used to mirror the `placeholder`, and an `aria-label` OUTRANKS a\n * `<label>` in the accname order: inside a `<wr-form-field label=\"Quantity\">`\n * the very input that adopts the field's id announced the placeholder (\"0\")\n * instead, and a placeholder disappears as soon as the user types. Standalone\n * nothing was lost by dropping it — an input with no other name already falls\n * back to its own `placeholder` attribute, which is the name axe's `label`\n * rule accepts too.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = computed(() => {\n // Not `??`: an empty binding is no name at all, and an empty `aria-label` is\n // worse than none — it still wins the accname order, and announces nothing.\n const explicit = this.ariaLabel();\n if (explicit) return explicit;\n return null;\n });\n\n /** Increment button aria-label. Falls back to `inputNumber.increment`. */\n readonly incrementLabel = input<string | null>(null);\n\n /** Decrement button aria-label. Falls back to `inputNumber.decrement`. */\n readonly decrementLabel = input<string | null>(null);\n\n /**\n * The steppers are icon-only buttons, so these ARE their accessible names.\n * They were hard-coded English while the catalog carried the keys for them\n * unread — a Russian app announced \"Increment\".\n */\n protected readonly resolvedIncrement = useI18nText(this.incrementLabel, 'inputNumber.increment', 'Increment');\n protected readonly resolvedDecrement = useI18nText(this.decrementLabel, 'inputNumber.decrement', 'Decrement');\n\n /**\n * Show a clear (×) button while the field holds text and is neither disabled\n * nor read-only. Clearing sets `value` to `null`, emits `touch` and puts focus\n * back in the field. It is a pointer control: from the keyboard, emptying the\n * field clears the value. @default false\n */\n readonly clearable = input(false, { transform: coerceBooleanProperty });\n\n /** Clear (×) button aria-label. Falls back to `common.clear`. */\n readonly clearLabel = input<string | null>(null);\n\n /**\n * Show a spinner after the field and mark the field `aria-busy`. The field\n * stays editable. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Read-only — values cannot be changed (steppers + typing disabled). @default false */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The value, `null` when empty: a `number` in `'number'` mode, a canonical\n * decimal string in `'decimal'` mode. Bound by `[formField]`, or two-way via\n * `[(value)]`.\n */\n readonly value = model<WrInputNumberValue<M>>(null);\n\n /** Emitted on blur, and by the clear (×) button, so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n private readonly locale = inject(LOCALE_ID);\n private readonly separators = resolveSeparators(this.locale);\n private readonly numerals = resolveNumerals(this.locale);\n private readonly group = groupPattern(this.separators.group);\n\n /** Text currently in the input (may be partial / invalid mid-type). */\n protected readonly text = signal<string>('');\n\n /** Whether the input is focused. While true, the input handlers own `text`. */\n protected readonly focused = signal(false);\n\n private readonly field = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n protected readonly interactive = computed(() => !this.disabled() && !this.readonly());\n\n /** The value as the decimal core reads it; `null` when empty or unreadable. */\n private readonly decimalValue = computed(() => {\n const v = this.value();\n return v === null ? null : wrDecimal(v);\n });\n\n protected readonly atMin = computed(() => {\n if (this.decimal()) return this.atDecimalBound(this.minValue(), -1);\n const v = this.value() as number | null;\n return v !== null && v <= this.minValue();\n });\n\n protected readonly atMax = computed(() => {\n if (this.decimal()) return this.atDecimalBound(this.maxValue(), 1);\n const v = this.value() as number | null;\n return v !== null && v >= this.maxValue();\n });\n\n private atDecimalBound(bound: number, side: -1 | 1): boolean {\n const v = this.decimalValue();\n const limit = decimalBound(bound);\n if (v === null || limit === null) return false;\n const order = wrDecimalCompare(v, limit);\n return order !== null && order * side >= 0;\n }\n\n /**\n * The size and pill modifiers mirror what is bound down to the chrome, because\n * the stepper column belongs to neither half of it: the field carries\n * `wr-input--<size>`, the column is its SIBLING, and the group carries no size\n * at all. Without a modifier of its own the column drew one 10x6 chevron at\n * every size and ran its dividers into a pill's rounded end.\n */\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n const size = this.size();\n if (size !== 'md') parts.push(`wr-input-number--${size}`);\n if (this.rounded()) parts.push('wr-input-number--rounded');\n if (this.disabled()) parts.push('wr-input-number--disabled');\n return parts.join(' ');\n });\n\n /**\n * Fraction digits the stepper rounds its arithmetic to when `decimals` says\n * nothing. High enough to leave a real value alone, low enough to erase the\n * binary-float tail that repeated stepping accumulates.\n */\n private static readonly STEP_PRECISION = 10;\n\n /**\n * Above this, the anti-drift round is skipped — it would MANUFACTURE drift.\n *\n * `wrRound(v, 10)` is `Math.round((v + EPSILON) * 1e10) / 1e10`, and the scale\n * factor is only exact while `v * 1e10` stays inside 2^53, i.e. |v| under\n * about 900,720. In practice the round-trip still recovers up to ~9.2e8 and\n * then breaks: `wrRound(1000000001, 10)` is `1000000000.9999999`, and since\n * `format` prints up to 20 fraction digits that tail reaches the screen —\n * and compounds, because the next press starts from it. Integer stepping at\n * that magnitude is exact in IEEE754 and needed no help; the only thing this\n * rounding exists to defend is `0.1 + 0.1 + 0.1`.\n */\n private static readonly SAFE_ROUND_MAGNITUDE = 1e6;\n\n /** Steps finer than this would be rounded away by {@link STEP_PRECISION}. */\n private static readonly SAFE_ROUND_STEP = 1e-9;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('input-number');\n // Keep the display `text` in sync with external writes to `value` (via\n // `[formField]` / `[(value)]`). While the user is editing, the input\n // handlers own `text`, so skip re-formatting to avoid clobbering partial\n // input (e.g. mid-typed grouping or a value that is still being clamped).\n effect(() => {\n const v = this.value();\n if (this.focused()) return;\n if (v === null || Number.isNaN(v)) {\n this.text.set('');\n return;\n }\n // SHOW WHAT THE MODEL HOLDS. It used to format `constrain(v)`, so a\n // `[max]=\"10\"` field handed 500 drew \"10\" over a model that still said\n // 500 — the display was the thing lying, not the model.\n //\n // The tempting repair is to write the clamp back so the two agree, and\n // that is worse: under `[formField]` the bounds arrive ONLY through the\n // schema's `min()` / `max()` rules (binding `[min]` next to `[formField]`\n // is an NG8022 compile error), so overwriting the value ERASES the very\n // error those rules exist to raise — and the write marks a pristine form\n // dirty, tripping unsaved-changes guards and opening every other\n // validator's message on first paint.\n //\n // So: `min` / `max` bound what this component's own edits may produce,\n // and a value written from outside is displayed as it is and left for\n // validation to judge.\n this.text.set(this.format(v));\n });\n }\n\n /**\n * Focus the text field — what Signal Forms calls to focus this control, from\n * `focusBoundControl()`. The host is a plain element, so without this the\n * call landed on something that cannot take focus and nothing moved.\n */\n focus(options?: FocusOptions): void {\n this.field().nativeElement.focus(options);\n }\n\n // Template handlers\n\n protected onInput(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n this.text.set(raw);\n if (!raw.trim()) {\n this.commit(null);\n return;\n }\n if (this.decimal()) {\n const parsed = this.parseDecimal(raw);\n if (parsed === null) return; // partial or unreadable - the committed value stays\n this.commit(this.constrainDecimal(parsed));\n return;\n }\n const parsed = this.parse(raw);\n if (parsed === null) return; // partial input — wait for more\n const next = this.constrain(parsed);\n this.commit(next);\n }\n\n protected onFocus(): void {\n this.focused.set(true);\n }\n\n protected onBlur(): void {\n // Flipping `focused` false lets the sync effect re-format `text` from the\n // committed `value` (e.g. `\"1.\"` → `\"1\"`, or grouping the final number).\n this.focused.set(false);\n this.touch.emit();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (!this.interactive()) return;\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') return;\n event.preventDefault();\n const direction = event.key === 'ArrowUp' ? 1 : -1;\n const multiplier = event.shiftKey ? 10 : 1;\n this.bump(direction * multiplier);\n }\n\n protected stepBy(direction: 1 | -1): void {\n if (!this.interactive()) return;\n this.bump(direction);\n }\n\n // Internals\n\n /** The one write to `value`: what a mode holds is decided above, not here. */\n private commit(next: number | string | null): void {\n this.value.set(next as WrInputNumberValue<M>);\n }\n\n private bump(units: number): void {\n const stepSize = this.step() || 1;\n if (this.decimal()) {\n const base = this.decimalValue() ?? wrDecimal(this.fallbackBase()) ?? '0';\n const next = this.constrainDecimal(wrDecimalAdd(base, wrDecimalMultiply(stepSize, units)) ?? base);\n this.commit(next);\n this.text.set(this.format(next));\n return;\n }\n const current = this.value() as number | null;\n // A non-finite value gives no number to step from, so it steps like an empty field.\n const base = current !== null && Number.isFinite(current) ? current : this.fallbackBase();\n // `wrRound` before `constrain`, and only on the stepped ARITHMETIC. Binary\n // floats do not add: three presses of a `step=\"0.1\"` stepper produced\n // 0.30000000000000004, `constrain` only rounds when `decimals` is set, and\n // `format` prints up to 20 fraction digits — so the drift went into the\n // model AND onto the screen. Ten digits erases IEEE noise without\n // quantising a value the user typed (0.15000000000000002 stays 0.15, it\n // does not snap to the step grid).\n //\n // Guarded on BOTH ends, because outside them the correction is the thing\n // that corrupts: see SAFE_ROUND_MAGNITUDE, and a step finer than 1e-9 would\n // simply be rounded away to nothing.\n const raw = base + units * stepSize;\n const correctable =\n Math.abs(raw) < WrInputNumber.SAFE_ROUND_MAGNITUDE && Math.abs(stepSize) >= WrInputNumber.SAFE_ROUND_STEP;\n const next = this.constrain(correctable ? wrRound(raw, WrInputNumber.STEP_PRECISION) : raw);\n this.commit(next);\n this.text.set(this.format(next));\n }\n\n /** Choose a sensible starting point when bumping from `null`. */\n private fallbackBase(): number {\n if (Number.isFinite(this.minValue()) && this.minValue() > 0) return this.minValue();\n if (Number.isFinite(this.maxValue()) && this.maxValue() < 0) return this.maxValue();\n return 0;\n }\n\n private constrain(v: number): number {\n let next = wrClamp(v, this.minValue(), this.maxValue());\n const d = this.decimals();\n if (d !== null) next = wrRound(next, d);\n return next;\n }\n\n /** `constrain` for a decimal string: the bounds and `decimals` through the decimal core. */\n private constrainDecimal(v: string): string {\n let next = v;\n const min = decimalBound(this.minValue());\n const max = decimalBound(this.maxValue());\n if (min !== null && wrDecimalCompare(next, min) === -1) next = min;\n if (max !== null && wrDecimalCompare(next, max) === 1) next = max;\n const d = this.decimals();\n if (d !== null) next = wrDecimalRound(next, d) ?? next;\n return next;\n }\n\n /**\n * The locale's digits to ASCII, its minus sign (U+2212 in sv, fi, …) to a\n * hyphen, and the bidi marks it puts around a negative number dropped — every\n * one of them is in the text this field formats, and neither `Number()` nor\n * `wrDecimal` reads them.\n */\n private toAscii(text: string): string {\n return [...text]\n .map(ch => {\n const digit = this.numerals.indexOf(ch);\n return digit < 0 ? ch : String(digit);\n })\n .join('')\n .replace(/[\\u200e\\u200f\\u061c]/g, '')\n .replace(/\\u2212/g, '-');\n }\n\n /**\n * Decimal-mode parse: a canonical decimal string, or `null` for partial or\n * unreadable text. Spaces of every width and the Swiss apostrophe are\n * grouping; `.` and `,` are read by the rule on `mode`, and a separator read\n * as grouping has to come in threes, so `1.2.3` is unreadable rather than 123.\n */\n private parseDecimal(raw: string): string | null {\n // fa and ar-EG write U+066B and U+066C, which the `.` and `,` rule never sees.\n const { decimal, group } = this.separators;\n const ownMarks = decimal !== '.' && decimal !== ',';\n let text = this.toAscii(raw.trim()).replace(/[\\s'\\u2019]/g, '');\n if (ownMarks) text = text.replaceAll(group, '').replaceAll(decimal, '.');\n const separators = [...text.matchAll(/[.,]/g)];\n if (separators.length) {\n const last = separators[separators.length - 1];\n let point: number | null = last.index;\n if (separators.length === 1) {\n // Three digits after the locale's grouping character is grouping,\n // unless nothing or a lone zero precedes it: `0,125` is a fraction.\n const after = text.length - last.index - 1;\n const lead = text.slice(0, last.index);\n if (last[0] !== (ownMarks ? '.' : decimal) && after === 3 && !/^-?0?$/.test(lead)) point = null;\n } else if (separators.every(s => s[0] === last[0])) {\n point = null;\n }\n const groups = (point === null ? text : text.slice(0, point)).split(/[.,]/);\n if (groups.slice(1).some(group => group.length !== 3)) return null;\n text = point === null ? groups.join('') : `${groups.join('')}.${text.slice(point + 1)}`;\n }\n if (/^-?\\.?$/.test(text) || text.endsWith('.')) return null;\n return wrDecimal(text);\n }\n\n /** Parse a locale-formatted string. Returns `null` for partial / not-yet-numeric input. */\n private parse(raw: string): number | null {\n const trimmed = raw.trim();\n if (!trimmed) return null;\n let normalised = this.toAscii(trimmed);\n // Strip group separators, normalise the decimal separator to `.`.\n if (this.group) {\n normalised = normalised.replace(this.group, '');\n }\n if (this.separators.decimal !== '.') {\n normalised = normalised.split(this.separators.decimal).join('.');\n }\n // Partial inputs we don't want to clobber while the user is still typing:\n // `-`, `-.`, `.`, `1.`, `-1.` etc.\n if (/^-?\\.?$/.test(normalised) || normalised.endsWith('.')) return null;\n const n = Number(normalised);\n return Number.isFinite(n) ? n : null;\n }\n\n /** Format a value using `Intl.NumberFormat` for the active locale. */\n private format(v: number | string): string {\n const d = this.decimals();\n if (this.decimal()) {\n const canonical = wrDecimal(v);\n if (canonical === null) return String(v);\n // The string's own places, so `'1.50'` shows as typed; `decimals` fixes them.\n const point = canonical.indexOf('.');\n const places = d ?? Math.min(100, point < 0 ? 0 : canonical.length - point - 1);\n const formatter = new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: places,\n maximumFractionDigits: places,\n useGrouping: true,\n });\n // ES2023 formats a decimal string exactly; the lib typings here stop at ES2022.\n return formatter.format(canonical as unknown as number);\n }\n const formatter = new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: d ?? 0,\n maximumFractionDigits: d ?? 20,\n useGrouping: true,\n });\n return formatter.format(v as number);\n }\n}\n","<wr-input-group\n [rounded]=\"rounded()\"\n [clearable]=\"clearable()\"\n [clearLabel]=\"clearLabel()\"\n [loading]=\"loading()\"\n (cleared)=\"touch.emit()\"\n>\n @if (prefix(); as p) {\n <span wrInputPrefix>{{ p }}</span>\n }\n <input\n #input\n wrInput\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (suffix(); as s) {\n <span wrInputSuffix>{{ s }}</span>\n }\n @if (showSteppers()) {\n <div class=\"wr-input-number__steppers\" wrInputSuffix>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedIncrement()\"\n [disabled]=\"!interactive() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-input-number__step\"\n tabindex=\"-1\"\n [attr.aria-label]=\"resolvedDecrement()\"\n [disabled]=\"!interactive() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n width=\"14\"\n height=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n </div>\n }\n</wr-input-group>\n"],"mappings":";;;;;;;;;;;;AAwCA,SAAS,kBAAkB,QAAc;CACvC,MAAM,QAAQ,IAAI,KAAK,aAAa,MAAM,CAAC,CAAC,cAAc,OAAO;CAGjE,OAAO;EAAE,SAFO,MAAM,MAAK,MAAK,EAAE,SAAS,SAAS,CAAC,EAAE,SAAS;EAE9C,OADJ,MAAM,MAAK,MAAK,EAAE,SAAS,OAAO,CAAC,EAAE,SAAS;CACrC;AACzB;AAQA,SAAS,gBAAgB,QAAc;CACrC,IAAI;EACF,MAAM,YAAY,IAAI,KAAK,aAAa,QAAQ,EAAE,aAAa,MAAK,CAAE;EACtE,MAAM,SAAmB,CAAA;EACzB,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;GAC3B,MAAM,QAAQ,UAAU,OAAO,CAAC;GAChC,IAAI,C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;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,OAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -22,6 +22,10 @@ var WrInputOtp = class WrInputOtp {
22
22
  });
23
23
  mode = input("numeric", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
24
24
  size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
25
+ rounded = input(false, {
26
+ ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
27
+ transform: coerceBooleanProperty
28
+ });
25
29
  mask = input(false, {
26
30
  ...ngDevMode ? { debugName: "mask" } : /* istanbul ignore next */ {},
27
31
  transform: coerceBooleanProperty
@@ -46,6 +50,7 @@ var WrInputOtp = class WrInputOtp {
46
50
  const parts = [];
47
51
  const size = this.size();
48
52
  if (size !== "md") parts.push(`wr-input-otp--${size}`);
53
+ if (this.rounded()) parts.push("wr-input-otp--rounded");
49
54
  if (this.disabled()) parts.push("wr-input-otp--disabled");
50
55
  else if (this.readonly()) parts.push("wr-input-otp--readonly");
51
56
  return parts.join(" ");
@@ -191,7 +196,7 @@ var WrInputOtp = class WrInputOtp {
191
196
  }
192
197
  static ɵfac = i0.ɵɵngDeclareFactory({
193
198
  minVersion: "12.0.0",
194
- version: "22.2.5",
199
+ version: "22.2.6",
195
200
  ngImport: i0,
196
201
  type: WrInputOtp,
197
202
  deps: [],
@@ -199,7 +204,7 @@ var WrInputOtp = class WrInputOtp {
199
204
  });
200
205
  static ɵcmp = i0.ɵɵngDeclareComponent({
201
206
  minVersion: "17.0.0",
202
- version: "22.2.5",
207
+ version: "22.2.6",
203
208
  type: WrInputOtp,
204
209
  isStandalone: true,
205
210
  selector: "wr-input-otp",
@@ -232,6 +237,13 @@ var WrInputOtp = class WrInputOtp {
232
237
  isRequired: false,
233
238
  transformFunction: null
234
239
  },
240
+ rounded: {
241
+ classPropertyName: "rounded",
242
+ publicName: "rounded",
243
+ isSignal: true,
244
+ isRequired: false,
245
+ transformFunction: null
246
+ },
235
247
  mask: {
236
248
  classPropertyName: "mask",
237
249
  publicName: "mask",
@@ -295,7 +307,7 @@ var WrInputOtp = class WrInputOtp {
295
307
  };
296
308
  i0.ɵɵngDeclareClassMetadata({
297
309
  minVersion: "12.0.0",
298
- version: "22.2.5",
310
+ version: "22.2.6",
299
311
  ngImport: i0,
300
312
  type: WrInputOtp,
301
313
  decorators: [{
@@ -347,6 +359,14 @@ i0.ɵɵngDeclareClassMetadata({
347
359
  required: false
348
360
  }]
349
361
  }],
362
+ rounded: [{
363
+ type: i0.Input,
364
+ args: [{
365
+ isSignal: true,
366
+ alias: "rounded",
367
+ required: false
368
+ }]
369
+ }],
350
370
  mask: [{
351
371
  type: i0.Input,
352
372
  args: [{