@swisspost/design-system-components 9.0.0-next.9 → 10.0.0-next.37

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 (516) hide show
  1. package/dist/.config/bindings.angular.js +4 -0
  2. package/dist/cjs/breakpoints-cdf1b747.js +59 -0
  3. package/dist/cjs/check-non-empty-bd99d236.js +15 -0
  4. package/dist/cjs/check-one-of-75d270b5.js +13 -0
  5. package/dist/cjs/check-type-cdbf6d29.js +21 -0
  6. package/dist/cjs/check-url-220a286c.js +19 -0
  7. package/dist/cjs/event-guard-efabc84f.js +47 -0
  8. package/dist/cjs/fade-72d5ef55.js +14 -0
  9. package/dist/cjs/get-root-8102fecd.js +17 -0
  10. package/dist/cjs/index-23e36ff7.js +37 -0
  11. package/dist/cjs/{index-010dc207.js → index-b60129c4.js} +17 -10
  12. package/dist/cjs/index.browser-4af21c17.js +16 -0
  13. package/dist/cjs/index.cjs.js +36 -31
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/long-press-event-6e62d113.js +266 -0
  16. package/dist/cjs/{package-8e810a59.js → package-8121f093.js} +1 -1
  17. package/dist/cjs/{post-accordion-b9df8522.js → post-accordion-beac7c9f.js} +11 -12
  18. package/dist/cjs/post-accordion-item-4846fbee.js +64 -0
  19. package/dist/cjs/post-accordion-item.cjs.entry.js +10 -7
  20. package/dist/cjs/post-accordion.cjs.entry.js +6 -4
  21. package/dist/cjs/{post-avatar-f7236084.js → post-avatar-a36991fb.js} +10 -13
  22. package/dist/cjs/post-avatar.cjs.entry.js +5 -4
  23. package/dist/cjs/post-back-to-top-32aa9017.js +96 -0
  24. package/dist/cjs/post-back-to-top.cjs.entry.js +7 -6
  25. package/dist/cjs/post-banner-be0e8909.js +92 -0
  26. package/dist/cjs/post-banner.cjs.entry.js +11 -9
  27. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +8 -7
  28. package/dist/cjs/post-breadcrumbs-6ef82a41.js +120 -0
  29. package/dist/cjs/post-breadcrumbs.cjs.entry.js +13 -0
  30. package/dist/cjs/post-card-control-fe919333.js +269 -0
  31. package/dist/cjs/post-card-control.cjs.entry.js +6 -5
  32. package/dist/cjs/post-closebutton_15.cjs.entry.js +13 -10
  33. package/dist/cjs/{post-collapsible-trigger-143cf84a.js → post-collapsible-trigger-f42be607.js} +59 -60
  34. package/dist/cjs/post-collapsible_2.cjs.entry.js +11 -10
  35. package/dist/cjs/post-components.cjs.js +2 -2
  36. package/dist/cjs/{post-footer-5f7fdf96.js → post-footer-5179aa17.js} +11 -57
  37. package/dist/cjs/post-footer.cjs.entry.js +4 -3
  38. package/dist/cjs/post-linkarea-27125078.js +30 -0
  39. package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
  40. package/dist/cjs/{post-menu-item-bb0b0b9e.js → post-menu-item-d78a9121.js} +11 -17
  41. package/dist/cjs/post-popover-feb1e773.js +135 -0
  42. package/dist/cjs/post-popover.cjs.entry.js +4 -4
  43. package/dist/cjs/{post-rating-1082197c.js → post-rating-6d153a2c.js} +4 -4
  44. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  45. package/dist/cjs/post-tab-header-e4532918.js +34 -0
  46. package/dist/cjs/post-tab-header.cjs.entry.js +6 -4
  47. package/dist/cjs/{post-tab-panel-60f211a5.js → post-tab-panel-40df21ad.js} +5 -4
  48. package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
  49. package/dist/cjs/{post-tabs-1f797ce4.js → post-tabs-45db2696.js} +13 -15
  50. package/dist/cjs/post-tabs.cjs.entry.js +5 -4
  51. package/dist/cjs/post-tag-0967bb1e.js +47 -0
  52. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  53. package/dist/cjs/post-togglebutton-42b7d166.js +4494 -0
  54. package/dist/cjs/post-tooltip-f833d51d.js +73 -0
  55. package/dist/cjs/{post-tooltip-38c839a4.js → post-tooltip-trigger-3ceac010.js} +143 -456
  56. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -0
  57. package/dist/cjs/post-tooltip.cjs.entry.js +5 -9
  58. package/dist/cjs/{slide-5d51abe8.js → slide-cd1f09b3.js} +8 -8
  59. package/dist/collection/animations/collapse.js +8 -6
  60. package/dist/collection/animations/fade.js +6 -2
  61. package/dist/collection/animations/slide.js +8 -8
  62. package/dist/collection/collection-manifest.json +5 -3
  63. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  64. package/dist/collection/components/post-accordion/post-accordion.js +6 -8
  65. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  66. package/dist/collection/components/post-accordion-item/post-accordion-item.js +12 -12
  67. package/dist/collection/components/post-avatar/post-avatar.css +1 -3
  68. package/dist/collection/components/post-avatar/post-avatar.js +7 -11
  69. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  70. package/dist/collection/components/post-back-to-top/post-back-to-top.js +38 -18
  71. package/dist/collection/components/post-banner/post-banner.css +1 -3
  72. package/dist/collection/components/post-banner/post-banner.js +13 -12
  73. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +11 -8
  74. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -0
  75. package/dist/collection/components/{post-breadcrumb/post-breadcrumb.js → post-breadcrumbs/post-breadcrumbs.js} +20 -21
  76. package/dist/collection/components/post-card-control/post-card-control.css +1 -3
  77. package/dist/collection/components/post-card-control/post-card-control.js +15 -19
  78. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -0
  79. package/dist/collection/components/post-closebutton/post-closebutton.js +12 -1
  80. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  81. package/dist/collection/components/post-collapsible/post-collapsible.js +3 -2
  82. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +43 -45
  83. package/dist/collection/components/post-footer/post-footer.js +8 -8
  84. package/dist/collection/components/post-header/post-header.css +1 -1
  85. package/dist/collection/components/post-header/post-header.js +212 -52
  86. package/dist/collection/components/post-icon/post-icon.css +1 -1
  87. package/dist/collection/components/post-icon/post-icon.js +71 -29
  88. package/dist/collection/components/post-language-option/post-language-option.css +1 -3
  89. package/dist/collection/components/post-language-option/post-language-option.js +34 -12
  90. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
  91. package/dist/collection/components/post-language-switch/post-language-switch.js +56 -33
  92. package/dist/collection/components/post-language-switch/switch-variants.js +1 -1
  93. package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
  94. package/dist/collection/components/post-linkarea/post-linkarea.js +30 -0
  95. package/dist/collection/components/post-list/post-list.css +1 -3
  96. package/dist/collection/components/post-list/post-list.js +4 -3
  97. package/dist/collection/components/post-list-item/post-list-item.js +2 -1
  98. package/dist/collection/components/post-logo/post-logo.css +1 -1
  99. package/dist/collection/components/post-logo/post-logo.js +2 -2
  100. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  101. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +157 -25
  102. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  103. package/dist/collection/components/post-megadropdown/post-megadropdown.js +179 -55
  104. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  105. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +41 -12
  106. package/dist/collection/components/post-menu/post-menu.css +1 -3
  107. package/dist/collection/components/post-menu/post-menu.js +44 -30
  108. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -13
  109. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +16 -10
  110. package/dist/collection/components/post-popover/post-popover.css +1 -3
  111. package/dist/collection/components/post-popover/post-popover.js +23 -16
  112. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  113. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +217 -56
  114. package/dist/collection/components/post-rating/post-rating.css +1 -3
  115. package/dist/collection/components/post-rating/post-rating.js +1 -1
  116. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -3
  117. package/dist/collection/components/post-tab-header/post-tab-header.js +6 -5
  118. package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -3
  119. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  120. package/dist/collection/components/post-tabs/post-tabs.js +6 -14
  121. package/dist/collection/components/post-tag/post-tag.css +1 -3
  122. package/dist/collection/components/post-tag/post-tag.js +2 -2
  123. package/dist/collection/components/post-togglebutton/post-togglebutton.js +3 -3
  124. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  125. package/dist/collection/components/post-tooltip/post-tooltip.js +62 -212
  126. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.css +1 -0
  127. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +230 -0
  128. package/dist/collection/index.js +3 -1
  129. package/dist/collection/utils/attribute-observer.js +6 -5
  130. package/dist/collection/utils/breakpoints.js +21 -15
  131. package/dist/collection/utils/component-on-ready.js +4 -4
  132. package/dist/collection/utils/debounce.js +2 -1
  133. package/dist/collection/utils/environment.js +2 -0
  134. package/dist/collection/utils/event-guard.js +43 -0
  135. package/dist/collection/utils/{is-focusable.js → get-focusable-children.js} +10 -3
  136. package/dist/collection/utils/get-root.js +6 -1
  137. package/dist/collection/utils/index.js +5 -0
  138. package/dist/collection/utils/is-motion-reduced.js +2 -1
  139. package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
  140. package/dist/collection/utils/property-checkers/check-one-of.js +8 -3
  141. package/dist/collection/utils/property-checkers/check-pattern.js +8 -3
  142. package/dist/collection/utils/property-checkers/check-type.js +11 -6
  143. package/dist/collection/utils/property-checkers/check-url.js +11 -6
  144. package/dist/collection/utils/property-checkers/empty-or.js +5 -2
  145. package/dist/collection/utils/sass-export.js +8 -5
  146. package/dist/components/breakpoints.js +56 -0
  147. package/dist/components/check-non-empty.js +6 -2
  148. package/dist/components/check-one-of.js +8 -3
  149. package/dist/components/check-type.js +11 -6
  150. package/dist/components/event-guard.js +45 -0
  151. package/dist/components/fade.js +6 -2
  152. package/dist/components/get-focusable-children.js +35 -0
  153. package/dist/components/get-root.js +7 -1
  154. package/dist/components/index.browser.js +14 -0
  155. package/dist/components/index.js +3 -1
  156. package/dist/components/index2.js +24 -11
  157. package/dist/components/long-press-event.js +264 -0
  158. package/dist/components/package.js +1 -1
  159. package/dist/components/post-accordion-item2.js +14 -13
  160. package/dist/components/post-accordion2.js +8 -9
  161. package/dist/components/post-avatar2.js +8 -11
  162. package/dist/components/post-back-to-top2.js +41 -20
  163. package/dist/components/post-banner2.js +15 -13
  164. package/dist/components/post-breadcrumb-item2.js +9 -9
  165. package/dist/components/post-breadcrumbs.d.ts +11 -0
  166. package/dist/components/post-breadcrumbs.js +6 -0
  167. package/dist/components/post-breadcrumbs2.js +177 -0
  168. package/dist/components/post-card-control2.js +16 -19
  169. package/dist/components/post-closebutton2.js +7 -2
  170. package/dist/components/post-collapsible-trigger2.js +46 -48
  171. package/dist/components/post-collapsible2.js +13 -10
  172. package/dist/components/post-footer2.js +8 -54
  173. package/dist/components/post-header2.js +174 -51
  174. package/dist/components/post-icon2.js +72 -29
  175. package/dist/components/post-language-option2.js +21 -12
  176. package/dist/components/post-language-switch2.js +44 -45
  177. package/dist/components/{post-breadcrumb.d.ts → post-linkarea.d.ts} +4 -4
  178. package/dist/components/post-linkarea.js +6 -0
  179. package/dist/components/post-linkarea2.js +43 -0
  180. package/dist/components/post-list-item2.js +2 -1
  181. package/dist/components/post-list2.js +5 -4
  182. package/dist/components/post-logo2.js +4 -3
  183. package/dist/components/post-mainnavigation2.js +150 -15
  184. package/dist/components/post-megadropdown-trigger2.js +43 -13
  185. package/dist/components/post-megadropdown2.js +136 -39
  186. package/dist/components/post-menu-item2.js +2 -8
  187. package/dist/components/post-menu-trigger2.js +17 -10
  188. package/dist/components/post-menu2.js +43 -54
  189. package/dist/components/post-popover2.js +46 -15
  190. package/dist/components/post-popovercontainer2.js +921 -111
  191. package/dist/components/post-rating2.js +2 -2
  192. package/dist/components/post-tab-header2.js +8 -6
  193. package/dist/components/post-tab-panel2.js +4 -3
  194. package/dist/components/post-tabs2.js +10 -12
  195. package/dist/components/post-tag2.js +2 -2
  196. package/dist/components/post-togglebutton2.js +4 -3
  197. package/dist/components/post-tooltip-trigger.d.ts +11 -0
  198. package/dist/components/post-tooltip-trigger.js +6 -0
  199. package/dist/components/post-tooltip-trigger2.js +4705 -0
  200. package/dist/components/post-tooltip2.js +34 -4960
  201. package/dist/components/slide.js +9 -9
  202. package/dist/docs.json +567 -252
  203. package/dist/esm/breakpoints-7812702e.js +56 -0
  204. package/dist/esm/check-non-empty-258a56b3.js +13 -0
  205. package/dist/esm/check-one-of-0bee20f5.js +11 -0
  206. package/dist/esm/check-type-37d5d307.js +19 -0
  207. package/dist/esm/check-url-17962bc8.js +17 -0
  208. package/dist/esm/event-guard-538ee077.js +45 -0
  209. package/dist/esm/fade-1f3cacf4.js +11 -0
  210. package/dist/esm/get-root-1b1af46f.js +15 -0
  211. package/dist/esm/index-8f8fe5b0.js +32 -0
  212. package/dist/esm/{index-fb8d6be7.js → index-f4d19816.js} +17 -10
  213. package/dist/esm/index.browser-ff103197.js +14 -0
  214. package/dist/esm/index.js +33 -30
  215. package/dist/esm/loader.js +3 -3
  216. package/dist/esm/long-press-event-04d24397.js +264 -0
  217. package/dist/esm/package-d9237b44.js +3 -0
  218. package/dist/esm/{post-accordion-ee54a3ef.js → post-accordion-fdcf7205.js} +11 -12
  219. package/dist/esm/post-accordion-item-e11e3804.js +62 -0
  220. package/dist/esm/post-accordion-item.entry.js +10 -7
  221. package/dist/esm/post-accordion.entry.js +6 -4
  222. package/dist/esm/{post-avatar-5572fa73.js → post-avatar-d360c6d2.js} +10 -13
  223. package/dist/esm/post-avatar.entry.js +5 -4
  224. package/dist/esm/post-back-to-top-85796c8b.js +94 -0
  225. package/dist/esm/post-back-to-top.entry.js +7 -6
  226. package/dist/esm/post-banner-a3090f67.js +90 -0
  227. package/dist/esm/post-banner.entry.js +11 -9
  228. package/dist/esm/post-breadcrumb-item_2.entry.js +8 -7
  229. package/dist/esm/post-breadcrumbs-15ec5a26.js +118 -0
  230. package/dist/esm/post-breadcrumbs.entry.js +5 -0
  231. package/dist/esm/post-card-control-6142534e.js +267 -0
  232. package/dist/esm/post-card-control.entry.js +6 -5
  233. package/dist/esm/post-closebutton_15.entry.js +13 -10
  234. package/dist/esm/{post-collapsible-trigger-1c7833f8.js → post-collapsible-trigger-68306358.js} +59 -60
  235. package/dist/esm/post-collapsible_2.entry.js +11 -10
  236. package/dist/esm/post-components.js +3 -3
  237. package/dist/esm/{post-footer-b18875e7.js → post-footer-d2a3270e.js} +10 -56
  238. package/dist/esm/post-footer.entry.js +4 -3
  239. package/dist/esm/post-linkarea-64998c67.js +28 -0
  240. package/dist/esm/post-linkarea.entry.js +3 -0
  241. package/dist/esm/{post-menu-item-2906384b.js → post-menu-item-95a0a647.js} +11 -17
  242. package/dist/esm/post-popover-c5f81087.js +133 -0
  243. package/dist/esm/post-popover.entry.js +4 -4
  244. package/dist/esm/{post-rating-95cbdbb8.js → post-rating-7bfedafb.js} +4 -4
  245. package/dist/esm/post-rating.entry.js +3 -3
  246. package/dist/esm/post-tab-header-08033da4.js +32 -0
  247. package/dist/esm/post-tab-header.entry.js +6 -4
  248. package/dist/esm/{post-tab-panel-cafd9e04.js → post-tab-panel-be701793.js} +5 -4
  249. package/dist/esm/post-tab-panel.entry.js +4 -3
  250. package/dist/esm/{post-tabs-beef8eae.js → post-tabs-c69e2842.js} +13 -15
  251. package/dist/esm/post-tabs.entry.js +5 -4
  252. package/dist/esm/post-tag-ebac7f3e.js +45 -0
  253. package/dist/esm/post-tag.entry.js +3 -3
  254. package/dist/esm/post-togglebutton-706e3af0.js +4478 -0
  255. package/dist/esm/post-tooltip-9a195d47.js +71 -0
  256. package/dist/esm/{post-tooltip-b298039a.js → post-tooltip-trigger-7d6f234b.js} +143 -456
  257. package/dist/esm/post-tooltip-trigger.entry.js +5 -0
  258. package/dist/esm/post-tooltip.entry.js +5 -9
  259. package/dist/esm/{slide-3422b8a3.js → slide-cd2850ee.js} +9 -9
  260. package/dist/post-components/index.esm.js +1 -1
  261. package/dist/post-components/p-034715ec.js +1 -0
  262. package/dist/post-components/p-0717fe4c.js +1 -0
  263. package/dist/post-components/p-0889c759.js +1 -0
  264. package/dist/post-components/p-0c03547b.js +1 -0
  265. package/dist/post-components/p-0de8d05f.js +1 -0
  266. package/dist/post-components/p-1373a79b.entry.js +1 -0
  267. package/dist/post-components/{p-4f9746f6.js → p-17dc4170.js} +2 -9
  268. package/dist/post-components/p-181c73d5.js +1 -0
  269. package/dist/post-components/p-1a21fd8d.js +1 -0
  270. package/dist/post-components/p-1ab3eba4.entry.js +1 -0
  271. package/dist/post-components/p-2d6c0670.js +1 -0
  272. package/dist/post-components/p-2dc0a2d0.js +1 -0
  273. package/dist/post-components/p-35ad2e11.entry.js +1 -0
  274. package/dist/post-components/p-368c473a.js +1 -0
  275. package/dist/post-components/p-38f778a7.entry.js +1 -0
  276. package/dist/post-components/p-39a8df3c.entry.js +1 -0
  277. package/dist/post-components/p-3c7f6003.js +1 -0
  278. package/dist/post-components/p-474a41bc.entry.js +1 -0
  279. package/dist/post-components/p-64e3de38.js +1 -0
  280. package/dist/post-components/p-69bc8eaf.entry.js +1 -0
  281. package/dist/post-components/p-6b31a76a.js +1 -0
  282. package/dist/post-components/p-722ffaae.js +1 -0
  283. package/dist/post-components/p-72310bf0.entry.js +1 -0
  284. package/dist/post-components/p-7709c14a.js +1 -0
  285. package/dist/post-components/p-804b61b7.entry.js +1 -0
  286. package/dist/post-components/p-85fdc2d3.js +1 -0
  287. package/dist/post-components/p-89247caa.js +1 -0
  288. package/dist/post-components/p-89dc67c7.entry.js +1 -0
  289. package/dist/post-components/p-8db32dab.js +8 -0
  290. package/dist/post-components/p-8f7f5200.entry.js +1 -0
  291. package/dist/post-components/p-964f9581.js +1 -0
  292. package/dist/post-components/p-9b052461.js +1 -0
  293. package/dist/post-components/{p-c0ae9886.js → p-9e461613.js} +2 -2
  294. package/dist/post-components/p-a52b2d34.js +1 -0
  295. package/dist/post-components/p-ab566526.js +1 -0
  296. package/dist/post-components/p-b648e537.entry.js +1 -0
  297. package/dist/post-components/p-bc33a6d9.js +1 -0
  298. package/dist/post-components/p-bcfdbd0b.entry.js +1 -0
  299. package/dist/post-components/p-beb67979.js +1 -0
  300. package/dist/post-components/p-c41868b1.js +1 -0
  301. package/dist/post-components/p-c65f32b0.js +1 -0
  302. package/dist/post-components/p-c71700a7.js +1 -0
  303. package/dist/post-components/p-cb027003.js +1 -0
  304. package/dist/post-components/p-cc5b1437.js +1 -0
  305. package/dist/post-components/p-ceda889e.entry.js +1 -0
  306. package/dist/post-components/p-d45df336.js +1 -0
  307. package/dist/post-components/p-de4d4274.js +1 -0
  308. package/dist/post-components/p-deb9efcf.entry.js +1 -0
  309. package/dist/post-components/p-e585c6fe.js +1 -0
  310. package/dist/post-components/p-e9f1cc46.entry.js +1 -0
  311. package/dist/post-components/p-ee4e776d.entry.js +1 -0
  312. package/dist/post-components/p-ee7c3bcc.entry.js +1 -0
  313. package/dist/post-components/p-f56482fa.entry.js +1 -0
  314. package/dist/post-components/p-f8c652ce.entry.js +1 -0
  315. package/dist/post-components/post-components.esm.js +1 -1
  316. package/dist/types/animations/collapse.d.ts +2 -2
  317. package/dist/types/animations/fade.d.ts +2 -2
  318. package/dist/types/animations/slide.d.ts +2 -2
  319. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -1
  320. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  321. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +4 -2
  322. package/dist/types/components/post-banner/post-banner.d.ts +5 -5
  323. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +4 -0
  324. package/dist/types/components/{post-breadcrumb/post-breadcrumb.d.ts → post-breadcrumbs/post-breadcrumbs.d.ts} +4 -4
  325. package/dist/types/components/post-card-control/post-card-control.d.ts +3 -3
  326. package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +9 -14
  327. package/dist/types/components/post-footer/post-footer.d.ts +2 -2
  328. package/dist/types/components/post-header/post-header.d.ts +38 -10
  329. package/dist/types/components/post-icon/post-icon.d.ts +11 -7
  330. package/dist/types/components/post-language-option/post-language-option.d.ts +9 -5
  331. package/dist/types/components/post-language-switch/post-language-switch.d.ts +16 -8
  332. package/dist/types/components/post-language-switch/switch-variants.d.ts +1 -1
  333. package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
  334. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +36 -9
  335. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +37 -13
  336. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +9 -1
  337. package/dist/types/components/post-menu/post-menu.d.ts +4 -3
  338. package/dist/types/components/post-menu-item/post-menu-item.d.ts +0 -1
  339. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +4 -3
  340. package/dist/types/components/post-popover/post-popover.d.ts +6 -4
  341. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +40 -14
  342. package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
  343. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  344. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  345. package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +1 -1
  346. package/dist/types/components/post-tooltip/post-tooltip.d.ts +21 -34
  347. package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +46 -0
  348. package/dist/types/components.d.ts +181 -94
  349. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
  350. package/dist/types/index.d.ts +5 -3
  351. package/dist/types/popover-fn.d.ts +11 -0
  352. package/dist/types/utils/attribute-observer.d.ts +1 -1
  353. package/dist/types/utils/breakpoints.d.ts +1 -0
  354. package/dist/types/utils/component-on-ready.d.ts +1 -1
  355. package/dist/types/utils/environment.d.ts +2 -0
  356. package/dist/types/utils/event-guard.d.ts +4 -0
  357. package/dist/types/utils/get-focusable-children.d.ts +1 -0
  358. package/dist/types/utils/get-root.d.ts +5 -1
  359. package/dist/types/utils/index.d.ts +5 -0
  360. package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
  361. package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
  362. package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
  363. package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
  364. package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
  365. package/dist/types/utils/property-checkers/index.d.ts +12 -4
  366. package/dist/types/utils/sass-export.d.ts +5 -1
  367. package/loaders/breakpoints.js +56 -0
  368. package/loaders/check-non-empty.js +6 -2
  369. package/loaders/check-one-of.js +8 -3
  370. package/loaders/check-type.js +11 -6
  371. package/loaders/event-guard.js +45 -0
  372. package/loaders/fade.js +6 -2
  373. package/loaders/get-focusable-children.js +35 -0
  374. package/loaders/get-root.js +7 -1
  375. package/loaders/index.browser.js +14 -0
  376. package/loaders/index.d.ts +6 -2
  377. package/loaders/index.js +8 -5
  378. package/loaders/index2.js +25 -12
  379. package/loaders/long-press-event.js +264 -0
  380. package/loaders/package.js +1 -1
  381. package/loaders/post-accordion-item2.js +15 -14
  382. package/loaders/post-accordion.js +8 -9
  383. package/loaders/post-avatar.js +8 -11
  384. package/loaders/post-back-to-top.js +41 -20
  385. package/loaders/post-banner.js +16 -14
  386. package/loaders/post-breadcrumb-item2.js +9 -9
  387. package/loaders/post-breadcrumbs.d.ts +11 -0
  388. package/loaders/post-breadcrumbs.js +180 -0
  389. package/loaders/post-card-control.js +16 -19
  390. package/loaders/post-closebutton.js +7 -2
  391. package/loaders/post-collapsible-trigger2.js +46 -48
  392. package/loaders/post-collapsible2.js +14 -11
  393. package/loaders/post-footer.js +8 -54
  394. package/loaders/post-header.js +174 -51
  395. package/loaders/post-icon2.js +73 -30
  396. package/loaders/post-language-option.js +22 -13
  397. package/loaders/post-language-switch.js +45 -46
  398. package/loaders/{post-breadcrumb.d.ts → post-linkarea.d.ts} +4 -4
  399. package/loaders/post-linkarea.js +46 -0
  400. package/loaders/post-list-item.js +2 -1
  401. package/loaders/post-list.js +5 -4
  402. package/loaders/post-logo.js +4 -3
  403. package/loaders/post-mainnavigation.js +150 -15
  404. package/loaders/post-megadropdown-trigger.js +43 -13
  405. package/loaders/post-megadropdown.js +136 -39
  406. package/loaders/post-menu-item2.js +2 -8
  407. package/loaders/post-menu-trigger2.js +17 -10
  408. package/loaders/post-menu2.js +43 -54
  409. package/loaders/post-popover.js +46 -15
  410. package/loaders/post-popovercontainer2.js +921 -111
  411. package/loaders/post-rating.js +2 -2
  412. package/loaders/post-tab-header.js +8 -6
  413. package/loaders/post-tab-panel.js +4 -3
  414. package/loaders/post-tabs.js +10 -12
  415. package/loaders/post-tag.js +2 -2
  416. package/loaders/post-togglebutton.js +4 -3
  417. package/loaders/post-tooltip-trigger.d.ts +11 -0
  418. package/loaders/post-tooltip-trigger.js +4708 -0
  419. package/loaders/post-tooltip.js +34 -4960
  420. package/loaders/slide.js +9 -9
  421. package/package.json +41 -32
  422. package/dist/cjs/attribute-observer-10f08c04.js +0 -27
  423. package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
  424. package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
  425. package/dist/cjs/check-type-64af82a9.js +0 -16
  426. package/dist/cjs/check-url-3ffdd2fb.js +0 -14
  427. package/dist/cjs/debounce-1151afe3.js +0 -12
  428. package/dist/cjs/fade-35a3633a.js +0 -10
  429. package/dist/cjs/get-root-7a3498ef.js +0 -11
  430. package/dist/cjs/index-5d4e0aed.js +0 -29
  431. package/dist/cjs/post-accordion-item-ecc6749f.js +0 -63
  432. package/dist/cjs/post-back-to-top-60762f8e.js +0 -75
  433. package/dist/cjs/post-banner-9662f22c.js +0 -90
  434. package/dist/cjs/post-breadcrumb-b40732fc.js +0 -111
  435. package/dist/cjs/post-breadcrumb.cjs.entry.js +0 -13
  436. package/dist/cjs/post-card-control-039c9a4b.js +0 -272
  437. package/dist/cjs/post-popover-d0ce9dc6.js +0 -104
  438. package/dist/cjs/post-tab-header-4b6d8d54.js +0 -32
  439. package/dist/cjs/post-tag-ddaaaedc.js +0 -47
  440. package/dist/cjs/post-togglebutton-0984a694.js +0 -3239
  441. package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +0 -3
  442. package/dist/collection/components/post-menu-item/post-menu-item.css +0 -1
  443. package/dist/components/attribute-observer.js +0 -25
  444. package/dist/components/debounce.js +0 -10
  445. package/dist/components/post-breadcrumb.js +0 -6
  446. package/dist/components/post-breadcrumb2.js +0 -168
  447. package/dist/esm/attribute-observer-37fa950a.js +0 -25
  448. package/dist/esm/check-non-empty-58bd6b17.js +0 -9
  449. package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
  450. package/dist/esm/check-type-8828dbe4.js +0 -14
  451. package/dist/esm/check-url-a974431e.js +0 -12
  452. package/dist/esm/debounce-abe98cc2.js +0 -10
  453. package/dist/esm/fade-7fd71785.js +0 -7
  454. package/dist/esm/get-root-7af2e0d1.js +0 -9
  455. package/dist/esm/index-b49c9904.js +0 -24
  456. package/dist/esm/package-4d81f3c2.js +0 -3
  457. package/dist/esm/post-accordion-item-e10452dc.js +0 -61
  458. package/dist/esm/post-back-to-top-1d823c43.js +0 -73
  459. package/dist/esm/post-banner-78480475.js +0 -88
  460. package/dist/esm/post-breadcrumb-aaa77f74.js +0 -109
  461. package/dist/esm/post-breadcrumb.entry.js +0 -5
  462. package/dist/esm/post-card-control-862aa961.js +0 -270
  463. package/dist/esm/post-popover-2432bb3f.js +0 -102
  464. package/dist/esm/post-tab-header-dfea00ea.js +0 -30
  465. package/dist/esm/post-tag-a77e7af6.js +0 -45
  466. package/dist/esm/post-togglebutton-395bf3f0.js +0 -3223
  467. package/dist/post-components/p-0711f76d.entry.js +0 -1
  468. package/dist/post-components/p-095a06f6.entry.js +0 -1
  469. package/dist/post-components/p-0b5a5f32.js +0 -1
  470. package/dist/post-components/p-135fa60f.js +0 -1
  471. package/dist/post-components/p-18e38d8a.js +0 -1
  472. package/dist/post-components/p-2737eaf5.js +0 -1
  473. package/dist/post-components/p-2e1ec074.entry.js +0 -1
  474. package/dist/post-components/p-4202b433.entry.js +0 -1
  475. package/dist/post-components/p-45773f59.js +0 -1
  476. package/dist/post-components/p-4953de7e.js +0 -1
  477. package/dist/post-components/p-4a3f67ab.js +0 -1
  478. package/dist/post-components/p-4f67c5f5.entry.js +0 -1
  479. package/dist/post-components/p-5075c672.entry.js +0 -1
  480. package/dist/post-components/p-515e0f96.js +0 -1
  481. package/dist/post-components/p-5467b223.js +0 -1
  482. package/dist/post-components/p-611b3c41.js +0 -1
  483. package/dist/post-components/p-67036798.entry.js +0 -1
  484. package/dist/post-components/p-6adeaa6c.js +0 -1
  485. package/dist/post-components/p-6d953fb2.js +0 -1
  486. package/dist/post-components/p-6edb0ac5.js +0 -1
  487. package/dist/post-components/p-6f8f39ca.js +0 -1
  488. package/dist/post-components/p-7503a623.js +0 -1
  489. package/dist/post-components/p-761b24c7.entry.js +0 -1
  490. package/dist/post-components/p-77c4c1d2.js +0 -1
  491. package/dist/post-components/p-7cf0c2ad.js +0 -1
  492. package/dist/post-components/p-856c14d6.entry.js +0 -1
  493. package/dist/post-components/p-866bf50a.entry.js +0 -1
  494. package/dist/post-components/p-8d621781.js +0 -1
  495. package/dist/post-components/p-8fe2d72c.entry.js +0 -1
  496. package/dist/post-components/p-9ad5088f.entry.js +0 -1
  497. package/dist/post-components/p-a1d2b90e.js +0 -1
  498. package/dist/post-components/p-a521419d.entry.js +0 -1
  499. package/dist/post-components/p-aa538648.js +0 -1
  500. package/dist/post-components/p-afdbee2f.js +0 -1
  501. package/dist/post-components/p-b02817f2.entry.js +0 -1
  502. package/dist/post-components/p-b095519d.js +0 -1
  503. package/dist/post-components/p-b157dcba.entry.js +0 -1
  504. package/dist/post-components/p-b22656b1.js +0 -1
  505. package/dist/post-components/p-bdbd11cb.js +0 -1
  506. package/dist/post-components/p-c537e196.entry.js +0 -1
  507. package/dist/post-components/p-d4f93f2b.js +0 -1
  508. package/dist/post-components/p-dca4246a.entry.js +0 -1
  509. package/dist/post-components/p-f319b026.js +0 -1
  510. package/dist/post-components/p-f4b7b379.js +0 -1
  511. package/dist/post-components/p-fac66087.entry.js +0 -1
  512. package/dist/post-components/p-fc91cbc2.js +0 -1
  513. package/dist/types/utils/is-focusable.d.ts +0 -1
  514. package/loaders/attribute-observer.js +0 -25
  515. package/loaders/debounce.js +0 -10
  516. package/loaders/post-breadcrumb.js +0 -171
