@swisspost/design-system-components 9.0.0-next.32 → 9.0.0-next.34

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 (347) hide show
  1. package/dist/cjs/{attribute-observer-6d8b886b.js → attribute-observer-c3a805b2.js} +3 -1
  2. package/dist/cjs/{breakpoints-c6247c71.js → breakpoints-cdf1b747.js} +12 -7
  3. package/dist/cjs/event-guard-efabc84f.js +47 -0
  4. package/dist/cjs/get-root-8102fecd.js +17 -0
  5. package/dist/cjs/{index-d6bf2c66.js → index-b60129c4.js} +2 -2
  6. package/dist/cjs/index.cjs.js +25 -25
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/long-press-event-6e62d113.js +266 -0
  9. package/dist/cjs/{package-6f8f430c.js → package-3426e8f7.js} +1 -1
  10. package/dist/cjs/{post-accordion-e3a6d78e.js → post-accordion-3ac8dca8.js} +10 -12
  11. package/dist/cjs/{post-accordion-item-7ed1f630.js → post-accordion-item-aace6bc2.js} +10 -10
  12. package/dist/cjs/post-accordion-item.cjs.entry.js +5 -3
  13. package/dist/cjs/post-accordion.cjs.entry.js +5 -3
  14. package/dist/cjs/{post-avatar-de8ec197.js → post-avatar-53abd22f.js} +5 -4
  15. package/dist/cjs/post-avatar.cjs.entry.js +4 -3
  16. package/dist/cjs/post-back-to-top-b231fc1c.js +96 -0
  17. package/dist/cjs/post-back-to-top.cjs.entry.js +4 -3
  18. package/dist/cjs/{post-banner-bf523706.js → post-banner-e6d14bf1.js} +4 -8
  19. package/dist/cjs/post-banner.cjs.entry.js +4 -3
  20. package/dist/cjs/{post-breadcrumb-da55143a.js → post-breadcrumb-a929f2a6.js} +30 -22
  21. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -3
  22. package/dist/cjs/post-breadcrumb.cjs.entry.js +4 -4
  23. package/dist/cjs/{post-card-control-0bcd7d16.js → post-card-control-cbee7b86.js} +26 -40
  24. package/dist/cjs/post-card-control.cjs.entry.js +4 -3
  25. package/dist/cjs/post-closebutton_15.cjs.entry.js +6 -5
  26. package/dist/cjs/{post-collapsible-trigger-a5e4451d.js → post-collapsible-trigger-d1cb592a.js} +39 -46
  27. package/dist/cjs/post-collapsible_2.cjs.entry.js +6 -5
  28. package/dist/cjs/post-components.cjs.js +2 -2
  29. package/dist/cjs/{post-footer-b15fee73.js → post-footer-4290dafc.js} +11 -11
  30. package/dist/cjs/post-footer.cjs.entry.js +4 -4
  31. package/dist/cjs/{post-linkarea-8c85bf5e.js → post-linkarea-f22f4f92.js} +5 -5
  32. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-menu-item-509877cd.js → post-menu-item-afabaa61.js} +4 -4
  34. package/dist/cjs/{post-popover-1213aa19.js → post-popover-a4c72d38.js} +16 -14
  35. package/dist/cjs/post-popover.cjs.entry.js +5 -4
  36. package/dist/cjs/{post-rating-e1f8a668.js → post-rating-b87616fc.js} +4 -14
  37. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  38. package/dist/cjs/{post-tab-header-889a6c64.js → post-tab-header-45cb6bb4.js} +5 -4
  39. package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
  40. package/dist/cjs/{post-tab-panel-300f39a9.js → post-tab-panel-00d16ba7.js} +4 -4
  41. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  42. package/dist/cjs/{post-tabs-dc281228.js → post-tabs-2c3a89d0.js} +5 -12
  43. package/dist/cjs/post-tabs.cjs.entry.js +4 -3
  44. package/dist/cjs/{post-tag-fd9e586f.js → post-tag-370a2f4d.js} +3 -3
  45. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  46. package/dist/cjs/{post-togglebutton-ad6ae1e4.js → post-togglebutton-2c9552e3.js} +969 -471
  47. package/dist/cjs/{post-tooltip-52d690e4.js → post-tooltip-4d4d2ea9.js} +39 -296
  48. package/dist/cjs/post-tooltip.cjs.entry.js +5 -4
  49. package/dist/collection/animations/collapse.js +3 -1
  50. package/dist/collection/components/post-accordion/post-accordion.js +6 -10
  51. package/dist/collection/components/post-accordion-item/post-accordion-item.js +6 -8
  52. package/dist/collection/components/post-avatar/post-avatar.js +3 -4
  53. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  54. package/dist/collection/components/post-back-to-top/post-back-to-top.js +37 -19
  55. package/dist/collection/components/post-banner/post-banner.js +0 -6
  56. package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +16 -19
  57. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +0 -2
  58. package/dist/collection/components/post-card-control/post-card-control.js +24 -40
  59. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -0
  60. package/dist/collection/components/post-closebutton/post-closebutton.js +12 -2
  61. package/dist/collection/components/post-collapsible/post-collapsible.js +4 -10
  62. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +29 -32
  63. package/dist/collection/components/post-footer/post-footer.js +8 -9
  64. package/dist/collection/components/post-header/post-header.css +1 -1
  65. package/dist/collection/components/post-header/post-header.js +16 -19
  66. package/dist/collection/components/post-icon/post-icon.js +5 -7
  67. package/dist/collection/components/post-language-option/post-language-option.js +1 -10
  68. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
  69. package/dist/collection/components/post-language-switch/post-language-switch.js +25 -31
  70. package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
  71. package/dist/collection/components/post-linkarea/post-linkarea.js +2 -2
  72. package/dist/collection/components/post-list/post-list.js +1 -3
  73. package/dist/collection/components/post-list-item/post-list-item.js +1 -2
  74. package/dist/collection/components/post-logo/post-logo.js +1 -2
  75. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  76. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +98 -182
  77. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  78. package/dist/collection/components/post-megadropdown/post-megadropdown.js +20 -30
  79. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +42 -36
  80. package/dist/collection/components/post-menu/post-menu.js +51 -52
  81. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +13 -15
  82. package/dist/collection/components/post-popover/post-popover.js +12 -12
  83. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +30 -33
  84. package/dist/collection/components/post-rating/post-rating.js +1 -12
  85. package/dist/collection/components/post-tab-header/post-tab-header.js +2 -3
  86. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -3
  87. package/dist/collection/components/post-tabs/post-tabs.js +1 -10
  88. package/dist/collection/components/post-tag/post-tag.js +0 -1
  89. package/dist/collection/components/post-togglebutton/post-togglebutton.js +10 -11
  90. package/dist/collection/components/post-tooltip/post-tooltip.js +36 -32
  91. package/dist/collection/utils/attribute-observer.js +2 -1
  92. package/dist/collection/utils/breakpoints.js +9 -7
  93. package/dist/collection/utils/environment.js +2 -0
  94. package/dist/collection/utils/event-guard.js +43 -0
  95. package/dist/collection/utils/get-root.js +6 -1
  96. package/dist/collection/utils/index.js +5 -0
  97. package/dist/collection/utils/is-motion-reduced.js +2 -1
  98. package/dist/components/attribute-observer.js +3 -1
  99. package/dist/components/breakpoints.js +12 -8
  100. package/dist/components/event-guard.js +45 -0
  101. package/dist/components/get-root.js +7 -1
  102. package/dist/components/long-press-event.js +264 -0
  103. package/dist/components/package.js +1 -1
  104. package/dist/components/post-accordion-item2.js +8 -8
  105. package/dist/components/post-accordion2.js +8 -10
  106. package/dist/components/post-avatar2.js +4 -3
  107. package/dist/components/post-back-to-top2.js +40 -20
  108. package/dist/components/post-banner2.js +2 -6
  109. package/dist/components/post-breadcrumb-item2.js +2 -2
  110. package/dist/components/post-breadcrumb2.js +28 -20
  111. package/dist/components/post-card-control2.js +25 -39
  112. package/dist/components/post-closebutton2.js +8 -3
  113. package/dist/components/post-collapsible-trigger2.js +33 -35
  114. package/dist/components/post-collapsible2.js +9 -12
  115. package/dist/components/post-footer2.js +8 -8
  116. package/dist/components/post-header2.js +18 -20
  117. package/dist/components/post-icon2.js +6 -6
  118. package/dist/components/post-language-option2.js +3 -10
  119. package/dist/components/post-language-switch2.js +28 -31
  120. package/dist/components/post-linkarea2.js +5 -4
  121. package/dist/components/post-list-item2.js +2 -2
  122. package/dist/components/post-list2.js +2 -3
  123. package/dist/components/post-logo2.js +3 -2
  124. package/dist/components/post-mainnavigation2.js +94 -182
  125. package/dist/components/post-megadropdown-trigger2.js +44 -36
  126. package/dist/components/post-megadropdown2.js +22 -31
  127. package/dist/components/post-menu-trigger2.js +15 -15
  128. package/dist/components/post-menu2.js +53 -52
  129. package/dist/components/post-popover2.js +14 -12
  130. package/dist/components/post-popovercontainer2.js +638 -36
  131. package/dist/components/post-rating2.js +2 -12
  132. package/dist/components/post-tab-header2.js +4 -3
  133. package/dist/components/post-tab-panel2.js +3 -3
  134. package/dist/components/post-tabs2.js +3 -10
  135. package/dist/components/post-tag2.js +1 -1
  136. package/dist/components/post-togglebutton2.js +12 -11
  137. package/dist/components/post-tooltip2.js +37 -294
  138. package/dist/docs.json +21 -15
  139. package/dist/esm/{attribute-observer-2f203993.js → attribute-observer-009deee5.js} +3 -1
  140. package/dist/esm/{breakpoints-bbe0c54e.js → breakpoints-7812702e.js} +12 -8
  141. package/dist/esm/event-guard-538ee077.js +45 -0
  142. package/dist/esm/get-root-1b1af46f.js +15 -0
  143. package/dist/esm/{index-3419e46d.js → index-f4d19816.js} +2 -2
  144. package/dist/esm/index.js +25 -25
  145. package/dist/esm/loader.js +3 -3
  146. package/dist/esm/long-press-event-04d24397.js +264 -0
  147. package/dist/esm/package-8986a24c.js +3 -0
  148. package/dist/esm/{post-accordion-7b6fb9c3.js → post-accordion-577b52a0.js} +10 -12
  149. package/dist/esm/{post-accordion-item-d40c0b26.js → post-accordion-item-99053b41.js} +10 -10
  150. package/dist/esm/post-accordion-item.entry.js +5 -3
  151. package/dist/esm/post-accordion.entry.js +5 -3
  152. package/dist/esm/{post-avatar-04ca6e3e.js → post-avatar-2914706c.js} +5 -4
  153. package/dist/esm/post-avatar.entry.js +4 -3
  154. package/dist/esm/post-back-to-top-4c7b1b47.js +94 -0
  155. package/dist/esm/post-back-to-top.entry.js +4 -3
  156. package/dist/esm/{post-banner-7c37e3ef.js → post-banner-295fd0f5.js} +4 -8
  157. package/dist/esm/post-banner.entry.js +4 -3
  158. package/dist/esm/{post-breadcrumb-59e4d655.js → post-breadcrumb-1abfb312.js} +30 -22
  159. package/dist/esm/post-breadcrumb-item_2.entry.js +4 -3
  160. package/dist/esm/post-breadcrumb.entry.js +4 -4
  161. package/dist/esm/{post-card-control-5471488b.js → post-card-control-ad72d4f8.js} +26 -40
  162. package/dist/esm/post-card-control.entry.js +4 -3
  163. package/dist/esm/post-closebutton_15.entry.js +6 -5
  164. package/dist/esm/{post-collapsible-trigger-1f6d816e.js → post-collapsible-trigger-6b4ece20.js} +39 -46
  165. package/dist/esm/post-collapsible_2.entry.js +6 -5
  166. package/dist/esm/post-components.js +3 -3
  167. package/dist/esm/{post-footer-d30f4dc8.js → post-footer-a5105e66.js} +11 -11
  168. package/dist/esm/post-footer.entry.js +4 -4
  169. package/dist/esm/{post-linkarea-8e1a561e.js → post-linkarea-22f97a88.js} +5 -5
  170. package/dist/esm/post-linkarea.entry.js +3 -3
  171. package/dist/esm/{post-menu-item-0c8477eb.js → post-menu-item-9465a1f3.js} +4 -4
  172. package/dist/esm/{post-popover-c43969ca.js → post-popover-e9b4569c.js} +16 -14
  173. package/dist/esm/post-popover.entry.js +5 -4
  174. package/dist/esm/{post-rating-94148df7.js → post-rating-ae16e3c9.js} +4 -14
  175. package/dist/esm/post-rating.entry.js +3 -3
  176. package/dist/esm/{post-tab-header-82df0ba9.js → post-tab-header-11f23150.js} +5 -4
  177. package/dist/esm/post-tab-header.entry.js +4 -3
  178. package/dist/esm/{post-tab-panel-a6512f53.js → post-tab-panel-0f3a952e.js} +4 -4
  179. package/dist/esm/post-tab-panel.entry.js +3 -3
  180. package/dist/esm/{post-tabs-d26ce341.js → post-tabs-1192509c.js} +5 -12
  181. package/dist/esm/post-tabs.entry.js +4 -3
  182. package/dist/esm/{post-tag-41d1667e.js → post-tag-8be0a71c.js} +3 -3
  183. package/dist/esm/post-tag.entry.js +3 -3
  184. package/dist/esm/{post-togglebutton-4f94bddb.js → post-togglebutton-b634fc7c.js} +969 -471
  185. package/dist/esm/{post-tooltip-20f916db.js → post-tooltip-f64bd0cc.js} +39 -296
  186. package/dist/esm/post-tooltip.entry.js +5 -4
  187. package/dist/post-components/index.esm.js +1 -1
  188. package/dist/post-components/p-0889c759.js +1 -0
  189. package/dist/post-components/p-0f398677.js +1 -0
  190. package/dist/post-components/p-1038fc25.js +1 -0
  191. package/dist/post-components/p-30f94eca.entry.js +1 -0
  192. package/dist/post-components/p-31bb6dc5.entry.js +1 -0
  193. package/dist/post-components/p-32173742.js +1 -0
  194. package/dist/post-components/p-338a2507.js +1 -0
  195. package/dist/post-components/p-36540dd6.entry.js +1 -0
  196. package/dist/post-components/p-3aa766a6.js +1 -0
  197. package/dist/post-components/p-3b0158b3.js +1 -0
  198. package/dist/post-components/p-40db8cd5.js +1 -0
  199. package/dist/post-components/p-44f13ce4.entry.js +1 -0
  200. package/dist/post-components/p-46a9324f.entry.js +1 -0
  201. package/dist/post-components/p-49c5aa99.js +1 -0
  202. package/dist/post-components/p-4cd4a936.entry.js +1 -0
  203. package/dist/post-components/p-548ef2f5.entry.js +1 -0
  204. package/dist/post-components/p-58f453dd.js +1 -0
  205. package/dist/post-components/p-5f54b77f.js +1 -0
  206. package/dist/post-components/p-60bb7f26.js +1 -0
  207. package/dist/post-components/p-60bfa4be.entry.js +1 -0
  208. package/dist/post-components/p-6b31a76a.js +1 -0
  209. package/dist/post-components/p-6ee81c5d.js +1 -0
  210. package/dist/post-components/p-6faad212.entry.js +1 -0
  211. package/dist/post-components/p-722ffaae.js +1 -0
  212. package/dist/post-components/p-74a0b44c.entry.js +1 -0
  213. package/dist/post-components/{p-28e77ad3.js → p-78b4c699.js} +1 -1
  214. package/dist/post-components/p-7aa0468b.entry.js +1 -0
  215. package/dist/post-components/p-7afc495e.entry.js +1 -0
  216. package/dist/post-components/p-8db32dab.js +8 -0
  217. package/dist/post-components/p-96034ba4.entry.js +1 -0
  218. package/dist/post-components/p-9aaf9f54.js +1 -0
  219. package/dist/post-components/{p-5c758f41.js → p-9e461613.js} +1 -1
  220. package/dist/post-components/p-ab4073be.js +1 -0
  221. package/dist/post-components/p-abd7eb91.js +8 -0
  222. package/dist/post-components/p-afb8a487.entry.js +1 -0
  223. package/dist/post-components/p-b003b381.js +1 -0
  224. package/dist/post-components/p-b97dea1e.entry.js +1 -0
  225. package/dist/post-components/p-be37cf2a.js +1 -0
  226. package/dist/post-components/p-c31b56ed.js +1 -0
  227. package/dist/post-components/p-ccbb51fe.js +1 -0
  228. package/dist/post-components/p-d3900385.entry.js +1 -0
  229. package/dist/post-components/p-ef49153c.entry.js +1 -0
  230. package/dist/post-components/p-f27e5691.js +1 -0
  231. package/dist/post-components/p-f553019f.entry.js +1 -0
  232. package/dist/post-components/p-ffc1db17.entry.js +1 -0
  233. package/dist/post-components/post-components.esm.js +1 -1
  234. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  235. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +3 -1
  236. package/dist/types/components/post-card-control/post-card-control.d.ts +1 -1
  237. package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +9 -14
  238. package/dist/types/components/post-footer/post-footer.d.ts +2 -2
  239. package/dist/types/components/post-header/post-header.d.ts +1 -0
  240. package/dist/types/components/post-icon/post-icon.d.ts +0 -1
  241. package/dist/types/components/post-language-switch/post-language-switch.d.ts +5 -5
  242. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +14 -39
  243. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +2 -0
  244. package/dist/types/components/post-menu/post-menu.d.ts +1 -0
  245. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -1
  246. package/dist/types/components/post-popover/post-popover.d.ts +3 -1
  247. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  248. package/dist/types/components/post-tooltip/post-tooltip.d.ts +6 -1
  249. package/dist/types/components.d.ts +4 -4
  250. package/dist/types/popover-fn.d.ts +11 -0
  251. package/dist/types/utils/environment.d.ts +2 -0
  252. package/dist/types/utils/event-guard.d.ts +4 -0
  253. package/dist/types/utils/get-root.d.ts +4 -0
  254. package/dist/types/utils/index.d.ts +5 -0
  255. package/loaders/attribute-observer.js +3 -1
  256. package/loaders/breakpoints.js +12 -8
  257. package/loaders/event-guard.js +45 -0
  258. package/loaders/get-root.js +7 -1
  259. package/loaders/index.js +3 -3
  260. package/loaders/long-press-event.js +264 -0
  261. package/loaders/package.js +1 -1
  262. package/loaders/post-accordion-item2.js +8 -8
  263. package/loaders/post-accordion.js +8 -10
  264. package/loaders/post-avatar.js +4 -3
  265. package/loaders/post-back-to-top.js +40 -20
  266. package/loaders/post-banner.js +2 -6
  267. package/loaders/post-breadcrumb-item2.js +2 -2
  268. package/loaders/post-breadcrumb.js +28 -20
  269. package/loaders/post-card-control.js +25 -39
  270. package/loaders/post-closebutton.js +8 -3
  271. package/loaders/post-collapsible-trigger2.js +33 -35
  272. package/loaders/post-collapsible2.js +9 -12
  273. package/loaders/post-footer.js +8 -8
  274. package/loaders/post-header.js +18 -20
  275. package/loaders/post-icon2.js +6 -6
  276. package/loaders/post-language-option.js +3 -10
  277. package/loaders/post-language-switch.js +28 -31
  278. package/loaders/post-linkarea.js +5 -4
  279. package/loaders/post-list-item.js +2 -2
  280. package/loaders/post-list.js +2 -3
  281. package/loaders/post-logo.js +3 -2
  282. package/loaders/post-mainnavigation.js +94 -182
  283. package/loaders/post-megadropdown-trigger.js +44 -36
  284. package/loaders/post-megadropdown.js +22 -31
  285. package/loaders/post-menu-trigger2.js +15 -15
  286. package/loaders/post-menu2.js +53 -52
  287. package/loaders/post-popover.js +14 -12
  288. package/loaders/post-popovercontainer2.js +638 -36
  289. package/loaders/post-rating.js +2 -12
  290. package/loaders/post-tab-header.js +4 -3
  291. package/loaders/post-tab-panel.js +3 -3
  292. package/loaders/post-tabs.js +3 -10
  293. package/loaders/post-tag.js +1 -1
  294. package/loaders/post-togglebutton.js +12 -11
  295. package/loaders/post-tooltip.js +37 -294
  296. package/package.json +5 -5
  297. package/dist/cjs/debounce-158fd76f.js +0 -13
  298. package/dist/cjs/get-root-7a3498ef.js +0 -11
  299. package/dist/cjs/post-back-to-top-6a1c1ba4.js +0 -76
  300. package/dist/components/debounce.js +0 -11
  301. package/dist/esm/debounce-e54c7131.js +0 -11
  302. package/dist/esm/get-root-7af2e0d1.js +0 -9
  303. package/dist/esm/package-70367d05.js +0 -3
  304. package/dist/esm/post-back-to-top-abe253c1.js +0 -74
  305. package/dist/post-components/p-015361b5.entry.js +0 -1
  306. package/dist/post-components/p-077edb8c.js +0 -1
  307. package/dist/post-components/p-08a13d05.js +0 -1
  308. package/dist/post-components/p-08c3b919.entry.js +0 -1
  309. package/dist/post-components/p-0d7b0c2e.entry.js +0 -1
  310. package/dist/post-components/p-12f9a91e.entry.js +0 -1
  311. package/dist/post-components/p-20137c6a.entry.js +0 -1
  312. package/dist/post-components/p-21254d9c.entry.js +0 -1
  313. package/dist/post-components/p-22513a27.entry.js +0 -1
  314. package/dist/post-components/p-3638e50d.js +0 -1
  315. package/dist/post-components/p-4397f28e.js +0 -1
  316. package/dist/post-components/p-494a2a31.js +0 -1
  317. package/dist/post-components/p-509987da.entry.js +0 -1
  318. package/dist/post-components/p-5aeb3656.js +0 -1
  319. package/dist/post-components/p-5d0bb74d.js +0 -1
  320. package/dist/post-components/p-5e0f6c12.js +0 -1
  321. package/dist/post-components/p-5f89f4e8.entry.js +0 -1
  322. package/dist/post-components/p-6213f0dc.entry.js +0 -1
  323. package/dist/post-components/p-6ad7bf0f.js +0 -1
  324. package/dist/post-components/p-6f058a98.js +0 -1
  325. package/dist/post-components/p-737d76cb.js +0 -15
  326. package/dist/post-components/p-753a1935.js +0 -1
  327. package/dist/post-components/p-88a2cdaa.js +0 -1
  328. package/dist/post-components/p-90935fdd.js +0 -1
  329. package/dist/post-components/p-931c4523.js +0 -1
  330. package/dist/post-components/p-9748a355.js +0 -1
  331. package/dist/post-components/p-97865e22.entry.js +0 -1
  332. package/dist/post-components/p-a200c9c7.js +0 -1
  333. package/dist/post-components/p-a35c235a.entry.js +0 -1
  334. package/dist/post-components/p-a4264a61.entry.js +0 -1
  335. package/dist/post-components/p-a54c63d0.entry.js +0 -1
  336. package/dist/post-components/p-aebe402d.entry.js +0 -1
  337. package/dist/post-components/p-b43e79e3.entry.js +0 -1
  338. package/dist/post-components/p-c0c71e37.js +0 -1
  339. package/dist/post-components/p-c0ca344d.js +0 -1
  340. package/dist/post-components/p-c554fcf3.js +0 -1
  341. package/dist/post-components/p-cff7c06f.entry.js +0 -1
  342. package/dist/post-components/p-d1f70a05.entry.js +0 -1
  343. package/dist/post-components/p-dc67e6de.entry.js +0 -1
  344. package/dist/post-components/p-e1baac59.js +0 -1
  345. package/dist/post-components/p-f1ceccf3.js +0 -1
  346. package/dist/post-components/p-fc91cbc2.js +0 -1
  347. package/loaders/debounce.js +0 -11
