@swisspost/design-system-components 10.7.0 → 10.9.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 (333) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{create-validator-decorator-D7nAb9KJ.js → create-validator-decorator-DVm_SDrR.js} +1 -1
  3. package/dist/cjs/{index-DWIlRT6N.js → index-DY4QxKNv.js} +5 -5
  4. package/dist/cjs/is-focus-visible-B3CqVQsX.js +19 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{one-of-B8RUgrZk.js → one-of-qu7_EPxf.js} +1 -1
  7. package/dist/cjs/{package-BtKYhTNj.js → package-kgRYEtTJ.js} +1 -1
  8. package/dist/cjs/{pattern-B6VoDk_m.js → pattern-EpwCKMyC.js} +1 -1
  9. package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
  10. package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
  11. package/dist/cjs/post-avatar.cjs.entry.js +85 -61
  12. package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
  13. package/dist/cjs/post-banner.cjs.entry.js +5 -5
  14. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
  15. package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
  16. package/dist/cjs/post-closebutton_14.cjs.entry.js +545 -607
  17. package/dist/cjs/post-collapsible_2.cjs.entry.js +13 -7
  18. package/dist/cjs/post-components.cjs.js +2 -2
  19. package/dist/cjs/post-date-picker.cjs.entry.js +24 -9
  20. package/dist/cjs/post-footer.cjs.entry.js +6 -6
  21. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  22. package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
  23. package/dist/cjs/post-listbox.cjs.entry.js +4 -4
  24. package/dist/cjs/post-number-input.cjs.entry.js +5 -5
  25. package/dist/cjs/post-pagination.cjs.entry.js +6 -6
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
  27. package/dist/cjs/post-popover.cjs.entry.js +9 -9
  28. package/dist/cjs/post-progressbar.cjs.entry.js +4 -4
  29. package/dist/cjs/post-rating.cjs.entry.js +6 -6
  30. package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +6 -6
  31. package/dist/cjs/post-side-navigation.cjs.entry.js +14 -9
  32. package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
  33. package/dist/cjs/post-stepper.cjs.entry.js +7 -7
  34. package/dist/cjs/post-tab-item.cjs.entry.js +6 -6
  35. package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
  36. package/dist/cjs/post-tabs.cjs.entry.js +37 -9
  37. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +6 -6
  38. package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
  39. package/dist/cjs/{required-bXtlqqaA.js → required-Dgzo-rb5.js} +1 -1
  40. package/dist/cjs/{type-BqLE7Uui.js → type-DBRxpBZI.js} +1 -1
  41. package/dist/cjs/{url-CUy3C3sH.js → url-Dl1JABeP.js} +1 -1
  42. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  43. package/dist/collection/components/post-avatar/avatar-utils.js +1 -2
  44. package/dist/collection/components/post-avatar/post-avatar.js +77 -59
  45. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  46. package/dist/collection/components/post-banner/post-banner.css +1 -1
  47. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
  48. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  49. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  50. package/dist/collection/components/post-collapsible/post-collapsible.js +9 -3
  51. package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
  52. package/dist/collection/components/post-date-picker/post-date-picker.js +18 -3
  53. package/dist/collection/components/post-footer/post-footer.css +1 -1
  54. package/dist/collection/components/post-header/post-header.css +1 -1
  55. package/dist/collection/components/post-header/post-header.js +100 -18
  56. package/dist/collection/components/post-icon/post-icon.css +1 -1
  57. package/dist/collection/components/post-icon/post-icon.js +1 -2
  58. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
  59. package/dist/collection/components/post-language-menu/post-language-menu.js +2 -2
  60. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  61. package/dist/collection/components/post-listbox/post-listbox.css +1 -1
  62. package/dist/collection/components/post-listbox/post-listbox.js +1 -1
  63. package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
  64. package/dist/collection/components/post-logo/post-logo.css +1 -1
  65. package/dist/collection/components/post-logo/post-logo.js +1 -1
  66. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  67. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
  68. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  69. package/dist/collection/components/post-megadropdown/post-megadropdown.js +34 -16
  70. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  71. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
  72. package/dist/collection/components/post-menu/post-menu.css +1 -1
  73. package/dist/collection/components/post-menu/post-menu.js +3 -14
  74. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
  75. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
  76. package/dist/collection/components/post-number-input/post-number-input.css +2 -2
  77. package/dist/collection/components/post-number-input/post-number-input.js +2 -2
  78. package/dist/collection/components/post-pagination/post-pagination.css +1 -1
  79. package/dist/collection/components/post-popover/post-popover.css +1 -1
  80. package/dist/collection/components/post-popover/post-popover.js +2 -2
  81. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
  82. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  83. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +211 -323
  84. package/dist/collection/components/post-progressbar/post-progressbar.js +1 -1
  85. package/dist/collection/components/post-rating/post-rating.js +1 -1
  86. package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
  87. package/dist/collection/components/post-side-navigation/post-side-navigation.js +7 -3
  88. package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +1 -1
  89. package/dist/collection/components/post-stepper/post-stepper.js +1 -1
  90. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  91. package/dist/collection/components/post-tab-item/post-tab-item.js +2 -2
  92. package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
  93. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  94. package/dist/collection/components/post-tabs/post-tabs.js +31 -3
  95. package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
  96. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  97. package/dist/collection/components/post-tooltip/post-tooltip.js +3 -1
  98. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
  99. package/dist/collection/test-setup.js +28 -0
  100. package/dist/collection/utils/floating-ui/middleware/flip.js +77 -0
  101. package/dist/collection/utils/floating-ui/middleware/safe-space.js +52 -0
  102. package/dist/collection/utils/floating-ui/util.js +10 -0
  103. package/dist/collection/utils/index.js +1 -0
  104. package/dist/collection/utils/is-focus-visible.js +15 -0
  105. package/dist/components/is-focus-visible.js +1 -0
  106. package/dist/components/package.js +1 -1
  107. package/dist/components/post-accordion-item2.js +1 -1
  108. package/dist/components/post-avatar.js +1 -1
  109. package/dist/components/post-back-to-top.js +1 -1
  110. package/dist/components/post-banner.js +1 -1
  111. package/dist/components/post-breadcrumb-item.js +1 -1
  112. package/dist/components/post-breadcrumbs.js +1 -1
  113. package/dist/components/post-closebutton2.js +1 -1
  114. package/dist/components/post-collapsible2.js +1 -1
  115. package/dist/components/post-date-picker.js +1 -1
  116. package/dist/components/post-footer.js +1 -1
  117. package/dist/components/post-header.js +1 -1
  118. package/dist/components/post-icon2.js +1 -1
  119. package/dist/components/post-language-menu.js +1 -1
  120. package/dist/components/post-linkarea.js +1 -1
  121. package/dist/components/post-listbox-option.js +1 -1
  122. package/dist/components/post-listbox.js +1 -1
  123. package/dist/components/post-logo.js +1 -1
  124. package/dist/components/post-mainnavigation.js +1 -1
  125. package/dist/components/post-megadropdown-trigger.js +1 -1
  126. package/dist/components/post-megadropdown.js +1 -1
  127. package/dist/components/post-menu-item2.js +1 -1
  128. package/dist/components/post-menu-trigger2.js +1 -1
  129. package/dist/components/post-menu2.js +1 -1
  130. package/dist/components/post-number-input.js +1 -1
  131. package/dist/components/post-pagination.js +1 -1
  132. package/dist/components/post-popover-trigger.js +1 -1
  133. package/dist/components/post-popover.js +1 -1
  134. package/dist/components/post-popovercontainer2.js +1 -1
  135. package/dist/components/post-progressbar.js +1 -1
  136. package/dist/components/post-rating.js +1 -1
  137. package/dist/components/post-side-navigation-trigger.js +1 -1
  138. package/dist/components/post-side-navigation.js +1 -1
  139. package/dist/components/post-stepper-item.js +1 -1
  140. package/dist/components/post-stepper.js +1 -1
  141. package/dist/components/post-tab-item.js +1 -1
  142. package/dist/components/post-tab-panel.js +1 -1
  143. package/dist/components/post-tabs.js +1 -1
  144. package/dist/components/post-togglebutton2.js +1 -1
  145. package/dist/components/post-tooltip-trigger.js +1 -1
  146. package/dist/components/post-tooltip.js +1 -1
  147. package/dist/components/react/index.js +1 -1
  148. package/dist/components/react/p-BWwWKRO5.js +1 -0
  149. package/dist/components/react/p-CAL337jJ.js +1 -0
  150. package/dist/components/react/p-CBVthgj-.js +1 -0
  151. package/dist/components/react/{p-DS46v3ju.js → p-CLkb55ud.js} +1 -1
  152. package/dist/components/react/{p-C8_zqgAP.js → p-CYBXVnUJ.js} +1 -1
  153. package/dist/components/react/p-Ci-TsJYj.js +1 -0
  154. package/dist/components/react/p-CtgMQs_Q.js +1 -0
  155. package/dist/components/react/p-D4LBzsbB.js +1 -0
  156. package/dist/components/react/p-D5lqOfVk.js +1 -0
  157. package/dist/components/react/p-DGpWjdFJ.js +1 -0
  158. package/dist/components/react/{p-BBv5JYsW.js → p-DSk0Nq8U.js} +1 -1
  159. package/dist/components/react/{p-1y1rv5Tw.js → p-Db3d6dKF.js} +1 -1
  160. package/dist/components/react/p-DkDIUTRi.js +1 -0
  161. package/dist/components/react/post-accordion-item.js +1 -1
  162. package/dist/components/react/post-accordion.js +1 -1
  163. package/dist/components/react/post-autocomplete.js +1 -1
  164. package/dist/components/react/post-avatar.js +1 -1
  165. package/dist/components/react/post-back-to-top.js +1 -1
  166. package/dist/components/react/post-banner.js +1 -1
  167. package/dist/components/react/post-breadcrumb-item.js +1 -1
  168. package/dist/components/react/post-breadcrumbs.js +1 -1
  169. package/dist/components/react/post-closebutton.js +1 -1
  170. package/dist/components/react/post-collapsible-trigger.js +1 -1
  171. package/dist/components/react/post-collapsible.js +1 -1
  172. package/dist/components/react/post-date-picker.js +1 -1
  173. package/dist/components/react/post-footer.js +1 -1
  174. package/dist/components/react/post-header.js +1 -1
  175. package/dist/components/react/post-icon.js +1 -1
  176. package/dist/components/react/post-language-menu-item.js +1 -1
  177. package/dist/components/react/post-language-menu.js +1 -1
  178. package/dist/components/react/post-linkarea.js +1 -1
  179. package/dist/components/react/post-listbox-option.js +1 -1
  180. package/dist/components/react/post-listbox.js +1 -1
  181. package/dist/components/react/post-logo.js +1 -1
  182. package/dist/components/react/post-mainnavigation.js +1 -1
  183. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  184. package/dist/components/react/post-megadropdown.js +1 -1
  185. package/dist/components/react/post-menu-item.js +1 -1
  186. package/dist/components/react/post-menu-trigger.js +1 -1
  187. package/dist/components/react/post-menu.js +1 -1
  188. package/dist/components/react/post-number-input.js +1 -1
  189. package/dist/components/react/post-pagination.js +1 -1
  190. package/dist/components/react/post-popover-trigger.js +1 -1
  191. package/dist/components/react/post-popover.js +1 -1
  192. package/dist/components/react/post-popovercontainer.js +1 -1
  193. package/dist/components/react/post-progressbar.js +1 -1
  194. package/dist/components/react/post-rating.js +1 -1
  195. package/dist/components/react/post-side-navigation-trigger.js +1 -1
  196. package/dist/components/react/post-side-navigation.js +1 -1
  197. package/dist/components/react/post-stepper-item.js +1 -1
  198. package/dist/components/react/post-stepper.js +1 -1
  199. package/dist/components/react/post-tab-item.js +1 -1
  200. package/dist/components/react/post-tab-panel.js +1 -1
  201. package/dist/components/react/post-tabs.js +1 -1
  202. package/dist/components/react/post-togglebutton.js +1 -1
  203. package/dist/components/react/post-tooltip-trigger.js +1 -1
  204. package/dist/components/react/post-tooltip.js +1 -1
  205. package/dist/docs.json +67 -45
  206. package/dist/esm/{create-validator-decorator-DFpQtJzK.js → create-validator-decorator-Cp_NUmrr.js} +1 -1
  207. package/dist/esm/{index-Bs0zeM5Q.js → index-D0jX3Fts.js} +5 -5
  208. package/dist/esm/is-focus-visible-BWwWKRO5.js +17 -0
  209. package/dist/esm/loader.js +3 -3
  210. package/dist/esm/{one-of-DQCfaZpw.js → one-of-B9locHPx.js} +1 -1
  211. package/dist/esm/{package-BBz9PVf0.js → package-CAL337jJ.js} +1 -1
  212. package/dist/esm/{pattern-3lnaFlkk.js → pattern-BL3OBU8C.js} +1 -1
  213. package/dist/esm/post-accordion_2.entry.js +6 -6
  214. package/dist/esm/post-autocomplete.entry.js +5 -5
  215. package/dist/esm/post-avatar.entry.js +85 -61
  216. package/dist/esm/post-back-to-top.entry.js +6 -6
  217. package/dist/esm/post-banner.entry.js +5 -5
  218. package/dist/esm/post-breadcrumb-item.entry.js +8 -8
  219. package/dist/esm/post-breadcrumbs.entry.js +7 -7
  220. package/dist/esm/post-closebutton_14.entry.js +545 -607
  221. package/dist/esm/post-collapsible_2.entry.js +13 -7
  222. package/dist/esm/post-components.js +3 -3
  223. package/dist/esm/post-date-picker.entry.js +24 -9
  224. package/dist/esm/post-footer.entry.js +6 -6
  225. package/dist/esm/post-linkarea.entry.js +3 -3
  226. package/dist/esm/post-listbox-option.entry.js +4 -4
  227. package/dist/esm/post-listbox.entry.js +4 -4
  228. package/dist/esm/post-number-input.entry.js +5 -5
  229. package/dist/esm/post-pagination.entry.js +6 -6
  230. package/dist/esm/post-popover-trigger.entry.js +5 -5
  231. package/dist/esm/post-popover.entry.js +9 -9
  232. package/dist/esm/post-progressbar.entry.js +4 -4
  233. package/dist/esm/post-rating.entry.js +6 -6
  234. package/dist/esm/post-side-navigation-trigger.entry.js +6 -6
  235. package/dist/esm/post-side-navigation.entry.js +14 -9
  236. package/dist/esm/post-stepper-item.entry.js +3 -3
  237. package/dist/esm/post-stepper.entry.js +7 -7
  238. package/dist/esm/post-tab-item.entry.js +6 -6
  239. package/dist/esm/post-tab-panel.entry.js +6 -6
  240. package/dist/esm/post-tabs.entry.js +37 -9
  241. package/dist/esm/post-tooltip-trigger.entry.js +6 -6
  242. package/dist/esm/post-tooltip.entry.js +8 -6
  243. package/dist/esm/{required-NuzPg5jZ.js → required-CDaQB1gC.js} +1 -1
  244. package/dist/esm/{type-ChnksJ25.js → type-CQ7XuPCZ.js} +1 -1
  245. package/dist/esm/{url-BCk3ZU-x.js → url-B-86gtTK.js} +1 -1
  246. package/dist/post-components/{p-63e570c4.entry.js → p-077be898.entry.js} +1 -1
  247. package/dist/post-components/{p-6a2f47af.entry.js → p-184bd61c.entry.js} +1 -1
  248. package/dist/post-components/p-1933e4fa.entry.js +1 -0
  249. package/dist/post-components/p-21e6f82a.entry.js +1 -0
  250. package/dist/post-components/{p-c2de3702.entry.js → p-2220db4c.entry.js} +1 -1
  251. package/dist/post-components/p-2aff3873.entry.js +1 -0
  252. package/dist/post-components/p-2b475cd7.entry.js +1 -0
  253. package/dist/post-components/p-33a898ec.entry.js +1 -0
  254. package/dist/post-components/p-405c1fff.entry.js +1 -0
  255. package/dist/post-components/{p-bd128657.entry.js → p-5efaca25.entry.js} +1 -1
  256. package/dist/post-components/p-6a9661d9.entry.js +1 -0
  257. package/dist/post-components/{p-f275b872.entry.js → p-7dd192b3.entry.js} +1 -1
  258. package/dist/post-components/p-8e5052d5.entry.js +1 -0
  259. package/dist/post-components/p-9440738d.entry.js +1 -0
  260. package/dist/post-components/{p-31550a50.entry.js → p-965a02fb.entry.js} +1 -1
  261. package/dist/post-components/{p-61a45246.entry.js → p-9740719e.entry.js} +1 -1
  262. package/dist/post-components/p-9af8f5af.entry.js +1 -0
  263. package/dist/post-components/{p-DeUk3rcv.js → p-BCPv4bcY.js} +1 -1
  264. package/dist/post-components/p-BWwWKRO5.js +1 -0
  265. package/dist/post-components/p-CAL337jJ.js +1 -0
  266. package/dist/post-components/{p-D1s6tESz.js → p-CP3LjuFR.js} +1 -1
  267. package/dist/post-components/p-D0jX3Fts.js +2 -0
  268. package/dist/post-components/{p-Bl-_v3aT.js → p-D6mVqZLg.js} +1 -1
  269. package/dist/post-components/{p-BwhzbRIR.js → p-DSaWK_q-.js} +1 -1
  270. package/dist/post-components/p-VPHnF9fB.js +1 -0
  271. package/dist/post-components/p-a6971c1c.entry.js +1 -0
  272. package/dist/post-components/p-a7d8f328.entry.js +1 -0
  273. package/dist/post-components/{p-f784e149.entry.js → p-bb9a0e1e.entry.js} +1 -1
  274. package/dist/post-components/{p-e6a4146b.entry.js → p-bf8c7dca.entry.js} +1 -1
  275. package/dist/post-components/p-c3351def.entry.js +1 -0
  276. package/dist/post-components/{p-31a97aae.entry.js → p-c87f33f0.entry.js} +1 -1
  277. package/dist/post-components/{p-64480e3a.entry.js → p-e30b534d.entry.js} +1 -1
  278. package/dist/post-components/{p-43240818.entry.js → p-e73eabac.entry.js} +1 -1
  279. package/dist/post-components/{p-f566768e.entry.js → p-e84fe883.entry.js} +1 -1
  280. package/dist/post-components/{p-aa33141b.entry.js → p-eaa28736.entry.js} +1 -1
  281. package/dist/post-components/{p-451ec8ee.entry.js → p-f2cb8ed1.entry.js} +1 -1
  282. package/dist/post-components/{p-58b66607.entry.js → p-ffbf2375.entry.js} +1 -1
  283. package/dist/post-components/p-gv9b-Z15.js +1 -0
  284. package/dist/post-components/post-components.css +2 -2
  285. package/dist/post-components/post-components.esm.js +1 -1
  286. package/dist/types/components/post-avatar/avatar-utils.d.ts +0 -2
  287. package/dist/types/components/post-avatar/post-avatar.d.ts +11 -9
  288. package/dist/types/components/post-date-picker/post-date-picker.d.ts +2 -0
  289. package/dist/types/components/post-header/post-header.d.ts +14 -0
  290. package/dist/types/components/post-language-menu/post-language-menu.d.ts +3 -0
  291. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -1
  292. package/dist/types/components/post-menu/post-menu.d.ts +0 -1
  293. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +74 -69
  294. package/dist/types/components/post-tabs/post-tabs.d.ts +4 -0
  295. package/dist/types/components.d.ts +39 -26
  296. package/dist/types/utils/floating-ui/middleware/flip.d.ts +14 -0
  297. package/dist/types/utils/floating-ui/middleware/safe-space.d.ts +10 -0
  298. package/dist/types/utils/floating-ui/util.d.ts +4 -0
  299. package/dist/types/utils/index.d.ts +1 -0
  300. package/dist/types/utils/is-focus-visible.d.ts +5 -0
  301. package/dist/vrt/helpers/header-test-config.js +2 -1
  302. package/hydrate/index.js +659 -634
  303. package/hydrate/index.mjs +659 -634
  304. package/package.json +22 -21
  305. package/dist/components/react/p-BBz9PVf0.js +0 -1
  306. package/dist/components/react/p-BgEY7xhT.js +0 -1
  307. package/dist/components/react/p-C3J7fIWx.js +0 -1
  308. package/dist/components/react/p-C5ibTdH5.js +0 -1
  309. package/dist/components/react/p-CUKzje9q.js +0 -1
  310. package/dist/components/react/p-DTBtJCjk.js +0 -1
  311. package/dist/components/react/p-XUkUhxaz.js +0 -1
  312. package/dist/components/react/p-ialuSSl2.js +0 -1
  313. package/dist/post-components/p-10e430c3.entry.js +0 -1
  314. package/dist/post-components/p-32e1e951.entry.js +0 -1
  315. package/dist/post-components/p-4f08b99b.entry.js +0 -1
  316. package/dist/post-components/p-54432b47.entry.js +0 -1
  317. package/dist/post-components/p-5d7de657.entry.js +0 -1
  318. package/dist/post-components/p-63dd9a76.entry.js +0 -1
  319. package/dist/post-components/p-96d07f2b.entry.js +0 -1
  320. package/dist/post-components/p-9a1e8b1d.entry.js +0 -1
  321. package/dist/post-components/p-BBz9PVf0.js +0 -1
  322. package/dist/post-components/p-Bs0zeM5Q.js +0 -2
  323. package/dist/post-components/p-DH-eJVHZ.js +0 -1
  324. package/dist/post-components/p-Dk-DtPZn.js +0 -1
  325. package/dist/post-components/p-aff180f5.entry.js +0 -1
  326. package/dist/post-components/p-d5327dd1.entry.js +0 -1
  327. package/dist/post-components/p-e1817744.entry.js +0 -1
  328. package/dist/post-components/p-f6da5e69.entry.js +0 -1
  329. package/dist/post-components/p-f917527c.entry.js +0 -1
  330. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +0 -23
  331. package/dist/vrt/helpers/header-variants.config.js +0 -157
  332. /package/dist/collection/utils/{floating-ui.js → floating-ui/platform/safe-area.js} +0 -0
  333. /package/dist/types/utils/{floating-ui.d.ts → floating-ui/platform/safe-area.d.ts} +0 -0
