@swisspost/design-system-components 9.0.0-next.33 → 9.0.0-next.35

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 (365) hide show
  1. package/dist/cjs/{attribute-observer-6d8b886b.js → attribute-observer-c3a805b2.js} +3 -1
  2. package/dist/cjs/{breakpoints-c6247c71.js → breakpoints-cdf1b747.js} +12 -7
  3. package/dist/cjs/get-root-8102fecd.js +17 -0
  4. package/dist/cjs/{index-d6bf2c66.js → index-b60129c4.js} +4 -4
  5. package/dist/cjs/index.cjs.js +25 -26
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/long-press-event-6e62d113.js +266 -0
  8. package/dist/cjs/{package-3562c265.js → package-19b74b08.js} +1 -1
  9. package/dist/cjs/{post-accordion-6c5681ba.js → post-accordion-785f602b.js} +5 -5
  10. package/dist/cjs/{post-accordion-item-05a78451.js → post-accordion-item-8e1c9bdb.js} +5 -5
  11. package/dist/cjs/post-accordion-item.cjs.entry.js +5 -4
  12. package/dist/cjs/post-accordion.cjs.entry.js +4 -3
  13. package/dist/cjs/{post-avatar-6710a77a.js → post-avatar-eecfd222.js} +6 -5
  14. package/dist/cjs/post-avatar.cjs.entry.js +4 -3
  15. package/dist/cjs/{post-back-to-top-d0662842.js → post-back-to-top-49a3abcb.js} +9 -9
  16. package/dist/cjs/post-back-to-top.cjs.entry.js +4 -3
  17. package/dist/cjs/{post-banner-bd97db9c.js → post-banner-249ec2ff.js} +5 -9
  18. package/dist/cjs/post-banner.cjs.entry.js +4 -3
  19. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -3
  20. package/dist/cjs/{post-breadcrumb-36ab841c.js → post-breadcrumbs-f51590d1.js} +39 -31
  21. package/dist/cjs/post-breadcrumbs.cjs.entry.js +13 -0
  22. package/dist/cjs/post-card-control-d0a47015.js +269 -0
  23. package/dist/cjs/post-card-control.cjs.entry.js +4 -3
  24. package/dist/cjs/post-closebutton_15.cjs.entry.js +5 -5
  25. package/dist/cjs/{post-collapsible-trigger-6601c554.js → post-collapsible-trigger-4784edb2.js} +24 -41
  26. package/dist/cjs/post-collapsible_2.cjs.entry.js +5 -5
  27. package/dist/cjs/post-components.cjs.js +2 -2
  28. package/dist/cjs/{post-footer-23699aef.js → post-footer-9d078cb1.js} +11 -11
  29. package/dist/cjs/post-footer.cjs.entry.js +4 -4
  30. package/dist/cjs/{post-linkarea-8e5e1a9f.js → post-linkarea-e4ce3960.js} +5 -5
  31. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  32. package/dist/cjs/{post-menu-item-8dd94792.js → post-menu-item-e9ebd27a.js} +4 -4
  33. package/dist/cjs/post-popover-5db53ead.js +112 -0
  34. package/dist/cjs/post-popover.cjs.entry.js +5 -4
  35. package/dist/cjs/{post-rating-ef592484.js → post-rating-98a06828.js} +5 -15
  36. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  37. package/dist/cjs/{post-tab-header-d785e7fc.js → post-tab-header-c8e92f77.js} +6 -5
  38. package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
  39. package/dist/cjs/{post-tab-panel-41ea371e.js → post-tab-panel-d966ee38.js} +4 -4
  40. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  41. package/dist/cjs/{post-tabs-c6f00130.js → post-tabs-83d99b69.js} +5 -12
  42. package/dist/cjs/post-tabs.cjs.entry.js +4 -3
  43. package/dist/cjs/post-tag-a1d78e75.js +47 -0
  44. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  45. package/dist/cjs/{post-togglebutton-02c56b7b.js → post-togglebutton-e4651aad.js} +939 -464
  46. package/dist/cjs/{post-tooltip-3176e280.js → post-tooltip-bb862241.js} +39 -296
  47. package/dist/cjs/post-tooltip.cjs.entry.js +5 -4
  48. package/dist/collection/animations/collapse.js +3 -1
  49. package/dist/collection/collection-manifest.json +1 -1
  50. package/dist/collection/components/post-accordion/post-accordion.js +1 -3
  51. package/dist/collection/components/post-accordion-item/post-accordion-item.js +0 -2
  52. package/dist/collection/components/post-avatar/post-avatar.css +1 -3
  53. package/dist/collection/components/post-avatar/post-avatar.js +3 -4
  54. package/dist/collection/components/post-back-to-top/post-back-to-top.js +6 -8
  55. package/dist/collection/components/post-banner/post-banner.css +1 -3
  56. package/dist/collection/components/post-banner/post-banner.js +0 -6
  57. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +0 -2
  58. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -0
  59. package/dist/collection/components/{post-breadcrumb/post-breadcrumb.js → post-breadcrumbs/post-breadcrumbs.js} +24 -27
  60. package/dist/collection/components/post-card-control/post-card-control.css +1 -3
  61. package/dist/collection/components/post-card-control/post-card-control.js +24 -40
  62. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -0
  63. package/dist/collection/components/post-closebutton/post-closebutton.js +12 -2
  64. package/dist/collection/components/post-collapsible/post-collapsible.js +4 -10
  65. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +15 -28
  66. package/dist/collection/components/post-footer/post-footer.js +8 -9
  67. package/dist/collection/components/post-header/post-header.css +1 -1
  68. package/dist/collection/components/post-header/post-header.js +13 -22
  69. package/dist/collection/components/post-icon/post-icon.js +4 -6
  70. package/dist/collection/components/post-language-option/post-language-option.css +1 -3
  71. package/dist/collection/components/post-language-option/post-language-option.js +1 -10
  72. package/dist/collection/components/post-language-switch/post-language-switch.js +7 -19
  73. package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
  74. package/dist/collection/components/post-linkarea/post-linkarea.js +2 -2
  75. package/dist/collection/components/post-list/post-list.css +1 -3
  76. package/dist/collection/components/post-list/post-list.js +1 -3
  77. package/dist/collection/components/post-list-item/post-list-item.js +1 -2
  78. package/dist/collection/components/post-logo/post-logo.js +1 -2
  79. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  80. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +98 -182
  81. package/dist/collection/components/post-megadropdown/post-megadropdown.js +20 -30
  82. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +36 -37
  83. package/dist/collection/components/post-menu/post-menu.css +1 -3
  84. package/dist/collection/components/post-menu/post-menu.js +47 -55
  85. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +13 -15
  86. package/dist/collection/components/post-popover/post-popover.css +1 -3
  87. package/dist/collection/components/post-popover/post-popover.js +13 -13
  88. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +30 -33
  89. package/dist/collection/components/post-rating/post-rating.css +1 -3
  90. package/dist/collection/components/post-rating/post-rating.js +1 -12
  91. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -3
  92. package/dist/collection/components/post-tab-header/post-tab-header.js +2 -3
  93. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -3
  94. package/dist/collection/components/post-tabs/post-tabs.js +1 -10
  95. package/dist/collection/components/post-tag/post-tag.css +1 -3
  96. package/dist/collection/components/post-tag/post-tag.js +1 -2
  97. package/dist/collection/components/post-togglebutton/post-togglebutton.js +10 -11
  98. package/dist/collection/components/post-tooltip/post-tooltip.js +37 -33
  99. package/dist/collection/index.js +1 -1
  100. package/dist/collection/utils/attribute-observer.js +2 -1
  101. package/dist/collection/utils/breakpoints.js +9 -7
  102. package/dist/collection/utils/environment.js +2 -0
  103. package/dist/collection/utils/get-root.js +6 -1
  104. package/dist/collection/utils/index.js +5 -0
  105. package/dist/collection/utils/is-motion-reduced.js +2 -1
  106. package/dist/components/attribute-observer.js +3 -1
  107. package/dist/components/breakpoints.js +12 -8
  108. package/dist/components/get-root.js +7 -1
  109. package/dist/components/index.js +1 -1
  110. package/dist/components/long-press-event.js +264 -0
  111. package/dist/components/package.js +1 -1
  112. package/dist/components/post-accordion-item2.js +3 -3
  113. package/dist/components/post-accordion2.js +3 -3
  114. package/dist/components/post-avatar2.js +5 -4
  115. package/dist/components/post-back-to-top2.js +8 -8
  116. package/dist/components/post-banner2.js +3 -7
  117. package/dist/components/post-breadcrumb-item2.js +2 -2
  118. package/dist/components/{post-breadcrumb.d.ts → post-breadcrumbs.d.ts} +4 -4
  119. package/dist/components/post-breadcrumbs.js +6 -0
  120. package/dist/components/{post-breadcrumb2.js → post-breadcrumbs2.js} +41 -33
  121. package/dist/components/post-card-control2.js +26 -40
  122. package/dist/components/post-closebutton2.js +8 -3
  123. package/dist/components/post-collapsible-trigger2.js +19 -31
  124. package/dist/components/post-collapsible2.js +9 -12
  125. package/dist/components/post-footer2.js +8 -8
  126. package/dist/components/post-header2.js +15 -23
  127. package/dist/components/post-icon2.js +5 -5
  128. package/dist/components/post-language-option2.js +4 -11
  129. package/dist/components/post-language-switch2.js +9 -18
  130. package/dist/components/post-linkarea2.js +5 -4
  131. package/dist/components/post-list-item2.js +2 -2
  132. package/dist/components/post-list2.js +3 -4
  133. package/dist/components/post-logo2.js +3 -2
  134. package/dist/components/post-mainnavigation2.js +94 -182
  135. package/dist/components/post-megadropdown-trigger2.js +38 -37
  136. package/dist/components/post-megadropdown2.js +21 -30
  137. package/dist/components/post-menu-trigger2.js +15 -15
  138. package/dist/components/post-menu2.js +50 -56
  139. package/dist/components/post-popover2.js +15 -13
  140. package/dist/components/post-popovercontainer2.js +638 -36
  141. package/dist/components/post-rating2.js +3 -13
  142. package/dist/components/post-tab-header2.js +5 -4
  143. package/dist/components/post-tab-panel2.js +3 -3
  144. package/dist/components/post-tabs2.js +3 -10
  145. package/dist/components/post-tag2.js +2 -2
  146. package/dist/components/post-togglebutton2.js +12 -11
  147. package/dist/components/post-tooltip2.js +37 -294
  148. package/dist/docs.json +107 -101
  149. package/dist/esm/{attribute-observer-2f203993.js → attribute-observer-009deee5.js} +3 -1
  150. package/dist/esm/{breakpoints-bbe0c54e.js → breakpoints-7812702e.js} +12 -8
  151. package/dist/esm/get-root-1b1af46f.js +15 -0
  152. package/dist/esm/{index-3419e46d.js → index-f4d19816.js} +4 -4
  153. package/dist/esm/index.js +24 -25
  154. package/dist/esm/loader.js +3 -3
  155. package/dist/esm/long-press-event-04d24397.js +264 -0
  156. package/dist/esm/package-791f9257.js +3 -0
  157. package/dist/esm/{post-accordion-024451fa.js → post-accordion-4de9963b.js} +5 -5
  158. package/dist/esm/{post-accordion-item-19b996d1.js → post-accordion-item-2cbb32f9.js} +5 -5
  159. package/dist/esm/post-accordion-item.entry.js +5 -4
  160. package/dist/esm/post-accordion.entry.js +4 -3
  161. package/dist/esm/{post-avatar-33aed045.js → post-avatar-0aaefe87.js} +6 -5
  162. package/dist/esm/post-avatar.entry.js +4 -3
  163. package/dist/esm/{post-back-to-top-7dd43c3b.js → post-back-to-top-24eef0a0.js} +9 -9
  164. package/dist/esm/post-back-to-top.entry.js +4 -3
  165. package/dist/esm/{post-banner-28d18721.js → post-banner-1f37f9f0.js} +5 -9
  166. package/dist/esm/post-banner.entry.js +4 -3
  167. package/dist/esm/post-breadcrumb-item_2.entry.js +4 -3
  168. package/dist/esm/{post-breadcrumb-d86fae7b.js → post-breadcrumbs-2fcccf9f.js} +39 -31
  169. package/dist/esm/post-breadcrumbs.entry.js +5 -0
  170. package/dist/esm/post-card-control-75e8d336.js +267 -0
  171. package/dist/esm/post-card-control.entry.js +4 -3
  172. package/dist/esm/post-closebutton_15.entry.js +5 -5
  173. package/dist/esm/{post-collapsible-trigger-b1612866.js → post-collapsible-trigger-08b79162.js} +24 -41
  174. package/dist/esm/post-collapsible_2.entry.js +5 -5
  175. package/dist/esm/post-components.js +3 -3
  176. package/dist/esm/{post-footer-2ed5e520.js → post-footer-01677010.js} +11 -11
  177. package/dist/esm/post-footer.entry.js +4 -4
  178. package/dist/esm/{post-linkarea-802bf774.js → post-linkarea-4a178d51.js} +5 -5
  179. package/dist/esm/post-linkarea.entry.js +3 -3
  180. package/dist/esm/{post-menu-item-d97611d8.js → post-menu-item-199477fd.js} +4 -4
  181. package/dist/esm/post-popover-2a6a13d8.js +110 -0
  182. package/dist/esm/post-popover.entry.js +5 -4
  183. package/dist/esm/{post-rating-e1ac47ce.js → post-rating-fcf24658.js} +5 -15
  184. package/dist/esm/post-rating.entry.js +3 -3
  185. package/dist/esm/{post-tab-header-06dcbf7f.js → post-tab-header-aaa2f0b8.js} +6 -5
  186. package/dist/esm/post-tab-header.entry.js +4 -3
  187. package/dist/esm/{post-tab-panel-75932601.js → post-tab-panel-91f35995.js} +4 -4
  188. package/dist/esm/post-tab-panel.entry.js +3 -3
  189. package/dist/esm/{post-tabs-3ef2ea23.js → post-tabs-8657f2d6.js} +5 -12
  190. package/dist/esm/post-tabs.entry.js +4 -3
  191. package/dist/esm/post-tag-19141551.js +45 -0
  192. package/dist/esm/post-tag.entry.js +3 -3
  193. package/dist/esm/{post-togglebutton-db251030.js → post-togglebutton-40cac8c2.js} +939 -464
  194. package/dist/esm/{post-tooltip-c256d714.js → post-tooltip-165eb353.js} +39 -296
  195. package/dist/esm/post-tooltip.entry.js +5 -4
  196. package/dist/post-components/index.esm.js +1 -1
  197. package/dist/post-components/p-01544069.js +1 -0
  198. package/dist/post-components/p-02d0c370.js +1 -0
  199. package/dist/post-components/p-03169497.js +1 -0
  200. package/dist/post-components/p-06bf6b81.entry.js +1 -0
  201. package/dist/post-components/p-0ca39161.entry.js +1 -0
  202. package/dist/post-components/p-0f398677.js +1 -0
  203. package/dist/post-components/p-10f9d25e.js +1 -0
  204. package/dist/post-components/p-15da2cf9.js +1 -0
  205. package/dist/post-components/p-1622ed8c.js +1 -0
  206. package/dist/post-components/p-1d5e275b.js +1 -0
  207. package/dist/post-components/p-2a90f66c.js +1 -0
  208. package/dist/post-components/p-32aa68ac.entry.js +1 -0
  209. package/dist/post-components/p-3d30acad.entry.js +1 -0
  210. package/dist/post-components/p-48cd3157.js +1 -0
  211. package/dist/post-components/p-56da2097.entry.js +1 -0
  212. package/dist/post-components/p-65824049.entry.js +1 -0
  213. package/dist/post-components/p-6b31a76a.js +1 -0
  214. package/dist/post-components/p-722ffaae.js +1 -0
  215. package/dist/post-components/p-7c6f4c29.js +1 -0
  216. package/dist/post-components/p-817effd4.js +1 -0
  217. package/dist/post-components/p-8579ac14.js +8 -0
  218. package/dist/post-components/p-86859a7b.entry.js +1 -0
  219. package/dist/post-components/p-8db32dab.js +8 -0
  220. package/dist/post-components/p-936682bc.entry.js +1 -0
  221. package/dist/post-components/p-9597127a.js +1 -0
  222. package/dist/post-components/p-9818ad52.entry.js +1 -0
  223. package/dist/post-components/{p-5c758f41.js → p-9e461613.js} +1 -1
  224. package/dist/post-components/p-9ec20111.js +1 -0
  225. package/dist/post-components/p-a1a39a27.js +1 -0
  226. package/dist/post-components/p-a1bae666.entry.js +1 -0
  227. package/dist/post-components/p-a27907cc.js +1 -0
  228. package/dist/post-components/p-a77a6729.entry.js +1 -0
  229. package/dist/post-components/p-ab3ab29b.js +1 -0
  230. package/dist/post-components/p-ad9ffd61.entry.js +1 -0
  231. package/dist/post-components/p-b8241188.js +1 -0
  232. package/dist/post-components/p-bece917c.js +1 -0
  233. package/dist/post-components/p-bf3c80a3.entry.js +1 -0
  234. package/dist/post-components/p-cd8aef45.entry.js +1 -0
  235. package/dist/post-components/p-cdd3a06a.entry.js +1 -0
  236. package/dist/post-components/p-dc702c39.entry.js +1 -0
  237. package/dist/post-components/p-e077239a.entry.js +1 -0
  238. package/dist/post-components/p-e653daec.entry.js +1 -0
  239. package/dist/post-components/p-e8861c07.entry.js +1 -0
  240. package/dist/post-components/p-f2478a7d.js +1 -0
  241. package/dist/post-components/post-components.esm.js +1 -1
  242. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  243. package/dist/types/components/{post-breadcrumb/post-breadcrumb.d.ts → post-breadcrumbs/post-breadcrumbs.d.ts} +4 -4
  244. package/dist/types/components/post-card-control/post-card-control.d.ts +1 -1
  245. package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +4 -14
  246. package/dist/types/components/post-footer/post-footer.d.ts +2 -2
  247. package/dist/types/components/post-header/post-header.d.ts +1 -0
  248. package/dist/types/components/post-icon/post-icon.d.ts +0 -1
  249. package/dist/types/components/post-language-switch/post-language-switch.d.ts +2 -5
  250. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +14 -39
  251. package/dist/types/components/post-menu/post-menu.d.ts +3 -3
  252. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -1
  253. package/dist/types/components/post-popover/post-popover.d.ts +6 -4
  254. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  255. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  256. package/dist/types/components/post-tooltip/post-tooltip.d.ts +9 -4
  257. package/dist/types/components.d.ts +35 -35
  258. package/dist/types/index.d.ts +1 -1
  259. package/dist/types/popover-fn.d.ts +11 -0
  260. package/dist/types/utils/environment.d.ts +2 -0
  261. package/dist/types/utils/get-root.d.ts +4 -0
  262. package/dist/types/utils/index.d.ts +5 -0
  263. package/loaders/attribute-observer.js +3 -1
  264. package/loaders/breakpoints.js +12 -8
  265. package/loaders/get-root.js +7 -1
  266. package/loaders/index.d.ts +2 -2
  267. package/loaders/index.js +4 -4
  268. package/loaders/long-press-event.js +264 -0
  269. package/loaders/package.js +1 -1
  270. package/loaders/post-accordion-item2.js +3 -3
  271. package/loaders/post-accordion.js +3 -3
  272. package/loaders/post-avatar.js +5 -4
  273. package/loaders/post-back-to-top.js +8 -8
  274. package/loaders/post-banner.js +3 -7
  275. package/loaders/post-breadcrumb-item2.js +2 -2
  276. package/loaders/{post-breadcrumb.d.ts → post-breadcrumbs.d.ts} +4 -4
  277. package/loaders/{post-breadcrumb.js → post-breadcrumbs.js} +42 -34
  278. package/loaders/post-card-control.js +26 -40
  279. package/loaders/post-closebutton.js +8 -3
  280. package/loaders/post-collapsible-trigger2.js +19 -31
  281. package/loaders/post-collapsible2.js +9 -12
  282. package/loaders/post-footer.js +8 -8
  283. package/loaders/post-header.js +15 -23
  284. package/loaders/post-icon2.js +5 -5
  285. package/loaders/post-language-option.js +4 -11
  286. package/loaders/post-language-switch.js +9 -18
  287. package/loaders/post-linkarea.js +5 -4
  288. package/loaders/post-list-item.js +2 -2
  289. package/loaders/post-list.js +3 -4
  290. package/loaders/post-logo.js +3 -2
  291. package/loaders/post-mainnavigation.js +94 -182
  292. package/loaders/post-megadropdown-trigger.js +38 -37
  293. package/loaders/post-megadropdown.js +21 -30
  294. package/loaders/post-menu-trigger2.js +15 -15
  295. package/loaders/post-menu2.js +50 -56
  296. package/loaders/post-popover.js +15 -13
  297. package/loaders/post-popovercontainer2.js +638 -36
  298. package/loaders/post-rating.js +3 -13
  299. package/loaders/post-tab-header.js +5 -4
  300. package/loaders/post-tab-panel.js +3 -3
  301. package/loaders/post-tabs.js +3 -10
  302. package/loaders/post-tag.js +2 -2
  303. package/loaders/post-togglebutton.js +12 -11
  304. package/loaders/post-tooltip.js +37 -294
  305. package/package.json +20 -15
  306. package/dist/cjs/debounce-158fd76f.js +0 -13
  307. package/dist/cjs/get-root-7a3498ef.js +0 -11
  308. package/dist/cjs/post-breadcrumb.cjs.entry.js +0 -13
  309. package/dist/cjs/post-card-control-155fb433.js +0 -283
  310. package/dist/cjs/post-popover-858cbd12.js +0 -110
  311. package/dist/cjs/post-tag-d1a1176c.js +0 -47
  312. package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +0 -3
  313. package/dist/components/debounce.js +0 -11
  314. package/dist/components/post-breadcrumb.js +0 -6
  315. package/dist/esm/debounce-e54c7131.js +0 -11
  316. package/dist/esm/get-root-7af2e0d1.js +0 -9
  317. package/dist/esm/package-da68ab5a.js +0 -3
  318. package/dist/esm/post-breadcrumb.entry.js +0 -5
  319. package/dist/esm/post-card-control-aa043898.js +0 -281
  320. package/dist/esm/post-popover-e51a7a18.js +0 -108
  321. package/dist/esm/post-tag-a3b989e0.js +0 -45
  322. package/dist/post-components/p-1376c653.js +0 -1
  323. package/dist/post-components/p-13835969.js +0 -1
  324. package/dist/post-components/p-13fdbaf6.entry.js +0 -1
  325. package/dist/post-components/p-1e2169ae.entry.js +0 -1
  326. package/dist/post-components/p-23e4c270.entry.js +0 -1
  327. package/dist/post-components/p-2641e06b.js +0 -1
  328. package/dist/post-components/p-2d3b16c7.js +0 -1
  329. package/dist/post-components/p-33c35e15.js +0 -1
  330. package/dist/post-components/p-3b247d71.entry.js +0 -1
  331. package/dist/post-components/p-42a5fdf8.js +0 -1
  332. package/dist/post-components/p-4ed7bab6.js +0 -1
  333. package/dist/post-components/p-5aeb3656.js +0 -1
  334. package/dist/post-components/p-5c518421.js +0 -1
  335. package/dist/post-components/p-6db1a2e0.entry.js +0 -1
  336. package/dist/post-components/p-6fe98184.entry.js +0 -1
  337. package/dist/post-components/p-7d731077.entry.js +0 -1
  338. package/dist/post-components/p-7ee47334.entry.js +0 -1
  339. package/dist/post-components/p-8223e97b.js +0 -1
  340. package/dist/post-components/p-8a8376d0.js +0 -1
  341. package/dist/post-components/p-8bb828cf.entry.js +0 -1
  342. package/dist/post-components/p-8e55ddd2.js +0 -1
  343. package/dist/post-components/p-9681efce.js +0 -1
  344. package/dist/post-components/p-96a59372.entry.js +0 -1
  345. package/dist/post-components/p-9748a355.js +0 -1
  346. package/dist/post-components/p-99c8fd43.entry.js +0 -1
  347. package/dist/post-components/p-ac042f7a.entry.js +0 -1
  348. package/dist/post-components/p-c34cacb7.js +0 -1
  349. package/dist/post-components/p-c3a970c5.js +0 -1
  350. package/dist/post-components/p-c4651d32.entry.js +0 -1
  351. package/dist/post-components/p-c9b61d31.entry.js +0 -1
  352. package/dist/post-components/p-d16dd7f9.js +0 -1
  353. package/dist/post-components/p-d81c5908.entry.js +0 -1
  354. package/dist/post-components/p-dbe31632.js +0 -1
  355. package/dist/post-components/p-e1baac59.js +0 -1
  356. package/dist/post-components/p-e2294014.js +0 -15
  357. package/dist/post-components/p-e8ff8122.js +0 -1
  358. package/dist/post-components/p-ed78d04a.entry.js +0 -1
  359. package/dist/post-components/p-f1c0924a.js +0 -1
  360. package/dist/post-components/p-f1db96d0.entry.js +0 -1
  361. package/dist/post-components/p-f7aa917f.entry.js +0 -1
  362. package/dist/post-components/p-f96b80cc.entry.js +0 -1
  363. package/dist/post-components/p-fc91cbc2.js +0 -1
  364. package/dist/post-components/p-fd78716d.js +0 -1
  365. package/loaders/debounce.js +0 -11
