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
@@ -0,0 +1,176 @@
1
+ import { ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
2
+ /**
3
+ * @license
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
+ */
8
+ const SEPARATOR = ".wr-sidebar__comma";
9
+ var WrSidebarItemHarness = class WrSidebarItemHarness extends ComponentHarness {
10
+ static hostSelector = ".wr-sidebar__row";
11
+ static with(options = {}) {
12
+ return new HarnessPredicate(WrSidebarItemHarness, options).addOption("title", options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title)).addOption("current", options.current, async (harness, current) => await harness.isCurrent() === current).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled);
13
+ }
14
+ async getTitle() {
15
+ return (await this.locatorFor(".wr-sidebar__title")()).text({ exclude: SEPARATOR });
16
+ }
17
+ async getSubtitle() {
18
+ return await (await this.locatorForOptional(".wr-sidebar__subtitle")())?.text() ?? null;
19
+ }
20
+ async getBadge() {
21
+ return await (await this.locatorForOptional(".wr-sidebar__badge")())?.text({ exclude: SEPARATOR }) ?? null;
22
+ }
23
+ async getCount() {
24
+ return await (await this.locatorForOptional(".wr-sidebar__count")())?.text({ exclude: SEPARATOR }) ?? null;
25
+ }
26
+ async getLevel() {
27
+ const host = await this.host();
28
+ for (const level of [
29
+ 1,
30
+ 2,
31
+ 3
32
+ ]) if (await host.hasClass(`wr-sidebar__row--level-${level}`)) return level;
33
+ throw new Error(`WrSidebarItemHarness.getLevel(): "${await this.getTitle()}" carries no level modifier.`);
34
+ }
35
+ async isCurrent() {
36
+ return await (await this.host()).getAttribute("aria-current") === "page";
37
+ }
38
+ async isDisabled() {
39
+ return (await this.host()).hasClass("wr-sidebar__row--disabled");
40
+ }
41
+ async isGroup() {
42
+ return (await this.host()).hasClass("wr-sidebar__row--group");
43
+ }
44
+ async click() {
45
+ if (await this.isDisabled()) throw new Error(`WrSidebarItemHarness.click(): "${await this.getTitle()}" is disabled, so it is not a link.`);
46
+ await (await this.host()).click();
47
+ }
48
+ async focus() {
49
+ return (await this.host()).focus();
50
+ }
51
+ async isFocused() {
52
+ return (await this.host()).isFocused();
53
+ }
54
+ };
55
+ /**
56
+ * @license
57
+ *
58
+ * Use of this source code is governed by an MIT-style license that can be
59
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
60
+ */
61
+ var WrSidebarGroupHarness = class WrSidebarGroupHarness extends ComponentHarness {
62
+ static hostSelector = "li.wr-sidebar__group";
63
+ static with(options = {}) {
64
+ return new HarnessPredicate(WrSidebarGroupHarness, options).addOption("title", options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title)).addOption("open", options.open, async (harness, open) => await harness.isOpen() === open);
65
+ }
66
+ row = this.locatorFor(WrSidebarItemHarness);
67
+ toggleElement = this.locatorFor("[aria-expanded]");
68
+ body = this.locatorFor(".wr-sidebar__group-wrap");
69
+ async getTitle() {
70
+ return (await this.row()).getTitle();
71
+ }
72
+ async getRow() {
73
+ return this.row();
74
+ }
75
+ async isOpen() {
76
+ return await (await this.toggleElement()).getAttribute("aria-expanded") === "true";
77
+ }
78
+ async isLink() {
79
+ return (await this.toggleElement()).hasClass("wr-sidebar__toggle");
80
+ }
81
+ async getToggleLabel() {
82
+ return (await this.toggleElement()).getAttribute("aria-label");
83
+ }
84
+ async holdsCurrent() {
85
+ return (await (await this.row()).host()).hasClass("wr-sidebar__row--holds-active");
86
+ }
87
+ async isContentHidden() {
88
+ return await (await this.body()).getAttribute("inert") !== null;
89
+ }
90
+ async getItems(filters = {}) {
91
+ return this.locatorForAll(WrSidebarItemHarness.with({
92
+ ...filters,
93
+ ancestor: await this.bodySelector()
94
+ }))();
95
+ }
96
+ async getItemTitles() {
97
+ const items = await this.getItems();
98
+ return Promise.all(items.map((item) => item.getTitle()));
99
+ }
100
+ async toggle() {
101
+ await (await this.toggleElement()).click();
102
+ }
103
+ async open() {
104
+ if (!await this.isOpen()) await this.toggle();
105
+ }
106
+ async close() {
107
+ if (await this.isOpen()) await this.toggle();
108
+ }
109
+ async bodySelector() {
110
+ return `#${await (await this.toggleElement()).getAttribute("aria-controls")}`;
111
+ }
112
+ };
113
+ /**
114
+ * @license
115
+ *
116
+ * Use of this source code is governed by an MIT-style license that can be
117
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
118
+ */
119
+ const REACHABLE = ":not(.wr-sidebar__group-wrap[inert] *)";
120
+ var WrSidebarHarness = class WrSidebarHarness extends ComponentHarness {
121
+ static hostSelector = "wr-sidebar";
122
+ static with(options = {}) {
123
+ return new HarnessPredicate(WrSidebarHarness, options).addOption("label", options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label));
124
+ }
125
+ async getLabel() {
126
+ return (await this.host()).getAttribute("aria-label");
127
+ }
128
+ async getItems(filters = {}) {
129
+ return this.locatorForAll(WrSidebarItemHarness.with({
130
+ ...filters,
131
+ selector: REACHABLE
132
+ }))();
133
+ }
134
+ async getItemTitles() {
135
+ const items = await this.getItems();
136
+ return Promise.all(items.map((item) => item.getTitle()));
137
+ }
138
+ async getItem(title) {
139
+ const [item] = await this.getItems({ title });
140
+ if (!item) throw new Error(`WrSidebarHarness.getItem(): no reachable row matched ${String(title)}. A row inside a closed group is out of reach: open the group first. Reachable now: ${(await this.getItemTitles()).join(", ")}.`);
141
+ return item;
142
+ }
143
+ async getGroups(filters = {}) {
144
+ return this.locatorForAll(WrSidebarGroupHarness.with({
145
+ ...filters,
146
+ selector: REACHABLE
147
+ }))();
148
+ }
149
+ async getGroup(title) {
150
+ const [group] = await this.getGroups({ title });
151
+ if (!group) {
152
+ const titles = await Promise.all((await this.getGroups()).map((each) => each.getTitle()));
153
+ throw new Error(`WrSidebarHarness.getGroup(): no reachable group matched ${String(title)}. Reachable now: ${titles.join(", ")}.`);
154
+ }
155
+ return group;
156
+ }
157
+ async getCurrentTitles() {
158
+ const current = await this.locatorForAll(WrSidebarItemHarness.with({ current: true }))();
159
+ return Promise.all(current.map((item) => item.getTitle()));
160
+ }
161
+ async clickItem(title) {
162
+ await (await this.getItem(title)).click();
163
+ }
164
+ async isGroupOpen(title) {
165
+ return (await this.getGroup(title)).isOpen();
166
+ }
167
+ async openGroup(title) {
168
+ await (await this.getGroup(title)).open();
169
+ }
170
+ async closeGroup(title) {
171
+ await (await this.getGroup(title)).close();
172
+ }
173
+ };
174
+ export { WrSidebarGroupHarness, WrSidebarHarness, WrSidebarItemHarness };
175
+
176
+ //# sourceMappingURL=ngwr-sidebar-testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-sidebar-testing.mjs","names":[],"sources":["../../../projects/lib/sidebar/testing/wr-sidebar-item-harness.ts","../../../projects/lib/sidebar/testing/wr-sidebar-group-harness.ts","../../../projects/lib/sidebar/testing/wr-sidebar-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 } from '@angular/cdk/testing';\n\nimport type { WrSidebarItemHarnessFilters } from './types';\n\n/** The hidden separator a row's name is joined with. It is spoken, and it is not part of any one piece. */\nconst SEPARATOR = '.wr-sidebar__comma';\n\n/**\n * Test harness for one row of a `<wr-sidebar>`: a page link, a disabled page,\n * or the title row of a group.\n *\n * A row's accessible name is its title, badge and count joined by a hidden\n * separator. Each reader here answers one piece without that separator, so\n * `getTitle()` is `'Guides'` and never `'Guides,'`.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarItemHarness extends ComponentHarness {\n static hostSelector = '.wr-sidebar__row';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarItemHarnessFilters = {}): HarnessPredicate<WrSidebarItemHarness> {\n return new HarnessPredicate(WrSidebarItemHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('current', options.current, async (harness, current) => (await harness.isCurrent()) === current)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The row's title, trimmed. */\n async getTitle(): Promise<string> {\n return (await this.locatorFor('.wr-sidebar__title')()).text({ exclude: SEPARATOR });\n }\n\n /** The line under the title, or `null`. */\n async getSubtitle(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__subtitle')())?.text()) ?? null;\n }\n\n /** The word badge (`New`, `Soon`), or `null`. */\n async getBadge(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__badge')())?.text({ exclude: SEPARATOR })) ?? null;\n }\n\n /** The count as drawn at the end of the row (`'12'`, `'99+'`), or `null`. */\n async getCount(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__count')())?.text({ exclude: SEPARATOR })) ?? null;\n }\n\n /** The nesting level, from 1, out of the row's `wr-sidebar__row--level-<n>` modifier. Level 3 and deeper read `3`. */\n async getLevel(): Promise<number> {\n const host = await this.host();\n for (const level of [1, 2, 3]) {\n if (await host.hasClass(`wr-sidebar__row--level-${level}`)) return level;\n }\n throw new Error(`WrSidebarItemHarness.getLevel(): \"${await this.getTitle()}\" carries no level modifier.`);\n }\n\n /** Whether this row is the current page, from `aria-current=\"page\"`. */\n async isCurrent(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-current')) === 'page';\n }\n\n /** Whether the row is a disabled page: plain text, out of the tab order. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--disabled');\n }\n\n /** Whether the row is the title of a group. {@link WrSidebarGroupHarness} opens and closes it. */\n async isGroup(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--group');\n }\n\n /**\n * Click the row: a link navigates, and a group with no page of its own\n * toggles. Throws for a disabled page, which is text and does nothing.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(`WrSidebarItemHarness.click(): \"${await this.getTitle()}\" is disabled, so it is not a link.`);\n }\n await (await this.host()).click();\n }\n\n /** Move keyboard focus to the row. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Whether the row holds focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarGroupHarnessFilters, WrSidebarItemHarnessFilters } from './types';\nimport { WrSidebarItemHarness } from './wr-sidebar-item-harness';\n\n/**\n * Test harness for one group of a `<wr-sidebar>`: a title row, and the rows it\n * opens.\n *\n * A group comes in two shapes and the harness covers both. Without a page of\n * its own the whole title row is the toggle. With one, the title is a link and\n * the arrow beside it is a separate button: {@link isLink} tells them apart,\n * and {@link toggle} presses whichever element carries `aria-expanded`.\n *\n * Open and closed are read from that attribute. The rows of a closed group\n * stay in the DOM, so {@link isContentHidden} is how a spec checks they are out\n * of reach of the keyboard.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarGroupHarness extends ComponentHarness {\n static hostSelector = 'li.wr-sidebar__group';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarGroupHarnessFilters = {}): HarnessPredicate<WrSidebarGroupHarness> {\n return new HarnessPredicate(WrSidebarGroupHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n // Every first match below is this group's own: its title row and its toggle\n // come before its body, and the groups nested in it are inside that body.\n private readonly row = this.locatorFor(WrSidebarItemHarness);\n private readonly toggleElement = this.locatorFor('[aria-expanded]');\n private readonly body = this.locatorFor('.wr-sidebar__group-wrap');\n\n /** The group's title, trimmed. */\n async getTitle(): Promise<string> {\n return (await this.row()).getTitle();\n }\n\n /** The group's title row, for its subtitle, badge, count and current state. */\n async getRow(): Promise<WrSidebarItemHarness> {\n return this.row();\n }\n\n /** Whether the group is open, from its toggle's `aria-expanded`. */\n async isOpen(): Promise<boolean> {\n return (await (await this.toggleElement()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the group is a page as well: its title is a link, and the arrow is a button of its own. */\n async isLink(): Promise<boolean> {\n return (await this.toggleElement()).hasClass('wr-sidebar__toggle');\n }\n\n /** The toggle's own accessible name: only a split group's arrow has one, the rest are named by their row. */\n async getToggleLabel(): Promise<string | null> {\n return (await this.toggleElement()).getAttribute('aria-label');\n }\n\n /**\n * Whether the group is closed around the current page, from the\n * `wr-sidebar__row--holds-active` modifier that draws its dot.\n */\n async holdsCurrent(): Promise<boolean> {\n return (await (await this.row()).host()).hasClass('wr-sidebar__row--holds-active');\n }\n\n /** Whether the group's rows are out of reach of the keyboard, from `inert` on its body. */\n async isContentHidden(): Promise<boolean> {\n return (await (await this.body()).getAttribute('inert')) !== null;\n }\n\n /**\n * The rows under this group, in order, nested groups' rows included.\n * Answered whether the group is open or not: ask {@link isOpen} first when\n * the question is what a user can reach.\n */\n async getItems(filters: WrSidebarItemHarnessFilters = {}): Promise<WrSidebarItemHarness[]> {\n return this.locatorForAll(WrSidebarItemHarness.with({ ...filters, ancestor: await this.bodySelector() }))();\n }\n\n /** The titles of the rows under this group, in order. */\n async getItemTitles(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getTitle()));\n }\n\n /** Press the toggle. */\n async toggle(): Promise<void> {\n await (await this.toggleElement()).click();\n }\n\n /** Open the group. An already-open one is left alone. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) await this.toggle();\n }\n\n /** Close the group. An already-closed one is left alone. */\n async close(): Promise<void> {\n if (await this.isOpen()) await this.toggle();\n }\n\n /** The body's own id, which the toggle's `aria-controls` names. */\n private async bodySelector(): Promise<string> {\n return `#${await (await this.toggleElement()).getAttribute('aria-controls')}`;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarGroupHarnessFilters, WrSidebarHarnessFilters, WrSidebarItemHarnessFilters } from './types';\nimport { WrSidebarGroupHarness } from './wr-sidebar-group-harness';\nimport { WrSidebarItemHarness } from './wr-sidebar-item-harness';\n\n/** Not inside a closed group. A closed group keeps its rows in the DOM, behind `inert`. */\nconst REACHABLE = ':not(.wr-sidebar__group-wrap[inert] *)';\n\n/**\n * Test harness for `<wr-sidebar>`, the navigation drawn from data.\n *\n * The sidebar has no collapsed state of its own: its groups open and close,\n * each through a {@link WrSidebarGroupHarness}. A closed group keeps its rows\n * in the DOM so its height can animate, which means a plain query finds links\n * nobody can reach. {@link getItems} and {@link getGroups} answer with what is\n * reachable, the rows outside every closed group, and `clickItem()` on a row\n * inside one fails and names the rows that are there.\n *\n * The current page is asked for separately, across every row, because a\n * collapsed group can hold it: see {@link getCurrentTitles}.\n *\n * @example\n * ```ts\n * const nav = await loader.getHarness(WrSidebarHarness);\n *\n * await nav.openGroup('Settings');\n * await nav.clickItem('Billing');\n * expect(await nav.getCurrentTitles()).toEqual(['Billing']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarHarness extends ComponentHarness {\n static hostSelector = 'wr-sidebar';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarHarnessFilters = {}): HarnessPredicate<WrSidebarHarness> {\n return new HarnessPredicate(WrSidebarHarness, options).addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabel(), label)\n );\n }\n\n /** The accessible name of the navigation landmark. */\n async getLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** The reachable rows, in order: pages, disabled pages and group titles, outside every closed group. */\n async getItems(filters: WrSidebarItemHarnessFilters = {}): Promise<WrSidebarItemHarness[]> {\n return this.locatorForAll(WrSidebarItemHarness.with({ ...filters, selector: REACHABLE }))();\n }\n\n /** The titles of the reachable rows, in order. */\n async getItemTitles(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getTitle()));\n }\n\n /** The first reachable row with this title, or a failure naming the rows that are reachable. */\n async getItem(title: string | RegExp): Promise<WrSidebarItemHarness> {\n const [item] = await this.getItems({ title });\n if (!item) {\n throw new Error(\n `WrSidebarHarness.getItem(): no reachable row matched ${String(title)}. A row inside a closed group is ` +\n `out of reach: open the group first. Reachable now: ${(await this.getItemTitles()).join(', ')}.`\n );\n }\n return item;\n }\n\n /** The reachable groups, in order. */\n async getGroups(filters: WrSidebarGroupHarnessFilters = {}): Promise<WrSidebarGroupHarness[]> {\n return this.locatorForAll(WrSidebarGroupHarness.with({ ...filters, selector: REACHABLE }))();\n }\n\n /** The first reachable group with this title, or a failure naming the groups that are reachable. */\n async getGroup(title: string | RegExp): Promise<WrSidebarGroupHarness> {\n const [group] = await this.getGroups({ title });\n if (!group) {\n const titles = await Promise.all((await this.getGroups()).map(each => each.getTitle()));\n throw new Error(\n `WrSidebarHarness.getGroup(): no reachable group matched ${String(title)}. Reachable now: ${titles.join(', ')}.`\n );\n }\n return group;\n }\n\n /**\n * The title of every row marked `aria-current=\"page\"`, in order, whether it\n * is reachable or inside a closed group.\n *\n * A list, because the default match is a path prefix: an entry at `['/']`\n * is current on every route unless it asks for an exact match.\n */\n async getCurrentTitles(): Promise<string[]> {\n const current = await this.locatorForAll(WrSidebarItemHarness.with({ current: true }))();\n return Promise.all(current.map(item => item.getTitle()));\n }\n\n /** Click the first reachable row with this title. Throws when it is out of reach, or disabled. */\n async clickItem(title: string | RegExp): Promise<void> {\n await (await this.getItem(title)).click();\n }\n\n /** Whether the first reachable group with this title is open. */\n async isGroupOpen(title: string | RegExp): Promise<boolean> {\n return (await this.getGroup(title)).isOpen();\n }\n\n /** Open the first reachable group with this title. */\n async openGroup(title: string | RegExp): Promise<void> {\n await (await this.getGroup(title)).open();\n }\n\n /** Close the first reachable group with this title. */\n async closeGroup(title: string | RegExp): Promise<void> {\n await (await this.getGroup(title)).close();\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,YAAY;AAYlB,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CACxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,SAAS,QAAQ,QAAQ,SAAS,UAAU,iBAAiB,cAAc,QAAQ,SAAQ,GAAI,KAAK,CAAC,CAAC,CAChH,UAAU,WAAW,QAAQ,SAAS,OAAO,SAAS,YAAa,MAAM,QAAQ,UAAS,MAAQ,OAAO,CAAC,CAC1G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAGA,MAAM,WAAQ;EACZ,QAAQ,MAAM,KAAK,WAAW,oBAAoB,CAAC,CAAA,EAAA,CAAI,KAAK,EAAE,SAAS,UAAS,CAAE;CACpF;CAGA,MAAM,cAAW;EACf,OAAQ,OAAO,MAAM,KAAK,mBAAmB,uBAAuB,CAAC,CAAA,EAAA,EAAK,KAAI,KAAO;CACvF;CAGA,MAAM,WAAQ;EACZ,OAAQ,OAAO,MAAM,KAAK,mBAAmB,oBAAoB,CAAC,CAAA,EAAA,EAAK,KAAK,EAAE,SAAS,UAAS,CAAE,KAAM;CAC1G;CAGA,MAAM,WAAQ;EACZ,OAAQ,OAAO,MAAM,KAAK,mBAAmB,oBAAoB,CAAC,CAAA,EAAA,EAAK,KAAK,EAAE,SAAS,UAAS,CAAE,KAAM;CAC1G;CAGA,MAAM,WAAQ;EACZ,MAAM,O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EAAC,EAAG;EAEpH;EACA,OAAO;CACT;CASA,MAAM,mBAAgB;EACpB,MAAM,UAAU,MAAM,KAAK,cAAc,qBAAqB,KAAK,EAAE,SAAS,KAAI,CAAE,CAAC,CAAC,CAAA;EACtF,OAAO,QAAQ,IAAI,QAAQ,KAAI,SAAQ,KAAK,SAAQ,CAAE,CAAC;CACzD;CAGA,MAAM,UAAU,OAAsB;EACpC,OAAO,MAAM,KAAK,QAAQ,KAAK,EAAA,CAAG,MAAK;CACzC;CAGA,MAAM,YAAY,OAAsB;EACtC,QAAQ,MAAM,KAAK,SAAS,KAAK,EAAA,CAAG,OAAM;CAC5C;CAGA,MAAM,UAAU,OAAsB;EACpC,OAAO,MAAM,KAAK,SAAS,KAAK,EAAA,CAAG,KAAI;CACzC;CAGA,MAAM,WAAW,OAAsB;EACrC,OAAO,MAAM,KAAK,SAAS,KAAK,EAAA,CAAG,MAAK;CAC1C"}
@@ -264,7 +264,7 @@ var WrSidebar = class WrSidebar {
264
264
  }
