@swisspost/design-system-components 10.6.0 → 10.8.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 (295) hide show
  1. package/dist/cjs/{create-validator-decorator-Cy5yN6u9.js → create-validator-decorator-DVm_SDrR.js} +1 -1
  2. package/dist/cjs/{index-B3PXzvDk.js → index-DY4QxKNv.js} +5 -5
  3. package/dist/cjs/is-focus-visible-B3CqVQsX.js +19 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/{one-of-CRFrfihj.js → one-of-qu7_EPxf.js} +1 -1
  6. package/dist/cjs/{package-pKyFPwiA.js → package-DAEQGHsE.js} +1 -1
  7. package/dist/cjs/{pattern-D329DFcf.js → pattern-EpwCKMyC.js} +1 -1
  8. package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
  9. package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
  10. package/dist/cjs/post-avatar.cjs.entry.js +85 -61
  11. package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
  12. package/dist/cjs/post-banner.cjs.entry.js +5 -5
  13. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
  14. package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
  15. package/dist/cjs/post-closebutton_14.cjs.entry.js +477 -593
  16. package/dist/cjs/post-collapsible_2.cjs.entry.js +13 -7
  17. package/dist/cjs/post-components.cjs.js +2 -2
  18. package/dist/cjs/post-date-picker.cjs.entry.js +43 -27
  19. package/dist/cjs/post-footer.cjs.entry.js +6 -6
  20. package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
  21. package/dist/cjs/post-listbox-option.cjs.entry.js +2 -2
  22. package/dist/cjs/post-listbox.cjs.entry.js +2 -2
  23. package/dist/cjs/post-number-input.cjs.entry.js +3 -3
  24. package/dist/cjs/post-pagination.cjs.entry.js +6 -6
  25. package/dist/cjs/post-popover-trigger.cjs.entry.js +4 -4
  26. package/dist/cjs/post-popover.cjs.entry.js +9 -9
  27. package/dist/cjs/post-progressbar.cjs.entry.js +3 -3
  28. package/dist/cjs/post-rating.cjs.entry.js +5 -5
  29. package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +5 -5
  30. package/dist/cjs/post-side-navigation.cjs.entry.js +14 -9
  31. package/dist/cjs/post-stepper-item.cjs.entry.js +2 -2
  32. package/dist/cjs/post-stepper.cjs.entry.js +6 -6
  33. package/dist/cjs/post-tab-item.cjs.entry.js +5 -5
  34. package/dist/cjs/post-tab-panel.cjs.entry.js +5 -5
  35. package/dist/cjs/post-tabs.cjs.entry.js +8 -8
  36. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +6 -6
  37. package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
  38. package/dist/cjs/{required-DhAEd0c7.js → required-Dgzo-rb5.js} +1 -1
  39. package/dist/cjs/{type-2Ma9dvHs.js → type-DBRxpBZI.js} +1 -1
  40. package/dist/cjs/{url-DePscsTj.js → url-Dl1JABeP.js} +1 -1
  41. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  42. package/dist/collection/components/post-avatar/avatar-utils.js +1 -2
  43. package/dist/collection/components/post-avatar/post-avatar.js +77 -59
  44. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  45. package/dist/collection/components/post-banner/post-banner.css +1 -1
  46. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
  47. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  48. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  49. package/dist/collection/components/post-collapsible/post-collapsible.js +9 -3
  50. package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
  51. package/dist/collection/components/post-date-picker/post-date-picker.js +36 -22
  52. package/dist/collection/components/post-footer/post-footer.css +1 -1
  53. package/dist/collection/components/post-header/post-header.css +1 -1
  54. package/dist/collection/components/post-header/post-header.js +38 -13
  55. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
  56. package/dist/collection/components/post-language-menu/post-language-menu.js +1 -1
  57. package/dist/collection/components/post-logo/post-logo.css +1 -1
  58. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  59. package/dist/collection/components/post-megadropdown/post-megadropdown.js +34 -16
  60. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  61. package/dist/collection/components/post-menu/post-menu.css +1 -1
  62. package/dist/collection/components/post-menu/post-menu.js +3 -14
  63. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
  64. package/dist/collection/components/post-number-input/post-number-input.css +2 -2
  65. package/dist/collection/components/post-pagination/post-pagination.css +1 -1
  66. package/dist/collection/components/post-popover/post-popover.css +1 -1
  67. package/dist/collection/components/post-popover/post-popover.js +2 -2
  68. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  69. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +211 -323
  70. package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
  71. package/dist/collection/components/post-side-navigation/post-side-navigation.js +7 -3
  72. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  73. package/dist/collection/components/post-tabs/post-tabs.js +2 -2
  74. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  75. package/dist/collection/components/post-tooltip/post-tooltip.js +3 -1
  76. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
  77. package/dist/collection/utils/floating-ui/middleware/flip.js +77 -0
  78. package/dist/collection/utils/floating-ui/middleware/safe-space.js +52 -0
  79. package/dist/collection/utils/floating-ui/util.js +10 -0
  80. package/dist/collection/utils/index.js +1 -0
  81. package/dist/collection/utils/is-focus-visible.js +15 -0
  82. package/dist/components/is-focus-visible.js +1 -0
  83. package/dist/components/package.js +1 -1
  84. package/dist/components/post-accordion-item2.js +1 -1
  85. package/dist/components/post-avatar.js +1 -1
  86. package/dist/components/post-back-to-top.js +1 -1
  87. package/dist/components/post-banner.js +1 -1
  88. package/dist/components/post-breadcrumb-item.js +1 -1
  89. package/dist/components/post-breadcrumbs.js +1 -1
  90. package/dist/components/post-closebutton2.js +1 -1
  91. package/dist/components/post-collapsible2.js +1 -1
  92. package/dist/components/post-date-picker.js +1 -1
  93. package/dist/components/post-footer.js +1 -1
  94. package/dist/components/post-header.js +1 -1
  95. package/dist/components/post-language-menu.js +1 -1
  96. package/dist/components/post-logo.js +1 -1
  97. package/dist/components/post-megadropdown-trigger.js +1 -1
  98. package/dist/components/post-megadropdown.js +1 -1
  99. package/dist/components/post-menu-item2.js +1 -1
  100. package/dist/components/post-menu2.js +1 -1
  101. package/dist/components/post-number-input.js +1 -1
  102. package/dist/components/post-pagination.js +1 -1
  103. package/dist/components/post-popover.js +1 -1
  104. package/dist/components/post-popovercontainer2.js +1 -1
  105. package/dist/components/post-side-navigation.js +1 -1
  106. package/dist/components/post-tabs.js +1 -1
  107. package/dist/components/post-tooltip-trigger.js +1 -1
  108. package/dist/components/post-tooltip.js +1 -1
  109. package/dist/components/react/index.js +1 -1
  110. package/dist/components/react/p-5kW0ZF_f.js +1 -0
  111. package/dist/components/react/p-BMCit4BU.js +1 -0
  112. package/dist/components/react/p-BWwWKRO5.js +1 -0
  113. package/dist/components/react/p-BdiQsTQm.js +1 -0
  114. package/dist/components/react/p-BeRGbt65.js +1 -0
  115. package/dist/components/react/{p-DffT6evQ.js → p-C8i672qm.js} +1 -1
  116. package/dist/components/react/{p-m1-sOx5T.js → p-C_JY6ipN.js} +1 -1
  117. package/dist/components/react/p-DRJ9K8sv.js +1 -0
  118. package/dist/components/react/{p-CcDLIogT.js → p-DygUkCKz.js} +1 -1
  119. package/dist/components/react/p-DzYMQFK2.js +1 -0
  120. package/dist/components/react/{p-CzsG0uCA.js → p-E-8qAn1z.js} +1 -1
  121. package/dist/components/react/p-Q5LQWL2X.js +1 -0
  122. package/dist/components/react/{p-CdggfEzz.js → p-UXyZDQt4.js} +1 -1
  123. package/dist/components/react/post-accordion-item.js +1 -1
  124. package/dist/components/react/post-accordion.js +1 -1
  125. package/dist/components/react/post-autocomplete.js +1 -1
  126. package/dist/components/react/post-avatar.js +1 -1
  127. package/dist/components/react/post-back-to-top.js +1 -1
  128. package/dist/components/react/post-banner.js +1 -1
  129. package/dist/components/react/post-breadcrumb-item.js +1 -1
  130. package/dist/components/react/post-breadcrumbs.js +1 -1
  131. package/dist/components/react/post-closebutton.js +1 -1
  132. package/dist/components/react/post-collapsible-trigger.js +1 -1
  133. package/dist/components/react/post-collapsible.js +1 -1
  134. package/dist/components/react/post-date-picker.js +1 -1
  135. package/dist/components/react/post-footer.js +1 -1
  136. package/dist/components/react/post-header.js +1 -1
  137. package/dist/components/react/post-icon.js +1 -1
  138. package/dist/components/react/post-language-menu-item.js +1 -1
  139. package/dist/components/react/post-language-menu.js +1 -1
  140. package/dist/components/react/post-linkarea.js +1 -1
  141. package/dist/components/react/post-listbox-option.js +1 -1
  142. package/dist/components/react/post-listbox.js +1 -1
  143. package/dist/components/react/post-logo.js +1 -1
  144. package/dist/components/react/post-mainnavigation.js +1 -1
  145. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  146. package/dist/components/react/post-megadropdown.js +1 -1
  147. package/dist/components/react/post-menu-item.js +1 -1
  148. package/dist/components/react/post-menu-trigger.js +1 -1
  149. package/dist/components/react/post-menu.js +1 -1
  150. package/dist/components/react/post-number-input.js +1 -1
  151. package/dist/components/react/post-pagination.js +1 -1
  152. package/dist/components/react/post-popover-trigger.js +1 -1
  153. package/dist/components/react/post-popover.js +1 -1
  154. package/dist/components/react/post-popovercontainer.js +1 -1
  155. package/dist/components/react/post-rating.js +1 -1
  156. package/dist/components/react/post-side-navigation-trigger.js +1 -1
  157. package/dist/components/react/post-side-navigation.js +1 -1
  158. package/dist/components/react/post-stepper-item.js +1 -1
  159. package/dist/components/react/post-stepper.js +1 -1
  160. package/dist/components/react/post-tab-item.js +1 -1
  161. package/dist/components/react/post-tab-panel.js +1 -1
  162. package/dist/components/react/post-tabs.js +1 -1
  163. package/dist/components/react/post-togglebutton.js +1 -1
  164. package/dist/components/react/post-tooltip-trigger.js +1 -1
  165. package/dist/components/react/post-tooltip.js +1 -1
  166. package/dist/docs.json +67 -45
  167. package/dist/esm/{create-validator-decorator-C2XlYkNB.js → create-validator-decorator-Cp_NUmrr.js} +1 -1
  168. package/dist/esm/{index-BjziJWh2.js → index-D0jX3Fts.js} +5 -5
  169. package/dist/esm/is-focus-visible-BWwWKRO5.js +17 -0
  170. package/dist/esm/loader.js +3 -3
  171. package/dist/esm/{one-of-Do1iao-k.js → one-of-B9locHPx.js} +1 -1
  172. package/dist/esm/{package-T8T3po4z.js → package-BdiQsTQm.js} +1 -1
  173. package/dist/esm/{pattern-BZDucOTq.js → pattern-BL3OBU8C.js} +1 -1
  174. package/dist/esm/post-accordion_2.entry.js +6 -6
  175. package/dist/esm/post-autocomplete.entry.js +5 -5
  176. package/dist/esm/post-avatar.entry.js +85 -61
  177. package/dist/esm/post-back-to-top.entry.js +6 -6
  178. package/dist/esm/post-banner.entry.js +5 -5
  179. package/dist/esm/post-breadcrumb-item.entry.js +8 -8
  180. package/dist/esm/post-breadcrumbs.entry.js +7 -7
  181. package/dist/esm/post-closebutton_14.entry.js +477 -593
  182. package/dist/esm/post-collapsible_2.entry.js +13 -7
  183. package/dist/esm/post-components.js +3 -3
  184. package/dist/esm/post-date-picker.entry.js +43 -27
  185. package/dist/esm/post-footer.entry.js +6 -6
  186. package/dist/esm/post-linkarea.entry.js +2 -2
  187. package/dist/esm/post-listbox-option.entry.js +2 -2
  188. package/dist/esm/post-listbox.entry.js +2 -2
  189. package/dist/esm/post-number-input.entry.js +3 -3
  190. package/dist/esm/post-pagination.entry.js +6 -6
  191. package/dist/esm/post-popover-trigger.entry.js +4 -4
  192. package/dist/esm/post-popover.entry.js +9 -9
  193. package/dist/esm/post-progressbar.entry.js +3 -3
  194. package/dist/esm/post-rating.entry.js +5 -5
  195. package/dist/esm/post-side-navigation-trigger.entry.js +5 -5
  196. package/dist/esm/post-side-navigation.entry.js +14 -9
  197. package/dist/esm/post-stepper-item.entry.js +2 -2
  198. package/dist/esm/post-stepper.entry.js +6 -6
  199. package/dist/esm/post-tab-item.entry.js +5 -5
  200. package/dist/esm/post-tab-panel.entry.js +5 -5
  201. package/dist/esm/post-tabs.entry.js +8 -8
  202. package/dist/esm/post-tooltip-trigger.entry.js +6 -6
  203. package/dist/esm/post-tooltip.entry.js +8 -6
  204. package/dist/esm/{required-B0X7uy13.js → required-CDaQB1gC.js} +1 -1
  205. package/dist/esm/{type-CF1dOg6D.js → type-CQ7XuPCZ.js} +1 -1
  206. package/dist/esm/{url-BL7d6iWZ.js → url-B-86gtTK.js} +1 -1
  207. package/dist/post-components/p-0688d296.entry.js +1 -0
  208. package/dist/post-components/p-0b0b2f02.entry.js +1 -0
  209. package/dist/post-components/{p-c9dcdebb.entry.js → p-0d25c033.entry.js} +1 -1
  210. package/dist/post-components/{p-655ded00.entry.js → p-229d324e.entry.js} +1 -1
  211. package/dist/post-components/{p-88f754e9.entry.js → p-2a5312a7.entry.js} +1 -1
  212. package/dist/post-components/{p-ba1b4ba0.entry.js → p-330fd6cd.entry.js} +1 -1
  213. package/dist/post-components/p-3712133b.entry.js +1 -0
  214. package/dist/post-components/{p-87b1034f.entry.js → p-379780a3.entry.js} +1 -1
  215. package/dist/post-components/{p-dc285087.entry.js → p-3fdb8ebc.entry.js} +1 -1
  216. package/dist/post-components/{p-2005eb98.entry.js → p-456b0786.entry.js} +1 -1
  217. package/dist/post-components/p-4d30c65d.entry.js +1 -0
  218. package/dist/post-components/{p-de6f1816.entry.js → p-534ca27e.entry.js} +1 -1
  219. package/dist/post-components/p-5369b9c2.entry.js +1 -0
  220. package/dist/post-components/p-6833be12.entry.js +1 -0
  221. package/dist/post-components/p-6ad44691.entry.js +1 -0
  222. package/dist/post-components/{p-1ec27142.entry.js → p-82c62e90.entry.js} +1 -1
  223. package/dist/post-components/{p-8012cc3b.entry.js → p-91a2ef3c.entry.js} +1 -1
  224. package/dist/post-components/p-95f5d5ea.entry.js +1 -0
  225. package/dist/post-components/p-9dd286bf.entry.js +1 -0
  226. package/dist/post-components/p-9fedcfba.entry.js +1 -0
  227. package/dist/post-components/p-BCPv4bcY.js +1 -0
  228. package/dist/post-components/p-BWwWKRO5.js +1 -0
  229. package/dist/post-components/p-BdiQsTQm.js +1 -0
  230. package/dist/post-components/p-CP3LjuFR.js +1 -0
  231. package/dist/post-components/p-D0jX3Fts.js +2 -0
  232. package/dist/post-components/p-D6mVqZLg.js +1 -0
  233. package/dist/post-components/{p-DgnQe03V.js → p-DSaWK_q-.js} +1 -1
  234. package/dist/post-components/p-VPHnF9fB.js +1 -0
  235. package/dist/post-components/{p-f9a8ee94.entry.js → p-ab0500b7.entry.js} +1 -1
  236. package/dist/post-components/p-c123ecde.entry.js +1 -0
  237. package/dist/post-components/{p-cdc7b8d3.entry.js → p-d2de31b7.entry.js} +1 -1
  238. package/dist/post-components/p-dffeb751.entry.js +1 -0
  239. package/dist/post-components/{p-60550edb.entry.js → p-e11ccdbe.entry.js} +1 -1
  240. package/dist/post-components/{p-a32d3050.entry.js → p-e560767b.entry.js} +1 -1
  241. package/dist/post-components/p-ee7fade4.entry.js +1 -0
  242. package/dist/post-components/{p-2cff5b3a.entry.js → p-f2629077.entry.js} +1 -1
  243. package/dist/post-components/{p-d7c9a969.entry.js → p-f2b24bbd.entry.js} +1 -1
  244. package/dist/post-components/p-gv9b-Z15.js +1 -0
  245. package/dist/post-components/post-components.css +2 -2
  246. package/dist/post-components/post-components.esm.js +1 -1
  247. package/dist/types/components/post-avatar/avatar-utils.d.ts +0 -2
  248. package/dist/types/components/post-avatar/post-avatar.d.ts +11 -9
  249. package/dist/types/components/post-date-picker/post-date-picker.d.ts +4 -1
  250. package/dist/types/components/post-header/post-header.d.ts +5 -1
  251. package/dist/types/components/post-language-menu/post-language-menu.d.ts +3 -0
  252. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -1
  253. package/dist/types/components/post-menu/post-menu.d.ts +0 -1
  254. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +74 -69
  255. package/dist/types/components.d.ts +39 -26
  256. package/dist/types/utils/floating-ui/middleware/flip.d.ts +14 -0
  257. package/dist/types/utils/floating-ui/middleware/safe-space.d.ts +10 -0
  258. package/dist/types/utils/floating-ui/util.d.ts +4 -0
  259. package/dist/types/utils/index.d.ts +1 -0
  260. package/dist/types/utils/is-focus-visible.d.ts +5 -0
  261. package/dist/vrt/helpers/header-test-config.js +2 -1
  262. package/hydrate/index.js +564 -623
  263. package/hydrate/index.mjs +564 -623
  264. package/package.json +11 -10
  265. package/dist/components/react/p-3RU9XwVO.js +0 -1
  266. package/dist/components/react/p-B1TcktiB.js +0 -1
  267. package/dist/components/react/p-BN2dfUQ0.js +0 -1
  268. package/dist/components/react/p-BPUhha1U.js +0 -1
  269. package/dist/components/react/p-Bnb_TyDh.js +0 -1
  270. package/dist/components/react/p-T8T3po4z.js +0 -1
  271. package/dist/components/react/p-WXzzOdnl.js +0 -1
  272. package/dist/post-components/p-0e922531.entry.js +0 -1
  273. package/dist/post-components/p-53bd2128.entry.js +0 -1
  274. package/dist/post-components/p-59b30e90.entry.js +0 -1
  275. package/dist/post-components/p-76cc3c9a.entry.js +0 -1
  276. package/dist/post-components/p-819c93de.entry.js +0 -1
  277. package/dist/post-components/p-840acd3c.entry.js +0 -1
  278. package/dist/post-components/p-9S_5_Zh8.js +0 -1
  279. package/dist/post-components/p-BYfu3J2D.js +0 -1
  280. package/dist/post-components/p-BjziJWh2.js +0 -2
  281. package/dist/post-components/p-BoYe-VVx.js +0 -1
  282. package/dist/post-components/p-CbbADNiv.js +0 -1
  283. package/dist/post-components/p-DlKbBdcP.js +0 -1
  284. package/dist/post-components/p-T8T3po4z.js +0 -1
  285. package/dist/post-components/p-b4229624.entry.js +0 -1
  286. package/dist/post-components/p-b9faa76b.entry.js +0 -1
  287. package/dist/post-components/p-c0ae13b7.entry.js +0 -1
  288. package/dist/post-components/p-ccf8020b.entry.js +0 -1
  289. package/dist/post-components/p-cd68d3a2.entry.js +0 -1
  290. package/dist/post-components/p-db11f781.entry.js +0 -1
  291. package/dist/post-components/p-dec8bd99.entry.js +0 -1
  292. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +0 -23
  293. package/dist/vrt/helpers/header-variants.config.js +0 -157
  294. /package/dist/collection/utils/{floating-ui.js → floating-ui/platform/safe-area.js} +0 -0
  295. /package/dist/types/utils/{floating-ui.d.ts → floating-ui/platform/safe-area.d.ts} +0 -0
