@swisspost/design-system-components 9.0.0-next.2 → 9.0.0-next.21

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 (538) hide show
  1. package/dist/.config/bindings.angular.js +4 -0
  2. package/dist/cjs/{attribute-observer-10f08c04.js → attribute-observer-6d8b886b.js} +4 -4
  3. package/dist/cjs/check-non-empty-bd99d236.js +15 -0
  4. package/dist/cjs/check-one-of-75d270b5.js +13 -0
  5. package/dist/cjs/check-type-cdbf6d29.js +21 -0
  6. package/dist/cjs/check-url-220a286c.js +19 -0
  7. package/dist/cjs/debounce-158fd76f.js +13 -0
  8. package/dist/cjs/fade-72d5ef55.js +14 -0
  9. package/dist/cjs/get-root-7a3498ef.js +11 -0
  10. package/dist/cjs/index-23e36ff7.js +37 -0
  11. package/dist/cjs/{index-c15bd800.js → index-5acef487.js} +54 -17
  12. package/dist/cjs/index.browser-2f65f583.js +15 -0
  13. package/dist/cjs/index.cjs.js +56 -27
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/{package-a7150f64.js → package-c6bc9e82.js} +1 -1
  16. package/dist/cjs/{post-accordion-62d2fd79.js → post-accordion-d1345784.js} +9 -8
  17. package/dist/cjs/post-accordion-item-a796d803.js +64 -0
  18. package/dist/cjs/post-accordion-item.cjs.entry.js +8 -5
  19. package/dist/cjs/post-accordion.cjs.entry.js +4 -4
  20. package/dist/cjs/post-avatar-b4e96354.js +144 -0
  21. package/dist/cjs/post-avatar.cjs.entry.js +13 -0
  22. package/dist/cjs/post-back-to-top-fc541c6b.js +76 -0
  23. package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
  24. package/dist/cjs/post-banner-46522b4f.js +96 -0
  25. package/dist/cjs/post-banner.cjs.entry.js +19 -0
  26. package/dist/cjs/post-breadcrumb-799d34da.js +112 -0
  27. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
  28. package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
  29. package/dist/cjs/post-card-control-7bf7d3f2.js +283 -0
  30. package/dist/cjs/post-card-control.cjs.entry.js +5 -5
  31. package/dist/cjs/post-closebutton_15.cjs.entry.js +34 -0
  32. package/dist/cjs/{post-collapsible-trigger-9dca8493.js → post-collapsible-trigger-0568e3ec.js} +50 -56
  33. package/dist/cjs/post-collapsible_2.cjs.entry.js +10 -6
  34. package/dist/cjs/post-components.cjs.js +2 -2
  35. package/dist/cjs/post-footer-f87a556b.js +88 -0
  36. package/dist/cjs/post-footer.cjs.entry.js +11 -0
  37. package/dist/cjs/post-linkarea-0ccf93fc.js +30 -0
  38. package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
  39. package/dist/cjs/post-menu-item-eba24c40.js +68 -0
  40. package/dist/cjs/post-popover-35f679f6.js +106 -0
  41. package/dist/cjs/post-popover.cjs.entry.js +4 -4
  42. package/dist/cjs/{post-rating-db5a397a.js → post-rating-d12fa214.js} +16 -6
  43. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  44. package/dist/cjs/post-tab-header-89dca04b.js +33 -0
  45. package/dist/cjs/post-tab-header.cjs.entry.js +5 -4
  46. package/dist/cjs/{post-tab-panel-d59cf1ec.js → post-tab-panel-ad1ab180.js} +6 -5
  47. package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
  48. package/dist/cjs/{post-tabs-7afae61a.js → post-tabs-0db75745.js} +23 -16
  49. package/dist/cjs/post-tabs.cjs.entry.js +4 -4
  50. package/dist/cjs/post-tag-396a46c9.js +47 -0
  51. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  52. package/dist/cjs/post-togglebutton-69983699.js +3861 -0
  53. package/dist/cjs/{post-tooltip-432852c7.js → post-tooltip-7174ea97.js} +38 -25
  54. package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
  55. package/dist/cjs/slide-8ae17ee4.js +28 -0
  56. package/dist/collection/animations/collapse.js +5 -5
  57. package/dist/collection/animations/fade.js +6 -2
  58. package/dist/collection/animations/slide.js +23 -0
  59. package/dist/collection/collection-manifest.json +22 -3
  60. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  61. package/dist/collection/components/post-accordion/post-accordion.js +5 -3
  62. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  63. package/dist/collection/components/post-accordion-item/post-accordion-item.js +29 -11
  64. package/dist/collection/components/post-avatar/post-avatar.css +3 -0
  65. package/dist/collection/components/post-avatar/post-avatar.js +234 -0
  66. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
  67. package/dist/collection/components/post-back-to-top/post-back-to-top.js +109 -0
  68. package/dist/collection/components/post-banner/banner-types.js +1 -0
  69. package/dist/collection/components/post-banner/post-banner.css +3 -0
  70. package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +51 -73
  71. package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
  72. package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +163 -0
  73. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
  74. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +98 -0
  75. package/dist/collection/components/post-card-control/post-card-control.css +1 -1
  76. package/dist/collection/components/post-card-control/post-card-control.js +55 -43
  77. package/dist/collection/components/post-closebutton/post-closebutton.js +13 -0
  78. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  79. package/dist/collection/components/post-collapsible/post-collapsible.js +15 -6
  80. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -20
  81. package/dist/collection/components/post-footer/post-footer.css +1 -0
  82. package/dist/collection/components/post-footer/post-footer.js +76 -0
  83. package/dist/collection/components/post-header/post-header.css +1 -0
  84. package/dist/collection/components/post-header/post-header.js +267 -0
  85. package/dist/collection/components/post-icon/post-icon.js +80 -47
  86. package/dist/collection/components/post-language-option/post-language-option.css +3 -0
  87. package/dist/collection/components/post-language-option/post-language-option.js +224 -0
  88. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
  89. package/dist/collection/components/post-language-switch/post-language-switch.js +164 -0
  90. package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
  91. package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
  92. package/dist/collection/components/post-linkarea/post-linkarea.js +30 -0
  93. package/dist/collection/components/post-list/post-list.css +3 -0
  94. package/dist/collection/components/post-list/post-list.js +90 -0
  95. package/dist/collection/components/post-list-item/post-list-item.css +1 -0
  96. package/dist/collection/components/post-list-item/post-list-item.js +26 -0
  97. package/dist/collection/components/post-logo/post-logo.css +1 -1
  98. package/dist/collection/components/post-logo/post-logo.js +4 -3
  99. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
  100. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +255 -0
  101. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
  102. package/dist/collection/components/post-megadropdown/post-megadropdown.js +268 -0
  103. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
  104. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +127 -0
  105. package/dist/collection/components/post-menu/post-menu.css +3 -0
  106. package/dist/collection/components/post-menu/post-menu.js +297 -0
  107. package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
  108. package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
  109. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +122 -0
  110. package/dist/collection/components/post-popover/post-popover.css +1 -1
  111. package/dist/collection/components/post-popover/post-popover.js +6 -3
  112. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  113. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +193 -38
  114. package/dist/collection/components/post-rating/post-rating.css +1 -1
  115. package/dist/collection/components/post-rating/post-rating.js +13 -2
  116. package/dist/collection/components/post-tab-header/post-tab-header.css +2 -2
  117. package/dist/collection/components/post-tab-header/post-tab-header.js +6 -4
  118. package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
  119. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  120. package/dist/collection/components/post-tabs/post-tabs.js +17 -14
  121. package/dist/collection/components/post-tag/post-tag.css +1 -1
  122. package/dist/collection/components/post-tag/post-tag.js +3 -2
  123. package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
  124. package/dist/collection/components/post-togglebutton/post-togglebutton.js +75 -0
  125. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  126. package/dist/collection/components/post-tooltip/post-tooltip.js +35 -17
  127. package/dist/collection/index.js +21 -2
  128. package/dist/collection/utils/attribute-observer.js +4 -4
  129. package/dist/collection/utils/breakpoints.js +50 -0
  130. package/dist/collection/utils/component-on-ready.js +4 -4
  131. package/dist/collection/utils/debounce.js +2 -1
  132. package/dist/collection/utils/get-focusable-children.js +33 -0
  133. package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
  134. package/dist/collection/utils/property-checkers/check-one-of.js +8 -3
  135. package/dist/collection/utils/property-checkers/check-pattern.js +8 -3
  136. package/dist/collection/utils/property-checkers/check-type.js +11 -6
  137. package/dist/collection/utils/property-checkers/check-url.js +11 -6
  138. package/dist/collection/utils/property-checkers/empty-or.js +5 -2
  139. package/dist/collection/utils/sass-export.js +8 -5
  140. package/dist/components/attribute-observer.js +4 -4
  141. package/dist/components/check-non-empty.js +6 -2
  142. package/dist/components/check-one-of.js +8 -3
  143. package/dist/components/check-type.js +11 -6
  144. package/dist/components/debounce.js +11 -0
  145. package/dist/components/fade.js +6 -2
  146. package/dist/components/get-focusable-children.js +35 -0
  147. package/dist/components/get-root.js +9 -0
  148. package/dist/components/index.browser.js +13 -0
  149. package/dist/components/index.js +21 -2
  150. package/dist/components/index2.js +25 -12
  151. package/dist/components/index3.js +135 -0
  152. package/dist/components/package.js +1 -1
  153. package/dist/components/post-accordion-item2.js +36 -16
  154. package/dist/components/post-accordion2.js +6 -5
  155. package/dist/components/post-avatar.d.ts +11 -0
  156. package/dist/components/post-avatar.js +6 -0
  157. package/dist/components/post-avatar2.js +169 -0
  158. package/dist/components/post-back-to-top.d.ts +11 -0
  159. package/dist/components/post-back-to-top.js +6 -0
  160. package/dist/components/post-back-to-top2.js +101 -0
  161. package/dist/components/post-banner.d.ts +11 -0
  162. package/dist/components/post-banner.js +6 -0
  163. package/dist/components/post-banner2.js +131 -0
  164. package/dist/components/post-breadcrumb-item.d.ts +11 -0
  165. package/dist/components/post-breadcrumb-item.js +6 -0
  166. package/dist/components/post-breadcrumb-item2.js +82 -0
  167. package/dist/components/post-breadcrumb.d.ts +11 -0
  168. package/dist/components/post-breadcrumb.js +6 -0
  169. package/dist/components/post-breadcrumb2.js +169 -0
  170. package/dist/components/post-card-control2.js +50 -39
  171. package/dist/components/post-closebutton.d.ts +11 -0
  172. package/dist/components/post-closebutton.js +6 -0
  173. package/dist/components/post-closebutton2.js +34 -0
  174. package/dist/components/post-collapsible-trigger2.js +23 -38
  175. package/dist/components/post-collapsible2.js +22 -14
  176. package/dist/components/post-footer.d.ts +11 -0
  177. package/dist/components/post-footer.js +6 -0
  178. package/dist/components/post-footer2.js +128 -0
  179. package/dist/components/post-header.d.ts +11 -0
  180. package/dist/components/post-header.js +6 -0
  181. package/dist/components/post-header2.js +217 -0
  182. package/dist/components/post-icon2.js +82 -46
  183. package/dist/components/post-language-option.d.ts +11 -0
  184. package/dist/components/post-language-option.js +6 -0
  185. package/dist/components/post-language-option2.js +102 -0
  186. package/dist/components/post-language-switch.d.ts +11 -0
  187. package/dist/components/post-language-switch.js +6 -0
  188. package/dist/components/post-language-switch2.js +135 -0
  189. package/dist/components/post-linkarea.d.ts +11 -0
  190. package/dist/components/post-linkarea.js +6 -0
  191. package/dist/components/post-linkarea2.js +42 -0
  192. package/dist/components/post-list-item.d.ts +11 -0
  193. package/dist/components/post-list-item.js +6 -0
  194. package/dist/components/post-list-item2.js +35 -0
  195. package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
  196. package/dist/components/post-list.js +6 -0
  197. package/dist/components/post-list2.js +55 -0
  198. package/dist/components/post-logo2.js +5 -5
  199. package/dist/components/post-mainnavigation.d.ts +11 -0
  200. package/dist/components/post-mainnavigation.js +6 -0
  201. package/dist/components/post-mainnavigation2.js +258 -0
  202. package/dist/components/post-megadropdown-trigger.d.ts +11 -0
  203. package/dist/components/post-megadropdown-trigger.js +6 -0
  204. package/dist/components/post-megadropdown-trigger2.js +113 -0
  205. package/dist/components/post-megadropdown.d.ts +11 -0
  206. package/dist/components/post-megadropdown.js +6 -0
  207. package/dist/components/post-megadropdown2.js +186 -0
  208. package/dist/components/post-menu-item.d.ts +11 -0
  209. package/dist/components/post-menu-item.js +6 -0
  210. package/dist/components/post-menu-item2.js +27 -0
  211. package/dist/components/post-menu-trigger.d.ts +11 -0
  212. package/dist/components/post-menu-trigger.js +6 -0
  213. package/dist/components/post-menu-trigger2.js +109 -0
  214. package/dist/components/post-menu.d.ts +11 -0
  215. package/dist/components/post-menu.js +6 -0
  216. package/dist/components/post-menu2.js +193 -0
  217. package/dist/components/post-popover2.js +6 -4
  218. package/dist/components/post-popovercontainer2.js +227 -59
  219. package/dist/components/post-rating2.js +14 -4
  220. package/dist/components/post-tab-header2.js +7 -6
  221. package/dist/components/post-tab-panel2.js +4 -3
  222. package/dist/components/post-tabs2.js +20 -13
  223. package/dist/components/post-tag2.js +3 -3
  224. package/dist/components/post-togglebutton.d.ts +11 -0
  225. package/dist/components/post-togglebutton.js +6 -0
  226. package/dist/components/post-togglebutton2.js +61 -0
  227. package/dist/components/post-tooltip2.js +35 -22
  228. package/dist/components/slide.js +25 -0
  229. package/dist/docs.json +1956 -270
  230. package/dist/esm/{attribute-observer-37fa950a.js → attribute-observer-2f203993.js} +4 -4
  231. package/dist/esm/check-non-empty-258a56b3.js +13 -0
  232. package/dist/esm/check-one-of-0bee20f5.js +11 -0
  233. package/dist/esm/check-type-37d5d307.js +19 -0
  234. package/dist/esm/check-url-17962bc8.js +17 -0
  235. package/dist/esm/debounce-e54c7131.js +11 -0
  236. package/dist/esm/fade-1f3cacf4.js +11 -0
  237. package/dist/esm/get-root-7af2e0d1.js +9 -0
  238. package/dist/esm/{index-0b56fc28.js → index-40846676.js} +54 -17
  239. package/dist/esm/index-8f8fe5b0.js +32 -0
  240. package/dist/esm/index.browser-51485f85.js +13 -0
  241. package/dist/esm/index.js +32 -22
  242. package/dist/esm/loader.js +3 -3
  243. package/dist/esm/package-5614c98b.js +3 -0
  244. package/dist/esm/{post-accordion-6f4d2b9a.js → post-accordion-f6d1834d.js} +9 -8
  245. package/dist/esm/post-accordion-item-7cb93300.js +62 -0
  246. package/dist/esm/post-accordion-item.entry.js +8 -5
  247. package/dist/esm/post-accordion.entry.js +4 -4
  248. package/dist/esm/post-avatar-96108967.js +142 -0
  249. package/dist/esm/post-avatar.entry.js +5 -0
  250. package/dist/esm/post-back-to-top-7f8a61c8.js +74 -0
  251. package/dist/esm/post-back-to-top.entry.js +7 -0
  252. package/dist/esm/post-banner-bb69bce8.js +94 -0
  253. package/dist/esm/post-banner.entry.js +11 -0
  254. package/dist/esm/post-breadcrumb-9d9efa4e.js +110 -0
  255. package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
  256. package/dist/esm/post-breadcrumb.entry.js +5 -0
  257. package/dist/esm/post-card-control-fdced7d5.js +281 -0
  258. package/dist/esm/post-card-control.entry.js +5 -5
  259. package/dist/esm/post-closebutton_15.entry.js +12 -0
  260. package/dist/esm/{post-collapsible-trigger-85c2064a.js → post-collapsible-trigger-17b2f067.js} +49 -55
  261. package/dist/esm/post-collapsible_2.entry.js +10 -6
  262. package/dist/esm/post-components.js +3 -3
  263. package/dist/esm/post-footer-2dcd8159.js +86 -0
  264. package/dist/esm/post-footer.entry.js +3 -0
  265. package/dist/esm/post-linkarea-06c5144d.js +28 -0
  266. package/dist/esm/post-linkarea.entry.js +3 -0
  267. package/dist/esm/post-menu-item-e917bf99.js +65 -0
  268. package/dist/esm/post-popover-67a3cbf2.js +104 -0
  269. package/dist/esm/post-popover.entry.js +4 -4
  270. package/dist/esm/{post-rating-d9fc0b40.js → post-rating-9613bee8.js} +16 -6
  271. package/dist/esm/post-rating.entry.js +3 -3
  272. package/dist/esm/post-tab-header-dff3a025.js +31 -0
  273. package/dist/esm/post-tab-header.entry.js +5 -4
  274. package/dist/esm/{post-tab-panel-926439f4.js → post-tab-panel-2b3f82a8.js} +6 -5
  275. package/dist/esm/post-tab-panel.entry.js +4 -3
  276. package/dist/esm/{post-tabs-13b2d9a6.js → post-tabs-46d1165f.js} +23 -16
  277. package/dist/esm/post-tabs.entry.js +4 -4
  278. package/dist/esm/post-tag-4176268e.js +45 -0
  279. package/dist/esm/post-tag.entry.js +3 -3
  280. package/dist/esm/post-togglebutton-5892c5bd.js +3845 -0
  281. package/dist/esm/{post-tooltip-3cde6b53.js → post-tooltip-5a45a569.js} +38 -25
  282. package/dist/esm/post-tooltip.entry.js +8 -6
  283. package/dist/esm/slide-62768431.js +25 -0
  284. package/dist/post-components/index.esm.js +1 -1
  285. package/dist/post-components/p-017dc6c7.js +1 -0
  286. package/dist/post-components/p-0227b899.js +1 -0
  287. package/dist/post-components/p-04895a54.js +1 -0
  288. package/dist/post-components/p-04c38bfe.entry.js +1 -0
  289. package/dist/post-components/p-07a0a626.js +1 -0
  290. package/dist/post-components/p-12573893.js +1 -0
  291. package/dist/post-components/p-1289b0a7.entry.js +1 -0
  292. package/dist/post-components/p-12a11565.js +1 -0
  293. package/dist/post-components/p-1542a80e.entry.js +1 -0
  294. package/dist/post-components/p-181c73d5.js +1 -0
  295. package/dist/post-components/p-254a9bd2.entry.js +1 -0
  296. package/dist/post-components/p-28500934.entry.js +1 -0
  297. package/dist/post-components/p-2b1281af.js +1 -0
  298. package/dist/post-components/p-2c69e7f2.entry.js +1 -0
  299. package/dist/post-components/p-30132b19.entry.js +1 -0
  300. package/dist/post-components/p-30af1d48.js +1 -0
  301. package/dist/post-components/p-3bdeb686.entry.js +1 -0
  302. package/dist/post-components/p-47cb31dd.js +1 -0
  303. package/dist/post-components/p-4af6dbed.js +1 -0
  304. package/dist/post-components/p-4f41f63e.js +1 -0
  305. package/dist/post-components/p-52790b8b.js +1 -0
  306. package/dist/post-components/p-5959f2bd.js +1 -0
  307. package/dist/post-components/{p-82dcf8c6.js → p-59ca0a13.js} +3 -3
  308. package/dist/post-components/p-5aaa5703.entry.js +1 -0
  309. package/dist/post-components/p-64e3de38.js +1 -0
  310. package/dist/post-components/p-67a45f16.js +1 -0
  311. package/dist/post-components/p-6d8ac9bd.entry.js +1 -0
  312. package/dist/post-components/p-7709c14a.js +1 -0
  313. package/dist/post-components/p-77cc2a5e.entry.js +1 -0
  314. package/dist/post-components/p-79c552fb.js +1 -0
  315. package/dist/post-components/p-7dd05e6d.entry.js +1 -0
  316. package/dist/post-components/p-803b7598.js +1 -0
  317. package/dist/post-components/p-85fdc2d3.js +1 -0
  318. package/dist/post-components/p-9748a355.js +1 -0
  319. package/dist/post-components/p-98fcf90b.entry.js +1 -0
  320. package/dist/post-components/p-994fae4c.entry.js +1 -0
  321. package/dist/post-components/p-a805515a.entry.js +1 -0
  322. package/dist/post-components/p-b5b48f66.entry.js +1 -0
  323. package/dist/post-components/p-b9bf5a5f.js +1 -0
  324. package/dist/post-components/p-c6b3a926.js +1 -0
  325. package/dist/post-components/p-c9dd3cdb.entry.js +1 -0
  326. package/dist/post-components/p-cb5e4a06.js +1 -0
  327. package/dist/post-components/p-d45df336.js +1 -0
  328. package/dist/post-components/p-dd4a5c0a.entry.js +1 -0
  329. package/dist/post-components/p-e1baac59.js +1 -0
  330. package/dist/post-components/p-e585c6fe.js +1 -0
  331. package/dist/post-components/p-e6d54838.entry.js +1 -0
  332. package/dist/post-components/p-f4b0cc7d.js +1 -0
  333. package/dist/post-components/p-fc91cbc2.js +1 -0
  334. package/dist/post-components/p-fe8c300c.js +1 -0
  335. package/dist/post-components/p-ff95dcd3.js +2 -0
  336. package/dist/post-components/post-components.esm.js +1 -1
  337. package/dist/types/animations/collapse.d.ts +2 -2
  338. package/dist/types/animations/fade.d.ts +2 -2
  339. package/dist/types/animations/slide.d.ts +2 -0
  340. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +8 -2
  341. package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
  342. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
  343. package/dist/types/components/post-banner/banner-types.d.ts +2 -0
  344. package/dist/types/components/post-banner/post-banner.d.ts +49 -0
  345. package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
  346. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +20 -0
  347. package/dist/types/components/post-card-control/post-card-control.d.ts +9 -9
  348. package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
  349. package/dist/types/components/post-footer/post-footer.d.ts +23 -0
  350. package/dist/types/components/post-header/post-header.d.ts +45 -0
  351. package/dist/types/components/post-icon/post-icon.d.ts +14 -12
  352. package/dist/types/components/post-language-option/post-language-option.d.ts +45 -0
  353. package/dist/types/components/post-language-switch/post-language-switch.d.ts +31 -0
  354. package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
  355. package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
  356. package/dist/types/components/post-list/post-list.d.ts +24 -0
  357. package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
  358. package/dist/types/components/post-logo/post-logo.d.ts +1 -1
  359. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +70 -0
  360. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +57 -0
  361. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +31 -0
  362. package/dist/types/components/post-menu/post-menu.d.ts +48 -0
  363. package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
  364. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +28 -0
  365. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -1
  366. package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
  367. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  368. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  369. package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
  370. package/dist/types/components.d.ts +609 -48
  371. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
  372. package/dist/types/index.d.ts +22 -3
  373. package/dist/types/utils/attribute-observer.d.ts +1 -1
  374. package/dist/types/utils/breakpoints.d.ts +12 -0
  375. package/dist/types/utils/component-on-ready.d.ts +1 -1
  376. package/dist/types/utils/get-focusable-children.d.ts +1 -0
  377. package/dist/types/utils/get-root.d.ts +1 -1
  378. package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
  379. package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
  380. package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
  381. package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
  382. package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
  383. package/dist/types/utils/property-checkers/index.d.ts +12 -4
  384. package/dist/types/utils/sass-export.d.ts +5 -1
  385. package/loaders/attribute-observer.js +4 -4
  386. package/loaders/check-non-empty.js +6 -2
  387. package/loaders/check-one-of.js +8 -3
  388. package/loaders/check-type.js +11 -6
  389. package/loaders/debounce.js +11 -0
  390. package/loaders/fade.js +6 -2
  391. package/loaders/get-focusable-children.js +35 -0
  392. package/loaders/get-root.js +9 -0
  393. package/loaders/index.browser.js +13 -0
  394. package/loaders/index.d.ts +40 -2
  395. package/loaders/index.js +21 -2
  396. package/loaders/index2.js +25 -12
  397. package/loaders/index3.js +135 -0
  398. package/loaders/package.js +1 -1
  399. package/loaders/post-accordion-item.js +1 -81
  400. package/loaders/post-accordion-item2.js +103 -0
  401. package/loaders/post-accordion.js +6 -5
  402. package/loaders/post-avatar.d.ts +11 -0
  403. package/loaders/post-avatar.js +172 -0
  404. package/loaders/post-back-to-top.d.ts +11 -0
  405. package/loaders/post-back-to-top.js +104 -0
  406. package/loaders/post-banner.d.ts +11 -0
  407. package/loaders/post-banner.js +134 -0
  408. package/loaders/post-breadcrumb-item.d.ts +11 -0
  409. package/loaders/post-breadcrumb-item.js +6 -0
  410. package/loaders/post-breadcrumb-item2.js +82 -0
  411. package/loaders/post-breadcrumb.d.ts +11 -0
  412. package/loaders/post-breadcrumb.js +172 -0
  413. package/loaders/post-card-control.js +50 -39
  414. package/loaders/post-closebutton.d.ts +11 -0
  415. package/loaders/post-closebutton.js +37 -0
  416. package/loaders/post-collapsible-trigger2.js +23 -38
  417. package/loaders/post-collapsible2.js +21 -13
  418. package/loaders/post-footer.d.ts +11 -0
  419. package/loaders/post-footer.js +131 -0
  420. package/loaders/post-header.d.ts +11 -0
  421. package/loaders/post-header.js +220 -0
  422. package/loaders/post-icon2.js +82 -46
  423. package/loaders/post-language-option.d.ts +11 -0
  424. package/loaders/post-language-option.js +105 -0
  425. package/loaders/post-language-switch.d.ts +11 -0
  426. package/loaders/post-language-switch.js +138 -0
  427. package/loaders/post-linkarea.d.ts +11 -0
  428. package/loaders/post-linkarea.js +45 -0
  429. package/loaders/post-list-item.d.ts +11 -0
  430. package/loaders/post-list-item.js +38 -0
  431. package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
  432. package/loaders/post-list.js +58 -0
  433. package/loaders/post-logo.js +6 -6
  434. package/loaders/post-mainnavigation.d.ts +11 -0
  435. package/loaders/post-mainnavigation.js +261 -0
  436. package/loaders/post-megadropdown-trigger.d.ts +11 -0
  437. package/loaders/post-megadropdown-trigger.js +116 -0
  438. package/loaders/post-megadropdown.d.ts +11 -0
  439. package/loaders/post-megadropdown.js +189 -0
  440. package/loaders/post-menu-item.d.ts +11 -0
  441. package/loaders/post-menu-item.js +6 -0
  442. package/loaders/post-menu-item2.js +27 -0
  443. package/loaders/post-menu-trigger.d.ts +11 -0
  444. package/loaders/post-menu-trigger.js +6 -0
  445. package/loaders/post-menu-trigger2.js +109 -0
  446. package/loaders/post-menu.d.ts +11 -0
  447. package/loaders/post-menu.js +6 -0
  448. package/loaders/post-menu2.js +193 -0
  449. package/loaders/post-popover.js +6 -4
  450. package/loaders/post-popovercontainer2.js +227 -59
  451. package/loaders/post-rating.js +14 -4
  452. package/loaders/post-tab-header.js +7 -6
  453. package/loaders/post-tab-panel.js +4 -3
  454. package/loaders/post-tabs.js +20 -13
  455. package/loaders/post-tag.js +3 -3
  456. package/loaders/post-togglebutton.d.ts +11 -0
  457. package/loaders/post-togglebutton.js +64 -0
  458. package/loaders/post-tooltip.js +34 -21
  459. package/loaders/slide.js +25 -0
  460. package/package.json +26 -20
  461. package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
  462. package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
  463. package/dist/cjs/fade-35a3633a.js +0 -10
  464. package/dist/cjs/index-01f30442.js +0 -52
  465. package/dist/cjs/post-accordion-item-7b348fa5.js +0 -51
  466. package/dist/cjs/post-alert-fca3a4a3.js +0 -98
  467. package/dist/cjs/post-alert.cjs.entry.js +0 -16
  468. package/dist/cjs/post-card-control-b4e4b4d5.js +0 -272
  469. package/dist/cjs/post-icon-3934be0b.js +0 -104
  470. package/dist/cjs/post-icon.cjs.entry.js +0 -15
  471. package/dist/cjs/post-logo-c3603fc7.js +0 -39
  472. package/dist/cjs/post-logo.cjs.entry.js +0 -14
  473. package/dist/cjs/post-popover-15f9620a.js +0 -104
  474. package/dist/cjs/post-popovercontainer-7d536276.js +0 -2186
  475. package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
  476. package/dist/cjs/post-tab-header-29b8d4e1.js +0 -32
  477. package/dist/cjs/post-tag-b7d0bbff.js +0 -47
  478. package/dist/collection/components/post-alert/alert-types.js +0 -1
  479. package/dist/collection/components/post-alert/post-alert.css +0 -7
  480. package/dist/components/post-alert.js +0 -6
  481. package/dist/components/post-alert2.js +0 -136
  482. package/dist/esm/check-non-empty-58bd6b17.js +0 -9
  483. package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
  484. package/dist/esm/fade-7fd71785.js +0 -7
  485. package/dist/esm/index-f41b763f.js +0 -46
  486. package/dist/esm/package-3d758f77.js +0 -3
  487. package/dist/esm/post-accordion-item-6b5a65ad.js +0 -49
  488. package/dist/esm/post-alert-f19db551.js +0 -96
  489. package/dist/esm/post-alert.entry.js +0 -8
  490. package/dist/esm/post-card-control-1b5df6cb.js +0 -270
  491. package/dist/esm/post-icon-40929043.js +0 -102
  492. package/dist/esm/post-icon.entry.js +0 -7
  493. package/dist/esm/post-logo-c6351ba8.js +0 -37
  494. package/dist/esm/post-logo.entry.js +0 -6
  495. package/dist/esm/post-popover-58149de7.js +0 -102
  496. package/dist/esm/post-popovercontainer-8bde9fc3.js +0 -2184
  497. package/dist/esm/post-popovercontainer.entry.js +0 -3
  498. package/dist/esm/post-tab-header-ae8feb19.js +0 -30
  499. package/dist/esm/post-tag-887d5fbe.js +0 -45
  500. package/dist/post-components/p-0b71bf5a.js +0 -1
  501. package/dist/post-components/p-0e09dc41.js +0 -1
  502. package/dist/post-components/p-19e54be9.js +0 -1
  503. package/dist/post-components/p-1e8f0f36.js +0 -1
  504. package/dist/post-components/p-22257eff.entry.js +0 -1
  505. package/dist/post-components/p-249ac168.entry.js +0 -1
  506. package/dist/post-components/p-2737eaf5.js +0 -1
  507. package/dist/post-components/p-2b10e265.js +0 -1
  508. package/dist/post-components/p-3325086e.js +0 -1
  509. package/dist/post-components/p-3b823fee.entry.js +0 -1
  510. package/dist/post-components/p-45f4c803.entry.js +0 -1
  511. package/dist/post-components/p-47935dbb.js +0 -1
  512. package/dist/post-components/p-486fbbce.entry.js +0 -1
  513. package/dist/post-components/p-4a7fb0f3.entry.js +0 -1
  514. package/dist/post-components/p-5f231c2c.js +0 -1
  515. package/dist/post-components/p-611b3c41.js +0 -1
  516. package/dist/post-components/p-6a28f8b9.js +0 -1
  517. package/dist/post-components/p-6adeaa6c.js +0 -1
  518. package/dist/post-components/p-6ed3497a.entry.js +0 -1
  519. package/dist/post-components/p-820c5c19.entry.js +0 -1
  520. package/dist/post-components/p-8aeb549f.entry.js +0 -1
  521. package/dist/post-components/p-92aeec3c.js +0 -1
  522. package/dist/post-components/p-9a99cfc7.js +0 -1
  523. package/dist/post-components/p-aa8a08dc.entry.js +0 -1
  524. package/dist/post-components/p-b095519d.js +0 -1
  525. package/dist/post-components/p-b99fdec3.js +0 -1
  526. package/dist/post-components/p-ba40b28a.entry.js +0 -1
  527. package/dist/post-components/p-c62de925.js +0 -1
  528. package/dist/post-components/p-d2101b8a.entry.js +0 -1
  529. package/dist/post-components/p-d2f9de94.js +0 -2
  530. package/dist/post-components/p-d7a44f45.js +0 -1
  531. package/dist/post-components/p-db4b8ea1.entry.js +0 -1
  532. package/dist/post-components/p-deb4131c.js +0 -1
  533. package/dist/post-components/p-eedc6ae8.entry.js +0 -1
  534. package/dist/post-components/p-f217f420.js +0 -1
  535. package/dist/post-components/p-f707d163.entry.js +0 -1
  536. package/dist/types/components/post-alert/alert-types.d.ts +0 -2
  537. package/dist/types/components/post-alert/post-alert.d.ts +0 -54
  538. package/loaders/post-alert.js +0 -139
