ngwr 16.5.0 → 16.7.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 (450) hide show
  1. package/avatar/styles/_index.scss +39 -0
  2. package/back-top/styles/_index.scss +6 -0
  3. package/breadcrumbs/styles/_rules.scss +34 -0
  4. package/button/styles/_index.scss +45 -2
  5. package/cascader/styles/_rules.scss +7 -0
  6. package/charts/chart-legend/styles/_index.scss +1 -9
  7. package/copy-value/styles/_index.scss +4 -0
  8. package/counter/styles/_index.scss +1 -8
  9. package/date-picker/styles/_index.scss +15 -9
  10. package/dialog/styles/_index.scss +37 -0
  11. package/dropdown/styles/_index.scss +17 -0
  12. package/editor/styles/_index.scss +1 -8
  13. package/event-calendar/styles/_index.scss +2 -6
  14. package/fesm2022/ngwr-affix.mjs +4 -4
  15. package/fesm2022/ngwr-affix.mjs.map +1 -1
  16. package/fesm2022/ngwr-alert.mjs +3 -3
  17. package/fesm2022/ngwr-anchor.mjs +12 -5
  18. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  19. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  20. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  21. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  22. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  23. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  24. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  25. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  26. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  27. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  28. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  29. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  30. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  31. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  32. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  33. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  34. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  36. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  38. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  39. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  40. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  41. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  42. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
  43. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  44. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
  45. package/fesm2022/ngwr-animations-marquee.mjs +4 -3
  46. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  47. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  48. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  49. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  50. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  51. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  52. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  53. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  54. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  55. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  56. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  57. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  58. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  59. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  60. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  61. package/fesm2022/ngwr-animations-tilt.mjs +23 -16
  62. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  63. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  64. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  65. package/fesm2022/ngwr-avatar.mjs +171 -6
  66. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  67. package/fesm2022/ngwr-back-top.mjs +3 -3
  68. package/fesm2022/ngwr-badge.mjs +6 -6
  69. package/fesm2022/ngwr-breadcrumbs.mjs +47 -13
  70. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  71. package/fesm2022/ngwr-burger.mjs +3 -3
  72. package/fesm2022/ngwr-button.mjs +38 -9
  73. package/fesm2022/ngwr-button.mjs.map +1 -1
  74. package/fesm2022/ngwr-calendar.mjs +3 -3
  75. package/fesm2022/ngwr-card.mjs +9 -9
  76. package/fesm2022/ngwr-carousel.mjs +14 -8
  77. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  78. package/fesm2022/ngwr-cascader.mjs +27 -7
  79. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
  81. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  83. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  85. package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
  86. package/fesm2022/ngwr-charts-core.mjs +18 -11
  87. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
  89. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  90. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  91. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  92. package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
  93. package/fesm2022/ngwr-charts-meter-group.mjs +7 -5
  94. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
  96. package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
  97. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  98. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  99. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  100. package/fesm2022/ngwr-checkbox.mjs +9 -8
  101. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  102. package/fesm2022/ngwr-clipboard.mjs +3 -3
  103. package/fesm2022/ngwr-collapse.mjs +9 -9
  104. package/fesm2022/ngwr-color-picker.mjs +27 -7
  105. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  106. package/fesm2022/ngwr-command-palette.mjs +3 -3
  107. package/fesm2022/ngwr-comment.mjs +7 -6
  108. package/fesm2022/ngwr-comment.mjs.map +1 -1
  109. package/fesm2022/ngwr-compare.mjs +3 -3
  110. package/fesm2022/ngwr-context-menu.mjs +16 -17
  111. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  112. package/fesm2022/ngwr-cookie.mjs +3 -3
  113. package/fesm2022/ngwr-copy-value.mjs +3 -3
  114. package/fesm2022/ngwr-counter.mjs +6 -6
  115. package/fesm2022/ngwr-date-picker-testing.mjs +35 -0
  116. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  117. package/fesm2022/ngwr-date-picker.mjs +151 -54
  118. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  119. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  120. package/fesm2022/ngwr-date.mjs +40 -16
  121. package/fesm2022/ngwr-date.mjs.map +1 -1
  122. package/fesm2022/ngwr-density.mjs +6 -6
  123. package/fesm2022/ngwr-descriptions.mjs +6 -6
  124. package/fesm2022/ngwr-dialog.mjs +35 -24
  125. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  126. package/fesm2022/ngwr-directives.mjs +189 -23
  127. package/fesm2022/ngwr-directives.mjs.map +1 -1
  128. package/fesm2022/ngwr-divider.mjs +3 -3
  129. package/fesm2022/ngwr-drawer.mjs +18 -18
  130. package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
  131. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  132. package/fesm2022/ngwr-dropdown.mjs +59 -16
  133. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  134. package/fesm2022/ngwr-editor.mjs +6 -5
  135. package/fesm2022/ngwr-editor.mjs.map +1 -1
  136. package/fesm2022/ngwr-empty.mjs +3 -3
  137. package/fesm2022/ngwr-event-calendar.mjs +27 -15
  138. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  139. package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
  140. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-file-upload.mjs +68 -13
  142. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  143. package/fesm2022/ngwr-form.mjs +181 -12
  144. package/fesm2022/ngwr-form.mjs.map +1 -1
  145. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  146. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-graph.mjs +100 -11
  148. package/fesm2022/ngwr-graph.mjs.map +1 -1
  149. package/fesm2022/ngwr-hotkey.mjs +6 -6
  150. package/fesm2022/ngwr-i18n-ar.mjs +21 -2
  151. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-cs.mjs +21 -2
  153. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-de.mjs +21 -2
  155. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-en.mjs +21 -2
  157. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-es.mjs +21 -2
  159. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-fr.mjs +21 -2
  161. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-he.mjs +21 -2
  163. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-hi.mjs +21 -2
  165. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-id.mjs +21 -2
  167. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-it.mjs +21 -2
  169. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-ja.mjs +21 -2
  171. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-kk.mjs +520 -0
  173. package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
  174. package/fesm2022/ngwr-i18n-ko.mjs +21 -2
  175. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-nl.mjs +21 -2
  177. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-pl.mjs +21 -2
  179. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-pt.mjs +21 -2
  181. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-ru.mjs +21 -2
  183. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-sv.mjs +21 -2
  185. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-tr.mjs +21 -2
  187. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-uk.mjs +21 -2
  189. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-vi.mjs +21 -2
  191. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-zh-tw.mjs +21 -2
  193. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-zh.mjs +21 -2
  195. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n.mjs +91 -20
  197. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  198. package/fesm2022/ngwr-icon.mjs +6 -6
  199. package/fesm2022/ngwr-image-cropper.mjs +8 -4
  200. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  201. package/fesm2022/ngwr-input-number.mjs +27 -4
  202. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  203. package/fesm2022/ngwr-input-otp.mjs +5 -5
  204. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  205. package/fesm2022/ngwr-input.mjs +25 -17
  206. package/fesm2022/ngwr-input.mjs.map +1 -1
  207. package/fesm2022/ngwr-keyboard.mjs +3 -3
  208. package/fesm2022/ngwr-knob.mjs +3 -3
  209. package/fesm2022/ngwr-layout.mjs +15 -15
  210. package/fesm2022/ngwr-layout.mjs.map +1 -1
  211. package/fesm2022/ngwr-lightbox.mjs +8 -8
  212. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  213. package/fesm2022/ngwr-list.mjs +9 -9
  214. package/fesm2022/ngwr-list.mjs.map +1 -1
  215. package/fesm2022/ngwr-load-state.mjs +16 -15
  216. package/fesm2022/ngwr-load-state.mjs.map +1 -1
  217. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  218. package/fesm2022/ngwr-loading-bar.mjs +8 -8
  219. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  220. package/fesm2022/ngwr-mention.mjs +14 -6
  221. package/fesm2022/ngwr-mention.mjs.map +1 -1
  222. package/fesm2022/ngwr-meta.mjs +15 -12
  223. package/fesm2022/ngwr-meta.mjs.map +1 -1
  224. package/fesm2022/ngwr-overlay.mjs +9 -9
  225. package/fesm2022/ngwr-page-header.mjs +24 -3
  226. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  227. package/fesm2022/ngwr-pagination-testing.mjs +3 -0
  228. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  229. package/fesm2022/ngwr-pagination.mjs +34 -5
  230. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  231. package/fesm2022/ngwr-pipes.mjs +35 -28
  232. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  233. package/fesm2022/ngwr-platform.mjs +9 -9
  234. package/fesm2022/ngwr-popconfirm.mjs +9 -7
  235. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  236. package/fesm2022/ngwr-popover.mjs +162 -18
  237. package/fesm2022/ngwr-popover.mjs.map +1 -1
  238. package/fesm2022/ngwr-progress.mjs +75 -10
  239. package/fesm2022/ngwr-progress.mjs.map +1 -1
  240. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  241. package/fesm2022/ngwr-qr.mjs +9 -5
  242. package/fesm2022/ngwr-qr.mjs.map +1 -1
  243. package/fesm2022/ngwr-radio.mjs +77 -11
  244. package/fesm2022/ngwr-radio.mjs.map +1 -1
  245. package/fesm2022/ngwr-rating.mjs +3 -3
  246. package/fesm2022/ngwr-resizable.mjs +3 -3
  247. package/fesm2022/ngwr-result.mjs +12 -12
  248. package/fesm2022/ngwr-schema-form.mjs +20 -7
  249. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  250. package/fesm2022/ngwr-scroll.mjs +233 -10
  251. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  252. package/fesm2022/ngwr-segmented.mjs +23 -3
  253. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  254. package/fesm2022/ngwr-select.mjs +106 -26
  255. package/fesm2022/ngwr-select.mjs.map +1 -1
  256. package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
  257. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
  258. package/fesm2022/ngwr-sidebar.mjs +66 -11
  259. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  260. package/fesm2022/ngwr-skeleton.mjs +3 -3
  261. package/fesm2022/ngwr-slider.mjs +3 -3
  262. package/fesm2022/ngwr-sortable-list.mjs +27 -15
  263. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  264. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  265. package/fesm2022/ngwr-spinner.mjs +3 -3
  266. package/fesm2022/ngwr-splitter.mjs +3 -3
  267. package/fesm2022/ngwr-statistic.mjs +9 -9
  268. package/fesm2022/ngwr-stepper.mjs +6 -6
  269. package/fesm2022/ngwr-storage.mjs +4 -4
  270. package/fesm2022/ngwr-storage.mjs.map +1 -1
  271. package/fesm2022/ngwr-switch.mjs +5 -5
  272. package/fesm2022/ngwr-switch.mjs.map +1 -1
  273. package/fesm2022/ngwr-table-router.mjs +89 -0
  274. package/fesm2022/ngwr-table-router.mjs.map +1 -0
  275. package/fesm2022/ngwr-table-testing.mjs +5 -0
  276. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  277. package/fesm2022/ngwr-table.mjs +307 -47
  278. package/fesm2022/ngwr-table.mjs.map +1 -1
  279. package/fesm2022/ngwr-tabs-router.mjs +9 -5
  280. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  281. package/fesm2022/ngwr-tabs-testing.mjs +8 -1
  282. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tabs.mjs +60 -10
  284. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  285. package/fesm2022/ngwr-textarea.mjs +5 -5
  286. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  287. package/fesm2022/ngwr-theme.mjs +3 -3
  288. package/fesm2022/ngwr-timeline.mjs +6 -6
  289. package/fesm2022/ngwr-toast.mjs +43 -15
  290. package/fesm2022/ngwr-toast.mjs.map +1 -1
  291. package/fesm2022/ngwr-toolbar.mjs +3 -3
  292. package/fesm2022/ngwr-tour.mjs +9 -8
  293. package/fesm2022/ngwr-tour.mjs.map +1 -1
  294. package/fesm2022/ngwr-transfer.mjs +4 -3
  295. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  296. package/fesm2022/ngwr-tree.mjs +3 -3
  297. package/fesm2022/ngwr-typography.mjs +23 -3
  298. package/fesm2022/ngwr-typography.mjs.map +1 -1
  299. package/fesm2022/ngwr-utils-router.mjs +3 -3
  300. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  301. package/fesm2022/ngwr-utils.mjs +74 -4
  302. package/fesm2022/ngwr-utils.mjs.map +1 -1
  303. package/fesm2022/ngwr-validators.mjs +33 -1
  304. package/fesm2022/ngwr-validators.mjs.map +1 -1
  305. package/fesm2022/ngwr-version.mjs +1 -1
  306. package/fesm2022/ngwr-version.mjs.map +1 -1
  307. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  308. package/fesm2022/ngwr-window.mjs +18 -13
  309. package/fesm2022/ngwr-window.mjs.map +1 -1
  310. package/file-upload/styles/_index.scss +16 -0
  311. package/form/styles/_index.scss +37 -0
  312. package/graph/styles/_index.scss +49 -9
  313. package/i18n/ar.json +19 -2
  314. package/i18n/cs.json +19 -2
  315. package/i18n/de.json +19 -2
  316. package/i18n/en.json +19 -2
  317. package/i18n/es.json +19 -2
  318. package/i18n/fr.json +19 -2
  319. package/i18n/he.json +19 -2
  320. package/i18n/hi.json +19 -2
  321. package/i18n/id.json +19 -2
  322. package/i18n/it.json +19 -2
  323. package/i18n/ja.json +19 -2
  324. package/i18n/kk.json +567 -0
  325. package/i18n/ko.json +19 -2
  326. package/i18n/nl.json +19 -2
  327. package/i18n/pl.json +19 -2
  328. package/i18n/pt.json +19 -2
  329. package/i18n/ru.json +19 -2
  330. package/i18n/sv.json +19 -2
  331. package/i18n/tr.json +19 -2
  332. package/i18n/uk.json +19 -2
  333. package/i18n/vi.json +19 -2
  334. package/i18n/zh-TW.json +19 -2
  335. package/i18n/zh.json +19 -2
  336. package/image-cropper/styles/_index.scss +1 -9
  337. package/input-number/styles/_index.scss +7 -0
  338. package/layout/styles/_index.scss +13 -1
  339. package/llms-full.txt +37 -26
  340. package/llms.txt +4 -1
  341. package/loading-bar/styles/_rules.scss +6 -0
  342. package/package.json +16 -8
  343. package/page-header/styles/_index.scss +18 -0
  344. package/pagination/styles/_index.scss +6 -0
  345. package/popover/styles/_index.scss +9 -0
  346. package/progress/styles/_index.scss +64 -0
  347. package/schematics/use/symbol-map.json +7 -0
  348. package/segmented/styles/_index.scss +7 -0
  349. package/select/styles/_index.scss +7 -0
  350. package/sidebar/styles/_index.scss +64 -6
  351. package/skills/ngwr/SKILL.md +7 -6
  352. package/skills/ngwr/references/catalog.md +7 -5
  353. package/sortable-list/styles/_rules.scss +1 -9
  354. package/speed-dial/styles/_index.scss +6 -0
  355. package/stepper/styles/_index.scss +1 -9
  356. package/table/styles/_index.scss +168 -30
  357. package/tabs/styles/_index.scss +9 -0
  358. package/theme/_index.scss +12 -1
  359. package/theme/styles/_colors.scss +11 -0
  360. package/theme/styles/_contrast.scss +6 -0
  361. package/theme/styles/_focus.scss +3 -1
  362. package/theme/styles/_index.scss +1 -0
  363. package/theme/styles/_mixins.scss +45 -0
  364. package/theme/styles/_print.scss +17 -0
  365. package/toast/styles/_index.scss +7 -0
  366. package/tour/styles/_index.scss +9 -0
  367. package/tree/styles/_index.scss +1 -9
  368. package/types/ngwr-anchor.d.ts +3 -0
  369. package/types/ngwr-animations-aurora.d.ts +6 -0
  370. package/types/ngwr-animations-blur-reveal.d.ts +6 -0
  371. package/types/ngwr-animations-click-sparks.d.ts +6 -0
  372. package/types/ngwr-animations-confetti.d.ts +6 -0
  373. package/types/ngwr-animations-decode.d.ts +6 -0
  374. package/types/ngwr-animations-destruct.d.ts +6 -0
  375. package/types/ngwr-animations-dot-grid.d.ts +6 -0
  376. package/types/ngwr-animations-falling-letters.d.ts +6 -0
  377. package/types/ngwr-animations-flow-lines.d.ts +6 -0
  378. package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
  379. package/types/ngwr-animations-glitch.d.ts +6 -0
  380. package/types/ngwr-animations-glow-border.d.ts +6 -0
  381. package/types/ngwr-animations-gradient-flow.d.ts +6 -0
  382. package/types/ngwr-animations-marquee.d.ts +6 -0
  383. package/types/ngwr-animations-orbit.d.ts +6 -0
  384. package/types/ngwr-animations-reveal.d.ts +6 -0
  385. package/types/ngwr-animations-ripple-grid.d.ts +6 -0
  386. package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
  387. package/types/ngwr-animations-shimmer.d.ts +6 -0
  388. package/types/ngwr-animations-spotlight.d.ts +6 -0
  389. package/types/ngwr-animations-thread-lines.d.ts +6 -0
  390. package/types/ngwr-animations-tilt.d.ts +10 -0
  391. package/types/ngwr-animations-typewriter.d.ts +6 -0
  392. package/types/ngwr-avatar.d.ts +39 -0
  393. package/types/ngwr-breadcrumbs.d.ts +25 -0
  394. package/types/ngwr-button.d.ts +35 -3
  395. package/types/ngwr-carousel.d.ts +2 -0
  396. package/types/ngwr-cascader.d.ts +7 -0
  397. package/types/ngwr-charts-core.d.ts +16 -0
  398. package/types/ngwr-charts-meter-group.d.ts +2 -0
  399. package/types/ngwr-checkbox.d.ts +1 -0
  400. package/types/ngwr-color-picker.d.ts +1 -0
  401. package/types/ngwr-context-menu.d.ts +1 -1
  402. package/types/ngwr-date-picker-testing.d.ts +22 -0
  403. package/types/ngwr-date-picker.d.ts +97 -17
  404. package/types/ngwr-date.d.ts +51 -0
  405. package/types/ngwr-dialog.d.ts +39 -8
  406. package/types/ngwr-directives.d.ts +57 -4
  407. package/types/ngwr-drawer.d.ts +1 -1
  408. package/types/ngwr-dropdown-testing.d.ts +8 -1
  409. package/types/ngwr-dropdown.d.ts +30 -1
  410. package/types/ngwr-event-calendar.d.ts +4 -0
  411. package/types/ngwr-file-upload-testing.d.ts +10 -0
  412. package/types/ngwr-file-upload.d.ts +55 -1
  413. package/types/ngwr-form.d.ts +87 -1
  414. package/types/ngwr-graph-testing.d.ts +28 -1
  415. package/types/ngwr-graph.d.ts +53 -3
  416. package/types/ngwr-i18n-kk.d.ts +3 -0
  417. package/types/ngwr-i18n.d.ts +65 -5
  418. package/types/ngwr-image-cropper.d.ts +6 -0
  419. package/types/ngwr-input-number.d.ts +8 -0
  420. package/types/ngwr-input.d.ts +7 -0
  421. package/types/ngwr-layout.d.ts +1 -1
  422. package/types/ngwr-loading-bar-router.d.ts +6 -0
  423. package/types/ngwr-page-header.d.ts +23 -1
  424. package/types/ngwr-pagination-testing.d.ts +8 -0
  425. package/types/ngwr-pagination.d.ts +16 -0
  426. package/types/ngwr-popconfirm.d.ts +1 -1
  427. package/types/ngwr-popover.d.ts +67 -4
  428. package/types/ngwr-progress.d.ts +63 -1
  429. package/types/ngwr-radio.d.ts +47 -5
  430. package/types/ngwr-scroll.d.ts +86 -0
  431. package/types/ngwr-segmented.d.ts +7 -0
  432. package/types/ngwr-select.d.ts +88 -25
  433. package/types/ngwr-sidebar-testing.d.ts +21 -7
  434. package/types/ngwr-sidebar.d.ts +66 -4
  435. package/types/ngwr-sortable-list.d.ts +20 -7
  436. package/types/ngwr-table-router.d.ts +49 -0
  437. package/types/ngwr-table-testing.d.ts +7 -0
  438. package/types/ngwr-table.d.ts +241 -10
  439. package/types/ngwr-tabs-router.d.ts +7 -1
  440. package/types/ngwr-tabs-testing.d.ts +5 -1
  441. package/types/ngwr-tabs.d.ts +34 -1
  442. package/types/ngwr-toast.d.ts +11 -0
  443. package/types/ngwr-tour.d.ts +0 -1
  444. package/types/ngwr-typography.d.ts +7 -0
  445. package/types/ngwr-utils-router.d.ts +6 -0
  446. package/types/ngwr-utils.d.ts +69 -2
  447. package/types/ngwr-validators.d.ts +49 -1
  448. package/types/ngwr-version.d.ts +1 -1
  449. package/typography/styles/_index.scss +4 -0
  450. package/window/styles/_index.scss +1 -9
