@swisspost/design-system-components 10.0.0-next.39 → 10.0.0-next.41

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 (454) hide show
  1. package/dist/cjs/breakpoints-DIH5Oaz7.js +186 -0
  2. package/dist/cjs/event-from-AKK8RQrn.js +107 -0
  3. package/dist/cjs/{get-root-8102fecd.js → get-root-DmyBVSJ_.js} +1 -1
  4. package/dist/cjs/{index-b60129c4.js → index-CRMt-jq2.js} +1172 -313
  5. package/dist/cjs/index.cjs.js +0 -72
  6. package/dist/cjs/loader.cjs.js +3 -6
  7. package/dist/cjs/{package-29dc73af.js → package-C2pR6Vs2.js} +1 -1
  8. package/dist/cjs/post-accordion_2.cjs.entry.js +183 -0
  9. package/dist/cjs/post-avatar.cjs.entry.js +151 -8
  10. package/dist/cjs/post-back-to-top.cjs.entry.js +86 -9
  11. package/dist/cjs/post-banner.cjs.entry.js +81 -9
  12. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +62 -8
  13. package/dist/cjs/post-breadcrumbs.cjs.entry.js +119 -7
  14. package/dist/cjs/post-card-control.cjs.entry.js +283 -8
  15. package/dist/cjs/post-closebutton_15.cjs.entry.js +4376 -30
  16. package/dist/cjs/post-collapsible_2.cjs.entry.js +196 -10
  17. package/dist/cjs/post-components.cjs.js +7 -8
  18. package/dist/cjs/post-footer.cjs.entry.js +59 -8
  19. package/dist/cjs/post-linkarea.cjs.entry.js +24 -6
  20. package/dist/cjs/post-popover.cjs.entry.js +151 -8
  21. package/dist/cjs/post-rating.cjs.entry.js +115 -8
  22. package/dist/cjs/post-tab-header.cjs.entry.js +26 -9
  23. package/dist/cjs/post-tab-panel.cjs.entry.js +28 -9
  24. package/dist/cjs/post-tabs.cjs.entry.js +165 -7
  25. package/dist/cjs/post-tag.cjs.entry.js +50 -8
  26. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +5195 -7
  27. package/dist/cjs/post-tooltip.cjs.entry.js +78 -9
  28. package/dist/collection/collection-manifest.json +4 -4
  29. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  30. package/dist/collection/components/post-accordion/post-accordion.js +39 -23
  31. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  32. package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -12
  33. package/dist/collection/components/post-avatar/post-avatar.js +12 -9
  34. package/dist/collection/components/post-back-to-top/post-back-to-top.js +4 -3
  35. package/dist/collection/components/post-banner/post-banner.js +18 -9
  36. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +4 -6
  37. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  38. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +13 -9
  39. package/dist/collection/components/post-card-control/post-card-control.js +33 -16
  40. package/dist/collection/components/post-collapsible/post-collapsible.js +6 -1
  41. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -9
  42. package/dist/collection/components/post-footer/post-footer.css +1 -1
  43. package/dist/collection/components/post-footer/post-footer.js +35 -15
  44. package/dist/collection/components/post-header/post-header.css +1 -1
  45. package/dist/collection/components/post-header/post-header.js +28 -16
  46. package/dist/collection/components/post-icon/post-icon.js +66 -54
  47. package/dist/collection/components/post-language-option/post-language-option.css +1 -1
  48. package/dist/collection/components/post-language-option/post-language-option.js +17 -13
  49. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
  50. package/dist/collection/components/post-language-switch/post-language-switch.js +43 -24
  51. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  52. package/dist/collection/components/post-list/post-list.js +13 -4
  53. package/dist/collection/components/post-list-item/post-list-item.js +1 -1
  54. package/dist/collection/components/post-logo/post-logo.js +4 -5
  55. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
  56. package/dist/collection/components/post-megadropdown/post-megadropdown.js +12 -6
  57. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +34 -20
  58. package/dist/collection/components/post-menu/post-menu.css +1 -1
  59. package/dist/collection/components/post-menu/post-menu.js +43 -21
  60. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -0
  61. package/dist/collection/components/post-menu-item/post-menu-item.js +11 -1
  62. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +9 -5
  63. package/dist/collection/components/post-popover/post-popover.js +20 -6
  64. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  65. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +44 -16
  66. package/dist/collection/components/post-rating/post-rating.js +26 -6
  67. package/dist/collection/components/post-tab-header/post-tab-header.js +4 -6
  68. package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -6
  69. package/dist/collection/components/post-tabs/post-tabs.js +4 -3
  70. package/dist/collection/components/post-tag/post-tag.js +11 -9
  71. package/dist/collection/components/post-togglebutton/post-togglebutton.js +8 -3
  72. package/dist/collection/components/post-tooltip/post-tooltip.js +25 -7
  73. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +20 -12
  74. package/dist/collection/index.js +1 -37
  75. package/dist/collection/utils/breakpoints.js +38 -45
  76. package/dist/collection/utils/event-from.js +103 -0
  77. package/dist/collection/utils/index.js +1 -1
  78. package/dist/components/index.js +2315 -37
  79. package/dist/components/p-1KLiMO0w.js +3 -0
  80. package/dist/components/p-8U5GFtQP.js +105 -0
  81. package/dist/components/{post-menu2.js → p-BLhBouGz.js} +51 -30
  82. package/dist/{esm/index-ffccd040.js → components/p-CV7fm1rW.js} +1 -1
  83. package/dist/components/{post-menu-trigger2.js → p-CaPj3whI.js} +14 -12
  84. package/dist/components/{post-breadcrumb-item2.js → p-Cpaqct04.js} +9 -11
  85. package/dist/components/p-CtNCtg2z.js +114 -0
  86. package/dist/components/p-Cx0AiN2A.js +182 -0
  87. package/{loaders/post-collapsible-trigger2.js → dist/components/p-D3LhzIrC.js} +25 -14
  88. package/dist/components/{get-root.js → p-DBHo9yGF.js} +1 -1
  89. package/dist/components/p-DQuPPEca.js +31 -0
  90. package/dist/components/{post-accordion2.js → p-DlEtlaNu.js} +42 -29
  91. package/dist/components/{post-collapsible2.js → p-DphlfQse.js} +11 -8
  92. package/dist/components/{post-popovercontainer2.js → p-elg4VvHg.js} +246 -278
  93. package/{loaders/post-icon2.js → dist/components/p-fmA57Ivd.js} +52 -54
  94. package/dist/components/post-accordion-item.js +1 -1
  95. package/dist/components/post-accordion.js +1 -1
  96. package/dist/components/post-avatar.js +183 -1
  97. package/dist/components/post-back-to-top.js +115 -1
  98. package/dist/components/post-banner.js +120 -1
  99. package/dist/components/post-breadcrumb-item.js +1 -1
  100. package/dist/components/post-breadcrumbs.js +182 -1
  101. package/dist/components/post-card-control.js +322 -1
  102. package/dist/components/post-closebutton.js +37 -1
  103. package/dist/components/post-collapsible-trigger.js +1 -1
  104. package/dist/components/post-collapsible.js +1 -1
  105. package/dist/components/post-footer.js +112 -1
  106. package/dist/components/post-header.js +273 -1
  107. package/dist/components/post-icon.js +1 -1
  108. package/dist/components/post-language-option.js +96 -1
  109. package/dist/components/post-language-switch.js +154 -1
  110. package/dist/components/post-linkarea.js +41 -1
  111. package/dist/components/post-list-item.js +34 -1
  112. package/dist/components/post-list.js +57 -1
  113. package/dist/components/post-logo.js +54 -1
  114. package/dist/components/post-mainnavigation.js +181 -1
  115. package/dist/components/post-megadropdown-trigger.js +132 -1
  116. package/dist/components/post-megadropdown.js +194 -1
  117. package/dist/components/post-menu-item.js +1 -1
  118. package/dist/components/post-menu-trigger.js +1 -1
  119. package/dist/components/post-menu.js +1 -1
  120. package/dist/components/post-popover.js +184 -1
  121. package/dist/components/post-popovercontainer.js +1 -1
  122. package/dist/components/post-rating.js +148 -1
  123. package/dist/components/post-tab-header.js +48 -1
  124. package/dist/components/post-tab-panel.js +50 -1
  125. package/dist/components/post-tabs.js +186 -1
  126. package/dist/components/post-tag.js +82 -1
  127. package/dist/components/post-togglebutton.js +52 -1
  128. package/dist/components/post-tooltip-trigger.js +5218 -1
  129. package/dist/components/post-tooltip.js +110 -1
  130. package/dist/docs.d.ts +8 -0
  131. package/dist/docs.json +426 -118
  132. package/dist/esm/breakpoints-DyVir0ex.js +182 -0
  133. package/dist/esm/event-from-8U5GFtQP.js +105 -0
  134. package/{loaders/get-root.js → dist/esm/get-root-D9QC9-TY.js} +1 -1
  135. package/{loaders/index2.js → dist/esm/index-BWC0gtGU.js} +1 -1
  136. package/dist/esm/{index-f4d19816.js → index-CVhzhVv0.js} +1169 -309
  137. package/dist/esm/index.js +1 -31
  138. package/dist/esm/loader.js +3 -4
  139. package/dist/esm/package-1KLiMO0w.js +3 -0
  140. package/dist/esm/post-accordion_2.entry.js +180 -0
  141. package/dist/esm/post-avatar.entry.js +154 -5
  142. package/dist/esm/post-back-to-top.entry.js +89 -6
  143. package/dist/esm/post-banner.entry.js +85 -7
  144. package/dist/esm/post-breadcrumb-item_2.entry.js +65 -5
  145. package/dist/esm/post-breadcrumbs.entry.js +123 -5
  146. package/dist/esm/post-card-control.entry.js +286 -5
  147. package/dist/esm/post-closebutton_15.entry.js +4362 -10
  148. package/dist/esm/post-collapsible_2.entry.js +199 -7
  149. package/dist/esm/post-components.js +5 -5
  150. package/dist/esm/post-footer.entry.js +62 -5
  151. package/dist/esm/post-linkarea.entry.js +27 -3
  152. package/dist/esm/post-popover.entry.js +155 -6
  153. package/dist/esm/post-rating.entry.js +118 -5
  154. package/dist/esm/post-tab-header.entry.js +29 -6
  155. package/dist/esm/post-tab-panel.entry.js +31 -6
  156. package/dist/esm/post-tabs.entry.js +169 -5
  157. package/dist/esm/post-tag.entry.js +53 -5
  158. package/dist/esm/post-tooltip-trigger.entry.js +5199 -5
  159. package/dist/esm/post-tooltip.entry.js +81 -6
  160. package/dist/post-components/index.esm.js +0 -1
  161. package/dist/post-components/p-0d08ab13.entry.js +1 -0
  162. package/dist/post-components/p-1KLiMO0w.js +1 -0
  163. package/dist/post-components/p-1e006e29.entry.js +1 -0
  164. package/dist/post-components/p-3a5bdb7f.entry.js +1 -0
  165. package/dist/post-components/p-4214b85e.entry.js +1 -0
  166. package/dist/post-components/p-50916d48.entry.js +1 -0
  167. package/dist/post-components/p-5f4126d8.entry.js +1 -0
  168. package/dist/post-components/p-62982420.entry.js +1 -0
  169. package/dist/post-components/p-78f4dd12.entry.js +1 -0
  170. package/dist/post-components/p-7a7d237b.entry.js +1 -0
  171. package/dist/post-components/p-80174475.entry.js +1 -0
  172. package/dist/post-components/p-8U5GFtQP.js +1 -0
  173. package/dist/post-components/p-8d5a4218.entry.js +1 -0
  174. package/dist/post-components/p-8e89ccc1.entry.js +1 -0
  175. package/dist/post-components/p-9003674b.entry.js +1 -0
  176. package/dist/post-components/p-925aee3d.entry.js +1 -0
  177. package/dist/post-components/p-9b446561.entry.js +1 -0
  178. package/dist/post-components/p-9ec29527.entry.js +1 -0
  179. package/dist/post-components/{p-b176309b.js → p-BWC0gtGU.js} +1 -1
  180. package/dist/post-components/{p-6b31a76a.js → p-Bkp2QDth.js} +1 -1
  181. package/dist/post-components/p-CVhzhVv0.js +2 -0
  182. package/dist/post-components/p-DyVir0ex.js +1 -0
  183. package/dist/post-components/p-ec764922.entry.js +1 -0
  184. package/dist/post-components/p-fa550b4a.entry.js +1 -0
  185. package/dist/post-components/p-fb46e260.entry.js +1 -0
  186. package/dist/post-components/post-components.esm.js +1 -1
  187. package/dist/types/components/post-footer/post-footer.d.ts +7 -3
  188. package/dist/types/components/post-header/post-header.d.ts +1 -0
  189. package/dist/types/components/post-icon/post-icon.d.ts +0 -4
  190. package/dist/types/components/post-language-switch/post-language-switch.d.ts +1 -0
  191. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  192. package/dist/types/components.d.ts +61 -1
  193. package/dist/types/index.d.ts +10 -37
  194. package/dist/types/stencil-public-runtime.d.ts +29 -1
  195. package/dist/types/utils/breakpoints.d.ts +12 -7
  196. package/dist/types/utils/event-from.d.ts +9 -0
  197. package/dist/types/utils/index.d.ts +1 -1
  198. package/hydrate/index.d.ts +273 -0
  199. package/hydrate/index.js +32002 -0
  200. package/hydrate/index.mjs +31994 -0
  201. package/hydrate/package.json +12 -0
  202. package/package.json +45 -17
  203. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  204. package/dist/cjs/breakpoints-cdf1b747.js +0 -59
  205. package/dist/cjs/event-guard-efabc84f.js +0 -47
  206. package/dist/cjs/heading-levels-608d432e.js +0 -5
  207. package/dist/cjs/post-accordion-c433c493.js +0 -105
  208. package/dist/cjs/post-accordion-item-8d5a301d.js +0 -64
  209. package/dist/cjs/post-accordion-item.cjs.entry.js +0 -16
  210. package/dist/cjs/post-accordion.cjs.entry.js +0 -15
  211. package/dist/cjs/post-avatar-421043df.js +0 -162
  212. package/dist/cjs/post-back-to-top-3cca3803.js +0 -93
  213. package/dist/cjs/post-banner-2e99c9d8.js +0 -87
  214. package/dist/cjs/post-breadcrumbs-1be50860.js +0 -126
  215. package/dist/cjs/post-card-control-0bfdad92.js +0 -290
  216. package/dist/cjs/post-collapsible-trigger-4180b218.js +0 -190
  217. package/dist/cjs/post-footer-92adffac.js +0 -48
  218. package/dist/cjs/post-linkarea-26c457b3.js +0 -30
  219. package/dist/cjs/post-menu-item-d0a53c84.js +0 -68
  220. package/dist/cjs/post-popover-36cead3d.js +0 -150
  221. package/dist/cjs/post-rating-f50a9939.js +0 -109
  222. package/dist/cjs/post-tab-header-f47508da.js +0 -34
  223. package/dist/cjs/post-tab-panel-7c51798b.js +0 -36
  224. package/dist/cjs/post-tabs-2debea01.js +0 -173
  225. package/dist/cjs/post-tag-ac62c57f.js +0 -60
  226. package/dist/cjs/post-togglebutton-43c46511.js +0 -4491
  227. package/dist/cjs/post-tooltip-b7dcfb44.js +0 -74
  228. package/dist/cjs/post-tooltip-trigger-904061b6.js +0 -4685
  229. package/dist/collection/utils/event-guard.js +0 -43
  230. package/dist/components/breakpoints.js +0 -56
  231. package/dist/components/event-guard.js +0 -45
  232. package/dist/components/index2.js +0 -88
  233. package/dist/components/package.js +0 -3
  234. package/dist/components/post-accordion-item2.js +0 -103
  235. package/dist/components/post-avatar2.js +0 -190
  236. package/dist/components/post-back-to-top2.js +0 -118
  237. package/dist/components/post-banner2.js +0 -121
  238. package/dist/components/post-breadcrumbs2.js +0 -184
  239. package/dist/components/post-card-control2.js +0 -325
  240. package/dist/components/post-closebutton2.js +0 -39
  241. package/dist/components/post-collapsible-trigger2.js +0 -125
  242. package/dist/components/post-footer2.js +0 -90
  243. package/dist/components/post-header2.js +0 -397
  244. package/dist/components/post-icon2.js +0 -156
  245. package/dist/components/post-language-option2.js +0 -102
  246. package/dist/components/post-language-switch2.js +0 -143
  247. package/dist/components/post-linkarea2.js +0 -43
  248. package/dist/components/post-list-item2.js +0 -36
  249. package/dist/components/post-list2.js +0 -54
  250. package/dist/components/post-logo2.js +0 -57
  251. package/dist/components/post-mainnavigation2.js +0 -183
  252. package/dist/components/post-megadropdown-trigger2.js +0 -121
  253. package/dist/components/post-megadropdown2.js +0 -190
  254. package/dist/components/post-menu-item2.js +0 -27
  255. package/dist/components/post-popover2.js +0 -178
  256. package/dist/components/post-rating2.js +0 -138
  257. package/dist/components/post-tab-header2.js +0 -52
  258. package/dist/components/post-tab-panel2.js +0 -54
  259. package/dist/components/post-tabs2.js +0 -189
  260. package/dist/components/post-tag2.js +0 -88
  261. package/dist/components/post-togglebutton2.js +0 -51
  262. package/dist/components/post-tooltip-trigger2.js +0 -4703
  263. package/dist/components/post-tooltip2.js +0 -102
  264. package/dist/esm/app-globals-0f993ce5.js +0 -3
  265. package/dist/esm/breakpoints-7812702e.js +0 -56
  266. package/dist/esm/event-guard-538ee077.js +0 -45
  267. package/dist/esm/get-root-1b1af46f.js +0 -15
  268. package/dist/esm/heading-levels-5b7b4349.js +0 -3
  269. package/dist/esm/package-8503eaa8.js +0 -3
  270. package/dist/esm/post-accordion-9365faca.js +0 -103
  271. package/dist/esm/post-accordion-item-2dc8e3b7.js +0 -62
  272. package/dist/esm/post-accordion-item.entry.js +0 -8
  273. package/dist/esm/post-accordion.entry.js +0 -7
  274. package/dist/esm/post-avatar-4f73dc4d.js +0 -160
  275. package/dist/esm/post-back-to-top-8f759d32.js +0 -91
  276. package/dist/esm/post-banner-ad979275.js +0 -85
  277. package/dist/esm/post-breadcrumbs-a20336c7.js +0 -124
  278. package/dist/esm/post-card-control-3c77e778.js +0 -288
  279. package/dist/esm/post-collapsible-trigger-5fd0e193.js +0 -187
  280. package/dist/esm/post-footer-3e117b5a.js +0 -46
  281. package/dist/esm/post-linkarea-16a14609.js +0 -28
  282. package/dist/esm/post-menu-item-b1604fe4.js +0 -65
  283. package/dist/esm/post-popover-49096648.js +0 -148
  284. package/dist/esm/post-rating-405bee8f.js +0 -107
  285. package/dist/esm/post-tab-header-b228c217.js +0 -32
  286. package/dist/esm/post-tab-panel-98110b64.js +0 -34
  287. package/dist/esm/post-tabs-44d9313c.js +0 -171
  288. package/dist/esm/post-tag-99cc9616.js +0 -58
  289. package/dist/esm/post-togglebutton-ea73e63f.js +0 -4475
  290. package/dist/esm/post-tooltip-78cd2988.js +0 -72
  291. package/dist/esm/post-tooltip-trigger-bdb21c45.js +0 -4683
  292. package/dist/post-components/p-0889c759.js +0 -1
  293. package/dist/post-components/p-09dd5aa4.js +0 -1
  294. package/dist/post-components/p-0f9322e5.js +0 -8
  295. package/dist/post-components/p-11572299.js +0 -1
  296. package/dist/post-components/p-19a83519.entry.js +0 -1
  297. package/dist/post-components/p-1afb3c43.entry.js +0 -1
  298. package/dist/post-components/p-214cd032.js +0 -1
  299. package/dist/post-components/p-21e5b028.js +0 -1
  300. package/dist/post-components/p-2320305b.js +0 -1
  301. package/dist/post-components/p-247a1668.js +0 -1
  302. package/dist/post-components/p-2523f97b.entry.js +0 -1
  303. package/dist/post-components/p-2bd3a436.js +0 -1
  304. package/dist/post-components/p-2ce8fbf5.js +0 -1
  305. package/dist/post-components/p-2f879f4e.entry.js +0 -1
  306. package/dist/post-components/p-33e26845.entry.js +0 -1
  307. package/dist/post-components/p-38b1c71e.entry.js +0 -1
  308. package/dist/post-components/p-38d59732.js +0 -1
  309. package/dist/post-components/p-3a67f1ff.js +0 -1
  310. package/dist/post-components/p-41450b6c.entry.js +0 -1
  311. package/dist/post-components/p-4c23ed05.entry.js +0 -1
  312. package/dist/post-components/p-57746c40.js +0 -1
  313. package/dist/post-components/p-6313d72e.entry.js +0 -1
  314. package/dist/post-components/p-64e0b0fc.js +0 -1
  315. package/dist/post-components/p-658a2e34.entry.js +0 -1
  316. package/dist/post-components/p-722ffaae.js +0 -1
  317. package/dist/post-components/p-746d3cd3.entry.js +0 -1
  318. package/dist/post-components/p-79a2dad0.entry.js +0 -1
  319. package/dist/post-components/p-7dd1807c.js +0 -1
  320. package/dist/post-components/p-817fbeaf.js +0 -1
  321. package/dist/post-components/p-85950200.js +0 -1
  322. package/dist/post-components/p-8ebecf22.entry.js +0 -1
  323. package/dist/post-components/p-8ed1cb53.entry.js +0 -1
  324. package/dist/post-components/p-91244b25.js +0 -1
  325. package/dist/post-components/p-91675004.js +0 -1
  326. package/dist/post-components/p-94ebc430.js +0 -1
  327. package/dist/post-components/p-95727a4f.entry.js +0 -1
  328. package/dist/post-components/p-9e461613.js +0 -2
  329. package/dist/post-components/p-a844da3a.entry.js +0 -1
  330. package/dist/post-components/p-af900651.js +0 -1
  331. package/dist/post-components/p-b373659e.entry.js +0 -1
  332. package/dist/post-components/p-b500b245.js +0 -1
  333. package/dist/post-components/p-bf182745.entry.js +0 -1
  334. package/dist/post-components/p-c9b6f9e7.entry.js +0 -1
  335. package/dist/post-components/p-cb7d8f67.entry.js +0 -1
  336. package/dist/post-components/p-e1255160.js +0 -1
  337. package/dist/post-components/p-e28eb73a.js +0 -1
  338. package/dist/types/popover-fn.d.ts +0 -11
  339. package/dist/types/utils/event-guard.d.ts +0 -4
  340. package/loader/package.json +0 -11
  341. package/loaders/breakpoints.js +0 -56
  342. package/loaders/event-guard.js +0 -45
  343. package/loaders/fade.js +0 -11
  344. package/loaders/get-focusable-children.js +0 -35
  345. package/loaders/heading-levels.js +0 -3
  346. package/loaders/index.browser.js +0 -14
  347. package/loaders/index.d.ts +0 -108
  348. package/loaders/index.js +0 -39
  349. package/loaders/long-press-event.js +0 -264
  350. package/loaders/package.js +0 -3
  351. package/loaders/post-accordion-item.d.ts +0 -11
  352. package/loaders/post-accordion-item.js +0 -6
  353. package/loaders/post-accordion-item2.js +0 -103
  354. package/loaders/post-accordion.d.ts +0 -11
  355. package/loaders/post-accordion.js +0 -129
  356. package/loaders/post-avatar.d.ts +0 -11
  357. package/loaders/post-avatar.js +0 -193
  358. package/loaders/post-back-to-top.d.ts +0 -11
  359. package/loaders/post-back-to-top.js +0 -121
  360. package/loaders/post-banner.d.ts +0 -11
  361. package/loaders/post-banner.js +0 -124
  362. package/loaders/post-breadcrumb-item.d.ts +0 -11
  363. package/loaders/post-breadcrumb-item.js +0 -6
  364. package/loaders/post-breadcrumb-item2.js +0 -82
  365. package/loaders/post-breadcrumbs.d.ts +0 -11
  366. package/loaders/post-breadcrumbs.js +0 -187
  367. package/loaders/post-card-control.d.ts +0 -11
  368. package/loaders/post-card-control.js +0 -328
  369. package/loaders/post-closebutton.d.ts +0 -11
  370. package/loaders/post-closebutton.js +0 -42
  371. package/loaders/post-collapsible-trigger.d.ts +0 -11
  372. package/loaders/post-collapsible-trigger.js +0 -6
  373. package/loaders/post-collapsible.d.ts +0 -11
  374. package/loaders/post-collapsible.js +0 -6
  375. package/loaders/post-collapsible2.js +0 -108
  376. package/loaders/post-footer.d.ts +0 -11
  377. package/loaders/post-footer.js +0 -93
  378. package/loaders/post-header.d.ts +0 -11
  379. package/loaders/post-header.js +0 -400
  380. package/loaders/post-icon.d.ts +0 -11
  381. package/loaders/post-icon.js +0 -6
  382. package/loaders/post-language-option.d.ts +0 -11
  383. package/loaders/post-language-option.js +0 -105
  384. package/loaders/post-language-switch.d.ts +0 -11
  385. package/loaders/post-language-switch.js +0 -146
  386. package/loaders/post-linkarea.d.ts +0 -11
  387. package/loaders/post-linkarea.js +0 -46
  388. package/loaders/post-list-item.d.ts +0 -11
  389. package/loaders/post-list-item.js +0 -39
  390. package/loaders/post-list.d.ts +0 -11
  391. package/loaders/post-list.js +0 -57
  392. package/loaders/post-logo.d.ts +0 -11
  393. package/loaders/post-logo.js +0 -60
  394. package/loaders/post-mainnavigation.d.ts +0 -11
  395. package/loaders/post-mainnavigation.js +0 -186
  396. package/loaders/post-megadropdown-trigger.d.ts +0 -11
  397. package/loaders/post-megadropdown-trigger.js +0 -124
  398. package/loaders/post-megadropdown.d.ts +0 -11
  399. package/loaders/post-megadropdown.js +0 -193
  400. package/loaders/post-menu-item.d.ts +0 -11
  401. package/loaders/post-menu-item.js +0 -6
  402. package/loaders/post-menu-item2.js +0 -27
  403. package/loaders/post-menu-trigger.d.ts +0 -11
  404. package/loaders/post-menu-trigger.js +0 -6
  405. package/loaders/post-menu-trigger2.js +0 -109
  406. package/loaders/post-menu.d.ts +0 -11
  407. package/loaders/post-menu.js +0 -6
  408. package/loaders/post-menu2.js +0 -202
  409. package/loaders/post-popover.d.ts +0 -11
  410. package/loaders/post-popover.js +0 -181
  411. package/loaders/post-popovercontainer.d.ts +0 -11
  412. package/loaders/post-popovercontainer.js +0 -6
  413. package/loaders/post-popovercontainer2.js +0 -3051
  414. package/loaders/post-rating.d.ts +0 -11
  415. package/loaders/post-rating.js +0 -141
  416. package/loaders/post-tab-header.d.ts +0 -11
  417. package/loaders/post-tab-header.js +0 -55
  418. package/loaders/post-tab-panel.d.ts +0 -11
  419. package/loaders/post-tab-panel.js +0 -57
  420. package/loaders/post-tabs.d.ts +0 -11
  421. package/loaders/post-tabs.js +0 -192
  422. package/loaders/post-tag.d.ts +0 -11
  423. package/loaders/post-tag.js +0 -91
  424. package/loaders/post-togglebutton.d.ts +0 -11
  425. package/loaders/post-togglebutton.js +0 -54
  426. package/loaders/post-tooltip-trigger.d.ts +0 -11
  427. package/loaders/post-tooltip-trigger.js +0 -4706
  428. package/loaders/post-tooltip.d.ts +0 -11
  429. package/loaders/post-tooltip.js +0 -105
  430. package/loaders/slide.js +0 -25
  431. package/loaders/switch-variants.js +0 -3
  432. /package/dist/cjs/{fade-72d5ef55.js → fade-nS5zzDQS.js} +0 -0
  433. /package/dist/cjs/{index-2b2b85e5.js → index-DtvYdwe1.js} +0 -0
  434. /package/dist/cjs/{index.browser-4af21c17.js → index.browser-Doj636JV.js} +0 -0
  435. /package/dist/cjs/{long-press-event-6e62d113.js → long-press-event-Q8jMUNXD.js} +0 -0
  436. /package/dist/cjs/{placement-b2bb6ec4.js → placement-qEFR9hmI.js} +0 -0
  437. /package/dist/cjs/{slide-cd1f09b3.js → slide-CbBL7A8w.js} +0 -0
  438. /package/dist/components/{index.browser.js → p-BLchVpF6.js} +0 -0
  439. /package/dist/components/{slide.js → p-BuLMaH5t.js} +0 -0
  440. /package/dist/components/{get-focusable-children.js → p-C35MCWIp.js} +0 -0
  441. /package/dist/components/{long-press-event.js → p-C_2k3G1c.js} +0 -0
  442. /package/dist/components/{switch-variants.js → p-DjIHLduJ.js} +0 -0
  443. /package/dist/components/{fade.js → p-SbIC4aZX.js} +0 -0
  444. /package/dist/components/{heading-levels.js → p-r4txK0AC.js} +0 -0
  445. /package/dist/esm/{fade-1f3cacf4.js → fade-SbIC4aZX.js} +0 -0
  446. /package/dist/esm/{index.browser-ff103197.js → index.browser-BLchVpF6.js} +0 -0
  447. /package/dist/esm/{long-press-event-04d24397.js → long-press-event-C_2k3G1c.js} +0 -0
  448. /package/dist/esm/{placement-8d56605d.js → placement-DRiVosES.js} +0 -0
  449. /package/dist/esm/{slide-cd2850ee.js → slide-BuLMaH5t.js} +0 -0
  450. /package/dist/post-components/{p-c65f32b0.js → p-BLchVpF6.js} +0 -0
  451. /package/dist/post-components/{p-9b052461.js → p-BuLMaH5t.js} +0 -0
  452. /package/dist/post-components/{p-8db32dab.js → p-C_2k3G1c.js} +0 -0
  453. /package/dist/post-components/{p-59a38c23.js → p-DRiVosES.js} +0 -0
  454. /package/dist/post-components/{p-64e3de38.js → p-SbIC4aZX.js} +0 -0
