@swisspost/design-system-components 9.0.0-next.12 → 9.0.0-next.14

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 (452) hide show
  1. package/dist/.config/bindings.angular.js +4 -0
  2. package/dist/cjs/{attribute-observer-10f08c04.js → attribute-observer-6d8b886b.js} +4 -4
  3. package/dist/cjs/{check-one-of-f4f5d0c0.js → check-one-of-ef931478.js} +2 -1
  4. package/dist/cjs/{check-type-64af82a9.js → check-type-696d2c51.js} +4 -4
  5. package/dist/cjs/{check-url-3ffdd2fb.js → check-url-1cf6fb0d.js} +2 -1
  6. package/dist/cjs/{debounce-1151afe3.js → debounce-158fd76f.js} +2 -1
  7. package/dist/cjs/fade-72d5ef55.js +14 -0
  8. package/dist/cjs/{index-f1b08cdb.js → index-0ee3ab4a.js} +334 -152
  9. package/dist/cjs/{index-5d4e0aed.js → index-bea4ac42.js} +7 -5
  10. package/dist/cjs/index.cjs.js +30 -28
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{package-0bd6fb0d.js → package-7d11b6ea.js} +1 -1
  13. package/dist/cjs/{post-accordion-7aadd881.js → post-accordion-29861d97.js} +15 -8
  14. package/dist/cjs/{post-accordion-item-bd033c7f.js → post-accordion-item-0da0f7aa.js} +20 -13
  15. package/dist/cjs/post-accordion-item.cjs.entry.js +7 -7
  16. package/dist/cjs/post-accordion.cjs.entry.js +4 -4
  17. package/dist/cjs/{post-avatar-5dbdf70d.js → post-avatar-01b9cd6d.js} +29 -21
  18. package/dist/cjs/post-avatar.cjs.entry.js +3 -3
  19. package/dist/cjs/post-back-to-top-9a5647f7.js +80 -0
  20. package/dist/cjs/post-back-to-top.cjs.entry.js +5 -5
  21. package/dist/cjs/post-banner-33929088.js +110 -0
  22. package/dist/cjs/post-banner.cjs.entry.js +8 -8
  23. package/dist/cjs/{post-breadcrumb-531c4f79.js → post-breadcrumb-1384018e.js} +41 -34
  24. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +7 -7
  25. package/dist/cjs/post-breadcrumb.cjs.entry.js +5 -5
  26. package/dist/cjs/post-card-control-4c85eda3.js +314 -0
  27. package/dist/cjs/post-card-control.cjs.entry.js +4 -4
  28. package/dist/cjs/post-closebutton_15.cjs.entry.js +8 -8
  29. package/dist/cjs/{post-collapsible-trigger-02924200.js → post-collapsible-trigger-0fb2596a.js} +47 -35
  30. package/dist/cjs/post-collapsible_2.cjs.entry.js +8 -8
  31. package/dist/cjs/post-components.cjs.js +3 -3
  32. package/dist/cjs/{post-footer-96d7bd47.js → post-footer-f621a563.js} +18 -12
  33. package/dist/cjs/post-footer.cjs.entry.js +3 -3
  34. package/dist/cjs/post-linkarea-865079c1.js +32 -0
  35. package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
  36. package/dist/cjs/{post-menu-item-3f73fb4d.js → post-menu-item-ab3e2e7e.js} +12 -9
  37. package/dist/cjs/{post-popover-64195ffd.js → post-popover-a2ba9226.js} +24 -10
  38. package/dist/cjs/post-popover.cjs.entry.js +4 -4
  39. package/dist/cjs/{post-rating-bd27ebfc.js → post-rating-c402c294.js} +33 -10
  40. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  41. package/dist/cjs/post-tab-header-c819517d.js +36 -0
  42. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  43. package/dist/cjs/{post-tab-panel-3eedcd19.js → post-tab-panel-3cb207f3.js} +9 -6
  44. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  45. package/dist/cjs/{post-tabs-ea94b243.js → post-tabs-b6fa39c3.js} +29 -18
  46. package/dist/cjs/post-tabs.cjs.entry.js +4 -4
  47. package/dist/cjs/{post-tag-1d75024b.js → post-tag-9c366519.js} +20 -9
  48. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  49. package/dist/cjs/{post-togglebutton-876f7892.js → post-togglebutton-d49bec2c.js} +682 -221
  50. package/dist/cjs/{post-tooltip-e4ef3c7e.js → post-tooltip-425c01ba.js} +24 -12
  51. package/dist/cjs/post-tooltip.cjs.entry.js +8 -8
  52. package/dist/cjs/{slide-5d51abe8.js → slide-8ae17ee4.js} +4 -4
  53. package/dist/collection/animations/collapse.js +5 -5
  54. package/dist/collection/animations/fade.js +6 -2
  55. package/dist/collection/animations/slide.js +4 -4
  56. package/dist/collection/collection-manifest.json +4 -3
  57. package/dist/collection/components/post-accordion/post-accordion.js +16 -6
  58. package/dist/collection/components/post-accordion-item/post-accordion-item.js +21 -11
  59. package/dist/collection/components/post-avatar/post-avatar.js +35 -20
  60. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  61. package/dist/collection/components/post-back-to-top/post-back-to-top.js +14 -8
  62. package/dist/collection/components/post-banner/post-banner.css +1 -1
  63. package/dist/collection/components/post-banner/post-banner.js +40 -14
  64. package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +41 -31
  65. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +10 -6
  66. package/dist/collection/components/post-card-control/post-card-control.css +1 -1
  67. package/dist/collection/components/post-card-control/post-card-control.js +104 -43
  68. package/dist/collection/components/post-closebutton/post-closebutton.js +2 -1
  69. package/dist/collection/components/post-collapsible/post-collapsible.js +16 -6
  70. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +25 -21
  71. package/dist/collection/components/post-footer/post-footer.js +9 -5
  72. package/dist/collection/components/post-header/post-header.css +1 -1
  73. package/dist/collection/components/post-header/post-header.js +90 -15
  74. package/dist/collection/components/post-icon/post-icon.js +93 -23
  75. package/dist/collection/components/post-language-option/post-language-option.js +37 -8
  76. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
  77. package/dist/collection/components/post-language-switch/post-language-switch.js +24 -7
  78. package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
  79. package/dist/collection/components/post-linkarea/post-linkarea.js +32 -0
  80. package/dist/collection/components/post-list/post-list.js +19 -6
  81. package/dist/collection/components/post-list-item/post-list-item.js +2 -1
  82. package/dist/collection/components/post-logo/post-logo.js +8 -4
  83. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  84. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +197 -17
  85. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  86. package/dist/collection/components/post-megadropdown/post-megadropdown.js +134 -64
  87. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  88. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +18 -11
  89. package/dist/collection/components/post-menu/post-menu.js +56 -33
  90. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  91. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +24 -16
  92. package/dist/collection/components/post-popover/post-popover.css +1 -1
  93. package/dist/collection/components/post-popover/post-popover.js +26 -5
  94. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  95. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +55 -8
  96. package/dist/collection/components/post-rating/post-rating.js +39 -7
  97. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  98. package/dist/collection/components/post-tab-header/post-tab-header.js +9 -5
  99. package/dist/collection/components/post-tab-panel/post-tab-panel.js +9 -5
  100. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  101. package/dist/collection/components/post-tabs/post-tabs.js +25 -18
  102. package/dist/collection/components/post-tag/post-tag.css +1 -1
  103. package/dist/collection/components/post-tag/post-tag.js +23 -5
  104. package/dist/collection/components/post-togglebutton/post-togglebutton.js +18 -14
  105. package/dist/collection/components/post-tooltip/post-tooltip.js +26 -9
  106. package/dist/collection/index.js +1 -0
  107. package/dist/collection/utils/attribute-observer.js +4 -4
  108. package/dist/collection/utils/breakpoints.js +9 -6
  109. package/dist/collection/utils/component-on-ready.js +4 -4
  110. package/dist/collection/utils/debounce.js +2 -1
  111. package/dist/collection/utils/get-focusable-children.js +2 -2
  112. package/dist/collection/utils/property-checkers/check-one-of.js +2 -1
  113. package/dist/collection/utils/property-checkers/check-pattern.js +2 -1
  114. package/dist/collection/utils/property-checkers/check-type.js +4 -4
  115. package/dist/collection/utils/property-checkers/check-url.js +2 -1
  116. package/dist/collection/utils/property-checkers/empty-or.js +2 -1
  117. package/dist/collection/utils/sass-export.js +8 -5
  118. package/dist/components/index.js +36 -35
  119. package/dist/components/{post-collapsible-trigger2.js → p-05590ac0.js} +30 -27
  120. package/dist/components/{post-breadcrumb2.js → p-146677d1.js} +50 -43
  121. package/dist/components/p-1ee1742f.js +237 -0
  122. package/dist/components/p-2083ae2c.js +3 -0
  123. package/dist/components/{post-megadropdown-trigger2.js → p-27edc023.js} +21 -15
  124. package/dist/components/{post-tooltip2.js → p-2d9b46b4.js} +26 -14
  125. package/dist/components/p-38778a14.js +345 -0
  126. package/dist/components/p-3aba7629.js +29 -0
  127. package/dist/components/{post-togglebutton2.js → p-3cee636a.js} +20 -17
  128. package/dist/components/p-3e8554e7.js +1646 -0
  129. package/dist/components/p-424d5ea9.js +199 -0
  130. package/dist/components/p-46a6c5ec.js +168 -0
  131. package/dist/components/p-4965cfe1.js +145 -0
  132. package/{loaders/slide.js → dist/components/p-4af6dbed.js} +4 -4
  133. package/dist/components/{post-list2.js → p-536eba02.js} +19 -9
  134. package/dist/components/p-5653923a.js +44 -0
  135. package/dist/components/{post-footer2.js → p-58878996.js} +23 -17
  136. package/dist/components/{post-logo2.js → p-5f51ec58.js} +10 -7
  137. package/{loaders/post-popovercontainer2.js → dist/components/p-60cf53cc.js} +34 -11
  138. package/dist/components/p-64e3de38.js +11 -0
  139. package/dist/components/{post-accordion-item2.js → p-68ecd276.js} +26 -19
  140. package/dist/components/p-75b8b652.js +54 -0
  141. package/dist/components/{post-tab-panel2.js → p-78e1d893.js} +11 -8
  142. package/dist/components/{check-type.js → p-8562c7dc.js} +4 -4
  143. package/{loaders/post-menu-trigger2.js → dist/components/p-8b053fd5.js} +27 -20
  144. package/dist/components/{post-icon2.js → p-91031e3b.js} +85 -28
  145. package/dist/components/{post-menu2.js → p-91882483.js} +60 -65
  146. package/dist/{esm/attribute-observer-37fa950a.js → components/p-9748a355.js} +4 -4
  147. package/dist/components/{post-list-item2.js → p-9e4b1f10.js} +4 -4
  148. package/dist/components/{post-accordion2.js → p-a3a004e6.js} +17 -10
  149. package/dist/components/{post-popover2.js → p-af23f7de.js} +26 -12
  150. package/dist/components/{post-collapsible2.js → p-b018d864.js} +23 -14
  151. package/dist/components/{check-non-empty.js → p-b095519d.js} +1 -1
  152. package/dist/components/{check-one-of.js → p-bacd3e2c.js} +2 -1
  153. package/dist/components/{post-closebutton2.js → p-bf14d264.js} +6 -6
  154. package/dist/components/{post-breadcrumb-item2.js → p-c7c1d466.js} +13 -10
  155. package/dist/components/{post-tag2.js → p-cab43cee.js} +22 -11
  156. package/dist/components/{post-menu-item2.js → p-ccccf0c3.js} +4 -4
  157. package/dist/components/{post-tabs2.js → p-ce854a7d.js} +30 -19
  158. package/dist/components/{post-avatar2.js → p-d3fb70af.js} +31 -23
  159. package/dist/components/{post-language-option2.js → p-d47bb5bf.js} +32 -12
  160. package/dist/components/{debounce.js → p-e1baac59.js} +2 -1
  161. package/dist/components/{post-back-to-top2.js → p-e20366a6.js} +20 -15
  162. package/dist/components/{index2.js → p-eabb09ad.js} +9 -6
  163. package/dist/components/{post-language-switch2.js → p-f6d80d76.js} +29 -17
  164. package/dist/components/p-f7b9f90a.js +135 -0
  165. package/dist/components/{post-rating2.js → p-fc59de7c.js} +35 -12
  166. package/dist/components/post-accordion-item.js +1 -1
  167. package/dist/components/post-accordion.js +1 -1
  168. package/dist/components/post-avatar.js +1 -1
  169. package/dist/components/post-back-to-top.js +1 -1
  170. package/dist/components/post-banner.js +1 -1
  171. package/dist/components/post-breadcrumb-item.js +1 -1
  172. package/dist/components/post-breadcrumb.js +1 -1
  173. package/dist/components/post-card-control.js +1 -1
  174. package/dist/components/post-closebutton.js +1 -1
  175. package/dist/components/post-collapsible-trigger.js +1 -1
  176. package/dist/components/post-collapsible.js +1 -1
  177. package/dist/components/post-footer.js +1 -1
  178. package/dist/components/post-header.js +1 -1
  179. package/dist/components/post-icon.js +1 -1
  180. package/dist/components/post-language-option.js +1 -1
  181. package/dist/components/post-language-switch.js +1 -1
  182. package/dist/components/post-linkarea.d.ts +11 -0
  183. package/dist/components/post-linkarea.js +6 -0
  184. package/dist/components/post-list-item.js +1 -1
  185. package/dist/components/post-list.js +1 -1
  186. package/dist/components/post-logo.js +1 -1
  187. package/dist/components/post-mainnavigation.js +1 -1
  188. package/dist/components/post-megadropdown-trigger.js +1 -1
  189. package/dist/components/post-megadropdown.js +1 -1
  190. package/dist/components/post-menu-item.js +1 -1
  191. package/dist/components/post-menu-trigger.js +1 -1
  192. package/dist/components/post-menu.js +1 -1
  193. package/dist/components/post-popover.js +1 -1
  194. package/dist/components/post-popovercontainer.js +1 -1
  195. package/dist/components/post-rating.js +1 -1
  196. package/dist/components/post-tab-header.js +1 -1
  197. package/dist/components/post-tab-panel.js +1 -1
  198. package/dist/components/post-tabs.js +1 -1
  199. package/dist/components/post-tag.js +1 -1
  200. package/dist/components/post-togglebutton.js +1 -1
  201. package/dist/components/post-tooltip.js +1 -1
  202. package/dist/docs.d.ts +8 -0
  203. package/dist/docs.json +335 -156
  204. package/{loaders/attribute-observer.js → dist/esm/attribute-observer-2f203993.js} +4 -4
  205. package/{loaders/check-one-of.js → dist/esm/check-one-of-0d5858c0.js} +2 -1
  206. package/dist/esm/{check-type-8828dbe4.js → check-type-a6ccc9a3.js} +4 -4
  207. package/dist/esm/{check-url-a974431e.js → check-url-0bd876f7.js} +2 -1
  208. package/dist/esm/{debounce-abe98cc2.js → debounce-e54c7131.js} +2 -1
  209. package/dist/esm/fade-1f3cacf4.js +11 -0
  210. package/dist/esm/{index-6bfe6554.js → index-2c232bf2.js} +334 -152
  211. package/dist/esm/{index-b49c9904.js → index-d1bbbd88.js} +7 -5
  212. package/dist/esm/index.js +29 -28
  213. package/dist/esm/loader.js +3 -3
  214. package/dist/esm/package-8c98af5e.js +3 -0
  215. package/dist/esm/{post-accordion-ca48eb18.js → post-accordion-49fba403.js} +15 -8
  216. package/dist/esm/{post-accordion-item-a461f2a7.js → post-accordion-item-c516517a.js} +20 -13
  217. package/dist/esm/post-accordion-item.entry.js +7 -7
  218. package/dist/esm/post-accordion.entry.js +4 -4
  219. package/dist/esm/{post-avatar-0da1a2e8.js → post-avatar-b527ac63.js} +29 -21
  220. package/dist/esm/post-avatar.entry.js +3 -3
  221. package/dist/esm/post-back-to-top-f514c1f0.js +78 -0
  222. package/dist/esm/post-back-to-top.entry.js +5 -5
  223. package/dist/esm/post-banner-0ad7758b.js +108 -0
  224. package/dist/esm/post-banner.entry.js +8 -8
  225. package/dist/esm/{post-breadcrumb-85ffd02f.js → post-breadcrumb-57bca9dd.js} +41 -34
  226. package/dist/esm/post-breadcrumb-item_2.entry.js +7 -7
  227. package/dist/esm/post-breadcrumb.entry.js +5 -5
  228. package/dist/esm/post-card-control-ea741f60.js +312 -0
  229. package/dist/esm/post-card-control.entry.js +4 -4
  230. package/dist/esm/post-closebutton_15.entry.js +8 -8
  231. package/dist/esm/{post-collapsible-trigger-883db3bf.js → post-collapsible-trigger-31155750.js} +47 -35
  232. package/dist/esm/post-collapsible_2.entry.js +8 -8
  233. package/dist/esm/post-components.js +4 -4
  234. package/dist/esm/{post-footer-7b0eb067.js → post-footer-cdde2086.js} +18 -12
  235. package/dist/esm/post-footer.entry.js +3 -3
  236. package/dist/esm/post-linkarea-cad95623.js +30 -0
  237. package/dist/esm/post-linkarea.entry.js +3 -0
  238. package/dist/esm/{post-menu-item-37f637a3.js → post-menu-item-db732728.js} +12 -9
  239. package/dist/esm/{post-popover-c24ecd38.js → post-popover-00f427ac.js} +24 -10
  240. package/dist/esm/post-popover.entry.js +4 -4
  241. package/dist/esm/{post-rating-e1c66e5c.js → post-rating-cdcb2a1d.js} +33 -10
  242. package/dist/esm/post-rating.entry.js +3 -3
  243. package/dist/esm/post-tab-header-1d4113cb.js +34 -0
  244. package/dist/esm/post-tab-header.entry.js +3 -3
  245. package/dist/esm/{post-tab-panel-73b56a16.js → post-tab-panel-7a5c03ef.js} +9 -6
  246. package/dist/esm/post-tab-panel.entry.js +3 -3
  247. package/dist/esm/{post-tabs-02e523b8.js → post-tabs-308190c0.js} +29 -18
  248. package/dist/esm/post-tabs.entry.js +4 -4
  249. package/dist/esm/{post-tag-43aba068.js → post-tag-aebbda10.js} +20 -9
  250. package/dist/esm/post-tag.entry.js +3 -3
  251. package/dist/esm/{post-togglebutton-c2231709.js → post-togglebutton-95ba85d2.js} +682 -221
  252. package/dist/esm/{post-tooltip-8271950c.js → post-tooltip-918d3a54.js} +24 -12
  253. package/dist/esm/post-tooltip.entry.js +8 -8
  254. package/dist/{components/slide.js → esm/slide-62768431.js} +4 -4
  255. package/dist/post-components/index.esm.js +1 -1
  256. package/dist/post-components/p-037d6ef2.entry.js +1 -0
  257. package/dist/post-components/p-1e69a72f.js +1 -0
  258. package/dist/post-components/p-1fda117c.js +1 -0
  259. package/dist/post-components/p-2083ae2c.js +1 -0
  260. package/dist/post-components/p-24297444.js +1 -0
  261. package/dist/post-components/{p-e2f886ab.js → p-267f52a9.js} +3 -3
  262. package/dist/post-components/p-2e6c5b60.js +1 -0
  263. package/dist/post-components/p-3591d4e3.entry.js +1 -0
  264. package/dist/post-components/p-3dec4425.entry.js +1 -0
  265. package/dist/post-components/p-423aecd4.js +1 -0
  266. package/dist/post-components/p-43221de8.entry.js +1 -0
  267. package/dist/post-components/p-48fd00e7.entry.js +1 -0
  268. package/dist/post-components/p-4af6dbed.js +1 -0
  269. package/dist/post-components/p-4ca79b52.js +1 -0
  270. package/dist/post-components/p-4d2dee9f.entry.js +1 -0
  271. package/dist/post-components/p-4fedef65.js +1 -0
  272. package/dist/post-components/p-59109b3b.entry.js +1 -0
  273. package/dist/post-components/p-64e3de38.js +1 -0
  274. package/dist/post-components/p-675352c3.entry.js +1 -0
  275. package/dist/post-components/p-6e4527d9.entry.js +1 -0
  276. package/dist/post-components/p-726bfda2.js +1 -0
  277. package/dist/post-components/p-767c0bf3.js +1 -0
  278. package/dist/post-components/p-796968bd.entry.js +1 -0
  279. package/dist/post-components/p-7c9758fa.js +1 -0
  280. package/dist/post-components/p-8a452260.js +1 -0
  281. package/dist/post-components/p-8a50b900.js +1 -0
  282. package/dist/post-components/p-8de4f677.entry.js +1 -0
  283. package/dist/post-components/p-93632808.js +1 -0
  284. package/dist/post-components/p-9748a355.js +1 -0
  285. package/dist/post-components/p-9aca3d07.entry.js +1 -0
  286. package/dist/post-components/p-9f0c5164.js +1 -0
  287. package/dist/post-components/p-a6436e7f.js +1 -0
  288. package/dist/post-components/p-ad246c0d.js +1 -0
  289. package/dist/post-components/p-b015efcb.entry.js +1 -0
  290. package/dist/post-components/p-b0afc087.entry.js +1 -0
  291. package/dist/post-components/p-b1adc221.js +1 -0
  292. package/dist/post-components/p-b2c0d21a.js +1 -0
  293. package/dist/post-components/p-b5a566f1.js +1 -0
  294. package/dist/post-components/p-c0961047.entry.js +1 -0
  295. package/dist/post-components/p-c388b7bb.entry.js +1 -0
  296. package/dist/post-components/{p-c510d968.entry.js → p-ca41b899.entry.js} +1 -1
  297. package/dist/post-components/p-d2395ae9.entry.js +1 -0
  298. package/dist/post-components/p-d9833667.js +2 -0
  299. package/dist/post-components/p-da261c46.entry.js +1 -0
  300. package/dist/post-components/post-components.esm.js +1 -1
  301. package/dist/types/animations/collapse.d.ts +2 -2
  302. package/dist/types/animations/fade.d.ts +2 -2
  303. package/dist/types/animations/slide.d.ts +2 -2
  304. package/dist/types/components/post-header/post-header.d.ts +11 -2
  305. package/dist/types/components/post-icon/post-icon.d.ts +1 -1
  306. package/dist/types/components/post-language-switch/post-language-switch.d.ts +1 -1
  307. package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
  308. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +57 -3
  309. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +26 -12
  310. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +4 -0
  311. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  312. package/dist/types/components.d.ts +51 -25
  313. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
  314. package/dist/types/index.d.ts +3 -2
  315. package/dist/types/stencil-public-runtime.d.ts +6 -0
  316. package/dist/types/utils/attribute-observer.d.ts +1 -1
  317. package/dist/types/utils/component-on-ready.d.ts +1 -1
  318. package/dist/types/utils/get-focusable-children.d.ts +1 -1
  319. package/dist/types/utils/sass-export.d.ts +5 -1
  320. package/loaders/index.d.ts +2 -0
  321. package/loaders/index.js +3 -2
  322. package/loaders/{post-collapsible-trigger2.js → p-05590ac0.js} +30 -27
  323. package/loaders/{post-breadcrumb-item2.js → p-1beacb73.js} +13 -10
  324. package/loaders/p-2083ae2c.js +3 -0
  325. package/loaders/p-3aba7629.js +29 -0
  326. package/loaders/p-3e8554e7.js +1646 -0
  327. package/{dist/esm/slide-3422b8a3.js → loaders/p-4af6dbed.js} +4 -4
  328. package/loaders/{index2.js → p-56ad4838.js} +9 -6
  329. package/{dist/components/post-popovercontainer2.js → loaders/p-60cf53cc.js} +34 -11
  330. package/loaders/p-64e3de38.js +11 -0
  331. package/loaders/{post-accordion-item2.js → p-83baa315.js} +26 -19
  332. package/loaders/{check-type.js → p-8562c7dc.js} +4 -4
  333. package/{dist/components/post-menu-trigger2.js → loaders/p-8b053fd5.js} +27 -20
  334. package/loaders/{post-menu2.js → p-91882483.js} +60 -65
  335. package/{dist/components/attribute-observer.js → loaders/p-9748a355.js} +4 -4
  336. package/loaders/{post-collapsible2.js → p-9fac5d7d.js} +23 -14
  337. package/loaders/{check-non-empty.js → p-b095519d.js} +1 -1
  338. package/{dist/esm/check-one-of-6b3ef8eb.js → loaders/p-bacd3e2c.js} +2 -1
  339. package/loaders/{post-menu-item2.js → p-ccccf0c3.js} +4 -4
  340. package/loaders/{debounce.js → p-e1baac59.js} +2 -1
  341. package/loaders/{post-icon2.js → p-f7177e26.js} +85 -28
  342. package/loaders/p-f7b9f90a.js +135 -0
  343. package/loaders/post-accordion-item.js +1 -1
  344. package/loaders/post-accordion.js +17 -10
  345. package/loaders/post-avatar.js +31 -23
  346. package/loaders/post-back-to-top.js +20 -15
  347. package/loaders/post-banner.js +42 -23
  348. package/loaders/post-breadcrumb-item.js +1 -1
  349. package/loaders/post-breadcrumb.js +50 -43
  350. package/loaders/post-card-control.js +93 -51
  351. package/loaders/post-closebutton.js +6 -6
  352. package/loaders/post-collapsible-trigger.js +1 -1
  353. package/loaders/post-collapsible.js +1 -1
  354. package/loaders/post-footer.js +23 -17
  355. package/loaders/post-header.js +74 -154
  356. package/loaders/post-icon.js +1 -1
  357. package/loaders/post-language-option.js +32 -12
  358. package/loaders/post-language-switch.js +29 -17
  359. package/loaders/post-linkarea.d.ts +11 -0
  360. package/loaders/post-linkarea.js +47 -0
  361. package/loaders/post-list-item.js +4 -4
  362. package/loaders/post-list.js +19 -9
  363. package/loaders/post-logo.js +10 -7
  364. package/loaders/post-mainnavigation.js +197 -8
  365. package/loaders/post-megadropdown-trigger.js +21 -15
  366. package/loaders/post-megadropdown.js +119 -51
  367. package/loaders/post-menu-item.js +1 -1
  368. package/loaders/post-menu-trigger.js +1 -1
  369. package/loaders/post-menu.js +1 -1
  370. package/loaders/post-popover.js +26 -12
  371. package/loaders/post-popovercontainer.js +1 -1
  372. package/loaders/post-rating.js +35 -12
  373. package/loaders/post-tab-header.js +13 -10
  374. package/loaders/post-tab-panel.js +11 -8
  375. package/loaders/post-tabs.js +30 -19
  376. package/loaders/post-tag.js +22 -11
  377. package/loaders/post-togglebutton.js +20 -17
  378. package/loaders/post-tooltip.js +26 -14
  379. package/package.json +19 -16
  380. package/dist/cjs/fade-35a3633a.js +0 -10
  381. package/dist/cjs/post-back-to-top-71bc912c.js +0 -75
  382. package/dist/cjs/post-banner-d4e0c73c.js +0 -91
  383. package/dist/cjs/post-card-control-332f6f1f.js +0 -272
  384. package/dist/cjs/post-tab-header-1f057694.js +0 -33
  385. package/dist/components/fade.js +0 -7
  386. package/dist/components/package.js +0 -3
  387. package/dist/components/post-banner2.js +0 -126
  388. package/dist/components/post-card-control2.js +0 -303
  389. package/dist/components/post-header2.js +0 -279
  390. package/dist/components/post-mainnavigation2.js +0 -48
  391. package/dist/components/post-megadropdown2.js +0 -100
  392. package/dist/components/post-tab-header2.js +0 -51
  393. package/dist/esm/fade-7fd71785.js +0 -7
  394. package/dist/esm/package-f8f7bb40.js +0 -3
  395. package/dist/esm/post-back-to-top-77471a90.js +0 -73
  396. package/dist/esm/post-banner-b0af5bd3.js +0 -89
  397. package/dist/esm/post-card-control-3225eb57.js +0 -270
  398. package/dist/esm/post-tab-header-6a9b0153.js +0 -31
  399. package/dist/post-components/p-025688e5.js +0 -1
  400. package/dist/post-components/p-08b51b35.entry.js +0 -1
  401. package/dist/post-components/p-0e216cc4.js +0 -2
  402. package/dist/post-components/p-24c92608.js +0 -1
  403. package/dist/post-components/p-25a57971.js +0 -1
  404. package/dist/post-components/p-2737eaf5.js +0 -1
  405. package/dist/post-components/p-2cb4a8f1.js +0 -1
  406. package/dist/post-components/p-33b64e0c.js +0 -1
  407. package/dist/post-components/p-34d70cd5.js +0 -1
  408. package/dist/post-components/p-350f3900.entry.js +0 -1
  409. package/dist/post-components/p-35bc4554.js +0 -1
  410. package/dist/post-components/p-38b259a4.entry.js +0 -1
  411. package/dist/post-components/p-3c6cef1e.entry.js +0 -1
  412. package/dist/post-components/p-4a713cf8.js +0 -1
  413. package/dist/post-components/p-4b5e2b24.js +0 -1
  414. package/dist/post-components/p-515e0f96.js +0 -1
  415. package/dist/post-components/p-5467b223.js +0 -1
  416. package/dist/post-components/p-54e58fc2.entry.js +0 -1
  417. package/dist/post-components/p-637759d6.js +0 -1
  418. package/dist/post-components/p-6adeaa6c.js +0 -1
  419. package/dist/post-components/p-7589a19f.js +0 -1
  420. package/dist/post-components/p-7cce7342.entry.js +0 -1
  421. package/dist/post-components/p-819e19de.js +0 -1
  422. package/dist/post-components/p-82d48128.js +0 -1
  423. package/dist/post-components/p-85171893.entry.js +0 -1
  424. package/dist/post-components/p-882fdd0c.entry.js +0 -1
  425. package/dist/post-components/p-94399c69.js +0 -1
  426. package/dist/post-components/p-9a02b162.entry.js +0 -1
  427. package/dist/post-components/p-b1f5bc26.js +0 -1
  428. package/dist/post-components/p-b2f239a1.entry.js +0 -1
  429. package/dist/post-components/p-b571e5c8.js +0 -1
  430. package/dist/post-components/p-ba530822.js +0 -1
  431. package/dist/post-components/p-bae1c85f.entry.js +0 -1
  432. package/dist/post-components/p-bdabdec5.js +0 -1
  433. package/dist/post-components/p-c1225174.entry.js +0 -1
  434. package/dist/post-components/p-c372a141.entry.js +0 -1
  435. package/dist/post-components/p-c87c5d59.entry.js +0 -1
  436. package/dist/post-components/p-d04c1b7f.entry.js +0 -1
  437. package/dist/post-components/p-da300843.entry.js +0 -1
  438. package/dist/post-components/p-fec04a15.entry.js +0 -1
  439. package/loaders/fade.js +0 -7
  440. package/loaders/package.js +0 -3
  441. /package/dist/components/{heading-levels.js → p-247a1668.js} +0 -0
  442. /package/dist/components/{constants.js → p-440193f4.js} +0 -0
  443. /package/dist/components/{index.browser.js → p-5959f2bd.js} +0 -0
  444. /package/dist/components/{get-root.js → p-fc91cbc2.js} +0 -0
  445. /package/dist/post-components/{p-4a3f67ab.js → p-8562c7dc.js} +0 -0
  446. /package/dist/post-components/{p-611b3c41.js → p-bacd3e2c.js} +0 -0
  447. /package/dist/post-components/{p-b22656b1.js → p-cb9ab938.js} +0 -0
  448. /package/dist/post-components/{p-d4f93f2b.js → p-e1baac59.js} +0 -0
  449. /package/loaders/{heading-levels.js → p-247a1668.js} +0 -0
  450. /package/loaders/{constants.js → p-440193f4.js} +0 -0
  451. /package/loaders/{index.browser.js → p-5959f2bd.js} +0 -0
  452. /package/loaders/{get-root.js → p-fc91cbc2.js} +0 -0