@@ -1,66 +1,64 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { Placement } from '@floating-ui/dom';
3
- import { popIn } from "../../animations/pop-in";
4
- interface PopoverElement {
5
- showPopover: () => void;
6
- hidePopover: () => void;
7
- togglePopover: (force?: boolean) => boolean;
8
- }
9
- declare const ANIMATIONS: {
10
- readonly 'pop-in': typeof popIn;
11
- };
12
- export type AnimationName = keyof typeof ANIMATIONS;
13
- export type PostPopoverElement = HTMLElement & PopoverElement;
3
+ import { Side } from '@floating-ui/utils';
14
4
  /**
15
- * @slot - Default slot for placing content inside the popovercontainer.
5
+ * @slot - Default slot for placing content inside the popover.
16
6
  */
17
7
  export declare class PostPopovercontainer {
18
- private static readonly STATIC_SIDES;
19
- private static readonly PROPERTIES_TO_CLEAR;
20
- host: HTMLPostPopovercontainerElement;
8
+ /** The element the popover is anchored to */
9
+ private anchorRef;
21
10
  private arrowRef;
22
- private eventTarget;
23
- private clearAutoUpdate;
11
+ private hasBeenOpened;
24
12
  private toggleTimeoutId;
25
- private hasOpenedOnce;
26
- private boundMouseTrackingHandler;
27
- constructor();
13
+ private runningAnimation;
14
+ private stopAutoUpdate;
15
+ host: HTMLPostPopovercontainerElement;
28
16
  /**
29
- * Fires whenever the popovercontainer is about to be shown, passing in event.detail a `first` boolean, which is true if it is to be shown for the first time.
17
+ * Emitted just before the popover is shown.
18
+ *
19
+ * The payload contains a `first` boolean, that is set to `true` when the popover is about to be
20
+ * shown for the first time.
30
21
  */
31
22
  postBeforeShow: EventEmitter<{
32
23
  first?: boolean;
33
24
  }>;
34
25
  /**
35
- * Fires whenever the popovercontainer is shown, passing in event.detail a `first` boolean, which is true if it is shown for the first time.
26
+ * Emitted just after the popover is shown.
27
+ *
28
+ * The payload contains a `first` boolean, that is set to `true` when the popover is shown for the
29
+ * first time.
36
30
  */
37
31
  postShow: EventEmitter<{
38
32
  first?: boolean;
39
33
  }>;
40
34
  /**
41
- * Fires whenever the popovercontainer is hidden.
35
+ * Emitted just after the popover is hidden.
42
36
  */
43
37
  postHide: EventEmitter;
44
38
  /**
45
- * Fires whenever the popovercontainer is about to be shown or hidden, passing in event.detail a `willOpen` boolean, which is true if the popovercontainer is about to be opened and false if it is about to be closed.
39
+ * Emitted just before the popover's state changes.
40
+ *
41
+ * The payload contains a `willOpen` boolean, that is set to `true` when the popover is about to
42
+ * be shown, `false` when it is about to be hidden.
46
43
  */
47
44
  postBeforeToggle: EventEmitter<{
48
45
  willOpen: boolean;
49
46
  }>;
50
47
  /**
51
- * Fires whenever the popovercontainer gets shown or hidden, passing in event.detail an object containing a `isOpen`boolean, which is true if the popovercontainer was opened and false if it was closed.
48
+ * Emitted just after the popover's state changes.
49
+ *
50
+ * The payload contains a `isOpen` boolean, that is set to `true` when the popover is shown,
51
+ * `false` when it is hidden.
52
52
  */
53
53
  postToggle: EventEmitter<{
54
54
  isOpen: boolean;
55
55
  }>;
56
56
  /**
57
- * Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
58
- * Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted
59
- * towards the viewport if they would overlap edge boundaries.
57
+ * Placement of the popover according to the floating-ui options.
60
58
  */
61
59
  readonly placement?: Placement;
62
60
  /**
63
- * Gap between the edge of the page and the popovercontainer
61
+ * Gap between the edge of the viewport and the popover.
64
62
  */
65
63
  readonly edgeGap?: number;
66
64
  /**
@@ -68,77 +66,84 @@ export declare class PostPopovercontainer {
68
66
  */
69
67
  readonly offset?: number;
70
68
  /**
71
- * Whether or not to display a little pointer arrow
69
+ * Show a little indicator arrow
72
70
  */
73
71
  readonly arrow?: boolean;
74
- dynamicPlacement?: string;
75
72
  /**
76
- * Enables a safespace through which the cursor can be moved without the popover being disabled
73
+ * Whether to add a space through which the mouse can move without the popover being hidden.
77
74
  */
78
- readonly safeSpace?: 'triangle' | 'trapezoid';
75
+ readonly safeSpace?: boolean;
79
76
  /**
80
- * Whether to automatically hide the popover when the target moves outside the scrollport.
77
+ * Whether to automatically hide the popover when the anchor moves outside the scrollport.
81
78
  *
82
- * If the `post-header` can cover the target, the popover will also be hidden as soon as the
83
- * target scrolls behind it.
79
+ * If the `post-header` can cover the anchor, the popover will also be hidden as soon as the
80
+ * anchor scrolls behind it.
84
81
  */
85
82
  readonly autoHide?: boolean;
86
83
  /**
87
- * Animation style
88
- */
89
- private readonly animation;
90
- /**
91
- * Updates cursor position for safe space feature when popover is open.
92
- * Sets CSS custom properties for dynamic styling of safe area.
93
- * @param event MouseEvent with cursor position
84
+ * Whether to keep resizing the popover while it is open.
85
+ *
86
+ * Every popover is sized once when it opens: the space available around the anchor, minus the
87
+ * `edgeGap`, becomes the maximum width and height of the popover. The placement is then
88
+ * recalculated for that size.
89
+ *
90
+ * With `autoResize`, the popover's size is recalculated on every position update, for example
91
+ * when the anchor moves while scrolling.
94
92
  */
95
- private mouseTrackingHandler;
96
- private currentAnimation;
93
+ readonly autoResize?: boolean;
94
+ side: Side;
97
95
  connectedCallback(): void;
98
96
  componentDidLoad(): void;
99
97
  disconnectedCallback(): void;
98
+ private cleanup;
99
+ private isOpen;
100
+ private getContent;
101
+ private getContentMinSize;
100
102
  /**
101
- * Programmatically display the popovercontainer
102
- * @param target The element that invokes the popover and to which it is visually anchored.
103
+ * Shows the popover.
104
+ * @param anchor the element that the popover is visually anchored to.
103
105
  */
104
- show(target: HTMLElement): Promise<void>;
106
+ show(anchor: HTMLElement): Promise<void>;
105
107
  /**
106
- * Programmatically hide the popovercontainer
108
+ * Hides the popover.
107
109
  */
108
110
  hide(): Promise<void>;
109
111
  /**
110
- * Toggle popovercontainer display
111
- * @param target The element that invokes the popover and to which it is visually anchored.
112
- * @param force Pass true to always show or false to always hide
112
+ * Toggles the popover's state from hidden to showing and vice versa.
113
+ *
114
+ * If `state` is specified, the popover is forced to be shown if the is set to `true`, or hidden
115
+ * if it is set to `false`.
116
+ *
117
+ * @param anchor the element that the popover is visually anchored to.
118
+ * @param force the next state of the popover.
119
+ * @returns the new state of the popover: `true` if it is shown, `false` if it is hidden.
113
120
  */
114
- toggle(target: HTMLElement, force?: boolean): Promise<boolean>;
121
+ toggle(anchor: HTMLElement, force?: boolean): Promise<boolean>;
115
122
  /**
116
- * Handles the popover opening process and emits related events.
123
+ * Handles the popover's state transition from hidden to showing and vice versa.
117
124
  */
118
- private open;
125
+ private handleToggle;
119
126
  /**
120
- * Handles the popover closing process and emits related events.
127
+ * Handles the popover's state transition from hidden to showing, emitting related events.
121
128
  */
122
- private close;
129
+ private handleOpen;
123
130
  /**
124
- * Runs the animation and emits the toggle/show/hide events in the correct timing
131
+ * Run the open animation for the popover.
125
132
  */
126
133
  private runOpenAnimation;
127
134
  /**
128
- * Start or stop auto updates based on popovercontainer events.
129
- * Popovercontainers can be closed or opened with other methods than class members,
130
- * therefore listening to the toggle event is safer for cleaning up.
131
- * @param e ToggleEvent
135
+ * Handles the popover's state transition from showing to hidden, emitting related events.
132
136
  */
133
- private handleToggle;
137
+ private handleClose;
138
+ /**
139
+ * Listen for changes that affect the popover's position and update it accordingly.
140
+ */
141
+ private startAutoUpdate;
134
142
  /**
135
- * Start listening for DOM updates, scroll events etc. that have
136
- * an influence on popovercontainer positioning
143
+ * Updates the position of the popover based on the anchor's position and the specified placement.
144
+ * @param withSize whether to resize the popover based on the available space.
137
145
  */
138
- private startAutoupdates;
139
146
  private updatePosition;
140
- private calculatePosition;
141
- private updateSafeSpaceBoundaries;
147
+ private computePosition;
142
148
  render(): any;
143
149
  }
