@swisspost/design-system-components 9.0.0-next.0 → 9.0.0-next.10

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 (456) hide show
  1. package/dist/cjs/check-type-64af82a9.js +16 -0
  2. package/dist/cjs/check-url-3ffdd2fb.js +14 -0
  3. package/dist/cjs/debounce-1151afe3.js +12 -0
  4. package/dist/cjs/get-root-7a3498ef.js +11 -0
  5. package/dist/cjs/{index-01f30442.js → index-5d4e0aed.js} +4 -27
  6. package/dist/cjs/{index-c15bd800.js → index-f1b08cdb.js} +45 -16
  7. package/dist/cjs/index.browser-2f65f583.js +15 -0
  8. package/dist/cjs/index.cjs.js +51 -24
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/{package-ebef502e.js → package-aaec3cba.js} +1 -1
  11. package/dist/cjs/{post-accordion-677c6891.js → post-accordion-85bf5e0a.js} +13 -11
  12. package/dist/cjs/post-accordion-item-957b3464.js +64 -0
  13. package/dist/cjs/post-accordion-item.cjs.entry.js +7 -4
  14. package/dist/cjs/post-accordion.cjs.entry.js +3 -3
  15. package/dist/cjs/post-avatar-58540591.js +148 -0
  16. package/dist/cjs/post-avatar.cjs.entry.js +13 -0
  17. package/dist/cjs/post-back-to-top-db5c7d01.js +75 -0
  18. package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
  19. package/dist/cjs/post-banner-727866d5.js +91 -0
  20. package/dist/cjs/post-banner.cjs.entry.js +19 -0
  21. package/dist/cjs/post-breadcrumb-cacca682.js +111 -0
  22. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
  23. package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
  24. package/dist/cjs/post-card-control-f5d72ddc.js +272 -0
  25. package/dist/cjs/post-card-control.cjs.entry.js +3 -3
  26. package/dist/cjs/post-closebutton_15.cjs.entry.js +34 -0
  27. package/dist/cjs/{post-collapsible-trigger-4f44ca4a.js → post-collapsible-trigger-067d1f4c.js} +14 -26
  28. package/dist/cjs/post-collapsible_2.cjs.entry.js +8 -4
  29. package/dist/cjs/post-components.cjs.js +2 -2
  30. package/dist/cjs/post-footer-beeb36c8.js +84 -0
  31. package/dist/cjs/post-footer.cjs.entry.js +11 -0
  32. package/dist/cjs/post-menu-item-e0e214b9.js +69 -0
  33. package/dist/cjs/post-popover-7acbdf17.js +104 -0
  34. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  35. package/dist/cjs/{post-rating-ac9e71aa.js → post-rating-ac1b9b3c.js} +4 -4
  36. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  37. package/dist/cjs/post-tab-header-a3d28719.js +33 -0
  38. package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
  39. package/dist/cjs/{post-tab-panel-787bcd5d.js → post-tab-panel-4562e265.js} +5 -4
  40. package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
  41. package/dist/cjs/{post-tabs-1b7aad55.js → post-tabs-80f65e1d.js} +9 -7
  42. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  43. package/dist/cjs/post-tag-5741a78d.js +47 -0
  44. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  45. package/dist/cjs/{post-popovercontainer-322d3160.js → post-togglebutton-245e33f1.js} +1082 -21
  46. package/dist/cjs/{post-tooltip-d1d2cd3a.js → post-tooltip-cefce5e1.js} +46 -15
  47. package/dist/cjs/post-tooltip.cjs.entry.js +6 -4
  48. package/dist/cjs/slide-5d51abe8.js +28 -0
  49. package/dist/collection/animations/slide.js +23 -0
  50. package/dist/collection/collection-manifest.json +21 -3
  51. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  52. package/dist/collection/components/post-accordion/post-accordion.js +12 -10
  53. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  54. package/dist/collection/components/post-accordion-item/post-accordion-item.js +28 -12
  55. package/dist/collection/components/post-avatar/post-avatar.css +3 -0
  56. package/dist/collection/components/post-avatar/post-avatar.js +237 -0
  57. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
  58. package/dist/collection/components/post-back-to-top/post-back-to-top.js +107 -0
  59. package/dist/collection/components/post-banner/banner-types.js +1 -0
  60. package/dist/collection/components/post-banner/post-banner.css +3 -0
  61. package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +41 -69
  62. package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
  63. package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +161 -0
  64. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
  65. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +93 -0
  66. package/dist/collection/components/post-card-control/post-card-control.css +1 -29
  67. package/dist/collection/components/post-card-control/post-card-control.js +8 -8
  68. package/dist/collection/components/post-closebutton/post-closebutton.js +12 -0
  69. package/dist/collection/components/post-collapsible/post-collapsible.js +5 -3
  70. package/dist/collection/components/post-footer/post-footer.css +1 -0
  71. package/dist/collection/components/post-footer/post-footer.js +75 -0
  72. package/dist/collection/components/post-header/post-header.css +1 -0
  73. package/dist/collection/components/post-header/post-header.js +172 -0
  74. package/dist/collection/components/post-icon/post-icon.js +22 -30
  75. package/dist/collection/components/post-language-option/post-language-option.css +3 -0
  76. package/dist/collection/components/post-language-option/post-language-option.js +219 -0
  77. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
  78. package/dist/collection/components/post-language-switch/post-language-switch.js +163 -0
  79. package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
  80. package/dist/collection/components/post-list/post-list.css +3 -0
  81. package/dist/collection/components/post-list/post-list.js +88 -0
  82. package/dist/collection/components/post-list-item/post-list-item.css +1 -0
  83. package/dist/collection/components/post-list-item/post-list-item.js +25 -0
  84. package/dist/collection/components/post-logo/post-logo.js +2 -2
  85. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
  86. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +52 -0
  87. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
  88. package/dist/collection/components/post-megadropdown/post-megadropdown.js +158 -0
  89. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
  90. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +104 -0
  91. package/dist/collection/components/post-menu/post-menu.css +3 -0
  92. package/dist/collection/components/post-menu/post-menu.js +280 -0
  93. package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
  94. package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
  95. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +114 -0
  96. package/dist/collection/components/post-popover/post-popover.css +1 -29
  97. package/dist/collection/components/post-popover/post-popover.js +1 -1
  98. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  99. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +26 -6
  100. package/dist/collection/components/post-rating/post-rating.css +1 -29
  101. package/dist/collection/components/post-rating/post-rating.js +1 -1
  102. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -29
  103. package/dist/collection/components/post-tab-header/post-tab-header.js +3 -2
  104. package/dist/collection/components/post-tab-panel/post-tab-panel.js +3 -2
  105. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  106. package/dist/collection/components/post-tabs/post-tabs.js +6 -4
  107. package/dist/collection/components/post-tag/post-tag.css +1 -29
  108. package/dist/collection/components/post-tag/post-tag.js +2 -2
  109. package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
  110. package/dist/collection/components/post-togglebutton/post-togglebutton.js +74 -0
  111. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  112. package/dist/collection/components/post-tooltip/post-tooltip.js +51 -9
  113. package/dist/collection/index.js +20 -2
  114. package/dist/collection/utils/breakpoints.js +46 -0
  115. package/dist/collection/utils/get-focusable-children.js +27 -0
  116. package/dist/components/debounce.js +10 -0
  117. package/dist/components/get-root.js +9 -0
  118. package/dist/components/index.browser.js +13 -0
  119. package/dist/components/index.js +20 -2
  120. package/dist/components/index2.js +1 -1
  121. package/dist/components/package.js +1 -1
  122. package/dist/components/post-accordion-item2.js +34 -14
  123. package/dist/components/post-accordion2.js +11 -9
  124. package/dist/components/post-avatar.d.ts +11 -0
  125. package/dist/components/post-avatar.js +6 -0
  126. package/dist/components/post-avatar2.js +173 -0
  127. package/dist/components/post-back-to-top.d.ts +11 -0
  128. package/dist/components/post-back-to-top.js +6 -0
  129. package/dist/components/post-back-to-top2.js +100 -0
  130. package/dist/components/post-banner.d.ts +11 -0
  131. package/dist/components/post-banner.js +6 -0
  132. package/dist/components/post-banner2.js +126 -0
  133. package/dist/components/post-breadcrumb-item.d.ts +11 -0
  134. package/dist/components/post-breadcrumb-item.js +6 -0
  135. package/dist/components/post-breadcrumb-item2.js +82 -0
  136. package/dist/components/post-breadcrumb.d.ts +11 -0
  137. package/dist/components/post-breadcrumb.js +6 -0
  138. package/dist/components/post-breadcrumb2.js +168 -0
  139. package/dist/components/post-card-control2.js +3 -3
  140. package/dist/components/post-closebutton.d.ts +11 -0
  141. package/dist/components/post-closebutton.js +6 -0
  142. package/dist/components/post-closebutton2.js +34 -0
  143. package/dist/components/post-collapsible-trigger2.js +2 -17
  144. package/dist/components/post-collapsible2.js +6 -4
  145. package/dist/components/post-footer.d.ts +11 -0
  146. package/dist/components/post-footer.js +6 -0
  147. package/dist/components/post-footer2.js +124 -0
  148. package/dist/components/post-header.d.ts +11 -0
  149. package/dist/components/post-header.js +6 -0
  150. package/dist/components/post-header2.js +279 -0
  151. package/dist/components/post-icon2.js +24 -28
  152. package/dist/components/post-language-option.d.ts +11 -0
  153. package/dist/components/post-language-option.js +6 -0
  154. package/dist/components/post-language-option2.js +98 -0
  155. package/dist/components/post-language-switch.d.ts +11 -0
  156. package/dist/components/post-language-switch.js +6 -0
  157. package/dist/components/post-language-switch2.js +135 -0
  158. package/dist/components/post-list-item.d.ts +11 -0
  159. package/dist/components/post-list-item.js +6 -0
  160. package/dist/components/post-list-item2.js +35 -0
  161. package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
  162. package/dist/components/post-list.js +6 -0
  163. package/dist/components/post-list2.js +54 -0
  164. package/dist/components/post-logo2.js +2 -2
  165. package/dist/components/post-mainnavigation.d.ts +11 -0
  166. package/dist/components/post-mainnavigation.js +6 -0
  167. package/dist/components/post-mainnavigation2.js +48 -0
  168. package/dist/components/post-megadropdown-trigger.d.ts +11 -0
  169. package/dist/components/post-megadropdown-trigger.js +6 -0
  170. package/dist/components/post-megadropdown-trigger2.js +91 -0
  171. package/dist/components/post-megadropdown.d.ts +11 -0
  172. package/dist/components/post-megadropdown.js +6 -0
  173. package/dist/components/post-megadropdown2.js +100 -0
  174. package/dist/components/post-menu-item.d.ts +11 -0
  175. package/dist/components/post-menu-item.js +6 -0
  176. package/dist/components/post-menu-item2.js +27 -0
  177. package/dist/components/post-menu-trigger.d.ts +11 -0
  178. package/dist/components/post-menu-trigger.js +6 -0
  179. package/dist/components/post-menu-trigger2.js +102 -0
  180. package/dist/components/post-menu.d.ts +11 -0
  181. package/dist/components/post-menu.js +6 -0
  182. package/dist/components/post-menu2.js +204 -0
  183. package/dist/components/post-popover2.js +2 -2
  184. package/dist/components/post-popovercontainer2.js +10 -7
  185. package/dist/components/post-rating2.js +2 -2
  186. package/dist/components/post-tab-header2.js +4 -3
  187. package/dist/components/post-tab-panel2.js +3 -2
  188. package/dist/components/post-tabs2.js +7 -5
  189. package/dist/components/post-tag2.js +2 -2
  190. package/dist/components/post-togglebutton.d.ts +11 -0
  191. package/dist/components/post-togglebutton.js +6 -0
  192. package/dist/components/post-togglebutton2.js +61 -0
  193. package/dist/components/post-tooltip2.js +44 -13
  194. package/dist/components/slide.js +25 -0
  195. package/dist/docs.json +1836 -236
  196. package/dist/esm/check-type-8828dbe4.js +14 -0
  197. package/dist/esm/check-url-a974431e.js +12 -0
  198. package/dist/esm/debounce-abe98cc2.js +10 -0
  199. package/dist/esm/get-root-7af2e0d1.js +9 -0
  200. package/dist/esm/{index-0b56fc28.js → index-6bfe6554.js} +45 -16
  201. package/dist/esm/index-b49c9904.js +24 -0
  202. package/dist/esm/index.browser-51485f85.js +13 -0
  203. package/dist/esm/index.js +28 -19
  204. package/dist/esm/loader.js +3 -3
  205. package/dist/esm/package-2ee42825.js +3 -0
  206. package/dist/esm/{post-accordion-19ca8bf9.js → post-accordion-3bf30525.js} +13 -11
  207. package/dist/esm/post-accordion-item-6683fbed.js +62 -0
  208. package/dist/esm/post-accordion-item.entry.js +7 -4
  209. package/dist/esm/post-accordion.entry.js +3 -3
  210. package/dist/esm/post-avatar-3ddb4c79.js +146 -0
  211. package/dist/esm/post-avatar.entry.js +5 -0
  212. package/dist/esm/post-back-to-top-15ee2771.js +73 -0
  213. package/dist/esm/post-back-to-top.entry.js +7 -0
  214. package/dist/esm/post-banner-fc407f6e.js +89 -0
  215. package/dist/esm/post-banner.entry.js +11 -0
  216. package/dist/esm/post-breadcrumb-6252b112.js +109 -0
  217. package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
  218. package/dist/esm/post-breadcrumb.entry.js +5 -0
  219. package/dist/esm/post-card-control-cb3dfc60.js +270 -0
  220. package/dist/esm/post-card-control.entry.js +3 -3
  221. package/dist/esm/post-closebutton_15.entry.js +12 -0
  222. package/dist/esm/{post-collapsible-trigger-8f54e5b6.js → post-collapsible-trigger-b727bf7e.js} +11 -23
  223. package/dist/esm/post-collapsible_2.entry.js +8 -4
  224. package/dist/esm/post-components.js +3 -3
  225. package/dist/esm/post-footer-7a03a9bb.js +82 -0
  226. package/dist/esm/post-footer.entry.js +3 -0
  227. package/dist/esm/post-menu-item-3e168ecd.js +66 -0
  228. package/dist/esm/post-popover-bff5cffd.js +102 -0
  229. package/dist/esm/post-popover.entry.js +3 -3
  230. package/dist/esm/{post-rating-8e22d522.js → post-rating-ce595a65.js} +4 -4
  231. package/dist/esm/post-rating.entry.js +3 -3
  232. package/dist/esm/post-tab-header-c864586f.js +31 -0
  233. package/dist/esm/post-tab-header.entry.js +4 -3
  234. package/dist/esm/{post-tab-panel-b9605846.js → post-tab-panel-800425b8.js} +5 -4
  235. package/dist/esm/post-tab-panel.entry.js +4 -3
  236. package/dist/esm/{post-tabs-fb024b14.js → post-tabs-e5aa8b08.js} +9 -7
  237. package/dist/esm/post-tabs.entry.js +3 -3
  238. package/dist/esm/post-tag-fc3df50a.js +45 -0
  239. package/dist/esm/post-tag.entry.js +3 -3
  240. package/dist/esm/{post-popovercontainer-17d2b256.js → post-togglebutton-101dd3bd.js} +1069 -22
  241. package/dist/esm/{post-tooltip-02e413ba.js → post-tooltip-e8484aea.js} +46 -15
  242. package/dist/esm/post-tooltip.entry.js +6 -4
  243. package/dist/esm/slide-3422b8a3.js +25 -0
  244. package/dist/post-components/index.esm.js +1 -1
  245. package/dist/post-components/p-02bb5231.js +1 -0
  246. package/dist/post-components/p-0e216cc4.js +2 -0
  247. package/dist/post-components/p-11880d55.js +1 -0
  248. package/dist/post-components/p-1489d777.entry.js +1 -0
  249. package/dist/post-components/p-19707347.entry.js +1 -0
  250. package/dist/post-components/{p-ec1f1966.js → p-1d3acbfd.js} +1 -1
  251. package/dist/post-components/p-24476696.js +1 -0
  252. package/dist/post-components/p-25f6efab.entry.js +1 -0
  253. package/dist/post-components/p-27ad2d1f.js +1 -0
  254. package/dist/post-components/p-29626238.entry.js +1 -0
  255. package/dist/post-components/p-339488ba.entry.js +1 -0
  256. package/dist/post-components/p-3de1151e.js +1 -0
  257. package/dist/post-components/p-413d1fff.js +1 -0
  258. package/dist/post-components/p-47095b84.entry.js +1 -0
  259. package/dist/post-components/p-4a3f67ab.js +1 -0
  260. package/dist/post-components/p-515e0f96.js +1 -0
  261. package/dist/post-components/p-5467b223.js +1 -0
  262. package/dist/post-components/p-5959f2bd.js +1 -0
  263. package/dist/post-components/p-5b0703a4.entry.js +1 -0
  264. package/dist/post-components/p-618b8929.js +1 -0
  265. package/dist/post-components/p-66c8d0a2.entry.js +1 -0
  266. package/dist/post-components/p-6e6e5447.entry.js +1 -0
  267. package/dist/post-components/p-80b282a2.js +1 -0
  268. package/dist/post-components/p-86a1ad40.js +1 -0
  269. package/dist/post-components/p-97647d03.entry.js +1 -0
  270. package/dist/post-components/p-98f1d284.js +1 -0
  271. package/dist/post-components/p-9e287cb5.js +1 -0
  272. package/dist/post-components/p-a3694196.js +1 -0
  273. package/dist/post-components/p-adc79d26.entry.js +1 -0
  274. package/dist/post-components/p-b22656b1.js +1 -0
  275. package/dist/post-components/p-bcf94111.entry.js +1 -0
  276. package/dist/post-components/p-bd87a2b5.entry.js +1 -0
  277. package/dist/post-components/p-bec07e51.js +1 -0
  278. package/dist/post-components/p-bec09df9.entry.js +1 -0
  279. package/dist/post-components/p-d1d9c9a5.js +1 -0
  280. package/dist/post-components/p-d4f93f2b.js +1 -0
  281. package/dist/post-components/p-db2ac0a2.entry.js +1 -0
  282. package/dist/post-components/p-e93a4bd0.entry.js +1 -0
  283. package/dist/post-components/p-eed26f43.js +1 -0
  284. package/dist/post-components/p-f35d5d4a.entry.js +1 -0
  285. package/dist/post-components/p-fa6c79b8.entry.js +1 -0
  286. package/dist/post-components/{p-e387c0c9.js → p-faf15ec1.js} +3 -3
  287. package/dist/post-components/p-fc09ac69.js +1 -0
  288. package/dist/post-components/p-fc91cbc2.js +1 -0
  289. package/dist/post-components/p-ffcd735f.js +1 -0
  290. package/dist/post-components/post-components.esm.js +1 -1
  291. package/dist/types/animations/slide.d.ts +2 -0
  292. package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
  293. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +7 -1
  294. package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
  295. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
  296. package/dist/types/components/post-banner/banner-types.d.ts +2 -0
  297. package/dist/types/components/post-banner/post-banner.d.ts +49 -0
  298. package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
  299. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +16 -0
  300. package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
  301. package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
  302. package/dist/types/components/post-footer/post-footer.d.ts +23 -0
  303. package/dist/types/components/post-header/post-header.d.ts +33 -0
  304. package/dist/types/components/post-icon/post-icon.d.ts +3 -6
  305. package/dist/types/components/post-language-option/post-language-option.d.ts +45 -0
  306. package/dist/types/components/post-language-switch/post-language-switch.d.ts +31 -0
  307. package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
  308. package/dist/types/components/post-list/post-list.d.ts +24 -0
  309. package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
  310. package/dist/types/components/post-logo/post-logo.d.ts +1 -1
  311. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +19 -0
  312. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +36 -0
  313. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +25 -0
  314. package/dist/types/components/post-menu/post-menu.d.ts +48 -0
  315. package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
  316. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +27 -0
  317. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +4 -0
  318. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  319. package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
  320. package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -1
  321. package/dist/types/components.d.ts +574 -47
  322. package/dist/types/index.d.ts +20 -2
  323. package/dist/types/utils/breakpoints.d.ts +11 -0
  324. package/dist/types/utils/get-focusable-children.d.ts +1 -0
  325. package/dist/types/utils/get-root.d.ts +1 -1
  326. package/loaders/debounce.js +10 -0
  327. package/loaders/get-root.js +9 -0
  328. package/loaders/index.browser.js +13 -0
  329. package/loaders/index.d.ts +38 -2
  330. package/loaders/index.js +20 -2
  331. package/loaders/index2.js +1 -1
  332. package/loaders/package.js +1 -1
  333. package/loaders/post-accordion-item.js +1 -81
  334. package/loaders/post-accordion-item2.js +103 -0
  335. package/loaders/post-accordion.js +11 -9
  336. package/loaders/post-avatar.d.ts +11 -0
  337. package/loaders/post-avatar.js +176 -0
  338. package/loaders/post-back-to-top.d.ts +11 -0
  339. package/loaders/post-back-to-top.js +103 -0
  340. package/loaders/post-banner.d.ts +11 -0
  341. package/loaders/post-banner.js +129 -0
  342. package/loaders/post-breadcrumb-item.d.ts +11 -0
  343. package/loaders/post-breadcrumb-item.js +6 -0
  344. package/loaders/post-breadcrumb-item2.js +82 -0
  345. package/loaders/post-breadcrumb.d.ts +11 -0
  346. package/loaders/post-breadcrumb.js +171 -0
  347. package/loaders/post-card-control.js +3 -3
  348. package/loaders/post-closebutton.d.ts +11 -0
  349. package/loaders/post-closebutton.js +37 -0
  350. package/loaders/post-collapsible-trigger2.js +2 -17
  351. package/loaders/post-collapsible2.js +5 -3
  352. package/loaders/post-footer.d.ts +11 -0
  353. package/loaders/post-footer.js +127 -0
  354. package/loaders/post-header.d.ts +11 -0
  355. package/loaders/post-header.js +282 -0
  356. package/loaders/post-icon2.js +24 -28
  357. package/loaders/post-language-option.d.ts +11 -0
  358. package/loaders/post-language-option.js +101 -0
  359. package/loaders/post-language-switch.d.ts +11 -0
  360. package/loaders/post-language-switch.js +138 -0
  361. package/loaders/post-list-item.d.ts +11 -0
  362. package/loaders/post-list-item.js +38 -0
  363. package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
  364. package/loaders/post-list.js +57 -0
  365. package/loaders/post-logo.js +3 -3
  366. package/loaders/post-mainnavigation.d.ts +11 -0
  367. package/loaders/post-mainnavigation.js +51 -0
  368. package/loaders/post-megadropdown-trigger.d.ts +11 -0
  369. package/loaders/post-megadropdown-trigger.js +94 -0
  370. package/loaders/post-megadropdown.d.ts +11 -0
  371. package/loaders/post-megadropdown.js +103 -0
  372. package/loaders/post-menu-item.d.ts +11 -0
  373. package/loaders/post-menu-item.js +6 -0
  374. package/loaders/post-menu-item2.js +27 -0
  375. package/loaders/post-menu-trigger.d.ts +11 -0
  376. package/loaders/post-menu-trigger.js +6 -0
  377. package/loaders/post-menu-trigger2.js +102 -0
  378. package/loaders/post-menu.d.ts +11 -0
  379. package/loaders/post-menu.js +6 -0
  380. package/loaders/post-menu2.js +204 -0
  381. package/loaders/post-popover.js +2 -2
  382. package/loaders/post-popovercontainer2.js +10 -7
  383. package/loaders/post-rating.js +2 -2
  384. package/loaders/post-tab-header.js +4 -3
  385. package/loaders/post-tab-panel.js +3 -2
  386. package/loaders/post-tabs.js +7 -5
  387. package/loaders/post-tag.js +2 -2
  388. package/loaders/post-togglebutton.d.ts +11 -0
  389. package/loaders/post-togglebutton.js +64 -0
  390. package/loaders/post-tooltip.js +43 -12
  391. package/loaders/slide.js +25 -0
  392. package/package.json +9 -6
  393. package/dist/cjs/post-accordion-item-8d1d6c81.js +0 -51
  394. package/dist/cjs/post-alert-ea75de0d.js +0 -98
  395. package/dist/cjs/post-alert.cjs.entry.js +0 -16
  396. package/dist/cjs/post-card-control-51ee3823.js +0 -272
  397. package/dist/cjs/post-icon-dc878de4.js +0 -104
  398. package/dist/cjs/post-icon.cjs.entry.js +0 -15
  399. package/dist/cjs/post-logo-da45aef5.js +0 -39
  400. package/dist/cjs/post-logo.cjs.entry.js +0 -14
  401. package/dist/cjs/post-popover-aac764c7.js +0 -104
  402. package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
  403. package/dist/cjs/post-tab-header-3baf22e0.js +0 -32
  404. package/dist/cjs/post-tag-e4bcdb75.js +0 -47
  405. package/dist/collection/components/post-alert/alert-types.js +0 -1
  406. package/dist/collection/components/post-alert/post-alert.css +0 -35
  407. package/dist/components/post-alert.js +0 -6
  408. package/dist/components/post-alert2.js +0 -136
  409. package/dist/esm/index-f41b763f.js +0 -46
  410. package/dist/esm/package-a8cae03d.js +0 -3
  411. package/dist/esm/post-accordion-item-3232ff67.js +0 -49
  412. package/dist/esm/post-alert-2636c0e2.js +0 -96
  413. package/dist/esm/post-alert.entry.js +0 -8
  414. package/dist/esm/post-card-control-0844cad9.js +0 -270
  415. package/dist/esm/post-icon-1a682b9e.js +0 -102
  416. package/dist/esm/post-icon.entry.js +0 -7
  417. package/dist/esm/post-logo-904c4701.js +0 -37
  418. package/dist/esm/post-logo.entry.js +0 -6
  419. package/dist/esm/post-popover-14d083d4.js +0 -102
  420. package/dist/esm/post-popovercontainer.entry.js +0 -3
  421. package/dist/esm/post-tab-header-96287c94.js +0 -30
  422. package/dist/esm/post-tag-58311692.js +0 -45
  423. package/dist/post-components/p-04e79a2c.entry.js +0 -1
  424. package/dist/post-components/p-05794f1f.entry.js +0 -1
  425. package/dist/post-components/p-079c7726.js +0 -1
  426. package/dist/post-components/p-10b043fc.js +0 -1
  427. package/dist/post-components/p-1c63cb03.js +0 -1
  428. package/dist/post-components/p-2e7cc4c6.entry.js +0 -1
  429. package/dist/post-components/p-370edca6.js +0 -1
  430. package/dist/post-components/p-3c3e8b19.js +0 -1
  431. package/dist/post-components/p-429b886d.js +0 -1
  432. package/dist/post-components/p-44564a68.js +0 -1
  433. package/dist/post-components/p-47420c6f.entry.js +0 -1
  434. package/dist/post-components/p-4973d1c7.entry.js +0 -1
  435. package/dist/post-components/p-6007889b.entry.js +0 -1
  436. package/dist/post-components/p-69bcb15f.entry.js +0 -1
  437. package/dist/post-components/p-771bd293.js +0 -1
  438. package/dist/post-components/p-8c0372c2.entry.js +0 -1
  439. package/dist/post-components/p-92ce53bc.entry.js +0 -1
  440. package/dist/post-components/p-991dff03.entry.js +0 -1
  441. package/dist/post-components/p-a0b62b51.js +0 -1
  442. package/dist/post-components/p-a2fa8c1d.entry.js +0 -1
  443. package/dist/post-components/p-ab6ce1d7.js +0 -1
  444. package/dist/post-components/p-b96307d5.entry.js +0 -1
  445. package/dist/post-components/p-d2f9de94.js +0 -2
  446. package/dist/post-components/p-de2ce222.js +0 -1
  447. package/dist/post-components/p-deb4131c.js +0 -1
  448. package/dist/post-components/p-e37ff727.entry.js +0 -1
  449. package/dist/post-components/p-eb3f324e.entry.js +0 -1
  450. package/dist/post-components/p-ee8845de.js +0 -1
  451. package/dist/post-components/p-fb1fb618.entry.js +0 -1
  452. package/dist/post-components/p-fbc24b84.js +0 -1
  453. package/dist/post-components/p-ff12fd7a.js +0 -1
  454. package/dist/types/components/post-alert/alert-types.d.ts +0 -2
  455. package/dist/types/components/post-alert/post-alert.d.ts +0 -54
  456. package/loaders/post-alert.js +0 -139
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
2
2
  import { v as version } from './package.js';