@@ -8,78 +8,46 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
9
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10
10
  };
11
- import { Build, h, Host, } from "@stencil/core";
12
- import { OneOf, Type } from "../../utils/index";
13
11
  import { version } from "../../../../package";
12
+ import { Build, h, Host, } from "@stencil/core";
13
+ import { popIn } from "../../animations/pop-in";
14
14
  import { PLACEMENT_TYPES } from "../../types/index";
15
- import { arrow, autoUpdate, flip, hide, inline, limitShift, offset, shift, size, } from "@floating-ui/dom";
15
+ import { OneOf, Type } from "../../utils/index";
16
+ import { arrow, autoUpdate, hide, inline, limitShift, shift, size, offset, } from "@floating-ui/dom";
17
+ import { getSide } from "@floating-ui/utils";
18
+ import { flip } from "../../utils/floating-ui/middleware/flip";
19
+ import { getOppositeSide } from "../../utils/floating-ui/util";
20
+ import { computePositionWithSafeArea } from "../../utils/floating-ui/platform/safe-area";
21
+ import { SAFE_SPACE_MIDDLEWARE, safeSpace } from "../../utils/floating-ui/middleware/safe-space";
16
22
  // Polyfill for popovers, can be removed when https://caniuse.com/?search=popover is green
17
- import { popIn } from "../../animations/pop-in";
18
23
  import { apply, isSupported } from "@oddbird/popover-polyfill/fn";