@@ -1156,6 +1156,9 @@ const size$1 = function (options) {
1156
1156
  };
1157
1157
  };
1158
1158
 
1159
+ function hasWindow() {
1160
+ return typeof window !== 'undefined';
1161
+ }
1159
1162
  function getNodeName(node) {
1160
1163
  if (isNode(node)) {
1161
1164
  return (node.nodeName || '').toLowerCase();
@@ -1174,17 +1177,25 @@ function getDocumentElement(node) {
1174
1177
  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1175
1178
  }
1176
1179
  function isNode(value) {
1180
+ if (!hasWindow()) {
1181
+ return false;
1182
+ }
1177
1183
  return value instanceof Node || value instanceof getWindow(value).Node;
1178
1184
  }
1179
1185
  function isElement(value) {
1186
+ if (!hasWindow()) {
1187
+ return false;
1188
+ }
1180
1189
  return value instanceof Element || value instanceof getWindow(value).Element;
1181
1190
  }
1182
1191
  function isHTMLElement(value) {
1192
+ if (!hasWindow()) {
1193
+ return false;
1194
+ }
1183
1195
  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1184
1196
  }
1185
1197
  function isShadowRoot(value) {
1186
- // Browsers without `ShadowRoot` support.
1187
- if (typeof ShadowRoot === 'undefined') {
1198
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
1188
1199
  return false;
1189
1200
  }
1190
1201
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
@@ -1215,7 +1226,8 @@ function isContainingBlock(elementOrCss) {
1215
1226
  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
1216
1227
 
1217
1228
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1218
- return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1229
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1230
+ return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
1219
1231
  }
1220
1232
  function getContainingBlock(element) {
1221
1233
  let currentNode = getParentNode(element);
@@ -1288,10 +1300,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
1288
1300
  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1289
1301
  const win = getWindow(scrollableAncestor);
1290
1302
  if (isBody) {
1291
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
1303
+ const frameElement = getFrameElement(win);
1304
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1292
1305
  }
1293
1306
  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1294
1307
  }
1308
+ function getFrameElement(win) {
1309
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1310
+ }
1295
1311
 
1296
1312
  function getCssDimensions(element) {
1297
1313
  const css = getComputedStyle(element);
@@ -1395,7 +1411,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1395
1411
  const win = getWindow(domElement);
1396
1412
  const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1397
1413
  let currentWin = win;
1398
- let currentIFrame = currentWin.frameElement;
1414
+ let currentIFrame = getFrameElement(currentWin);
1399
1415
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1400
1416
  const iframeScale = getScale(currentIFrame);
1401
1417
  const iframeRect = currentIFrame.getBoundingClientRect();
@@ -1409,7 +1425,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1409
1425
  x += left;
1410
1426
  y += top;
1411
1427
  currentWin = getWindow(currentIFrame);
1412
- currentIFrame = currentWin.frameElement;
1428
+ currentIFrame = getFrameElement(currentWin);
1413
1429
  }
1414
1430
  }
1415
1431
  return rectToClientRect({
@@ -1420,6 +1436,31 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1420
1436
  });
1421
1437
  }
1422
1438
 
1439
+ // If <html> has a CSS width greater than the viewport, then this will be
1440
+ // incorrect for RTL.
1441
+ function getWindowScrollBarX(element, rect) {
1442
+ const leftScroll = getNodeScroll(element).scrollLeft;
1443
+ if (!rect) {
1444
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1445
+ }
1446
+ return rect.left + leftScroll;
1447
+ }
1448
+
1449
+ function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
1450
+ if (ignoreScrollbarX === void 0) {
1451
+ ignoreScrollbarX = false;
1452
+ }
1453
+ const htmlRect = documentElement.getBoundingClientRect();
1454
+ const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
1455
+ // RTL <body> scrollbar.
1456
+ getWindowScrollBarX(documentElement, htmlRect));
1457
+ const y = htmlRect.top + scroll.scrollTop;
1458
+ return {
1459
+ x,
1460
+ y
1461
+ };
1462
+ }
1463
+
1423
1464
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1424
1465
  let {
1425
1466
  elements,
@@ -1451,11 +1492,12 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1451
1492
  offsets.y = offsetRect.y + offsetParent.clientTop;
1452
1493
  }