@@ -1,10 +1,9 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { I as IS_BROWSER } from './breakpoints.js';
3
- import { d as checkEmptyOrOneOf, a as checkEmptyOrType, c as checkRequiredAndType } from './index2.js';
4
- import { v as version } from './package.js';
1
+ import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
+ import { I as IS_BROWSER } from './p-Cx0AiN2A.js';
3
+ import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './p-CV7fm1rW.js';
4
+ import { v as version } from './p-1KLiMO0w.js';
5
5
 
6
6
  const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
7
- const PostIconStyle0 = postIconCss;
8
7
 
9
8
  const CDN_URL = `https://unpkg.com/@swisspost/design-system-icons@${version}/public/post-icons/`;
10
9
  const ANIMATION_NAMES = [
@@ -16,18 +15,19 @@ const ANIMATION_NAMES = [
16
15
  'throb',
17
16
  ];
18
17
  const ANIMATION_KEYS = [...ANIMATION_NAMES];
19
- const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLElement {
18
+ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
20
19
  constructor() {
21
20
  super();
22
21
  this.__registerHost();
23
22
  this.__attachShadow();
24
- this.animation = undefined;
25
- this.base = undefined;
23
+ /**
24
+ * When set to `true`, the icon will be flipped horizontally.
25
+ */
26
26
  this.flipH = false;
27
+ /**
28
+ * When set to `true`, the icon will be flipped vertically.
29
+ */
27
30
  this.flipV = false;
28
- this.name = undefined;
29
- this.rotate = undefined;
30
- this.scale = undefined;
31
31
  }
32
32
  validateAnimation() {
33
33
  checkEmptyOrOneOf(this, 'animation', ANIMATION_KEYS);
@@ -44,55 +44,52 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
44
44
  validateScale() {
45
45
  checkEmptyOrType(this, 'scale', 'number');
46
46
  }
47
- // Construct the icon url from different possible sources
47
+ // Construct the icon URL according to the following rules:
48
+ // - URL = current domain + base[href] + meta[data-post-icon-base] (or component base)
49
+ // - If base[href] is not relative, it's used instead of current domain + base[href]
50
+ // - If meta[data-post-icon-base] (or component base) is not relative, it's used as is
48
51
  getUrl() {
49
- let url;
50
- const file = `${this.name}.svg`;
51
- // the first definition object which defines a domain, will be used to set the domain of the file url
52
- // the first definition object which defines a slug, will be used to set the slug of the file url
53
- const urlDefinitions = [this.getUrlDefinition(this.base, 'both')];
54
- if (IS_BROWSER) {
55
- urlDefinitions.push(this.getUrlDefinition(document.head
56
- .querySelector('meta[name="design-system-settings"][data-post-icon-base]')
57
- ?.getAttribute('data-post-icon-base'), 'relative'));
58
- urlDefinitions.push(this.getUrlDefinition(document.querySelector('base[href]')?.getAttribute('href'), 'both'));
52
+ const fileName = `${this.name}.svg`;
53
+ if (!IS_BROWSER && !this.base) {
54
+ return `${CDN_URL}${fileName}`;
59
55
  }
60
- // in case no definition defines a domain, a relative url is used to load the icon
61
- const origin = urlDefinitions.find(d => d.definesDomain)?.url?.origin;
62
- // in case no definition defines a slug either, the cdn url is used as a fallback
63
- const slug = urlDefinitions.find(d => d.definesSlug)?.url?.pathname;
64
- if (origin && slug) {
65
- url = `${origin}${slug}${file}`;
56
+ const currentDomain = IS_BROWSER ? window.location.origin : '';
57
+ const baseHref = IS_BROWSER
58
+ ? document.querySelector('base[href]')?.getAttribute('href') || ''
59
+ : '';
60
+ const isBaseHrefAbsolute = /^https?:\/\//.test(baseHref);
61
+ const metaIconBase = IS_BROWSER
62
+ ? document
63
+ .querySelector('meta[name="design-system-settings"]')
64
+ ?.getAttribute('data-post-icon-base') || ''
65
+ : '';
66
+ const iconBase = this.base || metaIconBase;
67
+ const isIconBaseAbsolute = /^https?:\/\//.test(iconBase);
68
+ const normalizedBaseHref = normalizeUrl(baseHref);
69
+ const normalizedIconBase = normalizeUrl(iconBase);
70
+ function normalizeUrl(url) {
71
+ if (!url)
72
+ return '';
73
+ return url.endsWith('/') ? url : `${url}/`;
66
74
  }
67
- else if (!origin && slug) {
68
- url = `${slug}${file}`;
75
+ let url;
76
+ if (isIconBaseAbsolute) {
77
+ // If icon base is absolute, use it as is
78
+ url = `${normalizedIconBase}${fileName}`;
69
79
  }
70
- else {
71
- url = `${CDN_URL}${file}`;
80
+ else if (isBaseHrefAbsolute) {
81
+ // If baseHref is absolute, don't use current domain
82
+ url = `${normalizedBaseHref}${normalizedIconBase}${fileName}`;
72
83
  }
73
- return url;
74
- }
75
- getUrlDefinition(url, allow) {
76
- return {
77
- url: this.getUrlObject(url),
78
- definesDomain: allow !== 'relative' ? this.definesDomain(url) : false,
79
- definesSlug: allow !== 'absolute' ? this.definesSlug(url) : false,
80
- };
81
- }
82
- getUrlObject(url) {
83
- if (url) {
84
- url = url?.endsWith('/') ? url : `${url}/`;
85
- return new URL(url, 'https://url.base');
84
+ else if (iconBase || baseHref) {
85
+ // Standard case: domain + baseHref + iconBase
86
+ url = `${currentDomain}${normalizedBaseHref}${normalizedIconBase}${fileName}`;
86
87
  }
87
88
  else {
88
- return null;
89
+ // Fallback to CDN if no paths are specified
90
+ url = `${CDN_URL}${fileName}`;
89
91
  }
90
- }
91
- definesDomain(url) {
92
- return url ? /^https?:\/\//.test(url) : false;
93
- }
94
- definesSlug(url) {
95
- return Boolean(/^\/.+/.test(this.getUrlObject(url)?.pathname));
92
+ return url.replace(/([^:])\/\//g, '$1/');
96
93
  }
97
94
  getStyles() {
98
95
  const url = this.getUrl();
@@ -113,7 +110,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
113
110
  this.validateAnimation();
114
111
  }
115
112
  render() {
116
- return (h(Host, { key: 'bc29680e4693c5a18416de667c826c1d57075e15', "data-version": version }, h("span", { key: 'b49082668fa3a97bba5a2ffe791c51e9c56deb4e', style: this.getStyles() })));
113
+ return (h(Host, { key: '1427e07f64159df95922a2e79343447675183c3c', "data-version": version }, h("span", { key: 'a83eadbc13d9c5876d135cd5282cfa451951d2fe', style: this.getStyles() })));
117
114
  }
118
115
  get host() { return this; }
119
116
  static get watchers() { return {
@@ -123,7 +120,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
123
120
  "rotate": ["validateRotate"],
124
121
  "scale": ["validateScale"]
125
122
  }; }
126
- static get style() { return PostIconStyle0; }
123
+ static get style() { return postIconCss; }
127
124
  }, [1, "post-icon", {
128
125
  "animation": [1],
129
126
  "base": [1],
@@ -152,5 +149,6 @@ function defineCustomElement() {
152
149
  break;
153
150
  } });
154
151
  }
152
+ defineCustomElement();
155
153
 
156
154
  export { PostIcon as P, defineCustomElement as d };
@@ -1,4 +1,4 @@
1
- import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './post-accordion-item2.js';
1
+ import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-CtNCtg2z.js';
2
2
 
3
3
  const PostAccordionItem = PostAccordionItem$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { P as PostAccordion$1, d as defineCustomElement$1 } from './post-accordion2.js';
1
+ import { P as PostAccordion$1, d as defineCustomElement$1 } from './p-DlEtlaNu.js';
2
2
 
3
3
  const PostAccordion = PostAccordion$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,186 @@
1
- import { P as PostAvatar$1, d as defineCustomElement$1 } from './post-avatar2.js';
1
+ import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
+ import { v as version } from './p-1KLiMO0w.js';
3
+ import { c as checkRequiredAndType, e as checkEmptyOrType, f as checkEmptyOrPattern } from './p-CV7fm1rW.js';
4
+ import './p-Cx0AiN2A.js';
5
+
6
+ const postAvatarCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}: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}";
7
+
8
+ // https://docs.gravatar.com/api/avatars/images/
9
+ const GRAVATAR_DEFAULT = '404';
10
+ const GRAVATAR_RATING = 'g';
11
+ const GRAVATAR_SIZE = 80;
12
+ const GRAVATAR_BASE_URL = `https://www.gravatar.com/avatar/{email}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
13
+ const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
14
+ var AvatarType;
15
+ (function (AvatarType) {
16
+ AvatarType["Slotted"] = "slotted";
17
+ AvatarType["Image"] = "image";
18
+ AvatarType["Initials"] = "initials";
19
+ AvatarType[AvatarType["Null"] = null] = "Null";
20
+ })(AvatarType || (AvatarType = {}));
21
+ const PostAvatar$1 = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends H {
22
+ constructor() {
23
+ super();
24
+ this.__registerHost();
25
+ this.__attachShadow();
26
+ this.avatarType = null;
27
+ this.imageUrl = '';
28
+ this.imageAlt = '';
29
+ this.initials = '';
30
+ }
31
+ validateFirstname() {
32
+ checkRequiredAndType(this, 'firstname', 'string');
33
+ }
34
+ validateLastname() {
35
+ checkEmptyOrType(this, 'lastname', 'string');
36
+ }
37
+ validateUserid() {
38
+ checkEmptyOrType(this, 'userid', 'string');
39
+ }
40
+ validateEmail() {
41
+ if (this.email)
42
+ checkEmptyOrPattern(this, 'email', emailPattern);
43
+ }
44
+ async getAvatar() {
45
+ if (this.slottedImage !== null) {
46
+ this.avatarType = AvatarType.Slotted;
47
+ }
48
+ else {
49
+ let imageLoaded = false;
50
+ if (!imageLoaded && this.userid)
51
+ imageLoaded = await this.getImageByProp(this.userid, this.fetchImageByUserId.bind(this));
52
+ if (!imageLoaded && this.email)
53
+ imageLoaded = await this.getImageByProp(this.email, this.fetchImageByEmail.bind(this));
54
+ if (!imageLoaded)
55
+ this.getAvatarByInitials();
56
+ }
57
+ }
58
+ async getImageByProp(prop, fetchImage) {
59
+ if (!prop)
60
+ return false;
61
+ const imageResponse = (await this.getStorageItem(prop)) ?? { ok: false, url: '' };
62
+ if (!imageResponse.ok) {
63
+ try {
64
+ const r = await fetchImage();
65
+ imageResponse.ok = r.ok;
66
+ imageResponse.url = r.url;
67
+ this.imageUrl = imageResponse.url;
68
+ this.imageAlt = `${this.firstname} ${this.lastname} avatar`;
69
+ this.avatarType = AvatarType.Image;
70
+ this.setStorageItem(this.userid, JSON.stringify(imageResponse));
71
+ }
72
+ catch (error) {
73
+ this.removeStorageItem(prop);
74
+ console.info(`Loading avatar by type "${AvatarType.Image}" failed.`);
75
+ }
76
+ }
77
+ return imageResponse.ok;
78
+ }
79
+ async fetchImageByUserId() {
80
+ return await fetch(PostAvatar.INTERNAL_USERID_IMAGE_SRC.replace('{userid}', encodeURIComponent(this.userid)));
81
+ }
82
+ async fetchImageByEmail() {
83
+ const email = await this.cryptify(this.email);
84
+ const imageUrl = GRAVATAR_BASE_URL.replace('{email}', email);
85
+ return await fetch(imageUrl);
86
+ }
87
+ getAvatarByInitials() {
88
+ this.initials = this.getInitials();
89
+ this.avatarType = AvatarType.Initials;
90
+ }
91
+ getNames() {
92
+ return [this.firstname, this.lastname].filter(n => n);
93
+ }
94
+ getInitials() {
95
+ return this.getNames()
96
+ .map(n => n.charAt(0))
97
+ .join('')
98
+ .trim();
99
+ }
100
+ async getStorageItem(keyToken) {
101
+ const key = await this.cryptify(keyToken);
102
+ const value = window?.sessionStorage?.getItem(key);
103
+ return value ? JSON.parse(value) : null;
104
+ }
105
+ async setStorageItem(keyToken, value) {
106
+ const key = await this.cryptify(keyToken);
107
+ window?.sessionStorage?.setItem(key, value);
108
+ }
109
+ async removeStorageItem(keyToken) {
110
+ const key = await this.cryptify(keyToken);
111
+ window?.sessionStorage?.removeItem(key);
112
+ }
113
+ async cryptify(key) {
114
+ return await crypto.subtle.digest('SHA-256', new TextEncoder().encode(key)).then(buffer => {
115
+ return Array.from(new Uint8Array(buffer))
116
+ .map(bytes => bytes.toString(16).padStart(2, '0'))
117
+ .join('');
118
+ });
119
+ }
120
+ onSlotDefaultChange() {
121
+ this.slottedImage = this.host.querySelector('img');
122
+ this.getAvatar();
123
+ }
124
+ componentWillRender() {
125
+ this.slottedImage = this.host.querySelector('img');
126
+ this.getAvatar();
127
+ }
128
+ componentDidLoad() {
129
+ this.validateFirstname();
130
+ this.validateLastname();
131
+ this.validateUserid();
132
+ this.validateEmail();
133
+ }
134
+ render() {
135
+ const initials = this.getNames().reduce((acc, n, i) => {
136
+ if (i > 0)
137
+ acc.push(h("span", null, " "));
138
+ acc.push(n.charAt(0));
139
+ acc.push(h("span", null, n.slice(1)));
140
+ // eslint-disable-next-line @stencil-community/render-returns-host
141
+ return acc;
142
+ }, []);
143
+ return (h(Host, { "data-version": version }, h("slot", { onSlotchange: this.onSlotDefaultChange.bind(this) }, this.avatarType === 'image' && h("img", { src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && h("div", { class: "initials" }, initials))));
144
+ }
145
+ get host() { return this; }
146
+ static get watchers() { return {
147
+ "firstname": ["validateFirstname"],
148
+ "lastname": ["validateLastname"],
149
+ "userid": ["validateUserid"],
150
+ "email": ["validateEmail"]
151
+ }; }
152
+ static get style() { return postAvatarCss; }
153
+ }, [1, "post-avatar", {
154
+ "firstname": [513],
155
+ "lastname": [1],
156
+ "userid": [1],
157
+ "email": [1],
158
+ "slottedImage": [32],
159
+ "avatarType": [32],
160
+ "imageUrl": [32],
161
+ "imageAlt": [32],
162
+ "initials": [32]
163
+ }, undefined, {
164
+ "firstname": ["validateFirstname"],
165
+ "lastname": ["validateLastname"],
166
+ "userid": ["validateUserid"],
167
+ "email": ["validateEmail"]
168
+ }]);
169
+ PostAvatar$1.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
170
+ function defineCustomElement$1() {
171
+ if (typeof customElements === "undefined") {
172
+ return;
173
+ }
174
+ const components = ["post-avatar"];
175
+ components.forEach(tagName => { switch (tagName) {
176
+ case "post-avatar":
177
+ if (!customElements.get(tagName)) {
178
+ customElements.define(tagName, PostAvatar$1);
179
+ }
180
+ break;
181
+ } });
182
+ }
183
+ defineCustomElement$1();
2
184
 
3
185
  const PostAvatar = PostAvatar$1;
4
186
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,118 @@
1
- import { P as PostBackToTop$1, d as defineCustomElement$1 } from './post-back-to-top2.js';
1
+ import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
+ import { s as slideDown, a as slideUp } from './p-BuLMaH5t.js';
3
+ import { v as version } from './p-1KLiMO0w.js';
4
+ import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
5
+ import './p-Cx0AiN2A.js';
6
+ import { d as defineCustomElement$2 } from './p-fmA57Ivd.js';
7
+
8
+ const postBackToTopCss = ":host{--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
9
+
10
+ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop extends H {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.belowFold = false;
16
+ this.handleScroll = () => {
17
+ this.belowFold = this.isBelowFold();
18
+ };
19
+ }
20
+ isBelowFold() {
21
+ return window.scrollY > window.innerHeight;
22
+ }
23
+ validateLabel() {
24
+ checkRequiredAndType(this, 'label', 'string');
25
+ }
26
+ /*Watch for changes in belowFold to show/hide the back to top button*/
27
+ watchBelowFold(newValue) {
28
+ if (newValue) {
29
+ slideDown(this.host, this.translateY);
30
+ }
31
+ else {
32
+ slideUp(this.host, this.translateY);
33
+ }
34
+ }
35
+ scrollToTop() {
36
+ window.scrollTo({
37
+ top: 0,
38
+ behavior: 'smooth',
39
+ });
40
+ }
41
+ getSecondPixelValue(parts) {
42
+ for (const part of parts) {
43
+ const pixelValues = part.match(/\b\d+px\b/g);
44
+ if (pixelValues && pixelValues.length > 1) {
45
+ return pixelValues[1];
46
+ }
47
+ }
48
+ }
49
+ animateButton() {
50
+ // Get the back-to-top button top postiion
51
+ const positionTop = window.getComputedStyle(this.host).getPropertyValue('top');
52
+ const buttonElement = this.host.shadowRoot.querySelector('button');
53
+ // Extract the elevation height from the back-to-top button elevation token
54
+ const elevation = getComputedStyle(buttonElement).getPropertyValue('--post-back-to-top-elevation');
55
+ const elevationParts = elevation.split(',');
56
+ const elevationHeight = this.getSecondPixelValue(elevationParts);
57
+ // The translateY is calculated as => -100% (btt button height) - topPosition - elevationHeight
58
+ this.translateY =
59
+ String((-1 * 100) / 100 -
60
+ parseFloat(positionTop.replace('px', '')) -
61
+ parseFloat(elevationHeight.replace('px', ''))) + 'px';
62
+ if (this.belowFold) {
63
+ slideDown(this.host, this.translateY);
64
+ }
65
+ if (!this.belowFold) {
66
+ this.host.style.transform = `translateY(${this.translateY})`;
67
+ }
68
+ }
69
+ // Set the initial state
70
+ componentWillLoad() {
71
+ this.belowFold = this.isBelowFold();
72
+ }
73
+ componentDidLoad() {
74
+ window.addEventListener('scroll', this.handleScroll, false);
75
+ this.animateButton();
76
+ this.validateLabel();
77
+ }
78
+ disconnectedCallback() {
79
+ window.removeEventListener('scroll', this.handleScroll);
80
+ }
81
+ render() {
82
+ return (h(Host, { key: '7edc6db9d849cf9ce0308a2ac5b2c2f9bc4e47a9', "data-version": version }, h("button", { key: '610e81756ce3dd927f55d48beb8cd829b66fc247', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: 'bb1f3cc462de7680361f4cfd04abb1816aebd488', "aria-hidden": "true", name: "3026" }), h("span", { key: '4fbd84d78c425140adea5833450cef60af967f5a', class: "visually-hidden" }, this.label))));
83
+ }
84
+ get host() { return this; }
85
+ static get watchers() { return {
86
+ "label": ["validateLabel"],
87
+ "belowFold": ["watchBelowFold"]
88
+ }; }
89
+ static get style() { return postBackToTopCss; }
90
+ }, [1, "post-back-to-top", {
91
+ "label": [513],
92
+ "belowFold": [32]
93
+ }, undefined, {
94
+ "label": ["validateLabel"],
95
+ "belowFold": ["watchBelowFold"]
96
+ }]);
97
+ function defineCustomElement$1() {
98
+ if (typeof customElements === "undefined") {
99
+ return;
100
+ }
101
+ const components = ["post-back-to-top", "post-icon"];
102
+ components.forEach(tagName => { switch (tagName) {
103
+ case "post-back-to-top":
104
+ if (!customElements.get(tagName)) {
105
+ customElements.define(tagName, PostBackToTop$1);
106
+ }
107
+ break;
108
+ case "post-icon":
109
+ if (!customElements.get(tagName)) {
110
+ defineCustomElement$2();
111
+ }
112
+ break;
113
+ } });
114
+ }
115
+ defineCustomElement$1();
2
116
 
3
117
  const PostBackToTop = PostBackToTop$1;
4
118
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,123 @@
1
- import { P as PostBanner$1, d as defineCustomElement$1 } from './post-banner2.js';
1
+ import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
2
+ import { v as version } from './p-1KLiMO0w.js';
3
+ import { f as fadeOut } from './p-SbIC4aZX.js';
4
+ import { c as checkRequiredAndType, e as checkEmptyOrType, d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
5
+ import './p-Cx0AiN2A.js';
6
+ import { n as nanoid } from './p-BLchVpF6.js';
7
+ import { d as defineCustomElement$2 } from './p-fmA57Ivd.js';
8
+
9
+ const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
10
+
11
+ const postBannerCss = ".banner,.alert{min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));box-sizing:border-box;box-shadow:var(--post-device-elevation-100);border-radius:var(--post-device-border-radius-2);padding:var(--post-device-spacing-padding-10) var(--post-device-spacing-padding-10);padding-inline-start:calc(var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6));font-weight:var(--post-core-font-weight-400);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);position:relative;color:var(--post-scheme-color-surface-default-fg);background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{color:CanvasText}}.banner:has(>post-icon)::before,.alert:has(>post-icon)::before{content:none}.banner>post-icon,.alert>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner::before,.alert::before{content:\"\";display:block}.banner::before,.banner>post-icon,.alert::before,.alert>post-icon{position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);left:var(--post-device-spacing-padding-10);top:var(--post-device-spacing-padding-10)}.banner.no-icon,.alert.no-icon{min-height:calc(2*var(--post-device-spacing-padding-10) + var(--post-core-dimension-24));padding-inline-start:var(--post-device-spacing-padding-10)}.banner.no-icon::before,.alert.no-icon::before{content:unset}.banner.no-icon>post-icon,.alert.no-icon>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner,.alert{filter:none !important;border:2px solid CanvasText}}.banner:not(.banner-action):not(.alert-action),.alert:not(.banner-action):not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner:not(.banner-action):not(.alert-action) a,.alert:not(.banner-action):not(.alert-action) a{font-weight:var(--post-core-font-weight-400)}.banner:not(.banner-action):not(.alert-action) hr,.alert:not(.banner-action):not(.alert-action) hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner:not(.banner-action):not(.alert-action)>*,.alert:not(.banner-action):not(.alert-action)>*{margin:0}.banner-container{border:unset;background-color:rgba(0,0,0,0)}.banner-dismissible,.alert-dismissible{pointer-events:auto;position:relative}.banner-dismissible:not(.banner-action):not(.alert-action),.alert-dismissible:not(.banner-action):not(.alert-action){padding-inline-end:calc(var(--post-device-spacing-padding-10) + var(--post-device-spacing-gap-inline-6) + var(--post-core-dimension-24))}.banner-dismissible>.btn-close,.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:var(--post-device-spacing-padding-10)}.banner-buttons,.alert-buttons{display:flex;align-items:center;justify-content:flex-start;flex-direction:row-reverse;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media (max-width: 779.98px){.banner-buttons,.alert-buttons{flex-direction:column}}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:var(--post-core-dimension-4)}.banner-action>.banner-content a,.banner-action>.alert-content a,.alert-action>.banner-content a,.alert-action>.alert-content a{font-weight:var(--post-core-font-weight-400)}.banner-action>.banner-content hr,.banner-action>.alert-content hr,.alert-action>.banner-content hr,.alert-action>.alert-content hr{margin-block:var(--post-core-dimension-8) var(--post-core-dimension-12) !important}.banner-action>.banner-content>*,.banner-action>.alert-content>*,.alert-action>.banner-content>*,.alert-action>.alert-content>*{margin:0}@media (max-width: 779.98px){.banner-action,.alert-action{flex-direction:column;align-items:stretch}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{padding-inline-start:var(--post-device-spacing-gap-inline-6)var(--post-device-sizing-notification-icon-2);padding-inline-end:var(--post-device-spacing-gap-inline-6)var(--post-core-dimension-24)}.banner-action.no-icon>.banner-content,.banner-action.no-icon>.alert-content,.alert-action.no-icon>.banner-content,.alert-action.no-icon>.alert-content{padding-inline-start:0}.banner-action>.banner-buttons,.banner-action>.alert-buttons,.alert-action>.banner-buttons,.alert-action>.alert-buttons{display:flex}.banner-action>.banner-buttons>.btn,.banner-action>.banner-buttons>::slotted(.btn),.banner-action>.alert-buttons>.btn,.banner-action>.alert-buttons>::slotted(.btn),.alert-action>.banner-buttons>.btn,.alert-action>.banner-buttons>::slotted(.btn),.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.banner-action>.banner-buttons>.btn:first-child,.banner-action>.banner-buttons>::slotted(.btn:first-child),.banner-action>.alert-buttons>.btn:first-child,.banner-action>.alert-buttons>::slotted(.btn:first-child),.alert-action>.banner-buttons>.btn:first-child,.alert-action>.banner-buttons>::slotted(.btn:first-child),.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.banner-neutral,.alert-neutral{background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{color:CanvasText}}.banner-neutral:has(>post-icon)::before,.alert-neutral:has(>post-icon)::before{content:none}.banner-neutral>post-icon,.alert-neutral>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner-success,.alert-success{background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-success-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{color:CanvasText}}.banner-success:has(>post-icon)::before,.alert-success:has(>post-icon)::before{content:none}.banner-success>post-icon,.alert-success>post-icon{background-color:var(--post-scheme-color-interactive-notification-success-bg);color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-warning,.alert-warning{background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-warning-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{color:CanvasText}}.banner-warning:has(>post-icon)::before,.alert-warning:has(>post-icon)::before{content:none}.banner-warning>post-icon,.alert-warning>post-icon{background-color:var(--post-scheme-color-interactive-notification-warning-bg);color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-error,.alert-error{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{color:CanvasText}}.banner-error:has(>post-icon)::before,.alert-error:has(>post-icon)::before{content:none}.banner-error>post-icon,.alert-error>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-info,.alert-info{background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-info-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{color:CanvasText}}.banner-info:has(>post-icon)::before,.alert-info:has(>post-icon)::before{content:none}.banner-info>post-icon,.alert-info>post-icon{background-color:var(--post-scheme-color-interactive-notification-info-bg);color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-danger,.alert-danger{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{color:CanvasText}}.banner-danger:has(>post-icon)::before,.alert-danger:has(>post-icon)::before{content:none}.banner-danger>post-icon,.alert-danger>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.btn-close{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{background-color:ButtonFace !important}.btn-close:hover{background-color:Highlight !important}}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:#999}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}";
12
+
13
+ const PostBanner$1 = /*@__PURE__*/ proxyCustomElement(class PostBanner extends H {
14
+ constructor() {
15
+ super();
16
+ this.__registerHost();
17
+ this.__attachShadow();
18
+ this.postDismissed = createEvent(this, "postDismissed");
19
+ this.bannerId = `p${nanoid(6)}`;
20
+ this.onDismissButtonClick = () => this.dismiss();
21
+ /**
22
+ * If `true`, a close button (×) is displayed and the banner can be dismissed by the user.
23
+ */
24
+ this.dismissible = false;
25
+ /**
26
+ * The type of the banner.
27
+ */
28
+ this.type = 'neutral';
29
+ }
30
+ checkDismissible() {
31
+ if (this.dismissible) {
32
+ setTimeout(() => {
33
+ checkRequiredAndType(this, 'dismissLabel', 'string');
34
+ });
35
+ }
36
+ }
37
+ validateIcon() {
38
+ checkEmptyOrType(this, 'icon', 'string');
39
+ }
40
+ validateType() {
41
+ checkEmptyOrOneOf(this, 'type', BANNER_TYPES);
42
+ }
43
+ componentDidLoad() {
44
+ this.checkDismissible();
45
+ this.validateIcon();
46
+ this.validateType();
47
+ }
48
+ componentWillRender() {
49
+ this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
50
+ this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
51
+ this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
52
+ if (this.dismissible)
53
+ this.classes += ' banner-dismissible';
54
+ if (this.hasActions)
55
+ this.classes += ' banner-action';
56
+ if (this.icon === 'none')
57
+ this.classes += ' no-icon';
58
+ }
59
+ /**
60
+ * Triggers banner dismissal programmatically (same as clicking on the close button (×)).
61
+ */
62
+ async dismiss() {
63
+ const dismissal = fadeOut(this.host);
64
+ await dismissal.finished;
65
+ this.host.remove();
66
+ this.postDismissed.emit();
67
+ }
68
+ render() {
69
+ const defaultBannerContent = [
70
+ this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '6bf8a3c8152cda870f7d3036c837918f83dee8e1', name: "heading" }))),
71
+ h("slot", { key: `${this.bannerId}-message` }),
72
+ ];
73
+ const actionBannerContent = [
74
+ h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
75
+ h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '07a3ade9a798eeb292e28820483a4e5096fe3569', name: "actions" })),
76
+ ];
77
+ return (h(Host, { key: '9b6c1935e20686e69005a0034ca711363b880647', "data-version": version }, h("div", { key: '9a4effd086d7279cbd91bea6b5510bc66349fdc5', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '7e822d65eaf6eb9aa356aed8cc95c0107ee1ae27', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'f1c7356412ddb9d046f985fde25703715a20755d', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
78
+ }
79
+ get host() { return this; }
80
+ static get watchers() { return {
81
+ "dismissible": ["checkDismissible"],
82
+ "icon": ["validateIcon"],
83
+ "type": ["validateType"]
84
+ }; }
85
+ static get style() { return postBannerCss; }
86
+ }, [1, "post-banner", {
87
+ "dismissible": [4],
88
+ "dismissLabel": [1, "dismiss-label"],
89
+ "icon": [1],
90
+ "type": [1],
91
+ "bannerId": [32],
92
+ "classes": [32],
93
+ "hasActions": [32],
94
+ "hasHeading": [32],
95
+ "onDismissButtonClick": [32],
96
+ "dismiss": [64]
97
+ }, undefined, {
98
+ "dismissible": ["checkDismissible"],
99
+ "icon": ["validateIcon"],
100
+ "type": ["validateType"]
101
+ }]);
102
+ function defineCustomElement$1() {
103
+ if (typeof customElements === "undefined") {
104
+ return;
105
+ }
106
+ const components = ["post-banner", "post-icon"];
107
+ components.forEach(tagName => { switch (tagName) {
108
+ case "post-banner":
109
+ if (!customElements.get(tagName)) {
110
+ customElements.define(tagName, PostBanner$1);
111
+ }
112
+ break;
113
+ case "post-icon":
114
+ if (!customElements.get(tagName)) {
115
+ defineCustomElement$2();
116
+ }
117
+ break;
118
+ } });
119
+ }
120
+ defineCustomElement$1();
2
121
 
3
122
  const PostBanner = PostBanner$1;
4
123
  const defineCustomElement = defineCustomElement$1;