@@ -1 +0,0 @@
1
- import{r as o,h as t,H as e,g as i}from"./p-c0ae9886.js";import{v as a}from"./p-0b5a5f32.js";import{H as c}from"./p-247a1668.js";import{c as r}from"./p-5467b223.js";const s=class{constructor(t){o(this,t),this.id=void 0,this.slottedLogo=void 0,this.collapsed=!1,this.headingLevel=void 0}validateHeadingLevel(o=this.headingLevel){r(o,c,"The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.")}componentWillLoad(){this.id=this.host.id||`a${crypto.randomUUID()}`}componentDidLoad(){this.validateHeadingLevel()}onCollapseToggle(o){o.target===this.host&&"post-accordion-item"===o.target.localName&&(this.collapsed=!o.detail)}async toggle(o){return this.collapsible.toggle(o)}onSlotLogoChange(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}componentWillRender(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}render(){var o,i;const c=null===(o=this.host.closest("post-accorddion"))||void 0===o?void 0:o.getAttribute("heading-level"),r=`h${null!==(i=null!=c?c:this.headingLevel)&&void 0!==i?i:2}`;return t(e,{key:"e11a8ce9df85f6813f152433d0b5526668415953",id:this.id,"data-version":a},t("div",{key:"d62b7f758fca1ffbcef7c6f29b3a0ce48ded9749",part:"accordion-item",class:"accordion-item"},t("post-collapsible-trigger",{key:"492458d3cda61325d931a83be1f1be1f98f63301",for:`${this.id}--collapse`},t(r,{key:"1a4bc90415504cd00a65922ff5e61221c8368eea",class:"accordion-header",id:`${this.id}--header`},t("button",{key:"c14154955c74a4482cc197aca95297ae29ef066f",type:"button",class:"accordion-button"+(this.collapsed?" collapsed":""),part:"button"},t("span",{key:"112810b9df4a73bc02a46a98ba2d0ce069168c7c",class:{"logo-container":!0,"has-image":!!this.slottedLogo}},t("slot",{key:"67e72b84363597fc0e239baccb533b9083251a6b",name:"logo",onSlotchange:this.onSlotLogoChange.bind(this)})),t("slot",{key:"3e9a2b38f621990cabfa84431ca8a7fd39087c88",name:"header"}),t("post-icon",{key:"e8337b48394b9357b62e517c3b066dfa1bb5f5d7",name:"2051"})))),t("post-collapsible",{key:"ca23a5a9a8b1615dc4352223a3135514ea5f279a",id:`${this.id}--collapse`,collapsed:this.collapsed,ref:o=>this.collapsible=o},t("div",{key:"668805a03a3ee2facee60ecba0fa549edf0cecba",class:"accordion-body",part:"body"},t("slot",{key:"3ddf282a59dad61dcd093c11a23f33635c9162d1"})))))}get host(){return i(this)}static get watchers(){return{headingLevel:["validateHeadingLevel"]}}};s.style=':host::after{display:block;content:"";margin-top:calc(var(--post-device-border-width-default)*-1);border-bottom:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.accordion-button::before{display:block;position:absolute;content:"";inset:0;bottom:auto;border-top:var(--post-accordion-button-border-top)}.accordion-button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:var(--post-device-border-width-default) solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}';export{s as P}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i,H as o,g as e}from"./p-c0ae9886.js";import{v as r}from"./p-0b5a5f32.js";import{d as h}from"./p-5467b223.js";import{c as a}from"./p-4a3f67ab.js";import{c as l}from"./p-b095519d.js";import{d as c}from"./p-d4f93f2b.js";import{g as n}from"./p-fc91cbc2.js";const d={height:"0",overflow:"hidden"},p={duration:350,easing:"ease",fill:"forwards"},g=class{constructor(i){t(this,i),this.postToggle=s(this,"postToggle",7),this.isLoaded=!1,this.isOpen=!0,this.collapsed=!1}collapsedChange(){h(this.collapsed,"boolean","The `collapsed` property of the `post-collapsible` must be a boolean."),this.toggle(!this.collapsed)}componentDidLoad(){this.collapsedChange(),this.isLoaded=!0,this.updateTriggers()}async toggle(t=!this.isOpen){if(t===this.isOpen)return t;this.isOpen=t,this.collapsed=!t,this.isLoaded&&this.postToggle.emit(t);const s=t?(i=this.host).animate([d,{height:`${i.scrollHeight}px`,offset:1},{height:"auto"}],p):(t=>{const s={height:window.getComputedStyle(t).height};return t.animate([s,d],p)})(this.host);var i;return this.isLoaded&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches||s.finish(),await s.finished,this.host.offsetParent&&s.commitStyles(),t}updateTriggers(){document.querySelectorAll(`post-collapsible-trigger[for="${this.host.id}"]`).forEach((t=>t.update()))}render(){return i(o,{key:"bc9720a37878ce79e87f3357925316d22008d788","data-version":r},i("slot",{key:"925c9de74fdf017e8030fd3ecec4a2b44b2797f6"}))}get host(){return e(this)}static get watchers(){return{collapsed:["collapsedChange"]}}};g.style=":host{display:block;overflow:hidden}";const u=class{constructor(s){t(this,s),this.observer=new MutationObserver((()=>this.setTrigger())),this.debouncedUpdate=c((()=>{var t;if(!this.trigger)return;const s=this.trigger.getAttribute("aria-controls");(null==s?void 0:s.includes(this.for))||this.trigger.setAttribute("aria-controls",s?`${s} ${this.for}`:this.for);const i=null===(t=this.collapsible)||void 0===t?void 0:t.collapsed;this.trigger.setAttribute("aria-expanded",`${void 0!==i?!i:void 0}`)})),this.for=void 0}setAriaAttributes(){l(this.for,'The post-collapsible-trigger "for" prop is required.'),a(this.for,"string",'The post-collapsible-trigger "for" prop should be a id.'),this.update()}connectedCallback(){this.observer.observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.root=n(this.host),this.root.addEventListener("postToggle",(t=>{this.trigger&&t.target.isEqualNode(this.collapsible)&&this.trigger.setAttribute("aria-expanded",`${t.detail}`)}))}componentDidLoad(){this.host.setAttribute("data-version",r),this.setTrigger(),this.trigger||console.warn("The post-collapsible-trigger must contain a button.")}disconnectedCallback(){this.observer.disconnect()}async update(){this.debouncedUpdate()}async toggleCollapsible(){var t;await(null===(t=this.collapsible)||void 0===t?void 0:t.toggle())}get collapsible(){const t=this.root.getElementById(this.for);return t&&"post-collapsible"===t.localName?t:null}setTrigger(){const t=this.host.querySelector("button");!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger=t,this.trigger.addEventListener("click",(()=>this.toggleCollapsible())),this.setAriaAttributes())}get host(){return e(this)}static get watchers(){return{for:["setAriaAttributes"]}}};export{g as P,u as a}
@@ -1 +0,0 @@
1
- export{P as post_back_to_top}from"./p-45773f59.js";import"./p-c0ae9886.js";import"./p-515e0f96.js";import"./p-0b5a5f32.js";import"./p-4a3f67ab.js";import"./p-b095519d.js";import"./p-440193f4.js";
@@ -1 +0,0 @@
1
- import{E as r}from"./p-440193f4.js";function o(o,f){if(r.some((r=>r===o)))throw new Error(f)}export{o as c}
@@ -1 +0,0 @@
1
- export{P as post_accordion_item}from"./p-aa538648.js";import"./p-c0ae9886.js";import"./p-0b5a5f32.js";import"./p-247a1668.js";import"./p-5467b223.js";import"./p-440193f4.js";import"./p-611b3c41.js";import"./p-4a3f67ab.js";import"./p-b22656b1.js";
@@ -1 +0,0 @@
1
- function r(r,t){if("string"!=typeof r&&!(r instanceof URL))throw new Error(t);try{new URL(r)}catch(r){throw new Error(t)}}export{r as c}
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as a,g as e}from"./p-c0ae9886.js";import{v as s}from"./p-0b5a5f32.js";import{c as r}from"./p-b095519d.js";var o;!function(t){t.Slotted="slotted",t.Image="image",t.Initials="initials",t[t.Null=null]="Null"}(o||(o={}));const n=class{constructor(i){t(this,i),this.firstname=void 0,this.lastname=void 0,this.userid=void 0,this.email=void 0,this.slottedImage=void 0,this.avatarType=null,this.imageUrl="",this.imageAlt="",this.initials=""}validateFirstname(){r(this.firstname,"The `firstname` property of the `post-avatar` is required!")}async getAvatar(){if(null!==this.slottedImage)this.avatarType=o.Slotted;else{let t=!1;!t&&this.userid&&(t=await this.getImageByProp(this.userid,this.fetchImageByUserId.bind(this))),!t&&this.email&&(t=await this.getImageByProp(this.email,this.fetchImageByEmail.bind(this))),t||this.getAvatarByInitials()}}async getImageByProp(t,i){var a;if(!t)return!1;const e=null!==(a=await this.getStorageItem(t))&&void 0!==a?a:{ok:!1,url:""};if(!e.ok)try{const t=await i();e.ok=t.ok,e.url=t.url,this.imageUrl=e.url,this.imageAlt=`${this.firstname} ${this.lastname} avatar`,this.avatarType=o.Image,this.setStorageItem(this.userid,JSON.stringify(e))}catch(i){this.removeStorageItem(t),console.info(`Loading avatar by type "${o.Image}" failed.`)}return e.ok}async fetchImageByUserId(){return await fetch(n.INTERNAL_USERID_IMAGE_SRC.replace("{userid}",encodeURIComponent(this.userid)))}async fetchImageByEmail(){const t=await this.cryptify(this.email),i="https://www.gravatar.com/avatar/{email}?s=80&d=404&r=g".replace("{email}",t);return await fetch(i)}getAvatarByInitials(){this.initials=this.getInitials(),this.avatarType=o.Initials}getNames(){return[this.firstname,this.lastname].filter((t=>t))}getInitials(){return this.getNames().map((t=>t.charAt(0))).join("").trim()}async getStorageItem(t){var i;const a=await this.cryptify(t),e=null===(i=null===window||void 0===window?void 0:window.sessionStorage)||void 0===i?void 0:i.getItem(a);return e?JSON.parse(e):null}async setStorageItem(t,i){var a;const e=await this.cryptify(t);null===(a=null===window||void 0===window?void 0:window.sessionStorage)||void 0===a||a.setItem(e,i)}async removeStorageItem(t){var i;const a=await this.cryptify(t);null===(i=null===window||void 0===window?void 0:window.sessionStorage)||void 0===i||i.removeItem(a)}async cryptify(t){return await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then((t=>Array.from(new Uint8Array(t)).map((t=>t.toString(16).padStart(2,"0"))).join("")))}onSlotDefaultChange(){this.slottedImage=this.host.querySelector("img"),this.getAvatar()}componentWillRender(){this.slottedImage=this.host.querySelector("img"),this.getAvatar()}componentDidLoad(){this.validateFirstname()}render(){const t=this.getNames().reduce(((t,a,e)=>(e>0&&t.push(i("span",null," ")),t.push(a.charAt(0)),t.push(i("span",null,a.slice(1))),t)),[]);return i(a,{"data-version":s},i("slot",{onSlotchange:this.onSlotDefaultChange.bind(this)},"image"===this.avatarType&&i("img",{src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&i("div",{class:"initials"},t)))}get host(){return e(this)}static get watchers(){return{firstname:["validateFirstname"]}}};n.INTERNAL_USERID_IMAGE_SRC="https://web.post.ch/UserProfileImage/{userid}.png",n.style='/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:"";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;z-index:2;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase}.initials span{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}.initials span:not(caption){position:absolute !important}';export{n as P}
@@ -1 +0,0 @@
1
- export{P as post_closebutton,a as post_header,b as post_icon,c as post_language_option,d as post_language_switch,e as post_list,f as post_list_item,g as post_logo,h as post_mainnavigation,i as post_megadropdown,j as post_megadropdown_trigger,k as post_menu,l as post_menu_trigger,m as post_popovercontainer,n as post_togglebutton}from"./p-18e38d8a.js";import"./p-c0ae9886.js";import"./p-0b5a5f32.js";import"./p-515e0f96.js";import"./p-5467b223.js";import"./p-440193f4.js";import"./p-611b3c41.js";import"./p-4a3f67ab.js";import"./p-b22656b1.js";import"./p-b095519d.js";import"./p-fc91cbc2.js";
@@ -1 +0,0 @@
1
- function e(e,t=200){let o;return(...r)=>{o&&clearTimeout(o),o=setTimeout(e,t,...r)}}export{e as d}
@@ -1 +0,0 @@
1
- export{P as post_footer}from"./p-7cf0c2ad.js";import"./p-c0ae9886.js";import"./p-0b5a5f32.js";
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as o,g as s}from"./p-c0ae9886.js";import{v as i}from"./p-0b5a5f32.js";import{H as a}from"./p-247a1668.js";import{c as r}from"./p-611b3c41.js";const c=class{constructor(e){t(this,e),this.expandedItems=new Set,this.headingLevel=void 0,this.multiple=!1}validateHeadingLevel(t=this.headingLevel){t&&(r(t,a,"The `heading-level` property of the `post-accordion` must be a number between 1 and 6."),this.accordionItems.forEach((e=>{e.setAttribute("heading-level",String(t))})))}componentWillLoad(){this.registerAccordionItems(),this.validateHeadingLevel()}collapseToggleHandler(t){t.stopPropagation();const e=t.target;if(e.closest("post-accordion")===this.host&&"post-accordion-item"===e.localName){const e=t.target,o=this.expandedItems.has(e);if(o?this.expandedItems.delete(e):this.expandedItems.add(e),this.multiple||o)return;Array.from(this.expandedItems.values()).filter((t=>t!==e)).forEach((t=>{t.toggle(!1)}))}}async toggle(t){const e=this.accordionItems.find((e=>e.id===t));if(!e)throw new Error(`No post-accordion-item found with id #${t}.`);await e.toggle()}async expandAll(){this.multiple?await Promise.all(this.accordionItems.map((t=>t.toggle(!0)))):this.expandedItems.size||await this.accordionItems[0].toggle(!0)}async collapseAll(){await Promise.all(this.accordionItems.map((t=>t.toggle(!1))))}registerAccordionItems(){this.accordionItems=Array.from(this.host.querySelectorAll("post-accordion-item")),this.accordionItems.filter((t=>!t.collapsed||this.expandedItems.has(t))).forEach(((t,e)=>{this.multiple||0===e?this.expandedItems.add(t):t.setAttribute("collapsed","")}))}render(){return e(o,{key:"cfc6280e052937f50bc481fe73cf25ede6e40314","data-version":i},e("div",{key:"090539a2ebe9d216609a7e56597c5f379d439fb8",class:"accordion"},e("slot",{key:"4ae4095b14b6b9233f1d66c8543d625a77a77e09",onSlotchange:()=>this.registerAccordionItems()})))}get host(){return s(this)}static get watchers(){return{headingLevel:["validateHeadingLevel"]}}};c.style=":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-top:calc(var(--post-device-border-width-default)*-1)}::slotted(post-accordion-item:not(:only-of-type):first-of-type){--post-accordion-button-border-top:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}";export{c as P}
@@ -1 +0,0 @@
1
- import{r as t,c as a,h as r,H as s,g as o}from"./p-c0ae9886.js";import{v as e}from"./p-0b5a5f32.js";import{f as i,a as c}from"./p-2737eaf5.js";const n=class{constructor(r){t(this,r),this.postChange=a(this,"postChange",7),this.isLoaded=!1,this.activePanel=void 0}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-header")).filter((t=>t.closest("post-tabs")===this.host))}componentDidLoad(){var t;this.moveMisplacedTabs(),this.enableTabs();const a=this.activePanel||(null===(t=this.tabs[0])||void 0===t?void 0:t.panel);this.show(a),this.isLoaded=!0}async show(t){var a;if(t===(null===(a=this.activeTab)||void 0===a?void 0:a.panel))return;const r=this.activeTab,s=this.host.querySelector(`post-tab-header[panel=${t}]`);this.activateTab(s),this.showing&&(this.showing.effect.target.style.display="none",this.showing.finish()),!r||this.showing||this.hiding||this.hidePanel(r.panel),this.hiding&&await this.hiding.finished,this.showSelectedPanel(),this.showing&&await this.showing.finished,this.isLoaded&&this.postChange.emit(this.activeTab.panel)}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{"tabs"!==t.getAttribute("slot")&&t.setAttribute("slot","tabs")}))}enableTabs(){var t;this.tabs&&(this.tabs.forEach((async t=>{var a;if(await(a=t,"function"==typeof a.componentOnReady?a.componentOnReady():new Promise((t=>{return r=()=>{t(a)},"function"==typeof requestAnimationFrame?requestAnimationFrame(r):setTimeout(r);var r}))),t.getAttribute("aria-controls"))return;const r=this.getPanel(t.panel);t.setAttribute("aria-controls",r.id),r.setAttribute("aria-labelledby",t.id),t.addEventListener("click",(()=>{this.show(t.panel)})),t.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.show(t.panel))})),t.addEventListener("keydown",(a=>{"ArrowRight"!==a.key&&"ArrowLeft"!==a.key||this.navigateTabs(t,a.key)}))})),this.activeTab&&!this.activeTab.isConnected&&this.show(null===(t=this.tabs[0])||void 0===t?void 0:t.panel))}activateTab(t){this.activeTab&&(this.activeTab.setAttribute("aria-selected","false"),this.activeTab.setAttribute("tabindex","-1"),this.activeTab.classList.remove("active")),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0"),t.classList.add("active"),this.activeTab=t}hidePanel(t){const a=this.getPanel(t);a&&(this.hiding=i(a),this.hiding.onfinish=()=>{a.style.display="none",this.hiding=null})}showSelectedPanel(){const t=this.getPanel(this.activeTab.panel);t.style.display="block",this.isLoaded&&(this.showing=c(t),this.showing.onfinish=()=>{this.showing=null})}getPanel(t){return this.host.querySelector(`post-tab-panel[name=${t}]`)}navigateTabs(t,a){const r=Array.from(this.tabs).indexOf(t);let s;s="ArrowRight"===a?this.tabs[r+1]||this.tabs[0]:this.tabs[r-1]||this.tabs[this.tabs.length-1],s&&s.focus()}render(){return r(s,{key:"ee9628ed2eb47e6e41001f22c7a455da4b0c30bc","data-version":e},r("div",{key:"d4387bfa9efb56d02403ee51aa3a3bce53c044bd",class:"tabs-wrapper",part:"tabs"},r("div",{key:"020526d64754fb7c61b397894291d19d22a754ed",class:"tabs",role:"tablist"},r("slot",{key:"875f7ccaf2f980087fbc461c22ed223f00bcb4ba",name:"tabs",onSlotchange:()=>this.enableTabs()}))),r("div",{key:"c4ecb26258e2cf20394b89c9ae20fd575f13bae6",class:"tab-content",part:"content"},r("slot",{key:"d1e60679e580df4a903d021a2985c4299a356d28",onSlotchange:()=>this.moveMisplacedTabs()})))}get host(){return o(this)}};n.style='.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}';export{n as P}
@@ -1 +0,0 @@
1
- export{P as post_breadcrumb}from"./p-8d621781.js";import"./p-c0ae9886.js";import"./p-0b5a5f32.js";import"./p-b22656b1.js";import"./p-d4f93f2b.js";
@@ -1 +0,0 @@
1
- function t(t){const e=t.getRootNode();if(e instanceof Document||e instanceof ShadowRoot)return e;throw new Error("Attempting to access root node before the element is attached to the document or shadow tree.")}export{t as g}
@@ -1 +0,0 @@
1
- export declare const isFocusable: (element: Element) => boolean;
@@ -1,25 +0,0 @@
1
- const getAttributeObserver = (attribute, handler) => {
2
- /**
3
- * Handle attribute changes and childList changes from the observer
4
- * @param {MutationRecord[]} mutationList
5
- */
6
- const observerHandler = (mutationList) => {
7
- mutationList.forEach(mutation => {
8
- if (mutation.type === 'attributes' && mutation.attributeName === attribute) {
9
- handler(mutation.target);
10
- }
11
- if (mutation.type === 'childList') {
12
- mutation.addedNodes.forEach(node => {
13
- if (node.nodeType === Node.ELEMENT_NODE &&
14
- node.hasAttribute(attribute)) {
15
- handler(node);
16
- }
17
- });
18
- }
19
- });
20
- };
21
- // Initialize a mutation observer for patching accessibility features
22
- return new MutationObserver(observerHandler);
23
- };
24
-
25
- export { getAttributeObserver as g };
@@ -1,10 +0,0 @@
1
- function debounce(callback, timeout = 200) {
2
- let id;
3
- return (...args) => {
4
- if (id)
5
- clearTimeout(id);
6
- id = setTimeout(callback, timeout, ...args);
7
- };
8
- }
9
-
10
- export { debounce as d };
@@ -1,171 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { v as version } from './package.js';
3
- import { d as checkUrl } from './index2.js';
4
- import { d as debounce } from './debounce.js';
5
- import { d as defineCustomElement$7 } from './post-breadcrumb-item2.js';
6
- import { d as defineCustomElement$6 } from './post-icon2.js';
7
- import { d as defineCustomElement$5 } from './post-menu2.js';
8
- import { d as defineCustomElement$4 } from './post-menu-item2.js';
9
- import { d as defineCustomElement$3 } from './post-menu-trigger2.js';
10
- import { d as defineCustomElement$2 } from './post-popovercontainer2.js';
11
-
12
- const postBreadcrumbCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:flex;align-items:center}.breadcrumbs-nav{display:flex;align-items:center}.hidden-items{gap:var(--post-device-spacing-gap-inline-4);position:absolute;height:0;overflow:hidden;white-space:nowrap}.breadcrumbs-list{display:flex;flex-wrap:nowrap;position:relative;margin:0;padding:0;list-style:none;align-items:center;height:100%;gap:var(--post-device-spacing-gap-inline-4)}post-icon{display:inline-block;box-sizing:border-box;color:var(--post-scheme-color-interactive-primary-enabled-fg1);height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.breadcrumb-item-icon{padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}li a{display:flex;align-items:center}li a{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}li a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){li a:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}li a:focus{border-radius:var(--post-device-border-radius-focus)}li a .home-icon{padding-block:var(--post-device-spacing-padding-4);padding-inline:var(--post-device-spacing-padding-4)}li a .home-icon:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a .home-icon a,li a .home-icon:focus,li a .home-icon:hover{color:CanvasText !important}}.menu-trigger-wrapper{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-5)}.actual-menu{display:flex;align-items:center}post-menu-trigger{display:flex;align-items:center;padding-block:var(--post-device-spacing-padding-block-7)}post-menu-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-menu-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-menu-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-menu-trigger:focus{border-radius:var(--post-device-border-radius-focus)}post-menu-trigger button{background:none;border:none;line-height:150%;font-size:var(--post-device-font-size-6);cursor:pointer;padding:0;color:var(--post-scheme-color-interactive-primary-enabled-fg1)}post-menu-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger button a,post-menu-trigger button:focus,post-menu-trigger button:hover{color:LinkText !important}}post-menu::part(popover-container){display:flex;flex-direction:column;align-items:start;padding:.6rem;gap:var(--post-device-spacing-gap-inline-4)}post-menu::part(popover-container) ::slotted(post-menu-item:not(:last-child)){margin-bottom:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:center;justify-content:center;gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item a{text-decoration:none;color:inherit;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);font-size:var(--post-device-font-size-6)}.breadcrumb-item a{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}.breadcrumb-item a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item a:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item a:focus-visible{border-radius:var(--post-device-border-radius-focus)}.breadcrumb-item span:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item span:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item a,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}post-breadcrumb-item:last-of-type{pointer-events:none;color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}post-breadcrumb-item:last-of-type:hover{color:var(--post-scheme-color-interactive-primary-selected-fg1);text-decoration:none}.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 PostBreadcrumbStyle0 = postBreadcrumbCss;
14
-
15
- const PostBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb extends HTMLElement {
16
- constructor() {
17
- super();
18
- this.__registerHost();
19
- this.__attachShadow();
20
- // Waits for breadcrumb navigation reference to be available
21
- this.waitForBreadcrumbRef = debounce(() => {
22
- var _a;
23
- if (((_a = this.breadcrumbNavRef) === null || _a === void 0 ? void 0 : _a.clientWidth) > 0) {
24
- this.checkConcatenation();
25
- }
26
- else {
27
- this.waitForBreadcrumbRef();
28
- }
29
- }, 50);
30
- // Handles resizing to check concatenation
31
- this.handleResize = () => {
32
- if (window.innerWidth === this.lastWindowWidth)
33
- return;
34
- this.lastWindowWidth = window.innerWidth;
35
- this.checkConcatenation();
36
- };
37
- this.homeUrl = undefined;
38
- this.homeText = 'Home';
39
- this.breadcrumbItems = [];
40
- this.isConcatenated = undefined;
41
- this.lastWindowWidth = undefined;
42
- }
43
- validateUrl() {
44
- checkUrl(this.homeUrl, 'The "url" property of the home-icon is invalid');
45
- }
46
- componentWillLoad() {
47
- this.updateBreadcrumbItems();
48
- }
49
- componentDidLoad() {
50
- window.addEventListener('resize', this.handleResize);
51
- this.waitForBreadcrumbRef();
52
- }
53
- disconnectedCallback() {
54
- window.removeEventListener('resize', this.handleResize);
55
- }
56
- // Updates breadcrumb items and sets the last item
57
- updateBreadcrumbItems() {
58
- this.breadcrumbItems = Array.from(this.host.querySelectorAll('post-breadcrumb-item')).map((item) => ({
59
- text: item.textContent || '',
60
- url: item.getAttribute('url') || '',
61
- }));
62
- this.lastItem = this.breadcrumbItems[this.breadcrumbItems.length - 1];
63
- }
64
- // Determines parent width for concatenation logic
65
- getParentWidth() {
66
- let parent = this.host.parentNode;
67
- while (parent && !(parent instanceof HTMLElement)) {
68
- parent = parent.parentNode;
69
- }
70
- return parent instanceof HTMLElement ? parent.clientWidth : window.innerWidth;
71
- }
72
- checkConcatenation() {
73
- var _a;
74
- if (!this.breadcrumbNavRef)
75
- return;
76
- const visibleWidth = this.getParentWidth();
77
- // Measure all hidden breadcrumb items
78
- const hiddenItems = Array.from(((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.hidden-breadcrumb-item')) || []);
79
- const totalWidth = hiddenItems.reduce((accum, element) => {
80
- const rect = element.getBoundingClientRect();
81
- return accum + rect.width;
82
- }, 0);
83
- this.isConcatenated = totalWidth > visibleWidth;
84
- }
85
- // Handles breadcrumb item click to open the menu
86
- handleBreadcrumbItemClick() {
87
- var _a, _b;
88
- if (this.host.shadowRoot) {
89
- const menuTrigger = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.menu-trigger-wrapper')) === null || _b === void 0 ? void 0 : _b.querySelector('button');
90
- if (menuTrigger) {
91
- menuTrigger.click();
92
- }
93
- }
94
- }
95
- render() {
96
- const visibleItems = this.breadcrumbItems.slice(0, -1);
97
- return (h(Host, { key: '1baffcf05840127383931baec809e2b94e402e5e', "data-version": version }, h("nav", { key: 'c6725b8aa970f35f15f31ecc56280e7518b2dba9', "aria-label": "Breadcrumb", class: "breadcrumbs-nav", ref: (el) => (this.breadcrumbNavRef = el) }, h("ol", { key: '3166f345dde9f7003b23f5e7a1ddbe587b3fb4be', class: "no-list breadcrumbs-list" }, h("li", { key: '2efcbd6502cc5245ee63fd344a28c8aea4561cde' }, h("a", { key: 'b727c3d880ca9ebb7fc8527263a142662e4d42fd', href: this.homeUrl, class: "breadcrumb-link" }, h("span", { key: 'd683d05bce032759aa224e7a36ef5d7fb3883187', class: "visually-hidden" }, this.homeText), h("post-icon", { key: 'f17d5f56a49f0525d64414c079968d80b0c7eca3', name: "home", class: "home-icon" }))), this.isConcatenated ? (h("div", { class: "menu-trigger-wrapper", "aria-label": "More breadcrumbs", onKeyDown: (e) => {
98
- if (e.key === 'Enter' || e.key === ' ') {
99
- e.preventDefault();
100
- this.handleBreadcrumbItemClick();
101
- }
102
- } }, h("post-icon", { name: "2111", class: "breadcrumb-item-icon" }), h("div", { class: "actual-menu" }, h("post-menu-trigger", { for: "breadcrumb-menu", tabIndex: 0 }, h("button", { class: "btn test", tabIndex: -1 }, "...")), h("post-menu", { id: "breadcrumb-menu" }, visibleItems.map((item) => (h("post-menu-item", { key: item.url || item.text, class: "breadcrumb-item", onKeyDown: (e) => {
103
- if (e.key === 'Enter' || e.key === ' ') {
104
- const linkElement = e.currentTarget.querySelector('a');
105
- linkElement === null || linkElement === void 0 ? void 0 : linkElement.click();
106
- e.preventDefault();
107
- }
108
- } }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map((item) => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: '674dd84e23c325f874f57b92b0171b47d600d463', url: this.lastItem.url, "aria-current": "page", tabindex: -1 }, this.lastItem.text))), h("div", { key: 'b4131833874403a8166446991510a36003a21aed', class: "hidden-items" }, h("a", { key: 'aa31950651d486afdb97974c24929cc80e0c3f53', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: 'e9d1f5e225220a5942f8844dc26014f1278f935f', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '493a91739d10c3e536da52d636aca4b305f88273', name: "home", class: "home-icon" })), this.breadcrumbItems.map((item) => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
109
- }
110
- get host() { return this; }
111
- static get watchers() { return {
112
- "homeUrl": ["validateUrl"]
113
- }; }
114
- static get style() { return PostBreadcrumbStyle0; }
115
- }, [1, "post-breadcrumb", {
116
- "homeUrl": [1, "home-url"],
117
- "homeText": [1, "home-text"],
118
- "breadcrumbItems": [32],
119
- "isConcatenated": [32],
120
- "lastWindowWidth": [32]
121
- }, undefined, {
122
- "homeUrl": ["validateUrl"]
123
- }]);
124
- function defineCustomElement$1() {
125
- if (typeof customElements === "undefined") {
126
- return;
127
- }
128
- const components = ["post-breadcrumb", "post-breadcrumb-item", "post-icon", "post-menu", "post-menu-item", "post-menu-trigger", "post-popovercontainer"];
129
- components.forEach(tagName => { switch (tagName) {
130
- case "post-breadcrumb":
131
- if (!customElements.get(tagName)) {
132
- customElements.define(tagName, PostBreadcrumb$1);
133
- }
134
- break;
135
- case "post-breadcrumb-item":
136
- if (!customElements.get(tagName)) {
137
- defineCustomElement$7();
138
- }
139
- break;
140
- case "post-icon":
141
- if (!customElements.get(tagName)) {
142
- defineCustomElement$6();
143
- }
144
- break;
145
- case "post-menu":
146
- if (!customElements.get(tagName)) {
147
- defineCustomElement$5();
148
- }
149
- break;
150
- case "post-menu-item":
151
- if (!customElements.get(tagName)) {
152
- defineCustomElement$4();
153
- }
154
- break;
155
- case "post-menu-trigger":
156
- if (!customElements.get(tagName)) {
157
- defineCustomElement$3();
158
- }
159
- break;
160
- case "post-popovercontainer":
161
- if (!customElements.get(tagName)) {
162
- defineCustomElement$2();
163
- }
164
- break;
165
- } });
166
- }
167
-
168
- const PostBreadcrumb = PostBreadcrumb$1;
169
- const defineCustomElement = defineCustomElement$1;
170
-
171
- export { PostBreadcrumb, defineCustomElement };