1453
1494
  }
1495
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
1454
1496
  return {
1455
1497
  width: rect.width * scale.x,
1456
1498
  height: rect.height * scale.y,
1457
- x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
1458
- y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
1499
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1500
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1459
1501
  };
1460
1502
  }
1461
1503
 
@@ -1463,12 +1505,6 @@ function getClientRects(element) {
1463
1505
  return Array.from(element.getClientRects());
1464
1506
  }
1465
1507
 
1466
- function getWindowScrollBarX(element) {
1467
- // If <html> has a CSS width greater than the viewport, then this will be
1468
- // incorrect for RTL.
1469
- return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
1470
- }
1471
-
1472
1508
  // Gets the entire size of the scrollable document area, even extending outside
1473
1509
  // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1474
1510
  function getDocumentRect(element) {
@@ -1543,9 +1579,10 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
1543
1579
  } else {
1544
1580
  const visualOffsets = getVisualOffsets(element);
1545
1581
  rect = {
1546
- ...clippingAncestor,
1547
1582
  x: clippingAncestor.x - visualOffsets.x,
1548
- y: clippingAncestor.y - visualOffsets.y
1583
+ y: clippingAncestor.y - visualOffsets.y,
1584
+ width: clippingAncestor.width,
1585
+ height: clippingAncestor.height
1549
1586
  };
1550
1587
  }
