ngwr 11.2.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +7 -7
  2. package/burger/styles/_index.scss +1 -1
  3. package/button/styles/_index.scss +2 -2
  4. package/calendar/styles/_index.scss +32 -12
  5. package/calendar-heatmap/styles/_index.scss +20 -0
  6. package/carousel/styles/_index.scss +23 -1
  7. package/cascader/styles/_index.scss +15 -3
  8. package/checkbox/styles/_index.scss +2 -2
  9. package/collapse/styles/_index.scss +2 -2
  10. package/color-picker/styles/_index.scss +3 -3
  11. package/compare/styles/_index.scss +18 -2
  12. package/context-menu/styles/_index.scss +21 -2
  13. package/date-picker/styles/_index.scss +5 -5
  14. package/descriptions/styles/_index.scss +1 -1
  15. package/drag-drop/styles/_index.scss +28 -1
  16. package/drawer/styles/_index.scss +37 -0
  17. package/dropdown/styles/_index.scss +2 -2
  18. package/event-calendar/styles/_index.scss +67 -10
  19. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  20. package/fesm2022/ngwr-affix.mjs +3 -3
  21. package/fesm2022/ngwr-alert.mjs +3 -3
  22. package/fesm2022/ngwr-anchor.mjs +3 -3
  23. package/fesm2022/ngwr-aurora.mjs +3 -3
  24. package/fesm2022/ngwr-avatar.mjs +3 -3
  25. package/fesm2022/ngwr-back-top.mjs +3 -3
  26. package/fesm2022/ngwr-badge.mjs +6 -6
  27. package/fesm2022/ngwr-bar-chart-testing.mjs +20 -2
  28. package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
  29. package/fesm2022/ngwr-bar-chart.mjs +3 -3
  30. package/fesm2022/ngwr-blur-text.mjs +3 -3
  31. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  32. package/fesm2022/ngwr-border-glow.mjs +4 -4
  33. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  34. package/fesm2022/ngwr-breadcrumbs.mjs +29 -17
  35. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  36. package/fesm2022/ngwr-burger.mjs +3 -3
  37. package/fesm2022/ngwr-button.mjs +6 -6
  38. package/fesm2022/ngwr-calendar-heatmap.mjs +17 -5
  39. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  40. package/fesm2022/ngwr-calendar-testing.mjs +1 -1
  41. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  42. package/fesm2022/ngwr-calendar.mjs +187 -9
  43. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  44. package/fesm2022/ngwr-card.mjs +10 -10
  45. package/fesm2022/ngwr-card.mjs.map +1 -1
  46. package/fesm2022/ngwr-carousel.mjs +124 -24
  47. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  48. package/fesm2022/ngwr-cascader.mjs +48 -5
  49. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  50. package/fesm2022/ngwr-checkbox.mjs +6 -6
  51. package/fesm2022/ngwr-circular-text.mjs +4 -4
  52. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  53. package/fesm2022/ngwr-click-spark.mjs +27 -7
  54. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  55. package/fesm2022/ngwr-clipboard.mjs +3 -3
  56. package/fesm2022/ngwr-collapse.mjs +9 -9
  57. package/fesm2022/ngwr-color-picker-testing.mjs +26 -6
  58. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  59. package/fesm2022/ngwr-color-picker.mjs +98 -8
  60. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngwr-command-palette.mjs +14 -5
  62. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  63. package/fesm2022/ngwr-compare.mjs +3 -3
  64. package/fesm2022/ngwr-confetti.mjs +31 -6
  65. package/fesm2022/ngwr-confetti.mjs.map +1 -1
  66. package/fesm2022/ngwr-config.mjs +9 -0
  67. package/fesm2022/ngwr-config.mjs.map +1 -1
  68. package/fesm2022/ngwr-context-menu-testing.mjs +30 -11
  69. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  70. package/fesm2022/ngwr-context-menu.mjs +333 -43
  71. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  72. package/fesm2022/ngwr-cookie.mjs +3 -3
  73. package/fesm2022/ngwr-counter.mjs +25 -9
  74. package/fesm2022/ngwr-counter.mjs.map +1 -1
  75. package/fesm2022/{ngwr-date-adapter-fns.mjs → ngwr-date-adapters-fns.mjs} +37 -10
  76. package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -0
  77. package/fesm2022/{ngwr-date-adapter-luxon.mjs → ngwr-date-adapters-luxon.mjs} +5 -5
  78. package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -0
  79. package/fesm2022/ngwr-date-picker-testing.mjs +11 -6
  80. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  81. package/fesm2022/ngwr-date-picker.mjs +119 -37
  82. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  83. package/fesm2022/{ngwr-date-adapter.mjs → ngwr-date.mjs} +36 -10
  84. package/fesm2022/ngwr-date.mjs.map +1 -0
  85. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  86. package/fesm2022/ngwr-density.mjs +6 -6
  87. package/fesm2022/ngwr-descriptions.mjs +6 -6
  88. package/fesm2022/ngwr-dialog.mjs +73 -18
  89. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  90. package/fesm2022/ngwr-directives.mjs +12 -12
  91. package/fesm2022/ngwr-divider.mjs +52 -5
  92. package/fesm2022/ngwr-divider.mjs.map +1 -1
  93. package/fesm2022/ngwr-donut-chart-testing.mjs +8 -4
  94. package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
  95. package/fesm2022/ngwr-donut-chart.mjs +7 -7
  96. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  97. package/fesm2022/ngwr-drag-drop.mjs +160 -11
  98. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  99. package/fesm2022/ngwr-drawer.mjs +121 -58
  100. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  101. package/fesm2022/ngwr-dropdown.mjs +26 -10
  102. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  103. package/fesm2022/ngwr-empty.mjs +3 -3
  104. package/fesm2022/ngwr-event-calendar.mjs +28 -15
  105. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  106. package/fesm2022/ngwr-falling-text-testing.mjs +5 -3
  107. package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
  108. package/fesm2022/ngwr-falling-text.mjs +75 -46
  109. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  110. package/fesm2022/ngwr-file-upload.mjs +3 -3
  111. package/fesm2022/ngwr-form.mjs +32 -15
  112. package/fesm2022/ngwr-form.mjs.map +1 -1
  113. package/fesm2022/ngwr-fuzzy-text.mjs +21 -11
  114. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  115. package/fesm2022/ngwr-gauge.mjs +3 -3
  116. package/fesm2022/ngwr-glitch-text-testing.mjs +51 -17
  117. package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
  118. package/fesm2022/ngwr-glitch-text.mjs +7 -7
  119. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  120. package/fesm2022/ngwr-gradient-text-testing.mjs +46 -11
  121. package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
  122. package/fesm2022/ngwr-gradient-text.mjs +4 -4
  123. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  124. package/fesm2022/ngwr-hotkey.mjs +24 -9
  125. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  126. package/fesm2022/ngwr-i18n-en.mjs +73 -1
  127. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  128. package/fesm2022/ngwr-i18n-ru.mjs +55 -1
  129. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  130. package/fesm2022/ngwr-i18n.mjs +26 -15
  131. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  132. package/fesm2022/ngwr-icon.mjs +6 -6
  133. package/fesm2022/ngwr-image-cropper-testing.mjs +53 -9
  134. package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
  135. package/fesm2022/ngwr-image-cropper.mjs +150 -12
  136. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  137. package/fesm2022/ngwr-input-number-testing.mjs +15 -10
  138. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  139. package/fesm2022/ngwr-input-number.mjs +17 -10
  140. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  141. package/fesm2022/ngwr-input-otp-testing.mjs +12 -6
  142. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
  143. package/fesm2022/ngwr-input-otp.mjs +24 -5
  144. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  145. package/fesm2022/ngwr-input.mjs +15 -15
  146. package/fesm2022/ngwr-keyboard.mjs +3 -3
  147. package/fesm2022/ngwr-knob.mjs +3 -3
  148. package/fesm2022/ngwr-layout.mjs +15 -15
  149. package/fesm2022/ngwr-lightbox.mjs +4 -4
  150. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  151. package/fesm2022/ngwr-line-chart.mjs +73 -26
  152. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  153. package/fesm2022/ngwr-list.mjs +7 -7
  154. package/fesm2022/ngwr-list.mjs.map +1 -1
  155. package/fesm2022/ngwr-loading-bar.mjs +7 -7
  156. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  157. package/fesm2022/ngwr-markdown.mjs +66 -8
  158. package/fesm2022/ngwr-markdown.mjs.map +1 -1
  159. package/fesm2022/ngwr-marquee.mjs +4 -4
  160. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  161. package/fesm2022/ngwr-media.mjs +3 -3
  162. package/fesm2022/ngwr-mention.mjs +108 -13
  163. package/fesm2022/ngwr-mention.mjs.map +1 -1
  164. package/fesm2022/ngwr-meta.mjs +6 -6
  165. package/fesm2022/ngwr-meter-group-testing.mjs +26 -6
  166. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
  167. package/fesm2022/ngwr-meter-group.mjs +3 -3
  168. package/fesm2022/ngwr-overlay.mjs +6 -6
  169. package/fesm2022/ngwr-page-header.mjs +3 -3
  170. package/fesm2022/ngwr-pagination-testing.mjs +6 -6
  171. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  172. package/fesm2022/ngwr-pagination.mjs +17 -13
  173. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  174. package/fesm2022/ngwr-pipes.mjs +39 -26
  175. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  176. package/fesm2022/ngwr-platform.mjs +9 -9
  177. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  178. package/fesm2022/ngwr-popover-testing.mjs +7 -2
  179. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  180. package/fesm2022/ngwr-popover.mjs +155 -33
  181. package/fesm2022/ngwr-popover.mjs.map +1 -1
  182. package/fesm2022/ngwr-progress.mjs +3 -3
  183. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  184. package/fesm2022/ngwr-qr.mjs +42 -5
  185. package/fesm2022/ngwr-qr.mjs.map +1 -1
  186. package/fesm2022/ngwr-radio.mjs +6 -6
  187. package/fesm2022/ngwr-rating.mjs +3 -3
  188. package/fesm2022/ngwr-result.mjs +21 -30
  189. package/fesm2022/ngwr-result.mjs.map +1 -1
  190. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  191. package/fesm2022/ngwr-scroll.mjs +3 -3
  192. package/fesm2022/ngwr-segmented-testing.mjs +14 -1
  193. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
  194. package/fesm2022/ngwr-segmented.mjs +29 -6
  195. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  196. package/fesm2022/ngwr-select.mjs +159 -34
  197. package/fesm2022/ngwr-select.mjs.map +1 -1
  198. package/fesm2022/ngwr-shiny-text.mjs +11 -9
  199. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  200. package/fesm2022/ngwr-sidebar.mjs +31 -16
  201. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  202. package/fesm2022/ngwr-skeleton.mjs +3 -3
  203. package/fesm2022/ngwr-slider.mjs +100 -9
  204. package/fesm2022/ngwr-slider.mjs.map +1 -1
  205. package/fesm2022/ngwr-sparkline.mjs +3 -3
  206. package/fesm2022/ngwr-speed-dial-testing.mjs +15 -13
  207. package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
  208. package/fesm2022/ngwr-speed-dial.mjs +27 -12
  209. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  210. package/fesm2022/ngwr-spinner.mjs +3 -3
  211. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  212. package/fesm2022/ngwr-split-text.mjs +17 -5
  213. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  214. package/fesm2022/ngwr-splitter.mjs +3 -3
  215. package/fesm2022/ngwr-spotlight-card.mjs +7 -7
  216. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  217. package/fesm2022/ngwr-squircle.mjs +6 -6
  218. package/fesm2022/ngwr-star-border.mjs +4 -4
  219. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  220. package/fesm2022/ngwr-statistic.mjs +9 -9
  221. package/fesm2022/ngwr-stepper-testing.mjs +8 -8
  222. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
  223. package/fesm2022/ngwr-stepper.mjs +33 -8
  224. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  225. package/fesm2022/ngwr-storage.mjs +17 -5
  226. package/fesm2022/ngwr-storage.mjs.map +1 -1
  227. package/fesm2022/ngwr-switch.mjs +3 -3
  228. package/fesm2022/ngwr-table.mjs +99 -39
  229. package/fesm2022/ngwr-table.mjs.map +1 -1
  230. package/fesm2022/ngwr-tabs-testing.mjs +11 -10
  231. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  232. package/fesm2022/ngwr-tabs.mjs +36 -10
  233. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  234. package/fesm2022/ngwr-textarea.mjs +3 -3
  235. package/fesm2022/ngwr-theme.mjs +181 -4
  236. package/fesm2022/ngwr-theme.mjs.map +1 -1
  237. package/fesm2022/ngwr-tilt-card.mjs +7 -7
  238. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  239. package/fesm2022/ngwr-timeline.mjs +6 -6
  240. package/fesm2022/ngwr-toast.mjs +9 -9
  241. package/fesm2022/ngwr-toolbar.mjs +3 -3
  242. package/fesm2022/ngwr-tour.mjs +34 -10
  243. package/fesm2022/ngwr-tour.mjs.map +1 -1
  244. package/fesm2022/ngwr-transfer.mjs +3 -3
  245. package/fesm2022/ngwr-tree.mjs +28 -10
  246. package/fesm2022/ngwr-tree.mjs.map +1 -1
  247. package/fesm2022/ngwr-typewriter-testing.mjs +15 -1
  248. package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
  249. package/fesm2022/ngwr-typewriter.mjs +13 -5
  250. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  251. package/fesm2022/ngwr-typography.mjs +3 -3
  252. package/fesm2022/ngwr-utils.mjs +5 -2
  253. package/fesm2022/ngwr-utils.mjs.map +1 -1
  254. package/fesm2022/ngwr-version.mjs +1 -1
  255. package/fesm2022/ngwr-version.mjs.map +1 -1
  256. package/fesm2022/ngwr-virtual-scroll.mjs +4 -4
  257. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  258. package/fesm2022/ngwr-waves.mjs +4 -4
  259. package/fesm2022/ngwr-waves.mjs.map +1 -1
  260. package/fesm2022/ngwr-window.mjs +94 -24
  261. package/fesm2022/ngwr-window.mjs.map +1 -1
  262. package/file-upload/styles/_index.scss +2 -2
  263. package/glitch-text/styles/_index.scss +27 -12
  264. package/i18n/en.json +56 -6
  265. package/i18n/ru.json +56 -6
  266. package/image-cropper/styles/_index.scss +19 -0
  267. package/input/styles/_index.scss +2 -2
  268. package/input-number/styles/_index.scss +2 -2
  269. package/input-otp/styles/_index.scss +9 -2
  270. package/knob/styles/_index.scss +1 -1
  271. package/lightbox/styles/_index.scss +16 -2
  272. package/line-chart/styles/_index.scss +28 -14
  273. package/list/styles/_index.scss +1 -1
  274. package/llms-full.txt +18 -23
  275. package/llms.txt +22 -6
  276. package/markdown/styles/_index.scss +3 -3
  277. package/mcp/api.js +6 -4
  278. package/mcp/catalog.js +40 -3
  279. package/mcp/providers.js +16 -3
  280. package/mcp/tools.js +21 -1
  281. package/meter-group/styles/_index.scss +1 -1
  282. package/overlay/styles/_index.scss +33 -1
  283. package/package.json +17 -12
  284. package/pagination/styles/_index.scss +23 -1
  285. package/popover/styles/_index.scss +16 -7
  286. package/progress/styles/_index.scss +1 -1
  287. package/radio/styles/_index.scss +2 -2
  288. package/rating/styles/_index.scss +1 -1
  289. package/schematics/collection.json +1 -1
  290. package/schematics/migrations/v12/index.js +65 -0
  291. package/schematics/migrations/v7/index.js +12 -1
  292. package/schematics/migrations/v8/index.js +10 -1
  293. package/schematics/migrations.json +5 -0
  294. package/schematics/ng-add/index.js +8 -3
  295. package/schematics/provider/index.js +80 -13
  296. package/schematics/use/index.js +9 -129
  297. package/schematics/use/rule.js +206 -0
  298. package/schematics/use/symbol-map.json +4 -4
  299. package/segmented/styles/_index.scss +14 -3
  300. package/select/styles/_index.scss +14 -2
  301. package/sidebar/styles/_index.scss +12 -10
  302. package/skills/ngwr/SKILL.md +7 -5
  303. package/skills/ngwr/references/catalog.md +9 -9
  304. package/skills/ngwr/references/setup.md +10 -5
  305. package/slider/styles/_index.scss +1 -1
  306. package/speed-dial/styles/_index.scss +1 -1
  307. package/stepper/styles/_index.scss +12 -3
  308. package/switch/styles/_index.scss +2 -2
  309. package/table/styles/_index.scss +61 -12
  310. package/tabs/styles/_index.scss +1 -1
  311. package/textarea/styles/_index.scss +1 -1
  312. package/theme/styles/_colors.scss +142 -56
  313. package/theme/styles/_dark.scss +46 -3
  314. package/theme/styles/_focus.scss +28 -5
  315. package/theme/styles/_mixins.scss +1 -1
  316. package/theme/styles/_variables.scss +67 -0
  317. package/transfer/styles/_index.scss +26 -3
  318. package/tree/styles/_index.scss +29 -6
  319. package/types/ngwr-bar-chart-testing.d.ts +9 -1
  320. package/types/ngwr-blur-text.d.ts +8 -4
  321. package/types/ngwr-breadcrumbs.d.ts +17 -10
  322. package/types/ngwr-calendar-testing.d.ts +1 -1
  323. package/types/ngwr-calendar.d.ts +66 -0
  324. package/types/ngwr-carousel.d.ts +85 -6
  325. package/types/ngwr-cascader.d.ts +17 -0
  326. package/types/ngwr-click-spark.d.ts +4 -0
  327. package/types/ngwr-color-picker-testing.d.ts +8 -0
  328. package/types/ngwr-color-picker.d.ts +21 -1
  329. package/types/ngwr-confetti.d.ts +8 -0
  330. package/types/ngwr-config.d.ts +10 -1
  331. package/types/ngwr-context-menu-testing.d.ts +24 -11
  332. package/types/ngwr-context-menu.d.ts +56 -0
  333. package/types/ngwr-counter.d.ts +1 -0
  334. package/types/{ngwr-date-adapter-fns.d.ts → ngwr-date-adapters-fns.d.ts} +33 -6
  335. package/types/{ngwr-date-adapter-luxon.d.ts → ngwr-date-adapters-luxon.d.ts} +1 -1
  336. package/types/ngwr-date-picker-testing.d.ts +11 -6
  337. package/types/ngwr-date-picker.d.ts +8 -4
  338. package/types/{ngwr-date-adapter.d.ts → ngwr-date.d.ts} +24 -5
  339. package/types/ngwr-dialog.d.ts +38 -1
  340. package/types/ngwr-divider.d.ts +25 -0
  341. package/types/ngwr-donut-chart-testing.d.ts +7 -3
  342. package/types/ngwr-donut-chart.d.ts +3 -3
  343. package/types/ngwr-drag-drop.d.ts +56 -2
  344. package/types/ngwr-drawer.d.ts +56 -5
  345. package/types/ngwr-event-calendar.d.ts +8 -2
  346. package/types/ngwr-falling-text-testing.d.ts +5 -3
  347. package/types/ngwr-falling-text.d.ts +1 -1
  348. package/types/ngwr-form.d.ts +12 -2
  349. package/types/ngwr-glitch-text-testing.d.ts +37 -8
  350. package/types/ngwr-gradient-text-testing.d.ts +16 -3
  351. package/types/ngwr-i18n.d.ts +13 -4
  352. package/types/ngwr-image-cropper-testing.d.ts +49 -10
  353. package/types/ngwr-image-cropper.d.ts +70 -5
  354. package/types/ngwr-input-number-testing.d.ts +15 -10
  355. package/types/ngwr-input-number.d.ts +11 -4
  356. package/types/ngwr-input-otp-testing.d.ts +12 -6
  357. package/types/ngwr-input-otp.d.ts +15 -1
  358. package/types/ngwr-line-chart.d.ts +20 -3
  359. package/types/ngwr-markdown.d.ts +11 -0
  360. package/types/ngwr-mention.d.ts +32 -0
  361. package/types/ngwr-meter-group-testing.d.ts +12 -2
  362. package/types/ngwr-overlay.d.ts +1 -0
  363. package/types/ngwr-pagination-testing.d.ts +4 -4
  364. package/types/ngwr-pipes.d.ts +1 -1
  365. package/types/ngwr-popover-testing.d.ts +7 -2
  366. package/types/ngwr-popover.d.ts +1 -0
  367. package/types/ngwr-result.d.ts +6 -0
  368. package/types/ngwr-segmented-testing.d.ts +9 -0
  369. package/types/ngwr-segmented.d.ts +21 -1
  370. package/types/ngwr-select.d.ts +68 -6
  371. package/types/ngwr-shiny-text.d.ts +4 -2
  372. package/types/ngwr-sidebar.d.ts +14 -5
  373. package/types/ngwr-slider.d.ts +69 -1
  374. package/types/ngwr-speed-dial-testing.d.ts +15 -11
  375. package/types/ngwr-speed-dial.d.ts +22 -3
  376. package/types/ngwr-split-text.d.ts +9 -0
  377. package/types/ngwr-stepper-testing.d.ts +5 -5
  378. package/types/ngwr-stepper.d.ts +8 -0
  379. package/types/ngwr-storage.d.ts +1 -0
  380. package/types/ngwr-table.d.ts +104 -11
  381. package/types/ngwr-tabs-testing.d.ts +11 -10
  382. package/types/ngwr-tabs.d.ts +2 -0
  383. package/types/ngwr-theme.d.ts +82 -1
  384. package/types/ngwr-tour.d.ts +22 -4
  385. package/types/ngwr-tree.d.ts +5 -4
  386. package/types/ngwr-typewriter-testing.d.ts +10 -0
  387. package/types/ngwr-utils.d.ts +5 -2
  388. package/types/ngwr-version.d.ts +1 -1
  389. package/types/ngwr-window.d.ts +39 -11
  390. package/typography/styles/_index.scss +1 -1
  391. package/window/styles/_index.scss +72 -26
  392. package/fesm2022/ngwr-date-adapter-fns.mjs.map +0 -1
  393. package/fesm2022/ngwr-date-adapter-luxon.mjs.map +0 -1
  394. package/fesm2022/ngwr-date-adapter.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-popover-testing.mjs","sources":["../../../projects/lib/popover/testing/wr-popover-harness.ts","../../../projects/lib/popover/testing/ngwr-popover-testing.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 './interfaces';\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 on hover AND focus after a delay,\n * announces `role=\"tooltip\"` and DESCRIBES its trigger instead of being\n * 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 — hover and focus are its only gestures.\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 /** Focus the trigger — a tooltip's other opening gesture, so keyboard users get the hint too. */\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 it is presented\n * as a sheet and has no anchor.\n *\n * The resolved position — the directive defaults it per mode (`bottom` for a\n * popover, `top` for a tooltip) — read off the pane's public modifier class.\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 /** Whether the popover is presented as a full-width bottom sheet instead of an anchored panel. */\n async isSheet(): Promise<boolean> {\n return (await this.panel()).hasClass('wr-overlay-sheet');\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","/**\n * Generated bundle index. Do not edit.\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testing.mjs","sources":["../../../projects/lib/popover/testing/wr-popover-harness.ts","../../../projects/lib/popover/testing/ngwr-popover-testing.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 './interfaces';\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 on hover AND focus after a delay,\n * announces `role=\"tooltip\"` and DESCRIBES its trigger instead of being\n * 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 — hover and focus are its only gestures.\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 /** Focus the trigger — a tooltip's other opening gesture, so keyboard users get the hint too. */\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 it is presented\n * as a sheet and has no anchor.\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 /** Whether the popover is presented as a full-width bottom sheet instead of an anchored panel. */\n async isSheet(): Promise<boolean> {\n return (await this.panel()).hasClass('wr-overlay-sheet');\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAcH;AACA,MAAM,eAAe,GAAG,IAAI;AAE5B;AACA,MAAM,SAAS,GAAG,EAAE;AAEpB;;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C,0BAA0B,EAAE,CAAC,gBAAgB,CAAC,CAAA,CAAA,EAAI,MAAM,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,CAAC;IACvF;;AAGQ,IAAA,MAAM,OAAO,CAAC,IAAa,EAAE,OAAe,EAAA;AAClD,QAAA,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE;YAC3D,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI;AAAE,gBAAA,OAAO,IAAI;AAE/C,YAAA,MAAM,KAAK,CAAC,SAAS,CAAC;AACtB,YAAA,MAAM,IAAI,CAAC,cAAc,EAAE;QAC7B;AACA,QAAA,OAAO,KAAK;IACd;;AAGQ,IAAA,MAAM,KAAK,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,0BAA0B,EAAE,CAAC,UAAU,CAAC,CAAA,CAAA,EAAI,MAAM,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,CAAC,EAAE;IACnF;;AAGQ,IAAA,MAAM,OAAO,GAAA;AACnB,QAAA,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,MAAM,SAAS,GAAG,eAAe,GAAG,kBAAkB;AAC7F,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,SAAS,CAAC;QAE5D,IAAI,CAAC,EAAE,EAAE;AACP,YAAA,MAAM,IAAI,KAAK,CACb,CAAA,4EAAA,EAA+E,SAAS,CAAA,MAAA,CAAQ;AAC9F,gBAAA,6FAA6F,CAChG;QACH;AACA,QAAA,OAAO,EAAE;IACX;;;ACxWF;;AAEG;;;;"}
@@ -15,21 +15,88 @@ import { numAttr } from 'ngwr/utils';
15
15
  * Use of this source code is governed by an MIT-style license that can be
16
16
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
17
17
  */
18
- /** @internal */
18
+ /**
19
+ * The CDK geometry for each placement — one position, no fallbacks.
20
+ *
21
+ * The 8px offset is the gap between the trigger and the panel, and it is the
22
+ * reason a flip list matters rather than being a nicety: the flexible strategy
23
+ * emits `offsetX` as a `transform` on the pane, AFTER `withPush` has already
24
+ * decided the coordinate. Push therefore parks a right-anchored panel flush
25
+ * against the viewport edge and the offset then shoves it 8px back out, so a
26
+ * side placement that does not fit loses its border and corner off-screen no
27
+ * matter how hard push works. Flipping to a placement that fits is the only
28
+ * recovery, which is what `WR_POPOVER_FALLBACKS` is for.
29
+ *
30
+ * @internal
31
+ */
19
32
  const WR_POPOVER_POSITIONS = {
20
- top: [{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 }],
21
- 'top-start': [{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 }],
22
- 'top-end': [{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 }],
23
- bottom: [{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 }],
24
- 'bottom-start': [{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 }],
25
- 'bottom-end': [{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 }],
26
- left: [{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 }],
27
- 'left-start': [{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 }],
28
- 'left-end': [{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 }],
29
- right: [{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 }],
30
- 'right-start': [{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 }],
31
- 'right-end': [{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 }],
33
+ top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },
34
+ 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },
35
+ 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },
36
+ bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },
37
+ 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },
38
+ 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },
39
+ left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },
40
+ 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },
41
+ 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },
42
+ right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },
43
+ 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },
44
+ 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },
45
+ };
46
+ /**
47
+ * What each placement is allowed to flip to when it does not fit, best first.
48
+ * The requested placement always leads, so a panel that fits never moves.
49
+ *
50
+ * Alignment is preserved down the whole chain — a `-start` popover stays
51
+ * `-start` — because the alignment is the author's answer to "which end of the
52
+ * trigger does this belong to", and a flip is about the side, not about that.
53
+ *
54
+ * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /
55
+ * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish
56
+ * panel can never surprise anyone by appearing beside its trigger. An inline-axis
57
+ * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone
58
+ * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows
59
+ * by 109px to the right and 97px to the left, and only below/above has room.
60
+ *
61
+ * @internal
62
+ */
63
+ const WR_POPOVER_FALLBACKS = {
64
+ top: ['top', 'bottom'],
65
+ 'top-start': ['top-start', 'bottom-start'],
66
+ 'top-end': ['top-end', 'bottom-end'],
67
+ bottom: ['bottom', 'top'],
68
+ 'bottom-start': ['bottom-start', 'top-start'],
69
+ 'bottom-end': ['bottom-end', 'top-end'],
70
+ left: ['left', 'right', 'bottom', 'top'],
71
+ 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],
72
+ 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],
73
+ right: ['right', 'left', 'bottom', 'top'],
74
+ 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],
75
+ 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],
32
76
  };