3
3
  import { d as defineCustomElement$2 } from './post-icon2.js';
4
4
 
5
- const postTagCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:100%;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
5
+ const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:var(--post-core-dimension-4);padding:0 var(--post-core-dimension-8);max-width:100%;background-color:var(--post-tag-bg);border:var(--post-core-dimension-1) solid rgba(0,0,0,0);border-radius:var(--post-core-dimension-4);font-size:1rem;line-height:calc(var(--post-core-dimension-32) - var(--post-core-dimension-1)*2);white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:var(--post-core-dimension-24)}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
6
6
  const PostTagStyle0 = postTagCss;
7
7
 
8
8
  const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLElement {
@@ -35,7 +35,7 @@ const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEle
35
35
  this.setClasses();
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: '7426002d3008de53e92edc8ec2fc759569b191bf', "data-version": version }, h("div", { key: '1cde8f5c3d2db66f45aaa64091a1b76f1d1468ee', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: 'cc63b7277ba4f4076a46f5038b24699f6818c81b', class: "tag-text" }, h("slot", { key: '37b57632add7f7c093e42302e44defef63ccc29f' })))));
38
+ return (h(Host, { key: 'cda93c397ec81e289c843eaae7694bbba6f3c297', "data-version": version }, h("div", { key: '7fa71d9c0ca5393bc188e5e09107ec931943ed66', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '8d36933c00910e9f36759d101f43b628c0fbf185', class: "tag-text" }, h("slot", { key: '49e2e9dd66cb85df4615c512d8dc0d7cad6606b8' })))));
39
39
  }