144
- export {};
@@ -579,21 +579,25 @@ export namespace Components {
579
579
  }
580
580
  interface PostPopovercontainer {
581
581
  /**
582
- * Whether or not to display a little pointer arrow
582
+ * Show a little indicator arrow
583
583
  * @default false
584
584
  */
585
585
  "arrow"?: boolean;
586
586
  /**
587
- * Whether to automatically hide the popover when the target moves outside the scrollport. If the `post-header` can cover the target, the popover will also be hidden as soon as the target scrolls behind it.
587
+ * Whether to automatically hide the popover when the anchor moves outside the scrollport. If the `post-header` can cover the anchor, the popover will also be hidden as soon as the anchor scrolls behind it.
588
588
  */
589
589
  "autoHide"?: boolean;
590
590
  /**
591
- * Gap between the edge of the page and the popovercontainer
591
+ * Whether to keep resizing the popover while it is open. Every popover is sized once when it opens: the space available around the anchor, minus the `edgeGap`, becomes the maximum width and height of the popover. The placement is then recalculated for that size. With `autoResize`, the popover's size is recalculated on every position update, for example when the anchor moves while scrolling.
592
+ */
593
+ "autoResize"?: boolean;
594
+ /**
595
+ * Gap between the edge of the viewport and the popover.
592
596
  * @default 8
593
597
  */
594
598
  "edgeGap"?: number;
595
599
  /**
596
- * Programmatically hide the popovercontainer
600
+ * Hides the popover.
597
601
  */
598
602
  "hide": () => Promise<void>;
599
603
  /**
@@ -601,25 +605,26 @@ export namespace Components {
601
605
  */
602
606
  "offset"?: number;
603
607
  /**
604
- * Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement. Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted towards the viewport if they would overlap edge boundaries.
608
+ * Placement of the popover according to the floating-ui options.
605
609
  * @default 'top'
606
610
  */
607
611
  "placement"?: Placement1;
608
612
  /**
609
- * Enables a safespace through which the cursor can be moved without the popover being disabled
613
+ * Whether to add a space through which the mouse can move without the popover being hidden.
610
614
  */
611
- "safeSpace"?: 'triangle' | 'trapezoid';
615
+ "safeSpace"?: boolean;
612
616
  /**
613
- * Programmatically display the popovercontainer
614
- * @param target The element that invokes the popover and to which it is visually anchored.
617
+ * Shows the popover.
618
+ * @param anchor the element that the popover is visually anchored to.
615
619
  */
616
- "show": (target: HTMLElement) => Promise<void>;
620
+ "show": (anchor: HTMLElement) => Promise<void>;
617
621
  /**
618
- * Toggle popovercontainer display
619
- * @param target The element that invokes the popover and to which it is visually anchored.
620
- * @param force Pass true to always show or false to always hide
622
+ * Toggles the popover's state from hidden to showing and vice versa. If `state` is specified, the popover is forced to be shown if the is set to `true`, or hidden if it is set to `false`.
623
+ * @param anchor the element that the popover is visually anchored to.
624
+ * @param force the next state of the popover.
625
+ * @returns the new state of the popover: `true` if it is shown, `false` if it is hidden.
621
626
  */
622
- "toggle": (target: HTMLElement, force?: boolean) => Promise<boolean>;
627
+ "toggle": (anchor: HTMLElement, force?: boolean) => Promise<boolean>;
623
628
  }