@@ -1,68 +1,62 @@
1
- import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
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 checkType } from './check-type.js';
4
4
  import { c as checkNonEmpty } from './check-non-empty.js';
5
- import { d as debounce } from './debounce.js';
5
+ import './breakpoints.js';
6
+ import { e as eventGuard } from './event-guard.js';
6
7
  import { g as getRoot } from './get-root.js';
7
8
 
8
9
  const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollapsibleTrigger extends HTMLElement {
9
10
  constructor() {
10
11
  super();
11
12
  this.__registerHost();
13
+ this.__attachShadow();
14
+ this.observer = new MutationObserver(() => this.setTrigger());
12
15
  this.for = undefined;
13
16
  }
14
- trigger;
15
- observer = new MutationObserver(() => this.setTrigger());
16
- root;
17
- get host() { return this; }
18
17
  /**
19
18
  * Set the "aria-controls" and "aria-expanded" attributes on the trigger to match the state of the controlled post-collapsible
20
19
  */
21
- setAriaAttributes() {
20
+ validateAriaAttributes() {
22
21
  checkNonEmpty(this, 'for');
23
22
  checkType(this, 'for', 'string', 'The post-collapsible-trigger "for" prop should be a id.');
24
- void this.update();
25
23
  }
26
24
  /**
27
25
  * Initiate a mutation observer that updates the trigger whenever necessary
28
26
  */
29
27
  connectedCallback() {
30
- this.observer.observe(this.host, { childList: true, subtree: true });
31
- }
32
- /**
33
- * Attach a "postToggle" event listener to the root node
34
- * to update the trigger's "aria-expanded" attribute whenever the controlled post-collapsible is toggled
35
- */
36
- componentWillLoad() {
37
28
  this.root = getRoot(this.host);
38
- this.root.addEventListener('postToggle', (e) => {
39
- if (!this.trigger || !e.target.isEqualNode(this.collapsible))
40
- return;
41
- this.trigger.setAttribute('aria-expanded', `${e.detail}`);
42
- });
29
+ this.root.addEventListener('postToggle', this.handlePostToggle);
30
+ this.observer.observe(this.host, { childList: true, subtree: true });
43
31
  }
44
- /**
45
- * Add the "data-version" to the host element and set the trigger
46
- */
47
32
  componentDidLoad() {
48
- this.host.setAttribute('data-version', version);
49
33
  this.setTrigger();
50
34
  if (!this.trigger)
51
35
  console.warn('The post-collapsible-trigger must contain a button.');
36
+ this.validateAriaAttributes();
52
37
  }
53
- /**
54
- * Disconnect the mutation observer
55
- */
56
38
  disconnectedCallback() {
57
39
  this.observer.disconnect();
40
+ this.root.removeEventListener('postToggle', this.handlePostToggle);
58
41
  }
59
42
  /**
60
43
  * Update the "aria-controls" and "aria-expanded" attributes on the trigger button
61
44
  */
62
45
  async update() {
63
- this.debouncedUpdate();
46
+ this.updateAriaAttributes();
64
47
  }
65
- debouncedUpdate = debounce(() => {
48
+ /**
49
+ * Private handler for the 'postToggle' event.
50
+ * This updates the trigger's "aria-expanded" attribute based on the event detail.
51
+ */
52
+ handlePostToggle(e) {
53
+ eventGuard(this.host, e, { targetLocalName: 'post-collapsible' }, () => {
54
+ if (this.trigger) {
55
+ this.trigger.setAttribute('aria-expanded', `${e.detail}`);
56
+ }
57
+ });
58
+ }
59
+ updateAriaAttributes() {
66
60
  if (!this.trigger)
67
61
  return;
68
62
  // add the provided id to the aria-controls list
@@ -75,7 +69,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
75
69
  const isCollapsed = this.collapsible?.collapsed;
76
70
  const newAriaExpanded = isCollapsed !== undefined ? !isCollapsed : undefined;
77
71
  this.trigger.setAttribute('aria-expanded', `${newAriaExpanded}`);
78
- });
72
+ }
79
73
  /**
80
74
  * Toggle the post-collapsible controlled by the trigger
81
75
  */
@@ -101,16 +95,20 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
101
95
  return;
102
96
  this.trigger = trigger;
103
97
  this.trigger.addEventListener('click', () => this.toggleCollapsible());
104
- this.setAriaAttributes();
98
+ this.updateAriaAttributes();
105
99
  }
100
+ render() {
101
+ return (h(Host, { key: 'cd703fe34b8c82afc5956b58724d36b06054bc0b', "data-version": version }, h("slot", { key: '5abe4ba2b8922b941cc8aebbc7039e34e1853855' })));
102
+ }
103
+ get host() { return this; }
106
104
  static get watchers() { return {
107
- "for": ["setAriaAttributes"]
105
+ "for": ["validateAriaAttributes"]
108
106
  }; }
109
- }, [0, "post-collapsible-trigger", {
110
- "for": [1],
107
+ }, [1, "post-collapsible-trigger", {
108
+ "for": [513],
111
109
  "update": [64]
112
110
  }, undefined, {
113
- "for": ["setAriaAttributes"]
111
+ "for": ["validateAriaAttributes"]
114
112
  }]);