77
+ /**
78
+ * The list `withPositions()` wants, with every link tagged so the pane names the
79
+ * placement it ACTUALLY took rather than the one that was asked for.
80
+ *
81
+ * The tag is what keeps the arrow honest. It is drawn by
82
+ * `.wr-popover-overlay--<placement> > *::after`, so a panel that flipped while
83
+ * the class stayed put would point at a side it no longer sits on. CDK applies a
84
+ * position's own `panelClass` in `_applyPosition` and clears it again on the next
85
+ * one, which is exactly the bookkeeping this needs — hence the class rather than
86
+ * a `positionChanges` subscription.
87
+ *
88
+ * @param paneClass The pane's base class: `wr-popover-overlay` or
89
+ * `wr-tooltip-overlay`. The two modes key their arrows off different
90
+ * selectors, so the prefix cannot live in the table.
91
+ *
92
+ * @internal
93
+ */
94
+ function wrPopoverPositions(position, paneClass) {
95
+ return WR_POPOVER_FALLBACKS[position].map(name => ({
96
+ ...WR_POPOVER_POSITIONS[name],
97
+ panelClass: `${paneClass}--${name}`,
98
+ }));
99
+ }
33
100
 
34
101
  /**
35
102
  * @license
@@ -47,10 +114,10 @@ const WR_POPOVER_POSITIONS = {
47
114
  class WrPopoverTextPanel {
48
115
  text = input.required(/* @ts-ignore */
