@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.57

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 (443) hide show
  1. package/dist/{components/react/p-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
  2. package/dist/cjs/debounce-BsIBi_-2.js +13 -0
  3. package/dist/cjs/environment-BQE9Unf_.js +52 -0
  4. package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
  5. package/dist/cjs/fade-CPQhl1fP.js +26 -0
  6. package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
  7. package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
  8. package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
  9. package/dist/cjs/{index-B4gYpuJF.js → index-B4rc1pqu.js} +2150 -292
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{package-DkJrv93P.js → package-uQ5oiSiN.js} +1 -1
  12. package/dist/cjs/post-accordion_2.cjs.entry.js +19 -15
  13. package/dist/cjs/post-avatar.cjs.entry.js +27 -17
  14. package/dist/cjs/post-back-to-top.cjs.entry.js +23 -43
  15. package/dist/cjs/post-banner.cjs.entry.js +15 -12
  16. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +14 -12
  17. package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
  18. package/dist/cjs/post-card-control.cjs.entry.js +42 -26
  19. package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +618 -531
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +41 -37
  21. package/dist/cjs/post-components.cjs.js +3 -3
  22. package/dist/cjs/post-env-test.cjs.entry.js +15 -0
  23. package/dist/cjs/post-footer.cjs.entry.js +24 -20
  24. package/dist/cjs/post-linkarea.cjs.entry.js +5 -5
  25. package/dist/cjs/post-pagination.cjs.entry.js +615 -0
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +54 -34
  27. package/dist/cjs/post-popover.cjs.entry.js +26 -17
  28. package/dist/cjs/post-rating.cjs.entry.js +24 -18
  29. package/dist/cjs/post-stepper-item.cjs.entry.js +5 -5
  30. package/dist/cjs/post-stepper.cjs.entry.js +40 -29
  31. package/dist/cjs/post-tab-item.cjs.entry.js +51 -0
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +13 -11
  33. package/dist/cjs/post-tabs.cjs.entry.js +195 -40
  34. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -11
  35. package/dist/cjs/post-tooltip.cjs.entry.js +14 -12
  36. package/dist/cjs/utils-s05L2ulk.js +26 -0
  37. package/dist/collection/animations/collapse.js +3 -3
  38. package/dist/collection/animations/fade-slide.js +33 -0
  39. package/dist/collection/animations/fade.js +19 -7
  40. package/dist/collection/animations/index.js +2 -0
  41. package/dist/collection/animations/slide.js +25 -21
  42. package/dist/collection/animations/types.js +14 -0
  43. package/dist/collection/animations/utils.js +8 -0
  44. package/dist/collection/collection-manifest.json +8 -8
  45. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  46. package/dist/collection/components/post-accordion/post-accordion.js +5 -4
  47. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  48. package/dist/collection/components/post-accordion-item/post-accordion-item.js +9 -8
  49. package/dist/collection/components/post-avatar/post-avatar.js +11 -11
  50. package/dist/collection/components/post-back-to-top/post-back-to-top.js +15 -15
  51. package/dist/collection/components/post-banner/post-banner.css +4 -1
  52. package/dist/collection/components/post-banner/post-banner.js +6 -5
  53. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +3 -3
  54. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -29
  55. package/dist/collection/components/post-card-control/post-card-control.js +18 -18
  56. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  57. package/dist/collection/components/post-closebutton/post-closebutton.js +4 -3
  58. package/dist/collection/components/post-collapsible/post-collapsible.js +28 -28
  59. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +3 -3
  60. package/dist/collection/components/post-footer/post-footer.css +1 -1
  61. package/dist/collection/components/post-footer/post-footer.js +18 -16
  62. package/dist/collection/components/post-header/post-header.css +1 -1
  63. package/dist/collection/components/post-header/post-header.js +144 -82
  64. package/dist/collection/components/post-icon/post-icon.js +18 -16
  65. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
  66. package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +45 -36
  67. package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
  68. package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +24 -23
  69. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  70. package/dist/collection/components/post-logo/post-logo.css +3 -1
  71. package/dist/collection/components/post-logo/post-logo.js +3 -3
  72. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  73. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
  74. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  75. package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
  76. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
  77. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +81 -75
  78. package/dist/collection/components/post-menu/post-menu.css +1 -1
  79. package/dist/collection/components/post-menu/post-menu.js +39 -38
  80. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  81. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
  82. package/dist/collection/components/post-pagination/post-pagination.css +1 -0
  83. package/dist/collection/components/post-pagination/post-pagination.js +838 -0
  84. package/dist/collection/components/post-popover/post-popover.js +22 -16
  85. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +45 -29
  86. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  87. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +82 -131
  88. package/dist/collection/components/post-rating/post-rating.js +7 -7
  89. package/dist/collection/components/post-stepper/post-stepper.js +38 -35
  90. package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
  91. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  92. package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
  93. package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
  94. package/dist/collection/components/post-tab-panel/post-tab-panel.js +10 -10
  95. package/dist/collection/components/post-tabs/post-tabs.js +232 -59
  96. package/dist/collection/components/post-togglebutton/post-togglebutton.js +2 -2
  97. package/dist/collection/components/post-tooltip/post-tooltip.js +9 -27
  98. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +4 -4
  99. package/dist/collection/utils/environment.js +47 -2
  100. package/dist/collection/utils/event-from.js +2 -2
  101. package/dist/collection/utils/get-focusable-children.js +29 -21
  102. package/dist/collection/utils/is-motion-reduced.js +1 -1
  103. package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
  104. package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
  105. package/dist/component-names.json +4 -5
  106. package/dist/components/breakpoints.js +1 -178
  107. package/dist/components/debounce.js +1 -0
  108. package/dist/components/environment.js +1 -0
  109. package/dist/components/event-from.js +1 -119
  110. package/dist/components/fade-slide.js +1 -0
  111. package/dist/components/fade.js +1 -11
  112. package/dist/components/focusable.js +1 -5018
  113. package/dist/components/get-focusable-children.js +1 -64
  114. package/dist/components/get-root.js +1 -15
  115. package/dist/components/heading-levels.js +1 -3
  116. package/dist/components/index.browser.js +1 -14
  117. package/dist/components/index.d.ts +11 -10
  118. package/dist/components/index.js +1 -39
  119. package/dist/components/long-press-event.js +1 -257
  120. package/dist/components/package.js +1 -3
  121. package/dist/components/post-accordion-item.js +1 -6
  122. package/dist/components/post-accordion-item2.js +1 -113
  123. package/dist/components/post-accordion.js +1 -6
  124. package/dist/components/post-accordion2.js +1 -138
  125. package/dist/components/post-avatar.js +1 -217
  126. package/dist/components/post-back-to-top.js +1 -144
  127. package/dist/components/post-banner.js +1 -98
  128. package/dist/components/post-breadcrumb-item.js +1 -6
  129. package/dist/components/post-breadcrumb-item2.js +1 -79
  130. package/dist/components/post-breadcrumbs.js +1 -196
  131. package/dist/components/post-card-control.js +1 -326
  132. package/dist/components/post-closebutton.js +1 -6
  133. package/dist/components/post-closebutton2.js +1 -77
  134. package/dist/components/post-collapsible-trigger.js +1 -6
  135. package/dist/components/post-collapsible-trigger2.js +1 -136
  136. package/dist/components/post-collapsible.js +1 -6
  137. package/dist/components/post-collapsible2.js +1 -110
  138. package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
  139. package/dist/components/post-env-test.js +1 -0
  140. package/dist/components/post-footer.js +1 -116
  141. package/dist/components/post-header.js +1 -372
  142. package/dist/components/post-icon.js +1 -6
  143. package/dist/components/post-icon2.js +1 -159
  144. package/dist/components/post-language-menu-item.d.ts +11 -0
  145. package/dist/components/post-language-menu-item.js +1 -0
  146. package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
  147. package/dist/components/post-language-menu.js +1 -0
  148. package/dist/components/post-linkarea.js +1 -58
  149. package/dist/components/post-logo.js +1 -58
  150. package/dist/components/post-mainnavigation.js +1 -180
  151. package/dist/components/post-megadropdown-trigger.js +1 -136
  152. package/dist/components/post-megadropdown.js +1 -267
  153. package/dist/components/post-menu-item.js +1 -6
  154. package/dist/components/post-menu-item2.js +1 -30
  155. package/dist/components/post-menu-trigger.js +1 -6
  156. package/dist/components/post-menu-trigger2.js +1 -110
  157. package/dist/components/post-menu.js +1 -6
  158. package/dist/components/post-menu2.js +1 -242
  159. package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  160. package/dist/components/post-pagination.js +1 -0
  161. package/dist/components/post-popover-trigger.js +1 -132
  162. package/dist/components/post-popover.js +1 -118
  163. package/dist/components/post-popovercontainer.js +1 -6
  164. package/dist/components/post-popovercontainer2.js +1 -3127
  165. package/dist/components/post-rating.js +1 -148
  166. package/dist/components/post-stepper-item.js +1 -33
  167. package/dist/components/post-stepper.js +1 -134
  168. package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  169. package/dist/components/post-tab-item.js +1 -0
  170. package/dist/components/post-tab-panel.js +1 -54
  171. package/dist/components/post-tabs.js +1 -196
  172. package/dist/components/post-togglebutton.js +1 -56
  173. package/dist/components/post-togglebutton2.js +1 -0
  174. package/dist/components/post-tooltip-trigger.js +1 -206
  175. package/dist/components/post-tooltip.js +1 -114
  176. package/dist/components/react/index.d.ts +2 -0
  177. package/dist/components/react/index.js +1 -2315
  178. package/dist/components/react/p-B8YiQ3mz.js +1 -0
  179. package/dist/components/react/p-BC5nlBvn.js +1 -0
  180. package/dist/components/react/p-BLchVpF6.js +1 -14
  181. package/dist/components/react/p-BVCjnh6Q.js +1 -0
  182. package/dist/{post-components/p-CBFgkSgY.js → components/react/p-BVGcVycs.js} +1 -1
  183. package/dist/components/react/p-B_XPj2c8.js +1 -0
  184. package/dist/components/react/p-BllOMLDs.js +1 -0
  185. package/dist/components/react/p-BmRNjQUZ.js +1 -0
  186. package/dist/components/react/p-ByFh05IW.js +1 -0
  187. package/dist/components/react/p-C9hMpmsD.js +1 -0
  188. package/dist/components/react/p-CJ13r5fi.js +1 -0
  189. package/dist/components/react/p-CZvbetqX.js +1 -0
  190. package/dist/components/react/p-C_2k3G1c.js +1 -257
  191. package/dist/components/react/p-CoDiS_Ik.js +1 -0
  192. package/dist/components/react/p-Cou17ld8.js +1 -0
  193. package/dist/components/react/p-D5knoiyy.js +1 -0
  194. package/dist/components/react/p-D9DDtvFM.js +1 -0
  195. package/dist/components/react/p-DY2U5CQt.js +1 -0
  196. package/dist/components/react/p-DjIHLduJ.js +1 -3
  197. package/dist/components/react/p-DpATRD2W.js +1 -0
  198. package/dist/components/react/p-FxUVQ4Tx.js +1 -0
  199. package/dist/components/react/p-HygIVKXC.js +1 -5018
  200. package/dist/components/react/p-YR7U0Z_g.js +1 -0
  201. package/dist/components/react/p-ZeKXASQs.js +1 -0
  202. package/dist/components/react/p-r4txK0AC.js +1 -3
  203. package/dist/components/react/p-sSn0kXFi.js +1 -0
  204. package/dist/components/react/post-accordion-item.js +1 -6
  205. package/dist/components/react/post-accordion.js +1 -6
  206. package/dist/components/react/post-avatar.js +1 -218
  207. package/dist/components/react/post-back-to-top.js +1 -145
  208. package/dist/components/react/post-banner.js +1 -99
  209. package/dist/components/react/post-breadcrumb-item.js +1 -6
  210. package/dist/components/react/post-breadcrumbs.js +1 -197
  211. package/dist/components/react/post-card-control.js +1 -327
  212. package/dist/components/react/post-closebutton.js +1 -6
  213. package/dist/components/react/post-collapsible-trigger.js +1 -6
  214. package/dist/components/react/post-collapsible.js +1 -6
  215. package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
  216. package/dist/components/react/post-env-test.js +1 -0
  217. package/dist/components/react/post-footer.js +1 -117
  218. package/dist/components/react/post-header.js +1 -373
  219. package/dist/components/react/post-icon.js +1 -6
  220. package/dist/components/react/post-language-menu-item.d.ts +11 -0
  221. package/dist/components/react/post-language-menu-item.js +1 -0
  222. package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
  223. package/dist/components/react/post-language-menu.js +1 -0
  224. package/dist/components/react/post-linkarea.js +1 -59
  225. package/dist/components/react/post-logo.js +1 -59
  226. package/dist/components/react/post-mainnavigation.js +1 -181
  227. package/dist/components/react/post-megadropdown-trigger.js +1 -137
  228. package/dist/components/react/post-megadropdown.js +1 -268
  229. package/dist/components/react/post-menu-item.js +1 -6
  230. package/dist/components/react/post-menu-trigger.js +1 -6
  231. package/dist/components/react/post-menu.js +1 -6
  232. package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  233. package/dist/components/react/post-pagination.js +1 -0
  234. package/dist/components/react/post-popover-trigger.js +1 -133
  235. package/dist/components/react/post-popover.js +1 -119
  236. package/dist/components/react/post-popovercontainer.js +1 -6
  237. package/dist/components/react/post-rating.js +1 -149
  238. package/dist/components/react/post-stepper-item.js +1 -34
  239. package/dist/components/react/post-stepper.js +1 -135
  240. package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  241. package/dist/components/react/post-tab-item.js +1 -0
  242. package/dist/components/react/post-tab-panel.js +1 -55
  243. package/dist/components/react/post-tabs.js +1 -197
  244. package/dist/components/react/post-togglebutton.js +1 -57
  245. package/dist/components/react/post-tooltip-trigger.js +1 -207
  246. package/dist/components/react/post-tooltip.js +1 -115
  247. package/dist/components/switch-variants.js +1 -3
  248. package/dist/components/utils.js +1 -0
  249. package/dist/docs.d.ts +11 -0
  250. package/dist/docs.json +873 -631
  251. package/dist/{cjs/breakpoints-CEkeixld.js → esm/breakpoints-DYoSKGHO.js} +89 -6
  252. package/dist/esm/debounce-C9hMpmsD.js +11 -0
  253. package/dist/esm/environment-CEmnRoA6.js +49 -0
  254. package/dist/{components/react/p-CzIKqBrS.js → esm/event-from-rEfV4v4a.js} +2 -2
  255. package/dist/esm/fade-DsgPYmAa.js +24 -0
  256. package/dist/esm/fade-slide-CvOvauo9.js +36 -0
  257. package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
  258. package/dist/{components/react/p-CBFgkSgY.js → esm/get-root-CXfAA093.js} +1 -1
  259. package/dist/esm/{index-wEFJ-c34.js → index-CDZBzSdV.js} +2150 -292
  260. package/dist/esm/loader.js +3 -3
  261. package/dist/esm/package-CZvbetqX.js +3 -0
  262. package/dist/esm/post-accordion_2.entry.js +17 -13
  263. package/dist/esm/post-avatar.entry.js +22 -12
  264. package/dist/esm/post-back-to-top.entry.js +23 -43
  265. package/dist/esm/post-banner.entry.js +14 -11
  266. package/dist/esm/post-breadcrumb-item_2.entry.js +13 -11
  267. package/dist/esm/post-breadcrumbs.entry.js +31 -32
  268. package/dist/esm/post-card-control.entry.js +32 -16
  269. package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +599 -510
  270. package/dist/esm/post-collapsible_2.entry.js +38 -34
  271. package/dist/esm/post-components.js +4 -4
  272. package/dist/esm/post-env-test.entry.js +13 -0
  273. package/dist/esm/post-footer.entry.js +21 -17
  274. package/dist/esm/post-linkarea.entry.js +5 -5
  275. package/dist/esm/post-pagination.entry.js +613 -0
  276. package/dist/esm/post-popover-trigger.entry.js +52 -32
  277. package/dist/esm/post-popover.entry.js +25 -16
  278. package/dist/esm/post-rating.entry.js +16 -10
  279. package/dist/esm/post-stepper-item.entry.js +5 -5
  280. package/dist/esm/post-stepper.entry.js +39 -28
  281. package/dist/esm/post-tab-item.entry.js +49 -0
  282. package/dist/esm/post-tab-panel.entry.js +13 -11
  283. package/dist/esm/post-tabs.entry.js +195 -40
  284. package/dist/esm/post-tooltip-trigger.entry.js +10 -8
  285. package/dist/esm/post-tooltip.entry.js +13 -11
  286. package/dist/esm/utils-CoDiS_Ik.js +24 -0
  287. package/dist/post-components/p-09ba7cf9.entry.js +1 -0
  288. package/dist/post-components/p-0c091898.entry.js +1 -0
  289. package/dist/post-components/{p-cd03e6f2.entry.js → p-0e97fcfd.entry.js} +1 -1
  290. package/dist/post-components/p-296f1dd5.entry.js +1 -0
  291. package/dist/post-components/p-32ad2b21.entry.js +1 -0
  292. package/dist/post-components/p-366c28cb.entry.js +1 -0
  293. package/dist/post-components/p-41ae68d5.entry.js +1 -0
  294. package/dist/post-components/p-448e7265.entry.js +1 -0
  295. package/dist/post-components/p-554da188.entry.js +1 -0
  296. package/dist/post-components/p-5912f8f1.entry.js +1 -0
  297. package/dist/post-components/p-790f300d.entry.js +1 -0
  298. package/dist/post-components/p-7ed5a493.entry.js +1 -0
  299. package/dist/post-components/p-85bea1b6.entry.js +1 -0
  300. package/dist/post-components/p-8bcff4d2.entry.js +1 -0
  301. package/dist/post-components/p-9dc9c245.entry.js +1 -0
  302. package/dist/post-components/p-B7ebLhHc.js +1 -0
  303. package/dist/post-components/p-BVCjnh6Q.js +1 -0
  304. package/dist/post-components/p-BXNs2_sw.js +1 -0
  305. package/dist/post-components/p-C9hMpmsD.js +1 -0
  306. package/dist/post-components/p-CDZBzSdV.js +2 -0
  307. package/dist/post-components/p-CEmnRoA6.js +1 -0
  308. package/dist/post-components/p-CZvbetqX.js +1 -0
  309. package/dist/post-components/p-CoDiS_Ik.js +1 -0
  310. package/dist/post-components/p-D5knoiyy.js +1 -0
  311. package/dist/post-components/p-DI-h_mEL.js +1 -0
  312. package/dist/post-components/p-a06f9695.entry.js +1 -0
  313. package/dist/post-components/p-a191f1df.entry.js +1 -0
  314. package/dist/post-components/p-c5d19d62.entry.js +1 -0
  315. package/dist/post-components/{p-24dc54d1.entry.js → p-c8c4d05b.entry.js} +1 -1
  316. package/dist/post-components/{p-57288cb2.entry.js → p-d1a5c980.entry.js} +1 -1
  317. package/dist/post-components/p-d4e2c556.entry.js +1 -0
  318. package/dist/post-components/p-f96a310c.entry.js +1 -0
  319. package/dist/post-components/p-fab2327d.entry.js +1 -0
  320. package/dist/post-components/p-rEfV4v4a.js +1 -0
  321. package/dist/post-components/post-components.css +1 -1
  322. package/dist/post-components/post-components.esm.js +1 -1
  323. package/dist/prebuild.js +46 -0
  324. package/dist/types/animations/collapse.d.ts +1 -0
  325. package/dist/types/animations/fade-slide.d.ts +11 -0
  326. package/dist/types/animations/fade.d.ts +2 -2
  327. package/dist/types/animations/index.d.ts +2 -0
  328. package/dist/types/animations/slide.d.ts +9 -2
  329. package/dist/types/animations/types.d.ts +13 -0
  330. package/dist/types/animations/utils.d.ts +2 -0
  331. package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
  332. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
  333. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
  334. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
  335. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
  336. package/dist/types/components/post-footer/post-footer.d.ts +4 -4
  337. package/dist/types/components/post-header/post-header.d.ts +23 -13
  338. package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +12 -11
  339. package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
  340. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
  341. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
  342. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
  343. package/dist/types/components/post-menu/post-menu.d.ts +4 -4
  344. package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
  345. package/dist/types/components/post-popover/post-popover.d.ts +4 -3
  346. package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
  347. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -21
  348. package/dist/types/components/post-rating/post-rating.d.ts +1 -1
  349. package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
  350. package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
  351. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
  352. package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
  353. package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -5
  354. package/dist/types/components.d.ts +322 -219
  355. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
  356. package/dist/types/stencil-public-runtime.d.ts +147 -10
  357. package/dist/types/types/heading-levels.d.ts +1 -1
  358. package/dist/types/utils/environment.d.ts +25 -1
  359. package/dist/types/utils/get-focusable-children.d.ts +2 -2
  360. package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
  361. package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
  362. package/hydrate/index.d.ts +14 -0
  363. package/hydrate/index.js +7494 -2714
  364. package/hydrate/index.mjs +7493 -2715
  365. package/package.json +7 -8
  366. package/dist/cjs/fade-nS5zzDQS.js +0 -14
  367. package/dist/cjs/index-UFKR6Ok0.js +0 -98
  368. package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
  369. package/dist/collection/animations/slide-and-fade.js +0 -25
  370. package/dist/collection/components/post-language-option/post-language-option.css +0 -1
  371. package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
  372. package/dist/collection/components/post-list/post-list.css +0 -1
  373. package/dist/collection/components/post-list/post-list.js +0 -97
  374. package/dist/collection/components/post-list-item/post-list-item.css +0 -1
  375. package/dist/collection/components/post-list-item/post-list-item.js +0 -26
  376. package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
  377. package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
  378. package/dist/components/index2.js +0 -89
  379. package/dist/components/post-language-option.d.ts +0 -11
  380. package/dist/components/post-language-option.js +0 -99
  381. package/dist/components/post-language-switch.js +0 -157
  382. package/dist/components/post-list-item.js +0 -38
  383. package/dist/components/post-list.js +0 -61
  384. package/dist/components/post-tab-header.js +0 -52
  385. package/dist/components/react/p-BVXiQdHq.js +0 -64
  386. package/dist/components/react/p-BhxZzOEC.js +0 -3
  387. package/dist/components/react/p-CSAMO7iJ.js +0 -243
  388. package/dist/components/react/p-CYkf_7Y5.js +0 -89
  389. package/dist/components/react/p-Ccrl2AQn.js +0 -111
  390. package/dist/components/react/p-CewRvBtg.js +0 -139
  391. package/dist/components/react/p-Cwiv86_f.js +0 -111
  392. package/dist/components/react/p-D2waO0Zc.js +0 -31
  393. package/dist/components/react/p-DBPOV12C.js +0 -160
  394. package/dist/components/react/p-DVGEExot.js +0 -3128
  395. package/dist/components/react/p-Djvj8fd2.js +0 -80
  396. package/dist/components/react/p-LtiDhYis.js +0 -137
  397. package/dist/components/react/p-SbIC4aZX.js +0 -11
  398. package/dist/components/react/p-XrZzCOKT.js +0 -78
  399. package/dist/components/react/p-v3pOrMNQ.js +0 -114
  400. package/dist/components/react/post-language-option.js +0 -100
  401. package/dist/components/react/post-language-switch.d.ts +0 -11
  402. package/dist/components/react/post-language-switch.js +0 -158
  403. package/dist/components/react/post-list-item.js +0 -39
  404. package/dist/components/react/post-list.js +0 -62
  405. package/dist/components/react/post-tab-header.js +0 -53
  406. package/dist/esm/breakpoints-CJ80BZ06.js +0 -178
  407. package/dist/esm/event-from-CzIKqBrS.js +0 -119
  408. package/dist/esm/fade-SbIC4aZX.js +0 -11
  409. package/dist/esm/get-root-BkQ3CrLq.js +0 -15
  410. package/dist/esm/index-Beaz8wEe.js +0 -89
  411. package/dist/esm/package-BhxZzOEC.js +0 -3
  412. package/dist/esm/post-tab-header.entry.js +0 -29
  413. package/dist/post-components/p-01e678c9.entry.js +0 -1
  414. package/dist/post-components/p-034a453f.entry.js +0 -1
  415. package/dist/post-components/p-15a4cdbf.entry.js +0 -1
  416. package/dist/post-components/p-2a2030bf.entry.js +0 -1
  417. package/dist/post-components/p-2ed84cc3.entry.js +0 -1
  418. package/dist/post-components/p-3228968f.entry.js +0 -1
  419. package/dist/post-components/p-3c01ddfe.entry.js +0 -1
  420. package/dist/post-components/p-748b1f01.entry.js +0 -1
  421. package/dist/post-components/p-7745e46e.entry.js +0 -1
  422. package/dist/post-components/p-7f635728.entry.js +0 -1
  423. package/dist/post-components/p-82c178a3.entry.js +0 -1
  424. package/dist/post-components/p-9b5f8319.entry.js +0 -1
  425. package/dist/post-components/p-Beaz8wEe.js +0 -1
  426. package/dist/post-components/p-BhxZzOEC.js +0 -1
  427. package/dist/post-components/p-CJ80BZ06.js +0 -1
  428. package/dist/post-components/p-D9ZHp2FP.js +0 -1
  429. package/dist/post-components/p-SbIC4aZX.js +0 -1
  430. package/dist/post-components/p-a9644e54.entry.js +0 -1
  431. package/dist/post-components/p-af030a3a.entry.js +0 -1
  432. package/dist/post-components/p-b8ba8139.entry.js +0 -1
  433. package/dist/post-components/p-db935e8e.entry.js +0 -1
  434. package/dist/post-components/p-e62e1f57.entry.js +0 -1
  435. package/dist/post-components/p-fb4b1641.entry.js +0 -1
  436. package/dist/post-components/p-wEFJ-c34.js +0 -2
  437. package/dist/types/animations/slide-and-fade.d.ts +0 -2
  438. package/dist/types/components/post-list/post-list.d.ts +0 -24
  439. package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
  440. package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
  441. /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
  442. /package/dist/{post-components/p-CzIKqBrS.js → components/react/p-rEfV4v4a.js} +0 -0
  443. /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
@@ -1,372 +1 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { t as throttle, b as breakpoint } from './breakpoints.js';
3
- import { v as version } from './package.js';
4
- import { g as getFocusableChildren } from './get-focusable-children.js';
5
- import { E as EventFrom } from './event-from.js';
6
-
7
- const easing = 'ease';
8
- const duration = 500;
9
- const fill = 'forwards';
10
- function slideUp(el, translateSize = '-100%') {
11
- return el.animate([
12
- { transform: 'translateY(0)' }, // Starting position (no translation)
13
- { transform: `translateY(${translateSize})` }, // End position
14
- ], {
15
- duration: duration,
16
- easing,
17
- fill,
18
- });
19
- }
20
- function slideDown(el, translateSize = '-100%') {
21
- return el.animate([
22
- { transform: `translateY(${translateSize})` }, // Starting position (no translation)
23
- { transform: 'translateY(0)' }, // End position
24
- ], {
25
- duration: duration,
26
- easing,
27
- fill,
28
- });
29
- }
30
-
31
- const postHeaderCss = ":host{--post-global-header-top:calc(var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height));--post-header-top:calc(var(--post-header-reduced-height) - var(--post-header-expanded-height));--post-logo-height:calc(var(--post-global-header-expanded-height) - var(--post-header-scroll-top, 0px));--post-global-controls-top:clamp( 1000 * (var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height)), calc(-1 * min(var(--post-header-scroll-top, 0px) / 4, var(--post-global-header-reduced-height))), 0px )}@media screen and (min-width: 1024px){:host{--post-header-gap:0.25rem;--post-global-header-padding-inline-start:0.25rem;--post-global-header-padding-inline-end:0.5rem;--post-local-header-padding-inline-start:0.75rem;--post-local-header-padding-inline-end:0.5rem}}@media screen and (min-width: 600px)and (max-width: 1023.98px){:host{--post-header-gap:0.75rem 0.25rem;--post-global-header-padding-inline-start:0.25rem;--post-global-header-padding-inline-end:0.25rem;--post-local-header-padding-inline-start:0.75rem;--post-local-header-padding-inline-end:0.25rem;--post-local-header-padding-block:0rem;--post-burger-menu-padding-inline:2.5rem;--post-burger-menu-body-gap:2rem;--post-burger-menu-footer-gap:1.5rem}}@media screen and (min-width: 600px)and (max-width: 779.98px){:host{--post-burger-menu-padding-inline:1rem}}@media screen and (min-width: 0)and (max-width: 599.98px){:host{--post-header-gap:0.75rem 0.25rem;--post-global-header-padding-inline-start:0rem;--post-global-header-padding-inline-end:0.5rem;--post-local-header-padding-inline-start:0.5rem;--post-local-header-padding-inline-end:0.5rem;--post-local-header-padding-block:0rem;--post-burger-menu-padding-inline:1rem;--post-burger-menu-body-gap:1.5rem;--post-burger-menu-footer-gap:1rem}}:host([data-expanded]){--post-header-top:0;--post-global-header-top:0;--post-global-controls-top:0;--post-logo-height:var(--post-global-header-expanded-height)}*,::before,::after{box-sizing:border-box}:host,.global-header,.local-header{transition:inset-block-start 150ms cubic-bezier(0.4, 0, 0.2, 1)}.global-header,.local-header,.burger-menu{box-shadow:var(--post-device-elevation-300)}.global-header,.sliding-controls,.local-header,.navigation{display:flex;align-items:center;justify-content:space-between;gap:var(--post-header-gap)}:host{container-type:inline-size;display:block;position:sticky;inset-block-start:var(--post-header-top);z-index:1020}.global-header{z-index:2;position:sticky;inset-block-start:var(--post-global-header-top);background-color:#fc0;height:var(--post-global-header-expanded-height);padding-inline-start:var(--post-global-header-padding-inline-start);padding-inline-end:var(--post-global-header-padding-inline-end)}.global-header:has(~.local-header:not(.no-title.no-navigation)),.global-header:has(~.burger-menu.extended){box-shadow:none}.global-header .logo{align-self:flex-end;width:var(--post-global-header-expanded-height);height:var(--post-logo-height);min-height:var(--post-global-header-reduced-height);max-height:100%;margin-inline-end:1.25rem}.global-header .sliding-controls{flex-grow:1;justify-content:flex-end;position:relative;inset-block-start:var(--post-global-controls-top)}.global-header .target-group{margin-inline-end:auto}.global-header.no-target-group .target-group{display:none}.local-header{position:relative;flex-wrap:wrap;background-color:#fff;min-height:var(--post-local-header-expanded-min-height);padding-inline-start:var(--post-local-header-padding-inline-start);padding-inline-end:var(--post-local-header-padding-inline-end);padding-block:var(--post-local-header-padding-block)}.local-header:not(.no-title,.no-navigation){padding-block-start:1.125rem}.local-header.no-title.no-navigation{display:none}.local-header:has(.navigation.megadropdown-open),.local-header:has(~.burger-menu.extended){box-shadow:none}.local-header:has(.navigation.megadropdown-open)::after,.local-header:has(~.burger-menu.extended)::after{content:\"\";display:block;position:absolute;inset-inline:0;inset-block-end:0;height:1px;background-color:#e1e0dc}.local-header .navigation{flex:1 0 100%;height:var(--post-main-navigation-height);margin-inline-start:calc(-1*var(--post-local-header-padding-inline-start));max-width:100cqw}.local-header.no-navigation .navigation{display:none}.local-header .navigation-controls{flex:0 0 auto}.local-header.no-navigation-controls .navigation{margin-inline-end:calc(-1*var(--post-local-header-padding-inline-end))}.local-header.no-navigation-controls .navigation-controls{display:none}.burger-menu{z-index:-1;position:absolute;inset-inline:0;inset-block-start:100%;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height));overflow:hidden auto;display:flex;flex-direction:column;background-color:#fafafa}.burger-menu:not(.extended){transform:translateY(-100%)}.burger-menu:not(.extended)>*{display:none}.burger-menu .burger-menu-body,.burger-menu .burger-menu-footer{display:flex;flex-direction:column;padding-inline:var(--post-burger-menu-padding-inline)}.burger-menu .burger-menu-body{flex-grow:1;padding-block:1.5rem;gap:var(--post-burger-menu-body-gap)}.burger-menu .burger-menu-footer{background-color:#f0efed;padding-block:1rem 1.5rem;gap:var(--post-burger-menu-footer-gap)}.burger-menu .navigation-controls{height:3.5rem;display:flex;align-items:center;justify-content:flex-end;padding-inline:.25rem}.burger-menu.no-navigation-controls .navigation-controls{display:none}";
32
-
33
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
36
- r = Reflect.decorate(decorators, target, key, desc);
37
- else
38
- for (var i = decorators.length - 1; i >= 0; i--)
39
- if (d = decorators[i])
40
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
41
- return c > 3 && r && Object.defineProperty(target, key, r), r;
42
- };
43
- const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
44
- get hasBurgerMenu() {
45
- return this.device !== 'desktop' && this.hasNavigation;
46
- }
47
- get scrollParent() {
48
- const frozenScrollParent = document.querySelector('[data-post-scroll-locked]');
49
- if (frozenScrollParent)
50
- return frozenScrollParent;
51
- let element = this.host.parentElement;
52
- while (element) {
53
- const overflow = getComputedStyle(element).overflowY;
54
- if (['auto', 'scroll'].includes(overflow)) {
55
- return element;
56
- }
57
- element = element.parentElement;
58
- }
59
- return document.body;
60
- }
61
- lockBody(newValue, _oldValue, propName) {
62
- const scrollParent = this.scrollParent;
63
- const burgerMenuExtended = propName === 'burgerMenuExtended' ? newValue : this.burgerMenuExtended;
64
- if (this.device !== 'desktop' && burgerMenuExtended) {
65
- scrollParent.setAttribute('data-post-scroll-locked', '');
66
- this.host.addEventListener('keydown', this.keyboardHandler);
67
- }
68
- else {
69
- scrollParent.removeAttribute('data-post-scroll-locked');
70
- this.host.removeEventListener('keydown', this.keyboardHandler);
71
- }
72
- }
73
- constructor() {
74
- super();
75
- this.__registerHost();
76
- this.__attachShadow();
77
- this.throttledResize = throttle(50, () => this.updateLocalHeaderHeight());
78
- this.device = breakpoint.get('device');
79
- this.hasNavigation = false;
80
- this.hasNavigationControls = false;
81
- this.hasTargetGroup = false;
82
- this.hasTitle = false;
83
- this.burgerMenuExtended = false;
84
- this.megadropdownOpen = false;
85
- this.breakpointChange = (e) => {
86
- this.device = e.detail;
87
- this.switchLanguageSwitchMode();
88
- if (this.device === 'desktop' && this.burgerMenuExtended) {
89
- this.closeBurgerMenu();
90
- }
91
- if (this.device !== 'desktop') {
92
- Array.from(this.host.querySelectorAll('post-megadropdown')).forEach(dropdown => {
93
- dropdown.hide(false, true);
94
- });
95
- this.megadropdownOpen = false;
96
- }
97
- };
98
- this.megadropdownStateHandler = (event) => {
99
- this.megadropdownOpen = event.detail.isVisible;
100
- };
101
- this.handleScrollEvent = this.handleScrollEvent.bind(this);
102
- this.updateScrollParentHeight = this.updateScrollParentHeight.bind(this);
103
- this.updateLocalHeaderHeight = this.updateLocalHeaderHeight.bind(this);
104
- this.keyboardHandler = this.keyboardHandler.bind(this);
105
- this.handleLinkClick = this.handleLinkClick.bind(this);
106
- this.checkSlottedContent = this.checkSlottedContent.bind(this);
107
- }
108
- connectedCallback() {
109
- window.addEventListener('resize', this.throttledResize, { passive: true });
110
- window.addEventListener('scroll', this.handleScrollEvent, {
111
- passive: true,
112
- });
113
- this.scrollParent.addEventListener('scroll', this.handleScrollEvent, {
114
- passive: true,
115
- });
116
- document.addEventListener('postToggleMegadropdown', this.megadropdownStateHandler);
117
- this.host.addEventListener('click', this.handleLinkClick);
118
- window.addEventListener('postBreakpoint:device', this.breakpointChange);
119
- this.handleScrollParentResize();
120
- this.lockBody(false, this.burgerMenuExtended, 'burgerMenuExtended');
121
- }
122
- componentWillRender() {
123
- this.handleScrollEvent();
124
- this.handleSlottedContentChanges();
125
- this.switchLanguageSwitchMode();
126
- }
127
- componentDidRender() {
128
- this.getFocusableElements();
129
- this.handleLocalHeaderResize();
130
- }
131
- componentDidLoad() {
132
- this.updateLocalHeaderHeight();
133
- }
134
- // Clean up possible side effects when post-header is disconnected
135
- disconnectedCallback() {
136
- const scrollParent = this.scrollParent;
137
- window.removeEventListener('postBreakpoint:device', this.breakpointChange);
138
- window.removeEventListener('resize', this.throttledResize);
139
- window.removeEventListener('scroll', this.handleScrollEvent);
140
- if (scrollParent)
141
- scrollParent.removeEventListener('scroll', this.handleScrollEvent);
142
- document.removeEventListener('postToggleMegadropdown', this.megadropdownStateHandler);
143
- this.host.removeEventListener('keydown', this.keyboardHandler);
144
- this.host.removeEventListener('click', this.handleLinkClick);
145
- if (this.scrollParentResizeObserver) {
146
- this.scrollParentResizeObserver.disconnect();
147
- this.scrollParentResizeObserver = null;
148
- }
149
- if (this.localHeaderResizeObserver) {
150
- this.localHeaderResizeObserver.disconnect();
151
- this.localHeaderResizeObserver = null;
152
- }
153
- if (this.slottedContentObserver) {
154
- this.slottedContentObserver.disconnect();
155
- this.slottedContentObserver = null;
156
- }
157
- this.burgerMenuExtended = false;
158
- }
159
- async closeBurgerMenu() {
160
- this.burgerMenuAnimation.finish();
161
- const menuButton = this.getMenuButton();
162
- if (menuButton) {
163
- menuButton.toggled = false;
164
- }
165
- this.burgerMenuExtended = false;
166
- }
167
- /**
168
- * Toggles the burger navigation menu.
169
- */
170
- async toggleBurgerMenu(force) {
171
- if (this.device === 'desktop')
172
- return;
173
- this.burgerMenuAnimation = this.burgerMenuExtended
174
- ? slideUp(this.burgerMenu)
175
- : slideDown(this.burgerMenu);
176
- // Update the state of the toggle button
177
- const menuButton = this.host.querySelector('post-togglebutton');
178
- if (menuButton)
179
- menuButton.toggled = force ?? !this.burgerMenuExtended;
180
- if (this.burgerMenuExtended) {
181
- // Wait for the close animation to finish before hiding megadropdowns
182
- await this.burgerMenuAnimation.finished;
183
- this.burgerMenuExtended = force ?? !this.burgerMenuExtended;
184
- if (this.burgerMenuExtended === false) {
185
- this.closeAllMegadropdowns();
186
- }
187
- }
188
- else {
189
- this.burgerMenuExtended = force ?? !this.burgerMenuExtended;
190
- // If opening, close any open megadropdowns immediately
191
- if (this.megadropdownOpen) {
192
- this.closeAllMegadropdowns();
193
- }
194
- }
195
- }
196
- // Get all the focusable elements in the post-header burger menu
197
- getFocusableElements() {
198
- // Get elements in the correct order (different as the DOM order)
199
- const focusableEls = [
200
- ...Array.from(this.host.querySelectorAll('.list-inline:not([slot="meta-navigation"]) > li')),
201
- ...Array.from(this.host.querySelectorAll('nav > post-list > div > post-list-item, post-megadropdown-trigger')),
202
- ...Array.from(this.host.querySelectorAll('.list-inline[slot="meta-navigation"] > li, post-language-option')),
203
- ];
204
- // Add the main toggle menu button to the list of focusable children
205
- const focusableChildren = [
206
- this.host.querySelector('post-togglebutton'),
207
- ...focusableEls.flatMap(el => Array.from(getFocusableChildren(el))),
208
- ];
209
- this.firstFocusableEl = focusableChildren[0];
210
- this.lastFocusableEl = focusableChildren[focusableChildren.length - 1];
211
- }
212
- getMenuButton() {
213
- return this.host.querySelector('post-togglebutton');
214
- }
215
- keyboardHandler(e) {
216
- if (e.key === 'Tab' && this.burgerMenuExtended) {
217
- if (e.shiftKey && document.activeElement === this.firstFocusableEl) {
218
- // If back tab (Tab + Shift) and first element is focused, focus goes to the last element of the megadropdown
219
- e.preventDefault();
220
- this.lastFocusableEl.focus();
221
- }
222
- else if (!e.shiftKey && document.activeElement === this.lastFocusableEl) {
223
- // If Tab and last element is focused, focus goes back to the first element of the megadropdown
224
- e.preventDefault();
225
- this.firstFocusableEl.focus();
226
- }
227
- }
228
- }
229
- closeAllMegadropdowns() {
230
- Array.from(this.host.querySelectorAll('post-megadropdown')).forEach(dropdown => {
231
- dropdown.hide(false, true);
232
- });
233
- this.megadropdownOpen = false;
234
- }
235
- handleScrollEvent() {
236
- const scrollTop = this.scrollParent === document.body ? window.scrollY : this.scrollParent.scrollTop;
237
- document.documentElement.style.setProperty('--post-header-scroll-top', `${Math.max(scrollTop, 0)}px`);
238
- }
239
- updateLocalHeaderHeight() {
240
- const localHeaderElement = this.host.shadowRoot.querySelector('.local-header');
241
- if (localHeaderElement) {
242
- document.documentElement.style.setProperty('--post-local-header-expanded-height', `${localHeaderElement.clientHeight}px`);
243
- }
244
- }
245
- updateScrollParentHeight() {
246
- this.host.style.setProperty('--post-header-scroll-parent-height', `${this.scrollParent.clientHeight}px`);
247
- }
248
- handleLinkClick(event) {
249
- const target = event.target;
250
- const isLinkInMainNav = target.closest('post-mainnavigation a');
251
- const isLinkInMegadropdown = target.closest('post-megadropdown a');
252
- if (!isLinkInMainNav && !isLinkInMegadropdown) {
253
- return;
254
- }
255
- if (this.burgerMenuExtended && (isLinkInMainNav || isLinkInMegadropdown)) {
256
- this.toggleBurgerMenu(false);
257
- }
258
- if (this.device === 'desktop' && isLinkInMegadropdown) {
259
- const megadropdownLink = target.closest('post-megadropdown a');
260
- if (megadropdownLink) {
261
- target.closest('post-megadropdown').hide(true);
262
- }
263
- }
264
- }
265
- handleScrollParentResize() {
266
- if (this.scrollParent) {
267
- this.scrollParentResizeObserver = new ResizeObserver(this.updateScrollParentHeight);
268
- this.scrollParentResizeObserver.observe(this.scrollParent);
269
- }
270
- }
271
- handleLocalHeaderResize() {
272
- const localHeader = this.host.shadowRoot.querySelector('.local-header');
273
- if (localHeader && !this.localHeaderResizeObserver) {
274
- this.localHeaderResizeObserver = new ResizeObserver(this.updateLocalHeaderHeight);
275
- this.localHeaderResizeObserver.observe(localHeader);
276
- }
277
- }
278
- handleSlottedContentChanges() {
279
- if (!this.slottedContentObserver) {
280
- this.checkSlottedContent();
281
- this.slottedContentObserver = new MutationObserver(this.checkSlottedContent);
282
- this.slottedContentObserver.observe(this.host, { childList: true });
283
- }
284
- }
285
- checkSlottedContent() {
286
- this.hasNavigation = !!this.host.querySelector('[slot="post-mainnavigation"]');
287
- this.hasNavigationControls = !!this.host.querySelector('[slot="navigation-controls"]');
288
- this.hasTargetGroup = !!this.host.querySelector('[slot="target-group"]');
289
- this.hasTitle = !!this.host.querySelector('[slot="title"]');
290
- }
291
- switchLanguageSwitchMode() {
292
- const variant = this.hasBurgerMenu ? 'list' : 'menu';
293
- Array.from(this.host.querySelectorAll('post-language-switch')).forEach(languageSwitch => {
294
- languageSwitch?.setAttribute('variant', variant);
295
- });
296
- }
297
- onFocusChange() {
298
- const fixedElements = this.device === 'desktop' ? '.logo, .navigation' : '.global-header, .burger-menu';
299
- const isHeaderExpanded = this.host.matches(':focus-within') &&
300
- !this.host.shadowRoot.querySelector(`:where(${fixedElements}):focus-within`);
301
- if (isHeaderExpanded) {
302
- this.host.setAttribute('data-expanded', '');
303
- }
304
- else {
305
- this.host.removeAttribute('data-expanded');
306
- }
307
- }
308
- renderNavigation() {
309
- if (this.device === 'desktop') {
310
- return (h("div", { class: { 'navigation': true, 'megadropdown-open': this.megadropdownOpen } }, h("slot", { name: "post-mainnavigation" }), h("div", { class: "navigation-controls" }, h("slot", { name: "navigation-controls" }))));
311
- }
312
- return (h("div", { class: {
313
- 'burger-menu': true,
314
- 'extended': this.burgerMenuExtended,
315
- 'no-navigation-controls': !this.hasNavigationControls,
316
- }, style: { '--post-header-navigation-current-inset': `${this.burgerMenu?.scrollTop ?? 0}px` }, ref: el => (this.burgerMenu = el) }, h("div", { class: "navigation-controls" }, h("slot", { name: "navigation-controls" })), h("div", { class: "burger-menu-body" }, h("slot", { name: "target-group" }), h("slot", { name: "post-mainnavigation" })), h("div", { class: "burger-menu-footer" }, h("slot", { name: "meta-navigation" }), h("slot", { name: "post-language-switch" }))));
317
- }
318
- render() {
319
- return (h(Host, { key: 'c9b1c1a946800f728a7a90a91dff3abf23b5100f', "data-version": version, "data-color-scheme": "light", "data-burger-menu": this.hasBurgerMenu }, h("div", { key: '21d2b9bd39946df7e42d3d5c763d40cd1dabee69', class: {
320
- 'global-header': true,
321
- 'no-target-group': !this.hasTargetGroup,
322
- } }, h("div", { key: '50cf30a8febea656eb3349e6c06dc5b609b13a6d', class: "logo" }, h("slot", { key: 'df1ecaca7b39316ef4d4bb56e33c3214b2648e68', name: "post-logo" })), h("div", { key: '9c4319dce10d9e98291a6cbdb0effb854a8b6dac', class: "sliding-controls" }, this.device === 'desktop' && (h("div", { key: 'ce916d4bdb65c641e58725f70b7689704847593c', class: "target-group" }, h("slot", { key: '810e4164ae17b8571011799307f3688cf64b5c30', name: "target-group" }))), h("slot", { key: 'abe6f2e08e87295e88e4cf33db0e72021d622aaf', name: "global-controls" }), !this.hasBurgerMenu && [
323
- h("slot", { key: '4ef5603837d0f26c25dd50bf17bb0011dc927de0', name: "meta-navigation" }),
324
- h("slot", { key: 'b1bc83f1bd5004af89e444a9bdf487225ac882d7', name: "post-language-switch" }),
325
- ], h("slot", { key: '11dfd54337cf457bc25ec680c8d4e11a6712dc63', name: "global-login" }), this.hasNavigation && this.device !== 'desktop' && (h("div", { key: '67658d80ce90f4446ea8d1078937101a299536b8', onClick: () => this.toggleBurgerMenu(), class: "burger-menu-toggle" }, h("slot", { key: '2fdba487922c63db152ec08e3382640c9cdf1c12', name: "post-togglebutton" }))))), h("div", { key: '1516e38c9628d8cfb75d6f9bd55912071da5e94e', class: {
326
- 'local-header': true,
327
- 'no-title': !this.hasTitle,
328
- 'no-target-group': !this.hasTargetGroup,
329
- 'no-navigation': this.device !== 'desktop' || !this.hasNavigation,
330
- 'no-navigation-controls': !this.hasNavigationControls,
331
- } }, h("slot", { key: '839b34249ece8af5cc53231271e739a6a664a977', name: "title" }), this.hasTitle && h("slot", { key: 'aa281968b58ecad425beb1b4ffbd1273cc167ea4', name: "local-controls" }), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
332
- }
333
- get host() { return this; }
334
- static get watchers() { return {
335
- "device": ["lockBody"],
336
- "burgerMenuExtended": ["lockBody"]
337
- }; }
338
- static get style() { return postHeaderCss; }
339
- }, [1, "post-header", {
340
- "device": [32],
341
- "hasNavigation": [32],
342
- "hasNavigationControls": [32],
343
- "hasTargetGroup": [32],
344
- "hasTitle": [32],
345
- "burgerMenuExtended": [32],
346
- "megadropdownOpen": [32],
347
- "toggleBurgerMenu": [64]
348
- }, [[0, "focusin", "onFocusChange"], [0, "focusout", "onFocusChange"]], {
349
- "device": ["lockBody"],
350
- "burgerMenuExtended": ["lockBody"]
351
- }]);
352
- __decorate([
353
- EventFrom('post-megadropdown')
354
- ], PostHeader$1.prototype, "megadropdownStateHandler", void 0);
355
- function defineCustomElement$1() {
356
- if (typeof customElements === "undefined") {
357
- return;
358
- }
359
- const components = ["post-header"];
360
- components.forEach(tagName => { switch (tagName) {
361
- case "post-header":
362
- if (!customElements.get(tagName)) {
363
- customElements.define(tagName, PostHeader$1);
364
- }
365
- break;
366
- } });
367
- }
368
-
369
- const PostHeader = PostHeader$1;
370
- const defineCustomElement = defineCustomElement$1;
371
-
372
- export { PostHeader, defineCustomElement };
1
+ import{proxyCustomElement as e,HTMLElement as t,h as o,Host as a,transformTag as i}from"@stencil/core/internal/client";import{c as s,t as n,g as r}from"./breakpoints.js";import{v as d}from"./package.js";import{f as l}from"./fade.js";import{a as h}from"./get-focusable-children.js";import{E as c}from"./event-from.js";import{d as p}from"./post-icon2.js";import{d as g}from"./post-togglebutton2.js";const u=e(class extends t{get hasBurgerMenu(){return"desktop"!==this.device&&this.hasNavigation}get scrollParent(){const e=document.querySelector("[data-post-scroll-locked]");if(e)return e;let t=this.host.parentElement;for(;t;){const e=getComputedStyle(t).overflowY;if(["auto","scroll"].includes(e))return t;t=t.parentElement}return document.body}validateFullWidth(){s(this,"fullWidth","boolean")}validateTextMenu(){s(this,"textMenu","string")}lockBody(e,t,o){const a=this.scrollParent;"desktop"!==this.device&&("burgerMenuExtended"===o?e:this.burgerMenuExtended)?(a.setAttribute("data-post-scroll-locked",""),this.host.addEventListener("keydown",this.keyboardHandler)):(a.removeAttribute("data-post-scroll-locked"),this.host.removeEventListener("keydown",this.keyboardHandler))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.throttledResize=n(50,(()=>this.updateLocalHeaderHeight())),this.animationOptions={duration:350,easing:"headerEase"},this.device=r.get("device"),this.hasNavigation=!1,this.hasLocalNav=!1,this.hasAudience=!1,this.hasTitle=!1,this.burgerMenuExtended=!1,this.megadropdownOpen=!1,this.fullWidth=!1,this.breakpointChange=e=>{this.device=e.detail,this.switchLanguageSwitchMode(),"desktop"===this.device&&this.burgerMenuExtended&&this.closeBurgerMenu(),"desktop"!==this.device&&(Array.from(this.host.querySelectorAll("post-megadropdown")).forEach((e=>{e.hide(!1,!0)})),this.megadropdownOpen=!1)},this.handleScrollEvent=this.handleScrollEvent.bind(this),this.updateScrollParentHeight=this.updateScrollParentHeight.bind(this),this.updateLocalHeaderHeight=this.updateLocalHeaderHeight.bind(this),this.keyboardHandler=this.keyboardHandler.bind(this),this.handleLinkClick=this.handleLinkClick.bind(this),this.megadropdownStateHandler=this.megadropdownStateHandler.bind(this),this.checkSlottedContent=this.checkSlottedContent.bind(this),this.megadropdownStateHandler=this.megadropdownStateHandler.bind(this)}connectedCallback(){window.addEventListener("resize",this.throttledResize,{passive:!0}),window.addEventListener("scroll",this.handleScrollEvent,{passive:!0}),this.scrollParent.addEventListener("scroll",this.handleScrollEvent,{passive:!0}),document.addEventListener("postToggleMegadropdown",this.megadropdownStateHandler),window.addEventListener("postBreakpoint:device",this.breakpointChange),this.handleScrollParentResize(),this.lockBody(!1,this.burgerMenuExtended,"burgerMenuExtended")}componentWillRender(){this.handleScrollEvent(),this.handleSlottedContentChanges(),this.switchLanguageSwitchMode()}componentDidRender(){this.validateTextMenu(),this.validateFullWidth(),this.getFocusableElements(),this.handleLocalHeaderResize()}componentDidLoad(){this.updateLocalHeaderHeight(),this.host.shadowRoot.addEventListener("click",this.handleLinkClick)}disconnectedCallback(){const e=this.scrollParent;window.removeEventListener("postBreakpoint:device",this.breakpointChange),window.removeEventListener("resize",this.throttledResize),window.removeEventListener("scroll",this.handleScrollEvent),e&&e.removeEventListener("scroll",this.handleScrollEvent),document.removeEventListener("postToggleMegadropdown",this.megadropdownStateHandler),this.host.removeEventListener("keydown",this.keyboardHandler),this.host.shadowRoot&&this.host.shadowRoot.removeEventListener("click",this.handleLinkClick),this.scrollParentResizeObserver&&(this.scrollParentResizeObserver.disconnect(),this.scrollParentResizeObserver=null),this.localHeaderResizeObserver&&(this.localHeaderResizeObserver.disconnect(),this.localHeaderResizeObserver=null),this.slottedContentObserver&&(this.slottedContentObserver.disconnect(),this.slottedContentObserver=null),this.burgerMenuExtended=!1}async closeBurgerMenu(){this.burgerMenuAnimation?.finish(),this.burgerMenuButton&&(this.burgerMenuButton.toggled=!1),this.burgerMenuExtended=!1}async toggleBurgerMenu(e){"desktop"!==this.device&&(this.burgerMenuAnimation=l(this.burgerMenu,this.burgerMenuExtended?"out":"in",this.animationOptions),this.burgerMenuButton&&(this.burgerMenuButton.toggled=e??!this.burgerMenuExtended),this.burgerMenuExtended?(await this.burgerMenuAnimation.finished,this.burgerMenuExtended=e??!this.burgerMenuExtended,!1===this.burgerMenuExtended&&(this.closeAllMegadropdowns(),this.burgerMenu.scrollTop=0)):(this.burgerMenuExtended=e??!this.burgerMenuExtended,this.megadropdownOpen&&this.closeAllMegadropdowns()))}megadropdownStateHandler(e){this.megadropdownOpen=e.detail.isVisible}getFocusableElements(){if(!this.burgerMenu)return;const e=[this.burgerMenuButton];e.push(...h(this.localHeader,(e=>!e.matches("post-megadropdown"))),...h(this.burgerMenu,(e=>!e.matches("post-megadropdown")))),this.firstFocusableEl=e[0],this.lastFocusableEl=e[e.length-1]}keyboardHandler(e){if("Tab"!==e.key||!this.burgerMenuExtended)return;const t=this.host.shadowRoot.activeElement||document.activeElement;e.shiftKey&&t===this.firstFocusableEl?(e.preventDefault(),this.lastFocusableEl.focus()):e.shiftKey||t!==this.lastFocusableEl||(e.preventDefault(),this.firstFocusableEl.focus())}closeAllMegadropdowns(){Array.from(this.host.querySelectorAll("post-megadropdown")).forEach((e=>{e.hide(!1,!0)})),this.megadropdownOpen=!1}handleScrollEvent(){const e=this.scrollParent===document.body?window.scrollY:this.scrollParent.scrollTop;document.documentElement.style.setProperty("--post-header-scroll-top",Math.max(e,0)+"px")}updateLocalHeaderHeight(){const e=this.host.shadowRoot.querySelector(".local-header");e&&document.documentElement.style.setProperty("--post-local-header-expanded-height",e.clientHeight+"px")}updateScrollParentHeight(){this.host.style.setProperty("--post-header-scroll-parent-height",this.scrollParent.clientHeight+"px")}handleLinkClick(e){const t=e.target,o=t.closest("post-mainnavigation a"),a=t.closest("post-megadropdown a");(o||a)&&(this.burgerMenuExtended&&(o||a)&&this.toggleBurgerMenu(!1),"desktop"===this.device&&a)&&t.closest("post-megadropdown a")&&t.closest("post-megadropdown").hide(!0)}handleScrollParentResize(){this.scrollParent&&(this.scrollParentResizeObserver=new ResizeObserver(this.updateScrollParentHeight),this.scrollParentResizeObserver.observe(this.scrollParent))}handleLocalHeaderResize(){const e=this.host.shadowRoot.querySelector(".local-header");e&&!this.localHeaderResizeObserver&&(this.localHeaderResizeObserver=new ResizeObserver(this.updateLocalHeaderHeight),this.localHeaderResizeObserver.observe(e))}handleSlottedContentChanges(){this.slottedContentObserver||(this.checkSlottedContent(),this.slottedContentObserver=new MutationObserver(this.checkSlottedContent),this.slottedContentObserver.observe(this.host,{childList:!0}))}checkSlottedContent(){this.hasNavigation=!!this.host.querySelector('[slot="main-nav"]'),this.hasLocalNav=!!this.host.querySelector('[slot="local-nav"]'),this.hasAudience=!!this.host.querySelector('[slot="audience"]'),this.hasTitle=!!this.host.querySelector('[slot="title"]')}switchLanguageSwitchMode(){const e=this.hasBurgerMenu?"list":"menu";Array.from(this.host.querySelectorAll("post-language-menu")).forEach((t=>{t?.setAttribute("variant",e)}))}onFocusChange(e){const t="desktop"===this.device?".navigation":".global-header, .burger-menu";e.target===document.activeElement&&this.host.matches(":focus-within")&&!this.host.shadowRoot.querySelector(`:where(${t}):focus-within`)?this.host.setAttribute("data-expanded",""):this.host.removeAttribute("data-expanded")}renderNavigation(){const e=!this.hasTitle&&o("div",{class:"local-nav"},o("slot",{name:"local-nav"}));return"desktop"===this.device?o("div",{class:{navigation:!0,"megadropdown-open":this.megadropdownOpen}},o("slot",{name:"main-nav"}),e):o("div",{class:{"burger-menu":!0,extended:this.burgerMenuExtended,"no-local-nav":!this.hasLocalNav,"megadropdown-open":this.megadropdownOpen},style:{"--post-header-navigation-current-inset":(this.burgerMenu?.scrollTop??0)+"px"},ref:e=>this.burgerMenu=e},e,o("div",{class:"burger-menu-body"},o("slot",{name:"audience"}),o("slot",{name:"main-nav"})),o("div",{class:"burger-menu-footer"},o("slot",{name:"global-nav-secondary"}),o("slot",{name:"language-menu"})))}render(){return o(a,{key:"3f5431ebd9b726f8a73ee4a0b8b406d11bab5cf2","data-version":d,"data-color-scheme":"light","data-burger-menu":this.hasBurgerMenu,"data-menu-extended":this.burgerMenuExtended},o("header",{key:"ea55944e7f5f0750e3cb229a94b2aef7738c397a"},o("div",{key:"f70653f47812b951519cc001a42d4827f327cffd",class:{"global-header":!0,"no-audience":!this.hasAudience}},o("div",{key:"60d43f32a71169d6d4314b9cc4d8a9e11ec7834e",class:"section"},o("div",{key:"ce0f3a9fff1225456f823189093fe960d3f49033",class:"logo"},o("slot",{key:"d96003c9bafbe7914b84a9f7b80ab8ed4bd71ddb",name:"post-logo"})),o("div",{key:"c85e70b4a9adbdd4d95c4ff8a53248b9b707ff2b",class:"sliding-controls"},"desktop"===this.device&&o("div",{key:"d297bba4782a50df1942d96a4eea6c9aeb76965d",class:"audience"},o("slot",{key:"8a923e9a27d811c204d212843b611885b1a2b257",name:"audience"})),o("slot",{key:"44a6294e62add92191e5ee8f6b0606a2e367a3d5",name:"global-nav-primary"}),!this.hasBurgerMenu&&[o("slot",{key:"843b9a656a289b51aea5db4634323999286ccb64",name:"global-nav-secondary"}),o("slot",{key:"55268cf25f98a76c377ad48c2578f2f8b3a5b025",name:"language-menu"})],o("slot",{key:"7885e754087572e48a0a62cccbbae3ea70a56bd3",name:"post-login"}),this.hasNavigation&&"desktop"!==this.device&&o("div",{key:"7713dede3877c4bd97cae59d78ea0a38daa15a8e",onClick:()=>this.toggleBurgerMenu(),class:"burger-menu-toggle"},o("slot",{key:"611df14f6646ae994ad090a482c20f09c3e1a39a",name:"post-togglebutton"})),this.hasNavigation&&"desktop"!==this.device&&o("post-togglebutton",{key:"e932a70cfd057cec4670867581e380d313cc23d1",ref:e=>this.burgerMenuButton=e,onClick:()=>this.toggleBurgerMenu()},o("span",{key:"c418e4ca4698ebefc5c7410cf6037620db0314f9"},this.textMenu),o("post-icon",{key:"438bfc7ee2f0d853fa92385c8e0f159608d76313","aria-hidden":"true",name:"burger","data-showwhen":"untoggled"}),o("post-icon",{key:"d6b48e5078b8e96d3fc8fef27a50544b3ed58355","aria-hidden":"true",name:"closex","data-showwhen":"toggled"}))))),o("div",{key:"0909b5778d908f48521abd7635bfd6eb320fc16a",ref:e=>this.localHeader=e,class:{"local-header":!0,"no-title":!this.hasTitle,"no-audience":!this.hasAudience,"no-navigation":"desktop"!==this.device||!this.hasNavigation,"no-local-nav":!this.hasLocalNav}},o("div",{key:"b5d0280efefc560a89f3a1cbeeeaec1b90a82359",class:"section"},o("slot",{key:"b0f25a30d6970cde7b1b9e3c1de1ffb667e4cb97",name:"title"}),this.hasTitle&&o("slot",{key:"9140fb3550e1f71824add9f90b43cf622223a4a1",name:"local-nav"}),"desktop"===this.device&&this.renderNavigation())),"desktop"!==this.device&&this.renderNavigation()))}get host(){return this}static get watchers(){return{fullWidth:[{validateFullWidth:0}],textMenu:[{validateTextMenu:0}],device:[{lockBody:0}],burgerMenuExtended:[{lockBody:0}]}}static get style(){return':host{--post-global-header-top:calc( var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height) );--post-header-top:calc(var(--post-header-reduced-height) - var(--post-header-expanded-height));--post-logo-height:calc( var(--post-global-header-expanded-height) - var(--post-header-scroll-top, 0px) );--post-global-controls-top:clamp( 1000 * (var(--post-global-header-reduced-height) - var(--post-global-header-expanded-height)), calc( -1 * min(var(--post-header-scroll-top, 0px) / 4, var(--post-global-header-reduced-height)) ), 0px )}@media screen and (min-width: 1024px){:host{--post-header-gap:0.25rem;--post-global-header-padding-inline-start:0.25rem;--post-global-header-padding-inline-end:0.5rem;--post-local-header-padding-inline-start:0.75rem;--post-local-header-padding-inline-end:0.5rem}}@media screen and (min-width: 600px)and (max-width: 1023.98px){:host{--post-header-gap:0.75rem 0.25rem;--post-global-header-padding-inline-start:0.25rem;--post-global-header-padding-inline-end:0.25rem;--post-local-header-padding-inline-start:0.75rem;--post-local-header-padding-inline-end:0.25rem;--post-local-header-padding-block:0rem;--post-burger-menu-padding-inline:2.5rem;--post-burger-menu-body-gap:2rem;--post-burger-menu-footer-gap:1.5rem}}@media screen and (min-width: 600px)and (max-width: 779.98px){:host{--post-burger-menu-padding-inline:1rem}}@media screen and (min-width: 0)and (max-width: 599.98px){:host{--post-header-gap:0.75rem 0.25rem;--post-global-header-padding-inline-start:0rem;--post-global-header-padding-inline-end:0.5rem;--post-local-header-padding-inline-start:0.5rem;--post-local-header-padding-inline-end:0.5rem;--post-local-header-padding-block:0rem;--post-burger-menu-padding-inline:1rem;--post-burger-menu-body-gap:1.5rem;--post-burger-menu-footer-gap:1rem}}:host(:not([full-width])),:host([full-width=false]){--post-header-content-max-width:1440px}:host([data-expanded]),:host([data-menu-extended]){--post-header-top:0;--post-global-header-top:-0.001px;--post-global-controls-top:0;--post-logo-height:var(--post-global-header-expanded-height)}*,::before,::after{box-sizing:border-box}:host,header,.global-header,.local-header{transition:inset-block-start 150ms cubic-bezier(0.4, 0, 0.2, 1)}.global-header,.local-header,.burger-menu{box-shadow:var(--post-device-elevation-300)}.section,.navigation,.sliding-controls{display:flex;align-items:center;justify-content:space-between;gap:var(--post-header-gap);flex-wrap:wrap}.section{max-width:var(--post-header-content-max-width);margin-inline:auto}:host{container-type:inline-size;display:block;position:sticky;inset-block-start:var(--post-header-top);z-index:1020}:host post-togglebutton{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;border:unset;font-weight:unset;display:flex;padding:.25rem .625rem;gap:.375rem;font-size:1rem;border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}:host post-togglebutton:hover{text-decoration:none}:host post-togglebutton:disabled{border-style:var(--post-core-border-style-dash)}:host post-togglebutton{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}:host post-togglebutton: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){:host post-togglebutton:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host post-togglebutton: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){:host post-togglebutton:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host post-togglebutton:is(a){color:LinkText;border:unset}:host post-togglebutton:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}:host post-togglebutton:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}:host post-togglebutton:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}:host post-togglebutton: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)}:host post-togglebutton:is([aria-current],[aria-pressed=true],[aria-expanded=true],.active){box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-primary-enabled-stroke);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg);color:var(--post-scheme-color-interactive-button-primary-enabled-fg)}:host post-togglebutton:is([aria-current],[aria-pressed=true],[aria-expanded=true],.active):hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg);color:var(--post-scheme-color-interactive-button-primary-hover-fg)}@media screen and (min-width: 0)and (max-width: 599.98px){:host post-togglebutton{padding:.625rem}:host post-togglebutton>:not(post-icon){display:none}:host post-togglebutton>post-icon{font-size:1.5rem}}.global-header{z-index:2;position:sticky;inset-block-start:var(--post-global-header-top);background-color:#fc0}.global-header .section{height:var(--post-global-header-expanded-height);padding-inline-start:var(--post-global-header-padding-inline-start);padding-inline-end:var(--post-global-header-padding-inline-end)}.global-header:has(~.local-header:not(.no-title.no-navigation)),.global-header:has(~.burger-menu.extended){box-shadow:none}.global-header .logo{align-self:flex-end;width:var(--post-global-header-expanded-height);height:var(--post-logo-height);min-height:var(--post-global-header-reduced-height);max-height:100%;margin-inline-end:calc(1.25rem - var(--post-header-gap))}.global-header .sliding-controls{flex-grow:1;justify-content:flex-end;position:relative;inset-block-start:var(--post-global-controls-top)}.global-header .audience{margin-inline-end:auto}.global-header.no-audience .audience{display:none}.local-header{position:relative;background-color:#fff}.local-header .section{min-height:var(--post-local-header-expanded-min-height);padding-inline-start:var(--post-local-header-padding-inline-start);padding-inline-end:var(--post-local-header-padding-inline-end);padding-block:var(--post-local-header-padding-block)}.local-header:not(.no-title,.no-navigation) .section{padding-block-start:1.125rem}.local-header.no-title.no-navigation{display:none}.local-header:has(.navigation.megadropdown-open),.local-header:has(~.burger-menu.extended){box-shadow:none}.local-header:has(.navigation.megadropdown-open)::after,.local-header:has(~.burger-menu.extended)::after{content:"";display:block;position:absolute;inset-inline:0;inset-block-end:0;height:1px;background-color:#e1e0dc}.local-header .navigation{flex:1 0 100%;height:var(--post-main-navigation-height);margin-inline-start:calc(-1*var(--post-local-header-padding-inline-start));max-width:100cqw}.local-header.no-navigation .navigation{display:none}.local-header .local-nav{flex:0 0 auto}.local-header.no-local-nav .navigation{margin-inline-end:calc(-1*var(--post-local-header-padding-inline-end))}.local-header.no-local-nav .local-nav{display:none}.burger-menu{z-index:-1;position:absolute;inset-inline:0;inset-block-start:100%;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height));overflow:hidden auto;display:flex;flex-direction:column;background-color:#fafafa}.burger-menu.extended.megadropdown-open{overflow:hidden}.burger-menu:not(.extended){transform:translateY(-100%);display:none}.burger-menu:not(.extended)>*{display:none}.burger-menu .burger-menu-body,.burger-menu .burger-menu-footer{display:flex;flex-direction:column;padding-inline:var(--post-burger-menu-padding-inline)}.burger-menu .burger-menu-body{flex-grow:1;padding-block:1.5rem;gap:var(--post-burger-menu-body-gap)}.burger-menu .burger-menu-footer{background-color:#f0efed;padding-block:1rem 1.5rem;gap:var(--post-burger-menu-footer-gap)}.burger-menu .local-nav{min-height:3.5rem;display:flex;align-items:center;justify-content:flex-end;padding-inline:.25rem}.burger-menu.no-local-nav .local-nav{display:none}'}},[257,"post-header",{fullWidth:[516,"full-width"],textMenu:[513,"text-menu"],device:[32],hasNavigation:[32],hasLocalNav:[32],hasAudience:[32],hasTitle:[32],burgerMenuExtended:[32],megadropdownOpen:[32],toggleBurgerMenu:[64]},[[0,"focusin","onFocusChange"],[0,"focusout","onFocusChange"]],{fullWidth:[{validateFullWidth:0}],textMenu:[{validateTextMenu:0}],device:[{lockBody:0}],burgerMenuExtended:[{lockBody:0}]}]);!function(e,t,o,a){var i,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,a);else for(var r=e.length-1;r>=0;r--)(i=e[r])&&(n=(s<3?i(n):s>3?i(t,o,n):i(t,o))||n);s>3&&n&&Object.defineProperty(t,o,n)}([c("post-megadropdown")],u.prototype,"megadropdownStateHandler",null);const b=u,m=function(){"undefined"!=typeof customElements&&["post-header","post-icon","post-togglebutton"].forEach((e=>{switch(e){case"post-header":customElements.get(i(e))||customElements.define(i(e),u);break;case"post-icon":customElements.get(i(e))||p();break;case"post-togglebutton":customElements.get(i(e))||g()}}))};export{b as PostHeader,m as defineCustomElement}
@@ -1,6 +1 @@
1
- import { P as PostIcon$1, d as defineCustomElement$1 } from './post-icon2.js';
2
-
3
- const PostIcon = PostIcon$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { PostIcon, defineCustomElement };
1
+ import{P as o,d as s}from"./post-icon2.js";const t=o,p=s;export{t as PostIcon,p as defineCustomElement}
@@ -1,159 +1 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { I as IS_BROWSER } from './breakpoints.js';
3
- import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './index2.js';
4
- import { v as version } from './package.js';
5
-
6
- 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)}}";
7
-
8
- const CDN_URL = `https://unpkg.com/@swisspost/design-system-icons@${version}/public/post-icons/`;
9
- const ANIMATION_NAMES = [
10
- 'cylon',
11
- 'cylon-vertical',
12
- 'spin',
13
- 'spin-reverse',
14
- 'fade',
15
- 'throb',
16
- ];
17
- const ANIMATION_KEYS = [...ANIMATION_NAMES];
18
- const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLElement {
19
- constructor() {
20
- super();
21
- this.__registerHost();
22
- this.__attachShadow();
23
- /**
24
- * When set to `true`, the icon will be flipped horizontally.
25
- */
26
- this.flipH = false;
27
- /**
28
- * When set to `true`, the icon will be flipped vertically.
29
- */
30
- this.flipV = false;
31
- }
32
- validateAnimation() {
33
- checkEmptyOrOneOf(this, 'animation', ANIMATION_KEYS);
34
- }
35
- validateBase() {
36
- checkEmptyOrType(this, 'base', 'string');
37
- }
38
- validateName() {
39
- checkRequiredAndType(this, 'name', 'string');
40
- }
41
- validateRotate() {
42
- checkEmptyOrType(this, 'rotate', 'number');
43
- }
44
- validateScale() {
45
- checkEmptyOrType(this, 'scale', 'number');
46
- }
47
- /**
48
- * Construct the icon URL according to the following rules:
49
- * 1. `@base` (absolute URL) → use directly.
50
- * 2. `@base` (relative URL) → resolve with `base href` and/or `origin`
51
- * - If `base href` is absolute → use just that.
52
- * - If `base href` is relative → prepend with `origin`.
53
- * - If `base href` does not exist → use only `origin`.
54
- * 3. `@meta` (absolute URL) → use directly.
55
- * 4. `@meta` (relative URL) → resolve with `base href` and/or `origin`. (same as above)
56
- * 5. `CDN_URL` fallback → `https://unpkg.com/...`.
57
- **/
58
- getUrl() {
59
- const fileName = `${this.name}.svg`;
60
- if (!IS_BROWSER && !this.base) {
61
- return `${CDN_URL}${fileName}`;
62
- }
63
- const isAbsolute = (url) => /^https?:\/\//.test(url);
64
- const normalizeUrl = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
65
- const cleanUrl = (url) => url.replace(/([^:])\/\//g, '$1/');
66
- const currentDomain = IS_BROWSER ? window.location.origin : '';
67
- const baseHref = IS_BROWSER
68
- ? document.querySelector('base[href]')?.getAttribute('href') || ''
69
- : '';
70
- const metaIconBase = IS_BROWSER
71
- ? document.querySelector('meta[name="design-system-settings"]')?.getAttribute('data-post-icon-base') || ''
72
- : '';
73
- // Function to build the first part of the URL when 'this.base' or 'metaIconBase' are relative
74
- const buildUrlWithBase = (relativeUrl) => {
75
- const normalizedHref = normalizeUrl(baseHref);
76
- const normalizedRelative = normalizeUrl(relativeUrl);
77
- if (isAbsolute(normalizedHref)) {
78
- return `${normalizedHref}${normalizedRelative}`;
79
- }
80
- return `${currentDomain}${normalizedHref}${normalizedRelative}`;
81
- };
82
- let url;
83
- // Highest Priority is this.base
84
- if (this.base) {
85
- url = isAbsolute(this.base)
86
- ? `${normalizeUrl(this.base)}${fileName}`
87
- : `${buildUrlWithBase(this.base)}${fileName}`;
88
- return cleanUrl(url);
89
- }
90
- // Second Priority is metaIconBase
91
- if (metaIconBase) {
92
- url = isAbsolute(metaIconBase)
93
- ? `${normalizeUrl(metaIconBase)}${fileName}`
94
- : `${buildUrlWithBase(metaIconBase)}${fileName}`;
95
- return cleanUrl(url);
96
- }
97
- // Fallback to CDN
98
- return cleanUrl(`${CDN_URL}${fileName}`);
99
- }
100
- getStyles() {
101
- const url = this.getUrl();
102
- return Object.entries({
103
- '-webkit-mask-image': `url(${url})`,
104
- 'mask-image': `url('${url}')`,
105
- 'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
106
- (this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
107
- })
108
- .filter(([_key, value]) => value !== null)
109
- .reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
110
- }
111
- componentDidLoad() {
112
- this.validateBase();
113
- this.validateName();
114
- this.validateScale();
115
- this.validateRotate();
116
- this.validateAnimation();
117
- }
118
- render() {
119
- return (h(Host, { key: '7ce1f627f621201c0f4d6e90ee3d8d6d3c32798a', "data-version": version }, h("span", { key: '987ecd266b8bd68bdbb06cdb500a746b913e79b1', style: this.getStyles() })));
120
- }
121
- get host() { return this; }
122
- static get watchers() { return {
123
- "animation": ["validateAnimation"],
124
- "base": ["validateBase"],
125
- "name": ["validateName"],
126
- "rotate": ["validateRotate"],
127
- "scale": ["validateScale"]
128
- }; }
129
- static get style() { return postIconCss; }
130
- }, [1, "post-icon", {
131
- "animation": [1],
132
- "base": [1],
133
- "flipH": [4, "flip-h"],
134
- "flipV": [4, "flip-v"],
135
- "name": [513],
136
- "rotate": [2],
137
- "scale": [2]
138
- }, undefined, {
139
- "animation": ["validateAnimation"],
140
- "base": ["validateBase"],
141
- "name": ["validateName"],
142
- "rotate": ["validateRotate"],
143
- "scale": ["validateScale"]
144
- }]);
145
- function defineCustomElement() {
146
- if (typeof customElements === "undefined") {
147
- return;
148
- }
149
- const components = ["post-icon"];
150
- components.forEach(tagName => { switch (tagName) {
151
- case "post-icon":
152
- if (!customElements.get(tagName)) {
153
- customElements.define(tagName, PostIcon);
154
- }
155
- break;
156
- } });
157
- }
158
-
159
- export { PostIcon as P, defineCustomElement as d };
1
+ import{proxyCustomElement as t,HTMLElement as a,h as e,Host as i,transformTag as n}from"@stencil/core/internal/client";import{I as s}from"./environment.js";import{d as o,e as r,c as l}from"./breakpoints.js";import{v as m}from"./package.js";const c=`https://unpkg.com/@swisspost/design-system-icons@${m}/public/post-icons/`,f=["cylon","cylon-vertical","spin","spin-reverse","fade","throb"],h=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.flipH=!1,this.flipV=!1}validateAnimation(){o(this,"animation",f)}validateBase(){r(this,"base","string")}validateName(){l(this,"name","string")}validateRotate(){r(this,"rotate","number")}validateScale(){r(this,"scale","number")}getUrl(){const t=`${this.name}.svg`;if(!s&&!this.base)return`${c}${t}`;const a=t=>/^https?:\/\//.test(t),e=t=>t&&!t.endsWith("/")?`${t}/`:t,i=t=>t.replace(/([^:])\/\//g,"$1/"),n=s?window.location.origin:"",o=s&&document.querySelector("base[href]")?.getAttribute("href")||"";let r="";if(s){const t=document.querySelector('meta[name="design-system-settings"]');r=t?.getAttribute("data-post-icon-base")||""}const l=t=>{const i=e(o),s=e(t);return a(i)?`${i}${s}`:`${n}${i}${s}`};let m;return this.base?(m=a(this.base)?`${e(this.base)}${t}`:`${l(this.base)}${t}`,i(m)):r?(m=a(r)?`${e(r)}${t}`:`${l(r)}${t}`,i(m)):i(`${c}${t}`)}getStyles(){const t=this.getUrl();return Object.entries({"-webkit-mask-image":`url(${t})`,"mask-image":`url('${t}')`,transform:(this.scale&&!isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([t,a])=>null!==a)).reduce(((t,[a,e])=>Object.assign(t,{[a]:e})),{})}componentDidLoad(){this.validateBase(),this.validateName(),this.validateScale(),this.validateRotate(),this.validateAnimation()}render(){return e(i,{key:"fe1b4d0541c75c1ed0adb92111d106ed874a9b2f","data-version":m},e("span",{key:"ca2b749e407d9ec54eb881c6662b59626e16083d",style:this.getStyles()}))}get host(){return this}static get watchers(){return{animation:[{validateAnimation:0}],base:[{validateBase:0}],name:[{validateName:0}],rotate:[{validateRotate:0}],scale:[{validateScale:0}]}}static get style(){return":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)}}"}},[1,"post-icon",{animation:[1],base:[1],flipH:[4,"flip-h"],flipV:[4,"flip-v"],name:[513],rotate:[2],scale:[2]},void 0,{animation:[{validateAnimation:0}],base:[{validateBase:0}],name:[{validateName:0}],rotate:[{validateRotate:0}],scale:[{validateScale:0}]}]);function p(){"undefined"!=typeof customElements&&["post-icon"].forEach((t=>{"post-icon"===t&&(customElements.get(n(t))||customElements.define(n(t),h))}))}export{h as P,p as d}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PostLanguageMenuItem extends Components.PostLanguageMenuItem, HTMLElement {}
4
+ export const PostLanguageMenuItem: {
5
+ prototype: PostLanguageMenuItem;
6
+ new (): PostLanguageMenuItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as a,Host as o,transformTag as n}from"@stencil/core/internal/client";import{c as s,d as r,e as l,a as u}from"./breakpoints.js";import{v as c}from"./package.js";import{S as d}from"./switch-variants.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.postChange=i(this,"postChange",7),this.postLanguageMenuItemInitiallyActive=i(this,"postLanguageMenuItemInitiallyActive",7)}validateCode(){s(this,"code","string")}validateVariant(){r(this,"variant",d)}validateName(){l(this,"name","string")}validateUrl(){u(this,"url")}componentDidLoad(){if(this.validateCode(),this.validateName(),this.validateUrl(),!this.name&&this.isNameRequired())throw Error('The "name" property of the post-language-menu-item component is required when the full language name is not displayed.');this.active&&this.postLanguageMenuItemInitiallyActive.emit(this.code)}async select(){this.active=!0,this.emitChange()}emitChange(){this.postChange.emit(this.code)}isNameRequired(){return this.host.textContent.toLowerCase()===this.code.toLowerCase()}render(){const t=this.code.toLowerCase(),e=t=>{"Enter"!==t.key&&" "!==t.key||this.emitChange()};return a(o,{key:"f95d1aba997cbb1b7b4805428443a35e9db4c8e6","data-version":c,role:"list"===this.variant?"listitem":void 0},this.url?a("a",{"aria-current":this.active?"page":void 0,href:this.url,hrefLang:t,lang:t,onClick:()=>this.emitChange(),onKeyDown:e},a("slot",null),a("span",{class:"visually-hidden"},this.name)):a("button",{"aria-current":this.active?"true":void 0,lang:t,onClick:()=>this.emitChange(),onKeyDown:e},a("slot",null),a("span",{class:"visually-hidden"},this.name)))}get host(){return this}static get watchers(){return{code:[{validateCode:0}],variant:[{validateVariant:0}],name:[{validateName:0}],url:[{validateUrl:0}]}}static get style(){return"post-language-menu-item{display:inline-block}post-language-menu-item button{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){post-language-menu-item button{background-color:ButtonFace !important}post-language-menu-item button:hover{background-color:Highlight !important}}post-language-menu-item button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-menu-item a{color:var(--post-current-fg);text-decoration:none}post-language-menu-item :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-menu-item :is(a,button){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-menu-item :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-menu-item :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-menu-item:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-menu-item:where([variant=list]) :is(a,button):hover{color:#504f4b}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item:where([variant=list]) :is(a,button){border:1px solid ButtonBorder;color:ButtonText}}post-language-menu-item:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-menu-item:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:Highlight !important;color:HighlightText}}post-language-menu-item:where([variant=menu]){min-width:72px}post-language-menu-item:where([variant=menu])[active]:not([active=false]){display:none}post-language-menu-item:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:16px;box-sizing:border-box;justify-content:flex-start;position:relative;border-radius:0}post-language-menu-item:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}post-language-menu-item:where([variant=menu]):first-child :is(a,button){border-start-start-radius:4px;border-start-end-radius:4px}post-language-menu-item:where([variant=menu]):last-child :is(a,button){border-end-start-radius:4px;border-end-end-radius:4px}"}},[260,"post-language-menu-item",{code:[513],active:[1540],variant:[1],name:[1],url:[1],select:[64]},void 0,{code:[{validateCode:0}],variant:[{validateVariant:0}],name:[{validateName:0}],url:[{validateUrl:0}]}]),m=h,g=function(){"undefined"!=typeof customElements&&["post-language-menu-item"].forEach((t=>{"post-language-menu-item"===t&&(customElements.get(n(t))||customElements.define(n(t),h))}))};export{m as PostLanguageMenuItem,g as defineCustomElement}