115
113
  function defineCustomElement() {
116
114
  if (typeof customElements === "undefined") {
@@ -1,9 +1,10 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
+ import { I as IS_BROWSER } from './breakpoints.js';
3
4
  import { c as checkEmptyOrType } from './index2.js';
4
5
 
5
6
  function isMotionReduced() {
6
- return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
7
+ return IS_BROWSER ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : false;
7
8
  }
8
9
 
9
10
  const collapseDuration = 350;
@@ -15,7 +16,8 @@ const animationOptions = {
15
16
  fill: 'forwards',
16
17
  };
17
18
  function collapse(el) {
18
- const expandedKeyframe = { height: window.getComputedStyle(el).height };
19
+ const elHeight = IS_BROWSER ? window.getComputedStyle(el).height : `${el.scrollHeight}px`;
20
+ const expandedKeyframe = { height: elHeight };
19
21
  return el.animate([expandedKeyframe, collapsedKeyframe], animationOptions);
20
22
  }
21
23
  function expand(el) {
@@ -33,21 +35,14 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
33
35
  this.__registerHost();
34
36
  this.__attachShadow();
35
37
  this.postToggle = createEvent(this, "postToggle", 7);
38
+ this.isLoaded = false;
39
+ this.isOpen = true;
36
40
  this.collapsed = false;
37
41
  }
38
- isLoaded = false;
39
- isOpen = true;
40
- get host() { return this; }
41
42
  collapsedChange() {
42
43
  checkEmptyOrType(this, 'collapsed', 'boolean');
43
44
  void this.toggle(!this.collapsed);
44
45
  }
45
- /**
46
- * An event emitted when the collapse element is shown or hidden, before the transition.
47
- *
48
- * The event payload is a boolean: `true` if the collapsible was opened, `false` if it was closed.
49
- */
50
- postToggle;
51
46
  componentDidLoad() {
52
47
  this.collapsedChange();
53
48
  this.isLoaded = true;
@@ -72,6 +67,7 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
72
67
  const isHostRendered = this.host.offsetParent;
73
68
  if (isHostRendered)
74
69
  animation.commitStyles();
70
+ this.updateTriggers();
75
71
  return open;
76
72
  }
77
73
  /**
@@ -82,8 +78,9 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
82
78
  triggers.forEach(trigger => trigger.update());
83
79
  }
84
80
  render() {
85
- return (h(Host, { key: 'a43e25138933a758759b4adcca249757db75cc4b', "data-version": version, tabindex: this.collapsed ? -1 : undefined }, h("slot", { key: '2936f71a6fb3ddedda372e8da4a19dbceecaefa6' })));
81
+ return (h(Host, { key: 'a678bc639dfd7686d8e1bd57ca0f09984a24ab61', "data-version": version, tabindex: this.collapsed ? -1 : undefined }, h("slot", { key: 'e0b88ac152fa09314b4bc01c9abdb11480e2cb4d' })));
86
82
  }
83
+ get host() { return this; }
87
84
  static get watchers() { return {
88
85
  "collapsed": ["collapsedChange"]
89
86
  }; }
@@ -14,15 +14,17 @@ const PostFooter$1 = /*@__PURE__*/ proxyCustomElement(class PostFooter extends H
14
14
  super();
15
15
  this.__registerHost();
16
16
  this.__attachShadow();
17
+ this.breakpointChange = (e) => {
18
+ this.isMobile = e.detail === 'mobile';
19
+ };
17
20
  this.label = undefined;
18
21
  this.isMobile = breakpoint.get('name') === 'mobile';
19
22
  }
20
- get host() { return this; }
21
23
  connectedCallback() {
22
- window.addEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
24
+ window.addEventListener('postBreakpoint:name', this.breakpointChange);
23
25
  }
24
- breakpointChange(e) {
25
- this.isMobile = e.detail === 'mobile';
26
+ disconnectedCallback() {
27
+ window.removeEventListener('postBreakpoint:name', this.breakpointChange);
26
28
  }
27
29
  renderAccordion() {
28
30
  return (h("div", { class: "footer-grid" }, h("post-accorddion", { "heading-level": "3", multiple: true }, h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-1-title" })), h("slot", { name: "grid-1" })), h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-2-title" })), h("slot", { name: "grid-2" })), h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-3-title" })), h("slot", { name: "grid-3" })), h("post-accordion-item", { collapsed: true }, h("span", { slot: "header" }, h("slot", { name: "grid-4-title" })), h("slot", { name: "grid-4" })))));
@@ -31,11 +33,9 @@ const PostFooter$1 = /*@__PURE__*/ proxyCustomElement(class PostFooter extends H
31
33
  return (h("div", { class: "footer-grid" }, h("div", null, h("slot", { name: "grid-1" })), h("div", null, h("slot", { name: "grid-2" })), h("div", null, h("slot", { name: "grid-3" })), h("div", null, h("slot", { name: "grid-4" }))));
32
34
  }
33
35
  render() {
34
- return (h(Host, { key: '14370a1cfd730a0b0353c88c95f265aefb57c480', "data-version": version }, h("footer", { key: '7208e9d465eb0b469887e7cfae66674db2092dbd' }, h("h2", { key: 'b392c866326374ae27704baaba0dd28c3001ee62', class: "visually-hidden" }, this.label), h("div", { key: '13411ad6e0b55ee17cf9bf77b155aa1c2810f057', class: "footer-container" }, this.isMobile ? this.renderAccordion() : this.renderGrid(), h("div", { key: '4815ae94cd43eca92482ad3c93f107243b26890e', class: "footer-column" }, h("div", { key: 'edc787dc5fc96169c323f15254b6088024a6f19d', class: "footer-socialmedia" }, h("slot", { key: '0971e342ac6f3913c408a535ce0746080e3f57af', name: "socialmedia" })), h("div", { key: 'da583c9ed819181bf2732277f4e6ee22df2e3022', class: "footer-app" }, h("slot", { key: 'b6dab5cfa1f4dc9c049f24d3e08416ef5a27e0aa', name: "app" }))), h("div", { key: '53a5c04129d24dfb64eedd46e95b5c78142a3fd7', class: "footer-businesssectors" }, h("slot", { key: '470f4294778b8978bf6eb168e2b47ff29ef43d07', name: "businesssectors" })), h("div", { key: '45d734ded794352b951f2891bbdba081e05a99d5', class: "footer-meta" }, h("slot", { key: '4d0da53c2eb79e111f0f05278a0972f046eebfa9', name: "meta" })), h("div", { key: 'f95fb7ed3cc09218a3d4a554c619b6f379d5135d', class: "footer-copyright" }, h("slot", { key: '9cdcec805152413693dced0f0d55ac1b1121c70e', name: "copyright" }))))));
35
- }
36
- disconnectedCallback() {
37
- window.removeEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
36
+ return (h(Host, { key: '4058ba0a63a666b82d274d1c35397c97d280ba49', "data-version": version }, h("footer", { key: '27adf1e2a1439fd69efd6e571fcdd6851304c92a' }, h("h2", { key: '1ca0cd955ec5e6d315521eb5c28c5963ed44856d', class: "visually-hidden" }, this.label), h("div", { key: '27a6f520dee9d6294fa3cd4ebc6fd5062ac327ce', class: "footer-container" }, this.isMobile ? this.renderAccordion() : this.renderGrid(), h("div", { key: '5607004d5e3ea553a86d476ca459b3b3632ef12d', class: "footer-column" }, h("div", { key: 'cd4727970358ffad4ca28fffaccc8a5eab4dec27', class: "footer-socialmedia" }, h("slot", { key: '92e105af21b69640a07c2d35c24bff6aae84abb6', name: "socialmedia" })), h("div", { key: '904b787df3f192593408d99857e213143cec6706', class: "footer-app" }, h("slot", { key: '2f4ab14e20737c6035c175e58982464fe6987724', name: "app" }))), h("div", { key: 'c85b261b4ae0cb1e27f424f460fa2838e1174fb0', class: "footer-businesssectors" }, h("slot", { key: 'c66baa3a1b689d881db68448b9d72d47acd11c7c', name: "businesssectors" })), h("div", { key: '4eebc88279f29eef028766c1fcb90effc1aaf1ca', class: "footer-meta" }, h("slot", { key: 'd689d7c14af01dc13c7f9f0fd170f3974150b9aa', name: "meta" })), h("div", { key: '36f87386755a4ae1186109b46609c6ad9c1d5041', class: "footer-copyright" }, h("slot", { key: 'c37231f795b1a5a407f83aeaf8a8b093713b8db1', name: "copyright" }))))));
38
37
  }
38
+ get host() { return this; }
39
39
  static get style() { return PostFooterStyle0; }
40
40
  }, [1, "post-footer", {
41
41
  "label": [1],
@@ -2,6 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { v as version } from './package.js';
3
3
  import { a as slideUp, s as slideDown } from './slide.js';
4
4
  import { g as getFocusableChildren } from './get-focusable-children.js';
5
+ import { e as eventGuard } from './event-guard.js';
5
6
 
6
7
  /* eslint-disable no-undefined,no-param-reassign,no-shadow */
7
8
 
@@ -137,17 +138,10 @@ function throttle (delay, callback, options) {
137
138
  return wrapper;
138
139
  }
139
140
 
140
- const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative;--global-header-top:calc( (var(--global-header-height) - var(--global-header-reduced-height)) * -1 );--local-header-top:calc( -1 * (var(--local-header-height) - var(--main-navigation-height)) + var(--global-header-reduced-height) );--logo-height:calc(var(--global-header-height) - var(--header-scroll-top));--global-controls-top:calc(min((var(--header-scroll-top) / 4), 20px) * -1)}:host:has(.global-sub>*:not(.logo):focus-within),:host:has(.local-sub:focus-within){--global-header-top:0;--local-header-top:var(--global-header-height);--logo-height:var(--global-header-height);--global-controls-top:0}:host(:not(:has([slot=title]))) .local-header{padding-block-start:0}:host(:not(:has([slot=title]))) .local-sub{display:none}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--global-header-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:3;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:12px;inset-block-start:var(--global-header-top);transition:inset-block-start .2s ease-in-out}}.global-sub{display:flex;align-items:center;gap:24px}@media screen and (min-width: 1024px){.global-sub:not(:has(.logo)){position:relative;transition:inset-block-start .2s ease-in-out;inset-block-start:var(--global-controls-top)}}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--global-header-height);width:var(--global-header-height);min-height:var(--global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{transition:height .2 ease-in-out;height:var(--logo-height)}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-inline-start:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--local-header-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;inset-block-end:-1px;z-index:1}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:var(--local-header-top);padding-block-start:18px;box-shadow:var(--post-device-elevation-300);transition:box-shadow .2s ease-in-out,inset-block-start .2s ease-in-out}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--global-header-height);padding-block:12px;flex-wrap:wrap;gap:16px}.local-header.local-header-mobile-extended::after{inset-block-end:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-sub{margin-inline-end:8px}@media screen and (max-width: 1023.98px){.local-sub{margin-inline-end:4px}}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:sticky;z-index:1;inset-inline:0;inset-block-start:var(--header-height)}.mobile-menu{background-color:#fafafa}::slotted(post-mainnavigation),.navigation-footer{display:none;flex-direction:column;padding-block:16px 24px;padding-inline:32px}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer{display:flex}.navigation.extended>div{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:calc(min(var(--header-scroll-parent-height, 100dvh),100dvh) - var(--header-height))}.navigation.extended.megadropdown-open>div{overflow-y:hidden}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}::slotted(post-mainnavigation){gap:32px}.navigation-footer{background-color:#f0efed;gap:24px}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:16px}}";
141
+ const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative;--global-header-top:calc( (var(--post-global-header-height) - var(--post-global-header-reduced-height)) * -1 );--local-header-top:calc( -1 * (var(--post-local-header-height) - var(--post-main-navigation-height)) + var(--post-global-header-reduced-height) );--logo-height:calc(var(--post-global-header-height) - var(--post-header-scroll-top, 0px));--global-controls-top:calc(min((var(--post-header-scroll-top) / 4), 20px) * -1)}:host:has(.global-sub>*:not(.logo):focus-within),:host:has(.local-sub:focus-within){--global-header-top:0;--local-header-top:var(--post-global-header-height);--logo-height:var(--post-global-header-height);--global-controls-top:0}:host(:not(:has([slot=title]))) .local-header{padding-block-start:0}:host(:not(:has([slot=title]))) .local-sub{display:none}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--post-global-header-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:3;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:12px;inset-block-start:var(--global-header-top);transition:inset-block-start .2s ease-in-out}}.global-sub{display:flex;align-items:center;gap:24px}@media screen and (min-width: 1024px){.global-sub:not(:has(.logo)){position:relative;transition:inset-block-start .2s ease-in-out;inset-block-start:var(--global-controls-top)}}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--post-global-header-height);width:var(--post-global-header-height);min-height:var(--post-global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{transition:height .2 ease-in-out;height:var(--logo-height)}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-inline-start:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--post-local-header-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;inset-block-end:-1px;z-index:1}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:var(--local-header-top);padding-block-start:18px;box-shadow:var(--post-device-elevation-300);transition:box-shadow .2s ease-in-out,inset-block-start .2s ease-in-out}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--post-global-header-height);padding-block:8px;flex-wrap:wrap;gap:12px}.local-header.local-header-mobile-extended::after{inset-block-end:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-sub{margin-inline-end:8px}@media screen and (max-width: 1023.98px){.local-sub{margin-inline-end:4px}}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--post-global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:sticky;z-index:1;inset-inline:0;inset-block-start:var(--post-header-height)}.mobile-menu{background-color:#fafafa}::slotted(post-mainnavigation),.navigation-footer{display:none;flex-direction:column;padding-block:16px 24px;padding-inline:32px}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer{display:flex}.navigation.extended>div{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;height:calc(min(var(--header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height))}.navigation.extended.megadropdown-open>div{overflow-y:hidden}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}::slotted(post-mainnavigation){gap:32px}.navigation-footer{background-color:#f0efed;gap:24px}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:16px}}";
141
142
  const PostHeaderStyle0 = postHeaderCss;
142
143
 
143
144
  const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
144
- firstFocusableEl;
145
- lastFocusableEl;
146
- mobileMenu;
147
- mobileMenuAnimation;
148
- throttledResize = throttle(50, () => this.handleResize());
149
- scrollParentResizeObserver;
150
- localHeaderResizeObserver;
151
145
  get scrollParent() {
152
146
  const frozenScrollParent = document.querySelector('[data-post-scroll-locked]');
153
147
  if (frozenScrollParent)
@@ -162,7 +156,6 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
162
156
  }
163
157
  return document.body;
164
158
  }