49
116
  ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
50
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrPopoverTextPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: WrPopoverTextPanel, isStandalone: true, selector: "wr-popover-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "wr-tooltip" }, ngImport: i0, template: '{{ text() }}', isInline: true, encapsulation: i0.ViewEncapsulation.None });
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrPopoverTextPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
118
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: WrPopoverTextPanel, isStandalone: true, selector: "wr-popover-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "wr-tooltip" }, ngImport: i0, template: '{{ text() }}', isInline: true, encapsulation: i0.ViewEncapsulation.None });
52
119
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrPopoverTextPanel, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrPopoverTextPanel, decorators: [{
54
121
  type: Component,
55
122
  args: [{
56
123
  selector: 'wr-popover-text',
@@ -169,6 +236,7 @@ class WrPopover {
169
236
  resolvedPosition = computed(() => this.position() ?? (this.isTooltip() ? 'top' : 'bottom'), /* @ts-ignore */
170
237
  ...(ngDevMode ? [{ debugName: "resolvedPosition" }] : /* istanbul ignore next */ []));
171
238
  overlayRef = null;
239
+ textPanelRef = null;
172
240
  hoverCloseTimer = null;
173
241
  showTimer = null;
174
242
  hideTimer = null;
@@ -181,6 +249,16 @@ class WrPopover {
181
249
  this.closeOverlay();
182
250
  }
183
251
  });
252
+ // The tooltip string is pushed into the panel when the panel is created, and
253
+ // `openOverlay()` returns early while one is already up — so a `content()`
254
+ // change with the tooltip on screen never reached it and the label stayed on
255
+ // the string it opened with (hover a Copy button, click it, it still reads
256
+ // "Copy"). Keeping the ref and pushing from an effect is how `wr-date-picker`
257
+ // feeds its own panel refs.
258
+ effect(() => {
259
+ const content = this.content();
260
+ this.textPanelRef?.setInput('text', typeof content === 'string' ? content : '');
261
+ });
184
262
  this.destroyRef.onDestroy(() => {
185
263
  this.clearTimers();
186
264
  this.closeOverlay();
@@ -216,13 +294,19 @@ class WrPopover {
216
294
  }
217
295
  /** @internal */
218
296
  onMouseLeave(event) {
297
+ const related = event.relatedTarget;
219
298
  if (this.isTooltip()) {
299
+ // Crossing straight from the trigger onto the panel does not even arm the
300
+ // hide, the same bail-out the popover arm below has had. The panel's own
301
+ // `mouseenter` would cancel it a moment later anyway; not arming it is
302
+ // what removes the race.
303
+ if (related && this.overlayRef?.overlayElement.contains(related))
304
+ return;
220
305
  this.scheduleHide();
221
306
  return;
222
307
  }
223
308
  if (this.trigger() !== 'hover')
224
309
  return;
225
- const related = event.relatedTarget;
226
310
  if (related && this.overlayRef?.overlayElement.contains(related))
227
311
  return;
228
312
  // Delay so the pointer can cross the gap between trigger and panel —
@@ -284,18 +368,19 @@ class WrPopover {
284
368
  // never dock to the bottom. On small viewports (when opted in) detach
285
369
  // from the trigger and slide the panel up from the bottom edge.
286
370
  const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);
371
+ const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';
287
372
  const positionStrategy = asSheet
288
373
  ? this.overlay.position().global().centerHorizontally().bottom('0')
289
374
  : this.overlay
290
375
  .position()
291
376
  .flexibleConnectedTo(this.host)
292
- .withPositions(wrMirrorOffsets(WR_POPOVER_POSITIONS[position], this.isRtl()))
377
+ .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))
293
378
  .withPush(true);
294
- const overlayClass = tooltip
295
- ? ['wr-tooltip-overlay', `wr-tooltip-overlay--${position}`]
296
- : asSheet
297
- ? ['wr-popover-overlay', 'wr-overlay-sheet']
298
- : ['wr-popover-overlay', `wr-popover-overlay--${position}`];
379
+ // The `--<placement>` half is no longer set here: each fallback position
380
+ // carries its own, so the pane names the placement it landed on instead of
381
+ // the one that was requested, and the arrow follows a flip. A sheet has no
382
+ // anchor and so no placement class at all.
383
+ const overlayClass = asSheet ? [paneClass, 'wr-overlay-sheet'] : [paneClass];
299
384
  this.overlayRef = this.overlay.create({
300
385
  positionStrategy,
301
386
  scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),
@@ -317,6 +402,7 @@ class WrPopover {
317
402
  const text = typeof content === 'string' ? content : '';
318
403
  const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));
319
404
  ref.setInput('text', text);
405
+ this.textPanelRef = ref;
320
406
  // The pane is the element `aria-describedby` points at (it carries
321
407
  // `panelId`), so this is the role that has to be `tooltip` — the inner
322
408
  // `wr-popover-text` host deliberately carries none, or the description
@@ -324,16 +410,37 @@ class WrPopover {
324
410
  this.overlayRef.overlayElement.setAttribute('role', 'tooltip');
325
411
  }
326
412
  else if (typeof content !== 'string') {
327
- this.overlayRef.attach(new TemplatePortal(content, this.vcr));
413
+ const view = this.overlayRef.attach(new TemplatePortal(content, this.vcr));
414
+ const pane = this.overlayRef.overlayElement;
328
415
  // Popover mode is a non-modal dialog: the docstring promised dialog
329
416
  // semantics but nothing ever set a role, so a screen reader met an
330
417
  // unnamed generic container. `aria-modal="false"` is explicit — focus is
331
418
  // deliberately NOT trapped, the panel closes on outside click / Escape.
332
- this.overlayRef.overlayElement.setAttribute('role', 'dialog');
333
- this.overlayRef.overlayElement.setAttribute('aria-modal', 'false');
419
+ pane.setAttribute('role', 'dialog');
420
+ pane.setAttribute('aria-modal', 'false');
334
421
  // A named dialog: `role="dialog"` with no name announces as a bare
335
422
  // "dialog" and trips axe's `aria-dialog-name`.
336
- this.overlayRef.overlayElement.setAttribute('aria-label', this.resolvedAriaLabel());
423
+ pane.setAttribute('aria-label', this.resolvedAriaLabel());
424
+ if (this.trigger() === 'click') {
425
+ // Render the projected content before focus moves, the way
426
+ // `wr-popconfirm` does — a reader announcing the dialog reads what is in
427
+ // it, and on an empty pane that is nothing.
428
+ view.detectChanges();
429
+ // Focus has to ENTER the panel. The overlay container sits at the end of
430
+ // `<body>`, so Tab from the trigger went to the next control on the page
431
+ // and left the dialog stranded behind it (WCAG F85). The pane takes it
432
+ // rather than the first control inside: a popover's content is
433
+ // arbitrary, and landing on a text field would raise the on-screen
434
+ // keyboard and skip whatever the panel says above it. Tab from the pane
435
+ // reaches that first control anyway, since the pane precedes its own
436
+ // content in document order.
437
+ //
438
+ // Click-triggered only — a hover popover must not pull the caret out of
439
+ // what the user is typing in, and `scheduleHoverClose()` would then
440
+ // dispose the pane out from under the focused element.
441
+ pane.tabIndex = -1;
442
+ pane.focus();
443
+ }
337
444
  }
338
445
  this.overlayRef.overlayElement.id = this.panelId;
339
446
  this.outsideClick
@@ -353,7 +460,10 @@ class WrPopover {
353
460
  this.isOpen.set(false);
354
461
  }
355
462
  });
356
- if (!tooltip && this.trigger() === 'hover') {
463
+ // Both hover shapes keep the panel up while the pointer is on it: for a
464
+ // popover so the pointer can cross the gap, for a tooltip because WCAG
465
+ // 1.4.13 requires it (Hoverable).
466
+ if (tooltip || this.trigger() === 'hover') {
357
467
  this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);
358
468
  this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);
359
469
  }
@@ -362,7 +472,7 @@ class WrPopover {
362
472
  closeOverlay() {
363
473
  if (!this.overlayRef)
364
474
  return;
365
- if (!this.isTooltip() && this.trigger() === 'hover') {
475
+ if (this.isTooltip() || this.trigger() === 'hover') {
366
476
  this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);
367
477
  this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);
368
478
  }
@@ -381,6 +491,8 @@ class WrPopover {
381
491
  const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);
382
492
  this.overlayRef.dispose();
383
493
  this.overlayRef = null;
494
+ // Disposing destroys the panel component; a retained ref would pin its view.
495
+ this.textPanelRef = null;
384
496
  if (focusWasInside)
385
497
  this.host.nativeElement.focus();
386
498
  this.closed.emit();
@@ -389,9 +501,19 @@ class WrPopover {
389
501
  const related = event.relatedTarget;
390
502
  if (related && this.host.nativeElement.contains(related))
391
503
  return;
392
- this.scheduleHoverClose();
504
+ // A tooltip leaves on its own `hideDelay`, the same one the trigger uses; a
505
+ // hover popover has the longer grace period for crossing the gap back.
506
+ if (this.isTooltip())
507
+ this.scheduleHide();
508
+ else
509
+ this.scheduleHoverClose();
393
510
  };
394
511
  onOverlayEnter = () => {
512
+ // Two different timers can be in flight: `hideTimer`, armed by the trigger's
513
+ // own `mouseleave` in tooltip mode, and `hoverCloseTimer` in popover mode.
514
+ // Cancelling only the second would leave a tooltip disappearing `hideDelay`
515
+ // after the pointer arrived on it.
516
+ this.clearTimers();
395
517
  this.clearHoverClose();
396
518
  };
397
519
  scheduleHoverClose() {
@@ -414,10 +536,10 @@ class WrPopover {
414
536
  isRtl() {
415
537
  return this.dir?.value === 'rtl';
416
538
  }
417
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrPopover, deps: [], target: i0.ɵɵFactoryTarget.Directive });
418
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: WrPopover, isStandalone: true, selector: "[wrPopover]", inputs: { content: { classPropertyName: "content", publicName: "wrPopover", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave($event)", "focus": "onFocus()", "blur": "onBlur()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-haspopup": "isTooltip() ? null : \"dialog\"", "attr.aria-expanded": "isTooltip() ? null : isOpen()", "attr.aria-controls": "!isTooltip() && isOpen() ? panelId : null", "attr.aria-describedby": "isTooltip() && isOpen() ? panelId : null" }, classAttribute: "wr-popover-trigger" }, ngImport: i0 });
539
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrPopover, deps: [], target: i0.ɵɵFactoryTarget.Directive });
540
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: WrPopover, isStandalone: true, selector: "[wrPopover]", inputs: { content: { classPropertyName: "content", publicName: "wrPopover", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave($event)", "focus": "onFocus()", "blur": "onBlur()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-haspopup": "isTooltip() ? null : \"dialog\"", "attr.aria-expanded": "isTooltip() ? null : isOpen()", "attr.aria-controls": "!isTooltip() && isOpen() ? panelId : null", "attr.aria-describedby": "isTooltip() && isOpen() ? panelId : null" }, classAttribute: "wr-popover-trigger" }, ngImport: i0 });
419
541
  }