265
265
  static ɵfac = i0.ɵɵngDeclareFactory({
266
266
  minVersion: "12.0.0",
267
- version: "22.2.5",
267
+ version: "22.2.6",
268
268
  ngImport: i0,
269
269
  type: WrSidebar,
270
270
  deps: [],
@@ -272,7 +272,7 @@ var WrSidebar = class WrSidebar {
272
272
  });
273
273
  static ɵcmp = i0.ɵɵngDeclareComponent({
274
274
  minVersion: "17.0.0",
275
- version: "22.2.5",
275
+ version: "22.2.6",
276
276
  type: WrSidebar,
277
277
  isStandalone: true,
278
278
  selector: "wr-sidebar",
@@ -369,7 +369,7 @@ var WrSidebar = class WrSidebar {
369
369
  };
370
370
  i0.ɵɵngDeclareClassMetadata({
371
371
  minVersion: "12.0.0",
372
- version: "22.2.5",
372
+ version: "22.2.6",
373
373
  ngImport: i0,
374
374
  type: WrSidebar,
375
375
  decorators: [{
@@ -32,7 +32,7 @@ var WrSkeleton = class WrSkeleton {
32
32
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
33
33
  static ɵfac = i0.ɵɵngDeclareFactory({
34
34
  minVersion: "12.0.0",
35
- version: "22.2.5",
35
+ version: "22.2.6",
36
36
  ngImport: i0,
37
37
  type: WrSkeleton,
38
38
  deps: [],
@@ -40,7 +40,7 @@ var WrSkeleton = class WrSkeleton {
40
40
  });
41
41
  static ɵcmp = i0.ɵɵngDeclareComponent({
42
42
  minVersion: "17.0.0",
43
- version: "22.2.5",
43
+ version: "22.2.6",
44
44
  type: WrSkeleton,
45
45
  isStandalone: true,
46
46
  selector: "wr-skeleton",
@@ -82,7 +82,7 @@ var WrSkeleton = class WrSkeleton {
82
82
  };
83
83
  i0.ɵɵngDeclareClassMetadata({
84
84
  minVersion: "12.0.0",
85
- version: "22.2.5",
85
+ version: "22.2.6",
86
86
  ngImport: i0,
87
87
  type: WrSkeleton,
88
88
  decorators: [{
@@ -123,6 +123,12 @@ var WrSliderHarness = class WrSliderHarness extends ComponentHarness {
123
123
  async isRange() {
124
124
  return (await this.host()).hasClass("wr-slider--range");
125
125
  }
126
+ async getSize() {
127
+ const host = await this.host();
128
+ if (await host.hasClass("wr-slider--sm")) return "sm";
129
+ if (await host.hasClass("wr-slider--lg")) return "lg";
130
+ return "md";
131
+ }
126
132
  async isDisabled() {
127
133
  return (await this.getLowThumb()).isDisabled();
128
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-slider-testing.mjs","names":[],"sources":["../../../projects/lib/slider/testing/wr-slider-thumb-harness.ts","../../../projects/lib/slider/testing/wr-slider-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 } from '@angular/cdk/testing';\n\nimport type { WrSliderThumbHarnessFilters, WrSliderThumbPosition } from './types';\n\n/** How many key presses {@link WrSliderThumbHarness.setValue} spends before it gives up. */\nconst MAX_PRESSES = 1000;\n\n/**\n * Test harness for one thumb of a `<wr-slider>`.\n *\n * A single-thumb slider has exactly one; a `range` one has two, and each thumb\n * is the other's limit — the lower thumb's `aria-valuemax` is wherever the upper\n * thumb is standing, and vice versa. So {@link getMin} / {@link getMax} answer\n * the room THIS thumb has, not the slider's bounds, which is exactly what a\n * screen reader announces and exactly the window {@link setValue} can reach.\n *\n * Every write here is a KEY PRESS, because a drag is not something a unit test\n * can perform — see {@link setValue}.\n *\n * Every press is on the BLOCK axis — `ArrowUp` / `ArrowDown`, `PageUp` /\n * `PageDown`, `Home` / `End` — so the harness means the same thing in both\n * reading directions. That is not a detail: the component's ← / → follow the\n * VISUAL track, so under `dir=\"rtl\"` a right-arrow LOWERS the value, and a\n * harness that pressed it would have `stepUp()` stepping down while every LTR\n * spec stayed green. It cannot detect the direction to compensate either —\n * `Directionality` is injected, not published to the DOM — so it stays on the\n * axis `dir` does not govern.\n *\n * @example\n * ```ts\n * const upper = await slider.getHighThumb();\n *\n * await upper.setValue(90);\n * expect(await upper.getValue()).toBe(90);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSliderThumbHarness extends ComponentHarness {\n /**\n * The thumb is a real `<button role=\"slider\">`, so it is focusable without a\n * `tabindex` and leaves the tab order by itself when disabled. Anchored on the\n * BEM class rather than on `[role=\"slider\"]`: the class also carries the\n * `--low` / `--high` modifier this harness reads.\n */\n static hostSelector = '.wr-slider__thumb';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSliderThumbHarnessFilters = {}): HarnessPredicate<WrSliderThumbHarness> {\n return new HarnessPredicate(WrSliderThumbHarness, options)\n .addOption('position', options.position, async (harness, position) => (await harness.getPosition()) === position)\n .addOption('value', options.value, async (harness, value) => (await harness.getValue()) === value)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label));\n }\n\n /** Which end this thumb is. A single-thumb slider's thumb is the `'low'` one. */\n async getPosition(): Promise<WrSliderThumbPosition> {\n return (await (await this.host()).hasClass('wr-slider__thumb--high')) ? 'high' : 'low';\n }\n\n /** Where the thumb is standing, from `aria-valuenow` — the number a screen reader reads out. */\n async getValue(): Promise<number> {\n return this.numeric('aria-valuenow');\n }\n\n /**\n * The lowest value THIS thumb can reach (`aria-valuemin`).\n *\n * On a range slider's upper thumb that is the lower thumb, not the slider's\n * `min` — the two cannot cross, so the neighbour is the real floor.\n */\n async getMin(): Promise<number> {\n return this.numeric('aria-valuemin');\n }\n\n /**\n * The highest value THIS thumb can reach (`aria-valuemax`).\n *\n * On a range slider's lower thumb that is the upper thumb, not the slider's\n * `max`.\n */\n async getMax(): Promise<number> {\n return this.numeric('aria-valuemax');\n }\n\n /** The thumb's accessible name — `'Value'`, or `'Lower value'` / `'Upper value'` in range mode. */\n async getLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** What a screen reader is told this control is. The role is why the arrows mean anything here. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether the thumb refuses the keyboard. Read from the button's native `disabled`. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * One step up (`ArrowUp`). A disabled thumb does not move.\n *\n * `ArrowRight` is the same key press in an LTR slider and the OPPOSITE one in\n * an RTL slider, so the vertical arrow is the one that means \"up\" everywhere.\n */\n async stepUp(): Promise<void> {\n return this.press(TestKey.UP_ARROW);\n }\n\n /** One step down (`ArrowDown`; `ArrowLeft` only agrees in LTR — see {@link stepUp}). */\n async stepDown(): Promise<void> {\n return this.press(TestKey.DOWN_ARROW);\n }\n\n /** Ten steps up (`PageUp`; `Shift`+arrow is the same stride). */\n async largeStepUp(): Promise<void> {\n return this.press(TestKey.PAGE_UP);\n }\n\n /** Ten steps down (`PageDown`; `Shift`+arrow is the same stride). */\n async largeStepDown(): Promise<void> {\n return this.press(TestKey.PAGE_DOWN);\n }\n\n /**\n * `Home` — jump to the lowest value this thumb can reach.\n *\n * On a range slider's UPPER thumb that lands on the lower thumb, not on the\n * slider's `min`: the component asks for `min` and then refuses to let the\n * ends cross, so the range collapses instead of inverting.\n */\n async toMin(): Promise<void> {\n return this.press(TestKey.HOME);\n }\n\n /**\n * `End` — jump to the highest value this thumb can reach.\n *\n * On a range slider's LOWER thumb that lands on the upper thumb, not on the\n * slider's `max`, for the same reason as {@link toMin}.\n */\n async toMax(): Promise<void> {\n return this.press(TestKey.END);\n }\n\n /**\n * Walk the thumb to `value` FROM THE KEYBOARD — `PageUp` / `PageDown` for the\n * distance, arrows for the last stretch, `Home` / `End` for the bounds. That\n * is the accessible path, and the only one a unit test can trust.\n *\n * There is deliberately no drag. jsdom has no layout: the track measures 0×0\n * and `getBoundingClientRect()` answers all zeros, while the component turns a\n * pointer into a value by dividing the offset by the track width. Every\n * positive offset therefore divides by zero, clamps to a ratio of 1 and writes\n * the slider's MAX — quietly, with no error to notice. A coordinate cannot\n * mean anything here.\n *\n * It costs one press per stride, so the walk is not free: crossing most of a\n * 0–100 range costs ~19 presses at `step=\"1\"` and ~109 at `step=\"0.1\"`.\n * Landing exactly on a bound is one press, whatever the step. The walk gives\n * up after 1000 presses — a 0–100 range reaches that at `step=\"0.01\"` or finer\n * — and throws rather than spin.\n *\n * A bound the step grid misses is announced but not reachable: `aria-valuemax`\n * is the `max` input, while the component snaps every key press onto whole\n * steps from `min`, so `max=\"100\" step=\"3\"` stops at 99. That is the off-grid\n * throw, arriving for `setValue(100)`.\n *\n * Either the thumb ends up exactly on `value` or this throws: when `value` is\n * outside the thumb's window (the other thumb is one end of it in range mode),\n * when the thumb is disabled, and when `value` is not on the step grid — on\n * the last one the thumb is left at the nearest value it could reach.\n */\n async setValue(value: number): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error('WrSliderThumbHarness.setValue(): the slider is disabled, so the keyboard cannot move it.');\n }\n\n const [min, max] = [await this.getMin(), await this.getMax()];\n if (value < min || value > max) {\n throw new Error(\n `WrSliderThumbHarness.setValue(): ${value} is outside the [${min}, ${max}] window this thumb can ` +\n 'reach. On a range slider the other thumb is one end of that window — move it first.'\n );\n }\n\n let current = await this.getValue();\n if (current === value) return;\n // The bounds are one key press, and on a range thumb `Home` / `End` stop at\n // the neighbour — which is precisely this window's end. The landing is still\n // checked: a `max` that is not a whole number of steps from `min` is\n // announced by `aria-valuemax` and refused by the component's snapping.\n if (value === min || value === max) {\n await (value === min ? this.toMin() : this.toMax());\n return this.assertSettled(await this.getValue(), value, min);\n }\n\n let presses = 0;\n // Start on the ten-step stride: neither stride is published to the DOM, so\n // the only way to learn one is to take it and look. One overshoot is pressed\n // back off and the rest of the walk goes a single step at a time.\n let striding = true;\n\n while (current !== value) {\n if (presses >= MAX_PRESSES) {\n throw new Error(\n `WrSliderThumbHarness.setValue(): gave up walking to ${value} after ${MAX_PRESSES} key presses ` +\n `(reached ${current}). A step this fine is not something a keyboard reaches — write the ` +\n 'slider through its `[(value)]` model instead.'\n );\n }\n\n // Re-derived every pass so the walk follows wherever the thumb actually\n // landed rather than where a stride aimed. It never has to reverse: the\n // window check above keeps the target inside [min, max], so pressing back\n // off an overshoot lands at or short of where the stride began — on the\n // same side of the target it started on.\n const direction: 1 | -1 = value > current ? 1 : -1;\n await this.press(this.strideKey(direction, striding));\n presses++;\n\n const next = await this.getValue();\n // Nothing moved: the thumb is pinned against a bound or its neighbour, and\n // pressing again would only spin. The final check below reports where.\n if (next === current) break;\n\n const overshot = direction === 1 ? next > value : next < value;\n current = next;\n if (!overshot) continue;\n\n await this.press(this.strideKey(direction === 1 ? -1 : 1, striding));\n presses++;\n current = await this.getValue();\n\n // Single steps straddling the target means it is not on the step grid.\n if (!striding) break;\n striding = false;\n }\n\n this.assertSettled(current, value, min);\n }\n\n /**\n * The landing check every path through {@link setValue} ends on: exactly the\n * value asked for, or an error naming where the thumb stopped instead.\n */\n private assertSettled(current: number, value: number, min: number): void {\n if (current === value) return;\n throw new Error(\n `WrSliderThumbHarness.setValue(): the keyboard settled on ${current} instead of ${value}. The thumb ` +\n `moves in whole steps from ${min}, so only values on that grid are reachable.`\n );\n }\n\n /** The key that moves the thumb one stride in `direction`. */\n private strideKey(direction: 1 | -1, striding: boolean): TestKey {\n if (striding) return direction === 1 ? TestKey.PAGE_UP : TestKey.PAGE_DOWN;\n // The vertical arrows, for the reason {@link stepUp} gives: the horizontal\n // pair swaps meaning under `dir=\"rtl\"`, which would send the fine stretch of\n // the walk away from its target.\n return direction === 1 ? TestKey.UP_ARROW : TestKey.DOWN_ARROW;\n }\n\n /**\n * Press a key on the thumb.\n *\n * `sendKeys` focuses the element first, so this is the whole gesture a user\n * makes — the component listens for `keydown` on the thumb itself.\n */\n private async press(key: TestKey): Promise<void> {\n return (await this.host()).sendKeys(key);\n }\n\n /**\n * One of the ARIA range attributes as a number.\n *\n * Throws instead of handing back `NaN`: a slider whose `aria-valuenow` is not\n * a number is broken in a way every later assertion would describe badly.\n */\n private async numeric(attribute: string): Promise<number> {\n const raw = await (await this.host()).getAttribute(attribute);\n const value = raw === null ? Number.NaN : Number.parseFloat(raw);\n\n if (Number.isNaN(value)) {\n throw new Error(`WrSliderThumbHarness: the thumb's ${attribute} is ${JSON.stringify(raw)}, not a number.`);\n }\n return value;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSliderMark, WrSliderValue } from 'ngwr/slider';\n\nimport type { WrSliderHarnessFilters, WrSliderThumbHarnessFilters } from './types';\nimport { WrSliderThumbHarness } from './wr-slider-thumb-harness';\n\n/** Element-wise comparison for the `value` filter — a tuple never matches a plain number. */\nfunction sameValue(actual: WrSliderValue, expected: WrSliderValue): boolean {\n if (typeof actual === 'number') return actual === expected;\n if (typeof expected === 'number') return false;\n return actual[0] === expected[0] && actual[1] === expected[1];\n}\n\n/**\n * Test harness for `<wr-slider>` — single-thumb and `range`.\n *\n * Every NUMBER it reads comes off the thumbs' ARIA range trio (`aria-valuenow`,\n * `aria-valuemin`, `aria-valuemax`), which is what a screen reader is told and\n * the only place the slider publishes its value. The mode comes off the host's\n * `wr-slider--range` class and {@link getLabelText} off the rendered text.\n *\n * Everything it WRITES is a key press. A slider is a pointer control, but a\n * pointer control cannot be driven by coordinates in jsdom — there is no layout,\n * so the track measures 0×0 and the component divides every offset by that\n * width: a positive one writes the slider's MAX and `clientX: 0` writes `NaN`,\n * neither of them the value asked for. The keyboard is both the accessible path\n * and the only honest one here; {@link WrSliderThumbHarness.setValue} spells out\n * what the walk costs, and {@link WrSliderThumbHarness} why every one of those\n * presses is on the block axis, which `dir` does not turn around.\n *\n * The `step` is deliberately not readable: the component publishes it nowhere in\n * the DOM (ARIA has no attribute for it), so a spec that needs the number should\n * measure it — `stepUp()` moves by exactly one step.\n *\n * @example\n * ```ts\n * const volume = await loader.getHarness(WrSliderHarness);\n *\n * await volume.setValue(70);\n * expect(await volume.getValue()).toBe(70);\n *\n * const span = await loader.getHarness(WrSliderHarness.with({ range: true }));\n * await span.setRange(30, 60);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSliderHarness extends ComponentHarness {\n static hostSelector = 'wr-slider';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSliderHarnessFilters = {}): HarnessPredicate<WrSliderHarness> {\n return new HarnessPredicate(WrSliderHarness, options)\n .addOption('value', options.value, async (harness, value) => sameValue(await harness.getValue(), value))\n .addOption('range', options.range, async (harness, range) => (await harness.isRange()) === range)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('labelText', options.labelText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), text)\n );\n }\n\n /** Whether the slider has two thumbs and answers with a `[low, high]` tuple. */\n async isRange(): Promise<boolean> {\n return (await this.host()).hasClass('wr-slider--range');\n }\n\n /**\n * Whether the slider refuses interaction.\n *\n * Read from the thumb's native `disabled` rather than from the\n * `wr-slider--disabled` class: the class is paint, while `disabled` on the\n * button is what takes the thumb out of the tab order and what assistive tech\n * reports.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.getLowThumb()).isDisabled();\n }\n\n /** The axis of the track, from the thumb's `aria-orientation`, which is what a screen reader is told. */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n const orientation = await (await (await this.getLowThumb()).host()).getAttribute('aria-orientation');\n return orientation === 'vertical' ? 'vertical' : 'horizontal';\n }\n\n /**\n * The current value, in the shape the model uses: a plain number for one\n * thumb, `[low, high]` for two.\n */\n async getValue(): Promise<WrSliderValue> {\n const values = await Promise.all((await this.getThumbs()).map(thumb => thumb.getValue()));\n return values.length > 1 ? ([values[0], values[1]] as const) : values[0];\n }\n\n /** The slider's lower bound. */\n async getMin(): Promise<number> {\n return (await this.getThumbs())[0].getMin();\n }\n\n /**\n * The slider's upper bound.\n *\n * Taken from the LAST thumb, because in range mode the thumbs bound each\n * other: the lower one's `aria-valuemax` is wherever the upper one is\n * standing, so only the upper thumb knows the real ceiling.\n */\n async getMax(): Promise<number> {\n const thumbs = await this.getThumbs();\n return thumbs[thumbs.length - 1].getMax();\n }\n\n /**\n * The text the slider prints under the track, or `null` when `showValue` is\n * off.\n *\n * A range slider joins its ends with an EN DASH — `'20 – 80'`, U+2013 — so an\n * assertion typed with a hyphen will not match.\n */\n async getLabelText(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-slider__label')();\n return label ? label.text() : null;\n }\n\n /**\n * The marks drawn on the track, in value order, each with its label when it\n * has one. Marks outside `[min, max]` are not drawn, so they are not here.\n */\n async getMarks(): Promise<WrSliderMark[]> {\n const labels = new Map<string | null, string>();\n for (const label of await this.locatorForAll('.wr-slider__mark-label')()) {\n labels.set(await label.getAttribute('data-value'), await label.text());\n }\n\n const marks: WrSliderMark[] = [];\n for (const tick of await this.locatorForAll('.wr-slider__mark')()) {\n const raw = await tick.getAttribute('data-value');\n const label = labels.get(raw);\n marks.push(label === undefined ? { value: Number(raw) } : { value: Number(raw), label });\n }\n return marks;\n }\n\n /** The slider's thumbs in DOM order: the lower one first. */\n async getThumbs(filters: WrSliderThumbHarnessFilters = {}): Promise<WrSliderThumbHarness[]> {\n return this.locatorForAll(WrSliderThumbHarness.with(filters))();\n }\n\n /** The only thumb of a single-thumb slider, or the lower one of a range slider. */\n async getLowThumb(): Promise<WrSliderThumbHarness> {\n return this.locatorFor(WrSliderThumbHarness.with({ position: 'low' }))();\n }\n\n /** The upper thumb. Throws on a single-thumb slider, which has no such part. */\n async getHighThumb(): Promise<WrSliderThumbHarness> {\n const thumb = await this.locatorForOptional(WrSliderThumbHarness.with({ position: 'high' }))();\n if (!thumb) {\n throw new Error('WrSliderHarness.getHighThumb(): this slider has one thumb — only a `range` slider has two.');\n }\n return thumb;\n }\n\n /**\n * Walk the slider to `value` from the keyboard.\n *\n * Single-thumb only — {@link setRange} moves both ends. See\n * {@link WrSliderThumbHarness.setValue} for what the walk costs and when it\n * throws.\n */\n async setValue(value: number): Promise<void> {\n return (await this.single('setValue')).setValue(value);\n }\n\n /**\n * Walk both ends of a range slider to `[low, high]`.\n *\n * The far end moves FIRST. The thumbs bound each other, so writing `[90, 95]`\n * over `[20, 80]` lower-end-first would be refused outright — 90 is outside\n * the `[0, 80]` window the upper thumb leaves the lower one.\n */\n async setRange(low: number, high: number): Promise<void> {\n if (!(await this.isRange())) {\n throw new Error('WrSliderHarness.setRange(): this slider has one thumb — add `range` to it, or call setValue().');\n }\n if (low > high) {\n throw new Error(`WrSliderHarness.setRange(): ${low} is above ${high}, and the thumbs cannot cross.`);\n }\n\n const lowThumb = await this.getLowThumb();\n const highThumb = await this.getHighThumb();\n\n if (high >= (await highThumb.getValue())) {\n await highThumb.setValue(high);\n await lowThumb.setValue(low);\n return;\n }\n\n await lowThumb.setValue(low);\n await highThumb.setValue(high);\n }\n\n /** One step up (`ArrowUp`). Single-thumb only. A disabled slider does not move. */\n async stepUp(): Promise<void> {\n return (await this.single('stepUp')).stepUp();\n }\n\n /** One step down (`ArrowDown`). Single-thumb only. A disabled slider does not move. */\n async stepDown(): Promise<void> {\n return (await this.single('stepDown')).stepDown();\n }\n\n /** `Home` — jump to the slider's `min`. Single-thumb only. */\n async toMin(): Promise<void> {\n return (await this.single('toMin')).toMin();\n }\n\n /** `End` — jump to the slider's `max`. Single-thumb only. */\n async toMax(): Promise<void> {\n return (await this.single('toMax')).toMax();\n }\n\n /**\n * Move keyboard focus to the slider's first thumb. A range slider's thumbs are\n * two separate tab stops (both are plain buttons — there is no roving\n * `tabindex`), so reach the other one through {@link getHighThumb}.\n */\n async focus(): Promise<void> {\n return (await this.getLowThumb()).focus();\n }\n\n /** Whether any of the slider's thumbs holds focus. */\n async isFocused(): Promise<boolean> {\n const focused = await Promise.all((await this.getThumbs()).map(thumb => thumb.isFocused()));\n return focused.includes(true);\n }\n\n /**\n * The one thumb a single-thumb convenience call means.\n *\n * Range mode gets an error rather than a guess: \"step this slider up\" has two\n * possible answers there, and picking one silently is how a spec ends up\n * asserting against the end it did not move.\n */\n private async single(caller: string): Promise<WrSliderThumbHarness> {\n if (await this.isRange()) {\n throw new Error(\n `WrSliderHarness.${caller}(): this slider has two thumbs — use setRange(), or reach for one end ` +\n 'with getLowThumb() / getHighThumb().'\n );\n }\n return this.getLowThumb();\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,cAAc;AAiCpB,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CAOxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,YAAW,MAAQ,QAAQ,CAAC,CAChH,UAAU,SAAS,QAAQ,OAAO,OAAO,SAAS,UAAW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EAAA,CAAI,MAAK;CACzC;CAGA,MAAM,YAAS;EAEb,QAAO,MADe,QAAQ,KAAK,MAAM,KAAK,UAAS,EAAA,CAAI,KAAI,UAAS,MAAM,UAAS,CAAE,CAAC,EACnF,CAAQ,SAAS,IAAI;CAC9B;CASQ,MAAM,OAAO,QAAc;EACjC,IAAI,MAAM,KAAK,QAAO,GACpB,MAAM,IAAI,MACR,mBAAmB,OAAM,2GACe;EAG5C,OAAO,KAAK,YAAW;CACzB"}
1
+ {"version":3,"file":"ngwr-slider-testing.mjs","names":[],"sources":["../../../projects/lib/slider/testing/wr-slider-thumb-harness.ts","../../../projects/lib/slider/testing/wr-slider-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 } from '@angular/cdk/testing';\n\nimport type { WrSliderThumbHarnessFilters, WrSliderThumbPosition } from './types';\n\n/** How many key presses {@link WrSliderThumbHarness.setValue} spends before it gives up. */\nconst MAX_PRESSES = 1000;\n\n/**\n * Test harness for one thumb of a `<wr-slider>`.\n *\n * A single-thumb slider has exactly one; a `range` one has two, and each thumb\n * is the other's limit — the lower thumb's `aria-valuemax` is wherever the upper\n * thumb is standing, and vice versa. So {@link getMin} / {@link getMax} answer\n * the room THIS thumb has, not the slider's bounds, which is exactly what a\n * screen reader announces and exactly the window {@link setValue} can reach.\n *\n * Every write here is a KEY PRESS, because a drag is not something a unit test\n * can perform — see {@link setValue}.\n *\n * Every press is on the BLOCK axis — `ArrowUp` / `ArrowDown`, `PageUp` /\n * `PageDown`, `Home` / `End` — so the harness means the same thing in both\n * reading directions. That is not a detail: the component's ← / → follow the\n * VISUAL track, so under `dir=\"rtl\"` a right-arrow LOWERS the value, and a\n * harness that pressed it would have `stepUp()` stepping down while every LTR\n * spec stayed green. It cannot detect the direction to compensate either —\n * `Directionality` is injected, not published to the DOM — so it stays on the\n * axis `dir` does not govern.\n *\n * @example\n * ```ts\n * const upper = await slider.getHighThumb();\n *\n * await upper.setValue(90);\n * expect(await upper.getValue()).toBe(90);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSliderThumbHarness extends ComponentHarness {\n /**\n * The thumb is a real `<button role=\"slider\">`, so it is focusable without a\n * `tabindex` and leaves the tab order by itself when disabled. Anchored on the\n * BEM class rather than on `[role=\"slider\"]`: the class also carries the\n * `--low` / `--high` modifier this harness reads.\n */\n static hostSelector = '.wr-slider__thumb';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSliderThumbHarnessFilters = {}): HarnessPredicate<WrSliderThumbHarness> {\n return new HarnessPredicate(WrSliderThumbHarness, options)\n .addOption('position', options.position, async (harness, position) => (await harness.getPosition()) === position)\n .addOption('value', options.value, async (harness, value) => (await harness.getValue()) === value)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label));\n }\n\n /** Which end this thumb is. A single-thumb slider's thumb is the `'low'` one. */\n async getPosition(): Promise<WrSliderThumbPosition> {\n return (await (await this.host()).hasClass('wr-slider__thumb--high')) ? 'high' : 'low';\n }\n\n /** Where the thumb is standing, from `aria-valuenow` — the number a screen reader reads out. */\n async getValue(): Promise<number> {\n return this.numeric('aria-valuenow');\n }\n\n /**\n * The lowest value THIS thumb can reach (`aria-valuemin`).\n *\n * On a range slider's upper thumb that is the lower thumb, not the slider's\n * `min` — the two cannot cross, so the neighbour is the real floor.\n */\n async getMin(): Promise<number> {\n return this.numeric('aria-valuemin');\n }\n\n /**\n * The highest value THIS thumb can reach (`aria-valuemax`).\n *\n * On a range slider's lower thumb that is the upper thumb, not the slider's\n * `max`.\n */\n async getMax(): Promise<number> {\n return this.numeric('aria-valuemax');\n }\n\n /** The thumb's accessible name — `'Value'`, or `'Lower value'` / `'Upper value'` in range mode. */\n async getLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** What a screen reader is told this control is. The role is why the arrows mean anything here. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether the thumb refuses the keyboard. Read from the button's native `disabled`. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * One step up (`ArrowUp`). A disabled thumb does not move.\n *\n * `ArrowRight` is the same key press in an LTR slider and the OPPOSITE one in\n * an RTL slider, so the vertical arrow is the one that means \"up\" everywhere.\n */\n async stepUp(): Promise<void> {\n return this.press(TestKey.UP_ARROW);\n }\n\n /** One step down (`ArrowDown`; `ArrowLeft` only agrees in LTR — see {@link stepUp}). */\n async stepDown(): Promise<void> {\n return this.press(TestKey.DOWN_ARROW);\n }\n\n /** Ten steps up (`PageUp`; `Shift`+arrow is the same stride). */\n async largeStepUp(): Promise<void> {\n return this.press(TestKey.PAGE_UP);\n }\n\n /** Ten steps down (`PageDown`; `Shift`+arrow is the same stride). */\n async largeStepDown(): Promise<void> {\n return this.press(TestKey.PAGE_DOWN);\n }\n\n /**\n * `Home` — jump to the lowest value this thumb can reach.\n *\n * On a range slider's UPPER thumb that lands on the lower thumb, not on the\n * slider's `min`: the component asks for `min` and then refuses to let the\n * ends cross, so the range collapses instead of inverting.\n */\n async toMin(): Promise<void> {\n return this.press(TestKey.HOME);\n }\n\n /**\n * `End` — jump to the highest value this thumb can reach.\n *\n * On a range slider's LOWER thumb that lands on the upper thumb, not on the\n * slider's `max`, for the same reason as {@link toMin}.\n */\n async toMax(): Promise<void> {\n return this.press(TestKey.END);\n }\n\n /**\n * Walk the thumb to `value` FROM THE KEYBOARD — `PageUp` / `PageDown` for the\n * distance, arrows for the last stretch, `Home` / `End` for the bounds. That\n * is the accessible path, and the only one a unit test can trust.\n *\n * There is deliberately no drag. jsdom has no layout: the track measures 0×0\n * and `getBoundingClientRect()` answers all zeros, while the component turns a\n * pointer into a value by dividing the offset by the track width. Every\n * positive offset therefore divides by zero, clamps to a ratio of 1 and writes\n * the slider's MAX — quietly, with no error to notice. A coordinate cannot\n * mean anything here.\n *\n * It costs one press per stride, so the walk is not free: crossing most of a\n * 0–100 range costs ~19 presses at `step=\"1\"` and ~109 at `step=\"0.1\"`.\n * Landing exactly on a bound is one press, whatever the step. The walk gives\n * up after 1000 presses — a 0–100 range reaches that at `step=\"0.01\"` or finer\n * — and throws rather than spin.\n *\n * A bound the step grid misses is announced but not reachable: `aria-valuemax`\n * is the `max` input, while the component snaps every key press onto whole\n * steps from `min`, so `max=\"100\" step=\"3\"` stops at 99. That is the off-grid\n * throw, arriving for `setValue(100)`.\n *\n * Either the thumb ends up exactly on `value` or this throws: when `value` is\n * outside the thumb's window (the other thumb is one end of it in range mode),\n * when the thumb is disabled, and when `value` is not on the step grid — on\n * the last one the thumb is left at the nearest value it could reach.\n */\n async setValue(value: number): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error('WrSliderThumbHarness.setValue(): the slider is disabled, so the keyboard cannot move it.');\n }\n\n const [min, max] = [await this.getMin(), await this.getMax()];\n if (value < min || value > max) {\n throw new Error(\n `WrSliderThumbHarness.setValue(): ${value} is outside the [${min}, ${max}] window this thumb can ` +\n 'reach. On a range slider the other thumb is one end of that window — move it first.'\n );\n }\n\n let current = await this.getValue();\n if (current === value) return;\n // The bounds are one key press, and on a range thumb `Home` / `End` stop at\n // the neighbour — which is precisely this window's end. The landing is still\n // checked: a `max` that is not a whole number of steps from `min` is\n // announced by `aria-valuemax` and refused by the component's snapping.\n if (value === min || value === max) {\n await (value === min ? this.toMin() : this.toMax());\n return this.assertSettled(await this.getValue(), value, min);\n }\n\n let presses = 0;\n // Start on the ten-step stride: neither stride is published to the DOM, so\n // the only way to learn one is to take it and look. One overshoot is pressed\n // back off and the rest of the walk goes a single step at a time.\n let striding = true;\n\n while (current !== value) {\n if (presses >= MAX_PRESSES) {\n throw new Error(\n `WrSliderThumbHarness.setValue(): gave up walking to ${value} after ${MAX_PRESSES} key presses ` +\n `(reached ${current}). A step this fine is not something a keyboard reaches — write the ` +\n 'slider through its `[(value)]` model instead.'\n );\n }\n\n // Re-derived every pass so the walk follows wherever the thumb actually\n // landed rather than where a stride aimed. It never has to reverse: the\n // window check above keeps the target inside [min, max], so pressing back\n // off an overshoot lands at or short of where the stride began — on the\n // same side of the target it started on.\n const direction: 1 | -1 = value > current ? 1 : -1;\n await this.press(this.strideKey(direction, striding));\n presses++;\n\n const next = await this.getValue();\n // Nothing moved: the thumb is pinned against a bound or its neighbour, and\n // pressing again would only spin. The final check below reports where.\n if (next === current) break;\n\n const overshot = direction === 1 ? next > value : next < value;\n current = next;\n if (!overshot) continue;\n\n await this.press(this.strideKey(direction === 1 ? -1 : 1, striding));\n presses++;\n current = await this.getValue();\n\n // Single steps straddling the target means it is not on the step grid.\n if (!striding) break;\n striding = false;\n }\n\n this.assertSettled(current, value, min);\n }\n\n /**\n * The landing check every path through {@link setValue} ends on: exactly the\n * value asked for, or an error naming where the thumb stopped instead.\n */\n private assertSettled(current: number, value: number, min: number): void {\n if (current === value) return;\n throw new Error(\n `WrSliderThumbHarness.setValue(): the keyboard settled on ${current} instead of ${value}. The thumb ` +\n `moves in whole steps from ${min}, so only values on that grid are reachable.`\n );\n }\n\n /** The key that moves the thumb one stride in `direction`. */\n private strideKey(direction: 1 | -1, striding: boolean): TestKey {\n if (striding) return direction === 1 ? TestKey.PAGE_UP : TestKey.PAGE_DOWN;\n // The vertical arrows, for the reason {@link stepUp} gives: the horizontal\n // pair swaps meaning under `dir=\"rtl\"`, which would send the fine stretch of\n // the walk away from its target.\n return direction === 1 ? TestKey.UP_ARROW : TestKey.DOWN_ARROW;\n }\n\n /**\n * Press a key on the thumb.\n *\n * `sendKeys` focuses the element first, so this is the whole gesture a user\n * makes — the component listens for `keydown` on the thumb itself.\n */\n private async press(key: TestKey): Promise<void> {\n return (await this.host()).sendKeys(key);\n }\n\n /**\n * One of the ARIA range attributes as a number.\n *\n * Throws instead of handing back `NaN`: a slider whose `aria-valuenow` is not\n * a number is broken in a way every later assertion would describe badly.\n */\n private async numeric(attribute: string): Promise<number> {\n const raw = await (await this.host()).getAttribute(attribute);\n const value = raw === null ? Number.NaN : Number.parseFloat(raw);\n\n if (Number.isNaN(value)) {\n throw new Error(`WrSliderThumbHarness: the thumb's ${attribute} is ${JSON.stringify(raw)}, not a number.`);\n }\n return value;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSliderMark, WrSliderSize, WrSliderValue } from 'ngwr/slider';\n\nimport type { WrSliderHarnessFilters, WrSliderThumbHarnessFilters } from './types';\nimport { WrSliderThumbHarness } from './wr-slider-thumb-harness';\n\n/** Element-wise comparison for the `value` filter — a tuple never matches a plain number. */\nfunction sameValue(actual: WrSliderValue, expected: WrSliderValue): boolean {\n if (typeof actual === 'number') return actual === expected;\n if (typeof expected === 'number') return false;\n return actual[0] === expected[0] && actual[1] === expected[1];\n}\n\n/**\n * Test harness for `<wr-slider>` — single-thumb and `range`.\n *\n * Every NUMBER it reads comes off the thumbs' ARIA range trio (`aria-valuenow`,\n * `aria-valuemin`, `aria-valuemax`), which is what a screen reader is told and\n * the only place the slider publishes its value. The mode comes off the host's\n * `wr-slider--range` class and {@link getLabelText} off the rendered text.\n *\n * Everything it WRITES is a key press. A slider is a pointer control, but a\n * pointer control cannot be driven by coordinates in jsdom — there is no layout,\n * so the track measures 0×0 and the component divides every offset by that\n * width: a positive one writes the slider's MAX and `clientX: 0` writes `NaN`,\n * neither of them the value asked for. The keyboard is both the accessible path\n * and the only honest one here; {@link WrSliderThumbHarness.setValue} spells out\n * what the walk costs, and {@link WrSliderThumbHarness} why every one of those\n * presses is on the block axis, which `dir` does not turn around.\n *\n * The `step` is deliberately not readable: the component publishes it nowhere in\n * the DOM (ARIA has no attribute for it), so a spec that needs the number should\n * measure it — `stepUp()` moves by exactly one step.\n *\n * @example\n * ```ts\n * const volume = await loader.getHarness(WrSliderHarness);\n *\n * await volume.setValue(70);\n * expect(await volume.getValue()).toBe(70);\n *\n * const span = await loader.getHarness(WrSliderHarness.with({ range: true }));\n * await span.setRange(30, 60);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSliderHarness extends ComponentHarness {\n static hostSelector = 'wr-slider';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSliderHarnessFilters = {}): HarnessPredicate<WrSliderHarness> {\n return new HarnessPredicate(WrSliderHarness, options)\n .addOption('value', options.value, async (harness, value) => sameValue(await harness.getValue(), value))\n .addOption('range', options.range, async (harness, range) => (await harness.isRange()) === range)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('labelText', options.labelText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), text)\n );\n }\n\n /** Whether the slider has two thumbs and answers with a `[low, high]` tuple. */\n async isRange(): Promise<boolean> {\n return (await this.host()).hasClass('wr-slider--range');\n }\n\n /** The control size. `'md'` is the default and paints no modifier of its own. */\n async getSize(): Promise<WrSliderSize> {\n const host = await this.host();\n if (await host.hasClass('wr-slider--sm')) return 'sm';\n if (await host.hasClass('wr-slider--lg')) return 'lg';\n return 'md';\n }\n\n /**\n * Whether the slider refuses interaction.\n *\n * Read from the thumb's native `disabled` rather than from the\n * `wr-slider--disabled` class: the class is paint, while `disabled` on the\n * button is what takes the thumb out of the tab order and what assistive tech\n * reports.\n */\n async isDisabled(): Promise<boolean> {\n return (await this.getLowThumb()).isDisabled();\n }\n\n /** The axis of the track, from the thumb's `aria-orientation`, which is what a screen reader is told. */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n const orientation = await (await (await this.getLowThumb()).host()).getAttribute('aria-orientation');\n return orientation === 'vertical' ? 'vertical' : 'horizontal';\n }\n\n /**\n * The current value, in the shape the model uses: a plain number for one\n * thumb, `[low, high]` for two.\n */\n async getValue(): Promise<WrSliderValue> {\n const values = await Promise.all((await this.getThumbs()).map(thumb => thumb.getValue()));\n return values.length > 1 ? ([values[0], values[1]] as const) : values[0];\n }\n\n /** The slider's lower bound. */\n async getMin(): Promise<number> {\n return (await this.getThumbs())[0].getMin();\n }\n\n /**\n * The slider's upper bound.\n *\n * Taken from the LAST thumb, because in range mode the thumbs bound each\n * other: the lower one's `aria-valuemax` is wherever the upper one is\n * standing, so only the upper thumb knows the real ceiling.\n */\n async getMax(): Promise<number> {\n const thumbs = await this.getThumbs();\n return thumbs[thumbs.length - 1].getMax();\n }\n\n /**\n * The text the slider prints under the track, or `null` when `showValue` is\n * off.\n *\n * A range slider joins its ends with an EN DASH — `'20 – 80'`, U+2013 — so an\n * assertion typed with a hyphen will not match.\n */\n async getLabelText(): Promise<string | null> {\n const label = await this.locatorForOptional('.wr-slider__label')();\n return label ? label.text() : null;\n }\n\n /**\n * The marks drawn on the track, in value order, each with its label when it\n * has one. Marks outside `[min, max]` are not drawn, so they are not here.\n */\n async getMarks(): Promise<WrSliderMark[]> {\n const labels = new Map<string | null, string>();\n for (const label of await this.locatorForAll('.wr-slider__mark-label')()) {\n labels.set(await label.getAttribute('data-value'), await label.text());\n }\n\n const marks: WrSliderMark[] = [];\n for (const tick of await this.locatorForAll('.wr-slider__mark')()) {\n const raw = await tick.getAttribute('data-value');\n const label = labels.get(raw);\n marks.push(label === undefined ? { value: Number(raw) } : { value: Number(raw), label });\n }\n return marks;\n }\n\n /** The slider's thumbs in DOM order: the lower one first. */\n async getThumbs(filters: WrSliderThumbHarnessFilters = {}): Promise<WrSliderThumbHarness[]> {\n return this.locatorForAll(WrSliderThumbHarness.with(filters))();\n }\n\n /** The only thumb of a single-thumb slider, or the lower one of a range slider. */\n async getLowThumb(): Promise<WrSliderThumbHarness> {\n return this.locatorFor(WrSliderThumbHarness.with({ position: 'low' }))();\n }\n\n /** The upper thumb. Throws on a single-thumb slider, which has no such part. */\n async getHighThumb(): Promise<WrSliderThumbHarness> {\n const thumb = await this.locatorForOptional(WrSliderThumbHarness.with({ position: 'high' }))();\n if (!thumb) {\n throw new Error('WrSliderHarness.getHighThumb(): this slider has one thumb — only a `range` slider has two.');\n }\n return thumb;\n }\n\n /**\n * Walk the slider to `value` from the keyboard.\n *\n * Single-thumb only — {@link setRange} moves both ends. See\n * {@link WrSliderThumbHarness.setValue} for what the walk costs and when it\n * throws.\n */\n async setValue(value: number): Promise<void> {\n return (await this.single('setValue')).setValue(value);\n }\n\n /**\n * Walk both ends of a range slider to `[low, high]`.\n *\n * The far end moves FIRST. The thumbs bound each other, so writing `[90, 95]`\n * over `[20, 80]` lower-end-first would be refused outright — 90 is outside\n * the `[0, 80]` window the upper thumb leaves the lower one.\n */\n async setRange(low: number, high: number): Promise<void> {\n if (!(await this.isRange())) {\n throw new Error('WrSliderHarness.setRange(): this slider has one thumb — add `range` to it, or call setValue().');\n }\n if (low > high) {\n throw new Error(`WrSliderHarness.setRange(): ${low} is above ${high}, and the thumbs cannot cross.`);\n }\n\n const lowThumb = await this.getLowThumb();\n const highThumb = await this.getHighThumb();\n\n if (high >= (await highThumb.getValue())) {\n await highThumb.setValue(high);\n await lowThumb.setValue(low);\n return;\n }\n\n await lowThumb.setValue(low);\n await highThumb.setValue(high);\n }\n\n /** One step up (`ArrowUp`). Single-thumb only. A disabled slider does not move. */\n async stepUp(): Promise<void> {\n return (await this.single('stepUp')).stepUp();\n }\n\n /** One step down (`ArrowDown`). Single-thumb only. A disabled slider does not move. */\n async stepDown(): Promise<void> {\n return (await this.single('stepDown')).stepDown();\n }\n\n /** `Home` — jump to the slider's `min`. Single-thumb only. */\n async toMin(): Promise<void> {\n return (await this.single('toMin')).toMin();\n }\n\n /** `End` — jump to the slider's `max`. Single-thumb only. */\n async toMax(): Promise<void> {\n return (await this.single('toMax')).toMax();\n }\n\n /**\n * Move keyboard focus to the slider's first thumb. A range slider's thumbs are\n * two separate tab stops (both are plain buttons — there is no roving\n * `tabindex`), so reach the other one through {@link getHighThumb}.\n */\n async focus(): Promise<void> {\n return (await this.getLowThumb()).focus();\n }\n\n /** Whether any of the slider's thumbs holds focus. */\n async isFocused(): Promise<boolean> {\n const focused = await Promise.all((await this.getThumbs()).map(thumb => thumb.isFocused()));\n return focused.includes(true);\n }\n\n /**\n * The one thumb a single-thumb convenience call means.\n *\n * Range mode gets an error rather than a guess: \"step this slider up\" has two\n * possible answers there, and picking one silently is how a spec ends up\n * asserting against the end it did not move.\n */\n private async single(caller: string): Promise<WrSliderThumbHarness> {\n if (await this.isRange()) {\n throw new Error(\n `WrSliderHarness.${caller}(): this slider has two thumbs — use setRange(), or reach for one end ` +\n 'with getLowThumb() / getHighThumb().'\n );\n }\n return this.getLowThumb();\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,cAAc;AAiCpB,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CAOxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,YAAW,MAAQ,QAAQ,CAAC,CAChH,UAAU,SAAS,QAAQ,OAAO,OAAO,SAAS,UAAW,MAAM,QAAQ,SAAQ,MAAQ,KAAK,CAAC,CACjG,UAAU,SAAS,QAAQ,QAAQ,SAAS,UAAU,iBAAiB,cAAc,QAAQ,SAAQ,GAAI,KAAK,CAAC;CACpH;CAGA,MAAM,cAAW;EACf,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,SAAS,wBAAwB,IAAK,SAAS;CACnF;CAGA,MAAM,WAAQ;EACZ,OAAO,KAAK,QAAQ,eAAe;CACrC;CAQA,MAAM,SAAM;EACV,OAAO,KAAK,QAAQ,eAAe;CACrC;CAQA,MAAM,SAA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ACjC,IAAI,MAAM,KAAK,QAAO,GACpB,MAAM,IAAI,MACR,mBAAmB,OAAM,2GACe;EAG5C,OAAO,KAAK,YAAW;CACzB"}
@@ -55,6 +55,7 @@ var WrSlider = class WrSlider {
55
55
  transform: coerceBooleanProperty
56
56
  });
57
57
  orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
58
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
58
59
  ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
59
60
  upperLabel = input(null, ...ngDevMode ? [{ debugName: "upperLabel" }] : /* istanbul ignore next */ []);
60
61
  singleLabel = useI18nText(this.ariaLabel, "slider.label", "Value");
@@ -78,6 +79,8 @@ var WrSlider = class WrSlider {
78
79
  dir = inject(Directionality, { optional: true });
79
80
  classes = computed(() => {
80
81
  const parts = [];
82
+ const size = this.size();
83
+ if (size !== "md") parts.push(`wr-slider--${size}`);
81
84
  if (this.range()) parts.push("wr-slider--range");
82
85
  if (this.vertical()) parts.push("wr-slider--vertical");
83
86
  if (this.disabled()) parts.push("wr-slider--disabled");
@@ -255,7 +258,7 @@ var WrSlider = class WrSlider {
255
258
  }
256
259
  static ɵfac = i0.ɵɵngDeclareFactory({
257
260
  minVersion: "12.0.0",
258
- version: "22.2.5",
261
+ version: "22.2.6",
259
262
  ngImport: i0,
260
263
  type: WrSlider,
261
264
  deps: [],
@@ -263,7 +266,7 @@ var WrSlider = class WrSlider {
263
266
  });
264
267
  static ɵcmp = i0.ɵɵngDeclareComponent({
265
268
  minVersion: "17.0.0",
266
- version: "22.2.5",
269
+ version: "22.2.6",
267
270
  type: WrSlider,
268
271
  isStandalone: true,
269
272
  selector: "wr-slider",
@@ -345,6 +348,13 @@ var WrSlider = class WrSlider {
345
348
  isRequired: false,
346
349
  transformFunction: null
347
350
  },
351
+ size: {
352
+ classPropertyName: "size",
353
+ publicName: "size",
354
+ isSignal: true,
355
+ isRequired: false,
356
+ transformFunction: null
357
+ },
348
358
  ariaLabel: {
349
359
  classPropertyName: "ariaLabel",
350
360
  publicName: "ariaLabel",
@@ -396,7 +406,7 @@ var WrSlider = class WrSlider {
396
406
  };
397
407
  i0.ɵɵngDeclareClassMetadata({
398
408
  minVersion: "12.0.0",
399
- version: "22.2.5",
409
+ version: "22.2.6",
400
410
  ngImport: i0,
401
411
  type: WrSlider,
402
412
  decorators: [{
@@ -502,6 +512,14 @@ i0.ɵɵngDeclareClassMetadata({
502
512
  required: false
503
513
  }]
504
514
  }],
515
+ size: [{
516
+ type: i0.Input,
517
+ args: [{
518
+ isSignal: true,
519
+ alias: "size",
520
+ required: false
521
+ }]
522
+ }],
505
523
  ariaLabel: [{
506
524
  type: i0.Input,
507
525
  args: [{