165
- get host() { return this; }
166
159
  lockBody(newValue, _oldValue, propName) {
167
160
  const scrollParent = this.scrollParent;
168
161
  const mobileMenuExtended = propName === 'mobileMenuExtended' ? newValue : this.mobileMenuExtended;
@@ -175,15 +168,20 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
175
168
  this.host.removeEventListener('keydown', this.keyboardHandler);
176
169
  }
177
170
  }
178
- /**
179
- * An event emitted when the device has changed
180
- */
181
- postUpdateDevice;
182
171
  constructor() {
183
172
  super();
184
173
  this.__registerHost();
185
174
  this.__attachShadow();
186
175
  this.postUpdateDevice = createEvent(this, "postUpdateDevice", 7);
176
+ this.throttledResize = throttle(50, () => this.handleResize());
177
+ this.megedropdownStateHandler = (event) => {
178
+ eventGuard(this.host, event, {
179
+ targetLocalName: 'post-megadropdown',
180
+ delegatorSelector: 'post-header',
181
+ }, () => {
182
+ this.megadropdownOpen = event.detail.isVisible;
183
+ });
184
+ };
187
185
  this.device = null;
188
186
  this.mobileMenuExtended = false;
189
187
  this.megadropdownOpen = false;
@@ -205,10 +203,12 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
205
203
  document.addEventListener('postToggleMegadropdown', this.megedropdownStateHandler);
206
204
  this.host.addEventListener('click', this.handleLinkClick);
207
205
  this.handleResize();
208
- this.handleScrollEvent();
209
206
  this.handleScrollParentResize();
210
207
  this.lockBody(false, this.mobileMenuExtended, 'mobileMenuExtended');
211
208
  }