19
- import { computePositionWithSafeArea } from "../../utils/floating-ui";
20
- const ANIMATIONS = {
21
- 'pop-in': popIn,
22
- };
24
+ const AVAILABLE_WIDTH_PROPERTY = '--post-popovercontainer-available-width';
25
+ const AVAILABLE_HEIGHT_PROPERTY = '--post-popovercontainer-available-height';
26
+ const SAFE_SPACE_PROPERTY = '--post-popovercontainer-safe-space';
23
27
  /**
24
- * @slot - Default slot for placing content inside the popovercontainer.
28
+ * @slot - Default slot for placing content inside the popover.
25
29
  */
26
30
  export class PostPopovercontainer {
27
- static {
28
- this.STATIC_SIDES = {
29
- top: 'bottom',
30
- right: 'left',
31
- bottom: 'top',
32
- left: 'right',
33
- };
34
- }
35
- static {
36
- this.PROPERTIES_TO_CLEAR = [
37
- '--post-safe-space-popover-x',
38
- '--post-safe-space-popover-y',
39
- '--post-safe-space-popover-x-start',
40
- '--post-safe-space-popover-x-end',
41
- '--post-safe-space-popover-y-start',
42
- '--post-safe-space-popover-y-end',
43
- '--post-safe-space-trigger-x',
44
- '--post-safe-space-trigger-y',
45
- '--post-safe-space-trigger-x-start',
46
- '--post-safe-space-trigger-x-end',
47
- '--post-safe-space-trigger-y-start',
48
- '--post-safe-space-trigger-y-end',
49
- ];
50
- }
51
31
  constructor() {
32
+ /** The element the popover is anchored to */
33
+ this.anchorRef = null;
34
+ this.arrowRef = null;
35
+ this.hasBeenOpened = false;
52
36
  this.toggleTimeoutId = null;
53
- this.hasOpenedOnce = true;
37
+ this.runningAnimation = null;
38
+ this.stopAutoUpdate = null;
54
39
  /**
55
- * Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
56
- * Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted
57
- * towards the viewport if they would overlap edge boundaries.
40
+ * Placement of the popover according to the floating-ui options.
58
41
  */
59
42
  this.placement = 'top';
60
43
  /**
61
- * Gap between the edge of the page and the popovercontainer
44
+ * Gap between the edge of the viewport and the popover.
62
45
  */
63
46
  this.edgeGap = 8;
64
47
  /**
65
- * Whether or not to display a little pointer arrow
48
+ * Show a little indicator arrow
66
49
  */
67
50
  this.arrow = false;
68
- /**
69
- * Animation style
70
- */
71
- this.animation = 'pop-in';
72
- this.currentAnimation = null;
73
- this.boundMouseTrackingHandler = this.mouseTrackingHandler.bind(this);
74
- }
75
- /**
76
- * Updates cursor position for safe space feature when popover is open.
77
- * Sets CSS custom properties for dynamic styling of safe area.
78
- * @param event MouseEvent with cursor position
79
- */
80
- mouseTrackingHandler(event) {
81
- this.host.style.setProperty('--post-safe-space-cursor-x', `${event.clientX}px`);
82
- this.host.style.setProperty('--post-safe-space-cursor-y', `${event.clientY}px`);
83
51
  }
84
52
  connectedCallback() {
85
53
  if (Build.isBrowser && !isSupported()) {
@@ -90,296 +58,197 @@ export class PostPopovercontainer {
90
58
  this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
91
59
  }
92
60
  disconnectedCallback() {
93
- if (typeof this.clearAutoUpdate === 'function') {
94
- this.clearAutoUpdate();
95
- }
61
+ this.cleanup();
96
62
  this.host.removeEventListener('beforetoggle', this.handleToggle.bind(this));
97
63
  }
64
+ cleanup() {
65
+ this.stopAutoUpdate?.();
66
+ if (this.runningAnimation) {
67
+ this.runningAnimation.cancel();
68
+ this.runningAnimation = null;
69
+ }
70
+ }
71
+ isOpen() {
72
+ return this.host?.matches(':where(:popover-open, .popover-open)');
73
+ }
74
+ getContent() {
75
+ return this.host?.shadowRoot.querySelector('[part="post-popovercontainer-content"]');
76
+ }
77
+ getContentMinSize() {
78
+ const content = this.getContent();
79
+ if (!content)
80
+ return {};
81
+ const { minWidth, minHeight } = getComputedStyle(content);
82
+ return {
83
+ width: Number.parseFloat(minWidth) || 0,
84
+ height: Number.parseFloat(minHeight) || 0,
85
+ };
86
+ }
98
87
  /**
99
- * Programmatically display the popovercontainer
100
- * @param target The element that invokes the popover and to which it is visually anchored.
88
+ * Shows the popover.
89
+ * @param anchor the element that the popover is visually anchored to.
101
90
  */
102
- async show(target) {
103
- if (this.toggleTimeoutId || !target)
91
+ async show(anchor) {
92
+ if (this.toggleTimeoutId || !anchor || this.isOpen())
104
93
  return;
105
- this.eventTarget = target;
106
- this.updatePosition();
94
+ this.anchorRef = anchor;
107
95
  this.host.showPopover();
108
96
  }
109
97
  /**
110
- * Programmatically hide the popovercontainer
98
+ * Hides the popover.
111
99
  */
112
100
  async hide() {
113
- if (!this.toggleTimeoutId) {
114
- this.eventTarget = null;
115
- this.host.hidePopover();
116
- this.postHide.emit();
117
- }
101
+ if (this.toggleTimeoutId || !this.isOpen())
102
+ return;
103
+ this.anchorRef = null;
104
+ this.host.hidePopover();
105
+ this.postHide.emit();
118
106
  }
119
107
  /**
120
- * Toggle popovercontainer display
121
- * @param target The element that invokes the popover and to which it is visually anchored.
122
- * @param force Pass true to always show or false to always hide
108
+ * Toggles the popover's state from hidden to showing and vice versa.
109
+ *
110
+ * If `state` is specified, the popover is forced to be shown if the is set to `true`, or hidden
111
+ * if it is set to `false`.
112
+ *
113
+ * @param anchor the element that the popover is visually anchored to.
114
+ * @param force the next state of the popover.
115
+ * @returns the new state of the popover: `true` if it is shown, `false` if it is hidden.
123
116
  */
124
- async toggle(target, force) {
125
- const isOpen = this.host.matches(':where(:popover-open, .popover-open)');
126
- const willOpen = force === true || (force === undefined && !isOpen);
127
- if (willOpen && !target)
117
+ async toggle(anchor, force) {
118
+ const isOpen = this.isOpen();
119
+ if (!this.host || this.toggleTimeoutId)
128
120
  return isOpen;
129
- this.eventTarget = target;
130
- // Prevent instant double toggle
131
- if (!this.toggleTimeoutId) {
132
- this.updatePosition();
133
- this.host.togglePopover(force);
134
- this.toggleTimeoutId = null;
135
- }
136
- return this.host.matches(':where(:popover-open, .popover-open)');
121
+ const shouldOpen = force === true || (force === undefined && !isOpen);
122
+ if (isOpen === shouldOpen || (shouldOpen && !anchor))
123
+ return isOpen;
124
+ this.anchorRef = shouldOpen ? anchor : null;
125
+ this.host.togglePopover(force);
126
+ this.toggleTimeoutId = null;
127
+ return this.isOpen();
137
128
  }
138
129
  /**
139
- * Handles the popover opening process and emits related events.
130
+ * Handles the popover's state transition from hidden to showing and vice versa.
140
131
  */
141
- open() {
142
- const content = this.host.shadowRoot?.querySelector('.popover-content');
143
- this.startAutoupdates();
144
- if (content) {
145
- const animationFn = ANIMATIONS[this.animation];
146
- // Only run the animation if it corresponds to a valid, registered animation function
147
- if (typeof animationFn === 'function') {
148
- this.runOpenAnimation(animationFn, content);
149
- }
150
- else {
151
- // No animation case
152
- this.postBeforeToggle.emit({ willOpen: true });
153
- this.postBeforeShow.emit({ first: this.hasOpenedOnce });
154
- this.postToggle.emit({ isOpen: true });
155
- this.postShow.emit({ first: this.hasOpenedOnce });
156
- if (this.hasOpenedOnce)
157
- this.hasOpenedOnce = false;
158
- }
159
- }
160
- if (this.safeSpace) {
161
- globalThis.addEventListener('mousemove', this.boundMouseTrackingHandler);
162
- }
132
+ async handleToggle(event) {
133
+ this.toggleTimeoutId = globalThis.setTimeout(() => (this.toggleTimeoutId = null), 10);
134
+ if (event.newState === 'open')
135
+ await this.handleOpen();
136
+ else
137
+ await this.handleClose();
163
138
  }
164
139
  /**
165
- * Handles the popover closing process and emits related events.
140
+ * Handles the popover's state transition from hidden to showing, emitting related events.
166
141
  */
167
- close() {
168
- if (typeof this.clearAutoUpdate === 'function') {
169
- this.clearAutoUpdate();
170
- }
171
- if (this.safeSpace) {
172
- globalThis.removeEventListener('mousemove', this.boundMouseTrackingHandler);
142
+ async handleOpen() {
143
+ this.postBeforeToggle.emit({ willOpen: true });
144
+ this.postBeforeShow.emit({ first: !this.hasBeenOpened });
145
+ await this.updatePosition(true);
146
+ this.startAutoUpdate();
147
+ try {
148
+ await this.runOpenAnimation();
173
149
  }
174
- // Cancel any running animation
175
- if (this.currentAnimation) {
176
- this.currentAnimation.cancel();
177
- this.currentAnimation = null;
150
+ catch {
151
+ return;
178
152
  }
179
- this.postBeforeToggle.emit({ willOpen: false });
180
- this.postToggle.emit({ isOpen: false });
181
- this.postHide.emit();
153
+ this.postToggle.emit({ isOpen: true });
154
+ this.postShow.emit({ first: !this.hasBeenOpened });
155
+ this.hasBeenOpened = true;
182
156
  }
183
157
  /**
184
- * Runs the animation and emits the toggle/show/hide events in the correct timing
158
+ * Run the open animation for the popover.
185
159
  */
186
- async runOpenAnimation(animationFn, element) {
187
- let animation;
188
- try {
189
- animation = animationFn(element);
190
- if (!animation) {
191
- // Fallback: no animation, just emit open events directly
192
- this.postBeforeToggle.emit({ willOpen: true });
193
- this.postBeforeShow.emit({ first: this.hasOpenedOnce });
194
- this.postToggle.emit({ isOpen: true });
195
- this.postShow.emit({ first: this.hasOpenedOnce });
196
- return;
197
- }
198
- this.currentAnimation = animation;
199
- if (animation.playState === 'running') {
200
- this.postBeforeToggle.emit({ willOpen: true });
201
- this.postBeforeShow.emit({ first: this.hasOpenedOnce });
202
- }
203
- await animation.finished;
204
- this.postToggle.emit({ isOpen: true });
205
- this.postShow.emit({ first: this.hasOpenedOnce });
206
- this.hasOpenedOnce = true;
207
- }
208
- catch (err) {
209
- console.warn('Animation failed or was interrupted:', err);
210
- // Reset all states to closing
211
- this.postBeforeToggle.emit({ willOpen: false });
212
- this.postBeforeShow.emit({ first: this.hasOpenedOnce });
213
- this.postToggle.emit({ isOpen: false });
214
- }
215
- finally {
216
- if (this.currentAnimation === animation) {
217
- this.currentAnimation = null;
218
- }
219
- }
160
+ async runOpenAnimation() {
161
+ const content = this.getContent();
162
+ if (!content)
163
+ return;
164
+ this.runningAnimation = popIn(content);
165
+ await this.runningAnimation.finished;
220
166
  }
221
167
  /**
222
- * Start or stop auto updates based on popovercontainer events.
223
- * Popovercontainers can be closed or opened with other methods than class members,
224
- * therefore listening to the toggle event is safer for cleaning up.
225
- * @param e ToggleEvent
168
+ * Handles the popover's state transition from showing to hidden, emitting related events.
226
169
  */
227
- handleToggle(e) {
228
- this.toggleTimeoutId = globalThis.setTimeout(() => (this.toggleTimeoutId = null), 10);
229
- const isOpen = e.newState === 'open';
230
- if (isOpen) {
231
- this.open();
232
- }
233
- else {
234
- this.close();
235
- }
170
+ async handleClose() {
171
+ this.postBeforeToggle.emit({ willOpen: false });
172
+ this.cleanup();
173
+ this.host.style.removeProperty(AVAILABLE_WIDTH_PROPERTY);
174
+ this.host.style.removeProperty(AVAILABLE_HEIGHT_PROPERTY);
175
+ this.host.style.removeProperty(SAFE_SPACE_PROPERTY);
176
+ this.postToggle.emit({ isOpen: false });
177
+ this.postHide.emit();
236
178
  }
237
179
  /**
238
- * Start listening for DOM updates, scroll events etc. that have
239
- * an influence on popovercontainer positioning
180
+ * Listen for changes that affect the popover's position and update it accordingly.
240
181
  */
241
- startAutoupdates() {
242
- if (!this.eventTarget || !this.host)
182
+ startAutoUpdate() {
183
+ if (!this.host || !this.anchorRef)
243
184
  return;
244
- this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.updatePosition.bind(this));
185
+ this.stopAutoUpdate = autoUpdate(this.anchorRef, this.host, () => this.updatePosition(this.autoResize));
245
186
  }
246
- async updatePosition() {
247
- const { x, y, middlewareData, placement } = await this.calculatePosition();
248
- // Hide the popover if the target is outside the viewport
187
+ /**
188
+ * Updates the position of the popover based on the anchor's position and the specified placement.
189
+ * @param withSize whether to resize the popover based on the available space.
190
+ */
191
+ async updatePosition(withSize = false) {
192
+ const { x, y, middlewareData, placement } = await this.computePosition(withSize);
193
+ // Hide the popover if the anchor is outside the scrollport.
249
194
  if (middlewareData.hide?.referenceHidden) {
250
195
  this.host.hidePopover();
196
+ return;
251
197
  }
252
- const currentPlacement = placement.split('-')[0];
253
- this.dynamicPlacement = currentPlacement;
254
- // Position popover
198
+ this.side = getSide(placement);
199
+ // Position the popover.
255
200
  this.host.style.left = `${x}px`;
256
201
  this.host.style.top = `${y}px`;
257
- // Position arrow if enabled
258
- if (this.arrow && middlewareData.arrow) {
259
- const { x: arrowX, y: arrowY } = middlewareData.arrow;
260
- const staticSide = PostPopovercontainer.STATIC_SIDES[currentPlacement];
261
- const arrowSizePx = this.arrowRef.offsetWidth;
262
- const halfSide = -0.5 * arrowSizePx;
263
- if (staticSide) {
264
- Object.assign(this.arrowRef.style, {
265
- left: arrowX ? `${arrowX}px` : '',
266
- top: arrowY ? `${arrowY}px` : '',
267
- [staticSide]: `${halfSide}px`,
268
- });
269
- }
202
+ // Position the indicator arrow.
203
+ if (middlewareData.arrow) {
204
+ this.arrowRef.style.left = middlewareData.arrow.x ? `${middlewareData.arrow.x}px` : '';
205
+ this.arrowRef.style.top = middlewareData.arrow.y ? `${middlewareData.arrow.y}px` : '';
206
+ this.arrowRef.style[getOppositeSide(this.side)] = `-${this.arrowRef.offsetWidth / 2}px`;
270
207
  }
271
- // Handle safe space if enabled
272
- if (this.safeSpace && this.eventTarget) {
273
- await this.updateSafeSpaceBoundaries(currentPlacement);
208
+ // Set the safe space polygon.
209
+ if (middlewareData[SAFE_SPACE_MIDDLEWARE]) {
210
+ this.host.style.setProperty(SAFE_SPACE_PROPERTY, middlewareData[SAFE_SPACE_MIDDLEWARE].polygon);
274
211
  }
275
212
  }
276
- async calculatePosition() {
277
- const gap = this.edgeGap;
278
- const isAligned = (this.placement || 'top').includes('-');
279
- const flipMiddleware = [
280
- // Flip the popover if the target moves outside the viewport
281
- flip({ elementContext: 'reference', crossAxis: false }),
282
- // Flip the popover if the popover itself moves outside the viewport
283
- flip({ elementContext: 'floating', crossAxis: false }),
284
- ];
285
- const shiftMiddleware = shift({
286
- padding: gap,
287
- limiter: limitShift({
288
- offset: 32,
289
- }),
290
- });
213
+ async computePosition(withSize) {
214
+ const padding = this.edgeGap ?? 0;
291
215
  const middleware = [
292
- offset(this.offset ?? (this.arrow ? gap + 4 : gap)),
216
+ offset(this.offset ?? (this.arrow ? padding + 4 : padding)),
293
217
  inline(),
294
- // Per floating-ui docs: for aligned placements (e.g. bottom-end),
295
- // flip should come before shift. For non-aligned, shift before flip.
296
- ...(isAligned ? [...flipMiddleware, shiftMiddleware] : [shiftMiddleware, ...flipMiddleware]),
297
- size({
298
- apply({ availableWidth, elements }) {
299
- Object.assign(elements.floating.style, {
300
- maxWidth: `${availableWidth - gap * 2}px`,
301
- });
302
- },
303
- }),
304
218
  ];
305
- if (this.arrow) {
306
- middleware.push(arrow({ element: this.arrowRef, padding: gap }));
219
+ const flipMiddleware = flip({ padding, minSize: this.getContentMinSize() });
220
+ const shiftMiddleware = shift({ limiter: limitShift({ offset: 32 }), padding });
221
+ // `flip` should come before `shift` for edge-aligned placements
222
+ // (see https://floating-ui.com/docs/flip#combining-with-shift).
223
+ if (this.placement?.includes('-'))
224
+ middleware.push(flipMiddleware, shiftMiddleware);
225
+ else
226
+ middleware.push(shiftMiddleware, flipMiddleware);
227
+ if (withSize) {
228
+ middleware.push(size({
229
+ padding,
230
+ apply({ availableWidth, availableHeight, elements }) {
231
+ elements.floating.style.setProperty(AVAILABLE_WIDTH_PROPERTY, `${Math.max(0, availableWidth)}px`);
232
+ elements.floating.style.setProperty(AVAILABLE_HEIGHT_PROPERTY, `${Math.max(0, availableHeight)}px`);
233
+ },
234
+ }));
307
235
  }
308
- // Automatically hide the popover if the target moves outside the scrollport.
309
- if (this.autoHide) {
310
- // Per floating-ui docs: hide should generally be placed at the end.
236
+ if (this.arrow)
237
+ middleware.push(arrow({ element: this.arrowRef, padding }));
238
+ if (this.safeSpace)
239
+ middleware.push(safeSpace());
240
+ // `hide` should generally be placed at the end of the middleware chain
241
+ // (see https://floating-ui.com/docs/hide#order).
242
+ if (this.autoHide)
311
243
  middleware.push(hide({ strategy: 'referenceHidden' }));
312
- }
313
- return computePositionWithSafeArea(this.eventTarget, this.host, {
314
- placement: this.placement || 'top',
244
+ return computePositionWithSafeArea(this.anchorRef, this.host, {
245
+ placement: this.placement ?? 'top',
315
246
  strategy: 'fixed',
316
247
  middleware,
317
248
  });
318
249
  }
319
- async updateSafeSpaceBoundaries(currentPlacement) {
320
- const targetRect = this.eventTarget.getBoundingClientRect();
321
- const popoverRect = this.host.getBoundingClientRect();
322
- const isVertical = currentPlacement === 'top' || currentPlacement === 'bottom';
323
- // Helper function to get positioning data based on placement
324
- const getPositioningData = (placement, popoverRect, targetRect) => {
325
- if (placement === 'top' || placement === 'bottom') {
326
- return {
327
- popover: {
328
- y: placement === 'top' ? popoverRect.bottom : popoverRect.top,
329
- xStart: popoverRect.left,
330
- xEnd: popoverRect.right,
331
- },
332
- trigger: {
333
- y: placement === 'top' ? targetRect.top : targetRect.bottom,
334
- xStart: targetRect.left,
335
- xEnd: targetRect.right,
336
- },
337
- };
338
- }
339
- else {
340
- // left or right
341
- return {
342
- popover: {
343
- x: placement === 'left' ? popoverRect.right : popoverRect.left,
344
- yStart: popoverRect.top,
345
- yEnd: popoverRect.bottom,
346
- },
347
- trigger: {
348
- x: placement === 'left' ? targetRect.left : targetRect.right,
349
- yStart: targetRect.top,
350
- yEnd: targetRect.bottom,
351
- },
352
- };
353
- }
354
- };
355
- const posData = getPositioningData(currentPlacement, popoverRect, targetRect);
356
- // Clear previous values
357
- PostPopovercontainer.PROPERTIES_TO_CLEAR.forEach(prop => {
358
- this.host.style.removeProperty(prop);
359
- });
360
- if (isVertical) {
361
- // For top/bottom placement
362
- this.host.style.setProperty('--post-safe-space-popover-y', `${posData.popover.y}px`);
363
- this.host.style.setProperty('--post-safe-space-popover-x-start', `${posData.popover.xStart}px`);
364
- this.host.style.setProperty('--post-safe-space-popover-x-end', `${posData.popover.xEnd}px`);
365
- this.host.style.setProperty('--post-safe-space-trigger-y', `${posData.trigger.y}px`);
366
- this.host.style.setProperty('--post-safe-space-trigger-x-start', `${posData.trigger.xStart}px`);
367
- this.host.style.setProperty('--post-safe-space-trigger-x-end', `${posData.trigger.xEnd}px`);
368
- }
369
- else {
370
- // For left/right placement
371
- this.host.style.setProperty('--post-safe-space-popover-x', `${posData.popover.x}px`);
372
- this.host.style.setProperty('--post-safe-space-popover-y-start', `${posData.popover.yStart}px`);
373
- this.host.style.setProperty('--post-safe-space-popover-y-end', `${posData.popover.yEnd}px`);
374
- this.host.style.setProperty('--post-safe-space-trigger-x', `${posData.trigger.x}px`);
375
- this.host.style.setProperty('--post-safe-space-trigger-y-start', `${posData.trigger.yStart}px`);
376
- this.host.style.setProperty('--post-safe-space-trigger-y-end', `${posData.trigger.yEnd}px`);
377
- }
378
- }
379
250
  render() {
380
- return (h(Host, { key: 'f3ea4bfc9a59faa2fbf1e413a1ec648f598a6779', "data-version": version, popover: "auto" }, h("div", { key: 'a328c73c7e08eca1e423fcbe736798188cca2a87', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (h("span", { key: '8fad0095fb8d8c903ba84a639b4efc3e321c6aef', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
381
- this.arrowRef = el;
382
- } })), h("span", { key: 'deadbcc5892ed545a64b4a0e5e0936e0dd1feb70', part: "post-popovercontainer-border-mask" }), h("slot", { key: '48c4db7ab222f3ef18157ce19d8ba15d75441f98' }))));
251
+ return (h(Host, { key: '2240dfd6d585287ad6c50d7582053c2187dc924d', "data-version": version, popover: "auto" }, h("div", { key: '2793bd5f9dd3e72f5a6bc8344eab48262e6cea71', part: "post-popovercontainer-content" }, this.arrow && (h("span", { key: '3d0913954cead346a850f7d8ed1aaa97cbfa2d83', "data-side": this.side, class: "arrow", ref: el => (this.arrowRef = el) })), h("span", { key: 'c21d5332cfc0c0a7b7a8403f492bb4ba28b509f4', part: "post-popovercontainer-border-mask" }), h("slot", { key: 'eb6112e8dfa783304e286f65386e6e0741c2a571' }))));
383
252
  }
384
253
  static get is() { return "post-popovercontainer"; }
385
254
  static get encapsulation() { return "shadow"; }
@@ -414,7 +283,7 @@ export class PostPopovercontainer {
414
283
  "optional": true,
415
284
  "docs": {
416
285
  "tags": [],
417
- "text": "Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\nPopovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted\ntowards the viewport if they would overlap edge boundaries."
286
+ "text": "Placement of the popover according to the floating-ui options."
418
287
  },
419
288
  "getter": false,
420
289
  "setter": false,
@@ -434,7 +303,7 @@ export class PostPopovercontainer {
434
303
  "optional": true,
435
304
  "docs": {
436
305
  "tags": [],
437
- "text": "Gap between the edge of the page and the popovercontainer"
306
+ "text": "Gap between the edge of the viewport and the popover."
438
307
  },
439
308
  "getter": false,
440
309
  "setter": false,
@@ -473,7 +342,7 @@ export class PostPopovercontainer {
473
342
  "optional": true,
474
343
  "docs": {
475
344
  "tags": [],
476
- "text": "Whether or not to display a little pointer arrow"
345
+ "text": "Show a little indicator arrow"
477
346
  },
478
347
  "getter": false,
479
348
  "setter": false,
@@ -482,18 +351,18 @@ export class PostPopovercontainer {
482
351
  "defaultValue": "false"
483
352
  },
484
353
  "safeSpace": {
485
- "type": "string",
354
+ "type": "boolean",
486
355
  "mutable": false,
487
356
  "complexType": {
488
- "original": "'triangle' | 'trapezoid'",
489
- "resolved": "\"trapezoid\" | \"triangle\"",
357
+ "original": "boolean",
358
+ "resolved": "boolean",
490
359
  "references": {}
491
360
  },
492
361
  "required": false,
493
362
  "optional": true,
494
363
  "docs": {
495
364
  "tags": [],
496
- "text": "Enables a safespace through which the cursor can be moved without the popover being disabled"
365
+ "text": "Whether to add a space through which the mouse can move without the popover being hidden."
497
366
  },
498
367
  "getter": false,
499
368
  "setter": false,
@@ -512,18 +381,37 @@ export class PostPopovercontainer {
512
381
  "optional": true,
513
382
  "docs": {
514
383
  "tags": [],
515
- "text": "Whether to automatically hide the popover when the target moves outside the scrollport.\n\nIf the `post-header` can cover the target, the popover will also be hidden as soon as the\ntarget scrolls behind it."
384
+ "text": "Whether to automatically hide the popover when the anchor moves outside the scrollport.\n\nIf the `post-header` can cover the anchor, the popover will also be hidden as soon as the\nanchor scrolls behind it."
516
385
  },
517
386
  "getter": false,
518
387
  "setter": false,
519
388
  "reflect": false,
520
389
  "attribute": "auto-hide"
390
+ },
391
+ "autoResize": {
392
+ "type": "boolean",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "boolean",
396
+ "resolved": "boolean",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": true,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": "Whether to keep resizing the popover while it is open.\n\nEvery popover is sized once when it opens: the space available around the anchor, minus the\n`edgeGap`, becomes the maximum width and height of the popover. The placement is then\nrecalculated for that size.\n\nWith `autoResize`, the popover's size is recalculated on every position update, for example\nwhen the anchor moves while scrolling."
404
+ },
405
+ "getter": false,
406
+ "setter": false,
407
+ "reflect": false,
408
+ "attribute": "auto-resize"
521
409
  }
522
410
  };
523
411
  }
524
412
  static get states() {
525
413
  return {
526
- "dynamicPlacement": {}
414
+ "side": {}
527
415
  };
528
416
  }
529
417
  static get events() {
@@ -535,7 +423,7 @@ export class PostPopovercontainer {
535
423
  "composed": true,
536
424
  "docs": {
537
425
  "tags": [],
538
- "text": "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."
426
+ "text": "Emitted just before the popover is shown.\n\nThe payload contains a `first` boolean, that is set to `true` when the popover is about to be\nshown for the first time."
539
427
  },
540
428
  "complexType": {
541
429
  "original": "{ first?: boolean }",
@@ -550,7 +438,7 @@ export class PostPopovercontainer {
550
438
  "composed": true,
551
439
  "docs": {
552
440
  "tags": [],
553
- "text": "Fires whenever the popovercontainer is shown, passing in event.detail a `first` boolean, which is true if it is shown for the first time."
441
+ "text": "Emitted just after the popover is shown.\n\nThe payload contains a `first` boolean, that is set to `true` when the popover is shown for the\nfirst time."
554
442
  },
555
443
  "complexType": {
556
444
  "original": "{ first?: boolean }",
@@ -565,7 +453,7 @@ export class PostPopovercontainer {
565
453
  "composed": true,
566
454
  "docs": {
567
455
  "tags": [],
568
- "text": "Fires whenever the popovercontainer is hidden."
456
+ "text": "Emitted just after the popover is hidden."
569
457
  },
570
458
  "complexType": {
571
459
  "original": "any",
@@ -580,7 +468,7 @@ export class PostPopovercontainer {
580
468
  "composed": true,
581
469
  "docs": {
582
470
  "tags": [],
583
- "text": "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."
471
+ "text": "Emitted just before the popover's state changes.\n\nThe payload contains a `willOpen` boolean, that is set to `true` when the popover is about to\nbe shown, `false` when it is about to be hidden."
584
472
  },
585
473
  "complexType": {
586
474
  "original": "{ willOpen: boolean }",
@@ -595,7 +483,7 @@ export class PostPopovercontainer {
595
483
  "composed": true,
596
484
  "docs": {
597
485
  "tags": [],
598
- "text": "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."
486
+ "text": "Emitted just after the popover's state changes.\n\nThe payload contains a `isOpen` boolean, that is set to `true` when the popover is shown,\n`false` when it is hidden."
599
487
  },
600
488
  "complexType": {
601
489
  "original": "{ isOpen: boolean }",
@@ -608,11 +496,11 @@ export class PostPopovercontainer {
608
496
  return {
609
497
  "show": {
610
498
  "complexType": {
611
- "signature": "(target: HTMLElement) => Promise<void>",
499
+ "signature": "(anchor: HTMLElement) => Promise<void>",
612
500
  "parameters": [{
613
- "name": "target",
501
+ "name": "anchor",
614
502
  "type": "HTMLElement",
615
- "docs": "The element that invokes the popover and to which it is visually anchored."
503
+ "docs": "the element that the popover is visually anchored to."
616
504
  }],
617
505
  "references": {
618
506
  "Promise": {
@@ -627,10 +515,10 @@ export class PostPopovercontainer {
627
515
  "return": "Promise<void>"
628
516
  },
629
517
  "docs": {
630
- "text": "Programmatically display the popovercontainer",
518
+ "text": "Shows the popover.",
631
519
  "tags": [{
632
520
  "name": "param",
633
- "text": "target The element that invokes the popover and to which it is visually anchored."
521
+ "text": "anchor the element that the popover is visually anchored to."
634
522
  }]
635
523
  }
636
524
  },
@@ -647,21 +535,21 @@ export class PostPopovercontainer {
647
535
  "return": "Promise<void>"
648
536
  },
649
537
  "docs": {
650
- "text": "Programmatically hide the popovercontainer",
538
+ "text": "Hides the popover.",
651
539
  "tags": []
652
540
  }
653
541
  },
654
542
  "toggle": {
655
543
  "complexType": {
656
- "signature": "(target: HTMLElement, force?: boolean) => Promise<boolean>",
544
+ "signature": "(anchor: HTMLElement, force?: boolean) => Promise<boolean>",
657
545
  "parameters": [{
658
- "name": "target",
546
+ "name": "anchor",
659
547
  "type": "HTMLElement",
660
- "docs": "The element that invokes the popover and to which it is visually anchored."
548
+ "docs": "the element that the popover is visually anchored to."
661
549
  }, {
662
550
  "name": "force",
663
551
  "type": "boolean",
664
- "docs": "Pass true to always show or false to always hide"
552
+ "docs": "the next state of the popover."
665
553
  }],
666
554
  "references": {
667
555
  "Promise": {
@@ -676,13 +564,16 @@ export class PostPopovercontainer {
676
564
  "return": "Promise<boolean>"
677
565
  },
678
566
  "docs": {
679
- "text": "Toggle popovercontainer display",
567
+ "text": "Toggles the popover's state from hidden to showing and vice versa.\n\nIf `state` is specified, the popover is forced to be shown if the is set to `true`, or hidden\nif it is set to `false`.",
680
568
  "tags": [{
681
569
  "name": "param",
682
- "text": "target The element that invokes the popover and to which it is visually anchored."
570
+ "text": "anchor the element that the popover is visually anchored to."
683
571
  }, {
684
572
  "name": "param",
685
- "text": "force Pass true to always show or false to always hide"
573
+ "text": "force the next state of the popover."
574
+ }, {
575
+ "name": "returns",
576
+ "text": "the new state of the popover: `true` if it is shown, `false` if it is hidden."
686
577
  }]
687
578
  }
688
579
  }
@@ -696,6 +587,3 @@ __decorate([
696
587
  __decorate([
697
588
  Type('number')
698
589
  ], PostPopovercontainer.prototype, "edgeGap", void 0);
699
- __decorate([
700
- OneOf(['triangle', 'trapezoid'])
701
- ], PostPopovercontainer.prototype, "safeSpace", void 0);