40
40
  get host() { return this; }
41
41
  static get watchers() { return {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface PostTogglebutton extends Components.PostTogglebutton, HTMLElement {}
4
+ export const PostTogglebutton: {
5
+ prototype: PostTogglebutton;
6
+ new (): PostTogglebutton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,64 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { v as version } from './package.js';
3
+ import { c as checkType } from './check-type.js';
4
+
5
+ const postTogglebuttonCss = ":host{cursor:pointer;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(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}";
6
+ const PostTogglebuttonStyle0 = postTogglebuttonCss;
7
+
8
+ const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
9
+ constructor() {
10
+ super();
11
+ this.__registerHost();
12
+ this.__attachShadow();
13
+ this.handleClick = () => {
14
+ this.toggled = !this.toggled;
15
+ };
16
+ this.handleKeydown = (event) => {
17
+ // perform a click when enter or spaced are pressed to mimic the button behavior
18
+ if (event.key === 'Enter' || event.key === ' ') {
19
+ event.preventDefault(); // prevents the page from scrolling when space is pressed
20
+ this.host.click();
21
+ }
22
+ };
23
+ this.toggled = false;
24
+ }
25
+ validateToggled(value = this.toggled) {
26
+ checkType(value, 'boolean', 'The "toggled" property of the post-togglebutton must be a boolean.');
27
+ }
28
+ componentWillLoad() {
29
+ this.validateToggled();
30
+ // add event listener to not override listener that might be set on the host
31
+ this.host.addEventListener('click', () => this.handleClick());
32
+ this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
33
+ }
34
+ render() {
35
+ return (h(Host, { key: '461f72ebada75a99921b7a166f67f2547aa6465e', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: 'cd5f4cc4df687cceacb3ea6c125b7b62f01b2712' })));
36
+ }
37
+ get host() { return this; }
38
+ static get watchers() { return {
39
+ "toggled": ["validateToggled"]
40
+ }; }
41
+ static get style() { return PostTogglebuttonStyle0; }
42
+ }, [1, "post-togglebutton", {
43
+ "toggled": [1028]
44
+ }, undefined, {
45
+ "toggled": ["validateToggled"]
46
+ }]);
47
+ function defineCustomElement$1() {
48
+ if (typeof customElements === "undefined") {
49
+ return;
50
+ }
51
+ const components = ["post-togglebutton"];
52
+ components.forEach(tagName => { switch (tagName) {
53
+ case "post-togglebutton":
54
+ if (!customElements.get(tagName)) {
55
+ customElements.define(tagName, PostTogglebutton$1);
56
+ }
57
+ break;
58
+ } });
59
+ }
60
+
61
+ const PostTogglebutton = PostTogglebutton$1;
62
+ const defineCustomElement = defineCustomElement$1;
63
+
64
+ export { PostTogglebutton, defineCustomElement };
@@ -4,10 +4,6 @@ import { g as getAttributeObserver } from './attribute-observer.js';
4
4
  import { c as checkEmptyOrType } from './index2.js';