209
+ componentWillRender() {
210
+ this.handleScrollEvent();
211
+ }
212
212
  componentDidRender() {
213
213
  this.getFocusableElements();
214
214
  this.handleLocalHeaderResize();
@@ -254,9 +254,6 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
254
254
  });
255
255
  }
256
256
  }
257
- megedropdownStateHandler(event) {
258
- this.megadropdownOpen = event.detail.isVisible;
259
- }
260
257
  // Get all the focusable elements in the post-header mobile menu
261
258
  getFocusableElements() {
262
259
  // Get elements in the correct order (different as the DOM order)
@@ -289,11 +286,11 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
289
286
  }
290
287
  handleScrollEvent() {
291
288
  const scrollTop = this.scrollParent === document.body ? window.scrollY : this.scrollParent.scrollTop;
292
- this.host.style.setProperty('--header-scroll-top', `${scrollTop}px`);
289
+ document.documentElement.style.setProperty('--post-header-scroll-top', `${scrollTop}px`);
293
290
  }
294
291
  updateLocalHeaderHeight() {
295
292
  const localHeaderHeight = this.host.shadowRoot.querySelector('.local-header')?.clientHeight || 0;
296
- this.host.style.setProperty('--local-header-height', `${localHeaderHeight}px`);
293
+ document.documentElement.style.setProperty('--post-local-header-height', `${localHeaderHeight}px`);
297
294
  }