@@ -0,0 +1,199 @@
1
+ import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-3e8554e7.js';
2
+ import { t as throttle } from './p-f7b9f90a.js';
3
+ import { v as version } from './p-2083ae2c.js';
4
+ import { s as slideUp, a as slideDown } from './p-4af6dbed.js';
5
+ import { g as getFocusableChildren } from './p-3aba7629.js';
6
+
7
+ const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1090;--global-header-height:72px;--global-header-minimal-height:24px;--local-header-height:112px;--local-header-min-height:56px;--header-height:calc(var(--global-header-height) + var(--local-header-height));z-index:1020;position:relative}@media screen and (min-width: 1024px){:host{--global-header-reduced-height:24px;--main-navigation-height:56px}}@media screen and (max-width: 1023.98px){:host{--global-header-height:64px;--local-header-height:48px;--local-header-min-height:48px;--main-navigation-height:0px}}:host(:not(:has([slot=title]))){--local-header-height:var(--main-navigation-height)}: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;align-items:center;position:sticky;padding-inline:var(--post-core-dimension-4);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:var(--post-core-dimension-12);inset-block-start:calc((var(--global-header-height) - var(--global-header-reduced-height))*-1)}}slot[name=post-logo]{align-self:flex-end}.global-sub{display:flex;align-items:center;gap:var(--post-core-dimension-24)}.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{height:calc(var(--global-header-height) - var(--header-scroll-top))}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-left:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--post-core-dimension-8);min-height:var(--local-header-min-height);background:var(--post-core-color-brand-white);transition:box-shadow .2s ease-in-out}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:calc(-1*(var(--local-header-height) - var(--main-navigation-height)) + var(--global-header-reduced-height));padding-block-start:var(--post-core-dimension-18);box-shadow:var(--post-core-elevation-3)}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--global-header-height);padding-block:var(--post-core-dimension-9);flex-wrap:wrap}.local-header.local-header-mobile-extended{border-bottom:1px solid var(--post-core-color-sandgrey-012)}.local-header:not(.title-header-mobile-extended){box-shadow:var(--post-core-elevation-3)}}.local-sub{margin-inline-end:var(--post-core-dimension-16)}::slotted(.list-inline){margin:-8px 0 !important;z-index:3 !important;position:relative !important}::slotted(h1){margin:0 !important;flex-shrink:10;z-index:3}@media screen and (min-width: 600px){::slotted(h1){margin-inline-start:var(--post-core-dimension-12) !important}}@media screen and (max-width: 599.98px){::slotted(h1){margin-inline-start:var(--post-core-dimension-8) !important}}@media screen and (min-width: 1024px){::slotted(h1){font-size:var(--post-core-font-size-28) !important}}@media screen and (max-width: 1023.98px){::slotted(h1){font-size:var(--post-core-font-size-20) !important;max-width:calc(100vw - var(--post-core-dimension-8) - var(--post-core-dimension-16))}}@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-minimal-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:var(--post-core-color-brand-white)}}@media screen and (max-width: 1023.98px){.navigation{position:fixed;z-index:1;inset-inline:0;background:var(--post-core-color-brand-white);inset-block-end:calc(100vh - var(--header-height))}::slotted(post-mainnavigation),.navigation-footer{display:none;flex-direction:column;padding-block:var(--post-core-dimension-16) var(--post-core-dimension-24);padding-inline:var(--post-core-dimension-32)}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer{display:flex}.navigation.extended{height:calc(100vh - var(--header-height));display:flex;flex-direction:column}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}::slotted(post-mainnavigation){background-color:var(--post-core-color-sandgrey-002);gap:var(--post-core-dimension-32)}.navigation-footer{background-color:var(--post-core-color-sandgrey-006);gap:var(--post-core-dimension-24)}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:var(--post-core-dimension-16)}}";
8
+ const PostHeaderStyle0 = postHeaderCss;
9
+
10
+ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.postUpdateDevice = createEvent(this, "postUpdateDevice", 7);
16
+ }
17
+ firstFocusableEl;
18
+ lastFocusableEl;
19
+ scrollParent = null;
20
+ mobileMenu;
21
+ mobileMenuAnimation;
22
+ throttledScroll = () => this.handleScrollEvent();
23
+ throttledResize = throttle(50, () => this.handleResize());
24
+ componentWillRender() {
25
+ this.scrollParent = this.getScrollParent(this.host);
26
+ this.scrollParent.addEventListener('scroll', this.throttledScroll, { passive: true });
27
+ window.addEventListener('resize', this.throttledResize, { passive: true });
28
+ this.handleResize();
29
+ this.handleScrollEvent();
30
+ this.getFocusableElements();
31
+ }
32
+ get host() { return this; }
33
+ device = null;
34
+ mobileMenuExtended = false;
35
+ frozeBody(isMobileMenuExtended) {
36
+ document.body.style.overflow = isMobileMenuExtended ? 'hidden' : '';
37
+ if (isMobileMenuExtended) {
38
+ this.host.addEventListener('keydown', e => {
39
+ this.keyboardHandler(e);
40
+ });
41
+ }
42
+ else {
43
+ this.host.removeEventListener('keydown', e => {
44
+ this.keyboardHandler(e);
45
+ });
46
+ }
47
+ }
48
+ /**
49
+ * An event emitted when the device has changed
50
+ */
51
+ postUpdateDevice;
52
+ /**
53
+ * Toggles the mobile navigation.
54
+ */
55
+ async toggleMobileMenu() {
56
+ if (this.device === 'desktop')
57
+ return;
58
+ this.mobileMenuAnimation = this.mobileMenuExtended
59
+ ? slideUp(this.mobileMenu)
60
+ : slideDown(this.mobileMenu);
61
+ // Update the state of the toggle button
62
+ const menuButton = this.host.querySelector('post-togglebutton');
63
+ menuButton.toggled = !this.mobileMenuExtended;
64
+ // Toggle menu visibility before it slides down and after it slides back up
65
+ if (this.mobileMenuExtended)
66
+ await this.mobileMenuAnimation.finished;
67
+ this.mobileMenuExtended = !this.mobileMenuExtended;
68
+ if (!this.mobileMenuExtended)
69
+ await this.mobileMenuAnimation.finished;
70
+ }
71
+ // Get all the focusable elements in the post-header mobile menu
72
+ getFocusableElements() {
73
+ // Get elements in the correct order (different as the DOM order)
74
+ const focusableEls = [
75
+ ...Array.from(this.host.querySelectorAll('.list-inline:not([slot="meta-navigation"]) > li')),
76
+ ...Array.from(this.host.querySelectorAll('nav > post-list > div > post-list-item, post-mainnavigation > .back-button, post-megadropdown-trigger')),
77
+ ...Array.from(this.host.querySelectorAll('.list-inline[slot="meta-navigation"] > li, post-language-option')),
78
+ ];
79
+ // Add the main toggle menu button to the list of focusable children
80
+ const focusableChildren = [
81
+ this.host.querySelector('post-togglebutton'),
82
+ ...focusableEls.flatMap(el => Array.from(getFocusableChildren(el))),
83
+ ];
84
+ this.firstFocusableEl = focusableChildren[0];
85
+ this.lastFocusableEl = focusableChildren[focusableChildren.length - 1];
86
+ }
87
+ keyboardHandler(e) {
88
+ if (e.key === 'Tab' && this.mobileMenuExtended) {
89
+ if (e.shiftKey && document.activeElement === this.firstFocusableEl) {
90
+ // If back tab (Tab + Shift) and first element is focused, focus goes to the last element of the megadropdown
91
+ e.preventDefault();
92
+ this.lastFocusableEl.focus();
93
+ }
94
+ else if (!e.shiftKey && document.activeElement === this.lastFocusableEl) {
95
+ // If Tab and last element is focused, focus goes back to the first element of the megadropdown
96
+ e.preventDefault();
97
+ this.firstFocusableEl.focus();
98
+ }
99
+ }
100
+ }
101
+ handleScrollEvent() {
102
+ // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
103
+ const st = Math.max(0, this.scrollParent instanceof Document
104
+ ? this.scrollParent.documentElement.scrollTop
105
+ : this.scrollParent.scrollTop);
106
+ this.host.style.setProperty('--header-scroll-top', `${st}px`);
107
+ }
108
+ getScrollParent(node) {
109
+ let currentParent = node.parentElement;
110
+ while (currentParent) {
111
+ if (currentParent.nodeName === 'BODY') {
112
+ return document;
113
+ }
114
+ if (this.isScrollable(currentParent)) {
115
+ return currentParent;
116
+ }
117
+ currentParent = currentParent.parentElement;
118
+ }
119
+ return document;
120
+ }
121
+ isScrollable(node) {
122
+ if (!(node instanceof H || node instanceof SVGElement)) {
123
+ return false;
124
+ }
125
+ const style = getComputedStyle(node);
126
+ return ['overflow', 'overflow-x', 'overflow-y'].some(propertyName => {
127
+ const value = style.getPropertyValue(propertyName);
128
+ return value === 'auto' || value === 'scroll';
129
+ });
130
+ }
131
+ handleResize() {
132
+ const previousDevice = this.device;
133
+ let newDevice;
134
+ const width = window?.innerWidth;
135
+ if (width >= 1024) {
136
+ newDevice = 'desktop';
137
+ }
138
+ else if (width >= 600) {
139
+ newDevice = 'tablet';
140
+ }
141
+ else {
142
+ newDevice = 'mobile';
143
+ }
144
+ // Close any open mobile menu
145
+ if (newDevice === 'desktop' && this.mobileMenuExtended) {
146
+ this.toggleMobileMenu();
147
+ this.mobileMenuAnimation.finish(); // no animation
148
+ }
149
+ const mhh = this.host.shadowRoot.querySelector('.local-header')?.clientHeight;
150
+ this.host.style.setProperty('--main-header-height', `${mhh}px`);
151
+ // Apply only on change for doing work only when necessary
152
+ if (newDevice !== previousDevice) {
153
+ this.device = newDevice;
154
+ this.postUpdateDevice.emit(this.device);
155
+ window.requestAnimationFrame(() => {
156
+ this.switchLanguageSwitchMode();
157
+ });
158
+ }
159
+ }
160
+ switchLanguageSwitchMode() {
161
+ const variant = this.device === 'desktop' ? 'menu' : 'list';
162
+ this.host.querySelector('post-language-switch')?.setAttribute('variant', variant);
163
+ }
164
+ renderNavigation() {
165
+ const navigationClasses = ['navigation'];
166
+ if (this.mobileMenuExtended) {
167
+ navigationClasses.push('extended');
168
+ }
169
+ return (h("div", { ref: el => (this.mobileMenu = el), class: navigationClasses.join(' ') }, 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" })))));
170
+ }
171
+ render() {
172
+ return (h(Host, { key: 'efbf8028f2abf376f497081996dba759f5885630', version: version }, h("div", { key: 'ecaaea274045453ce869f36e8a1155626b1818ba', class: "global-header" }, h("div", { key: '2fda0d65321ad1cbbc47b731f095e0d9b6694d99', class: "global-sub" }, h("div", { key: '24864d5f18c9d923717cc2e996395cff3bd6ce8b', class: "logo" }, h("slot", { key: 'ba82d7f62bb845732fe6066bcdc7eef15913c9e6', name: "post-logo" }))), h("div", { key: 'a0ddea4e564fca1e286998c73fea75eb8c228428', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '0d7aa11452eb69fe28914ff7787c6dc206fd4009', name: "meta-navigation" }), h("slot", { key: 'e92b7b9db6e16e8fcecb1ca74efa63942dd542c5', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: 'c68984037a71d5ac54828f6cf2367c3b07e428fc', name: "post-language-switch" }), h("div", { key: '70fb5040dc2f000c2afa286bb673ae9cf88521cf', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '509fb81812262cd9efdb3a562e48f72b0d29e376', name: "post-togglebutton" })))), h("div", { key: '393d1040bad2f85caced5b4a8ff02e30fa5fd5f1', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '786cc114aae985a0612d3cb044684290e3026462', name: "title" }), h("div", { key: 'd4f68653a09bbf0b222873ed5d23fec6ba9d8f6f', class: "local-sub" }, h("slot", { key: '0ad7dda5490964e9a8eae5e0bf66a117882f7a06', name: "local-controls" }), h("slot", { key: 'bddc01c7696f456c38c200b330767a0f1b353d88' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
173
+ }
174
+ static get watchers() { return {
175
+ "mobileMenuExtended": ["frozeBody"]
176
+ }; }
177
+ static get style() { return PostHeaderStyle0; }
178
+ }, [1, "post-header", {
179
+ "device": [32],
180
+ "mobileMenuExtended": [32],
181
+ "toggleMobileMenu": [64]
182
+ }, undefined, {
183
+ "mobileMenuExtended": ["frozeBody"]
184
+ }]);
185
+ function defineCustomElement() {
186
+ if (typeof customElements === "undefined") {
187
+ return;
188
+ }
189
+ const components = ["post-header"];
190
+ components.forEach(tagName => { switch (tagName) {
191
+ case "post-header":
192
+ if (!customElements.get(tagName)) {
193
+ customElements.define(tagName, PostHeader);
194
+ }
195
+ break;
196
+ } });
197
+ }
198
+
199
+ export { PostHeader as P, defineCustomElement as d };
@@ -0,0 +1,168 @@
1
+ import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-3e8554e7.js';
2
+ import { g as getFocusableChildren } from './p-3aba7629.js';
3
+
4
+ const postMegadropdownCss = "@keyframes slide-in{0%{transform:translateX(100%)}100%{transform:translateX(0%)}}@keyframes slide-out{from{transform:translateX(0%)}to{transform:translateX(100%)}}@keyframes slide-down{from{transform:translateY(-100%)}to{transform:translateY(0%)}}@keyframes slide-up{0%{transform:translateY(0%)}100%{transform:translateY(-100%)}}*,::before,::after{box-sizing:border-box}.megadropdown-container{--post-main-header-height:56px;--post-global-header-height:72px;--post-header-height:calc(var(--post-global-header-height) + var(--post-main-header-height));box-shadow:0 8px 6px rgba(0,0,0,.16);position:absolute;background-color:#fafafa;border:none;z-index:1;border-top:1px solid #e1e0dc;width:100%;top:100%;left:0;border-radius:0}.megadropdown-container.slide-in{animation:slide-down 350ms forwards}.megadropdown-container.slide-out{animation:slide-up 350ms forwards}@media screen and (max-width: 1023.98px){.megadropdown-container{--post-global-header-height:64px;z-index:4;top:0 !important;left:0;width:100%;position:fixed;height:calc(100vh - var(--post-header-height));max-height:calc(100vh - var(--header-height));border-top:unset;overflow:auto}.megadropdown-container.slide-in{animation:slide-in 350ms forwards}.megadropdown-container.slide-out{animation:slide-out 350ms forwards}}.megadropdown{padding:31px 40px 40px;background-color:#fafafa}@media screen and (max-width: 1023.98px){.megadropdown{padding:16px 32px 24px}}@media screen and (max-width: 599.98px){.megadropdown{padding-inline:16px}}.megadropdown .megadropdown-content{gap:1.5rem;display:grid;grid-template-columns:repeat(auto-fit, minmax(min(15vw, 100%), 1fr));grid-auto-rows:1fr auto;grid-auto-flow:dense}@media screen and (max-width: 1023.98px){.megadropdown .megadropdown-content{grid-template-columns:repeat(auto-fit, minmax(min(35vw, 100%), 1fr))}}@media screen and (max-width: 599.98px){.megadropdown .megadropdown-content{grid-template-columns:1fr}}.megadropdown h2{display:none;margin-top:0;margin-bottom:8px;font-weight:900}.megadropdown h2 a{text-decoration:none;font-weight:inherit;border-bottom:0;border-top:0}@media screen and (max-width: 1023.98px){.megadropdown h2{display:block;font-size:1.25rem}}@media screen and (max-width: 599.98px){.megadropdown h2{font-size:1.125rem}}.megadropdown post-list{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:0px}.megadropdown post-list>[role=list]{flex-direction:unset;display:unset}.megadropdown post-list>*{width:100%}.megadropdown post-list .list-title{display:flex;flex-direction:column-reverse;height:100%}.megadropdown post-list .list-title h3{font-size:20px;display:block;font-weight:900}.megadropdown post-list .list-title h3:not(:has(a)){padding:15px 12px 14px 8px;border-bottom:1px solid #050400}.megadropdown post-list .list-title h3 a{padding-block:15px 14px;padding-inline-start:8px;border-radius:0;text-decoration:none;font-size:inherit;display:flex;align-items:center;justify-content:space-between;min-height:53px;width:100%;min-width:100%;height:var(--post-core-dimension-48);padding-inline-end:calc(var(--post-core-dimension-6) + var(--post-core-dimension-24) + var(--post-core-dimension-16));gap:var(--post-core-dimension-16);font-weight:var(--post-core-font-weight-400);position:relative;height:unset;font-weight:900}.megadropdown post-list .list-title h3 a::before{content:\"\";background-color:currentColor;bottom:0;width:100%;height:var(--post-core-dimension-1);position:absolute;left:0}.megadropdown post-list .list-title h3 a:hover::before{height:var(--post-core-dimension-3)}.megadropdown post-list .list-title h3 a:hover::after{content:\"\";display:block;margin-right:calc((var(--post-core-dimension-24) + var(--post-core-dimension-16))*-1);mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='m31.95 16-9.11 9.11c-.2.2-.45.29-.71.29s-.51-.1-.71-.29a.996.996 0 0 1 0-1.41l6.69-6.69H-.05v-2h28.17l-6.69-6.69a.996.996 0 1 1 1.41-1.41l9.11 9.11Z'%3E%3C/path%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;width:var(--post-core-dimension-20);min-width:var(--post-core-dimension-20);height:var(--post-core-dimension-20)}@media screen and (max-width: 1023.98px){.megadropdown post-list .list-title h3{font-size:1rem}.megadropdown post-list .list-title h3:not(:has(a)){padding:15px 12px 14px 8px;border-bottom:1px solid #050400}}@media screen and (max-width: 599.98px){.megadropdown post-list .list-title h3{font-size:.875rem}}.megadropdown post-list-item>a{padding-block:13px 12px;padding-inline-start:8px;display:flex;text-decoration:none;width:100%;min-width:100%;height:auto;min-height:48px}.megadropdown post-list-item>a:hover{border-block-width:0}@media screen and (min-width: 1024px){.megadropdown post-list-item>a{font-size:1.25rem}}@media screen and (max-width: 1023.98px){.megadropdown post-list-item>a{padding-block:12px 11px}}@media screen and (max-width: 599.98px){.megadropdown post-list-item>a{font-size:.875rem}}.megadropdown .back-button{display:none;margin-bottom:2rem}.megadropdown .back-button .btn{width:auto}@media screen and (max-width: 1023.98px){.megadropdown .back-button{display:block}}.megadropdown .close-button{position:absolute;top:1rem;right:1rem}@media screen and (max-width: 1023.98px){.megadropdown .close-button{display:none}}";
5
+ const PostMegadropdownStyle0 = postMegadropdownCss;
6
+
7
+ const PostMegadropdown = /*@__PURE__*/ proxyCustomElement(class PostMegadropdown extends H {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ this.postToggleMegadropdown = createEvent(this, "postToggleMegadropdown", 7);
12
+ }
13
+ header;
14
+ firstFocusableEl;
15
+ lastFocusableEl;
16
+ device;
17
+ get host() { return this; }
18
+ /** Tracks the currently active dropdown instance. */
19
+ static activeDropdown = null;
20
+ /**
21
+ * Holds the current visibility state of the dropdown.
22
+ * This state is internally managed to track whether the dropdown is open (`true`) or closed (`false`),
23
+ * and updates automatically when the dropdown is toggled.
24
+ */
25
+ isVisible = false;
26
+ /** Holds the current animation class. */
27
+ animationClass = null;
28
+ /**
29
+ * Emits when the dropdown is shown or hidden.
30
+ * The event payload is a boolean: `true` when the dropdown was opened, `false` when it was closed.
31
+ **/
32
+ postToggleMegadropdown;
33
+ disconnectedCallback() {
34
+ this.removeOutsideClickListener();
35
+ if (PostMegadropdown.activeDropdown === this) {
36
+ PostMegadropdown.activeDropdown = null;
37
+ }
38
+ }
39
+ componentWillRender() {
40
+ this.getFocusableElements();
41
+ }
42
+ /**
43
+ * Toggles the dropdown visibility based on its current state.
44
+ */
45
+ async toggle() {
46
+ if (this.isVisible) {
47
+ this.hide();
48
+ }
49
+ else {
50
+ await this.show();
51
+ }
52
+ }
53
+ /**
54
+ * Displays the dropdown.
55
+ */
56
+ async show() {
57
+ if (PostMegadropdown.activeDropdown && PostMegadropdown.activeDropdown !== this) {
58
+ // Close the previously active dropdown without animation
59
+ PostMegadropdown.activeDropdown.forceClose();
60
+ }
61
+ this.isVisible = true;
62
+ this.host.addEventListener('keydown', e => this.keyboardHandler(e));
63
+ this.animationClass = 'slide-in';
64
+ PostMegadropdown.activeDropdown = this;
65
+ this.postToggleMegadropdown.emit(this.isVisible);
66
+ this.addOutsideClickListener();
67
+ }
68
+ /**
69
+ * Hides the dropdown with an animation.
70
+ */
71
+ async hide() {
72
+ this.animationClass = 'slide-out';
73
+ this.host.removeEventListener('keydown', e => this.keyboardHandler(e));
74
+ }
75
+ connectedCallback() {
76
+ this.header = this.host.closest('post-header');
77
+ if (this.header) {
78
+ this.header.addEventListener('postUpdateDevice', (event) => (this.device = event.detail));
79
+ }
80
+ }
81
+ /**
82
+ * Forces the dropdown to close without animation.
83
+ */
84
+ forceClose() {
85
+ this.isVisible = false;
86
+ this.animationClass = null;
87
+ this.postToggleMegadropdown.emit(this.isVisible);
88
+ this.removeOutsideClickListener();
89
+ }
90
+ handleAnimationEnd() {
91
+ if (this.animationClass === 'slide-out') {
92
+ this.isVisible = false;
93
+ this.animationClass = null;
94
+ this.postToggleMegadropdown.emit(this.isVisible);
95
+ this.removeOutsideClickListener();
96
+ }
97
+ }
98
+ handleClickOutside = (event) => {
99
+ const target = event.target;
100
+ if (this.host.contains(target)) {
101
+ return;
102
+ }
103
+ if (target instanceof H) {
104
+ const trigger = target.closest('post-megadropdown-trigger');
105
+ if (trigger) {
106
+ const targetDropdownId = trigger.getAttribute('for');
107
+ if (targetDropdownId !== this.host.id) {
108
+ return;
109
+ }
110
+ }
111
+ }
112
+ this.hide();
113
+ };
114
+ addOutsideClickListener() {
115
+ document.addEventListener('mousedown', this.handleClickOutside);
116
+ }
117
+ removeOutsideClickListener() {
118
+ document.removeEventListener('mousedown', this.handleClickOutside);
119
+ }
120
+ getFocusableElements() {
121
+ const focusableEls = Array.from(this.host.querySelectorAll('post-list-item, h3, .back-button'));
122
+ const focusableChildren = focusableEls.flatMap(el => Array.from(getFocusableChildren(el)));
123
+ this.firstFocusableEl = focusableChildren[0];
124
+ this.lastFocusableEl = focusableChildren[focusableChildren.length - 1];
125
+ }
126
+ // Loop through the focusable children
127
+ keyboardHandler(e) {
128
+ if (e.key === 'Tab' && this.device !== 'desktop') {
129
+ if (e.shiftKey && document.activeElement === this.firstFocusableEl) {
130
+ // If back tab (TAB + Shift) and first element is focused, focus goes to the last element of the megadropdown
131
+ e.preventDefault();
132
+ this.lastFocusableEl.focus();
133
+ }
134
+ else if (!e.shiftKey && document.activeElement === this.lastFocusableEl) {
135
+ // If TAB and last element is focused, focus goes back to the first element of the megadropdown
136
+ e.preventDefault();
137
+ this.firstFocusableEl.focus();
138
+ }
139
+ }
140
+ }
141
+ render() {
142
+ const containerStyle = this.isVisible ? {} : { display: 'none' };
143
+ return (h(Host, { key: '5aa08b01be715325182c245e1b0ae2456bcc5df6' }, h("div", { key: '0737c9368ecbffac59bbdf47fabac3f3b94ae7bb', class: `megadropdown-container ${this.animationClass || ''}`, style: containerStyle, onAnimationEnd: () => this.handleAnimationEnd() }, h("div", { key: 'efe49f3f9cdcd99e2feca78b772c944405e19f21', class: "megadropdown" }, h("div", { key: '14dd7ff2f7e7b1eb91f2673a25d7ccafffe4f9d0', onClick: () => this.hide(), class: "back-button" }, h("slot", { key: '554e30e6408c0bef0549f5e2c31dcd8b90ceee40', name: "back-button" })), h("div", { key: '4e7335152d7b6649918adf075213ebbf8b8ddeaa', onClick: () => this.hide(), class: "close-button" }, h("slot", { key: 'db90f3a5334ce723c0ee672a96167197ca25b545', name: "close-button" })), h("slot", { key: 'b11b1d16147f88103f2eb24c8dd21394de53f69c', name: "megadropdown-title" }), h("div", { key: '6d837c1a70f66f00097fb531058750fbac6fd41a', class: "megadropdown-content" }, h("slot", { key: 'be685185f04e44d867167f918494d086856b5928' }))))));
144
+ }
145
+ static get style() { return PostMegadropdownStyle0; }
146
+ }, [4, "post-megadropdown", {
147
+ "device": [32],
148
+ "isVisible": [32],
149
+ "animationClass": [32],
150
+ "toggle": [64],
151
+ "show": [64],
152
+ "hide": [64]
153
+ }]);
154
+ function defineCustomElement() {
155
+ if (typeof customElements === "undefined") {
156
+ return;
157
+ }
158
+ const components = ["post-megadropdown"];
159
+ components.forEach(tagName => { switch (tagName) {
160
+ case "post-megadropdown":
161
+ if (!customElements.get(tagName)) {
162
+ customElements.define(tagName, PostMegadropdown);
163
+ }
164
+ break;
165
+ } });
166
+ }
167
+
168
+ export { PostMegadropdown as P, defineCustomElement as d };
@@ -0,0 +1,145 @@
1
+ import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-3e8554e7.js';
2
+ import { v as version } from './p-2083ae2c.js';
3
+ import { f as fadeOut } from './p-64e3de38.js';
4
+ import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './p-eabb09ad.js';
5
+ import { n as nanoid } from './p-5959f2bd.js';
6
+ import { d as defineCustomElement$1 } from './p-91031e3b.js';
7
+ import { c as checkType } from './p-8562c7dc.js';
8
+ import { c as checkNonEmpty } from './p-b095519d.js';
9
+
10
+ const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
11
+
12
+ const postBannerCss = ".banner,.alert{min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));box-sizing:border-box;box-shadow:var(--post-device-elevation-100);border-radius:var(--post-device-border-radius-2);padding:var(--post-device-spacing-padding-10) var(--post-device-spacing-padding-10);padding-inline-start:calc(var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6));font-weight:var(--post-core-font-weight-400);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);position:relative;color:var(--post-scheme-color-surface-default-fg);background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{color:CanvasText}}.banner:has(>post-icon)::before,.alert:has(>post-icon)::before{content:none}.banner>post-icon,.alert>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner::before,.alert::before{content:\"\";display:block}.banner::before,.banner>post-icon,.alert::before,.alert>post-icon{position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);left:var(--post-device-spacing-padding-10);top:var(--post-device-spacing-padding-10)}.banner.no-icon,.alert.no-icon{min-height:calc(2*var(--post-device-spacing-padding-10) + var(--post-core-dimension-24));padding-inline-start:var(--post-device-spacing-padding-10)}.banner.no-icon::before,.alert.no-icon::before{content:unset}.banner.no-icon>post-icon,.alert.no-icon>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner,.alert{filter:none !important;border:2px solid CanvasText}}.banner:not(.banner-action):not(.alert-action),.alert:not(.banner-action):not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner:not(.banner-action):not(.alert-action) a,.alert:not(.banner-action):not(.alert-action) a{font-weight:var(--post-core-font-weight-400)}.banner:not(.banner-action):not(.alert-action) hr,.alert:not(.banner-action):not(.alert-action) hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner:not(.banner-action):not(.alert-action)>*,.alert:not(.banner-action):not(.alert-action)>*{margin:0}.banner-container{border:unset;background-color:rgba(0,0,0,0)}.banner-dismissible,.alert-dismissible{pointer-events:auto;position:relative}.banner-dismissible:not(.banner-action):not(.alert-action),.alert-dismissible:not(.banner-action):not(.alert-action){padding-inline-end:calc(var(--post-device-spacing-padding-10) + var(--post-device-spacing-gap-inline-6) + var(--post-core-dimension-24))}.banner-dismissible>.btn-close,.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:var(--post-device-spacing-padding-10)}.banner-buttons,.alert-buttons{display:flex;align-items:center;justify-content:flex-start;flex-direction:row-reverse;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media (max-width: 779.98px){.banner-buttons,.alert-buttons{flex-direction:column}}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner-action>.banner-content a,.banner-action>.alert-content a,.alert-action>.banner-content a,.alert-action>.alert-content a{font-weight:var(--post-core-font-weight-400)}.banner-action>.banner-content hr,.banner-action>.alert-content hr,.alert-action>.banner-content hr,.alert-action>.alert-content hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner-action>.banner-content>*,.banner-action>.alert-content>*,.alert-action>.banner-content>*,.alert-action>.alert-content>*{margin:0}@media (max-width: 779.98px){.banner-action,.alert-action{flex-direction:column;align-items:stretch}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{padding-inline-start:var(--post-device-spacing-gap-inline-6)var(--post-device-sizing-notification-icon-2);padding-inline-end:var(--post-device-spacing-gap-inline-6)var(--post-core-dimension-24)}.banner-action.no-icon>.banner-content,.banner-action.no-icon>.alert-content,.alert-action.no-icon>.banner-content,.alert-action.no-icon>.alert-content{padding-inline-start:0}.banner-action>.banner-buttons,.banner-action>.alert-buttons,.alert-action>.banner-buttons,.alert-action>.alert-buttons{display:flex}.banner-action>.banner-buttons>.btn,.banner-action>.banner-buttons>::slotted(.btn),.banner-action>.alert-buttons>.btn,.banner-action>.alert-buttons>::slotted(.btn),.alert-action>.banner-buttons>.btn,.alert-action>.banner-buttons>::slotted(.btn),.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.banner-action>.banner-buttons>.btn:first-child,.banner-action>.banner-buttons>::slotted(.btn:first-child),.banner-action>.alert-buttons>.btn:first-child,.banner-action>.alert-buttons>::slotted(.btn:first-child),.alert-action>.banner-buttons>.btn:first-child,.alert-action>.banner-buttons>::slotted(.btn:first-child),.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.banner-neutral,.alert-neutral{background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{color:CanvasText}}.banner-neutral:has(>post-icon)::before,.alert-neutral:has(>post-icon)::before{content:none}.banner-neutral>post-icon,.alert-neutral>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner-success,.alert-success{background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-success-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{color:CanvasText}}.banner-success:has(>post-icon)::before,.alert-success:has(>post-icon)::before{content:none}.banner-success>post-icon,.alert-success>post-icon{background-color:var(--post-scheme-color-interactive-notification-success-bg);color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-warning,.alert-warning{background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-warning-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{color:CanvasText}}.banner-warning:has(>post-icon)::before,.alert-warning:has(>post-icon)::before{content:none}.banner-warning>post-icon,.alert-warning>post-icon{background-color:var(--post-scheme-color-interactive-notification-warning-bg);color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-error,.alert-error{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{color:CanvasText}}.banner-error:has(>post-icon)::before,.alert-error:has(>post-icon)::before{content:none}.banner-error>post-icon,.alert-error>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-info,.alert-info{background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-info-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{color:CanvasText}}.banner-info:has(>post-icon)::before,.alert-info:has(>post-icon)::before{content:none}.banner-info>post-icon,.alert-info>post-icon{background-color:var(--post-scheme-color-interactive-notification-info-bg);color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-danger,.alert-danger{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{color:CanvasText}}.banner-danger:has(>post-icon)::before,.alert-danger:has(>post-icon)::before{content:none}.banner-danger>post-icon,.alert-danger>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{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}.btn-close: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){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close: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){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:#999}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}";
13
+ const PostBannerStyle0 = postBannerCss;
14
+
15
+ const PostBanner = /*@__PURE__*/ proxyCustomElement(class PostBanner extends H {
16
+ constructor() {
17
+ super();
18
+ this.__registerHost();
19
+ this.__attachShadow();
20
+ this.postDismissed = createEvent(this, "postDismissed", 7);
21
+ }
22
+ get host() { return this; }
23
+ bannerId = `p${nanoid(6)}`;
24
+ classes;
25
+ hasActions;
26
+ hasHeading;
27
+ onDismissButtonClick = () => this.dismiss();
28
+ /**
29
+ * If `true`, a close button (×) is displayed and the banner can be dismissed by the user.
30
+ */
31
+ dismissible = false;
32
+ validateDismissible(isDismissible = this.dismissible) {
33
+ checkType(isDismissible, 'boolean', 'The post-banner "dismissible" prop should be a boolean.');
34
+ setTimeout(() => this.validateDismissLabel());
35
+ }
36
+ /**
37
+ * The label to use for the close button of a dismissible banner.
38
+ */
39
+ dismissLabel;
40
+ validateDismissLabel(dismissLabel = this.dismissLabel) {
41
+ if (this.dismissible) {
42
+ checkNonEmpty(dismissLabel, 'Dismissible post-banner\'s require a "dismiss-label" prop.');
43
+ }
44
+ }
45
+ /**
46
+ * The icon to display in the banner. By default, the icon depends on the banner type.
47
+ *
48
+ * If `none`, no icon is displayed.
49
+ */
50
+ icon;
51
+ validateIcon(icon = this.icon) {
52
+ checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-banner "icon" prop should be a 4-digits string.');
53
+ }
54
+ /**
55
+ * The type of the banner.
56
+ */
57
+ type = 'neutral';
58
+ validateType(type = this.type) {
59
+ checkEmptyOrOneOf(type, BANNER_TYPES, `The post-banner requires a type form: ${BANNER_TYPES.join(', ')}`);
60
+ }
61
+ /**
62
+ * An event emitted when the banner element is dismissed, after the transition.
63
+ * It has no payload and only relevant for dismissible banners.
64
+ */
65
+ postDismissed;
66
+ componentDidLoad() {
67
+ this.validateDismissible();
68
+ this.validateIcon();
69
+ this.validateType();
70
+ }
71
+ componentWillRender() {
72
+ this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
73
+ this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
74
+ this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
75
+ if (this.dismissible)
76
+ this.classes += ' banner-dismissible';
77
+ if (this.hasActions)
78
+ this.classes += ' banner-action';
79
+ if (this.icon === 'none')
80
+ this.classes += ' no-icon';
81
+ }
82
+ /**
83
+ * Triggers banner dismissal programmatically (same as clicking on the close button (×)).
84
+ */
85
+ async dismiss() {
86
+ const dismissal = fadeOut(this.host);
87
+ await dismissal.finished;
88
+ this.host.remove();
89
+ this.postDismissed.emit();
90
+ }
91
+ render() {
92
+ const defaultBannerContent = [
93
+ this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '9886e598c972c8c77c1d25a385edb0c604b47b44', name: "heading" }))),
94
+ h("slot", { key: `${this.bannerId}-message` }),
95
+ ];
96
+ const actionBannerContent = [
97
+ h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
98
+ h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '0463b479e1f6e9f2c287a06109bc9037de4de2e1', name: "actions" })),
99
+ ];
100
+ return (h(Host, { key: '43b3385f47d4f7dcd0a150656a79258d045d41ad', "data-version": version }, h("div", { key: 'edb9c07973a4d8b1c0a9efe7f95e9fcf5bcb4b59', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '537ee712114b5095e20e30cd5681fd287da0bd5d', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'a13b1b71e64c7e732487035f2d175c5a041538c0', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
101
+ }
102
+ static get watchers() { return {
103
+ "dismissible": ["validateDismissible"],
104
+ "dismissLabel": ["validateDismissLabel"],
105
+ "icon": ["validateIcon"],
106
+ "type": ["validateType"]
107
+ }; }
108
+ static get style() { return PostBannerStyle0; }
109
+ }, [1, "post-banner", {
110
+ "dismissible": [4],
111
+ "dismissLabel": [1, "dismiss-label"],
112
+ "icon": [1],
113
+ "type": [1],
114
+ "bannerId": [32],
115
+ "classes": [32],
116
+ "hasActions": [32],
117
+ "hasHeading": [32],
118
+ "onDismissButtonClick": [32],
119
+ "dismiss": [64]
120
+ }, undefined, {
121
+ "dismissible": ["validateDismissible"],
122
+ "dismissLabel": ["validateDismissLabel"],
123
+ "icon": ["validateIcon"],
124
+ "type": ["validateType"]
125
+ }]);
126
+ function defineCustomElement() {
127
+ if (typeof customElements === "undefined") {
128
+ return;
129
+ }
130
+ const components = ["post-banner", "post-icon"];
131
+ components.forEach(tagName => { switch (tagName) {
132
+ case "post-banner":
133
+ if (!customElements.get(tagName)) {
134
+ customElements.define(tagName, PostBanner);
135
+ }
136
+ break;
137
+ case "post-icon":
138
+ if (!customElements.get(tagName)) {
139
+ defineCustomElement$1();
140
+ }
141
+ break;
142
+ } });
143
+ }
144
+
145
+ export { PostBanner as P, defineCustomElement as d };
@@ -1,7 +1,7 @@
1
1
  const easing = 'ease';
2
2
  const duration = 500;
3
3
  const fill = 'forwards';
4
- const slideUp = (el, translateSize = '100%') => {
4
+ function slideUp(el, translateSize = '100%') {
5
5
  return el.animate([
6
6
  { transform: `translateY(${translateSize})` }, // Starting position (no translation)
7
7
  { transform: 'translateY(0)' }, // End position
@@ -10,8 +10,8 @@ const slideUp = (el, translateSize = '100%') => {
10
10
  easing,
11
11
  fill,
12
12
  });
13
- };
14
- const slideDown = (el, translateSize = '100%') => {
13
+ }
14
+ function slideDown(el, translateSize = '100%') {
15
15
  return el.animate([
16
16
  { transform: 'translateY(0)' }, // Starting position (no translation)
17
17
  { transform: `translateY(${translateSize})` }, // End position
@@ -20,6 +20,6 @@ const slideDown = (el, translateSize = '100%') => {
20
20
  easing,
21
21
  fill,
22
22
  });
23
- };
23
+ }
24
24
 
25
25
  export { slideDown as a, slideUp as s };
@@ -1,18 +1,29 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { v as version } from './package.js';
3
- import { n as nanoid } from './index.browser.js';
1
+ import { p as proxyCustomElement, H, h, c as Host } from './p-3e8554e7.js';
2
+ import { v as version } from './p-2083ae2c.js';
3
+ import { n as nanoid } from './p-5959f2bd.js';
4
4
 
5
5
  const postListCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */post-list{display:flex;flex-direction:column;gap:var(--post-list-title-gap, 0)}post-list>[role=list]{display:flex;flex-direction:column;gap:var(--post-list-item-gap, 0)}post-list:where([horizontal]:not([horizontal=false])){flex-direction:row;align-items:center}post-list:where([horizontal]:not([horizontal=false]))>[role=list]{flex-direction:row;align-items:center}post-list>.list-title.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}post-list>.list-title.visually-hidden:not(caption){position:absolute !important}";
6
6
  const PostListStyle0 = postListCss;
7
7
 
8
- const PostList = /*@__PURE__*/ proxyCustomElement(class PostList extends HTMLElement {
8
+ const PostList = /*@__PURE__*/ proxyCustomElement(class PostList extends H {
9
9
  constructor() {
10
10
  super();
11
11
  this.__registerHost();
12
- this.titleId = undefined;
13
- this.titleHidden = false;
14
- this.horizontal = false;
15
12
  }
13
+ get host() { return this; }
14
+ /**
15
+ * The unique title of the list that is also referenced in the labelledby
16
+ */
17
+ titleId;
18
+ /**
19
+ * If `true`, the list title will be hidden. Otherwise, it will be displayed.`
20
+ */
21
+ titleHidden = false;
22
+ /**
23
+ * The list can become horizontal by setting `horizontal="true"` or just `horizontal`
24
+ */
25
+ horizontal = false;
26
+ titleEl;
16
27
  componentWillLoad() {
17
28
  /**
18
29
  * Get the id set on the host element or use a random id by default
@@ -28,9 +39,8 @@ const PostList = /*@__PURE__*/ proxyCustomElement(class PostList extends HTMLEle
28
39
  }
29
40
  }
30
41
  render() {
31
- return (h(Host, { key: '70594af566e1fe34ce0b9ebe1a8cbbc868dab973', "data-version": version }, h("div", { key: '27b6c4af3d51a0d83f968ec751b6bcf46feb7d05', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: 'a913bd018199bb031e3d96d487bd528831453387' })), h("div", { key: 'e1a3ddecc643a78f57b91cc9ccb0de6b02302a47', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: 'bd7c6df300d28fe0b9f1dd3135eb42da00e731b9', name: "post-list-item" }))));
42
+ return (h(Host, { key: 'bdd973098d8b2a74635d489dca8f0f6825e31c51', "data-version": version }, h("div", { key: '9dcd6ca7069658c3e7f0d14fc130d18ebe522acb', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: 'ad51f345b2c120796d02dbc3d6815a58addc7fb4' })), h("div", { key: '47fddd7b977c85c195757f461c0ec009270cdb8b', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '176662b40ca47b6aeeded26256bc84bdee6483a6', name: "post-list-item" }))));
32
43
  }
33
- get host() { return this; }
34
44
  static get style() { return PostListStyle0; }
35
45
  }, [4, "post-list", {
36
46
  "titleHidden": [4, "title-hidden"],