5
5
  import { d as defineCustomElement$2 } from './post-popovercontainer2.js';
6
6
 
7
- function timeout(delay) {
8
- return new Promise(resolve => setTimeout(resolve, delay));
9
- }
10
-
11
7
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
12
8
 
13
9
  function getDefaultExportFromCjs (x) {
@@ -4777,7 +4773,7 @@ const isFocusable = /*@__PURE__*/getDefaultExportFromCjs(focusable.exports);
4777
4773
 
4778
4774
  }(window, document));
4779
4775
 
4780
- const postTooltipCss = ":host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51}post-popovercontainer{padding:.25rem .5rem;max-width:13.5rem;min-height:1rem}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}";
4776
+ const postTooltipCss = "post-popovercontainer{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:calc(2*var(--post-core-dimension-112) - var(--post-core-dimension-8));min-height:var(--post-core-dimension-16)}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}";
4781
4777
  const PostTooltipStyle0 = postTooltipCss;
4782
4778
 
4783
4779
  const OPEN_DELAY = 650; // matches HTML title delay
@@ -4791,21 +4787,32 @@ let tooltipInstances = 0;
4791
4787
  let hideTooltipTimeout = null;
4792
4788
  const tooltipTargetAttribute = 'data-tooltip-target';
4793
4789
  const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
