ngwr 16.2.0 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/badge/styles/_tag.scss +73 -1
  2. package/calendar/styles/_index.scss +22 -0
  3. package/carousel/styles/_index.scss +53 -1
  4. package/cascader/styles/_rules.scss +7 -0
  5. package/color-picker/styles/_index.scss +21 -0
  6. package/date-picker/styles/_index.scss +19 -0
  7. package/dropdown/styles/_index.scss +13 -19
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert-testing.mjs +70 -0
  10. package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +3 -3
  12. package/fesm2022/ngwr-anchor.mjs +17 -6
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  16. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  17. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  18. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  19. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  20. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  21. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  22. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  24. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  25. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  27. package/fesm2022/ngwr-animations-marquee.mjs +3 -3
  28. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  29. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  32. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  33. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  34. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  35. package/fesm2022/ngwr-animations-tilt.mjs +3 -3
  36. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  37. package/fesm2022/ngwr-avatar.mjs +3 -3
  38. package/fesm2022/ngwr-back-top.mjs +3 -3
  39. package/fesm2022/ngwr-badge.mjs +129 -11
  40. package/fesm2022/ngwr-badge.mjs.map +1 -1
  41. package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
  42. package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
  43. package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
  44. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  45. package/fesm2022/ngwr-burger-testing.mjs +45 -0
  46. package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-button.mjs +6 -6
  49. package/fesm2022/ngwr-calendar-testing.mjs +18 -0
  50. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-calendar.mjs +500 -73
  52. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  53. package/fesm2022/ngwr-card.mjs +9 -9
  54. package/fesm2022/ngwr-carousel-testing.mjs +24 -1
  55. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-carousel.mjs +73 -10
  57. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  58. package/fesm2022/ngwr-cascader.mjs +45 -37
  59. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  60. package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
  61. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  63. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  65. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  66. package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
  67. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-core.mjs +3 -3
  69. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
  70. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  72. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  73. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  74. package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
  75. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
  77. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
  79. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
  81. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
  83. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  87. package/fesm2022/ngwr-checkbox.mjs +6 -6
  88. package/fesm2022/ngwr-clipboard.mjs +3 -3
  89. package/fesm2022/ngwr-collapse.mjs +9 -9
  90. package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
  91. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  92. package/fesm2022/ngwr-color-picker.mjs +153 -37
  93. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  94. package/fesm2022/ngwr-command-palette.mjs +3 -3
  95. package/fesm2022/ngwr-comment.mjs +10 -6
  96. package/fesm2022/ngwr-comment.mjs.map +1 -1
  97. package/fesm2022/ngwr-compare-testing.mjs +84 -0
  98. package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
  99. package/fesm2022/ngwr-compare.mjs +3 -3
  100. package/fesm2022/ngwr-context-menu.mjs +28 -13
  101. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  102. package/fesm2022/ngwr-cookie.mjs +3 -3
  103. package/fesm2022/ngwr-copy-value.mjs +3 -3
  104. package/fesm2022/ngwr-counter.mjs +6 -6
  105. package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
  106. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-date-picker.mjs +342 -69
  108. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  109. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  110. package/fesm2022/ngwr-date.mjs +59 -8
  111. package/fesm2022/ngwr-date.mjs.map +1 -1
  112. package/fesm2022/ngwr-density.mjs +6 -6
  113. package/fesm2022/ngwr-descriptions.mjs +6 -6
  114. package/fesm2022/ngwr-dialog.mjs +18 -18
  115. package/fesm2022/ngwr-directives.mjs +15 -15
  116. package/fesm2022/ngwr-divider.mjs +3 -3
  117. package/fesm2022/ngwr-drawer.mjs +51 -29
  118. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  119. package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
  120. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-dropdown.mjs +70 -99
  122. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  123. package/fesm2022/ngwr-editor.mjs +4 -3
  124. package/fesm2022/ngwr-editor.mjs.map +1 -1
  125. package/fesm2022/ngwr-empty.mjs +3 -3
  126. package/fesm2022/ngwr-event-calendar.mjs +186 -33
  127. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  128. package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
  129. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  130. package/fesm2022/ngwr-file-upload.mjs +279 -16
  131. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  132. package/fesm2022/ngwr-form.mjs +9 -9
  133. package/fesm2022/ngwr-form.mjs.map +1 -1
  134. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  135. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-graph.mjs +664 -43
  137. package/fesm2022/ngwr-graph.mjs.map +1 -1
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +27 -8
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +27 -8
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +27 -8
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +27 -8
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +27 -8
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +27 -8
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +27 -8
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +27 -8
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +27 -8
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +27 -8
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +27 -8
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +27 -8
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +27 -8
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +27 -8
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +27 -8
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +27 -8
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +27 -8
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +27 -8
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +27 -8
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +27 -8
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +27 -8
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number-testing.mjs +11 -0
  187. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  188. package/fesm2022/ngwr-input-number.mjs +68 -7
  189. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  190. package/fesm2022/ngwr-input-otp.mjs +23 -3
  191. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  192. package/fesm2022/ngwr-input-testing.mjs +24 -1
  193. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-input.mjs +152 -36
  195. package/fesm2022/ngwr-input.mjs.map +1 -1
  196. package/fesm2022/ngwr-keyboard.mjs +3 -3
  197. package/fesm2022/ngwr-knob.mjs +3 -3
  198. package/fesm2022/ngwr-layout.mjs +15 -15
  199. package/fesm2022/ngwr-lightbox.mjs +8 -8
  200. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  201. package/fesm2022/ngwr-list.mjs +8 -8
  202. package/fesm2022/ngwr-list.mjs.map +1 -1
  203. package/fesm2022/ngwr-load-state.mjs +15 -15
  204. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  205. package/fesm2022/ngwr-mention.mjs +6 -6
  206. package/fesm2022/ngwr-meta.mjs +6 -6
  207. package/fesm2022/ngwr-overlay.mjs +175 -13
  208. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  209. package/fesm2022/ngwr-page-header.mjs +3 -3
  210. package/fesm2022/ngwr-pagination.mjs +6 -3
  211. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  212. package/fesm2022/ngwr-pipes.mjs +31 -29
  213. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  214. package/fesm2022/ngwr-platform.mjs +9 -9
  215. package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
  216. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-popconfirm.mjs +44 -63
  218. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  219. package/fesm2022/ngwr-popover-testing.mjs +7 -1
  220. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  221. package/fesm2022/ngwr-popover.mjs +58 -156
  222. package/fesm2022/ngwr-popover.mjs.map +1 -1
  223. package/fesm2022/ngwr-progress.mjs +50 -9
  224. package/fesm2022/ngwr-progress.mjs.map +1 -1
  225. package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
  226. package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  228. package/fesm2022/ngwr-qr.mjs +3 -3
  229. package/fesm2022/ngwr-radio.mjs +6 -6
  230. package/fesm2022/ngwr-rating.mjs +3 -3
  231. package/fesm2022/ngwr-resizable-testing.mjs +113 -0
  232. package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
  233. package/fesm2022/ngwr-resizable.mjs +3 -3
  234. package/fesm2022/ngwr-result.mjs +12 -12
  235. package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
  236. package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
  237. package/fesm2022/ngwr-schema-form.mjs +416 -19
  238. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  239. package/fesm2022/ngwr-scroll.mjs +3 -3
  240. package/fesm2022/ngwr-segmented.mjs +3 -3
  241. package/fesm2022/ngwr-select-testing.mjs +19 -0
  242. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  243. package/fesm2022/ngwr-select.mjs +361 -84
  244. package/fesm2022/ngwr-select.mjs.map +1 -1
  245. package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
  246. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
  247. package/fesm2022/ngwr-sidebar.mjs +3 -3
  248. package/fesm2022/ngwr-skeleton.mjs +3 -3
  249. package/fesm2022/ngwr-slider-testing.mjs +6 -0
  250. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  251. package/fesm2022/ngwr-slider.mjs +21 -3
  252. package/fesm2022/ngwr-slider.mjs.map +1 -1
  253. package/fesm2022/ngwr-sortable-list.mjs +29 -12
  254. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  255. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  256. package/fesm2022/ngwr-spinner.mjs +3 -3
  257. package/fesm2022/ngwr-splitter.mjs +3 -3
  258. package/fesm2022/ngwr-statistic.mjs +9 -9
  259. package/fesm2022/ngwr-stepper.mjs +42 -11
  260. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  261. package/fesm2022/ngwr-storage.mjs +3 -3
  262. package/fesm2022/ngwr-switch.mjs +3 -3
  263. package/fesm2022/ngwr-table-testing.mjs +157 -3
  264. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  265. package/fesm2022/ngwr-table.mjs +1051 -74
  266. package/fesm2022/ngwr-table.mjs.map +1 -1
  267. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  268. package/fesm2022/ngwr-tabs-testing.mjs +1 -1
  269. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  270. package/fesm2022/ngwr-tabs.mjs +15 -10
  271. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  272. package/fesm2022/ngwr-textarea-testing.mjs +11 -0
  273. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  274. package/fesm2022/ngwr-textarea.mjs +128 -16
  275. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  276. package/fesm2022/ngwr-theme.mjs +3 -3
  277. package/fesm2022/ngwr-timeline.mjs +6 -6
  278. package/fesm2022/ngwr-toast.mjs +40 -19
  279. package/fesm2022/ngwr-toast.mjs.map +1 -1
  280. package/fesm2022/ngwr-toolbar.mjs +3 -3
  281. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  282. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tour.mjs +19 -15
  284. package/fesm2022/ngwr-tour.mjs.map +1 -1
  285. package/fesm2022/ngwr-transfer-testing.mjs +6 -0
  286. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-transfer.mjs +24 -5
  288. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  289. package/fesm2022/ngwr-tree-testing.mjs +62 -2
  290. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  291. package/fesm2022/ngwr-tree.mjs +978 -79
  292. package/fesm2022/ngwr-tree.mjs.map +1 -1
  293. package/fesm2022/ngwr-typography.mjs +3 -3
  294. package/fesm2022/ngwr-utils-router.mjs +3 -3
  295. package/fesm2022/ngwr-utils.mjs +97 -1
  296. package/fesm2022/ngwr-utils.mjs.map +1 -1
  297. package/fesm2022/ngwr-version.mjs +1 -1
  298. package/fesm2022/ngwr-version.mjs.map +1 -1
  299. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-window.mjs +33 -22
  301. package/fesm2022/ngwr-window.mjs.map +1 -1
  302. package/file-upload/styles/_index.scss +156 -0
  303. package/graph/styles/_index.scss +87 -0
  304. package/i18n/ar.json +29 -8
  305. package/i18n/cs.json +29 -8
  306. package/i18n/de.json +29 -8
  307. package/i18n/en.json +29 -8
  308. package/i18n/es.json +29 -8
  309. package/i18n/fr.json +29 -8
  310. package/i18n/he.json +29 -8
  311. package/i18n/hi.json +29 -8
  312. package/i18n/id.json +29 -8
  313. package/i18n/it.json +29 -8
  314. package/i18n/ja.json +29 -8
  315. package/i18n/ko.json +29 -8
  316. package/i18n/nl.json +29 -8
  317. package/i18n/pl.json +29 -8
  318. package/i18n/pt.json +29 -8
  319. package/i18n/ru.json +29 -8
  320. package/i18n/sv.json +29 -8
  321. package/i18n/tr.json +29 -8
  322. package/i18n/uk.json +29 -8
  323. package/i18n/vi.json +29 -8
  324. package/i18n/zh-TW.json +29 -8
  325. package/i18n/zh.json +29 -8
  326. package/input/styles/_index.scss +68 -1
  327. package/input-otp/styles/_index.scss +14 -0
  328. package/llms-full.txt +53 -21
  329. package/llms.txt +57 -24
  330. package/overlay/styles/_arrow.scss +4 -4
  331. package/package.json +33 -1
  332. package/popconfirm/styles/_index.scss +3 -11
  333. package/progress/styles/_index.scss +32 -0
  334. package/schema-form/styles/_index.scss +78 -0
  335. package/schematics/collection.json +5 -0
  336. package/schematics/eject/index.js +158 -0
  337. package/schematics/eject/schema.js +8 -0
  338. package/schematics/eject/schema.json +24 -0
  339. package/schematics/eject/source.js +295 -0
  340. package/schematics/use/rule.js +2 -0
  341. package/schematics/use/symbol-map.json +5 -0
  342. package/select/styles/_index.scss +127 -22
  343. package/skills/ngwr/SKILL.md +31 -4
  344. package/skills/ngwr/references/catalog.md +9 -1
  345. package/slider/styles/_index.scss +22 -0
  346. package/table/styles/_index.scss +191 -3
  347. package/textarea/styles/_index.scss +80 -0
  348. package/theme/styles/_focus.scss +16 -1
  349. package/theme/styles/_motion.scss +5 -0
  350. package/transfer/styles/_index.scss +84 -0
  351. package/tree/styles/_index.scss +138 -5
  352. package/types/ngwr-alert-testing.d.ts +88 -0
  353. package/types/ngwr-badge.d.ts +72 -2
  354. package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
  355. package/types/ngwr-burger-testing.d.ts +51 -0
  356. package/types/ngwr-calendar-testing.d.ts +18 -6
  357. package/types/ngwr-calendar.d.ts +272 -22
  358. package/types/ngwr-carousel-testing.d.ts +27 -6
  359. package/types/ngwr-carousel.d.ts +42 -6
  360. package/types/ngwr-cascader.d.ts +13 -6
  361. package/types/ngwr-charts-chart-legend.d.ts +9 -4
  362. package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
  363. package/types/ngwr-charts-line-chart.d.ts +7 -4
  364. package/types/ngwr-color-picker-testing.d.ts +15 -4
  365. package/types/ngwr-color-picker.d.ts +76 -6
  366. package/types/ngwr-compare-testing.d.ts +72 -0
  367. package/types/ngwr-context-menu.d.ts +2 -0
  368. package/types/ngwr-date-picker-testing.d.ts +23 -8
  369. package/types/ngwr-date-picker.d.ts +100 -9
  370. package/types/ngwr-date.d.ts +71 -1
  371. package/types/ngwr-drawer.d.ts +9 -0
  372. package/types/ngwr-dropdown-testing.d.ts +20 -0
  373. package/types/ngwr-dropdown.d.ts +26 -6
  374. package/types/ngwr-event-calendar.d.ts +66 -8
  375. package/types/ngwr-file-upload-testing.d.ts +31 -2
  376. package/types/ngwr-file-upload.d.ts +156 -3
  377. package/types/ngwr-form.d.ts +47 -3
  378. package/types/ngwr-graph-testing.d.ts +36 -3
  379. package/types/ngwr-graph.d.ts +309 -13
  380. package/types/ngwr-input-number-testing.d.ts +10 -0
  381. package/types/ngwr-input-number.d.ts +30 -1
  382. package/types/ngwr-input-otp.d.ts +10 -0
  383. package/types/ngwr-input-testing.d.ts +30 -0
  384. package/types/ngwr-input.d.ts +54 -3
  385. package/types/ngwr-overlay.d.ts +84 -5
  386. package/types/ngwr-pipes.d.ts +2 -1
  387. package/types/ngwr-popconfirm-testing.d.ts +12 -3
  388. package/types/ngwr-popconfirm.d.ts +28 -3
  389. package/types/ngwr-popover-testing.d.ts +19 -2
  390. package/types/ngwr-popover.d.ts +22 -2
  391. package/types/ngwr-progress.d.ts +29 -1
  392. package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
  393. package/types/ngwr-resizable-testing.d.ts +116 -0
  394. package/types/ngwr-schema-form-testing.d.ts +260 -0
  395. package/types/ngwr-schema-form.d.ts +76 -6
  396. package/types/ngwr-select-testing.d.ts +20 -0
  397. package/types/ngwr-select.d.ts +149 -11
  398. package/types/ngwr-sidebar-testing.d.ts +176 -0
  399. package/types/ngwr-slider-testing.d.ts +3 -1
  400. package/types/ngwr-slider.d.ts +21 -1
  401. package/types/ngwr-sortable-list.d.ts +6 -0
  402. package/types/ngwr-stepper.d.ts +20 -11
  403. package/types/ngwr-table-testing.d.ts +122 -7
  404. package/types/ngwr-table.d.ts +572 -50
  405. package/types/ngwr-tabs-testing.d.ts +14 -17
  406. package/types/ngwr-tabs.d.ts +6 -0
  407. package/types/ngwr-textarea-testing.d.ts +10 -0
  408. package/types/ngwr-textarea.d.ts +48 -2
  409. package/types/ngwr-toast.d.ts +8 -1
  410. package/types/ngwr-tour-testing.d.ts +10 -0
  411. package/types/ngwr-tour.d.ts +11 -2
  412. package/types/ngwr-transfer-testing.d.ts +3 -0
  413. package/types/ngwr-transfer.d.ts +24 -1
  414. package/types/ngwr-tree-testing.d.ts +65 -1
  415. package/types/ngwr-tree.d.ts +335 -12
  416. package/types/ngwr-utils.d.ts +107 -1
  417. package/types/ngwr-version.d.ts +1 -1
  418. package/types/ngwr-window.d.ts +7 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-popover-testing.mjs","names":[],"sources":["../../../projects/lib/popover/testing/wr-popover-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 {\n ContentContainerComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrPopoverPosition } from 'ngwr/popover';\n\nimport type { WrPopoverHarnessFilters } from './types';\n\n/** How long the waiters poll before giving up, in ms. Generous next to the 120ms default delays. */\nconst DEFAULT_TIMEOUT = 1000;\n\n/** How often they re-check, in ms. */\nconst POLL_STEP = 10;\n\n/**\n * The real `setTimeout`, captured at module load — before a spec can install\n * fake timers.\n *\n * The waiters have to let REAL time pass: the show / hide delays are plain\n * `setTimeout`s inside the directive, and under zoneless change detection\n * `whenStable()` resolves without waiting for a macrotask. Reading the faked\n * global instead would mean the sleep never fires at all, and the harness would\n * hang where it should fail with the message it prepared.\n */\nconst realSetTimeout = globalThis.setTimeout;\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise(resolve => {\n realSetTimeout(resolve, ms);\n });\n}\n\n/**\n * Test harness for `[wrPopover]` — both shapes the one directive ships:\n *\n * - **popover** — template content, opens on click (or hover), announces\n * `role=\"dialog\"` and is what the trigger's `aria-expanded` describes;\n * - **tooltip** — string content, opens after a delay on hover or on KEYBOARD\n * focus (never on a `.focus()` call — see {@link focus}), announces\n * `role=\"tooltip\"` and DESCRIBES its trigger instead of being owned by it.\n *\n * The panel is never inside the trigger: it is a portal in the overlay\n * container, a sibling of the whole app. It is reached through the document\n * root, scoped by the id the trigger publishes while the panel is showing —\n * `aria-controls` in popover mode, `aria-describedby` in tooltip mode. That id\n * is what lets two popovers be open at once without reading each other's\n * content, and it is why every panel reader throws while the panel is shut:\n * there is no element to answer about.\n *\n * Being a CONTENT CONTAINER is the point in popover mode — the panel holds the\n * consumer's own components, so `popover.getHarness(WrButtonHarness…)` reaches\n * them without the spec ever touching the overlay.\n *\n * **Timing.** A tooltip opens on `showDelay` and hides on `hideDelay`; a hover\n * popover hides 120ms after the pointer leaves. `open()`, `close()` and the two\n * waiters sit out that REAL time, so a spec that installs fake timers should\n * drive the clock itself and read `isOpen()` rather than call them.\n *\n * @example\n * ```ts\n * const loader = TestbedHarnessEnvironment.loader(fixture);\n * const details = await loader.getHarness(WrPopoverHarness.with({ triggerText: 'Details' }));\n *\n * await details.open();\n * expect(await details.getRole()).toBe('dialog');\n * await (await details.getHarness(WrButtonHarness.with({ text: 'Confirm' }))).click();\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrPopoverHarness extends ContentContainerComponentHarness {\n /**\n * The directive's host — whatever element the consumer put `[wrPopover]` on.\n *\n * Matched by the marker class, not by `[wrPopover]`: popover-mode content is a\n * `TemplateRef` and so is always BOUND (`[wrPopover]=\"tpl\"`), which leaves no\n * attribute in the DOM at all, and a CLOSED tooltip publishes no ARIA either.\n * (A tooltip written with the static string form, `wrPopover=\"Save changes\"`,\n * does keep the attribute — but only that one shape would be findable by it.)\n * Same shape as `.wr-dropdown-trigger`.\n */\n static hostSelector = '.wr-popover-trigger';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrPopoverHarnessFilters = {}): HarnessPredicate<WrPopoverHarness> {\n return new HarnessPredicate(WrPopoverHarness, options)\n .addOption('triggerText', options.triggerText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getTriggerText(), text)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n /**\n * Which shape this trigger carries.\n *\n * Read from the ARIA contract, not from the `mode` input: a bound `[mode]`\n * never reaches the DOM, while `aria-haspopup=\"dialog\"` is on every popover\n * trigger and on no tooltip trigger — a tooltip is a description of the\n * control, not a popup it owns.\n */\n async getMode(): Promise<'popover' | 'tooltip'> {\n return (await (await this.host()).getAttribute('aria-haspopup')) === 'dialog' ? 'popover' : 'tooltip';\n }\n\n /** The trigger's own visible text. The panel's content is `getContentText()`. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /**\n * Whether the panel is showing.\n *\n * Two different signals because the two modes advertise different things: a\n * popover flips `aria-expanded` on its trigger, a tooltip has none at all and\n * links its description instead. So a tooltip's answer is only as good as the\n * directive's claim on `aria-describedby` — put the tooltip on a control that\n * is ALSO described by something else (a `<wr-form-field>` hint, say) and the\n * two bindings fight over one attribute.\n */\n async isOpen(): Promise<boolean> {\n const host = await this.host();\n return (await this.getMode()) === 'popover'\n ? (await host.getAttribute('aria-expanded')) === 'true'\n : (await host.getAttribute('aria-describedby')) !== null;\n }\n\n /**\n * Open the panel with the gesture this trigger actually answers to, and wait\n * until it is showing.\n *\n * `trigger` is an input, so the DOM does not say which gesture this popover\n * wants — the harness moves the pointer on first and falls back to a click.\n * Hover leads because a click is an outside pointer event for every OTHER open\n * panel, so leading with it would dismiss someone else's popover on the way to\n * opening this one; a click-driven popover ignores the hover outright. A\n * tooltip is never clicked at all, and hover is the only one of its two\n * gestures a harness can perform — the other is a keyboard focus, which is\n * `FocusMonitor`'s to grant (see {@link focus}).\n *\n * Throws when nothing appears: a tooltip with an empty string never opens, and\n * a spec on fake timers has to advance the clock itself.\n */\n async open(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (await this.isOpen()) return;\n\n const host = await this.host();\n await host.hover();\n if ((await this.getMode()) === 'tooltip') return this.waitUntilOpen(timeout);\n\n if (await this.isOpen()) return;\n await host.click();\n return this.waitUntilOpen(timeout);\n }\n\n /**\n * Dismiss the panel and wait until it is gone.\n *\n * Escape, because it is the one gesture both modes honour immediately: a\n * popover is closed by the overlay's keyboard dispatcher, a tooltip by the\n * directive's own binding — no delay in either. To exercise the delayed\n * pointer path instead, call `mouseAway()` and then `waitUntilClosed()`.\n */\n async close(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (!(await this.isOpen())) return;\n\n await this.sendEscape();\n return this.waitUntilClosed(timeout);\n }\n\n /** Click the trigger. Opens a click-driven popover, toggles it shut again, and does nothing else. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move the pointer onto the trigger — opens a hover popover at once, a tooltip after `showDelay`. */\n async hover(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer off the trigger. The panel goes after the grace period, not instantly. */\n async mouseAway(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * Focus the trigger PROGRAMMATICALLY — and note that this does not open a\n * tooltip.\n *\n * `TestElement.focus()` is a `.focus()` call, which is the one kind of focus a\n * tooltip deliberately ignores: it shows for a KEYBOARD focus only, because\n * every overlay in the catalog hands focus back to the trigger it was opened\n * from, and a tooltip that answered those appeared with no pointer to leave and\n * no focus to lose. So this method is the way to assert that NOTHING happens.\n *\n * There is no keyboard-origin twin, and it cannot be written honestly here:\n * origin is `FocusMonitor`'s answer, this class has no injector, and the Tab\n * that would earn it moves focus in a browser and not in jsdom. A spec that\n * needs the opening gesture drives `FocusMonitor.focusVia(el, 'keyboard')`\n * itself, the way `popover.spec.ts` does — or uses `hover()`.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blur the trigger, which hides a tooltip after `hideDelay`. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Press Escape on the trigger. Both modes dismiss on it, and neither moves focus. */\n async sendEscape(): Promise<void> {\n return (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** Wait out a pending show. Resolves at once when the panel is already up. */\n async waitUntilOpen(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (await this.settled(true, timeout)) return;\n\n throw new Error(\n `WrPopoverHarness.waitUntilOpen(): nothing opened within ${timeout}ms. A tooltip waits out its ` +\n 'showDelay (and never opens at all for an empty string); this wait uses real time, so a spec on ' +\n 'fake timers has to advance the clock itself and read isOpen().'\n );\n }\n\n /** Wait out a pending hide. Resolves at once when the panel is already gone. */\n async waitUntilClosed(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (await this.settled(false, timeout)) return;\n\n throw new Error(\n `WrPopoverHarness.waitUntilClosed(): still showing after ${timeout}ms. A hover popover closes 120ms ` +\n 'after the pointer leaves — and only if it left at all, since a mouseleave INTO that panel is ' +\n 'deliberately not a leave. A tooltip closes on its hideDelay after mouseleave or blur.'\n );\n }\n\n /**\n * The panel's text.\n *\n * In tooltip mode that is the string itself, rendered into the small text\n * panel; in popover mode it is everything the projected template renders.\n */\n async getContentText(): Promise<string> {\n return (await this.panel()).text();\n }\n\n /**\n * The role the open panel announces: `'dialog'` for a popover, `'tooltip'` for\n * a tooltip.\n *\n * Worth asserting rather than assuming, twice over: the directive sets it on\n * the OVERLAY PANE, not on the content a consumer wrote, and in tooltip mode\n * the pane is deliberately the only element carrying it — the text panel\n * inside has none, or the description would nest a tooltip in a tooltip.\n */\n async getRole(): Promise<string | null> {\n return (await this.panel()).getAttribute('role');\n }\n\n /**\n * The panel's accessible name — `null` in tooltip mode.\n *\n * A popover is a named `role=\"dialog\"`: the `ariaLabel` input, or the i18n\n * catalog's `popover.label` when the consumer says nothing, because an unnamed\n * dialog announces as \"dialog\" and nothing else. A tooltip has no name of its\n * own; it IS the trigger's description, which is `getDescriptionText()`.\n */\n async getLabel(): Promise<string | null> {\n return (await this.panel()).getAttribute('aria-label');\n }\n\n /**\n * Whether the panel claims modality.\n *\n * `false`, deliberately, and worth pinning: the popover sets\n * `aria-modal=\"false\"` because focus is NOT trapped and the panel dismisses on\n * outside click / Escape rather than blocking the page.\n */\n async isModal(): Promise<boolean> {\n return (await (await this.panel()).getAttribute('aria-modal')) === 'true';\n }\n\n /**\n * Where the panel sits relative to the trigger, or `null` when the pane\n * carries no placement class.\n *\n * The APPLIED position, not the requested one: CDK flips a placement that does\n * not fit to the next in its fallback chain and swaps the modifier class with\n * it. Under a unit test that is always the requested placement — jsdom measures\n * every box as 0×0, so the first candidate always \"fits\" — but in a browser the\n * two can differ, and this answers what is on screen. The directive defaults\n * the request per mode (`bottom` for a popover, `top` for a tooltip).\n *\n * The arrow itself is a `::after` pseudo-element, so it exists for no DOM query\n * at all; this class is the placement, and it is what the arrow's own CSS keys\n * off.\n */\n async getPosition(): Promise<WrPopoverPosition | null> {\n const classes = (await (await this.panel()).getAttribute('class')) ?? '';\n const modifier = /wr-(?:popover|tooltip)-overlay--([a-z-]+)/.exec(classes);\n return modifier ? (modifier[1] as WrPopoverPosition) : null;\n }\n\n /**\n * The text a screen reader reads as the TRIGGER'S DESCRIPTION, or `null` when\n * it describes nothing.\n *\n * This resolves `aria-describedby` the way an assistive technology would, so\n * it answers the whole of tooltip mode's naming contract in one call. Always\n * `null` for a popover, open or shut — a popover is a thing the trigger owns\n * (`aria-haspopup` / `aria-expanded`), never a description of it.\n */\n async getDescriptionText(): Promise<string | null> {\n const id = await (await this.host()).getAttribute('aria-describedby');\n if (!id) return null;\n\n const described = await this.documentRootLocatorFactory().locatorForOptional(`#${id}`)();\n return described ? described.text() : null;\n }\n\n /**\n * Harnesses for the consumer's own components are resolved inside THIS\n * instance's panel.\n *\n * Scoped by the published id rather than by `.wr-popover-overlay`: the overlay\n * container is shared, so a class query would answer with whichever popover\n * opened first.\n */\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.panelId()}`);\n }\n\n /** Poll until `isOpen()` reports `open`, and say whether it did. */\n private async settled(open: boolean, timeout: number): Promise<boolean> {\n for (let waited = 0; waited <= timeout; waited += POLL_STEP) {\n if ((await this.isOpen()) === open) return true;\n\n await sleep(POLL_STEP);\n await this.forceStabilize();\n }\n return false;\n }\n\n /** This instance's overlay pane. */\n private async panel(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.panelId()}`)();\n }\n\n /** The id the trigger publishes for its panel, which only exists while the panel does. */\n private async panelId(): Promise<string> {\n const attribute = (await this.getMode()) === 'popover' ? 'aria-controls' : 'aria-describedby';\n const id = await (await this.host()).getAttribute(attribute);\n\n if (!id) {\n throw new Error(\n `WrPopoverHarness: nothing is showing. The trigger publishes its panel id as ${attribute} only ` +\n 'while the panel is open — call open() first (a tooltip also has to wait out its showDelay).'\n );\n }\n return id;\n }\n}\n"],"mappings":";;;;;;;AAoBA,MAAM,kBAAkB;AAGxB,MAAM,YAAY;AAYlB,MAAM,iBAAiB,WAAW;AAElC,SAAS,MAAM,IAAU;CACvB,OAAO,IAAI,SAAQ,YAAU;EAC3B,eAAe,SAAS,EAAE;CAC5B,CAAC;AACH;AAwCA,IAAa,mBAAb,MAAa,yBAAyB,iCAAgC;CAWpE,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAmC,CAAA,GAAE;EAC/C,OAAO,IAAI,iBAAiB,kBAAkB,OAAO,CAAC,CACnD,UAAU,eAAe,QAAQ,cAAc,SAAS,SACvD,iBAAiB,cAAc,QAAQ,eAAc,GAAI,IAAI,CAAC,CAC/D,CACA,UAAU,QAAQ,QAAQ,MAAM,OAAO,SAAS,SAAU,MAAM,QAAQ,QAAO,MAAQ,IAAI,CAAC,CAC5F,UAAU,QAAQ,QAAQ,MAAM,OAAO,SAAS,SAAU,MAAM,QAAQ,OAAM,MAAQ,IAAI;CAC/F;CAUA,MAAM,UAAO;EACX,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,eAAe,MAAO,WAAW,YAAY;CAC9F;CAGA,MAAM,iBAAc;EAClB,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,KAAI;CACjC;CAYA,MAAM,SAAM;EACV,MAAM,OAAO,MAAM,KAAK,KAAI;EAC5B,OAAQ,MAAM,KAAK,QAAO,MAAQ,YAC7B,MAAM,KAAK,aAAa,eAAe,MAAO,SAC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KAAK,KAAI,EAAA,CAAI,aAAa,SAAS;EAE3D,IAAI,CAAC,IACH,MAAM,IAAI,MACR,+EAA+E,UAAS,kGACO;EAGnG,OAAO;CACT"}