624
629
  interface PostProgressbar {
625
630
  /**
@@ -1640,6 +1645,9 @@ declare namespace LocalJSX {
1640
1645
  "url"?: string;
1641
1646
  }
1642
1647
  interface PostLanguageMenu {
1648
+ /**
1649
+ * An event emitted when the active language changes. The payload is the ISO 639 code of the newly active language.
1650
+ */
1643
1651
  "onPostChange"?: (event: PostLanguageMenuCustomEvent<string>) => void;
1644
1652
  /**
1645
1653
  * A title for the list of language options
@@ -1846,16 +1854,20 @@ declare namespace LocalJSX {
1846
1854
  }
1847
1855
  interface PostPopovercontainer {
1848
1856
  /**
1849
- * Whether or not to display a little pointer arrow
1857
+ * Show a little indicator arrow
1850
1858
  * @default false
1851
1859
  */
1852
1860
  "arrow"?: boolean;
1853
1861
  /**
1854
- * Whether to automatically hide the popover when the target moves outside the scrollport. If the `post-header` can cover the target, the popover will also be hidden as soon as the target scrolls behind it.
1862
+ * Whether to automatically hide the popover when the anchor moves outside the scrollport. If the `post-header` can cover the anchor, the popover will also be hidden as soon as the anchor scrolls behind it.
1855
1863
  */
1856
1864
  "autoHide"?: boolean;
1857
1865
  /**
1858
- * Gap between the edge of the page and the popovercontainer
1866
+ * Whether to keep resizing the popover while it is open. Every popover is sized once when it opens: the space available around the anchor, minus the `edgeGap`, becomes the maximum width and height of the popover. The placement is then recalculated for that size. With `autoResize`, the popover's size is recalculated on every position update, for example when the anchor moves while scrolling.
1867
+ */
1868
+ "autoResize"?: boolean;
1869
+ /**
1870
+ * Gap between the edge of the viewport and the popover.
1859
1871
  * @default 8
1860
1872
  */
1861
1873
  "edgeGap"?: number;
@@ -1864,34 +1876,34 @@ declare namespace LocalJSX {
1864
1876
  */
1865
1877
  "offset"?: number;
1866
1878
  /**
1867
- * Fires whenever the popovercontainer is about to be shown, passing in event.detail a `first` boolean, which is true if it is to be shown for the first time.
1879
+ * Emitted just before the popover is shown. The payload contains a `first` boolean, that is set to `true` when the popover is about to be shown for the first time.
1868
1880
  */
1869
1881
  "onPostBeforeShow"?: (event: PostPopovercontainerCustomEvent<{ first?: boolean }>) => void;
1870
1882
  /**
1871
- * Fires whenever the popovercontainer is about to be shown or hidden, passing in event.detail a `willOpen` boolean, which is true if the popovercontainer is about to be opened and false if it is about to be closed.
1883
+ * Emitted just before the popover's state changes. The payload contains a `willOpen` boolean, that is set to `true` when the popover is about to be shown, `false` when it is about to be hidden.
1872
1884
  */
1873
1885
  "onPostBeforeToggle"?: (event: PostPopovercontainerCustomEvent<{ willOpen: boolean }>) => void;
1874
1886
  /**
1875
- * Fires whenever the popovercontainer is hidden.
1887
+ * Emitted just after the popover is hidden.
1876
1888
  */
1877
1889
  "onPostHide"?: (event: PostPopovercontainerCustomEvent<any>) => void;
1878
1890
  /**
1879
- * Fires whenever the popovercontainer is shown, passing in event.detail a `first` boolean, which is true if it is shown for the first time.
1891
+ * Emitted just after the popover is shown. The payload contains a `first` boolean, that is set to `true` when the popover is shown for the first time.
1880
1892
  */
1881
1893
  "onPostShow"?: (event: PostPopovercontainerCustomEvent<{ first?: boolean }>) => void;
1882
1894
  /**
1883
- * Fires whenever the popovercontainer gets shown or hidden, passing in event.detail an object containing a `isOpen`boolean, which is true if the popovercontainer was opened and false if it was closed.
1895
+ * Emitted just after the popover's state changes. The payload contains a `isOpen` boolean, that is set to `true` when the popover is shown, `false` when it is hidden.
1884
1896
  */
1885
1897
  "onPostToggle"?: (event: PostPopovercontainerCustomEvent<{ isOpen: boolean }>) => void;
1886
1898
  /**
1887
- * Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement. Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted towards the viewport if they would overlap edge boundaries.
1899
+ * Placement of the popover according to the floating-ui options.
1888
1900
  * @default 'top'
1889
1901
  */
1890
1902
  "placement"?: Placement1;
1891
1903
  /**
1892
- * Enables a safespace through which the cursor can be moved without the popover being disabled
1904
+ * Whether to add a space through which the mouse can move without the popover being hidden.
1893
1905
  */
1894
- "safeSpace"?: 'triangle' | 'trapezoid';
1906
+ "safeSpace"?: boolean;
1895
1907
  }
1896
1908
  interface PostProgressbar {
1897
1909
  /**
@@ -2212,8 +2224,9 @@ declare namespace LocalJSX {
2212
2224
  "edgeGap": number;
2213
2225
  "offset": number;
2214
2226
  "arrow": boolean;
2215
- "safeSpace": 'triangle' | 'trapezoid';
2227
+ "safeSpace": boolean;
2216
2228
  "autoHide": boolean;
2229
+ "autoResize": boolean;
2217
2230
  }
2218
2231
  interface PostProgressbarAttributes {
2219
2232
  "min": number;
@@ -0,0 +1,14 @@
1
+ import { Derivable, DetectOverflowOptions, Middleware } from '@floating-ui/dom';
2
+ import { Dimensions } from '@floating-ui/utils';
3
+ export declare const FLIP_MIDDLEWARE = "post-flip";
4
+ export type FlipOptions = Omit<DetectOverflowOptions, 'elementContext'> & {
5
+ minSize?: Partial<Dimensions>;
6
+ };
7
+ /**
8
+ * Changes the placement of the floating element to keep it in view.
9
+ *
10
+ * Unlike the Floating UI `flip` middleware, placements are measured against `minSize` rather than
11
+ * against the current size of the floating element, and the placement with the smallest deficit is
12
+ * used when none of them fits.
13
+ */
14
+ export declare function flip(options?: FlipOptions | Derivable<FlipOptions>): Middleware;
@@ -0,0 +1,10 @@
1
+ import { Middleware } from '@floating-ui/dom';
2
+ export declare const SAFE_SPACE_MIDDLEWARE = "post-safe-space";
3
+ export interface SafeSpaceData {
4
+ polygon: string;
5
+ }
6
+ /**
7
+ * Computes the safe space, the area the pointer can travel through to get from the reference to
8
+ * the floating element.
9
+ */
10
+ export declare function safeSpace(): Middleware;
@@ -0,0 +1,4 @@
1
+ import { Side } from '@floating-ui/utils';
2
+ export declare const getNextSide: (side: Side) => Side;
3
+ export declare const getOppositeSide: (side: Side) => Side;
4
+ export declare const getPreviousSide: (side: Side) => Side;
@@ -8,6 +8,7 @@ export * from './event-from';
8
8
  export * from './get-focusable-children';
9
9
  export * from './get-root';
10
10
  export * from './get-slotted-element';
11
+ export * from './is-focus-visible';
11
12
  export * from './is-iso-date';
12
13
  export * from './is-motion-reduced';
13
14
  export * from './is-value-empty';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Checks whether an element currently matches `:focus-visible`, i.e. whether
3
+ * it was focused via keyboard rather than mouse/touch interaction.
4
+ */
5
+ export declare function isFocusVisible(element: Element | null): boolean;
@@ -113,5 +113,6 @@ export const TEST_MATRIX = {
113
113
  'jobs-loggedout': stateComposeHelper(SCROLLED_ONLY, BURGER_FLOW_NO_SECOND),
114
114
  'jobs-loggedin': stateComposeHelper(LOGGED_IN),
115
115
  'onepager': stateComposeHelper(SCROLLED_ONLY, LANGUAGE_AND_SCROLL),
116
- 'application': stateComposeHelper(SCROLLED_ONLY, LANGUAGE_AND_SCROLL),
116
+ 'application-compact': stateComposeHelper(SCROLLED_ONLY, LANGUAGE_AND_SCROLL),
117
+ 'application-condensed': stateComposeHelper(SCROLLED_ONLY, LANGUAGE_AND_SCROLL),
117
118
  };