4790
+ let globalCurrentTarget;
4791
+ let tooltipTimeout = null;
4794
4792
  /**
4795
4793
  * Global event listener to show tooltips. This is globalized so that triggers that are rendered
4796
4794
  * async will still work without the need to set listeners on the element itself
4795
+ *
4796
+ * This handler manages both pointer and focus events to properly trigger tooltips.
4797
+ * If the event is a focus event (e.g., keyboard navigation), pointer events are ignored to avoid
4798
+ * interference with tooltip behavior.
4797
4799
  * @param e Event
4798
4800
  * @returns
4799
4801
  */
4800
4802
  const globalInterestHandler = (e) => {
4801
4803
  const targetElement = e.target.closest(tooltipTargetAttributeSelector);
4802
- if (!targetElement || !('getAttribute' in targetElement))
4804
+ globalCurrentTarget = targetElement;
4805
+ if (!targetElement || !('getAttribute' in targetElement)) {
4806
+ clearTimeout(tooltipTimeout);
4803
4807
  return;
4808
+ }
4804
4809
  const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
4805
4810
  if (!tooltipTarget || tooltipTarget === '')
4806
4811
  return;
4807
4812
  const tooltip = document.getElementById(tooltipTarget);
4808
- void (tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(targetElement));
4813
+ // Determine if the tooltip was triggered by a focus event
4814
+ const triggeredByFocus = e.type === 'focusin';
4815
+ void (tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(targetElement, triggeredByFocus));
4809
4816
  if (hideTooltipTimeout) {
4810
4817
  window.clearTimeout(hideTooltipTimeout);
4811
4818
  hideTooltipTimeout = null;
@@ -4862,6 +4869,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4862
4869
  super();
4863
4870
  this.__registerHost();
4864
4871
  this.__attachShadow();
4872
+ this.wasOpenedByFocus = false;
4865
4873
  this.placement = 'top';
4866
4874
  this.arrow = true;
4867
4875
  this.delayed = false;
@@ -4921,11 +4929,32 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4921
4929
  /**
4922
4930
  * Programmatically display the tooltip
4923
4931
  * @param target An element with [data-tooltip-target="id"] where the tooltip should be shown
4932
+ * @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
4924
4933
  */
4925
- async show(target) {
4926
- if (this.delayed)
4927
- await timeout(OPEN_DELAY);
4928
- this.popoverRef.show(target);
4934
+ async show(target, triggeredByFocus = false) {
4935
+ const showTooltip = () => {
4936
+ // If focus or pointer event is not on the button anymore, don't show the tooltip
4937
+ if (globalCurrentTarget !== target)
4938
+ return;
4939
+ // Determine if the tooltip was opened by a focus event
4940
+ this.wasOpenedByFocus = triggeredByFocus;
4941
+ // Disable pointer events if triggered by focus, otherwise enable them
4942
+ if (this.wasOpenedByFocus) {
4943
+ this.host.style.pointerEvents = 'none';
4944
+ }
4945
+ else {
4946
+ this.host.style.pointerEvents = 'auto';
4947
+ }
4948
+ this.popoverRef.show(target);
4949
+ };
4950
+ if (this.delayed) {
4951
+ tooltipTimeout = setTimeout(() => {
4952
+ showTooltip();
4953
+ }, OPEN_DELAY);
4954
+ }
4955
+ else {
4956
+ showTooltip();
4957
+ }
4929
4958
  }
4930
4959
  /**
4931
4960
  * Programmatically hide this tooltip
@@ -4952,13 +4981,15 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4952
4981
  }
4953
4982
  /**
4954
4983
  * Pointer or focus left the tooltip, initiate the hiding process
4984
+ * Re-enable pointer events when the tooltip is no longer in focus or hovered
4955
4985
  */
4956
4986
  handleInterestLost() {
4957
4987
  globalHideTooltip(this);
4988
+ this.host.style.pointerEvents = 'auto';
4958
4989
  }
4959
4990
  render() {
4960
4991
  const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
4961
- return (h(Host, { key: 'f543fa8f63cc6b65e1a86e34b1a59b4ca0bb9e47', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'e920d62462d209ff25593f7989ca16f6177b7292', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '607d7357cb201c7e6e62f9a241392bd5ef1f156e' }))));
4992
+ return (h(Host, { key: '492f3f8b1b323417304ffba6c93f277c18f5b3d8', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '1b25c36c8351f0471e9acdf1fdf3073fa59683da', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '0c1f7d6c81e214155976d1fb6151ec0f97724724' }))));
4962
4993
  }