1
+ {"version":3,"file":"ngwr-popover-testing.mjs","names":[],"sources":["../../../projects/lib/popover/testing/wr-popover-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 {\n ContentContainerComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrPopoverPosition } from 'ngwr/popover';\n\nimport type { WrPopoverHarnessFilters } from './types';\n\n/** How long the waiters poll before giving up, in ms. Generous next to the 120ms default delays. */\nconst DEFAULT_TIMEOUT = 1000;\n\n/** How often they re-check, in ms. */\nconst POLL_STEP = 10;\n\n/**\n * The real `setTimeout`, captured at module load — before a spec can install\n * fake timers.\n *\n * The waiters have to let REAL time pass: the show / hide delays are plain\n * `setTimeout`s inside the directive, and under zoneless change detection\n * `whenStable()` resolves without waiting for a macrotask. Reading the faked\n * global instead would mean the sleep never fires at all, and the harness would\n * hang where it should fail with the message it prepared.\n */\nconst realSetTimeout = globalThis.setTimeout;\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise(resolve => {\n realSetTimeout(resolve, ms);\n });\n}\n\n/**\n * Test harness for `[wrPopover]` — both shapes the one directive ships:\n *\n * - **popover** — template content, opens on click (or hover), announces\n * `role=\"dialog\"` and is what the trigger's `aria-expanded` describes;\n * - **tooltip** — string content, opens after a delay on hover or on KEYBOARD\n * focus (never on a `.focus()` call — see {@link focus}), announces\n * `role=\"tooltip\"` and DESCRIBES its trigger instead of being owned by it.\n *\n * The panel is never inside the trigger: it is a portal in the overlay\n * container, a sibling of the whole app. It is reached through the document\n * root, scoped by the id the trigger publishes while the panel is showing —\n * `aria-controls` in popover mode, `aria-describedby` in tooltip mode. That id\n * is what lets two popovers be open at once without reading each other's\n * content, and it is why every panel reader throws while the panel is shut:\n * there is no element to answer about.\n *\n * Being a CONTENT CONTAINER is the point in popover mode — the panel holds the\n * consumer's own components, so `popover.getHarness(WrButtonHarness…)` reaches\n * them without the spec ever touching the overlay.\n *\n * **Timing.** A tooltip opens on `showDelay` and hides on `hideDelay`; a hover\n * popover hides 120ms after the pointer leaves. `open()`, `close()` and the two\n * waiters sit out that REAL time, so a spec that installs fake timers should\n * drive the clock itself and read `isOpen()` rather than call them.\n *\n * @example\n * ```ts\n * const loader = TestbedHarnessEnvironment.loader(fixture);\n * const details = await loader.getHarness(WrPopoverHarness.with({ triggerText: 'Details' }));\n *\n * await details.open();\n * expect(await details.getRole()).toBe('dialog');\n * await (await details.getHarness(WrButtonHarness.with({ text: 'Confirm' }))).click();\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrPopoverHarness extends ContentContainerComponentHarness {\n /**\n * The directive's host — whatever element the consumer put `[wrPopover]` on.\n *\n * Matched by the marker class, not by `[wrPopover]`: popover-mode content is a\n * `TemplateRef` and so is always BOUND (`[wrPopover]=\"tpl\"`), which leaves no\n * attribute in the DOM at all, and a CLOSED tooltip publishes no ARIA either.\n * (A tooltip written with the static string form, `wrPopover=\"Save changes\"`,\n * does keep the attribute — but only that one shape would be findable by it.)\n * Same shape as `.wr-dropdown-trigger`.\n */\n static hostSelector = '.wr-popover-trigger';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrPopoverHarnessFilters = {}): HarnessPredicate<WrPopoverHarness> {\n return new HarnessPredicate(WrPopoverHarness, options)\n .addOption('triggerText', options.triggerText, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getTriggerText(), text)\n )\n .addOption(\n 'mode',\n options.mode,\n async (harness, mode) => !(await harness.isDisabled()) && (await harness.getMode()) === mode\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 /**\n * Which shape this trigger carries.\n *\n * Read from the ARIA contract, not from the `mode` input: a bound `[mode]`\n * never reaches the DOM, while `aria-haspopup=\"dialog\"` is on every popover\n * trigger and on no tooltip trigger — a tooltip is a description of the\n * control, not a popup it owns.\n *\n * Throws on a disabled trigger: `wrPopoverDisabled` withdraws that ARIA from\n * both shapes, and answering `'tooltip'` for a disabled popover would be a\n * guess.\n */\n async getMode(): Promise<'popover' | 'tooltip'> {\n if (await this.isDisabled()) {\n throw new Error(\n 'WrPopoverHarness.getMode(): the trigger is disabled (`wrPopoverDisabled`), and a disabled trigger ' +\n 'publishes no ARIA to tell a popover from a tooltip by. Assert isDisabled() instead.'\n );\n }\n return (await (await this.host()).getAttribute('aria-haspopup')) === 'dialog' ? 'popover' : 'tooltip';\n }\n\n /** The trigger's own visible text. The panel's content is `getContentText()`. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /**\n * Whether `wrPopoverDisabled` has turned the trigger off — read from\n * `wr-popover-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-popover-trigger--disabled');\n }\n\n /**\n * Whether the panel is showing.\n *\n * Two different signals because the two modes advertise different things: a\n * popover flips `aria-expanded` on its trigger, a tooltip has none at all and\n * links its description instead. So a tooltip's answer is only as good as the\n * directive's claim on `aria-describedby` — put the tooltip on a control that\n * is ALSO described by something else (a `<wr-form-field>` hint, say) and the\n * two bindings fight over one attribute.\n */\n async isOpen(): Promise<boolean> {\n if (await this.isDisabled()) return false;\n const host = await this.host();\n return (await this.getMode()) === 'popover'\n ? (await host.getAttribute('aria-expanded')) === 'true'\n : (await host.getAttribute('aria-describedby')) !== null;\n }\n\n /**\n * Open the panel with the gesture this trigger actually answers to, and wait\n * until it is showing.\n *\n * `trigger` is an input, so the DOM does not say which gesture this popover\n * wants — the harness moves the pointer on first and falls back to a click.\n * Hover leads because a click is an outside pointer event for every OTHER open\n * panel, so leading with it would dismiss someone else's popover on the way to\n * opening this one; a click-driven popover ignores the hover outright. A\n * tooltip is never clicked at all, and hover is the only one of its two\n * gestures a harness can perform — the other is a keyboard focus, which is\n * `FocusMonitor`'s to grant (see {@link focus}).\n *\n * Throws when nothing appears: a tooltip with an empty string never opens, and\n * a spec on fake timers has to advance the clock itself. Throws at once on a\n * disabled trigger, which no gesture opens.\n */\n async open(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(\n 'WrPopoverHarness.open(): the trigger is disabled (`wrPopoverDisabled`), so nothing opens it. ' +\n 'Assert isDisabled() instead of trying to open it.'\n );\n }\n if (await this.isOpen()) return;\n\n const host = await this.host();\n await host.hover();\n if ((await this.getMode()) === 'tooltip') return this.waitUntilOpen(timeout);\n\n if (await this.isOpen()) return;\n await host.click();\n return this.waitUntilOpen(timeout);\n }\n\n /**\n * Dismiss the panel and wait until it is gone.\n *\n * Escape, because it is the one gesture both modes honour immediately: a\n * popover is closed by the overlay's keyboard dispatcher, a tooltip by the\n * directive's own binding — no delay in either. To exercise the delayed\n * pointer path instead, call `mouseAway()` and then `waitUntilClosed()`.\n */\n async close(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (!(await this.isOpen())) return;\n\n await this.sendEscape();\n return this.waitUntilClosed(timeout);\n }\n\n /** Click the trigger. Opens a click-driven popover, toggles it shut again, and does nothing else. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move the pointer onto the trigger — opens a hover popover at once, a tooltip after `showDelay`. */\n async hover(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer off the trigger. The panel goes after the grace period, not instantly. */\n async mouseAway(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * Focus the trigger PROGRAMMATICALLY — and note that this does not open a\n * tooltip.\n *\n * `TestElement.focus()` is a `.focus()` call, which is the one kind of focus a\n * tooltip deliberately ignores: it shows for a KEYBOARD focus only, because\n * every overlay in the catalog hands focus back to the trigger it was opened\n * from, and a tooltip that answered those appeared with no pointer to leave and\n * no focus to lose. So this method is the way to assert that NOTHING happens.\n *\n * There is no keyboard-origin twin, and it cannot be written honestly here:\n * origin is `FocusMonitor`'s answer, this class has no injector, and the Tab\n * that would earn it moves focus in a browser and not in jsdom. A spec that\n * needs the opening gesture drives `FocusMonitor.focusVia(el, 'keyboard')`\n * itself, the way `popover.spec.ts` does — or uses `hover()`.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blur the trigger, which hides a tooltip after `hideDelay`. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Press Escape on the trigger. Both modes dismiss on it, and neither moves focus. */\n async sendEscape(): Promise<void> {\n return (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** Wait out a pending show. Resolves at once when the panel is already up. */\n async waitUntilOpen(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (await this.settled(true, timeout)) return;\n\n throw new Error(\n `WrPopoverHarness.waitUntilOpen(): nothing opened within ${timeout}ms. A tooltip waits out its ` +\n 'showDelay (and never opens at all for an empty string); this wait uses real time, so a spec on ' +\n 'fake timers has to advance the clock itself and read isOpen().'\n );\n }\n\n /** Wait out a pending hide. Resolves at once when the panel is already gone. */\n async waitUntilClosed(timeout = DEFAULT_TIMEOUT): Promise<void> {\n if (await this.settled(false, timeout)) return;\n\n throw new Error(\n `WrPopoverHarness.waitUntilClosed(): still showing after ${timeout}ms. A hover popover closes 120ms ` +\n 'after the pointer leaves — and only if it left at all, since a mouseleave INTO that panel is ' +\n 'deliberately not a leave. A tooltip closes on its hideDelay after mouseleave or blur.'\n );\n }\n\n /**\n * The panel's text.\n *\n * In tooltip mode that is the string itself, rendered into the small text\n * panel; in popover mode it is everything the projected template renders.\n */\n async getContentText(): Promise<string> {\n return (await this.panel()).text();\n }\n\n /**\n * The role the open panel announces: `'dialog'` for a popover, `'tooltip'` for\n * a tooltip.\n *\n * Worth asserting rather than assuming, twice over: the directive sets it on\n * the OVERLAY PANE, not on the content a consumer wrote, and in tooltip mode\n * the pane is deliberately the only element carrying it — the text panel\n * inside has none, or the description would nest a tooltip in a tooltip.\n */\n async getRole(): Promise<string | null> {\n return (await this.panel()).getAttribute('role');\n }\n\n /**\n * The panel's accessible name — `null` in tooltip mode.\n *\n * A popover is a named `role=\"dialog\"`: the `ariaLabel` input, or the i18n\n * catalog's `popover.label` when the consumer says nothing, because an unnamed\n * dialog announces as \"dialog\" and nothing else. A tooltip has no name of its\n * own; it IS the trigger's description, which is `getDescriptionText()`.\n */\n async getLabel(): Promise<string | null> {\n return (await this.panel()).getAttribute('aria-label');\n }\n\n /**\n * Whether the panel claims modality.\n *\n * `false`, deliberately, and worth pinning: the popover sets\n * `aria-modal=\"false\"` because focus is NOT trapped and the panel dismisses on\n * outside click / Escape rather than blocking the page.\n */\n async isModal(): Promise<boolean> {\n return (await (await this.panel()).getAttribute('aria-modal')) === 'true';\n }\n\n /**\n * Where the panel sits relative to the trigger, or `null` when the pane\n * carries no placement class.\n *\n * The APPLIED position, not the requested one: CDK flips a placement that does\n * not fit to the next in its fallback chain and swaps the modifier class with\n * it. Under a unit test that is always the requested placement — jsdom measures\n * every box as 0×0, so the first candidate always \"fits\" — but in a browser the\n * two can differ, and this answers what is on screen. The directive defaults\n * the request per mode (`bottom` for a popover, `top` for a tooltip).\n *\n * The arrow itself is a `::after` pseudo-element, so it exists for no DOM query\n * at all; this class is the placement, and it is what the arrow's own CSS keys\n * off.\n */\n async getPosition(): Promise<WrPopoverPosition | null> {\n const classes = (await (await this.panel()).getAttribute('class')) ?? '';\n const modifier = /wr-(?:popover|tooltip)-overlay--([a-z-]+)/.exec(classes);\n return modifier ? (modifier[1] as WrPopoverPosition) : null;\n }\n\n /**\n * The text a screen reader reads as the TRIGGER'S DESCRIPTION, or `null` when\n * it describes nothing.\n *\n * This resolves `aria-describedby` the way an assistive technology would, so\n * it answers the whole of tooltip mode's naming contract in one call. Always\n * `null` for a popover, open or shut — a popover is a thing the trigger owns\n * (`aria-haspopup` / `aria-expanded`), never a description of it.\n */\n async getDescriptionText(): Promise<string | null> {\n const id = await (await this.host()).getAttribute('aria-describedby');\n if (!id) return null;\n\n const described = await this.documentRootLocatorFactory().locatorForOptional(`#${id}`)();\n return described ? described.text() : null;\n }\n\n /**\n * Harnesses for the consumer's own components are resolved inside THIS\n * instance's panel.\n *\n * Scoped by the published id rather than by `.wr-popover-overlay`: the overlay\n * container is shared, so a class query would answer with whichever popover\n * opened first.\n */\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.panelId()}`);\n }\n\n /** Poll until `isOpen()` reports `open`, and say whether it did. */\n private async settled(open: boolean, timeout: number): Promise<boolean> {\n for (let waited = 0; waited <= timeout; waited += POLL_STEP) {\n if ((await this.isOpen()) === open) return true;\n\n await sleep(POLL_STEP);\n await this.forceStabilize();\n }\n return false;\n }\n\n /** This instance's overlay pane. */\n private async panel(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.panelId()}`)();\n }\n\n /** The id the trigger publishes for its panel, which only exists while the panel does. */\n private async panelId(): Promise<string> {\n const attribute = (await this.getMode()) === 'popover' ? 'aria-controls' : 'aria-describedby';\n const id = await (await this.host()).getAttribute(attribute);\n\n if (!id) {\n throw new Error(\n `WrPopoverHarness: nothing is showing. The trigger publishes its panel id as ${attribute} only ` +\n 'while the panel is open — call open() first (a tooltip also has to wait out its showDelay).'\n );\n }\n return id;\n }\n}\n"],"mappings":";;;;;;;AAoBA,MAAM,kBAAkB;AAGxB,MAAM,YAAY;AAYlB,MAAM,iBAAiB,WAAW;AAElC,SAAS,MAAM,IAAU;CACvB,OAAO,IAAI,SAAQ,YAAU;EAC3B,eAAe,SAAS,EAAE;CAC5B,CAAC;AACH;AAwCA,IAAa,mBAAb,MAAa,yBAA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  import { Component, DestroyRef, Directive, ElementRef, Injector, PLATFORM_ID, Service, ViewContainerRef, ViewEncapsulation, afterNextRender, afterRenderEffect, computed, effect, inject, input, output, signal, untracked } from "@angular/core";
3
+ import { coerceBooleanProperty } from "@angular/cdk/coercion";
3
4
  import { DOCUMENT as DOCUMENT$1, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
4
5
  import { WR_KEYS, wrCheckStyles, wrGetFocusableElements, wrNumAttr, wrRestoreFocus, wrToClassList } from "ngwr/utils";
5
6
  import { useI18nText } from "ngwr/i18n";
@@ -7,7 +8,7 @@ import { Directionality } from "@angular/cdk/bidi";
7
8
  import { ScrollStrategyOptions } from "@angular/cdk/overlay";
8
9
  import { ComponentPortal, TemplatePortal } from "@angular/cdk/portal";
9
10
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
10
- import { WR_OVERLAY, WrOutsideClick, wrFollowDirection, wrMirrorOffsets } from "ngwr/overlay";
11
+ import { WR_OVERLAY, WrOutsideClick, wrAnchoredPositions, wrFollowDirection, wrMirrorOffsets } from "ngwr/overlay";
11
12
  import { FocusMonitor } from "@angular/cdk/a11y";
12
13
  import { ViewportRuler } from "@angular/cdk/scrolling";
13
14
  /**
@@ -24,7 +25,7 @@ var WrChartTooltipPanel = class WrChartTooltipPanel {
24
25
  rows = computed(() => this.datum().rows ?? [], ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
25
26
  static ɵfac = i0.ɵɵngDeclareFactory({
26
27
  minVersion: "12.0.0",
27
- version: "22.2.5",
28
+ version: "22.2.6",
28
29
  ngImport: i0,
29
30
  type: WrChartTooltipPanel,
30
31
  deps: [],
@@ -32,7 +33,7 @@ var WrChartTooltipPanel = class WrChartTooltipPanel {
32
33
  });
33
34
  static ɵcmp = i0.ɵɵngDeclareComponent({
34
35
  minVersion: "17.0.0",
35
- version: "22.2.5",
36
+ version: "22.2.6",
36
37
  type: WrChartTooltipPanel,
37
38
  isStandalone: true,
38
39
  selector: "wr-chart-tooltip",
@@ -64,7 +65,7 @@ var WrChartTooltipPanel = class WrChartTooltipPanel {
64
65
  };
65
66
  i0.ɵɵngDeclareClassMetadata({
66
67
  minVersion: "12.0.0",
67
- version: "22.2.5",
68
+ version: "22.2.6",
68
69
  ngImport: i0,
69
70
  type: WrChartTooltipPanel,
70
71
  decorators: [{
@@ -475,7 +476,7 @@ var WrCurrentKeystroke = class WrCurrentKeystroke {
475
476
  }
476
477
  static ɵfac = i0.ɵɵngDeclareFactory({
477
478
  minVersion: "12.0.0",
478
- version: "22.2.5",
479
+ version: "22.2.6",
479
480
  ngImport: i0,
480
481
  type: WrCurrentKeystroke,
481
482
  deps: [],
@@ -483,14 +484,14 @@ var WrCurrentKeystroke = class WrCurrentKeystroke {
483
484
  });
484
485
  static ɵprov = i0.ɵɵngDeclareService({
485
486
  minVersion: "22.0.0",
486
- version: "22.2.5",
487
+ version: "22.2.6",
487
488
  ngImport: i0,
488
489
  type: WrCurrentKeystroke
489
490
  });
490
491
  };
491
492
  i0.ɵɵngDeclareClassMetadata({
492
493
  minVersion: "12.0.0",
493
- version: "22.2.5",
494
+ version: "22.2.6",
494
495
  ngImport: i0,
495
496
  type: WrCurrentKeystroke,
496
497
  decorators: [{ type: Service }],
@@ -509,7 +510,7 @@ var WrPopoverTextPanel = class WrPopoverTextPanel {
509
510
  text = input.required(...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
510
511
  static ɵfac = i0.ɵɵngDeclareFactory({
511
512
  minVersion: "12.0.0",
512
- version: "22.2.5",
513
+ version: "22.2.6",
513
514
  ngImport: i0,
514
515
  type: WrPopoverTextPanel,
515
516
  deps: [],
@@ -517,7 +518,7 @@ var WrPopoverTextPanel = class WrPopoverTextPanel {
517
518
  });
518
519
  static ɵcmp = i0.ɵɵngDeclareComponent({
519
520
  minVersion: "17.1.0",
520
- version: "22.2.5",
521
+ version: "22.2.6",
521
522
  type: WrPopoverTextPanel,
522
523
  isStandalone: true,
523
524
  selector: "wr-popover-text",
@@ -537,7 +538,7 @@ var WrPopoverTextPanel = class WrPopoverTextPanel {
537
538
  };
538
539
  i0.ɵɵngDeclareClassMetadata({
539
540
  minVersion: "12.0.0",
540
- version: "22.2.5",
541
+ version: "22.2.6",
541
542
  ngImport: i0,
542
543
  type: WrPopoverTextPanel,
543
544
  decorators: [{
@@ -565,141 +566,11 @@ i0.ɵɵngDeclareClassMetadata({
565
566
  * Use of this source code is governed by an MIT-style license that can be
566
567
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
567
568
  */
568
- const WR_POPOVER_POSITIONS = {
569
- top: {
570
- originX: "center",
571
- originY: "top",
572
- overlayX: "center",
573
- overlayY: "bottom",
574
- offsetY: -8
575
- },
576
- "top-start": {
577
- originX: "start",
578
- originY: "top",
579
- overlayX: "start",
580
- overlayY: "bottom",
581
- offsetY: -8
582
- },
583
- "top-end": {
584
- originX: "end",
585
- originY: "top",
586
- overlayX: "end",
587
- overlayY: "bottom",
588
- offsetY: -8
589
- },
590
- bottom: {
591
- originX: "center",
592
- originY: "bottom",
593
- overlayX: "center",
594
- overlayY: "top",
595
- offsetY: 8
596
- },
597
- "bottom-start": {
598
- originX: "start",
599
- originY: "bottom",
600
- overlayX: "start",
601
- overlayY: "top",
602
- offsetY: 8
603
- },
604
- "bottom-end": {
605
- originX: "end",
606
- originY: "bottom",
607
- overlayX: "end",
608
- overlayY: "top",
609
- offsetY: 8
610
- },
611
- left: {
612
- originX: "start",
613
- originY: "center",
614
- overlayX: "end",
615
- overlayY: "center",
616
- offsetX: -8
617
- },
618
- "left-start": {
619
- originX: "start",
620
- originY: "top",
621
- overlayX: "end",
622
- overlayY: "top",
623
- offsetX: -8
624
- },
625
- "left-end": {
626
- originX: "start",
627
- originY: "bottom",
628
- overlayX: "end",
629
- overlayY: "bottom",
630
- offsetX: -8
631
- },
632
- right: {
633
- originX: "end",
634
- originY: "center",
635
- overlayX: "start",
636
- overlayY: "center",
637
- offsetX: 8
638
- },
639
- "right-start": {
640
- originX: "end",
641
- originY: "top",
642
- overlayX: "start",
643
- overlayY: "top",
644
- offsetX: 8
645
- },
646
- "right-end": {
647
- originX: "end",
648
- originY: "bottom",
649
- overlayX: "start",
650
- overlayY: "bottom",
651
- offsetX: 8
652
- }
653
- };
654
- const WR_POPOVER_FALLBACKS = {
655
- top: ["top", "bottom"],
656
- "top-start": ["top-start", "bottom-start"],
657
- "top-end": ["top-end", "bottom-end"],
658
- bottom: ["bottom", "top"],
659
- "bottom-start": ["bottom-start", "top-start"],
660
- "bottom-end": ["bottom-end", "top-end"],
661
- left: [
662
- "left",
663
- "right",
664
- "bottom",
665
- "top"
666
- ],
667
- "left-start": [
668
- "left-start",
669
- "right-start",
670
- "bottom-start",
671
- "top-start"
672
- ],
673
- "left-end": [
674
- "left-end",
675
- "right-end",
676
- "bottom-end",
677
- "top-end"
678
- ],
679
- right: [
680
- "right",
681
- "left",
682
- "bottom",
683
- "top"
684
- ],
685
- "right-start": [
686
- "right-start",
687
- "left-start",
688
- "bottom-start",
689
- "top-start"
690
- ],
691
- "right-end": [
692
- "right-end",
693
- "left-end",
694
- "bottom-end",
695
- "top-end"
696
- ]
697
- };
698
569
  function wrPopoverPositions(position, paneClass) {
699
- return WR_POPOVER_FALLBACKS[position].map((name) => ({
700
- ...WR_POPOVER_POSITIONS[name],
701
- panelClass: `${paneClass}--${name}`
702
- }));
570
+ return wrAnchoredPositions(position, {
571
+ gap: 8,
572
+ paneClass
573
+ });
703
574
  }
704
575
  /**
705
576
  * @license
@@ -739,6 +610,11 @@ var WrPopover = class WrPopover {
739
610
  ...ngDevMode ? { debugName: "origin" } : /* istanbul ignore next */ {},
740
611
  alias: "wrPopoverOrigin"
741
612
  });