1551
1588
  return rectToClientRect(rect);
@@ -1650,11 +1687,14 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1650
1687
  offsets.x = offsetRect.x + offsetParent.clientLeft;
1651
1688
  offsets.y = offsetRect.y + offsetParent.clientTop;
1652
1689
  } else if (documentElement) {
1690
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1691
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1653
1692
  offsets.x = getWindowScrollBarX(documentElement);
1654
1693
  }
1655
1694
  }
1656
- const x = rect.left + scroll.scrollLeft - offsets.x;
1657
- const y = rect.top + scroll.scrollTop - offsets.y;
1695
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1696
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1697
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1658
1698
  return {
1659
1699
  x,
1660
1700
  y,
@@ -1674,7 +1714,16 @@ function getTrueOffsetParent(element, polyfill) {
1674
1714
  if (polyfill) {
1675
1715
  return polyfill(element);
1676
1716
  }
1677
- return element.offsetParent;
1717
+ let rawOffsetParent = element.offsetParent;
1718
+
1719
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1720
+ // while Chrome and Safari return the <body> element. The <body> element must
1721
+ // be used to perform the correct calculations even if the <html> element is
1722
+ // non-static.
1723
+ if (getDocumentElement(element) === rawOffsetParent) {
1724
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1725
+ }
1726
+ return rawOffsetParent;
1678
1727
  }
1679
1728
 
1680
1729
  // Gets the closest ancestor positioned element. Handles some edge cases,
@@ -1736,6 +1785,10 @@ const platform = {
1736
1785
  isRTL
1737
1786
  };
1738
1787
 
1788
+ function rectsAreEqual(a, b) {
1789
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1790
+ }
1791
+
1739
1792
  // https://samthor.au/2021/observing-dom/
1740
1793
  function observeMove(element, onMove) {
1741
1794
  let io = null;
@@ -1755,12 +1808,13 @@ function observeMove(element, onMove) {
1755
1808
  threshold = 1;
1756
1809
  }
1757
1810
  cleanup();
1811
+ const elementRectForRootMargin = element.getBoundingClientRect();
1758
1812
  const {
1759
1813
  left,
1760
1814
  top,
1761
1815
  width,
1762
1816
  height
1763
- } = element.getBoundingClientRect();
1817
+ } = elementRectForRootMargin;
1764
1818
  if (!skip) {
1765
1819
  onMove();
1766
1820
  }
@@ -1793,6 +1847,16 @@ function observeMove(element, onMove) {
1793
1847
  refresh(false, ratio);
1794
1848
  }
1795
1849
  }