@@ -2,253 +2,165 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
2
2
  import { v as version } from './package.js';
3
3
  import { d as defineCustomElement$2 } from './post-icon2.js';
4
4
 
5
- const postMainnavigationCss = "post-mainnavigation post-list-item>a{text-decoration:none;border-radius:0}post-mainnavigation post-list-item post-megadropdown-trigger 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;text-align:start}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button{background-color:ButtonFace !important}post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:Highlight !important}}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item post-megadropdown-trigger button{flex:0 0 fit-content;white-space:nowrap;display:flex;align-items:center;justify-content:space-between}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}post-mainnavigation post-list-item>a:focus-visible,post-mainnavigation post-list-item post-megadropdown-trigger button:focus-visible{border-radius:4px;outline-offset:-2px !important}post-mainnavigation .back-button post-icon{transform:rotate(180deg)}@media screen and (max-width: 1023.98px){post-mainnavigation .back-button{font-size:16px}}@media screen and (max-width: 599.98px){post-mainnavigation .back-button{font-size:14px}}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{content:\"\";mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 13.2-7.5 7.6-7.6-7.6.9-.9 6.6 6.6 6.6-6.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;height:24px;width:24px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation>button,post-mainnavigation post-megadropdown-trigger button{border:1px solid ButtonBorder !important}post-mainnavigation>button:hover::after,post-mainnavigation>button[aria-expanded=true]::after,post-mainnavigation post-megadropdown-trigger button:hover::after,post-mainnavigation post-megadropdown-trigger button[aria-expanded=true]::after{color:HighlightText}}@media screen and (min-width: 1024px){post-mainnavigation{display:block;overflow-x:hidden}post-mainnavigation nav{max-width:100%;background:#fff;max-height:var(--post-main-navigation-height);user-select:none;transition:margin 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation .left-scroll-button,post-mainnavigation .right-scroll-button{z-index:4;position:absolute;inset-block-end:0;overflow:hidden}post-mainnavigation .left-scroll-button button,post-mainnavigation .right-scroll-button 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;background:#fff;padding:16px;box-shadow:var(--post-device-elevation-500);line-height:100%;height:var(--post-main-navigation-height)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){post-mainnavigation .left-scroll-button button,post-mainnavigation .right-scroll-button button{background-color:ButtonFace !important}post-mainnavigation .left-scroll-button button:hover,post-mainnavigation .right-scroll-button button:hover{background-color:Highlight !important}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button button post-icon,post-mainnavigation .right-scroll-button button post-icon{font-size:1rem}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button.d-none,post-mainnavigation .right-scroll-button.d-none{display:none}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button{inset-inline-start:0;padding-inline-end:2rem}}@media screen and (min-width: 1024px){post-mainnavigation .right-scroll-button{inset-inline-end:0;padding-inline-start:2rem}}@media screen and (min-width: 1024px){post-mainnavigation post-list>[role=list]{flex-direction:row;max-width:100vw}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{position:sticky;padding-inline:12px;height:var(--post-main-navigation-height);gap:4px;font-size:16px;z-index:4}post-mainnavigation post-list-item>a .nav-el-active,post-mainnavigation post-list-item>button .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-active{font-weight:700;text-align:center;opacity:0}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{position:absolute;opacity:1;text-align:center;width:100%;inset-inline-start:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff;font-weight:700}post-mainnavigation post-list-item>a.selected .nav-el-active,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item>button.selected .nav-el-active,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-active{opacity:1}post-mainnavigation post-list-item>a.selected .nav-el-inactive,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item>button.selected .nav-el-inactive,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-inactive{opacity:0}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}}@media screen and (min-width: 1024px)and (max-width: 599.98px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{font-size:14px}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline-end:12px;transition:border-block-end-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{width:calc(100% - 28px)}post-mainnavigation post-list-item>button::after,post-mainnavigation post-list-item post-megadropdown-trigger button::after{transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button.selected::after,post-mainnavigation post-list-item>button[aria-expanded=true]::after,post-mainnavigation post-list-item post-megadropdown-trigger button.selected::after,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]::after{transform:rotate(180deg)}}@media screen and (min-width: 1024px){post-mainnavigation post-megadropdown button:not(.btn-icon-close),post-mainnavigation post-megadropdown a{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-megadropdown button:not(.btn-icon-close)::before,post-mainnavigation post-megadropdown a::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-megadropdown button:not(.btn-icon-close).selected,post-mainnavigation post-megadropdown button:not(.btn-icon-close)[aria-expanded=true],post-mainnavigation post-megadropdown a.selected,post-mainnavigation post-megadropdown a[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover,post-mainnavigation post-megadropdown a:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover::before,post-mainnavigation post-megadropdown a:hover::before{background-color:#504f4b}}@media screen and (min-width: 1024px){post-mainnavigation [slot=back-button]{display:none}}@media screen and (max-width: 1023.98px){post-mainnavigation nav{transform:none !important}post-mainnavigation .left-scroll-button,post-mainnavigation .right-scroll-button{display:none}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-list-item>a::before,post-mainnavigation post-list-item>button::before,post-mainnavigation post-list-item post-megadropdown-trigger button::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-list-item>a:hover::before,post-mainnavigation post-list-item>button:hover::before,post-mainnavigation post-list-item post-megadropdown-trigger button:hover::before{background-color:#504f4b}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{display:none}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{transform:rotate(-90deg)}}post-mainnavigation .back-button .btn{padding-inline:0}";
5
+ const postMainnavigationCss = "post-mainnavigation post-list-item>a{text-decoration:none;border-radius:0}post-mainnavigation post-list-item post-megadropdown-trigger 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;text-align:start}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button{background-color:ButtonFace !important}post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:Highlight !important}}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item post-megadropdown-trigger button{flex:0 0 fit-content;white-space:nowrap;display:flex;align-items:center;justify-content:space-between}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}post-mainnavigation post-list-item>a:focus-visible,post-mainnavigation post-list-item post-megadropdown-trigger button:focus-visible{border-radius:4px;outline-offset:-2px !important}post-mainnavigation .back-button post-icon{transform:rotate(180deg)}@media screen and (max-width: 1023.98px){post-mainnavigation .back-button{font-size:16px}}@media screen and (max-width: 599.98px){post-mainnavigation .back-button{font-size:14px}}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{content:\"\";mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 13.2-7.5 7.6-7.6-7.6.9-.9 6.6 6.6 6.6-6.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;height:24px;width:24px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation>button,post-mainnavigation post-megadropdown-trigger button{border:1px solid ButtonBorder !important}post-mainnavigation>button:hover::after,post-mainnavigation>button[aria-expanded=true]::after,post-mainnavigation post-megadropdown-trigger button:hover::after,post-mainnavigation post-megadropdown-trigger button[aria-expanded=true]::after{color:HighlightText}}@media screen and (min-width: 1024px){post-mainnavigation{display:block;position:relative;height:var(--post-main-navigation-height);background:#fff;user-select:none}post-mainnavigation nav{flex:1 1 auto;overflow:hidden;scroll-behavior:smooth}post-mainnavigation .scroll-control{cursor:pointer;position:absolute;inset-block:0;z-index:5;padding:16px;background:#fff;box-shadow:var(--post-device-elevation-500);line-height:1}post-mainnavigation .scroll-control.scroll-left{inset-inline-start:0}post-mainnavigation .scroll-control.scroll-right{inset-inline-end:0}post-mainnavigation .scroll-control.d-none{display:none}post-mainnavigation .scroll-control post-icon{font-size:1rem}post-mainnavigation post-list>[role=list]{flex-direction:row;max-width:100vw}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{position:sticky;padding-inline:12px;height:var(--post-main-navigation-height);gap:4px;font-size:16px;z-index:4}post-mainnavigation post-list-item>a .nav-el-active,post-mainnavigation post-list-item>button .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-active{font-weight:700;text-align:center;opacity:0}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{position:absolute;opacity:1;text-align:center;width:100%;inset-inline-start:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff;font-weight:700}post-mainnavigation post-list-item>a.selected .nav-el-active,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item>button.selected .nav-el-active,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-active{opacity:1}post-mainnavigation post-list-item>a.selected .nav-el-inactive,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item>button.selected .nav-el-inactive,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-inactive{opacity:0}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}}@media screen and (min-width: 1024px)and (max-width: 599.98px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{font-size:14px}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline-end:12px;transition:border-block-end-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{width:calc(100% - 28px)}post-mainnavigation post-list-item>button::after,post-mainnavigation post-list-item post-megadropdown-trigger button::after{transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button.selected::after,post-mainnavigation post-list-item>button[aria-expanded=true]::after,post-mainnavigation post-list-item post-megadropdown-trigger button.selected::after,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]::after{transform:rotate(180deg)}}@media screen and (min-width: 1024px){post-mainnavigation post-megadropdown button:not(.btn-icon-close),post-mainnavigation post-megadropdown a{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-megadropdown button:not(.btn-icon-close)::before,post-mainnavigation post-megadropdown a::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-megadropdown button:not(.btn-icon-close).selected,post-mainnavigation post-megadropdown button:not(.btn-icon-close)[aria-expanded=true],post-mainnavigation post-megadropdown a.selected,post-mainnavigation post-megadropdown a[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover,post-mainnavigation post-megadropdown a:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover::before,post-mainnavigation post-megadropdown a:hover::before{background-color:#504f4b}}@media screen and (min-width: 1024px){post-mainnavigation [slot=back-button]{display:none}}@media screen and (max-width: 1023.98px){post-mainnavigation nav{transform:none !important}post-mainnavigation .scroll-control{display:none}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-list-item>a::before,post-mainnavigation post-list-item>button::before,post-mainnavigation post-list-item post-megadropdown-trigger button::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-list-item>a:hover::before,post-mainnavigation post-list-item>button:hover::before,post-mainnavigation post-list-item post-megadropdown-trigger button:hover::before{background-color:#504f4b}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{display:none}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{transform:rotate(-90deg)}}post-mainnavigation .back-button .btn{padding-inline:0}";
6
6
  const PostMainnavigationStyle0 = postMainnavigationCss;