613
+ disabled = input(false, {
614
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
615
+ alias: "wrPopoverDisabled",
616
+ transform: coerceBooleanProperty
617
+ });
742
618
  ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
743
619
  panelClass = input(null, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
744
620
  opened = output();
@@ -773,6 +649,12 @@ var WrPopover = class WrPopover {
773
649
  if (this.isOpen()) this.openOverlay();
774
650
  else this.closeOverlay();
775
651
  });
652
+ effect(() => {
653
+ if (!this.disabled()) return;
654
+ this.clearTimers();
655
+ this.clearHoverClose();
656
+ this.openState.set(false);
657
+ });
776
658
  effect(() => {
777
659
  const content = this.content();
778
660
  this.textPanelRef?.setInput("text", typeof content === "string" ? content : "");
@@ -822,16 +704,18 @@ var WrPopover = class WrPopover {
822
704
  });
823
705
  }
824
706
  open() {
707
+ if (this.disabled()) return;
825
708
  this.openState.set(true);
826
709
  }
827
710
  close() {
828
711
  this.openState.set(false);
829
712
  }
830
713
  toggle() {
831
- this.openState.update((v) => !v);
714
+ if (this.isOpen()) this.close();
715
+ else this.open();
832
716
  }
833
717
  onClick(event) {
834
- if (this.isTooltip() || this.trigger() !== "click") return;
718
+ if (this.disabled() || this.isTooltip() || this.trigger() !== "click") return;
835
719
  event.stopPropagation();
836
720
  this.toggle();
837
721
  }