298
295
  updateScrollParentHeight() {
299
296
  this.host.style.setProperty('--header-scroll-parent-height', `${this.scrollParent.clientHeight}px`);
@@ -368,8 +365,9 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
368
365
  return (h("div", { class: navigationClasses.join(' '), style: { '--header-navigation-current-inset': `${mobileMenuScrollTop}px` } }, h("div", { class: "mobile-menu", ref: el => (this.mobileMenu = el) }, h("slot", { name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("div", { class: "navigation-footer" }, h("slot", { name: "meta-navigation" }), h("slot", { name: "post-language-switch" }))))));
369
366
  }
370
367
  render() {
371
- return (h(Host, { key: '1cc6cb8fb53d744a3e857b39fe6d59dcc52616f6', version: version }, h("div", { key: 'f2b0993095d6173cd6e6652f68a6d86cccaca0cf', class: "global-header" }, h("div", { key: '3199a8bfe40e617b9aa41235a836b0346afe3f5f', class: "global-sub" }, h("div", { key: 'acf05b7b78ca758b75b4c999a262506dc43b1692', class: "logo" }, h("slot", { key: '21d50a2e983f3572ce33828fd69a3eff01983206', name: "post-logo" }))), h("div", { key: '7222c559dca81ae94b18a5a88825169fa05b887e', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '4948c8d13318987f9c419ac73d901e558f763d0d', name: "meta-navigation" }), h("slot", { key: '2a10e4dc73716b3fd39fd9fb534678c6203f60e3', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '5786dcda4ca017500916ea4c9da604da46a0e2f5', name: "post-language-switch" }), h("div", { key: 'a2326d26003bb8101dc0236426b26f1f11bdd9df', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: 'e75d428c8a5644bcd979607de1ca85ad435e096d', name: "post-togglebutton" })))), h("div", { key: 'c40d1e10ce6e13e2cae5f8395ad9281dce50975e', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: 'e37002ea2d9d74fdfa0773cb2ca90f7e9560f193', name: "title" }), h("div", { key: 'fe1e158e00458d1232c5b0e9ae22c63e77b25ac6', class: "local-sub" }, h("slot", { key: '4b504f9652a403cf89b0a371a803251923758155', name: "local-controls" }), h("slot", { key: 'c02b89240f8df106f138bc14312031511c5462f6' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
368
+ return (h(Host, { key: 'd8b43333c00a612a3a37479750874a1efaf6a855', "data-version": version }, h("div", { key: 'b270fb139cc8730a774785c5535fb3bcdd60c59c', class: "global-header" }, h("div", { key: 'b3161c4b26a1be4707fa6c7360e6779547b7ab30', class: "global-sub" }, h("div", { key: '44ecddd8f91c86d1af0075718b63e6bf034a25b7', class: "logo" }, h("slot", { key: 'de5208255d0cf59707092c984b0fec33d317d38d', name: "post-logo" }))), h("div", { key: '199dc1da25d817b488d5c3402779130c360e0f9a', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '1337f13908a826022a1bf2a8a1a2e2bfe323900b', name: "meta-navigation" }), h("slot", { key: '2b6fbbcedc8f1803e388fdbcbcd637d6a2605c87', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '2861c1a0f7639678edd0f584d8f98665fcf84fb0', name: "post-language-switch" }), h("div", { key: '06e2d9a4abe3a804f25ffa303f6f9ed5b7c01b60', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '772407e65d3d8f642c1e80fd8cb42b425eed4848', name: "post-togglebutton" })))), h("div", { key: '7b7a3da2a8cc848632c2e45badc52e23958a6faa', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '96e4d68bfe0504cc09d57a8b11dabb9139d780f6', name: "title" }), h("div", { key: '240fae6f0f9d2a192a7b94110a9c4571856de90a', class: "local-sub" }, h("slot", { key: '14fd77af7dca02157248bf95d7d253d5f14e9f1e', name: "local-controls" }), h("slot", { key: '6dfac25cb64401123638ddfc6b94bbe89ae78249' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
372
369
  }
370
+ get host() { return this; }
373
371
  static get watchers() { return {
374
372
  "device": ["lockBody"],
375
373
  "mobileMenuExtended": ["lockBody"]
@@ -1,4 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { I as IS_BROWSER } from './breakpoints.js';
2
3
  import { b as checkEmptyOrOneOf, c as checkEmptyOrType } from './index2.js';
3
4
  import { v as version } from './package.js';
4
5
  import { c as checkNonEmpty } from './check-non-empty.js';
@@ -7,7 +8,7 @@ import { c as checkType } from './check-type.js';
7
8
  const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
8
9
  const PostIconStyle0 = postIconCss;
9
10
 
10
- const CDN_URL = 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons/';
11
+ const CDN_URL = `https://unpkg.com/@swisspost/design-system-icons@${version}/public/post-icons/`;
11
12
  const ANIMATION_NAMES = [
12
13
  'cylon',
13
14
  'cylon-vertical',
@@ -30,8 +31,6 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
30
31
  this.rotate = null;
31
32
  this.scale = null;
32
33
  }
33
- isSSR = typeof window === 'undefined';
34
- get host() { return this; }
35
34
  validateAnimation(newValue = this.animation) {
36
35
  if (newValue !== undefined)
37
36
  checkEmptyOrOneOf(this, 'animation', ANIMATION_KEYS);
@@ -62,7 +61,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
62
61
  // the first definition object which defines a domain, will be used to set the domain of the file url
63
62
  // the first definition object which defines a slug, will be used to set the slug of the file url
64
63
  const urlDefinitions = [this.getUrlDefinition(this.base, 'both')];
65
- if (!this.isSSR) {
64
+ if (IS_BROWSER) {
66
65
  urlDefinitions.push(this.getUrlDefinition(document.head
67
66
  .querySelector('meta[name="design-system-settings"][data-post-icon-base]')
68
67
  ?.getAttribute('data-post-icon-base'), 'relative'));
@@ -126,8 +125,9 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
126
125
  this.validateAnimation();
127
126
  }
128
127
  render() {
129
- return (h(Host, { key: 'c80aaf693f730902c4ae57ca78360eee5dedf624', "data-version": version }, h("span", { key: '7e01e1cf7e4fec380e8f054d3cc8fa5404c7a829', style: this.getStyles() })));
128
+ return (h(Host, { key: 'b3c3efcc03f423a248e231b4b4c5d79c93ae25a6', "data-version": version }, h("span", { key: 'd73d4df11fcccb96d5346f3f8c3e18602bb8d484', style: this.getStyles() })));
130
129
  }
130
+ get host() { return this; }
131
131
  static get watchers() { return {
132
132
  "animation": ["validateAnimation"],
133
133
  "base": ["validateBase"],
@@ -143,7 +143,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
143
143
  "base": [1],
144
144
  "flipH": [4, "flip-h"],
145
145
  "flipV": [4, "flip-v"],
146
- "name": [1],
146
+ "name": [513],
147
147
  "rotate": [2],
148
148
  "scale": [2]
149
149
  }, undefined, {
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as checkEmptyOrType } from './index2.js';
3
+ import './breakpoints.js';
3
4
  import { v as version } from './package.js';
4
5
  import { c as checkType } from './check-type.js';
5
6
 
@@ -18,7 +19,6 @@ const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
18
19
  this.name = undefined;
19
20
  this.url = undefined;
20
21
  }
21
- get host() { return this; }
22
22
  validateCode() {
23
23
  checkType(this, 'code', 'string');
24
24
  }
@@ -43,14 +43,6 @@ const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
43
43
  this.postLanguageOptionInitiallyActive.emit(this.code);
44
44
  }
45
45
  }
46
- /**
47
- * An event emitted when the language option is clicked. The payload is the ISO 639 code of the language.
48
- */
49
- postChange;
50
- /**
51
- * An event emitted when the language option is initially active. The payload is the ISO 639 code of the language.
52
- */
53
- postLanguageOptionInitiallyActive;
54
46
  /**
55
47
  * Selects the language option programmatically.
56
48
  */
@@ -71,8 +63,9 @@ const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
71
63
  this.emitChange();
72
64
  }
73
65
  };
74
- return (h(Host, { key: '404caa6a507637810b672c5decf4e3af300733ac', "data-version": version }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, "aria-label": this.name, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null))) : (h("button", { "aria-current": this.active ? 'true' : undefined, "aria-label": this.name, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null)))));
66
+ return (h(Host, { key: '3a6b9a8f63c90f431a13c1df529a2e4716ede5d8', "data-version": version }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, "aria-label": this.name, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null))) : (h("button", { "aria-current": this.active ? 'true' : undefined, "aria-label": this.name, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null)))));
75
67
  }