420
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrPopover, decorators: [{
542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrPopover, decorators: [{
421
543
  type: Directive,
422
544
  args: [{
423
545
  selector: '[wrPopover]',
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-popover.mjs","sources":["../../../projects/lib/popover/interfaces/popover-position.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/popover.ts","../../../projects/lib/popover/ngwr-popover.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 type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/** @internal */\nexport const WR_POPOVER_POSITIONS: Record<WrPopoverPosition, ConnectedPosition[]> = {\n top: [{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 }],\n 'top-start': [{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 }],\n 'top-end': [{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 }],\n bottom: [{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 }],\n 'bottom-start': [{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 }],\n 'bottom-end': [{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 }],\n left: [{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 }],\n 'left-start': [{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 }],\n 'left-end': [{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 }],\n right: [{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 }],\n 'right-start': [{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 }],\n 'right-end': [{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 }],\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Internal floating label rendered when `<… [wrPopover]=\"'…'\" mode=\"tooltip\">`\n * receives a string instead of a template. Not part of the public template\n * API — use the `WrPopover` directive in tooltip mode instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popover-text',\n template: '{{ text() }}',\n encapsulation: ViewEncapsulation.None,\n // No `role=\"tooltip\"` here on purpose: the overlay pane this is attached to\n // is the element `aria-describedby` resolves to, and it carries the role.\n // Setting it here too nested one tooltip inside another.\n host: { class: 'wr-tooltip' },\n})\nexport class WrPopoverTextPanel {\n readonly text = input.required<string>();\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 { Directionality } from '@angular/cdk/bidi';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport type { TemplateRef } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrMirrorOffsets, wrPresentAsSheet } from 'ngwr/overlay';\nimport { numAttr } from 'ngwr/utils';\n\nimport { WR_POPOVER_POSITIONS, type WrPopoverPosition } from './interfaces';\nimport { WrPopoverTextPanel } from './internal/text-panel';\n\n/**\n * Anchored content panel. The same directive covers two shapes:\n *\n * - **Popover** (default, `mode=\"popover\"`) — `[wrPopover]` takes a\n * `TemplateRef`. Opens on click or hover. Use for rich anchored content:\n * forms, summaries, menus.\n *\n * - **Tooltip** (`mode=\"tooltip\"`) — `[wrPopover]` takes a plain string.\n * Shown on hover and focus, dismissed on blur / pointer-leave / Escape.\n * Uses `aria-describedby` instead of `aria-haspopup` and is rendered into\n * a small dark text panel.\n *\n * Built on CDK Overlay so it auto-flips, closes on outside-click and Escape.\n *\n * @example\n * ```html\n * <!-- Popover with template content -->\n * <button wr-btn [wrPopover]=\"info\">Details</button>\n * <ng-template #info>\n * <div style=\"padding: 1rem; max-width: 18rem\">Anything you can render.</div>\n * </ng-template>\n *\n * <!-- Tooltip with plain text -->\n * <button wr-btn [wrPopover]=\"'Save changes'\" mode=\"tooltip\" position=\"top\">\n * Save\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popover\n */\nlet popoverUid = 0;\n\n@Directive({\n selector: '[wrPopover]',\n host: {\n // Marks the trigger the way `[wrDropdown]` marks its own. Popover-mode\n // content is a `TemplateRef`, so it is always bound as `[wrPopover]=\"…\"`,\n // which leaves no attribute in the DOM at all, and a closed tooltip\n // publishes no ARIA either — so without this there is nothing to find a\n // trigger by. (Only the static string form, `wrPopover=\"text\"`, would be.)\n class: 'wr-popover-trigger',\n '[attr.aria-haspopup]': 'isTooltip() ? null : \"dialog\"',\n '[attr.aria-expanded]': 'isTooltip() ? null : isOpen()',\n '[attr.aria-controls]': '!isTooltip() && isOpen() ? panelId : null',\n '[attr.aria-describedby]': 'isTooltip() && isOpen() ? panelId : null',\n '(click)': 'onClick($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class WrPopover {\n /**\n * Content to render inside the panel.\n * - In **popover** mode (default): pass a `TemplateRef`.\n * - In **tooltip** mode: pass a plain string.\n */\n readonly content = input.required<TemplateRef<unknown> | string>({ alias: 'wrPopover' });\n\n /**\n * Shape preset.\n *\n * - `'popover'` (default) — template content, click trigger, dialog\n * semantics.\n * - `'tooltip'` — text content, hover+focus trigger, `role=\"tooltip\"`,\n * `aria-describedby` on the host.\n */\n readonly mode = input<'popover' | 'tooltip'>('popover');\n\n /**\n * How the popover opens. Ignored in tooltip mode — tooltips are always\n * hover+focus. @default 'click'\n */\n readonly trigger = input<'click' | 'hover'>('click');\n\n /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */\n readonly position = input<WrPopoverPosition | null>(null);\n\n /** Tooltip only — delay before showing, in ms. @default 120 */\n readonly showDelay = input(120, { transform: numAttr(120) });\n\n /** Tooltip only — delay before hiding, in ms. @default 60 */\n readonly hideDelay = input(60, { transform: numAttr(60) });\n\n /**\n * Popover mode only — present the panel as a full-width bottom-sheet on\n * small viewports instead of an anchored panel. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. Tooltips never become sheets. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Popover mode only — accessible name of the panel. `role=\"dialog\"` with no\n * name announces as a bare \"dialog\", so the catalog's `popover.label` is used\n * when nothing is given. A popover has no universal name; whenever the panel\n * has a heading or a purpose, pass it.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires after the panel opens. */\n readonly opened = output<void>();\n\n /** Fires after the panel closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n /** @internal */\n readonly isOpen = signal(false);\n\n /** @internal */\n protected readonly isTooltip = computed(() => this.mode() === 'tooltip');\n\n /** Auto-generated id for `aria-controls` / `aria-describedby`. */\n protected readonly panelId = `wr-popover-${++popoverUid}`;\n\n private readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'popover.label', 'Popover');\n\n private readonly resolvedPosition = computed<WrPopoverPosition>(\n () => this.position() ?? (this.isTooltip() ? 'top' : 'bottom')\n );\n\n private overlayRef: OverlayRef | null = null;\n private hoverCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.closeOverlay();\n });\n }\n\n open(): void {\n this.isOpen.set(true);\n }\n\n close(): void {\n this.isOpen.set(false);\n }\n\n toggle(): void {\n this.isOpen.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n protected onClick(event: MouseEvent): void {\n if (this.isTooltip() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.isTooltip()) {\n this.scheduleShow();\n return;\n }\n if (this.trigger() !== 'hover') return;\n this.clearHoverClose();\n this.isOpen.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n if (this.isTooltip()) {\n this.scheduleHide();\n return;\n }\n if (this.trigger() !== 'hover') return;\n const related = event.relatedTarget as Node | null;\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n // Delay so the pointer can cross the gap between trigger and panel —\n // entering the panel cancels the close (see attach listeners).\n this.scheduleHoverClose();\n }\n\n /** @internal */\n protected onFocus(): void {\n if (!this.isTooltip()) return;\n this.scheduleShow();\n }\n\n /** @internal */\n protected onBlur(): void {\n if (!this.isTooltip()) return;\n this.scheduleHide();\n }\n\n /** @internal */\n protected onEscape(): void {\n if (!this.isTooltip()) return;\n this.clearTimers();\n this.isOpen.set(false);\n }\n\n // Tooltip timers\n\n private scheduleShow(): void {\n if (this.isOpen()) {\n this.clearTimers();\n return;\n }\n const text = this.content();\n if (typeof text === 'string' && !text) return;\n this.clearTimers();\n this.showTimer = setTimeout(() => this.isOpen.set(true), this.showDelay());\n }\n\n private scheduleHide(): void {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.isOpen.set(false), this.hideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimer) {\n clearTimeout(this.showTimer);\n this.showTimer = null;\n }\n if (this.hideTimer) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const tooltip = this.isTooltip();\n const position = this.resolvedPosition();\n\n // Sheet presentation is popover-only — tooltips are transient labels and\n // never dock to the bottom. On small viewports (when opted in) detach\n // from the trigger and slide the panel up from the bottom edge.\n const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(WR_POPOVER_POSITIONS[position], this.isRtl()))\n .withPush(true);\n\n const overlayClass = tooltip\n ? ['wr-tooltip-overlay', `wr-tooltip-overlay--${position}`]\n : asSheet\n ? ['wr-popover-overlay', 'wr-overlay-sheet']\n : ['wr-popover-overlay', `wr-popover-overlay--${position}`];\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n width: asSheet ? '100%' : undefined,\n hasBackdrop: asSheet,\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: overlayClass,\n });\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.isOpen.set(false));\n }\n\n const content = this.content();\n\n if (tooltip) {\n // Text content rendered via the internal text panel — accepts a\n // string and wraps it in the `.wr-tooltip` shell.\n const text = typeof content === 'string' ? content : '';\n const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));\n ref.setInput('text', text);\n // The pane is the element `aria-describedby` points at (it carries\n // `panelId`), so this is the role that has to be `tooltip` — the inner\n // `wr-popover-text` host deliberately carries none, or the description\n // would be a tooltip nested inside a tooltip.\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n } else if (typeof content !== 'string') {\n this.overlayRef.attach(new TemplatePortal(content, this.vcr));\n // Popover mode is a non-modal dialog: the docstring promised dialog\n // semantics but nothing ever set a role, so a screen reader met an\n // unnamed generic container. `aria-modal=\"false\"` is explicit — focus is\n // deliberately NOT trapped, the panel closes on outside click / Escape.\n this.overlayRef.overlayElement.setAttribute('role', 'dialog');\n this.overlayRef.overlayElement.setAttribute('aria-modal', 'false');\n // A named dialog: `role=\"dialog\"` with no name announces as a bare\n // \"dialog\" and trips axe's `aria-dialog-name`.\n this.overlayRef.overlayElement.setAttribute('aria-label', this.resolvedAriaLabel());\n }\n this.overlayRef.overlayElement.id = this.panelId;\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.isOpen.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen.set(false);\n }\n });\n\n if (!tooltip && this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);\n }\n\n this.opened.emit();\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n if (!this.isTooltip() && this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);\n }\n this.clearHoverClose();\n // Take the focus back before the pane goes, and only if it was in there.\n //\n // A popover is not a tooltip: it attaches a `TemplatePortal` under\n // `role=\"dialog\"`, so a form or a menu inside it is the point, and Escape\n // arrives through the overlay's `keydownEvents()` no matter where the caret\n // is. Disposing with focus inside dropped it on `<body>`, and the next Tab\n // restarted from the top of the document. `wr-date-picker` and\n // `wr-popconfirm` already guard it exactly this way; leaving focus alone\n // when it had already moved is what stops the close from fighting the user\n // for the caret.\n const pane = this.overlayRef.overlayElement;\n const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);\n this.overlayRef.dispose();\n this.overlayRef = null;\n if (focusWasInside) this.host.nativeElement.focus();\n this.closed.emit();\n }\n\n private readonly onOverlayLeave = (event: MouseEvent): void => {\n const related = event.relatedTarget as Node | null;\n if (related && this.host.nativeElement.contains(related)) return;\n this.scheduleHoverClose();\n };\n\n private readonly onOverlayEnter = (): void => {\n this.clearHoverClose();\n };\n\n private scheduleHoverClose(): void {\n this.clearHoverClose();\n this.hoverCloseTimer = setTimeout(() => this.isOpen.set(false), 120);\n }\n\n private clearHoverClose(): void {\n if (this.hoverCloseTimer) {\n clearTimeout(this.hoverCloseTimer);\n this.hoverCloseTimer = null;\n }\n }\n\n /**\n * Whether the app reads right-to-left.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a\n * component that works, and defaulting to LTR is the honest fallback.\n */\n private isRtl(): boolean {\n return this.dir?.value === 'rtl';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAkBH;AACO,MAAM,oBAAoB,GAAmD;IAClF,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACjG,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACvG,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACjG,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CA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2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBArBrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;;;;;;AAMJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,sBAAsB,EAAE,2CAA2C;AACnE,wBAAA,yBAAyB,EAAE,0CAA0C;AACrE,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,cAAc,EAAE,sBAAsB;AACtC,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,QAAQ,EAAE,UAAU;AACpB,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA;;;ACrFD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-popover.mjs","sources":["../../../projects/lib/popover/interfaces/popover-position.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/popover.ts","../../../projects/lib/popover/ngwr-popover.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 type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * The 8px offset is the gap between the trigger and the panel, and it is the\n * reason a flip list matters rather than being a nicety: the flexible strategy\n * emits `offsetX` as a `transform` on the pane, AFTER `withPush` has already\n * decided the coordinate. Push therefore parks a right-anchored panel flush\n * against the viewport edge and the offset then shoves it 8px back out, so a\n * side placement that does not fit loses its border and corner off-screen no\n * matter how hard push works. Flipping to a placement that fits is the only\n * recovery, which is what `WR_POPOVER_FALLBACKS` is for.\n *\n * @internal\n */\nexport const WR_POPOVER_POSITIONS: Record<WrPopoverPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },\n 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },\n 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },\n 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },\n 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },\n};\n\n/**\n * What each placement is allowed to flip to when it does not fit, best first.\n * The requested placement always leads, so a panel that fits never moves.\n *\n * Alignment is preserved down the whole chain — a `-start` popover stays\n * `-start` — because the alignment is the author's answer to \"which end of the\n * trigger does this belong to\", and a flip is about the side, not about that.\n *\n * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /\n * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish\n * panel can never surprise anyone by appearing beside its trigger. An inline-axis\n * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone\n * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows\n * by 109px to the right and 97px to the left, and only below/above has room.\n *\n * @internal\n */\nexport const WR_POPOVER_FALLBACKS: Record<WrPopoverPosition, readonly WrPopoverPosition[]> = {\n top: ['top', 'bottom'],\n 'top-start': ['top-start', 'bottom-start'],\n 'top-end': ['top-end', 'bottom-end'],\n bottom: ['bottom', 'top'],\n 'bottom-start': ['bottom-start', 'top-start'],\n 'bottom-end': ['bottom-end', 'top-end'],\n left: ['left', 'right', 'bottom', 'top'],\n 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],\n 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],\n right: ['right', 'left', 'bottom', 'top'],\n 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],\n 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],\n};\n\n/**\n * The list `withPositions()` wants, with every link tagged so the pane names the\n * placement it ACTUALLY took rather than the one that was asked for.\n *\n * The tag is what keeps the arrow honest. It is drawn by\n * `.wr-popover-overlay--<placement> > *::after`, so a panel that flipped while\n * the class stayed put would point at a side it no longer sits on. CDK applies a\n * position's own `panelClass` in `_applyPosition` and clears it again on the next\n * one, which is exactly the bookkeeping this needs — hence the class rather than\n * a `positionChanges` subscription.\n *\n * @param paneClass The pane's base class: `wr-popover-overlay` or\n * `wr-tooltip-overlay`. The two modes key their arrows off different\n * selectors, so the prefix cannot live in the table.\n *\n * @internal\n */\nexport function wrPopoverPositions(position: WrPopoverPosition, paneClass: string): ConnectedPosition[] {\n return WR_POPOVER_FALLBACKS[position].map(name => ({\n ...WR_POPOVER_POSITIONS[name],\n panelClass: `${paneClass}--${name}`,\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Internal floating label rendered when `<… [wrPopover]=\"'…'\" mode=\"tooltip\">`\n * receives a string instead of a template. Not part of the public template\n * API — use the `WrPopover` directive in tooltip mode instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popover-text',\n template: '{{ text() }}',\n encapsulation: ViewEncapsulation.None,\n // No `role=\"tooltip\"` here on purpose: the overlay pane this is attached to\n // is the element `aria-describedby` resolves to, and it carries the role.\n // Setting it here too nested one tooltip inside another.\n host: { class: 'wr-tooltip' },\n})\nexport class WrPopoverTextPanel {\n readonly text = input.required<string>();\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 { Directionality } from '@angular/cdk/bidi';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport type { ComponentRef, TemplateRef } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrMirrorOffsets, wrPresentAsSheet } from 'ngwr/overlay';\nimport { numAttr } from 'ngwr/utils';\n\nimport { type WrPopoverPosition, wrPopoverPositions } from './interfaces';\nimport { WrPopoverTextPanel } from './internal/text-panel';\n\n/**\n * Anchored content panel. The same directive covers two shapes:\n *\n * - **Popover** (default, `mode=\"popover\"`) — `[wrPopover]` takes a\n * `TemplateRef`. Opens on click or hover. Use for rich anchored content:\n * forms, summaries, menus.\n *\n * - **Tooltip** (`mode=\"tooltip\"`) — `[wrPopover]` takes a plain string.\n * Shown on hover and focus, dismissed on blur / pointer-leave / Escape.\n * Uses `aria-describedby` instead of `aria-haspopup` and is rendered into\n * a small dark text panel.\n *\n * Built on CDK Overlay so it auto-flips, closes on outside-click and Escape.\n *\n * @example\n * ```html\n * <!-- Popover with template content -->\n * <button wr-btn [wrPopover]=\"info\">Details</button>\n * <ng-template #info>\n * <div style=\"padding: 1rem; max-width: 18rem\">Anything you can render.</div>\n * </ng-template>\n *\n * <!-- Tooltip with plain text -->\n * <button wr-btn [wrPopover]=\"'Save changes'\" mode=\"tooltip\" position=\"top\">\n * Save\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popover\n */\nlet popoverUid = 0;\n\n@Directive({\n selector: '[wrPopover]',\n host: {\n // Marks the trigger the way `[wrDropdown]` marks its own. Popover-mode\n // content is a `TemplateRef`, so it is always bound as `[wrPopover]=\"…\"`,\n // which leaves no attribute in the DOM at all, and a closed tooltip\n // publishes no ARIA either — so without this there is nothing to find a\n // trigger by. (Only the static string form, `wrPopover=\"text\"`, would be.)\n class: 'wr-popover-trigger',\n '[attr.aria-haspopup]': 'isTooltip() ? null : \"dialog\"',\n '[attr.aria-expanded]': 'isTooltip() ? null : isOpen()',\n '[attr.aria-controls]': '!isTooltip() && isOpen() ? panelId : null',\n '[attr.aria-describedby]': 'isTooltip() && isOpen() ? panelId : null',\n '(click)': 'onClick($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class WrPopover {\n /**\n * Content to render inside the panel.\n * - In **popover** mode (default): pass a `TemplateRef`.\n * - In **tooltip** mode: pass a plain string.\n */\n readonly content = input.required<TemplateRef<unknown> | string>({ alias: 'wrPopover' });\n\n /**\n * Shape preset.\n *\n * - `'popover'` (default) — template content, click trigger, dialog\n * semantics.\n * - `'tooltip'` — text content, hover+focus trigger, `role=\"tooltip\"`,\n * `aria-describedby` on the host.\n */\n readonly mode = input<'popover' | 'tooltip'>('popover');\n\n /**\n * How the popover opens. Ignored in tooltip mode — tooltips are always\n * hover+focus. @default 'click'\n */\n readonly trigger = input<'click' | 'hover'>('click');\n\n /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */\n readonly position = input<WrPopoverPosition | null>(null);\n\n /** Tooltip only — delay before showing, in ms. @default 120 */\n readonly showDelay = input(120, { transform: numAttr(120) });\n\n /** Tooltip only — delay before hiding, in ms. @default 60 */\n readonly hideDelay = input(60, { transform: numAttr(60) });\n\n /**\n * Popover mode only — present the panel as a full-width bottom-sheet on\n * small viewports instead of an anchored panel. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. Tooltips never become sheets. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Popover mode only — accessible name of the panel. `role=\"dialog\"` with no\n * name announces as a bare \"dialog\", so the catalog's `popover.label` is used\n * when nothing is given. A popover has no universal name; whenever the panel\n * has a heading or a purpose, pass it.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires after the panel opens. */\n readonly opened = output<void>();\n\n /** Fires after the panel closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n /** @internal */\n readonly isOpen = signal(false);\n\n /** @internal */\n protected readonly isTooltip = computed(() => this.mode() === 'tooltip');\n\n /** Auto-generated id for `aria-controls` / `aria-describedby`. */\n protected readonly panelId = `wr-popover-${++popoverUid}`;\n\n private readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'popover.label', 'Popover');\n\n private readonly resolvedPosition = computed<WrPopoverPosition>(\n () => this.position() ?? (this.isTooltip() ? 'top' : 'bottom')\n );\n\n private overlayRef: OverlayRef | null = null;\n private textPanelRef: ComponentRef<WrPopoverTextPanel> | null = null;\n private hoverCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n // The tooltip string is pushed into the panel when the panel is created, and\n // `openOverlay()` returns early while one is already up — so a `content()`\n // change with the tooltip on screen never reached it and the label stayed on\n // the string it opened with (hover a Copy button, click it, it still reads\n // \"Copy\"). Keeping the ref and pushing from an effect is how `wr-date-picker`\n // feeds its own panel refs.\n effect(() => {\n const content = this.content();\n this.textPanelRef?.setInput('text', typeof content === 'string' ? content : '');\n });\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.closeOverlay();\n });\n }\n\n open(): void {\n this.isOpen.set(true);\n }\n\n close(): void {\n this.isOpen.set(false);\n }\n\n toggle(): void {\n this.isOpen.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n protected onClick(event: MouseEvent): void {\n if (this.isTooltip() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.isTooltip()) {\n this.scheduleShow();\n return;\n }\n if (this.trigger() !== 'hover') return;\n this.clearHoverClose();\n this.isOpen.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n const related = event.relatedTarget as Node | null;\n if (this.isTooltip()) {\n // Crossing straight from the trigger onto the panel does not even arm the\n // hide, the same bail-out the popover arm below has had. The panel's own\n // `mouseenter` would cancel it a moment later anyway; not arming it is\n // what removes the race.\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n this.scheduleHide();\n return;\n }\n if (this.trigger() !== 'hover') return;\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n // Delay so the pointer can cross the gap between trigger and panel —\n // entering the panel cancels the close (see attach listeners).\n this.scheduleHoverClose();\n }\n\n /** @internal */\n protected onFocus(): void {\n if (!this.isTooltip()) return;\n this.scheduleShow();\n }\n\n /** @internal */\n protected onBlur(): void {\n if (!this.isTooltip()) return;\n this.scheduleHide();\n }\n\n /** @internal */\n protected onEscape(): void {\n if (!this.isTooltip()) return;\n this.clearTimers();\n this.isOpen.set(false);\n }\n\n // Tooltip timers\n\n private scheduleShow(): void {\n if (this.isOpen()) {\n this.clearTimers();\n return;\n }\n const text = this.content();\n if (typeof text === 'string' && !text) return;\n this.clearTimers();\n this.showTimer = setTimeout(() => this.isOpen.set(true), this.showDelay());\n }\n\n private scheduleHide(): void {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.isOpen.set(false), this.hideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimer) {\n clearTimeout(this.showTimer);\n this.showTimer = null;\n }\n if (this.hideTimer) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const tooltip = this.isTooltip();\n const position = this.resolvedPosition();\n\n // Sheet presentation is popover-only — tooltips are transient labels and\n // never dock to the bottom. On small viewports (when opted in) detach\n // from the trigger and slide the panel up from the bottom edge.\n const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true);\n\n // The `--<placement>` half is no longer set here: each fallback position\n // carries its own, so the pane names the placement it landed on instead of\n // the one that was requested, and the arrow follows a flip. A sheet has no\n // anchor and so no placement class at all.\n const overlayClass = asSheet ? [paneClass, 'wr-overlay-sheet'] : [paneClass];\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n width: asSheet ? '100%' : undefined,\n hasBackdrop: asSheet,\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: overlayClass,\n });\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.isOpen.set(false));\n }\n\n const content = this.content();\n\n if (tooltip) {\n // Text content rendered via the internal text panel — accepts a\n // string and wraps it in the `.wr-tooltip` shell.\n const text = typeof content === 'string' ? content : '';\n const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));\n ref.setInput('text', text);\n this.textPanelRef = ref;\n // The pane is the element `aria-describedby` points at (it carries\n // `panelId`), so this is the role that has to be `tooltip` — the inner\n // `wr-popover-text` host deliberately carries none, or the description\n // would be a tooltip nested inside a tooltip.\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n } else if (typeof content !== 'string') {\n const view = this.overlayRef.attach(new TemplatePortal(content, this.vcr));\n const pane = this.overlayRef.overlayElement;\n // Popover mode is a non-modal dialog: the docstring promised dialog\n // semantics but nothing ever set a role, so a screen reader met an\n // unnamed generic container. `aria-modal=\"false\"` is explicit — focus is\n // deliberately NOT trapped, the panel closes on outside click / Escape.\n pane.setAttribute('role', 'dialog');\n pane.setAttribute('aria-modal', 'false');\n // A named dialog: `role=\"dialog\"` with no name announces as a bare\n // \"dialog\" and trips axe's `aria-dialog-name`.\n pane.setAttribute('aria-label', this.resolvedAriaLabel());\n\n if (this.trigger() === 'click') {\n // Render the projected content before focus moves, the way\n // `wr-popconfirm` does — a reader announcing the dialog reads what is in\n // it, and on an empty pane that is nothing.\n view.detectChanges();\n // Focus has to ENTER the panel. The overlay container sits at the end of\n // `<body>`, so Tab from the trigger went to the next control on the page\n // and left the dialog stranded behind it (WCAG F85). The pane takes it\n // rather than the first control inside: a popover's content is\n // arbitrary, and landing on a text field would raise the on-screen\n // keyboard and skip whatever the panel says above it. Tab from the pane\n // reaches that first control anyway, since the pane precedes its own\n // content in document order.\n //\n // Click-triggered only — a hover popover must not pull the caret out of\n // what the user is typing in, and `scheduleHoverClose()` would then\n // dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n }\n }\n this.overlayRef.overlayElement.id = this.panelId;\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.isOpen.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen.set(false);\n }\n });\n\n // Both hover shapes keep the panel up while the pointer is on it: for a\n // popover so the pointer can cross the gap, for a tooltip because WCAG\n // 1.4.13 requires it (Hoverable).\n if (tooltip || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);\n }\n\n this.opened.emit();\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n if (this.isTooltip() || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);\n }\n this.clearHoverClose();\n // Take the focus back before the pane goes, and only if it was in there.\n //\n // A popover is not a tooltip: it attaches a `TemplatePortal` under\n // `role=\"dialog\"`, so a form or a menu inside it is the point, and Escape\n // arrives through the overlay's `keydownEvents()` no matter where the caret\n // is. Disposing with focus inside dropped it on `<body>`, and the next Tab\n // restarted from the top of the document. `wr-date-picker` and\n // `wr-popconfirm` already guard it exactly this way; leaving focus alone\n // when it had already moved is what stops the close from fighting the user\n // for the caret.\n const pane = this.overlayRef.overlayElement;\n const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);\n this.overlayRef.dispose();\n this.overlayRef = null;\n // Disposing destroys the panel component; a retained ref would pin its view.\n this.textPanelRef = null;\n if (focusWasInside) this.host.nativeElement.focus();\n this.closed.emit();\n }\n\n private readonly onOverlayLeave = (event: MouseEvent): void => {\n const related = event.relatedTarget as Node | null;\n if (related && this.host.nativeElement.contains(related)) return;\n // A tooltip leaves on its own `hideDelay`, the same one the trigger uses; a\n // hover popover has the longer grace period for crossing the gap back.\n if (this.isTooltip()) this.scheduleHide();\n else this.scheduleHoverClose();\n };\n\n private readonly onOverlayEnter = (): void => {\n // Two different timers can be in flight: `hideTimer`, armed by the trigger's\n // own `mouseleave` in tooltip mode, and `hoverCloseTimer` in popover mode.\n // Cancelling only the second would leave a tooltip disappearing `hideDelay`\n // after the pointer arrived on it.\n this.clearTimers();\n this.clearHoverClose();\n };\n\n private scheduleHoverClose(): void {\n this.clearHoverClose();\n this.hoverCloseTimer = setTimeout(() => this.isOpen.set(false), 120);\n }\n\n private clearHoverClose(): void {\n if (this.hoverCloseTimer) {\n clearTimeout(this.hoverCloseTimer);\n this.hoverCloseTimer = null;\n }\n }\n\n /**\n * Whether the app reads right-to-left.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a\n * component that works, and defaulting to LTR is the honest fallback.\n */\n private isRtl(): boolean {\n return this.dir?.value === 'rtl';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAkBH;;;;;;;;;;;;;AAaG;AACI,MAAM,oBAAoB,GAAiD;IAChF,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;IAC/F,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,Q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AS,EAAE,iBAAiB;AAC5B,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,cAAc,EAAE,sBAAsB;AACtC,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,QAAQ,EAAE,UAAU;AACpB,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA;;;ACrFD;;AAEG;;;;"}
@@ -42,10 +42,10 @@ class WrProgress {
42
42
  ...(ngDevMode ? [{ debugName: "clamped" }] : /* istanbul ignore next */ []));
43
43
  classes = computed(() => `wr-progress wr-progress--${this.color()}`, /* @ts-ignore */
44
44
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: WrProgress, isStandalone: true, selector: "wr-progress", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar", "aria-valuemin": "0", "aria-valuemax": "100" }, properties: { "attr.aria-valuenow": "clamped()", "attr.aria-label": "resolvedAriaLabel()", "class": "classes()" } }, ngImport: i0, template: `<div class="wr-progress__bar" [style.width.%]="clamped()"></div>`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
45
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: WrProgress, isStandalone: true, selector: "wr-progress", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar", "aria-valuemin": "0", "aria-valuemax": "100" }, properties: { "attr.aria-valuenow": "clamped()", "attr.aria-label": "resolvedAriaLabel()", "class": "classes()" } }, ngImport: i0, template: `<div class="wr-progress__bar" [style.width.%]="clamped()"></div>`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
47
47
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: WrProgress, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrProgress, decorators: [{
49
49
  type: Component,
50
50
  args: [{
51
51
  selector: 'wr-progress',