4963
4994
  get host() { return this; }
4964
4995
  static get watchers() { return {
@@ -0,0 +1,25 @@
1
+ const easing = 'ease';
2
+ const duration = 500;
3
+ const fill = 'forwards';
4
+ const slideUp = (el, translateSize = '100%') => {
5
+ return el.animate([
6
+ { transform: `translateY(${translateSize})` }, // Starting position (no translation)
7
+ { transform: 'translateY(0)' }, // End position
8
+ ], {
9
+ duration: duration,
10
+ easing,
11
+ fill,
12
+ });
13
+ };
14
+ const slideDown = (el, translateSize = '100%') => {
15
+ return el.animate([
16
+ { transform: 'translateY(0)' }, // Starting position (no translation)
17
+ { transform: `translateY(${translateSize})` }, // End position
18
+ ], {
19
+ duration: duration,
20
+ easing,
21
+ fill,
22
+ });
23
+ };
24
+
25
+ export { slideDown as a, slideUp as s };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-components",
3
- "version": "9.0.0-next.0",
3
+ "version": "9.0.0-next.10",
4
4
  "description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.cjs.js",
@@ -26,9 +26,11 @@
26
26
  "dependencies": {
27
27
  "@floating-ui/dom": "1.6.8",
28
28
  "@oddbird/popover-polyfill": "0.3.7",
29
- "@swisspost/design-system-styles": "9.0.0-next.0",
29
+ "@swisspost/design-system-icons": "9.0.0-next.10",
30
+ "@swisspost/design-system-styles": "9.0.0-next.10",
30
31
  "ally.js": "1.4.1",
31
- "long-press-event": "2.5.0"
32
+ "long-press-event": "2.5.0",
33
+ "nanoid": "5.0.9"
32
34
  },
33
35
  "devDependencies": {
34
36
  "@percy/cli": "1.29.1",
@@ -51,6 +53,7 @@
51
53
  "rimraf": "6.0.1",
52
54
  "rollup-plugin-postcss": "4.0.2",
53
55
  "sass": "1.78.0",
56
+ "throttle-debounce": "5.0.2",
54
57
  "ts-jest": "29.2.4",
55
58
  "typescript": "5.5.4"
56
59
  },
@@ -65,13 +68,13 @@
65
68
  "scripts": {
66
69
  "dev": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
67
70
  "start": "stencil build --dev --watch --docs --docs-readme",
68
- "build": "stencil build --docs-readme",
71
+ "build": "pnpm clean && stencil build --docs-readme",
69
72
  "clean": "rimraf www dist loader loaders",
70
73
  "test": "pnpm run unit",
71
74
  "unit": "stencil test --spec",
72
75
  "unit:watch": "stencil test --spec --watchAll --silent",
73
- "e2e": "cypress run",
74
- "e2e:ci": "xvfb-run -a cypress run",
76
+ "e2e": "cypress run --browser chrome",
77
+ "e2e:ci": "xvfb-run -a cypress run --browser chrome",
75
78
  "e2e:watch": "cypress open",
76
79
  "generate": "stencil generate",
77
80
  "lint": "eslint src/**/*{.ts,.tsx}"
@@ -1,51 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-c15bd800.js');
4
- const _package = require('./package-ebef502e.js');
5
- const headingLevels = require('./heading-levels-608d432e.js');
6
- const index$1 = require('./index-01f30442.js');
7
-
8
- const postAccordionItemCss = "post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-secondary post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-error post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.bg-nightblue post-accordion-item::part(accordion-item),.bg-nightblue-bright post-accordion-item::part(accordion-item),.bg-petrol post-accordion-item::part(accordion-item),.bg-petrol-bright post-accordion-item::part(accordion-item),.bg-coral post-accordion-item::part(accordion-item),.bg-coral-bright post-accordion-item::part(accordion-item),.bg-olive post-accordion-item::part(accordion-item),.bg-olive-bright post-accordion-item::part(accordion-item),.bg-purple post-accordion-item::part(accordion-item),.bg-purple-bright post-accordion-item::part(accordion-item),.bg-aubergine post-accordion-item::part(accordion-item),.bg-aubergine-bright post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-white .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-black .accordion-item,.bg-primary .accordion-item,.bg-secondary .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-error .accordion-item,.bg-info .accordion-item,.bg-success-background .accordion-item,.bg-warning-background .accordion-item,.bg-error-background .accordion-item,.bg-nightblue .accordion-item,.bg-nightblue-bright .accordion-item,.bg-petrol .accordion-item,.bg-petrol-bright .accordion-item,.bg-coral .accordion-item,.bg-coral-bright .accordion-item,.bg-olive .accordion-item,.bg-olive-bright .accordion-item,.bg-purple .accordion-item,.bg-purple-bright .accordion-item,.bg-aubergine .accordion-item,.bg-aubergine-bright .accordion-item{--post-bg-opacity:1;background-color:rgba(var(--post-bg-rgb), var(--post-bg-opacity)) !important;color:var(--post-contrast-color) !important}post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-secondary post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-error post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.bg-nightblue post-accordion-item::part(accordion-item),.bg-nightblue-bright post-accordion-item::part(accordion-item),.bg-petrol post-accordion-item::part(accordion-item),.bg-petrol-bright post-accordion-item::part(accordion-item),.bg-coral post-accordion-item::part(accordion-item),.bg-coral-bright post-accordion-item::part(accordion-item),.bg-olive post-accordion-item::part(accordion-item),.bg-olive-bright post-accordion-item::part(accordion-item),.bg-purple post-accordion-item::part(accordion-item),.bg-purple-bright post-accordion-item::part(accordion-item),.bg-aubergine post-accordion-item::part(accordion-item),.bg-aubergine-bright post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-white .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-black .accordion-item,.bg-primary .accordion-item,.bg-secondary .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-error .accordion-item,.bg-info .accordion-item,.bg-success-background .accordion-item,.bg-warning-background .accordion-item,.bg-error-background .accordion-item,.bg-nightblue .accordion-item,.bg-nightblue-bright .accordion-item,.bg-petrol .accordion-item,.bg-petrol-bright .accordion-item,.bg-coral .accordion-item,.bg-coral-bright .accordion-item,.bg-olive .accordion-item,.bg-olive-bright .accordion-item,.bg-purple .accordion-item,.bg-purple-bright .accordion-item,.bg-aubergine .accordion-item,.bg-aubergine-bright .accordion-item{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}.accordion-item{--post-bg-rgb:244, 243, 241;border-block:2px solid #666}.bg-yellow .accordion-item{--post-bg-rgb:255, 255, 255}.bg-white .accordion-item{--post-bg-rgb:244, 243, 241}.bg-light .accordion-item{--post-bg-rgb:255, 255, 255}.bg-gray .accordion-item{--post-bg-rgb:255, 255, 255}.bg-dark .accordion-item{--post-bg-rgb:255, 255, 255}.bg-black .accordion-item{--post-bg-rgb:255, 255, 255}.bg-primary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-secondary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error .accordion-item{--post-bg-rgb:255, 255, 255}.bg-info .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-nightblue .accordion-item{--post-bg-rgb:255, 255, 255}.bg-nightblue-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-petrol .accordion-item{--post-bg-rgb:255, 255, 255}.bg-petrol-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-coral .accordion-item{--post-bg-rgb:255, 255, 255}.bg-coral-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-olive .accordion-item{--post-bg-rgb:255, 255, 255}.bg-olive-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-purple .accordion-item{--post-bg-rgb:255, 255, 255}.bg-purple-bright .accordion-item{--post-bg-rgb:255, 255, 255}.bg-aubergine .accordion-item{--post-bg-rgb:255, 255, 255}.bg-aubergine-bright .accordion-item{--post-bg-rgb:255, 255, 255}.accordion-item+.accordion-item{border-block-start:0}.accordion-header{color:#333;font-size:1rem;font-weight:700;line-height:1.5;margin:0}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;outline:none;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:3rem;text-align:start;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.accordion-button:focus-visible{outline:2px solid #1976c8}.accordion-button:hover{color:#000;background-color:#e6e6e6}.accordion-button:disabled{opacity:.4;pointer-events:none}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.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:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.5rem 1rem 1rem;font-weight:400}.accordion-button>*,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>*,.accordion-body>:last-child{margin-block-end:0 !important}:host{display:block}.accordion-button{cursor:pointer}.accordion-button>::slotted(.text-truncate){display:block}post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-yellow post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-white post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-light post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-gray post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-dark post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-black post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-primary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-secondary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-info post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-nightblue post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-nightblue-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-petrol post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-petrol-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-coral post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-coral-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-olive post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-olive-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-purple post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-purple-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-aubergine post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-aubergine-bright post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}:host(:not(:first-of-type)) .accordion-item{border-block-start:0}";
9
- const PostAccordionItemStyle0 = postAccordionItemCss;
10
-
11
- const PostAccordionItem = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.id = undefined;
15
- this.collapsed = false;
16
- this.headingLevel = 2;
17
- }
18
- validateHeadingLevel(newValue = this.headingLevel) {
19
- index$1.checkEmptyOrOneOf(newValue, headingLevels.HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
20
- }
21
- connectedCallback() {
22
- this.validateHeadingLevel();
23
- }
24
- componentWillLoad() {
25
- this.id = this.host.id || `a${crypto.randomUUID()}`;
26
- }
27
- // capture to make sure the "collapsed" property is updated before the event is consumed
28
- onCollapseToggle(event) {
29
- if (event.target.localName === 'post-accordion-item') {
30
- this.collapsed = !event.detail;
31
- }
32
- }
33
- /**
34
- * Triggers the collapse programmatically.
35
- */
36
- async toggle(force) {
37
- return this.collapsible.toggle(force);
38
- }
39
- render() {
40
- var _a;
41
- const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
42
- return (index.h(index.Host, { key: 'd021bf895019606800fa6cf3a85a2ea0a2fea7e4', id: this.id, "data-version": _package.version }, index.h("div", { key: '8a78f2511889eb90d2cbdccf00f76802e043a1e7', part: "accordion-item", class: "accordion-item" }, index.h("post-collapsible-trigger", { key: 'c4c09df6d5bb1b3883ad696a362b222cfcf1c9bb', for: `${this.id}--collapse` }, index.h(HeadingTag, { key: 'fbc49fcc1e4096193e1fd945b728b8c0caf6001d', class: "accordion-header", id: `${this.id}--header` }, index.h("button", { key: '2a55471aa04c5e676647a2e5c8cb2d587b74aed4', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}` }, index.h("slot", { key: '83b5811e74fb31f2fafd66e5aedc2f260d75e3e0', name: "header" })))), index.h("post-collapsible", { key: '8d0695dd8944bb77df60c43116be01ec2608dbb4', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, index.h("div", { key: '17c75ea9cf1e9adb95d176c65ab23322c994d388', class: "accordion-body" }, index.h("slot", { key: '21dc6d44c6bb009058e0e1e5dbcd4bfc2a9463ee' }))))));
43
- }
44
- get host() { return index.getElement(this); }
45
- static get watchers() { return {
46
- "headingLevel": ["validateHeadingLevel"]
47
- }; }
48
- };
49
- PostAccordionItem.style = PostAccordionItemStyle0;
50
-
51
- exports.PostAccordionItem = PostAccordionItem;
@@ -1,98 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-c15bd800.js');
4
- const _package = require('./package-ebef502e.js');
5
- const fade = require('./fade-35a3633a.js');
6
- const index$1 = require('./index-01f30442.js');
7
- const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
8
-
9
- const ALERT_TYPES = ['primary', 'success', 'warning', 'danger', 'info', 'gray'];
10
-
11
- const postAlertCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.alert-primary,.alert-success,.alert-warning,.alert-danger,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-focus-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:400}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;border:2px solid CanvasText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action.no-icon>.alert-content{padding-inline-start:0}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1440px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1439px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1439px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1439px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1439px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1439px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1439px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1439px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 135, 29}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-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\");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}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c871d}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-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\");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}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-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\");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}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-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\");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}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-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\");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}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-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\");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}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-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: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{-webkit-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\");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:1.5rem;width:1.5rem}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";
12
- const PostAlertStyle0 = postAlertCss;
13
-
14
- const PostAlert = class {
15
- constructor(hostRef) {
16
- index.registerInstance(this, hostRef);
17
- this.postDismissed = index.createEvent(this, "postDismissed", 7);
18
- this.alertId = crypto.randomUUID();
19
- this.classes = undefined;
20
- this.hasActions = undefined;
21
- this.hasHeading = undefined;
22
- this.onDismissButtonClick = () => this.dismiss();
23
- this.dismissible = false;
24
- this.dismissLabel = undefined;
25
- this.fixed = false;
26
- this.icon = undefined;
27
- this.type = 'primary';
28
- }
29
- validateDismissible(isDismissible = this.dismissible) {
30
- index$1.checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
31
- setTimeout(() => this.validateDismissLabel());
32
- }
33
- validateDismissLabel(dismissLabel = this.dismissLabel) {
34
- if (this.dismissible) {
35
- checkNonEmpty.checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
36
- }
37
- }
38
- validateFixed(isFixed = this.fixed) {
39
- index$1.checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
40
- }
41
- validateIcon(icon = this.icon) {
42
- index$1.checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
43
- }
44
- validateType(type = this.type) {
45
- index$1.checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
46
- }
47
- connectedCallback() {
48
- this.validateDismissible();
49
- this.validateFixed();
50
- this.validateIcon();
51
- this.validateType();
52
- }
53
- componentWillRender() {
54
- var _a;
55
- this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
56
- this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
57
- this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
58
- if (this.dismissible)
59
- this.classes += ' alert-dismissible';
60
- if (this.hasActions)
61
- this.classes += ' alert-action';
62
- if (this.fixed)
63
- this.classes += ' alert-fixed-bottom';
64
- if (this.icon === 'none')
65
- this.classes += ' no-icon';
66
- }
67
- /**
68
- * Triggers alert dismissal programmatically (same as clicking on the close button (×)).
69
- */
70
- async dismiss() {
71
- const dismissal = fade.fadeOut(this.host);
72
- await dismissal.finished;
73
- this.host.remove();
74
- this.postDismissed.emit();
75
- }
76
- render() {
77
- const defaultAlertContent = [
78
- this.hasHeading && (index.h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, index.h("slot", { key: '928eeaedc9a897394ef064a218b43a780dc10f0d', name: "heading" }))),
79
- index.h("slot", { key: `${this.alertId}-message` }),
80
- ];
81
- const actionAlertContent = [
82
- index.h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
83
- index.h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, index.h("slot", { key: '67bcd576fb17374be6e0f9b3633a19aaff884b6a', name: "actions" })),
84
- ];
85
- return (index.h(index.Host, { key: 'df4452a660ba217ad57d5ad69ee224a686f5537e', "data-version": _package.version }, index.h("div", { key: 'f1d346826fee4629356c9e722ac619d9c7a34c17', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (index.h("button", { key: '0deb48cddffd2288dd4e2999f291179ca6cdc6b5', class: "btn-close", onClick: this.onDismissButtonClick }, index.h("span", { key: 'd252736e70ee4213d7c36e622181b640a8b3c4cb', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (index.h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions ? actionAlertContent : defaultAlertContent)));
86
- }
87
- get host() { return index.getElement(this); }
88
- static get watchers() { return {
89
- "dismissible": ["validateDismissible"],
90
- "dismissLabel": ["validateDismissLabel"],
91
- "fixed": ["validateFixed"],
92
- "icon": ["validateIcon"],
93
- "type": ["validateType"]
94
- }; }
95
- };
96
- PostAlert.style = PostAlertStyle0;
97
-
98
- exports.PostAlert = PostAlert;
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const postAlert = require('./post-alert-ea75de0d.js');
6
- require('./index-c15bd800.js');
7
- require('./package-ebef502e.js');
8
- require('./fade-35a3633a.js');
9
- require('./index-01f30442.js');
10
- require('./constants-238701d3.js');
11
- require('./check-one-of-f4f5d0c0.js');
12
- require('./check-non-empty-eeaa8f77.js');
13
-
14
-
15
-
16
- exports.post_alert = postAlert.PostAlert;