1850
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1851
+ // It's possible that even though the ratio is reported as 1, the
1852
+ // element is not actually fully within the IntersectionObserver's root
1853
+ // area anymore. This can happen under performance constraints. This may
1854
+ // be a bug in the browser's IntersectionObserver implementation. To
1855
+ // work around this, we compare the element's bounding rect now with
1856
+ // what it was at the time we created the IntersectionObserver. If they
1857
+ // are not equal then the element moved, so we refresh.
1858
+ refresh();
1859
+ }
1796
1860
  isFirstUpdate = false;
1797
1861
  }
1798
1862
 
@@ -1870,7 +1934,7 @@ function autoUpdate(reference, floating, update, options) {
1870
1934
  }
1871
1935
  function frameLoop() {
1872
1936
  const nextRefRect = getBoundingClientRect(reference);
1873
- if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1937
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
1874
1938
  update();
1875
1939
  }
1876
1940
  prevRefRect = nextRefRect;
@@ -2039,30 +2103,65 @@ const computePosition = (reference, floating, options) => {
2039
2103
  }
2040
2104
  `,E=null;function I(e){if(E===null)try{E=new CSSStyleSheet,E.replaceSync(C);}catch{E=!1;}if(E===!1){let t=document.createElement("style");t.textContent=C,e instanceof Document?e.head.prepend(t):e.prepend(t);}else e.adoptedStyleSheets=[E,...e.adoptedStyleSheets];}function K(){window.ToggleEvent=window.ToggleEvent||c;function e(n){return n?.includes(":popover-open")&&(n=n.replace(J,"$1.\\:popover-open")),n}f(Document.prototype,"querySelector",e),f(Document.prototype,"querySelectorAll",e),f(Element.prototype,"querySelector",e),f(Element.prototype,"querySelectorAll",e),f(Element.prototype,"matches",e),f(Element.prototype,"closest",e),f(DocumentFragment.prototype,"querySelectorAll",e),f(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let n=(this.getAttribute("popover")||"").toLowerCase();return n===""||n=="auto"?"auto":"manual"},set(n){this.setAttribute("popover",n);}},showPopover:{enumerable:!0,configurable:!0,value(){S(this);}},hidePopover:{enumerable:!0,configurable:!0,value(){m(this,!0,!0);}},togglePopover:{enumerable:!0,configurable:!0,value(n){h.get(this)==="showing"&&n===void 0||n===!1?m(this,!0,!0):(n===void 0||n===!0)&&S(this);}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(n){let s=t.call(this,n);return I(s),s}}});let o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let n=o.call(this);return n.shadowRoot&&I(n.shadowRoot),n}}});let r=new WeakMap;function i(n){Object.defineProperties(n.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(s){if(s===null)this.removeAttribute("popovertarget"),r.delete(this);else if(s instanceof Element)this.setAttribute("popovertarget",""),r.set(this,s);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let s=r.get(this);if(s&&s.isConnected)return s;if(s&&!s.isConnected)return r.delete(this),null;let u=v(this),w=this.getAttribute("popovertarget");return (u instanceof Document||u instanceof B)&&w&&u.getElementById(w)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let s=(this.getAttribute("popovertargetaction")||"").toLowerCase();return s==="show"||s==="hide"?s:"toggle"},set(s){this.setAttribute("popovertargetaction",s);}}});}i(HTMLButtonElement),i(HTMLInputElement);let l=n=>{if(!n.isTrusted)return;let s=n.composedPath()[0];if(!(s instanceof Element)||s?.shadowRoot)return;let u=v(s);if(!(u instanceof B||u instanceof Document))return;let w=s.closest("[popovertargetaction],[popovertarget]");if(w){O(w),n.preventDefault();return}},a=n=>{let s=n.key,u=n.target;!n.defaultPrevented&&u&&(s==="Escape"||s==="Esc")&&T(u.ownerDocument,!0,!0);};(n=>{n.addEventListener("click",l),n.addEventListener("keydown",a),n.addEventListener("pointerdown",x),n.addEventListener("pointerup",x);})(document),I(document);}j()||K();})();
2041
2105
 
2042
- const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:2px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-left:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-right:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-left:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";
2106
+ const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;z-index:1060;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:var(--post-device-elevation-300);width:max-content;color:var(--post-current-palette-fg);background-color:var(--post-current-palette-bg);border:2px solid rgba(0,0,0,0);border-radius:4px}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--safe-space-cursor-x, 0) var(--safe-space-cursor-y, 0), var(--safe-space-popover-x-start, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-start, 0)), var(--safe-space-popover-x-end, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--safe-space-trigger-x-start, var(--safe-space-trigger-x, 0)) var(--safe-space-trigger-y, var(--safe-space-trigger-y-start, 0)), var(--safe-space-trigger-x-end, var(--safe-space-trigger-x, 0)) var(--safe-space-trigger-y, var(--safe-space-trigger-y-end, 0)), var(--safe-space-popover-x-end, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-end, 0)), var(--safe-space-popover-x-start, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-start, 0)))}:where(post-popovercontainer):not(:has(.arrow))>div{box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow)>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top)>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left)>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right)>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-left:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-right:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-left:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";
2043
2107
  const PostPopovercontainerStyle0 = postPopovercontainerCss;
2044
2108
 
2045
- const SIDE_MAP = {
2046
- top: 'bottom',
2047
- right: 'left',
2048
- bottom: 'top',
2049
- left: 'right',
2050
- };
2051
2109
  const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends HTMLElement$1 {
2052
2110
  constructor() {
2053
2111
  super();
2054
2112
  this.__registerHost();
2055
2113
  this.postToggle = createEvent(this, "postToggle", 7);
2114
+ this.manualClose = false;
2056
2115
  this.placement = 'top';
2116
+ this.edgeGap = 8;
2057
2117
  this.arrow = false;
2118
+ this.safeSpace = undefined;
2119
+ }
2120
+ static STATIC_SIDES = {
2121
+ top: 'bottom',
2122
+ right: 'left',
2123
+ bottom: 'top',
2124
+ left: 'right',
2125
+ };
2126
+ static PROPERTIES_TO_CLEAR = [
2127
+ '--safe-space-popover-x',
2128
+ '--safe-space-popover-y',
2129
+ '--safe-space-popover-x-start',
2130
+ '--safe-space-popover-x-end',
2131
+ '--safe-space-popover-y-start',
2132
+ '--safe-space-popover-y-end',
2133
+ '--safe-space-trigger-x',
2134
+ '--safe-space-trigger-y',
2135
+ '--safe-space-trigger-x-start',
2136
+ '--safe-space-trigger-x-end',
2137
+ '--safe-space-trigger-y-start',
2138
+ '--safe-space-trigger-y-end',
2139
+ ];
2140
+ get host() { return this; }
2141
+ arrowRef;
2142
+ eventTarget;
2143
+ clearAutoUpdate;
2144
+ toggleTimeoutId;
2145
+ /**
2146
+ * Fires whenever the popover gets shown or hidden, passing the new state in event.details as a boolean
2147
+ */
2148
+ postToggle;
2149
+ /**
2150
+ * Updates cursor position for safe space feature when popover is open.
2151
+ * Sets CSS custom properties for dynamic styling of safe area.
2152
+ * @param event MouseEvent with cursor position
2153
+ */
2154
+ mouseTrackingHandler(event) {
2155
+ this.host.style.setProperty('--safe-space-cursor-x', `${event.clientX}px`);
2156
+ this.host.style.setProperty('--safe-space-cursor-y', `${event.clientY}px`);
2058
2157
  }
2059
2158
  componentDidLoad() {
2060
- this.host.setAttribute('popover', '');
2061
2159
  this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
2062
2160
  }
2063
2161
  disconnectedCallback() {
2064
- if (typeof this.clearAutoUpdate === 'function')
2162
+ if (typeof this.clearAutoUpdate === 'function') {
2065
2163
  this.clearAutoUpdate();
2164
+ }
2066
2165
  }
2067
2166
  /**
2068
2167
  * Programmatically display the tooltip
@@ -2097,7 +2196,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
2097
2196
  this.host.togglePopover(force);
2098
2197
  this.toggleTimeoutId = null;
2099
2198
  }
2100
- return this.host.matches(':where(:popover-open, .popover-open');
2199
+ return this.host.matches(':where(:popover-open, .popover-open)');
2101
2200
  }
2102
2201
  /**
2103
2202
  * Start or stop auto updates based on tooltip events.
@@ -2110,10 +2209,14 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
2110
2209
  const isOpen = e.newState === 'open';
2111
2210
  if (isOpen) {
2112
2211
  this.startAutoupdates();
2212
+ if (this.safeSpace)
2213
+ window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
2113
2214
  }
2114
2215
  else {
2115
2216
  if (typeof this.clearAutoUpdate === 'function')
2116
2217
  this.clearAutoUpdate();
2218
+ if (this.safeSpace)
2219
+ window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
2117
2220
  }
2118
2221
  this.postToggle.emit(isOpen);
2119
2222
  }
@@ -2125,13 +2228,35 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
2125
2228
  this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
2126
2229
  }
2127
2230
  async calculatePosition() {
2231
+ const { x, y, middlewareData, placement } = await this.computeMainPosition();
2232
+ const currentPlacement = placement.split('-')[0];
2233
+ // Position popover
2234
+ this.host.style.left = `${x}px`;
2235
+ this.host.style.top = `${y}px`;
2236
+ // Position arrow if enabled
2237
+ if (this.arrow && middlewareData.arrow) {
2238
+ const { x: arrowX, y: arrowY } = middlewareData.arrow;
2239
+ const staticSide = PostPopovercontainer.STATIC_SIDES[currentPlacement];
2240
+ if (staticSide) {
2241
+ Object.assign(this.arrowRef.style, {
2242
+ left: arrowX ? `${arrowX}px` : '',
2243
+ top: arrowY ? `${arrowY}px` : '',
2244
+ [staticSide]: '-7px',
2245
+ });
2246
+ }
2247
+ }
2248
+ // Handle safe space if enabled
2249
+ if (this.safeSpace && this.eventTarget) {
2250
+ await this.updateSafeSpaceBoundaries(currentPlacement);
2251
+ }
2252
+ }
2253
+ async computeMainPosition() {
2254
+ const gap = this.edgeGap;
2128
2255
  const middleware = [
2129
2256
  flip(),
2130
2257
  inline(),
2131
2258
  shift({
2132
- padding: 8,
2133
- // Prevents shifting away from the anchor too far, while shifting as far as possible
2134
- // https://floating-ui.com/docs/shift#limiter
2259
+ padding: gap,
2135
2260
  limiter: limitShift({
2136
2261
  offset: 32,
2137
2262
  }),
@@ -2139,50 +2264,93 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
2139
2264
  size({
2140
2265
  apply({ availableWidth, elements }) {
2141
2266
  Object.assign(elements.floating.style, {
2142
- maxWidth: `${availableWidth - 16}px`,
2267
+ maxWidth: `${availableWidth - gap * 2}px`,
2143
2268
  });
2144
2269
  },
2145
2270
  }),
2146
- offset(this.arrow ? 12 : 8), // 4px outside of element to account for focus outline + ~arrow size
2271
+ offset(this.arrow ? gap + 4 : gap),
2147
2272
  ];
2148
2273
  if (this.arrow) {
2149
- middleware.push(arrow({ element: this.arrowRef, padding: 8 }));
2274
+ middleware.push(arrow({ element: this.arrowRef, padding: gap }));
2150
2275
  }
2151
- const { x, y, middlewareData, placement: currentPlacement, } = await computePosition(this.eventTarget, this.host, {
2276
+ return computePosition(this.eventTarget, this.host, {
2152
2277
  placement: this.placement || 'top',
2153
2278
  strategy: 'fixed',
2154
2279
  middleware,
2155
2280
  });
2156
- // Tooltip
2157
- this.host.style.left = `${x}px`;
2158
- this.host.style.top = `${y}px`;
2159
- // Arrow
2160
- if (this.arrow) {
2161
- // Tutorial: https://codesandbox.io/s/mystifying-kare-ee3hmh?file=/src/index.js
2162
- const side = currentPlacement.split('-')[0];
2163
- const { x: arrowX, y: arrowY } = middlewareData.arrow;
2164
- const staticSide = SIDE_MAP[side];
2165
- const offsetBorderLineJoin = 2;
2166
- Object.assign(this.arrowRef.style, {
2167
- top: arrowY ? `${arrowY}px` : '',
2168
- left: arrowX ? `${arrowX}px` : '',
2169
- [staticSide]: `${-this.arrowRef.offsetWidth / 2 - offsetBorderLineJoin}px`,
2170
- });
2171
- // Add position as a class to be able to style arrow for HCM
2172
- this.arrowRef.classList.remove(...Object.values(SIDE_MAP));
2173
- this.arrowRef.classList.add(staticSide);
2281
+ }
2282
+ async updateSafeSpaceBoundaries(currentPlacement) {
2283
+ const targetRect = this.eventTarget.getBoundingClientRect();
2284
+ const popoverRect = this.host.getBoundingClientRect();
2285
+ const isVertical = currentPlacement === 'top' || currentPlacement === 'bottom';
2286
+ // Helper function to get positioning data based on placement
2287
+ const getPositioningData = (placement, popoverRect, targetRect) => {
2288
+ if (placement === 'top' || placement === 'bottom') {
2289
+ return {
2290
+ popover: {
2291
+ y: placement === 'top' ? popoverRect.bottom : popoverRect.top,
2292
+ xStart: popoverRect.left,
2293
+ xEnd: popoverRect.right,
2294
+ },
2295
+ trigger: {
2296
+ y: placement === 'top' ? targetRect.top : targetRect.bottom,
2297
+ xStart: targetRect.left,
2298
+ xEnd: targetRect.right,
2299
+ },
2300
+ };
2301
+ }
2302
+ else {
2303
+ // left or right
2304
+ return {
2305
+ popover: {
2306
+ x: placement === 'left' ? popoverRect.right : popoverRect.left,
2307
+ yStart: popoverRect.top,
2308
+ yEnd: popoverRect.bottom,
2309
+ },
2310
+ trigger: {
2311
+ x: placement === 'left' ? targetRect.left : targetRect.right,
2312
+ yStart: targetRect.top,
2313
+ yEnd: targetRect.bottom,
2314
+ },
2315
+ };
2316
+ }
2317
+ };
2318
+ const posData = getPositioningData(currentPlacement, popoverRect, targetRect);
2319
+ // Clear previous values
2320
+ PostPopovercontainer.PROPERTIES_TO_CLEAR.forEach(prop => {
2321
+ this.host.style.removeProperty(prop);
2322
+ });
2323
+ if (isVertical) {
2324
+ // For top/bottom placement
2325
+ this.host.style.setProperty('--safe-space-popover-y', `${posData.popover.y}px`);
2326
+ this.host.style.setProperty('--safe-space-popover-x-start', `${posData.popover.xStart}px`);
2327
+ this.host.style.setProperty('--safe-space-popover-x-end', `${posData.popover.xEnd}px`);
2328
+ this.host.style.setProperty('--safe-space-trigger-y', `${posData.trigger.y}px`);
2329
+ this.host.style.setProperty('--safe-space-trigger-x-start', `${posData.trigger.xStart}px`);
2330
+ this.host.style.setProperty('--safe-space-trigger-x-end', `${posData.trigger.xEnd}px`);
2331
+ }
2332
+ else {
2333
+ // For left/right placement
2334
+ this.host.style.setProperty('--safe-space-popover-x', `${posData.popover.x}px`);
2335
+ this.host.style.setProperty('--safe-space-popover-y-start', `${posData.popover.yStart}px`);
2336
+ this.host.style.setProperty('--safe-space-popover-y-end', `${posData.popover.yEnd}px`);
2337
+ this.host.style.setProperty('--safe-space-trigger-x', `${posData.trigger.x}px`);
2338
+ this.host.style.setProperty('--safe-space-trigger-y-start', `${posData.trigger.yStart}px`);
2339
+ this.host.style.setProperty('--safe-space-trigger-y-end', `${posData.trigger.yEnd}px`);
2174
2340
  }
2175
2341
  }
2176
2342
  render() {
2177
- return (h(Host, { key: 'daf21d119057a14c2c2f68b8068901ab698beae3', "data-version": version }, this.arrow && (h("span", { key: '4f5cfb1422217f9ef71732cdfc0c97b6b29e4809', class: "arrow", ref: el => {
2343
+ return (h(Host, { key: '2d04c94fe2a6de0c0fe17c1e2dcb99481d13336b', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '3653be7880e5b896ae85e97ad709838732032f2d' }, this.arrow && (h("span", { key: '770f1727acf0ccb47e3940d034850df9fc3a6096', class: "arrow", ref: el => {
2178
2344
  this.arrowRef = el;
2179
- } })), h("slot", { key: 'f6e4beefb8e365dbf20a0a5019cceaac4ecb73a4' })));
2345
+ } })), h("slot", { key: 'b12e95d51accec79a08fda3970f3b46ba7147ed7' }))));
2180
2346
  }
2181
- get host() { return this; }
2182
2347
  static get style() { return PostPopovercontainerStyle0; }
2183
2348
  }, [4, "post-popovercontainer", {
2349
+ "manualClose": [4, "manual-close"],
2184
2350
  "placement": [1],
2351
+ "edgeGap": [2, "edge-gap"],
2185
2352
  "arrow": [4],
2353
+ "safeSpace": [513, "safe-space"],
2186
2354
  "show": [64],
2187
2355
  "hide": [64],
2188
2356
  "toggle": [64]
@@ -2,17 +2,28 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { v as version } from './package.js';
3
3
  import { d as defineCustomElement$1 } from './post-icon2.js';
4
4
 
5
- const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}";
5
+ const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}";
6
6
  const PostRatingStyle0 = postRatingCss;
7
7
 
8
8
  const PostRating = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTMLElement {
9
+ hasChanged = false;
10
+ get host() { return this; }
11
+ /**
12
+ * An event emitted whenever the component's value has changed (on input).
13
+ * The event payload can be used like so: `event.detail.value`.
14
+ */
15
+ postInput;
16
+ /**
17
+ * An event emitted whenever the component's value has changed (on blur).
18
+ * The event payload can be used like so: `event.detail.value`.
19
+ */
20
+ postChange;
9
21
  constructor() {
10
22
  super();
11
23
  this.__registerHost();
12
24
  this.__attachShadow();
13
25
  this.postInput = createEvent(this, "postInput", 7);
14
26
  this.postChange = createEvent(this, "postChange", 7);
15
- this.hasChanged = false;
16
27
  this.hoveredIndex = undefined;
17
28
  this.label = 'Rating';
18
29
  this.stars = 5;
@@ -74,7 +85,7 @@ const PostRating = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTM
74
85
  }
75
86
  }
76
87
  render() {
77
- return (h(Host, { key: '0a4972eeedcda4d4f772db0407ba2a6279f5d797', "data-version": version }, h("div", { key: 'a9ab9daaa3f9e1e421f28267057b99a1a2e235ee', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
88
+ return (h(Host, { key: '4ccdf384b9a4cfc462d5d3f4a7caab659b6ba2b0', "data-version": version }, h("div", { key: '7ab53083bcdff6586b1de7f1c9e5fa546728fc6f', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
78
89
  'star': true,
79
90
  'before-hover': i < this.hoveredIndex,
80
91
  'active': i < Math.round(this.currentRating),
@@ -82,7 +93,6 @@ const PostRating = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTM
82
93
  'after-active': i > this.hoveredIndex && i < this.currentRating,
83
94
  }, onClick: () => this.update(i + 1), onMouseEnter: e => this.hoverHandler(i, e), onMouseLeave: e => this.hoverHandler(i, e) }, h("post-icon", { name: "2062", class: "stroke" }), h("post-icon", { name: "2574", class: "fill" })))))));
84
95
  }
85
- get host() { return this; }
86
96
  static get style() { return PostRatingStyle0; }
87
97
  }, [1, "post-rating", {
88
98
  "label": [1],
@@ -1,8 +1,9 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
3
  import { c as checkNonEmpty } from './check-non-empty.js';
4
+ import { n as nanoid } from './index.browser.js';
4
5
 
5
- const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:var(--post-contrast-color-inverted);color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-secondary .tab-title{background-color:#666}.bg-secondary .tab-title.active{background-color:#666}.bg-secondary .nav-item{background-color:#666}.bg-success .tab-title{background-color:#2c871d}.bg-success .tab-title.active{background-color:#2c871d}.bg-success .nav-item{background-color:#2c871d}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-error .tab-title{background-color:#a51728}.bg-error .tab-title.active{background-color:#a51728}.bg-error .nav-item{background-color:#a51728}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}";
6
+ const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}";
6
7
  const PostTabHeaderStyle0 = postTabHeaderCss;
7
8
 
8
9
  const PostTabHeader = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
@@ -13,16 +14,16 @@ const PostTabHeader = /*@__PURE__*/ proxyCustomElement(class PostTabHeader exten
13
14
  this.tabId = undefined;
14
15
  this.panel = undefined;
15
16
  }
16
- validateFor(newValue) {
17
- checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
17
+ get host() { return this; }
18
+ validateFor() {
19
+ checkNonEmpty(this, 'panel');
18
20
  }
19
21
  componentWillLoad() {
20
- this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
22
+ this.tabId = `tab-${this.host.id || nanoid(6)}`;
21
23
  }
22
24
  render() {
23
- return (h(Host, { key: '35077e5514ffd19a4fb27bc3a4c1d9d19072768b', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '67b09864a209c00c677e1c279240d9b4ca289faa' })));
25
+ return (h(Host, { key: '336824660de90bf5c570e9739947927a32612fbd', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '8bfe0b57fa96044692e2db3fd983ccde427558e7' })));
24
26
  }
25
- get host() { return this; }
26
27
  static get watchers() { return {
27
28
  "panel": ["validateFor"]
28
29
  }; }
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
+ import { n as nanoid } from './index.browser.js';
3
4
 
4
5
  const postTabPanelCss = ":host{display:none}";
5
6
  const PostTabPanelStyle0 = postTabPanelCss;
@@ -12,14 +13,14 @@ const PostTabPanel = /*@__PURE__*/ proxyCustomElement(class PostTabPanel extends
12
13
  this.panelId = undefined;
13
14
  this.name = undefined;
14
15
  }
16
+ get host() { return this; }
15
17
  componentWillLoad() {
16
18
  // get the id set on the host element or use a random id by default
17
- this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
19
+ this.panelId = `panel-${this.host.id || nanoid(6)}`;
18
20
  }
19
21
  render() {
20
- return (h(Host, { key: '2d01a8e7f06e45b4750e63584a3c52232dee4dd5', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: 'b51e2f112791ac22df43ebb537208c65aebe3d03' })));
22
+ return (h(Host, { key: '8331ab54bda793a120dc467d8406cc0a02a5c480', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '7da6d67b69150a70ee290ad8ef9b95684ea3f83d' })));
21
23
  }
22
- get host() { return this; }
23
24
  static get style() { return PostTabPanelStyle0; }
24
25
  }, [1, "post-tab-panel", {
25
26
  "name": [1],