@@ -8,7 +8,7 @@ import { ComponentHarness, ContentContainerComponentHarness, HarnessPredicate, T
8
8
  var WrDropdownItemHarness = class WrDropdownItemHarness extends ComponentHarness {
9
9
  static hostSelector = ".wr-dropdown-item";
10
10
  static with(options = {}) {
11
- return new HarnessPredicate(WrDropdownItemHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text)).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled);
11
+ return new HarnessPredicate(WrDropdownItemHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text)).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled).addOption("checked", options.checked, async (harness, checked) => await harness.isChecked() === checked);
12
12
  }
13
13
  async getText() {
14
14
  return (await this.locatorFor(".wr-dropdown-item__label")()).text();
@@ -16,6 +16,10 @@ var WrDropdownItemHarness = class WrDropdownItemHarness extends ComponentHarness
16
16
  async getRole() {
17
17
  return (await this.host()).getAttribute("role");
18
18
  }
19
+ async isChecked() {
20
+ const value = await (await this.host()).getAttribute("aria-checked");
21
+ return value === null ? null : value === "true";
22
+ }
19
23
  async isDisabled() {
20
24
  return await (await this.host()).getAttribute("aria-disabled") === "true";
21
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-dropdown-testing.mjs","names":[],"sources":["../../../projects/lib/dropdown/testing/wr-dropdown-item-harness.ts","../../../projects/lib/dropdown/testing/wr-dropdown-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 { WrDropdownItemHarnessFilters } from './types';\n\n/**\n * Test harness for one `<wr-dropdown-item>` inside a dropdown menu.\n *\n * The selector is the CLASS rather than the element: `.wr-dropdown-item` is what\n * the directive's own keyboard navigation queries, so it is the contract both\n * sides already rely on. Only the class, though — the directive narrows its query\n * to `:not(.wr-dropdown-item--disabled)` because it is looking for focus stops,\n * while a spec still has to be able to see a disabled item and assert that it is\n * one.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownItemHarness extends ComponentHarness {\n /** The class the item paints on its host, and the one arrow-key navigation looks for. */\n static hostSelector = '.wr-dropdown-item';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDropdownItemHarnessFilters = {}): HarnessPredicate<WrDropdownItemHarness> {\n return new HarnessPredicate(WrDropdownItemHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The item's label, trimmed. A leading icon is not part of it. */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-dropdown-item__label')()).text();\n }\n\n /** The role the item announces — `menuitem`. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether the item refuses activation. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the item opens a submenu. `WrDropdownHarness.openSubmenu()` opens it. */\n async hasSubmenu(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-haspopup')) === 'menu';\n }\n\n /** Whether the item shows a leading icon. */\n async hasIcon(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-dropdown-item__icon')()) !== null;\n }\n\n /** The leading icon's registered name, or `null` when the item has no icon. */\n async getIconName(): Promise<string | null> {\n const icon = await this.locatorForOptional('.wr-dropdown-item__icon')();\n // `<wr-icon>` reflects the name it was asked for as `data-icon`, whether or not\n // that name is registered — so this answers what the item MEANT to draw.\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /** Whether the item holds the menu's roving focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Click the item. A disabled item throws instead.\n *\n * Refusing is the only honest answer: the item's own `disabled` guards the\n * KEYBOARD path only, and a pointer is stopped by `pointer-events: none` in the\n * stylesheet. jsdom loads no stylesheets, so a click dispatched here would land\n * on the host — exactly where the consumer bound `(click)` — and the spec would\n * record an activation that cannot happen in a browser. Assert `isDisabled()`\n * instead.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(\n `WrDropdownItemHarness.click(): \"${await this.getText()}\" is disabled, so clicking it would ` +\n 'report behaviour a browser cannot produce — the pointer is stopped by CSS, which jsdom does ' +\n 'not load. Assert isDisabled() instead.'\n );\n }\n\n return (await this.host()).click();\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 {\n type ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrDropdownPosition } from 'ngwr/dropdown';\n\nimport type { WrDropdownHarnessFilters, WrDropdownItemHarnessFilters } from './types';\nimport { WrDropdownItemHarness } from './wr-dropdown-item-harness';\n\n/**\n * Test harness for `[wrDropdown]` — the trigger, and the menu it opens.\n *\n * The harness matches the TRIGGER, because that is the only part of the dropdown\n * in the fixture: `<wr-dropdown-menu>` renders nothing of its own (it hands over\n * an `<ng-template>`), and the menu is portalled into the overlay container, a\n * sibling of the whole app. So every item is read through the document root,\n * scoped by the `aria-controls` id the trigger publishes while it is open — which\n * is what keeps two dropdowns on one page from answering with each other's items.\n *\n * That scoped loader is also this harness's CONTENT loader, so\n * `dropdown.getHarness(…)` resolves inside THIS dropdown's menu: the consumer's\n * own components in the menu are reachable without the spec ever touching the\n * overlay, and so is a nested `[wrDropdown]`. A submenu is reached with\n * `openSubmenu()`, which answers with a harness scoped to that submenu.\n *\n * @example\n * ```ts\n * const dropdown = await loader.getHarness(WrDropdownHarness.with({ text: 'Actions' }));\n *\n * await dropdown.open();\n * expect(await dropdown.getItemTexts()).toEqual(['Copy', 'Delete']);\n *\n * await dropdown.clickItem({ text: 'Copy' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownHarness extends ContentContainerComponentHarness {\n /** The directive's host — whatever element the consumer put `[wrDropdown]` on. */\n static hostSelector = '.wr-dropdown-trigger';\n\n /** Build a predicate that narrows the query. */\n static with<T extends WrDropdownHarness>(\n this: ComponentHarnessConstructor<T>,\n options: WrDropdownHarnessFilters = {}\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getTriggerText(), text)\n )\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The trigger's visible text. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the menu is showing. */\n async isOpen(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-expanded')) === 'true';\n }\n\n /**\n * Whether `wrDropdownDisabled` has turned the trigger off — read from\n * `wr-dropdown-trigger--disabled`, the one mark a disabled trigger carries.\n * The HOST's own `disabled` is another question: the directive never sets it,\n * so ask the host's harness (`WrButtonHarness.isDisabled()`).\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-dropdown-trigger--disabled');\n }\n\n /** The role the menu announces — `menu`. Throws while the menu is closed. */\n async getMenuRole(): Promise<string | null> {\n return (await this.menu()).getAttribute('role');\n }\n\n /**\n * Where the menu sits relative to the trigger, or `null` when its pane names\n * no placement, as a submenu's does not. Throws while the menu is closed.\n *\n * Read off the pane's public modifier class, since a bound `position` never\n * reaches the DOM. The class names the placement the menu LANDED on, which is\n * the one asked for unless it had no room there and flipped; in jsdom, with no\n * layout to run out of, the two are the same.\n */\n async getPosition(): Promise<WrDropdownPosition | null> {\n const pane = await this.documentRootLocatorFactory().locatorFor(\n `.wr-dropdown-overlay:has(> #${await this.menuId()})`\n )();\n const classes = (await pane.getAttribute('class')) ?? '';\n const modifier = /wr-dropdown-overlay--((?:top|bottom|left|right)(?:-(?:start|end))?)(?![a-z-])/.exec(classes);\n return modifier ? (modifier[1] as WrDropdownPosition) : null;\n }\n\n /**\n * Whether the menu takes its accessible name from this trigger.\n *\n * The menu carries no label of its own, so that reference IS its name — and the\n * id it points at is generated unless the consumer named the trigger\n * themselves, which is why a spec cannot simply hard-code one.\n */\n async isMenuLabelledByTrigger(): Promise<boolean> {\n const labelledBy = await (await this.menu()).getAttribute('aria-labelledby');\n return labelledBy !== null && labelledBy === (await (await this.host()).getAttribute('id'));\n }\n\n /**\n * Open the menu, whichever gesture this dropdown listens for.\n *\n * `trigger` is not reflected in the DOM, so the harness cannot ask which mode it\n * is in: it moves the pointer on first and falls back to a click. Hover leads\n * because a click is an outside pointer event for every OTHER open overlay — so\n * leading with it would shut someone else's menu on the way to opening this one\n * — and a `trigger=\"click\"` dropdown ignores the hover outright.\n */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n const host = await this.host();\n\n await host.hover();\n if (await this.isOpen()) return;\n\n await host.click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.open(): the menu did not open — neither hovering the trigger nor clicking it ' +\n 'had any effect. Both gestures were tried, so the `trigger` mode is not the cause; check that this ' +\n 'element is the trigger you meant and that it is not disabled (isDisabled()). openByKeyboard() is ' +\n 'the third route in.'\n );\n }\n\n /**\n * Open the menu from the keyboard — ArrowDown on the trigger, the APG\n * menu-button path (ArrowUp / Enter / Space do the same). Focus stays on the\n * trigger unless the dropdown sets `wrDropdownAutoFocus`.\n *\n * Worth its own method rather than an argument to `open()`: it is the only way\n * to get TWO dropdowns open at once, because clicking a second trigger is an\n * outside pointer event for the first and closes it.\n */\n async openByKeyboard(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).sendKeys(TestKey.DOWN_ARROW);\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.openByKeyboard(): ArrowDown on the trigger did not open the menu. The component ' +\n 'takes ArrowDown / ArrowUp / Enter / Space in EVERY `trigger` mode, so the mode is not the cause; ' +\n 'check that this element is the trigger you meant and that it is not disabled (isDisabled()).'\n );\n }\n\n /** Close the menu. A closed dropdown is left alone. */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n const host = await this.host();\n\n // Pointer-out leads for the reason `open()` hovers first: it closes a\n // `trigger=\"hover\"` dropdown without a click, and the click a `trigger=\"click\"`\n // one needs would also count as an outside press for every other open overlay.\n await host.mouseAway();\n if (!(await this.isOpen())) return;\n\n await host.click();\n if (!(await this.isOpen())) return;\n\n throw new Error(\n 'WrDropdownHarness.close(): the menu is still open. Moving the pointer away closes a ' +\n '`trigger=\"hover\"` dropdown and a second click closes a `trigger=\"click\"` one; neither worked.'\n );\n }\n\n /** Click the trigger. A `trigger=\"hover\"` dropdown deliberately ignores this. */\n async clickTrigger(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move the pointer onto the trigger. Opens a `trigger=\"hover\"` dropdown. */\n async hoverTrigger(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer off the trigger. Closes a `trigger=\"hover\"` dropdown. */\n async mouseAwayFromTrigger(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * The items in this dropdown's menu, in DOM order.\n *\n * Throws while the menu is closed: the items do not exist anywhere until the\n * portal is attached, and an empty array reads like a menu that rendered\n * nothing — a failure three lines later instead of here.\n */\n async getItems(filters: WrDropdownItemHarnessFilters = {}): Promise<WrDropdownItemHarness[]> {\n return this.getAllHarnesses(WrDropdownItemHarness.with(filters));\n }\n\n /** The labels of the items in this dropdown's menu, in DOM order. */\n async getItemTexts(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getText()));\n }\n\n /**\n * Open the menu if it is closed, then click the first item matching the filters.\n *\n * Picking does NOT close the menu — there is no close-on-select in the item or\n * the menu, so a consumer who wants one calls `close()` themselves.\n */\n async clickItem(filters: WrDropdownItemHarnessFilters): Promise<void> {\n await this.open();\n\n const [item] = await this.getItems(filters);\n if (!item) {\n const offered = await this.getItemTexts();\n throw new Error(\n `WrDropdownHarness.clickItem(): no item matched ${JSON.stringify(filters)}. ` +\n `The menu offers: ${offered.join(', ')}.`\n );\n }\n\n await item.click();\n }\n\n /**\n * Open the menu if it is closed, then open the submenu of the item with this\n * label and answer with its harness: `getItems()`, `clickItem()` and a further\n * `openSubmenu()` all read that submenu and nothing else.\n *\n * A click opens it, since hovering waits out the item's `showDelay`.\n */\n async openSubmenu(text: string | RegExp): Promise<WrDropdownSubmenuHarness> {\n await this.open();\n\n const submenu = await this.getHarnessOrNull(WrDropdownSubmenuHarness.with({ text }));\n if (!submenu) {\n const offered = await this.getAllHarnesses(WrDropdownSubmenuHarness);\n const labels = await Promise.all(offered.map(item => item.getTriggerText()));\n throw new Error(\n `WrDropdownHarness.openSubmenu(): no item labelled ${String(text)} opens a submenu. ` +\n `Items with a submenu here: ${labels.join(', ') || 'none'}.`\n );\n }\n\n await submenu.open();\n return submenu;\n }\n\n /**\n * The label of the item that currently holds focus, or `null` when focus is\n * elsewhere.\n *\n * The menu roves focus rather than moving a visual cursor, so this is the only\n * way to ask where the keyboard is. Opening leaves focus on the trigger unless\n * the dropdown sets `wrDropdownAutoFocus`: send ArrowDown to the host\n * (`(await dropdown.host()).sendKeys(TestKey.DOWN_ARROW)`) to walk in at the\n * first ENABLED item, and the arrow keys walk from there over the enabled\n * items only (a disabled one is not a stop).\n */\n async getFocusedItemText(): Promise<string | null> {\n for (const item of await this.getItems()) {\n if (await item.isFocused()) return item.getText();\n }\n return null;\n }\n\n /**\n * A loader scoped to THIS dropdown's menu — the content loader every\n * `HarnessLoader` method on this class runs through, `getItems()` included.\n *\n * Scoped by the published id rather than by `.wr-dropdown-menu`: the overlay\n * container is shared, so a bare class query would answer with whichever\n * dropdown happened to open first.\n */\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.menuId()}`);\n }\n\n /** This dropdown's menu element in the overlay. */\n protected async menu(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.menuId()}`)();\n }\n\n /** The id the trigger publishes as `aria-controls`, which its menu carries. */\n private async menuId(): Promise<string> {\n const id = await (await this.host()).getAttribute('aria-controls');\n if (!id) {\n throw new Error(\n 'WrDropdownHarness: the menu is closed, so there is nothing inside it to read — call open() ' +\n 'first. The trigger publishes `aria-controls` only while its menu is open.'\n );\n }\n return id;\n }\n}\n\n/**\n * Test harness for an item carrying `[wrDropdownSubmenu]`, and the submenu it\n * opens. Usually reached through `openSubmenu()` on the level above.\n *\n * It is a `WrDropdownHarness` whose trigger is the item, so everything that\n * reads a menu reads the submenu, scoped the same way, by the id the item\n * publishes. Two things differ. `hoverTrigger()` opens nothing by itself: the\n * item waits out its `showDelay`, which is the spec's own fake timer to\n * advance. And clicking a leaf item closes every submenu, so `clickItem()`\n * leaves this one closed, while the root menu stays open as it always has.\n *\n * Which side the submenu opened on is not readable: jsdom has no layout.\n *\n * @example\n * ```ts\n * const file = await loader.getHarness(WrDropdownHarness.with({ text: 'File' }));\n * const exportAs = await file.openSubmenu('Export');\n *\n * expect(await exportAs.getItemTexts()).toEqual(['CSV', 'PDF', 'Excel']);\n * await exportAs.clickItem({ text: 'CSV' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownSubmenuHarness extends WrDropdownHarness {\n /** The class the directive puts on its item. */\n static override hostSelector = '.wr-dropdown-submenu-trigger';\n\n /** Open the submenu with a click on its item. */\n override async open(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownSubmenuHarness.open(): clicking the item did not open its submenu. A disabled item ' +\n 'opens nothing, and neither does one whose own menu has closed; check isOpen() on the level above.'\n );\n }\n\n /**\n * Open the submenu from the keyboard, with Enter on its item. Enter rather\n * than the arrow because the arrow that opens a submenu depends on the\n * reading direction, and Enter does not.\n */\n override async openByKeyboard(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).sendKeys(TestKey.ENTER);\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownSubmenuHarness.openByKeyboard(): Enter on the item did not open its submenu. Enter ' +\n 'reaches it through `<wr-dropdown-item>`, so check that the directive sits on one and that it is enabled.'\n );\n }\n\n /** Close the submenu with Escape typed inside it, which closes this level only. */\n override async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n\n await (await this.menu()).sendKeys(TestKey.ESCAPE);\n if (!(await this.isOpen())) return;\n\n throw new Error('WrDropdownSubmenuHarness.close(): the submenu is still open after Escape was typed in it.');\n }\n}\n"],"mappings":";;;;;;;AAuBA,IAAa,wBAAb,MAAa,8BAA8B,iBAAgB;CAEzD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAwC,CAAA,GAAE;EACpD,OAAO,IAAI,iBAAiB,uBAAuB,OAAO,CAAC,CACxD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAAS,iBAAiB,cAAc,QAAQ,QAAO,GAAI,IAAI,CAAC,CAAC,CAC3G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,WAAW,0BAA0B,CAAC,CAAA,EAAA,CAAI,KAAI;CACnE;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,MAAM;CAChD;CAGA,MAAM,aAAU;EACd,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,eAAe,MAAO;CACvE;CAGA,MAAM,aAAU;EACd,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,eAAe,MAAO;CACvE;CAGA,MAAM,UAAO;EACX,OAAQ,MAAM,KAAK,mBAAmB,yBAAyB,CAAC,CAAA,MAAQ;CAC1E;CAGA,MAAM,cAAW;EACf,MAAM,OAAO,MAAM,KAAK,mBAAmB,yBAAyB,CAAC,CAAA;EAGrE,OAAO,OAAO,KAAK,aAAa,WAAW,IAAI;CACjD;CA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AI,aAAa,eAAe;EACjE,IAAI,CAAC,IACH,MAAM,IAAI,MACR,sKAC6E;EAGjF,OAAO;CACT;;AA2BF,IAAa,2BAAb,cAA8C,kBAAiB;CAE7D,OAAgB,eAAe;CAGtB,MAAM,OAAI;EACjB,IAAI,MAAM,KAAK,OAAM,GAAI;EAEzB,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,MAAK;EAC/B,IAAI,MAAM,KAAK,OAAM,GAAI;EAEzB,MAAM,IAAI,MACR,gMACqG;CAEzG;CAOS,MAAM,iBAAc;EAC3B,IAAI,MAAM,KAAK,OAAM,GAAI;EAEzB,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,SAAS,QAAQ,KAAK;EAChD,IAAI,MAAM,KAAK,OAAM,GAAI;EAEzB,MAAM,IAAI,MACR,uMAC4G;CAEhH;CAGS,MAAM,QAAK;EAClB,IAAI,CAAE,MAAM,KAAK,OAAM,GAAK;EAE5B,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,SAAS,QAAQ,MAAM;EACjD,IAAI,CAAE,MAAM,KAAK,OAAM,GAAK;EAE5B,MAAM,IAAI,MAAM,2FAA2F;CAC7G"}
1
+ {"version":3,"file":"ngwr-dropdown-testing.mjs","names":[],"sources":["../../../projects/lib/dropdown/testing/wr-dropdown-item-harness.ts","../../../projects/lib/dropdown/testing/wr-dropdown-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 { WrDropdownItemHarnessFilters } from './types';\n\n/**\n * Test harness for one `<wr-dropdown-item>` inside a dropdown menu.\n *\n * The selector is the CLASS rather than the element: `.wr-dropdown-item` is what\n * the directive's own keyboard navigation queries, so it is the contract both\n * sides already rely on. Only the class, though — the directive narrows its query\n * to `:not(.wr-dropdown-item--disabled)` because it is looking for focus stops,\n * while a spec still has to be able to see a disabled item and assert that it is\n * one.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownItemHarness extends ComponentHarness {\n /** The class the item paints on its host, and the one arrow-key navigation looks for. */\n static hostSelector = '.wr-dropdown-item';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDropdownItemHarnessFilters = {}): HarnessPredicate<WrDropdownItemHarness> {\n return new HarnessPredicate(WrDropdownItemHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('checked', options.checked, async (harness, checked) => (await harness.isChecked()) === checked);\n }\n\n /** The item's label, trimmed. A leading icon is not part of it. */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-dropdown-item__label')()).text();\n }\n\n /** The role the item announces: `menuitem`, or `menuitemcheckbox` / `menuitemradio` when it has a checked state. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /**\n * The item's checked state: `true` or `false` for a `menuitemcheckbox` /\n * `menuitemradio`, `null` for a plain item that has none.\n */\n async isChecked(): Promise<boolean | null> {\n const value = await (await this.host()).getAttribute('aria-checked');\n return value === null ? null : value === 'true';\n }\n\n /** Whether the item refuses activation. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the item opens a submenu. `WrDropdownHarness.openSubmenu()` opens it. */\n async hasSubmenu(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-haspopup')) === 'menu';\n }\n\n /** Whether the item shows a leading icon. */\n async hasIcon(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-dropdown-item__icon')()) !== null;\n }\n\n /** The leading icon's registered name, or `null` when the item has no icon. */\n async getIconName(): Promise<string | null> {\n const icon = await this.locatorForOptional('.wr-dropdown-item__icon')();\n // `<wr-icon>` reflects the name it was asked for as `data-icon`, whether or not\n // that name is registered — so this answers what the item MEANT to draw.\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /** Whether the item holds the menu's roving focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Click the item. A disabled item throws instead.\n *\n * Refusing is the only honest answer: the item's own `disabled` guards the\n * KEYBOARD path only, and a pointer is stopped by `pointer-events: none` in the\n * stylesheet. jsdom loads no stylesheets, so a click dispatched here would land\n * on the host — exactly where the consumer bound `(click)` — and the spec would\n * record an activation that cannot happen in a browser. Assert `isDisabled()`\n * instead.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(\n `WrDropdownItemHarness.click(): \"${await this.getText()}\" is disabled, so clicking it would ` +\n 'report behaviour a browser cannot produce — the pointer is stopped by CSS, which jsdom does ' +\n 'not load. Assert isDisabled() instead.'\n );\n }\n\n return (await this.host()).click();\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 {\n type ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrDropdownPosition } from 'ngwr/dropdown';\n\nimport type { WrDropdownHarnessFilters, WrDropdownItemHarnessFilters } from './types';\nimport { WrDropdownItemHarness } from './wr-dropdown-item-harness';\n\n/**\n * Test harness for `[wrDropdown]` — the trigger, and the menu it opens.\n *\n * The harness matches the TRIGGER, because that is the only part of the dropdown\n * in the fixture: `<wr-dropdown-menu>` renders nothing of its own (it hands over\n * an `<ng-template>`), and the menu is portalled into the overlay container, a\n * sibling of the whole app. So every item is read through the document root,\n * scoped by the `aria-controls` id the trigger publishes while it is open — which\n * is what keeps two dropdowns on one page from answering with each other's items.\n *\n * That scoped loader is also this harness's CONTENT loader, so\n * `dropdown.getHarness(…)` resolves inside THIS dropdown's menu: the consumer's\n * own components in the menu are reachable without the spec ever touching the\n * overlay, and so is a nested `[wrDropdown]`. A submenu is reached with\n * `openSubmenu()`, which answers with a harness scoped to that submenu.\n *\n * @example\n * ```ts\n * const dropdown = await loader.getHarness(WrDropdownHarness.with({ text: 'Actions' }));\n *\n * await dropdown.open();\n * expect(await dropdown.getItemTexts()).toEqual(['Copy', 'Delete']);\n *\n * await dropdown.clickItem({ text: 'Copy' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownHarness extends ContentContainerComponentHarness {\n /** The directive's host — whatever element the consumer put `[wrDropdown]` on. */\n static hostSelector = '.wr-dropdown-trigger';\n\n /** Build a predicate that narrows the query. */\n static with<T extends WrDropdownHarness>(\n this: ComponentHarnessConstructor<T>,\n options: WrDropdownHarnessFilters = {}\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getTriggerText(), text)\n )\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The trigger's visible text. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the menu is showing. */\n async isOpen(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-expanded')) === 'true';\n }\n\n /**\n * Whether `wrDropdownDisabled` has turned the trigger off — read from\n * `wr-dropdown-trigger--disabled`, the one mark a disabled trigger carries.\n * The HOST's own `disabled` is another question: the directive never sets it,\n * so ask the host's harness (`WrButtonHarness.isDisabled()`).\n */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-dropdown-trigger--disabled');\n }\n\n /** The role the menu announces — `menu`. Throws while the menu is closed. */\n async getMenuRole(): Promise<string | null> {\n return (await this.menu()).getAttribute('role');\n }\n\n /**\n * Where the menu sits relative to the trigger, or `null` when its pane names\n * no placement, as a submenu's does not. Throws while the menu is closed.\n *\n * Read off the pane's public modifier class, since a bound `position` never\n * reaches the DOM. The class names the placement the menu LANDED on, which is\n * the one asked for unless it had no room there and flipped; in jsdom, with no\n * layout to run out of, the two are the same.\n */\n async getPosition(): Promise<WrDropdownPosition | null> {\n const pane = await this.documentRootLocatorFactory().locatorFor(\n `.wr-dropdown-overlay:has(> #${await this.menuId()})`\n )();\n const classes = (await pane.getAttribute('class')) ?? '';\n const modifier = /wr-dropdown-overlay--((?:top|bottom|left|right)(?:-(?:start|end))?)(?![a-z-])/.exec(classes);\n return modifier ? (modifier[1] as WrDropdownPosition) : null;\n }\n\n /**\n * Whether the menu takes its accessible name from this trigger.\n *\n * The menu carries no label of its own, so that reference IS its name — and the\n * id it points at is generated unless the consumer named the trigger\n * themselves, which is why a spec cannot simply hard-code one.\n */\n async isMenuLabelledByTrigger(): Promise<boolean> {\n const labelledBy = await (await this.menu()).getAttribute('aria-labelledby');\n return labelledBy !== null && labelledBy === (await (await this.host()).getAttribute('id'));\n }\n\n /**\n * Open the menu, whichever gesture this dropdown listens for.\n *\n * `trigger` is not reflected in the DOM, so the harness cannot ask which mode it\n * is in: it moves the pointer on first and falls back to a click. Hover leads\n * because a click is an outside pointer event for every OTHER open overlay — so\n * leading with it would shut someone else's menu on the way to opening this one\n * — and a `trigger=\"click\"` dropdown ignores the hover outright.\n */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n const host = await this.host();\n\n await host.hover();\n if (await this.isOpen()) return;\n\n await host.click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.open(): the menu did not open — neither hovering the trigger nor clicking it ' +\n 'had any effect. Both gestures were tried, so the `trigger` mode is not the cause; check that this ' +\n 'element is the trigger you meant and that it is not disabled (isDisabled()). openByKeyboard() is ' +\n 'the third route in.'\n );\n }\n\n /**\n * Open the menu from the keyboard — ArrowDown on the trigger, the APG\n * menu-button path (ArrowUp / Enter / Space do the same). Focus stays on the\n * trigger unless the dropdown sets `wrDropdownAutoFocus`.\n *\n * Worth its own method rather than an argument to `open()`: it is the only way\n * to get TWO dropdowns open at once, because clicking a second trigger is an\n * outside pointer event for the first and closes it.\n */\n async openByKeyboard(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).sendKeys(TestKey.DOWN_ARROW);\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.openByKeyboard(): ArrowDown on the trigger did not open the menu. The component ' +\n 'takes ArrowDown / ArrowUp / Enter / Space in EVERY `trigger` mode, so the mode is not the cause; ' +\n 'check that this element is the trigger you meant and that it is not disabled (isDisabled()).'\n );\n }\n\n /** Close the menu. A closed dropdown is left alone. */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n const host = await this.host();\n\n // Pointer-out leads for the reason `open()` hovers first: it closes a\n // `trigger=\"hover\"` dropdown without a click, and the click a `trigger=\"click\"`\n // one needs would also count as an outside press for every other open overlay.\n await host.mouseAway();\n if (!(await this.isOpen())) return;\n\n await host.click();\n if (!(await this.isOpen())) return;\n\n throw new Error(\n 'WrDropdownHarness.close(): the menu is still open. Moving the pointer away closes a ' +\n '`trigger=\"hover\"` dropdown and a second click closes a `trigger=\"click\"` one; neither worked.'\n );\n }\n\n /** Click the trigger. A `trigger=\"hover\"` dropdown deliberately ignores this. */\n async clickTrigger(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move the pointer onto the trigger. Opens a `trigger=\"hover\"` dropdown. */\n async hoverTrigger(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer off the trigger. Closes a `trigger=\"hover\"` dropdown. */\n async mouseAwayFromTrigger(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * The items in this dropdown's menu, in DOM order.\n *\n * Throws while the menu is closed: the items do not exist anywhere until the\n * portal is attached, and an empty array reads like a menu that rendered\n * nothing — a failure three lines later instead of here.\n */\n async getItems(filters: WrDropdownItemHarnessFilters = {}): Promise<WrDropdownItemHarness[]> {\n return this.getAllHarnesses(WrDropdownItemHarness.with(filters));\n }\n\n /** The labels of the items in this dropdown's menu, in DOM order. */\n async getItemTexts(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getText()));\n }\n\n /**\n * Open the menu if it is closed, then click the first item matching the filters.\n *\n * Picking does NOT close the menu — there is no close-on-select in the item or\n * the menu, so a consumer who wants one calls `close()` themselves.\n */\n async clickItem(filters: WrDropdownItemHarnessFilters): Promise<void> {\n await this.open();\n\n const [item] = await this.getItems(filters);\n if (!item) {\n const offered = await this.getItemTexts();\n throw new Error(\n `WrDropdownHarness.clickItem(): no item matched ${JSON.stringify(filters)}. ` +\n `The menu offers: ${offered.join(', ')}.`\n );\n }\n\n await item.click();\n }\n\n /**\n * Open the menu if it is closed, then open the submenu of the item with this\n * label and answer with its harness: `getItems()`, `clickItem()` and a further\n * `openSubmenu()` all read that submenu and nothing else.\n *\n * A click opens it, since hovering waits out the item's `showDelay`.\n */\n async openSubmenu(text: string | RegExp): Promise<WrDropdownSubmenuHarness> {\n await this.open();\n\n const submenu = await this.getHarnessOrNull(WrDropdownSubmenuHarness.with({ text }));\n if (!submenu) {\n const offered = await this.getAllHarnesses(WrDropdownSubmenuHarness);\n const labels = await Promise.all(offered.map(item => item.getTriggerText()));\n throw new Error(\n `WrDropdownHarness.openSubmenu(): no item labelled ${String(text)} opens a submenu. ` +\n `Items with a submenu here: ${labels.join(', ') || 'none'}.`\n );\n }\n\n await submenu.open();\n return submenu;\n }\n\n /**\n * The label of the item that currently holds focus, or `null` when focus is\n * elsewhere.\n *\n * The menu roves focus rather than moving a visual cursor, so this is the only\n * way to ask where the keyboard is. Opening leaves focus on the trigger unless\n * the dropdown sets `wrDropdownAutoFocus`: send ArrowDown to the host\n * (`(await dropdown.host()).sendKeys(TestKey.DOWN_ARROW)`) to walk in at the\n * first ENABLED item, and the arrow keys walk from there over the enabled\n * items only (a disabled one is not a stop).\n */\n async getFocusedItemText(): Promise<string | null> {\n for (const item of await this.getItems()) {\n if (await item.isFocused()) return item.getText();\n }\n return null;\n }\n\n /**\n * A loader scoped to THIS dropdown's menu — the content loader every\n * `HarnessLoader` method on this class runs through, `getItems()` included.\n *\n * Scoped by the published id rather than by `.wr-dropdown-menu`: the overlay\n * container is shared, so a bare class query would answer with whichever\n * dropdown happened to open first.\n */\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.menuId()}`);\n }\n\n /** This dropdown's menu element in the overlay. */\n protected async menu(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.menuId()}`)();\n }\n\n /** The id the trigger publishes as `aria-controls`, which its menu carries. */\n private async menuId(): Promise<string> {\n const id = await (await this.host()).getAttribute('aria-controls');\n if (!id) {\n throw new Error(\n 'WrDropdownHarness: the menu is closed, so there is nothing inside it to read — call open() ' +\n 'first. The trigger publishes `aria-controls` only while its menu is open.'\n );\n }\n return id;\n }\n}\n\n/**\n * Test harness for an item carrying `[wrDropdownSubmenu]`, and the submenu it\n * opens. Usually reached through `openSubmenu()` on the level above.\n *\n * It is a `WrDropdownHarness` whose trigger is the item, so everything that\n * reads a menu reads the submenu, scoped the same way, by the id the item\n * publishes. Two things differ. `hoverTrigger()` opens nothing by itself: the\n * item waits out its `showDelay`, which is the spec's own fake timer to\n * advance. And clicking a leaf item closes every submenu, so `clickItem()`\n * leaves this one closed, while the root menu stays open as it always has.\n *\n * Which side the submenu opened on is not readable: jsdom has no layout.\n *\n * @example\n * ```ts\n * const file = await loader.getHarness(WrDropdownHarness.with({ text: 'File' }));\n * const exportAs = await file.openSubmenu('Export');\n *\n * expect(await exportAs.getItemTexts()).toEqual(['CSV', 'PDF', 'Excel']);\n * await exportAs.clickItem({ text: 'CSV' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownSubmenuHarness extends WrDropdownHarness {\n /** The class the directive puts on its item. */\n static override hostSelector = '.wr-dropdown-submenu-trigger';\n\n /** Open the submenu with a click on its item. */\n override async open(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownSubmenuHarness.open(): clicking the item did not open its submenu. A disabled item ' +\n 'opens nothing, and neither does one whose own menu has closed; check isOpen() on the level above.'\n );\n }\n\n /**\n * Open the submenu from the keyboard, with Enter on its item. Enter rather\n * than the arrow because the arrow that opens a submenu depends on the\n * reading direction, and Enter does not.\n */\n override async openByKeyboard(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).sendKeys(TestKey.ENTER);\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownSubmenuHarness.openByKeyboard(): Enter on the item did not open its submenu. Enter ' +\n 'reaches it through `<wr-dropdown-item>`, so check that the directive sits on one and that it is enabled.'\n );\n }\n\n /** Close the submenu with Escape typed inside it, which closes this level only. */\n override async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n\n await (await this.menu()).sendKeys(TestKey.ESCAPE);\n if (!(await this.isOpen())) return;\n\n throw new Error('WrDropdownSubmenuHarness.close(): the submenu is still open after Escape was typed in it.');\n }\n}\n"],"mappings":";;;;;;;AAuBA,IAAa,wBAAb,MAAa,8BAA8B,iBAAgB;CAEzD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAwC,CAAA,GAAE;EACpD,OAAO,IAAI,iBAAiB,uBAAuB,OAAO,CAAC,CACxD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAAS,iBAAiB,cAAc,QAAQ,QAAO,GAAI,IAAI,CAAC,CAAC,CAC3G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ,CAAC,CAC/G,UAAU,WAAW,QAAQ,SAAS,OAAO,SAAS,YAAa,MAAM,QAAQ,UAAS,MAAQ,OAAO;CAC9G;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,WAAW,0BAA0B,CAAC,CAAA,EAAA,CAAI,KAAI;CACnE;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,MAAM;CAChD;CA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CAC7G"}
@@ -291,7 +291,7 @@ var WrDropdown = class WrDropdown {
291
291
  onOverlayMouseLeave = (event) => this.onMenusLeave(event.relatedTarget);
292
292
  static ɵfac = i0.ɵɵngDeclareFactory({
293
293
  minVersion: "12.0.0",
294
- version: "22.2.6",
294
+ version: "22.3.0",
295
295
  ngImport: i0,
296
296
  type: WrDropdown,
297
297
  deps: [],
@@ -299,7 +299,7 @@ var WrDropdown = class WrDropdown {
299
299
  });
300
300
  static ɵdir = i0.ɵɵngDeclareDirective({
301
301
  minVersion: "17.1.0",
302
- version: "22.2.6",
302
+ version: "22.3.0",
303
303
  type: WrDropdown,
304
304
  isStandalone: true,
305
305
  selector: "[wrDropdown]",
@@ -380,7 +380,7 @@ var WrDropdown = class WrDropdown {
380
380
  };
381
381
  i0.ɵɵngDeclareClassMetadata({
382
382
  minVersion: "12.0.0",
383
- version: "22.2.6",
383
+ version: "22.3.0",
384
384
  ngImport: i0,
385
385
  type: WrDropdown,
386
386
  decorators: [{
@@ -486,7 +486,7 @@ var WrDropdownMenu = class WrDropdownMenu {
486
486
  triggerId = signal(null, ...ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []);
487
487
  static ɵfac = i0.ɵɵngDeclareFactory({
488
488
  minVersion: "12.0.0",
489
- version: "22.2.6",
489
+ version: "22.3.0",
490
490
  ngImport: i0,
491
491
  type: WrDropdownMenu,
492
492
  deps: [],
@@ -494,7 +494,7 @@ var WrDropdownMenu = class WrDropdownMenu {
494
494
  });
495
495
  static ɵcmp = i0.ɵɵngDeclareComponent({
496
496
  minVersion: "17.2.0",
497
- version: "22.2.6",
497
+ version: "22.3.0",
498
498
  type: WrDropdownMenu,
499
499
  isStandalone: true,
500
500
  selector: "wr-dropdown-menu",
@@ -515,7 +515,7 @@ var WrDropdownMenu = class WrDropdownMenu {
515
515
  };
516
516
  i0.ɵɵngDeclareClassMetadata({
517
517
  minVersion: "12.0.0",
518
- version: "22.2.6",
518
+ version: "22.3.0",
519
519
  ngImport: i0,
520
520
  type: WrDropdownMenu,
521
521
  decorators: [{
@@ -549,8 +549,19 @@ var WrDropdownItem = class WrDropdownItem {
549
549
  ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
550
550
  transform: coerceBooleanProperty
551
551
  });
552
+ checked = input(null, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
553
+ radio = input(false, {
554
+ ...ngDevMode ? { debugName: "radio" } : /* istanbul ignore next */ {},
555
+ transform: coerceBooleanProperty
556
+ });
557
+ role = computed(() => {
558
+ if (this.checked() === null) return "menuitem";
559
+ return this.radio() ? "menuitemradio" : "menuitemcheckbox";
560
+ }, ...ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []);
552
561
  classes = computed(() => {
553
562
  const parts = [];
563
+ if (this.checked() !== null) parts.push("wr-dropdown-item--checkable");
564
+ if (this.checked()) parts.push("wr-dropdown-item--checked");
554
565
  if (this.disabled()) parts.push("wr-dropdown-item--disabled");
555
566
  return parts.join(" ");
556
567
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
@@ -562,7 +573,7 @@ var WrDropdownItem = class WrDropdownItem {
562
573
  }
563
574
  static ɵfac = i0.ɵɵngDeclareFactory({
564
575
  minVersion: "12.0.0",
565
- version: "22.2.6",
576
+ version: "22.3.0",
566
577
  ngImport: i0,
567
578
  type: WrDropdownItem,
568
579
  deps: [],
@@ -570,7 +581,7 @@ var WrDropdownItem = class WrDropdownItem {
570
581
  });
571
582
  static ɵcmp = i0.ɵɵngDeclareComponent({
572
583
  minVersion: "17.0.0",
573
- version: "22.2.6",
584
+ version: "22.3.0",
574
585
  type: WrDropdownItem,
575
586
  isStandalone: true,
576
587
  selector: "wr-dropdown-item",
@@ -588,23 +599,38 @@ var WrDropdownItem = class WrDropdownItem {
588
599
  isSignal: true,
589
600
  isRequired: false,
590
601
  transformFunction: null
602
+ },
603
+ checked: {
604
+ classPropertyName: "checked",
605
+ publicName: "checked",
606
+ isSignal: true,
607
+ isRequired: false,
608
+ transformFunction: null
609
+ },
610
+ radio: {
611
+ classPropertyName: "radio",
612
+ publicName: "radio",
613
+ isSignal: true,
614
+ isRequired: false,
615
+ transformFunction: null
591
616
  }
592
617
  },
593
618
  host: {
594
- attributes: { "role": "menuitem" },
595
619
  listeners: {
596
620
  "keydown.enter": "activate($event)",
597
621
  "keydown.space": "activate($event)"
598
622
  },
599
623
  properties: {
624
+ "attr.role": "role()",
600
625
  "class": "classes()",
601
626
  "attr.tabindex": "-1",
627
+ "attr.aria-checked": "checked() === null ? null : checked()",
602
628
  "attr.aria-disabled": "disabled() ? true : null"
603
629
  },
604
630
  classAttribute: "wr-dropdown-item"
605
631
  },
606
632
  ngImport: i0,
607
- template: "@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\n",
633
+ template: "@if (checked() !== null) {\n <span class=\"wr-dropdown-item__check\" aria-hidden=\"true\">\n @if (checked()) {\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\">\n <path d=\"m4 8.5 3 3 5-6\" stroke-linejoin=\"round\" />\n </svg>\n }\n </span>\n}\n@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\n",
608
634
  dependencies: [{
609
635
  kind: "component",
610
636
  type: WrIcon,
@@ -616,7 +642,7 @@ var WrDropdownItem = class WrDropdownItem {
616
642
  };
617
643
  i0.ɵɵngDeclareClassMetadata({
618
644
  minVersion: "12.0.0",
619
- version: "22.2.6",
645
+ version: "22.3.0",
620
646
  ngImport: i0,
621
647
  type: WrDropdownItem,
622
648
  decorators: [{
@@ -625,16 +651,17 @@ i0.ɵɵngDeclareClassMetadata({
625
651
  selector: "wr-dropdown-item",
626
652
  encapsulation: ViewEncapsulation.None,
627
653
  host: {
628
- role: "menuitem",
654
+ "[attr.role]": "role()",
629
655
  class: "wr-dropdown-item",
630
656
  "[class]": "classes()",
631
657
  "[attr.tabindex]": "-1",
658
+ "[attr.aria-checked]": "checked() === null ? null : checked()",
632
659
  "[attr.aria-disabled]": "disabled() ? true : null",
633
660
  "(keydown.enter)": "activate($event)",
634
661
  "(keydown.space)": "activate($event)"
635
662
  },
636
663
  imports: [WrIcon],
637
- template: "@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\n"
664
+ template: "@if (checked() !== null) {\n <span class=\"wr-dropdown-item__check\" aria-hidden=\"true\">\n @if (checked()) {\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\">\n <path d=\"m4 8.5 3 3 5-6\" stroke-linejoin=\"round\" />\n </svg>\n }\n </span>\n}\n@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\n"
638
665
  }]
639
666
  }],
640
667
  ctorParameters: () => [],
@@ -654,6 +681,22 @@ i0.ɵɵngDeclareClassMetadata({
654
681
  alias: "disabled",
655
682
  required: false
656
683
  }]
684
+ }],
685
+ checked: [{
686
+ type: i0.Input,
687
+ args: [{
688
+ isSignal: true,
689
+ alias: "checked",
690
+ required: false
691
+ }]
692
+ }],
693
+ radio: [{
694
+ type: i0.Input,
695
+ args: [{
696
+ isSignal: true,
697
+ alias: "radio",
698
+ required: false
699
+ }]
657
700
  }]
658
701
  }
659
702
  });
@@ -837,7 +880,7 @@ var WrDropdownSubmenu = class WrDropdownSubmenu {
837
880
  };
838
881
  static ɵfac = i0.ɵɵngDeclareFactory({
839
882
  minVersion: "12.0.0",
840
- version: "22.2.6",
883
+ version: "22.3.0",
841
884
  ngImport: i0,
842
885
  type: WrDropdownSubmenu,
843
886
  deps: [],
@@ -845,7 +888,7 @@ var WrDropdownSubmenu = class WrDropdownSubmenu {
845
888
  });
846
889
  static ɵdir = i0.ɵɵngDeclareDirective({
847
890
  minVersion: "17.1.0",
848
- version: "22.2.6",
891
+ version: "22.3.0",
849
892
  type: WrDropdownSubmenu,
850
893
  isStandalone: true,
851
894
  selector: "[wrDropdownSubmenu]",
@@ -893,7 +936,7 @@ var WrDropdownSubmenu = class WrDropdownSubmenu {
893
936
  };
894
937
  i0.ɵɵngDeclareClassMetadata({
895
938
  minVersion: "12.0.0",
896
- version: "22.2.6",
939
+ version: "22.3.0",
897
940
  ngImport: i0,
898
941
  type: WrDropdownSubmenu,
899
942
  decorators: [{