68
+ get host() { return this; }
76
69
  static get watchers() { return {
77
70
  "code": ["validateCode"],
78
71
  "active": ["validateActiveProp"],
@@ -1,5 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { b as checkEmptyOrOneOf } from './index2.js';
3
+ import './breakpoints.js';
4
+ import { e as eventGuard } from './event-guard.js';
3
5
  import { v as version } from './package.js';
4
6
  import { n as nanoid } from './index.browser.js';
5
7
  import { d as defineCustomElement$5 } from './post-icon2.js';
@@ -10,7 +12,7 @@ import { c as checkType } from './check-type.js';
10
12
 
11
13
  const SWITCH_VARIANTS = ['list', 'menu'];
12
14
 
13
- const postLanguageSwitchCss = ":host{display:flex !important;flex-wrap:wrap;gap:.5rem}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;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;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 12px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}";
15
+ const postLanguageSwitchCss = ":host{display:flex !important;flex-wrap:wrap;gap:.5rem}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;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;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}";
14
16
  const PostLanguageSwitchStyle0 = postLanguageSwitchCss;
15
17
 
16
18
  const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguageSwitch extends HTMLElement {
@@ -18,12 +20,15 @@ const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
18
20
  super();
19
21
  this.__registerHost();
20
22
  this.__attachShadow();
23
+ this.menuId = `p${nanoid(11)}`;
21
24
  this.caption = undefined;
22
25
  this.description = undefined;
23
26
  this.variant = 'list';
24
27
  this.activeLang = undefined;
25
28
  }
26
- get host() { return this; }
29
+ get languageOptions() {
30
+ return Array.from(this.host.querySelectorAll('post-language-option'));
31
+ }
27
32
  validateCaption() {
28
33
  checkType(this, 'caption', 'string');
29
34
  }
@@ -41,24 +46,28 @@ const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
41
46
  // Initially set variants and active language
42
47
  // Handles cases where the language-switch is rendered after the language-options have been rendered
43
48
  this.updateChildrenVariant();
44
- this.updateActiveLanguage();
45
49
  }
50
+ /**
51
+ * Listen for the postChange event and guard it to run only for events originating from a <post-language-option> element.
52
+ */
46
53
  handlePostChange(event) {
47
- this.activeLang = event.detail;
48
- // Update the active state in the children post-language-option components
49
- this.languageOptions.forEach(lang => {
50
- if (lang.code && lang.code === this.activeLang) {
51
- lang.setAttribute('active', '');
52
- }
53
- else {
54
- lang.removeAttribute('active');
54
+ eventGuard(this.host, event, { targetLocalName: 'post-language-option', delegatorSelector: 'post-language-switch' }, () => {
55
+ this.activeLang = event.detail;
56
+ // Update the active state in the children post-language-option components
57
+ this.languageOptions.forEach(lang => {
58
+ if (lang.code && lang.code === this.activeLang) {
59
+ lang.setAttribute('active', '');
60
+ }
61
+ else {
62
+ lang.removeAttribute('active');
63
+ }
64
+ });
65
+ // Hides the dropdown when an option has been clicked
66
+ if (this.variant === 'menu') {
67
+ const menu = this.host.shadowRoot.querySelector('post-menu');
68
+ menu.hide();
55
69
  }
56
70
  });
57
- // Hides the dropdown when an option has been clicked
58
- if (this.variant === 'menu') {
59
- const menu = this.host.shadowRoot.querySelector('post-menu');
60
- menu.hide();
61
- }
62
71
  }
63
72
  /**
64
73
  * Handles cases where the language switch is being rendered before options are available
@@ -67,34 +76,22 @@ const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
67
76
  handleInitiallyActive(event) {
68
77
  this.activeLang = event.detail;
69
78
  }
70
- get languageOptions() {
71
- return this.host.querySelectorAll('post-language-option');
72
- }
73
- get activeLanguageOption() {
74
- return this.host.querySelector('post-language-option[active]:not([active="false"])');
75
- }
76
- handleSlotChange() {
77
- this.updateActiveLanguage();
78
- }
79
- updateActiveLanguage() {
80
- this.activeLang = this.activeLanguageOption.getAttribute('code');
81
- }
82
79
  // Update post-language-option variant to have the correct style
83
80
  updateChildrenVariant() {
84
81
  this.languageOptions.forEach(el => {
85
82
  el.setAttribute('variant', this.variant);
86
83
  });
87
84
  }
88
- menuId = `p${nanoid(11)}`;
89
85
  renderList() {
90
- return (h(Host, { "data-version": version, role: "list", "aria-label": this.caption }, h("div", { class: "post-language-switch-list", role: "group", "aria-label": this.description }, h("slot", { onSlotchange: () => this.handleSlotChange() }))));
86
+ return (h(Host, { "data-version": version, role: "list", "aria-label": this.caption }, h("div", { class: "post-language-switch-list", role: "group", "aria-label": this.description }, h("slot", null))));
91
87
  }
92
88
  renderDropdown() {
93
- return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger", "aria-label": this.description }, this.activeLang, h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container", "aria-label": this.caption }, h("slot", { onSlotchange: () => this.handleSlotChange() }))));
89
+ return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger", "aria-label": this.description }, this.activeLang, h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container", "aria-label": this.caption }, h("slot", null))));
94
90
  }
95
91
  render() {
96
92
  return this.variant === 'list' ? this.renderList() : this.renderDropdown();
97
93
  }
94
+ get host() { return this; }
98
95
  static get watchers() { return {
99
96
  "caption": ["validateCaption"],
100
97
  "description": ["validateDescription"],
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
3
 
4
- const postLinkareaCss = "post-linkarea{display:contents;cursor:pointer}";
4
+ const postLinkareaCss = ":host{display:contents;cursor:pointer}";
5
5
  const PostLinkareaStyle0 = postLinkareaCss;
6
6
 
7
7
  const INTERACTIVE_ELEMENTS = ['a'].join(',');
@@ -10,8 +10,8 @@ const PostLinkarea$1 = /*@__PURE__*/ proxyCustomElement(class PostLinkarea exten
10
10
  constructor() {
11
11
  super();
12
12
  this.__registerHost();
13
+ this.__attachShadow();
13
14
  }
14
- get host() { return this; }
15
15
  dispatchClick({ ctrlKey, shiftKey, altKey, metaKey }) {
16
16
  const interactiveElement = this.host.querySelector(`[data-link]${INTERACTIVE_ELEMENTS_SELECTOR}`) ??
17
17
  this.host.querySelector(INTERACTIVE_ELEMENTS_SELECTOR);
@@ -21,10 +21,11 @@ const PostLinkarea$1 = /*@__PURE__*/ proxyCustomElement(class PostLinkarea exten
21
21
  interactiveElement.dispatchEvent(new MouseEvent('click', { ctrlKey, shiftKey, altKey, metaKey }));
22
22
  }
23
23
  render() {
24
- return (h(Host, { key: 'c27bb1e548eecbef9b981ebadea8a9a30a06a89c', "data-version": version, onClick: e => this.dispatchClick(e), tabindex: "0" }, h("slot", { key: '9e5bd5c6032ed87bc2c6e9eed96dc79f19295325' })));
24
+ return (h(Host, { key: '56e4b032fa8976cc120bff5f1c36d55167e54e98', "data-version": version, onClick: (e) => this.dispatchClick(e), tabindex: "0" }, h("slot", { key: '25568fab2a47d765757c00fbee4f2999c1da16d1' })));
25
25
  }
26
+ get host() { return this; }
26
27
  static get style() { return PostLinkareaStyle0; }
27
- }, [4, "post-linkarea"]);
28
+ }, [1, "post-linkarea"]);
28
29
  function defineCustomElement$1() {
29
30
  if (typeof customElements === "undefined") {
30
31
  return;
@@ -10,13 +10,13 @@ const PostListItem$1 = /*@__PURE__*/ proxyCustomElement(class PostListItem exten
10
10
  this.__registerHost();
11
11
  this.__attachShadow();
12
12
  }
13
- get host() { return this; }
14
13
  connectedCallback() {
15
14
  this.host.setAttribute('slot', 'post-list-item');
16
15
  }
17
16
  render() {
18
- return (h(Host, { key: '9626999693fa26c4fb42db178e53099ea8a95c2e', role: "listitem", slot: "post-list-item", version: version }, h("slot", { key: '5f2d0a626e9d09a44d4c20f3bc97a2c60ca77feb' })));
17
+ return (h(Host, { key: 'c826293ea2a7446bea2f5b223934b444655198a0', role: "listitem", slot: "post-list-item", version: version }, h("slot", { key: 'b997f79da2fbc87fbc6a388c118a03c008ad2c23' })));
19
18
  }
19
+ get host() { return this; }
20
20
  static get style() { return PostListItemStyle0; }
21
21
  }, [1, "post-list-item"]);
22
22
  function defineCustomElement$1() {