@@ -842,7 +726,7 @@ var WrPopover = class WrPopover {
842
726
  }
843
727
  if (this.trigger() !== "hover") return;
844
728
  this.clearHoverClose();
845
- this.openState.set(true);
729
+ this.open();
846
730
  }
847
731
  onMouseLeave(event) {
848
732
  const related = event.relatedTarget;
@@ -856,7 +740,7 @@ var WrPopover = class WrPopover {
856
740
  this.scheduleHoverClose();
857
741
  }
858
742
  onActivateKey(event) {
859
- if (this.isTooltip() || this.trigger() !== "hover" || this.isOpen()) return;
743
+ if (this.disabled() || this.isTooltip() || this.trigger() !== "hover" || this.isOpen()) return;
860
744
  event.preventDefault();
861
745
  this.openedByKeyboard = true;
862
746
  this.openState.set(true);
@@ -871,6 +755,7 @@ var WrPopover = class WrPopover {
871
755
  return key === null || NAVIGATION_KEYS.has(key);
872
756
  }
873
757
  scheduleShow() {
758
+ if (this.disabled()) return;
874
759
  if (this.isOpen()) {
875
760
  this.clearTimers();
876
761
  return;
@@ -878,7 +763,7 @@ var WrPopover = class WrPopover {
878
763
  const text = this.content();
879
764
  if (typeof text === "string" && !text) return;
880
765
  this.clearTimers();
881
- this.showTimer = setTimeout(() => this.openState.set(true), this.showDelay());
766
+ this.showTimer = setTimeout(() => this.open(), this.showDelay());
882
767
  }
883
768
  scheduleHide() {
884
769
  this.clearTimers();
@@ -1020,7 +905,7 @@ var WrPopover = class WrPopover {
1020
905
  }
1021
906
  static ɵfac = i0.ɵɵngDeclareFactory({
1022
907
  minVersion: "12.0.0",
1023
- version: "22.2.5",
908
+ version: "22.2.6",
1024
909
  ngImport: i0,
1025
910
  type: WrPopover,
1026
911
  deps: [],
@@ -1028,7 +913,7 @@ var WrPopover = class WrPopover {
1028
913
  });
1029
914
  static ɵdir = i0.ɵɵngDeclareDirective({
1030
915
  minVersion: "17.1.0",
1031
- version: "22.2.5",
916
+ version: "22.2.6",
1032
917
  type: WrPopover,
1033
918
  isStandalone: true,
1034
919
  selector: "[wrPopover]",
@@ -1082,6 +967,13 @@ var WrPopover = class WrPopover {
1082
967
  isRequired: false,
1083
968
  transformFunction: null
1084
969
  },
970
+ disabled: {
971
+ classPropertyName: "disabled",
972
+ publicName: "wrPopoverDisabled",
973
+ isSignal: true,
974
+ isRequired: false,
975
+ transformFunction: null
976
+ },
1085
977
  ariaLabel: {
1086
978
  classPropertyName: "ariaLabel",
1087
979
  publicName: "ariaLabel",
@@ -1111,8 +1003,9 @@ var WrPopover = class WrPopover {
1111
1003
  "keydown.space": "onActivateKey($event)"
1112
1004
  },
1113
1005
  properties: {
1114
- "attr.aria-haspopup": "isTooltip() ? null : \"dialog\"",
1115
- "attr.aria-expanded": "isTooltip() ? null : isOpen()",
1006
+ "class.wr-popover-trigger--disabled": "disabled()",
1007
+ "attr.aria-haspopup": "isTooltip() || disabled() ? null : \"dialog\"",
1008
+ "attr.aria-expanded": "isTooltip() || disabled() ? null : isOpen()",
1116
1009
  "attr.aria-controls": "!isTooltip() && isOpen() ? panelId : null",
1117
1010
  "attr.aria-describedby": "isTooltip() && isOpen() ? panelId : null"
1118
1011
  },
@@ -1124,7 +1017,7 @@ var WrPopover = class WrPopover {
1124
1017
  };
1125
1018
  i0.ɵɵngDeclareClassMetadata({
1126
1019
  minVersion: "12.0.0",
1127
- version: "22.2.5",
1020
+ version: "22.2.6",
1128
1021
  ngImport: i0,
1129
1022
  type: WrPopover,
1130
1023
  decorators: [{
@@ -1134,8 +1027,9 @@ i0.ɵɵngDeclareClassMetadata({
1134
1027
  exportAs: "wrPopover",
1135
1028
  host: {
1136
1029
  class: "wr-popover-trigger",
1137
- "[attr.aria-haspopup]": "isTooltip() ? null : \"dialog\"",
1138
- "[attr.aria-expanded]": "isTooltip() ? null : isOpen()",
1030
+ "[class.wr-popover-trigger--disabled]": "disabled()",
1031
+ "[attr.aria-haspopup]": "isTooltip() || disabled() ? null : \"dialog\"",
1032
+ "[attr.aria-expanded]": "isTooltip() || disabled() ? null : isOpen()",
1139
1033
  "[attr.aria-controls]": "!isTooltip() && isOpen() ? panelId : null",
1140
1034
  "[attr.aria-describedby]": "isTooltip() && isOpen() ? panelId : null",
1141
1035
  "(click)": "onClick($event)",
@@ -1205,6 +1099,14 @@ i0.ɵɵngDeclareClassMetadata({
1205
1099
  required: false
1206
1100
  }]
1207
1101
  }],
1102
+ disabled: [{
1103
+ type: i0.Input,
1104
+ args: [{
1105
+ isSignal: true,
1106
+ alias: "wrPopoverDisabled",
1107
+ required: false
1108
+ }]
1109
+ }],
1208
1110
  ariaLabel: [{
1209
1111
  type: i0.Input,
1210
1112
  args: [{