7
7
 
8
8
  const SCROLL_REPEAT_INTERVAL = 100; // Interval for repeated scrolling when holding down scroll button
9
9
  const NAVBAR_DISABLE_DURATION = 400; // Duration to temporarily disable navbar interactions during scrolling
10
- const NAVIGATION_LIST_SELECTOR = 'post-list > [role="list"]:not(post-megadropdown *)';
11
- const NAVIGATION_ITEM_SELECTOR = 'post-list-item :is(a, button):not(post-megadropdown *)';
12
10
  const PostMainnavigation$1 = /*@__PURE__*/ proxyCustomElement(class PostMainnavigation extends HTMLElement {
13
11
  constructor() {
14
12
  super();
15
13
  this.__registerHost();
16
14
  this.canScrollLeft = false;
17
15
  this.canScrollRight = false;
18
- this.translationAmount = 0;
16
+ this.scrollRight = this.scrollRight.bind(this);
17
+ this.scrollLeft = this.scrollLeft.bind(this);
18
+ this.handleMutations = this.handleMutations.bind(this);
19
+ this.checkScrollability = this.checkScrollability.bind(this);
20
+ this.resizeObserver = new ResizeObserver(this.checkScrollability);
21
+ this.mutationObserver = new MutationObserver(this.handleMutations);
19
22
  }
20
- header;
21
- navbar;
22
- rightScrollButton;
23
- leftScrollButton;
24
- scrollRepeatInterval;
25
- navbarDisableTimer;
26
- resizeObserver;
27
- mutationObserver = new MutationObserver(async (mutations) => {
28
- // Wait for all elements to be hydrated
29
- await Promise.all(mutations
30
- .flatMap((mutation) => Array.from(mutation.addedNodes))
31
- .map((item) => item.componentOnReady ? item.componentOnReady() : Promise.resolve(item)));
32
- // Recalculate scrollability after DOM changes
33
- this.checkScrollability();
34
- });
35
- get host() { return this; }
36
- /**
37
- * Update navbar translation when 'translateAmount' changes and recalculate scrollability
38
- */
39
- onTranslateAmountChanges(value) {
40
- this.navbar.style.marginInlineStart = `-${value}px`;
41
- this.checkScrollability();
23
+ componentDidLoad() {
24
+ setTimeout(() => {
25
+ this.fixLayoutShift();
26
+ this.checkScrollability();
27
+ });
28
+ // Observe the navbar for size changes
29
+ this.resizeObserver.observe(this.navbar);
30
+ // Observe the navabar for mutation changes
31
+ this.mutationObserver.observe(this.navbar, { subtree: true, childList: true }); // Recheck scrollability when navigation list changes
32
+ // Ensure the scroll buttons are correctly displayed or hidden whenever the navbar is scrolled
33
+ this.navbar.addEventListener('scrollend', this.checkScrollability);
42
34
  }
43
35
  /**
44
- * Retrieves a reference to the closest 'post-header' element when the main navigation is added to the DOM.
45
- * This ensures that we can interact with the header for mobile menu toggling.
36
+ * Disconnects observers and remove event listeners when the main navigation is removed from the DOM.
46
37
  */
47
- connectedCallback() {
48
- this.header = this.host.closest('post-header');
38
+ disconnectedCallback() {
39
+ this.mutationObserver.disconnect();
40
+ this.resizeObserver.disconnect();
41
+ this.navbar.removeEventListener('scrollend', this.checkScrollability);
49
42
  }
50
43
  /**
51
- * Cleans up references and disconnects the MutationObserver when the main navigation is removed from the DOM.
44
+ * Stops the repeated scrolling when the mouse button is released.
52
45
  */
53
- disconnectedCallback() {
54
- this.header = null;
55
- this.mutationObserver.disconnect();
56
- if (this.resizeObserver) {
57
- this.resizeObserver.disconnect();
58
- }
46
+ stopScrolling() {
47
+ if (this.scrollRepeatInterval)
48
+ clearInterval(this.scrollRepeatInterval);
59
49
  }
60
- componentDidLoad() {
61
- setTimeout(() => this.checkScrollability()); // Initial check to determine if scrolling is needed
62
- this.resizeObserver = new ResizeObserver(() => {
63
- this.checkScrollability();
50
+ async handleMutations(mutations) {
51
+ const addedNodes = mutations.flatMap((mutation) => {
52
+ return Array.from(mutation.addedNodes);
64
53
  });
65
- // Observe the navbar and the navigation list for size changes
66
- if (this.navbar) {
67
- this.resizeObserver.observe(this.navbar);
68
- const navList = this.navigationList;
69
- if (navList) {
70
- this.resizeObserver.observe(navList);
71
- }
72
- }
73
- this.mutationObserver.observe(this.navigationList, { subtree: true, childList: true }); // Recheck scrollability when navigation list changes
54
+ // Wait for all elements to be hydrated
55
+ await Promise.all(addedNodes.map((item) => item.componentOnReady ? item.componentOnReady() : Promise.resolve(item)));
74
56
  this.fixLayoutShift();
75
- // Handle focus changes and adjust scroll as needed
76
- this.navbar.addEventListener('focusin', e => this.adjustTranslation(e));
57
+ this.checkScrollability();
77
58
  }
78
- // Hack that duplicates navigation elements to fix the layout shift on active elements
59
+ get navigationItems() {
60
+ return Array.from(this.navbar.querySelectorAll(':is(a, button):not(post-megadropdown *)'));
61
+ }
62
+ /**
63
+ * Hack to fix the layout shift due to bold text on active elements
64
+ */
79
65
  fixLayoutShift() {
80
- // Select first level of main navigation elements, both the links and the megadropdown trigger buttons
81
- const children = this.host.querySelectorAll('nav > post-list > div > post-list-item > a, nav > post-list > div > post-list-item > post-megadropdown-trigger > button');
82
- // Update HTML so that the content is duplicated
83
- children.forEach(child => (child.innerHTML = `<span class="nav-el-active">${child.innerHTML}</span><span class="nav-el-inactive"aria-hidden="true">${child.innerHTML}</span>`));
66
+ this.navigationItems
67
+ .filter(item => !item.matches(':has(.nav-el-active)'))
68
+ .forEach(item => {
69
+ item.innerHTML = `
70
+ <span class="nav-el-active">${item.innerHTML}</span>
71
+ <span class="nav-el-inactive" aria-hidden="true">${item.innerHTML}</span>
72
+ `;
73
+ });
84
74
  }
85
75
  handleBackButtonClick() {
86
- if (this.header)
87
- this.header.toggleMobileMenu();
76
+ const header = this.navbar.closest('post-header');
77
+ if (header)
78
+ header.toggleMobileMenu();
88
79
  }
89
80
  /**
90
- * Moves focus on the navbar and adjusts scrolling to bring focused element into view.
81
+ * Returns whether scrolling is enabled in either the left or right direction.
91
82
  */
92
- adjustTranslation(e) {
93
- const focusedElement = e.target;
94
- if (!this.canScroll || !focusedElement.matches(NAVIGATION_ITEM_SELECTOR))
95
- return;
96
- // We need to move the element into the view before it is focused to avoid browser default behavior
97
- e.preventDefault();
98
- this.withoutTransition(() => {
99
- // Try scrolling in both directions, only the necessary translation will actually occur
100
- this.translateRightTo(focusedElement);
101
- this.translateLeftTo(focusedElement);
102
- focusedElement.focus();
103
- });
83
+ get canScroll() {
84
+ return this.canScrollLeft || this.canScrollRight;
104
85
  }
105
86
  /**
106
87
  * Checks if scrolling is possible in either direction (left or right) and updates the state accordingly.
107
88
  */
108
89
  checkScrollability() {
109
- const { scrollWidth, clientWidth } = this.navbar;
110
- const couldScroll = this.canScroll;
90
+ const { scrollLeft, scrollWidth, clientWidth } = this.navbar;
111
91
  if (scrollWidth === clientWidth) {
112
92
  // If scroll width equals client width, scrolling is disabled in both directions
113
93
  this.canScrollLeft = this.canScrollRight = false;
114
94
  }
115
95
  else {
116
- this.canScrollLeft = this.translationAmount > 0; // Scrolling left is possible if not at the start
117
- this.canScrollRight = clientWidth + this.translationAmount < scrollWidth; // Scrolling right is possible if not at the end
96
+ this.canScrollLeft = Math.floor(scrollLeft) > 0; // Scrolling left is possible if not at the start
97
+ this.canScrollRight = Math.ceil(clientWidth + scrollLeft) < scrollWidth; // Scrolling right is possible if not at the end
118
98
  }
119
- if (couldScroll && !this.canScroll) {
120
- this.withoutTransition(() => (this.translationAmount = 0));
121
- }
122
- }
123
- /**
124
- * Returns whether scrolling is enabled in either the left or right direction.
125
- */
126
- get canScroll() {
127
- return this.canScrollLeft || this.canScrollRight;
128
99
  }
129
100
  /**
130
101
  * Handles the scrolling behavior when a user clicks on the left or right scroll buttons.
131
102
  */
132
- handleScrollButtonClick(direction) {
133
- if (!this.canScroll)
103
+ handleScrollButtonClick(e, direction) {
104
+ if (!this.canScroll || e.button !== 0)
134
105
  return;
135
106
  // Disable interaction with the navbar during scrolling
136
- this.disableNavbar();
137
- // Perform the initial scroll action
138
- this.scroll(direction);
107
+ this.temporarilyDisableNavbar();
108
+ // Set up the correct scroll function
109
+ const scroll = direction === 'right' ? this.scrollRight : this.scrollLeft;
110
+ scroll();
139
111
  // Repeat the scrolling action while the button is held down
140
112
  this.scrollRepeatInterval = setInterval(() => {
141
- this.scroll(direction);
113
+ scroll();
142
114
  }, SCROLL_REPEAT_INTERVAL);
143
115
  }
144
- /**
145
- * Stops the repeated scrolling when the mouse button is released.
146
- */
147
- stopScrolling() {
148
- if (this.scrollRepeatInterval)
149
- clearInterval(this.scrollRepeatInterval);
150
- }
151
- scroll(direction) {
152
- const navigationItems = Array.from(this.navigationItems);
153
- if (direction === 'left')
154
- navigationItems.reverse();
155
- for (const item of navigationItems) {
156
- const couldScroll = direction === 'left' ? this.translateLeftTo(item, true) : this.translateRightTo(item, true);
157
- if (couldScroll)
158
- break;
116
+ scrollRight() {
117
+ const scrollRightLeftEdge = document
118
+ .querySelector('.scroll-right')
119
+ .getBoundingClientRect().left;
120
+ for (const navigationItem of this.navigationItems) {
121
+ const { right, width } = navigationItem.getBoundingClientRect();
122
+ // Scroll to the first navigation item that is less than 75% visible
123
+ const isThreeQuartersVisible = right - 0.25 * width < scrollRightLeftEdge;
124
+ if (!isThreeQuartersVisible) {
125
+ this.navbar.scrollBy({ left: right - scrollRightLeftEdge });
126
+ return;
127
+ }
159
128
  }
160
129
  }
161
- translateRightTo(navigationItem, skipSmallTranslation = false) {
162
- const listItem = navigationItem.closest('post-list-item');
163
- // Calculate the right edge position of the list item relative to the left of the screen
164
- const rightEdgePosition = listItem.offsetLeft + listItem.offsetWidth;
165
- // Calculate the last visible position on the screen, right before the right scroll button
166
- const lastVisiblePosition = this.host.clientWidth - this.rightScrollButton.clientWidth;
167
- // If the item is already fully visible, no translation is needed
168
- if (rightEdgePosition < lastVisiblePosition)
169
- return false;
170
- const translationIncrease = rightEdgePosition - lastVisiblePosition + 1; // + 1 because offset values are rounded
171
- // If the required scroll distance is too small (less than half the width of the item), avoid unnecessary scroll
172
- if (skipSmallTranslation && translationIncrease < listItem.clientWidth / 2)
173
- return false;
174
- // Calculate the maximum translation amount to prevent scrolling past the end of the content
175
- const maximumTranslation = this.navbar.scrollWidth - this.host.clientWidth;
176
- // Adjust the translation amount, ensuring it doesn't exceed the maximum scrollable area
177
- const { marginRight } = getComputedStyle(this.navigationList);
178
- this.translationAmount =
179
- Math.min(this.translationAmount + translationIncrease, maximumTranslation) +
180
- parseInt(marginRight);
181
- return true;
182
- }
183
- translateLeftTo(navigationItem, skipSmallTranslation = false) {
184
- const listItem = navigationItem.closest('post-list-item');
185
- // Get the left edge position of the list item relative to the left of the screen
186
- const leftEdgePosition = listItem.offsetLeft;
187
- // Calculate the first visible position on the screen to the left, right after the left scroll button
188
- const firstVisiblePosition = this.leftScrollButton.clientWidth;
189
- // If the item is already fully visible, no translation is needed
190
- if (leftEdgePosition > firstVisiblePosition)
191
- return false;
192
- const translationDecrease = firstVisiblePosition - leftEdgePosition + 1; // + 1 because offset values are rounded
193
- // If the required scroll distance is too small (less than half the width of the item), don't perform the scroll
194
- if (skipSmallTranslation && translationDecrease < listItem.clientWidth / 2)
195
- return false;
196
- // Calculate the minimum allowed translation amount (no negative scrolling allowed)
197
- const minimumTranslation = 0;
198
- // Adjust the translation amount, ensuring it doesn't go below the minimum scrollable area
199
- const { marginLeft } = getComputedStyle(this.navigationList);
200
- this.translationAmount = Math.max(this.translationAmount - translationDecrease - parseInt(marginLeft), minimumTranslation);
201
- return true;
202
- }
203
- /**
204
- * Returns the navigation list container element
205
- */
206
- get navigationList() {
207
- return this.navbar.querySelector(NAVIGATION_LIST_SELECTOR);
208
- }
209
- /**
210
- * Returns the navigation items
211
- */
212
- get navigationItems() {
213
- return this.navbar.querySelectorAll(NAVIGATION_ITEM_SELECTOR);
130
+ scrollLeft() {
131
+ const scrollLeftRightEdge = document
132
+ .querySelector('.scroll-left')
133
+ .getBoundingClientRect().right;
134
+ for (const navigationItem of this.navigationItems.reverse()) {
135
+ const { left, width } = navigationItem.getBoundingClientRect();
136
+ // Scroll to the first navigation item that is less than 75% visible
137
+ const isThreeQuartersVisible = left + 0.25 * width > scrollLeftRightEdge;
138
+ if (!isThreeQuartersVisible) {
139
+ this.navbar.scrollBy({ left: left - scrollLeftRightEdge });
140
+ return;
141
+ }
142
+ }
214
143
  }
215
144
  /**
216
145
  * Temporarily disables interactions with the navbar during scrolling to prevent accidental clicks.
217
146
  * Re-enables interactions after a brief delay to avoid blocking the user entirely.
218
147
  */
219
- disableNavbar() {
148
+ temporarilyDisableNavbar() {
220
149
  if (this.navbarDisableTimer)
221
150
  clearTimeout(this.navbarDisableTimer);
222
- this.navbar.style.pointerEvents = 'none';
151
+ this.navbar.setAttribute('inert', '');
223
152
  this.navbarDisableTimer = setTimeout(() => {
224
- this.navbar.style.pointerEvents = 'initial';
153
+ this.navbar.removeAttribute('inert');
225
154
  }, NAVBAR_DISABLE_DURATION);
226
155
  }
227
- /**
228
- * Allows to translate the navbar without a transition
229
- */
230
- withoutTransition(callback) {
231
- const transition = this.navbar.style.transition;
232
- this.navbar.style.transition = 'none';
233
- callback();
234
- setTimeout(() => {
235
- this.navbar.style.transition = transition;
236
- });
237
- }
238
156
  render() {
239
- return (h(Host, { key: 'e91995f96b3b795fe2ed5c79ee89257b5c8aec2a', slot: "post-mainnavigation", version: version }, h("div", { key: '165c6efcf5e05984708de9e0abdaed130036816e', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: 'a894f4788fc85d2fb0d6480831af711871c3b9f4', name: "back-button" })), h("nav", { key: '11d276069f40676b0c3e2fb5e8426b5803bcdad2', ref: el => (this.navbar = el) }, h("slot", { key: '6070e3f75ccfa7dfaf22554802e6c43dd025830c' })), h("div", { key: '06aefb232bfa1d7cd053e33bf7150fe418e4239a', class: `left-scroll-button${this.canScrollLeft ? '' : ' d-none'}`, "aria-hidden": "true" }, h("button", { key: 'f16d493af4ca62cd64a06a27ff8f805039cc806f', type: "button", tabindex: "-1", ref: el => (this.leftScrollButton = el), onMouseDown: () => this.handleScrollButtonClick('left') }, h("post-icon", { key: '8a4d2fa0b90a571445b02fa4b157ca4a5ac5eb9b', "aria-hidden": "true", name: "chevronleft" }))), h("div", { key: '2e540a2b9c6e1c1a68be89f8ed8a3a4840083b02', class: `right-scroll-button${this.canScrollRight ? '' : ' d-none'}`, "aria-hidden": "true" }, h("button", { key: '1aafbe38dd159eedb4b8dcb72dd19a61348b603a', type: "button", tabindex: "-1", ref: el => (this.rightScrollButton = el), onMouseDown: () => this.handleScrollButtonClick('right') }, h("post-icon", { key: '72eccd291ba4a15bf64bf76f87398dddf7586bae', "aria-hidden": "true", name: "chevronright" })))));
157
+ return (h(Host, { key: '6cd850555585d87eb25e3f6892b8010f5e4d23d6', slot: "post-mainnavigation", version: version }, h("div", { key: '3411008120d072920f4de0b71c9dc014748f1390', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '2e3747380cb546bd6da77e5ffba2403586205a55', name: "back-button" })), h("div", { key: 'e9eedd836b3f679ba2861109db2d0811c1142677', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, h("post-icon", { key: '628511a2c1812a08828e1aa2b51f26ad01a5a2cf', "aria-hidden": "true", name: "chevronleft" })), h("nav", { key: '1b660d65e1984e8701a98a369046f391fd177338', ref: el => (this.navbar = el) }, h("slot", { key: '0eb35366ac0bd58509afd6a12f68c2b09396a497' })), h("div", { key: '11145ad6602e2df78d3c3f4643cc6e4e960775aa', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, h("post-icon", { key: '26e795cd00221dbfb1a7632453d0d48993584b0b', "aria-hidden": "true", name: "chevronright" }))));
240
158
  }
241
- static get watchers() { return {
242
- "translationAmount": ["onTranslateAmountChanges"]
243
- }; }
244
159
  static get style() { return PostMainnavigationStyle0; }
245
160
  }, [4, "post-mainnavigation", {
246
161
  "canScrollLeft": [32],
247
- "canScrollRight": [32],
248
- "translationAmount": [32]
249
- }, [[9, "mouseup", "stopScrolling"]], {
250
- "translationAmount": ["onTranslateAmountChanges"]
251
- }]);
162
+ "canScrollRight": [32]
163
+ }, [[9, "mouseup", "stopScrolling"], [9, "mouseleave", "stopScrolling"]]]);
252
164
  function defineCustomElement$1() {
253
165
  if (typeof customElements === "undefined") {
254
166
  return;
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
3
  import { c as checkType } from './check-type.js';
4
+ import './breakpoints.js';
4
5
  import { e as eventGuard } from './event-guard.js';
5
6
 
6
7
  const postMegadropdownTriggerCss = "post-megadropdown-trigger{width:100%;position:relative;z-index:3}";
@@ -10,20 +11,45 @@ const PostMegadropdownTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMeg
10
11
  constructor() {
11
12
  super();
12
13
  this.__registerHost();
14
+ /**
15
+ * Reference to the slotted button within the trigger, if present.
16
+ * Used to manage click and key events for mega dropdown control.
17
+ */
18
+ this.slottedButton = null;
19
+ /**
20
+ * Tracks whether this trigger's dropdown was expanded before a state change.
21
+ * Used to determine if this trigger should handle focus when its dropdown closes.
22
+ */
23
+ this.wasExpanded = false;
24
+ this.handleKeyDown = (event) => {
25
+ if (event.key === 'Enter' || event.key === ' ') {
26
+ event.preventDefault();
27
+ this.handleToggle();
28
+ if (this.megadropdown && !this.ariaExpanded) {
29
+ setTimeout(() => this.megadropdown.focusFirst(), 100);
30
+ }
31
+ }
32
+ };
33
+ this.handleToggleMegadropdown = (event) => {
34
+ eventGuard(this.host, event, { targetLocalName: 'post-megadropdown' }, () => {
35
+ if (event.target.id === this.for) {
36
+ this.ariaExpanded = event.detail.isVisible;
37
+ // Focus on the trigger parent of the dropdown after it's closed if the close button had been clicked
38
+ if (this.wasExpanded && !this.ariaExpanded && event.detail.focusParent) {
39
+ setTimeout(() => {
40
+ this.slottedButton?.focus();
41
+ }, 100);
42
+ }
43
+ this.wasExpanded = this.ariaExpanded;
44
+ if (this.slottedButton) {
45
+ this.slottedButton.setAttribute('aria-expanded', this.ariaExpanded.toString());
46
+ }
47
+ }
48
+ });
49
+ };
13
50
  this.for = undefined;
14
51
  this.ariaExpanded = false;
15
52
  }
16
- get host() { return this; }
17
- /**
18
- * Reference to the slotted button within the trigger, if present.
19
- * Used to manage click and key events for mega dropdown control.
20
- */
21
- slottedButton = null;
22
- /**
23
- * Tracks whether this trigger's dropdown was expanded before a state change.
24
- * Used to determine if this trigger should handle focus when its dropdown closes.
25
- */
26
- wasExpanded = false;
27
53
  /**
28
54
  * Watch for changes to the `for` property to validate its type and ensure it is a string.
29
55
  * @param forValue - The new value of the `for` property.
@@ -45,32 +71,6 @@ const PostMegadropdownTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMeg
45
71
  console.warn(`No post-megadropdown found with ID: ${this.for}`);
46
72
  }
47
73
  }
48
- handleKeyDown = (event) => {
49
- if (event.key === 'Enter' || event.key === ' ') {
50
- event.preventDefault();
51
- this.handleToggle();
52
- if (this.megadropdown && !this.ariaExpanded) {
53
- setTimeout(() => this.megadropdown.focusFirst(), 100);
54
- }
55
- }
56
- };
57
- handleToggleMegadropdown = (event) => {
58
- eventGuard(this.host, event, { targetLocalName: 'post-megadropdown' }, () => {
59
- if (event.target.id === this.for) {
60
- this.ariaExpanded = event.detail.isVisible;
61
- // Focus on the trigger parent of the dropdown after it's closed if the close button had been clicked
62
- if (this.wasExpanded && !this.ariaExpanded && event.detail.focusParent) {
63
- setTimeout(() => {
64
- this.slottedButton?.focus();
65
- }, 100);
66
- }
67
- this.wasExpanded = this.ariaExpanded;
68
- if (this.slottedButton) {
69
- this.slottedButton.setAttribute('aria-expanded', this.ariaExpanded.toString());
70
- }
71
- }
72
- });
73
- };
74
74
  componentDidLoad() {
75
75
  this.validateControlFor();
76
76
  // Check if the mega dropdown attached to the trigger is expanded or not
@@ -93,6 +93,7 @@ const PostMegadropdownTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMeg
93
93
  render() {
94
94
  return (h(Host, { key: '86b85efede8d9b19f3f0560f500f33f5e172177f', "data-version": version, "tab-index": "-1" }, h("button", { key: '0f810e4c38bc4abf23ac60ab27b36d408e7ced0d' }, h("slot", { key: '2a522ac7e15ef8ac077b73cdebf629b89ea173c6' }))));
95
95
  }
96
+ get host() { return this; }
96
97
  static get watchers() { return {
97
98
  "for": ["validateControlFor"]
98
99
  }; }
@@ -11,28 +11,34 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
11
11
  super();
12
12
  this.__registerHost();
13
13
  this.postToggleMegadropdown = createEvent(this, "postToggleMegadropdown", 7);
14
+ this.handleClickOutside = (event) => {
15
+ if (this.device !== 'desktop')
16
+ return;
17
+ const target = event.target;
18
+ if (this.host.contains(target)) {
19
+ return;
20
+ }
21
+ if (target instanceof HTMLElement) {
22
+ const trigger = target.closest('post-megadropdown-trigger');
23
+ if (trigger) {
24
+ const targetDropdownId = trigger.getAttribute('for');
25
+ if (targetDropdownId !== this.host.id) {
26
+ return;
27
+ }
28
+ }
29
+ }
30
+ this.hide(false);
31
+ };
14
32
  this.device = breakpoint.get('name');
15
33
  this.isVisible = false;
16
34
  this.animationClass = null;
17
35
  }
18
- firstFocusableEl;
19
- lastFocusableEl;
20
- get host() { return this; }
21
- /** Tracks the currently active dropdown instance. */
22
- static activeDropdown = null;
23
36
  breakpointChange(e) {
24
37
  this.device = e.detail;
25
38
  if (this.device === 'desktop' && this.isVisible) {
26
39
  this.animationClass = null;
27
40
  }
28
41
  }
29
- /**
30
- * Emits when the dropdown is shown or hidden.
31
- * The event payload is an object.
32
- * `isVisible` is true when the dropdown gets opened and false when it gets closed
33
- * `focusParent` determines whether after the closing of the mega dropdown, the focus should go back to the trigger parent or naturally go to the next focusable element in the page
34
- **/
35
- postToggleMegadropdown;
36
42
  disconnectedCallback() {
37
43
  this.removeListeners();
38
44
  window.removeEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
@@ -112,24 +118,6 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
112
118
  this.removeListeners();
113
119
  }
114
120
  }
115
- handleClickOutside = (event) => {
116
- if (this.device !== 'desktop')
117
- return;
118
- const target = event.target;
119
- if (this.host.contains(target)) {
120
- return;
121
- }
122
- if (target instanceof HTMLElement) {
123
- const trigger = target.closest('post-megadropdown-trigger');
124
- if (trigger) {
125
- const targetDropdownId = trigger.getAttribute('for');
126
- if (targetDropdownId !== this.host.id) {
127
- return;
128
- }
129
- }
130
- }
131
- this.hide(false);
132
- };
133
121
  addListeners() {
134
122
  this.host.addEventListener('keydown', e => this.keyboardHandler(e));
135
123
  document.addEventListener('keyup', e => this.handleTabOutside(e));
@@ -172,6 +160,7 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
172
160
  const containerStyle = this.isVisible ? {} : { display: 'none' };
173
161
  return (h(Host, { key: '7426a12ebaeac0ce3b8402c3da4d5393daca059b', version: version }, h("div", { key: 'd47b60c334577f5662f19912f12ce941b4b52d94', class: `megadropdown-container ${this.animationClass || ''}`, style: containerStyle, onAnimationEnd: () => this.handleAnimationEnd() }, h("div", { key: '2798f217b2b3e43c3c63072884bbbbe7d99ed62f', class: "megadropdown" }, h("slot", { key: 'b61f82bbc7f87f65d9b6957e7a4e5d6790b6dd00', name: "megadropdown-title" }), h("div", { key: 'f4996a819511cb59185faeedbdcec4be6e6f8a24', class: "megadropdown-content" }, h("slot", { key: '54f695c3b3d30a6a1aae7f7dc6f65f4d4d27de68' })), h("div", { key: 'b1334295c7d758e20c85b6c6c8cefc31dcf09e20', onClick: () => this.hide(true), class: "back-button" }, h("slot", { key: 'c4db69fa3207ce4cb47b725e37b1993820a2a64c', name: "back-button" })), h("div", { key: '68b22a3222382586fc749dec63e36edae84360c1', onClick: () => this.hide(true), class: "close-button" }, h("slot", { key: '8023b75c931a95dbd9552c1a713790e77e40f526', name: "close-button" }))))));
174
162
  }
163
+ get host() { return this; }
175
164
  static get style() { return PostMegadropdownStyle0; }
176
165
  }, [4, "post-megadropdown", {
177
166
  "device": [32],
@@ -182,6 +171,8 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
182
171
  "hide": [64],
183
172
  "focusFirst": [64]
184
173
  }]);
174
+ /** Tracks the currently active dropdown instance. */
175
+ PostMegadropdown$1.activeDropdown = null;
185
176
  function defineCustomElement$1() {
186
177
  if (typeof customElements === "undefined") {
187
178
  return;