@swisspost/design-system-components 9.0.0-next.3 → 9.0.0-next.30

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 (539) hide show
  1. package/dist/.config/bindings.angular.js +4 -0
  2. package/dist/cjs/{attribute-observer-10f08c04.js → attribute-observer-6d8b886b.js} +4 -4
  3. package/dist/cjs/breakpoints-c6247c71.js +54 -0
  4. package/dist/cjs/check-non-empty-bd99d236.js +15 -0
  5. package/dist/cjs/check-one-of-75d270b5.js +13 -0
  6. package/dist/cjs/check-type-cdbf6d29.js +21 -0
  7. package/dist/cjs/check-url-220a286c.js +19 -0
  8. package/dist/cjs/debounce-158fd76f.js +13 -0
  9. package/dist/cjs/fade-72d5ef55.js +14 -0
  10. package/dist/cjs/get-root-7a3498ef.js +11 -0
  11. package/dist/cjs/index-23e36ff7.js +37 -0
  12. package/dist/cjs/{index-e1f32cce.js → index-d6bf2c66.js} +30 -18
  13. package/dist/cjs/index.browser-2f65f583.js +15 -0
  14. package/dist/cjs/index.cjs.js +56 -30
  15. package/dist/cjs/loader.cjs.js +2 -2
  16. package/dist/cjs/{package-ef26e62c.js → package-c3dbd35b.js} +1 -1
  17. package/dist/cjs/{post-accordion-3878bf43.js → post-accordion-2108bc31.js} +9 -8
  18. package/dist/cjs/post-accordion-item-64051590.js +64 -0
  19. package/dist/cjs/post-accordion-item.cjs.entry.js +8 -5
  20. package/dist/cjs/post-accordion.cjs.entry.js +4 -4
  21. package/dist/cjs/{post-avatar-2bcfc016.js → post-avatar-2db58753.js} +10 -14
  22. package/dist/cjs/post-avatar.cjs.entry.js +4 -4
  23. package/dist/cjs/post-back-to-top-e64d70c8.js +76 -0
  24. package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
  25. package/dist/cjs/post-banner-caa5e06d.js +96 -0
  26. package/dist/cjs/post-banner.cjs.entry.js +19 -0
  27. package/dist/cjs/post-breadcrumb-acb6890e.js +112 -0
  28. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
  29. package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
  30. package/dist/cjs/post-card-control-e2421427.js +283 -0
  31. package/dist/cjs/post-card-control.cjs.entry.js +5 -5
  32. package/dist/cjs/post-closebutton_15.cjs.entry.js +35 -0
  33. package/dist/cjs/{post-collapsible-trigger-6ae59c64.js → post-collapsible-trigger-13b87403.js} +50 -56
  34. package/dist/cjs/post-collapsible_2.cjs.entry.js +10 -6
  35. package/dist/cjs/post-components.cjs.js +2 -2
  36. package/dist/cjs/post-footer-057ce0a8.js +38 -0
  37. package/dist/cjs/post-footer.cjs.entry.js +12 -0
  38. package/dist/cjs/post-linkarea-e2b39f1a.js +30 -0
  39. package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
  40. package/dist/cjs/post-menu-item-3f6c1fcb.js +68 -0
  41. package/dist/cjs/post-popover-dccede57.js +106 -0
  42. package/dist/cjs/post-popover.cjs.entry.js +4 -4
  43. package/dist/cjs/{post-rating-1d2c59b7.js → post-rating-bec67143.js} +16 -6
  44. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  45. package/dist/cjs/post-tab-header-d32947dc.js +33 -0
  46. package/dist/cjs/post-tab-header.cjs.entry.js +5 -4
  47. package/dist/cjs/{post-tab-panel-80b1f3ee.js → post-tab-panel-07d462ac.js} +6 -5
  48. package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
  49. package/dist/cjs/{post-tabs-c2d42035.js → post-tabs-e5e71053.js} +23 -16
  50. package/dist/cjs/post-tabs.cjs.entry.js +4 -4
  51. package/dist/cjs/post-tag-380a1bf0.js +47 -0
  52. package/dist/cjs/post-tag.cjs.entry.js +3 -3
  53. package/dist/cjs/post-togglebutton-553316f3.js +3965 -0
  54. package/dist/cjs/{post-tooltip-9a120b2e.js → post-tooltip-40812a6b.js} +38 -25
  55. package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
  56. package/dist/cjs/slide-cd1f09b3.js +28 -0
  57. package/dist/collection/animations/collapse.js +5 -5
  58. package/dist/collection/animations/fade.js +6 -2
  59. package/dist/collection/animations/slide.js +23 -0
  60. package/dist/collection/collection-manifest.json +20 -3
  61. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  62. package/dist/collection/components/post-accordion/post-accordion.js +5 -3
  63. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  64. package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -9
  65. package/dist/collection/components/post-avatar/post-avatar.js +8 -11
  66. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
  67. package/dist/collection/components/post-back-to-top/post-back-to-top.js +109 -0
  68. package/dist/collection/components/post-banner/banner-types.js +1 -0
  69. package/dist/collection/components/post-banner/post-banner.css +3 -0
  70. package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +50 -72
  71. package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
  72. package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +163 -0
  73. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
  74. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +98 -0
  75. package/dist/collection/components/post-card-control/post-card-control.css +1 -1
  76. package/dist/collection/components/post-card-control/post-card-control.js +55 -43
  77. package/dist/collection/components/post-closebutton/post-closebutton.js +13 -0
  78. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  79. package/dist/collection/components/post-collapsible/post-collapsible.js +15 -6
  80. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -20
  81. package/dist/collection/components/post-footer/post-footer.css +1 -0
  82. package/dist/collection/components/post-footer/post-footer.js +76 -0
  83. package/dist/collection/components/post-header/post-header.css +1 -0
  84. package/dist/collection/components/post-header/post-header.js +323 -0
  85. package/dist/collection/components/post-icon/post-icon.js +79 -46
  86. package/dist/collection/components/post-language-option/post-language-option.css +1 -1
  87. package/dist/collection/components/post-language-option/post-language-option.js +65 -10
  88. package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
  89. package/dist/collection/components/post-language-switch/post-language-switch.js +192 -0
  90. package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
  91. package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
  92. package/dist/collection/components/post-linkarea/post-linkarea.js +30 -0
  93. package/dist/collection/components/post-list/post-list.css +3 -0
  94. package/dist/collection/components/post-list/post-list.js +90 -0
  95. package/dist/collection/components/post-list-item/post-list-item.css +1 -0
  96. package/dist/collection/components/post-list-item/post-list-item.js +26 -0
  97. package/dist/collection/components/post-logo/post-logo.css +1 -1
  98. package/dist/collection/components/post-logo/post-logo.js +3 -2
  99. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
  100. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +267 -0
  101. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
  102. package/dist/collection/components/post-megadropdown/post-megadropdown.js +284 -0
  103. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
  104. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +127 -0
  105. package/dist/collection/components/post-menu/post-menu.css +3 -0
  106. package/dist/collection/components/post-menu/post-menu.js +297 -0
  107. package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
  108. package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
  109. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +122 -0
  110. package/dist/collection/components/post-popover/post-popover.css +1 -1
  111. package/dist/collection/components/post-popover/post-popover.js +6 -3
  112. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  113. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +203 -39
  114. package/dist/collection/components/post-rating/post-rating.css +1 -1
  115. package/dist/collection/components/post-rating/post-rating.js +13 -2
  116. package/dist/collection/components/post-tab-header/post-tab-header.css +2 -2
  117. package/dist/collection/components/post-tab-header/post-tab-header.js +6 -4
  118. package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
  119. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  120. package/dist/collection/components/post-tabs/post-tabs.js +17 -14
  121. package/dist/collection/components/post-tag/post-tag.css +1 -1
  122. package/dist/collection/components/post-tag/post-tag.js +3 -2
  123. package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
  124. package/dist/collection/components/post-togglebutton/post-togglebutton.js +75 -0
  125. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  126. package/dist/collection/components/post-tooltip/post-tooltip.js +35 -17
  127. package/dist/collection/index.js +19 -2
  128. package/dist/collection/utils/attribute-observer.js +4 -4
  129. package/dist/collection/utils/breakpoints.js +50 -0
  130. package/dist/collection/utils/component-on-ready.js +4 -4
  131. package/dist/collection/utils/debounce.js +2 -1
  132. package/dist/collection/utils/get-focusable-children.js +33 -0
  133. package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
  134. package/dist/collection/utils/property-checkers/check-one-of.js +8 -3
  135. package/dist/collection/utils/property-checkers/check-pattern.js +8 -3
  136. package/dist/collection/utils/property-checkers/check-type.js +11 -6
  137. package/dist/collection/utils/property-checkers/check-url.js +11 -6
  138. package/dist/collection/utils/property-checkers/empty-or.js +5 -2
  139. package/dist/collection/utils/sass-export.js +8 -5
  140. package/dist/components/attribute-observer.js +4 -4
  141. package/dist/components/breakpoints.js +52 -0
  142. package/dist/components/check-non-empty.js +6 -2
  143. package/dist/components/check-one-of.js +8 -3
  144. package/dist/components/check-type.js +11 -6
  145. package/dist/components/debounce.js +11 -0
  146. package/dist/components/fade.js +6 -2
  147. package/dist/components/get-focusable-children.js +35 -0
  148. package/dist/components/get-root.js +9 -0
  149. package/dist/components/index.browser.js +13 -0
  150. package/dist/components/index.js +19 -2
  151. package/dist/components/index2.js +25 -12
  152. package/dist/components/package.js +1 -1
  153. package/dist/components/post-accordion-item2.js +33 -14
  154. package/dist/components/post-accordion2.js +6 -5
  155. package/dist/components/post-avatar2.js +7 -11
  156. package/dist/components/post-back-to-top.d.ts +11 -0
  157. package/dist/components/post-back-to-top.js +6 -0
  158. package/dist/components/post-back-to-top2.js +101 -0
  159. package/dist/components/post-banner.d.ts +11 -0
  160. package/dist/components/post-banner.js +6 -0
  161. package/dist/components/post-banner2.js +131 -0
  162. package/dist/components/post-breadcrumb-item.d.ts +11 -0
  163. package/dist/components/post-breadcrumb-item.js +6 -0
  164. package/dist/components/post-breadcrumb-item2.js +82 -0
  165. package/dist/components/post-breadcrumb.d.ts +11 -0
  166. package/dist/components/post-breadcrumb.js +6 -0
  167. package/dist/components/post-breadcrumb2.js +169 -0
  168. package/dist/components/post-card-control2.js +50 -39
  169. package/dist/components/post-closebutton.d.ts +11 -0
  170. package/dist/components/post-closebutton.js +6 -0
  171. package/dist/components/post-closebutton2.js +34 -0
  172. package/dist/components/post-collapsible-trigger2.js +23 -38
  173. package/dist/components/post-collapsible2.js +22 -14
  174. package/dist/components/post-footer.d.ts +11 -0
  175. package/dist/components/post-footer.js +6 -0
  176. package/dist/components/post-footer2.js +78 -0
  177. package/dist/components/post-header.d.ts +11 -0
  178. package/dist/components/post-header.js +6 -0
  179. package/dist/components/post-header2.js +401 -0
  180. package/dist/components/post-icon2.js +81 -45
  181. package/dist/components/post-language-option2.js +32 -14
  182. package/dist/components/post-language-switch.d.ts +11 -0
  183. package/dist/components/post-language-switch.js +6 -0
  184. package/dist/components/post-language-switch2.js +148 -0
  185. package/dist/components/post-linkarea.d.ts +11 -0
  186. package/dist/components/post-linkarea.js +6 -0
  187. package/dist/components/post-linkarea2.js +42 -0
  188. package/dist/components/post-list-item.d.ts +11 -0
  189. package/dist/components/post-list-item.js +6 -0
  190. package/dist/components/post-list-item2.js +35 -0
  191. package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
  192. package/dist/components/post-list.js +6 -0
  193. package/dist/components/post-list2.js +55 -0
  194. package/dist/components/post-logo2.js +4 -4
  195. package/dist/components/post-mainnavigation.d.ts +11 -0
  196. package/dist/components/post-mainnavigation.js +6 -0
  197. package/dist/components/post-mainnavigation2.js +270 -0
  198. package/dist/components/post-megadropdown-trigger.d.ts +11 -0
  199. package/dist/components/post-megadropdown-trigger.js +6 -0
  200. package/dist/components/post-megadropdown-trigger2.js +113 -0
  201. package/dist/components/post-megadropdown.d.ts +11 -0
  202. package/dist/components/post-megadropdown.js +6 -0
  203. package/dist/components/post-megadropdown2.js +198 -0
  204. package/dist/components/post-menu-item.d.ts +11 -0
  205. package/dist/components/post-menu-item.js +6 -0
  206. package/dist/components/post-menu-item2.js +27 -0
  207. package/dist/components/post-menu-trigger.d.ts +11 -0
  208. package/dist/components/post-menu-trigger.js +6 -0
  209. package/dist/components/post-menu-trigger2.js +109 -0
  210. package/dist/components/post-menu.d.ts +11 -0
  211. package/dist/components/post-menu.js +6 -0
  212. package/dist/components/post-menu2.js +193 -0
  213. package/dist/components/post-popover2.js +6 -4
  214. package/dist/components/post-popovercontainer2.js +249 -72
  215. package/dist/components/post-rating2.js +14 -4
  216. package/dist/components/post-tab-header2.js +7 -6
  217. package/dist/components/post-tab-panel2.js +4 -3
  218. package/dist/components/post-tabs2.js +20 -13
  219. package/dist/components/post-tag2.js +3 -3
  220. package/dist/components/post-togglebutton.d.ts +11 -0
  221. package/dist/components/post-togglebutton.js +6 -0
  222. package/dist/components/post-togglebutton2.js +61 -0
  223. package/dist/components/post-tooltip2.js +35 -22
  224. package/dist/components/slide.js +25 -0
  225. package/dist/docs.json +1653 -186
  226. package/dist/esm/{attribute-observer-37fa950a.js → attribute-observer-2f203993.js} +4 -4
  227. package/dist/esm/breakpoints-bbe0c54e.js +52 -0
  228. package/dist/esm/check-non-empty-258a56b3.js +13 -0
  229. package/dist/esm/check-one-of-0bee20f5.js +11 -0
  230. package/dist/esm/check-type-37d5d307.js +19 -0
  231. package/dist/esm/check-url-17962bc8.js +17 -0
  232. package/dist/esm/debounce-e54c7131.js +11 -0
  233. package/dist/esm/fade-1f3cacf4.js +11 -0
  234. package/dist/esm/get-root-7af2e0d1.js +9 -0
  235. package/dist/esm/{index-e1b64755.js → index-3419e46d.js} +30 -18
  236. package/dist/esm/index-8f8fe5b0.js +32 -0
  237. package/dist/esm/index.browser-51485f85.js +13 -0
  238. package/dist/esm/index.js +33 -24
  239. package/dist/esm/loader.js +3 -3
  240. package/dist/esm/package-da1ccbc7.js +3 -0
  241. package/dist/esm/{post-accordion-01d49d83.js → post-accordion-f5e449c0.js} +9 -8
  242. package/dist/esm/post-accordion-item-1195d94a.js +62 -0
  243. package/dist/esm/post-accordion-item.entry.js +8 -5
  244. package/dist/esm/post-accordion.entry.js +4 -4
  245. package/dist/esm/{post-avatar-6f24d1ab.js → post-avatar-9b85c11c.js} +10 -14
  246. package/dist/esm/post-avatar.entry.js +4 -4
  247. package/dist/esm/post-back-to-top-335075d4.js +74 -0
  248. package/dist/esm/post-back-to-top.entry.js +7 -0
  249. package/dist/esm/post-banner-6b939740.js +94 -0
  250. package/dist/esm/post-banner.entry.js +11 -0
  251. package/dist/esm/post-breadcrumb-5a61269c.js +110 -0
  252. package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
  253. package/dist/esm/post-breadcrumb.entry.js +5 -0
  254. package/dist/esm/post-card-control-7fe3804c.js +281 -0
  255. package/dist/esm/post-card-control.entry.js +5 -5
  256. package/dist/esm/post-closebutton_15.entry.js +13 -0
  257. package/dist/esm/{post-collapsible-trigger-654bf2b0.js → post-collapsible-trigger-e3ef47ff.js} +49 -55
  258. package/dist/esm/post-collapsible_2.entry.js +10 -6
  259. package/dist/esm/post-components.js +3 -3
  260. package/dist/esm/post-footer-e68c21a1.js +36 -0
  261. package/dist/esm/post-footer.entry.js +4 -0
  262. package/dist/esm/post-linkarea-bc607c52.js +28 -0
  263. package/dist/esm/post-linkarea.entry.js +3 -0
  264. package/dist/esm/post-menu-item-ab01683c.js +65 -0
  265. package/dist/esm/{post-popover-7d44a85c.js → post-popover-7427bb6d.js} +9 -7
  266. package/dist/esm/post-popover.entry.js +4 -4
  267. package/dist/esm/{post-rating-3cd3e97b.js → post-rating-16c9ada8.js} +16 -6
  268. package/dist/esm/post-rating.entry.js +3 -3
  269. package/dist/esm/post-tab-header-e0f39999.js +31 -0
  270. package/dist/esm/post-tab-header.entry.js +5 -4
  271. package/dist/esm/{post-tab-panel-163e6c99.js → post-tab-panel-9a8b852c.js} +6 -5
  272. package/dist/esm/post-tab-panel.entry.js +4 -3
  273. package/dist/esm/{post-tabs-8cb1bce9.js → post-tabs-34f70c88.js} +23 -16
  274. package/dist/esm/post-tabs.entry.js +4 -4
  275. package/dist/esm/post-tag-ec5578c2.js +45 -0
  276. package/dist/esm/post-tag.entry.js +3 -3
  277. package/dist/esm/post-togglebutton-5fb5e500.js +3949 -0
  278. package/dist/esm/{post-tooltip-dc7e1a21.js → post-tooltip-c201c4db.js} +38 -25
  279. package/dist/esm/post-tooltip.entry.js +8 -6
  280. package/dist/esm/slide-cd2850ee.js +25 -0
  281. package/dist/post-components/index.esm.js +1 -1
  282. package/dist/post-components/p-02f1cb03.js +1 -0
  283. package/dist/post-components/p-037755f5.js +1 -0
  284. package/dist/post-components/p-11cac89a.js +1 -0
  285. package/dist/post-components/p-181c73d5.js +1 -0
  286. package/dist/post-components/p-2995938c.entry.js +1 -0
  287. package/dist/post-components/p-2adbc7bf.js +1 -0
  288. package/dist/post-components/p-2ea2ced2.js +1 -0
  289. package/dist/post-components/p-2ff7f948.js +1 -0
  290. package/dist/post-components/p-32815e91.js +1 -0
  291. package/dist/post-components/{p-0ad93d89.js → p-33a5eac4.js} +3 -3
  292. package/dist/post-components/p-38c39936.js +1 -0
  293. package/dist/post-components/p-3a9ddb5a.entry.js +1 -0
  294. package/dist/post-components/p-3dbda892.entry.js +1 -0
  295. package/dist/post-components/p-3ea156c8.js +1 -0
  296. package/dist/post-components/p-4620784a.entry.js +1 -0
  297. package/dist/post-components/p-52231570.entry.js +1 -0
  298. package/dist/post-components/p-54ecbfaf.entry.js +1 -0
  299. package/dist/post-components/p-5959f2bd.js +1 -0
  300. package/dist/post-components/p-5aeb3656.js +1 -0
  301. package/dist/post-components/{p-3eab790d.js → p-5c758f41.js} +1 -1
  302. package/dist/post-components/p-61946a7e.js +1 -0
  303. package/dist/post-components/p-64e3de38.js +1 -0
  304. package/dist/post-components/p-66f2e7cb.js +1 -0
  305. package/dist/post-components/p-6912bf0f.entry.js +1 -0
  306. package/dist/post-components/p-691c07e3.entry.js +1 -0
  307. package/dist/post-components/p-6ed2e162.js +1 -0
  308. package/dist/post-components/p-712670a6.js +1 -0
  309. package/dist/post-components/p-7709c14a.js +1 -0
  310. package/dist/post-components/p-7f695ad8.js +1 -0
  311. package/dist/post-components/p-804c1f5f.entry.js +1 -0
  312. package/dist/post-components/p-85fdc2d3.js +1 -0
  313. package/dist/post-components/p-8779d765.entry.js +1 -0
  314. package/dist/post-components/p-8d625b78.entry.js +1 -0
  315. package/dist/post-components/p-9748a355.js +1 -0
  316. package/dist/post-components/p-9b052461.js +1 -0
  317. package/dist/post-components/p-a205b34d.entry.js +1 -0
  318. package/dist/post-components/p-b21729d2.entry.js +1 -0
  319. package/dist/post-components/p-b240727d.js +1 -0
  320. package/dist/post-components/p-b5318286.js +1 -0
  321. package/dist/post-components/p-be16b84d.entry.js +1 -0
  322. package/dist/post-components/p-c222539e.js +1 -0
  323. package/dist/post-components/p-c8afafa1.js +1 -0
  324. package/dist/post-components/p-d295b769.entry.js +1 -0
  325. package/dist/post-components/p-d45df336.js +1 -0
  326. package/dist/post-components/p-d58f5eaf.js +1 -0
  327. package/dist/post-components/p-e1baac59.js +1 -0
  328. package/dist/post-components/p-e585c6fe.js +1 -0
  329. package/dist/post-components/p-e644a698.entry.js +1 -0
  330. package/dist/post-components/p-e689bfbb.entry.js +1 -0
  331. package/dist/post-components/p-f17be52c.entry.js +1 -0
  332. package/dist/post-components/p-f4850dea.entry.js +1 -0
  333. package/dist/post-components/p-fc91cbc2.js +1 -0
  334. package/dist/post-components/post-components.esm.js +1 -1
  335. package/dist/types/animations/collapse.d.ts +2 -2
  336. package/dist/types/animations/fade.d.ts +2 -2
  337. package/dist/types/animations/slide.d.ts +2 -0
  338. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +8 -2
  339. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  340. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
  341. package/dist/types/components/post-banner/banner-types.d.ts +2 -0
  342. package/dist/types/components/post-banner/post-banner.d.ts +49 -0
  343. package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
  344. package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +20 -0
  345. package/dist/types/components/post-card-control/post-card-control.d.ts +9 -9
  346. package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
  347. package/dist/types/components/post-footer/post-footer.d.ts +23 -0
  348. package/dist/types/components/post-header/post-header.d.ts +51 -0
  349. package/dist/types/components/post-icon/post-icon.d.ts +13 -11
  350. package/dist/types/components/post-language-option/post-language-option.d.ts +13 -4
  351. package/dist/types/components/post-language-switch/post-language-switch.d.ts +39 -0
  352. package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
  353. package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
  354. package/dist/types/components/post-list/post-list.d.ts +24 -0
  355. package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
  356. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +71 -0
  357. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +59 -0
  358. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +31 -0
  359. package/dist/types/components/post-menu/post-menu.d.ts +48 -0
  360. package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
  361. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +28 -0
  362. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +27 -1
  363. package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
  364. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  365. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  366. package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
  367. package/dist/types/components.d.ts +532 -76
  368. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
  369. package/dist/types/index.d.ts +20 -3
  370. package/dist/types/utils/attribute-observer.d.ts +1 -1
  371. package/dist/types/utils/breakpoints.d.ts +12 -0
  372. package/dist/types/utils/component-on-ready.d.ts +1 -1
  373. package/dist/types/utils/get-focusable-children.d.ts +1 -0
  374. package/dist/types/utils/get-root.d.ts +1 -1
  375. package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
  376. package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
  377. package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
  378. package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
  379. package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
  380. package/dist/types/utils/property-checkers/index.d.ts +12 -4
  381. package/dist/types/utils/sass-export.d.ts +5 -1
  382. package/loaders/attribute-observer.js +4 -4
  383. package/loaders/breakpoints.js +52 -0
  384. package/loaders/check-non-empty.js +6 -2
  385. package/loaders/check-one-of.js +8 -3
  386. package/loaders/check-type.js +11 -6
  387. package/loaders/debounce.js +11 -0
  388. package/loaders/fade.js +6 -2
  389. package/loaders/get-focusable-children.js +35 -0
  390. package/loaders/get-root.js +9 -0
  391. package/loaders/index.browser.js +13 -0
  392. package/loaders/index.d.ts +36 -2
  393. package/loaders/index.js +20 -2
  394. package/loaders/index2.js +25 -12
  395. package/loaders/package.js +1 -1
  396. package/loaders/post-accordion-item.js +1 -82
  397. package/loaders/post-accordion-item2.js +103 -0
  398. package/loaders/post-accordion.js +6 -5
  399. package/loaders/post-avatar.js +7 -11
  400. package/loaders/post-back-to-top.d.ts +11 -0
  401. package/loaders/post-back-to-top.js +104 -0
  402. package/loaders/post-banner.d.ts +11 -0
  403. package/loaders/post-banner.js +134 -0
  404. package/loaders/post-breadcrumb-item.d.ts +11 -0
  405. package/loaders/post-breadcrumb-item.js +6 -0
  406. package/loaders/post-breadcrumb-item2.js +82 -0
  407. package/loaders/post-breadcrumb.d.ts +11 -0
  408. package/loaders/post-breadcrumb.js +172 -0
  409. package/loaders/post-card-control.js +50 -39
  410. package/loaders/post-closebutton.d.ts +11 -0
  411. package/loaders/post-closebutton.js +37 -0
  412. package/loaders/post-collapsible-trigger2.js +23 -38
  413. package/loaders/post-collapsible2.js +21 -13
  414. package/loaders/post-footer.d.ts +11 -0
  415. package/loaders/post-footer.js +81 -0
  416. package/loaders/post-header.d.ts +11 -0
  417. package/loaders/post-header.js +404 -0
  418. package/loaders/post-icon2.js +81 -45
  419. package/loaders/post-language-option.js +31 -13
  420. package/loaders/post-language-switch.d.ts +11 -0
  421. package/loaders/post-language-switch.js +151 -0
  422. package/loaders/post-linkarea.d.ts +11 -0
  423. package/loaders/post-linkarea.js +45 -0
  424. package/loaders/post-list-item.d.ts +11 -0
  425. package/loaders/post-list-item.js +38 -0
  426. package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
  427. package/loaders/post-list.js +58 -0
  428. package/loaders/post-logo.js +5 -5
  429. package/loaders/post-mainnavigation.d.ts +11 -0
  430. package/loaders/post-mainnavigation.js +273 -0
  431. package/loaders/post-megadropdown-trigger.d.ts +11 -0
  432. package/loaders/post-megadropdown-trigger.js +116 -0
  433. package/loaders/post-megadropdown.d.ts +11 -0
  434. package/loaders/post-megadropdown.js +201 -0
  435. package/loaders/post-menu-item.d.ts +11 -0
  436. package/loaders/post-menu-item.js +6 -0
  437. package/loaders/post-menu-item2.js +27 -0
  438. package/loaders/post-menu-trigger.d.ts +11 -0
  439. package/loaders/post-menu-trigger.js +6 -0
  440. package/loaders/post-menu-trigger2.js +109 -0
  441. package/loaders/post-menu.d.ts +11 -0
  442. package/loaders/post-menu.js +6 -0
  443. package/loaders/post-menu2.js +193 -0
  444. package/loaders/post-popover.js +6 -4
  445. package/loaders/post-popovercontainer2.js +249 -72
  446. package/loaders/post-rating.js +14 -4
  447. package/loaders/post-tab-header.js +7 -6
  448. package/loaders/post-tab-panel.js +4 -3
  449. package/loaders/post-tabs.js +20 -13
  450. package/loaders/post-tag.js +3 -3
  451. package/loaders/post-togglebutton.d.ts +11 -0
  452. package/loaders/post-togglebutton.js +64 -0
  453. package/loaders/post-tooltip.js +34 -21
  454. package/loaders/slide.js +25 -0
  455. package/package.json +26 -20
  456. package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
  457. package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
  458. package/dist/cjs/fade-35a3633a.js +0 -10
  459. package/dist/cjs/index-01f30442.js +0 -52
  460. package/dist/cjs/post-accordion-item-0278e6e2.js +0 -52
  461. package/dist/cjs/post-alert-5f795d9c.js +0 -98
  462. package/dist/cjs/post-alert.cjs.entry.js +0 -16
  463. package/dist/cjs/post-card-control-5ffcd201.js +0 -272
  464. package/dist/cjs/post-icon-1f71aa0f.js +0 -104
  465. package/dist/cjs/post-icon.cjs.entry.js +0 -15
  466. package/dist/cjs/post-language-option-4a3ecaeb.js +0 -67
  467. package/dist/cjs/post-language-option.cjs.entry.js +0 -14
  468. package/dist/cjs/post-logo-7070d727.js +0 -39
  469. package/dist/cjs/post-logo.cjs.entry.js +0 -14
  470. package/dist/cjs/post-popover-de1b8d95.js +0 -104
  471. package/dist/cjs/post-popovercontainer-6a25713a.js +0 -2186
  472. package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
  473. package/dist/cjs/post-tab-header-877676bf.js +0 -32
  474. package/dist/cjs/post-tag-5e2c7798.js +0 -47
  475. package/dist/collection/components/post-alert/alert-types.js +0 -1
  476. package/dist/collection/components/post-alert/post-alert.css +0 -7
  477. package/dist/components/post-alert.js +0 -6
  478. package/dist/components/post-alert2.js +0 -136
  479. package/dist/esm/check-non-empty-58bd6b17.js +0 -9
  480. package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
  481. package/dist/esm/fade-7fd71785.js +0 -7
  482. package/dist/esm/index-f41b763f.js +0 -46
  483. package/dist/esm/package-0311770e.js +0 -3
  484. package/dist/esm/post-accordion-item-366f385b.js +0 -50
  485. package/dist/esm/post-alert-5a69f40d.js +0 -96
  486. package/dist/esm/post-alert.entry.js +0 -8
  487. package/dist/esm/post-card-control-2a7939c3.js +0 -270
  488. package/dist/esm/post-icon-885f17e9.js +0 -102
  489. package/dist/esm/post-icon.entry.js +0 -7
  490. package/dist/esm/post-language-option-0c2818aa.js +0 -65
  491. package/dist/esm/post-language-option.entry.js +0 -6
  492. package/dist/esm/post-logo-dd425f2e.js +0 -37
  493. package/dist/esm/post-logo.entry.js +0 -6
  494. package/dist/esm/post-popovercontainer-e6d11d81.js +0 -2184
  495. package/dist/esm/post-popovercontainer.entry.js +0 -3
  496. package/dist/esm/post-tab-header-776a991a.js +0 -30
  497. package/dist/esm/post-tag-deefcc86.js +0 -45
  498. package/dist/post-components/p-048538ea.js +0 -1
  499. package/dist/post-components/p-0a1f5e13.entry.js +0 -1
  500. package/dist/post-components/p-0a4318ff.js +0 -1
  501. package/dist/post-components/p-0d64ef0c.entry.js +0 -1
  502. package/dist/post-components/p-1198a5f2.entry.js +0 -1
  503. package/dist/post-components/p-13d1bef7.entry.js +0 -1
  504. package/dist/post-components/p-16d057a6.js +0 -1
  505. package/dist/post-components/p-1a091fca.entry.js +0 -1
  506. package/dist/post-components/p-1f35b0ba.entry.js +0 -1
  507. package/dist/post-components/p-246a6d28.js +0 -1
  508. package/dist/post-components/p-2737eaf5.js +0 -1
  509. package/dist/post-components/p-3aa5e1e5.js +0 -1
  510. package/dist/post-components/p-3d3795f9.js +0 -1
  511. package/dist/post-components/p-3fabf6e4.entry.js +0 -1
  512. package/dist/post-components/p-4f0617e6.js +0 -1
  513. package/dist/post-components/p-53bacbbc.js +0 -1
  514. package/dist/post-components/p-5c8cb76f.entry.js +0 -1
  515. package/dist/post-components/p-5eee8d31.entry.js +0 -1
  516. package/dist/post-components/p-60e72b25.js +0 -1
  517. package/dist/post-components/p-611b3c41.js +0 -1
  518. package/dist/post-components/p-66ed33a9.js +0 -1
  519. package/dist/post-components/p-681b751d.entry.js +0 -1
  520. package/dist/post-components/p-6adeaa6c.js +0 -1
  521. package/dist/post-components/p-6b6a1e82.entry.js +0 -1
  522. package/dist/post-components/p-752e6a98.entry.js +0 -1
  523. package/dist/post-components/p-8734876e.js +0 -1
  524. package/dist/post-components/p-9ac2a947.js +0 -1
  525. package/dist/post-components/p-9d211a45.js +0 -1
  526. package/dist/post-components/p-b095519d.js +0 -1
  527. package/dist/post-components/p-b38eaabf.js +0 -1
  528. package/dist/post-components/p-cdfcc758.entry.js +0 -1
  529. package/dist/post-components/p-d50d4ec1.entry.js +0 -1
  530. package/dist/post-components/p-d785856c.js +0 -1
  531. package/dist/post-components/p-deb4131c.js +0 -1
  532. package/dist/post-components/p-e18f3639.js +0 -1
  533. package/dist/post-components/p-f1b7797f.entry.js +0 -1
  534. package/dist/post-components/p-f6efc76b.entry.js +0 -1
  535. package/dist/post-components/p-f825d681.js +0 -1
  536. package/dist/post-components/p-fff1c2ee.entry.js +0 -1
  537. package/dist/types/components/post-alert/alert-types.d.ts +0 -2
  538. package/dist/types/components/post-alert/post-alert.d.ts +0 -54
  539. package/loaders/post-alert.js +0 -139
@@ -1,8 +1,9 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
3
  import { c as checkNonEmpty } from './check-non-empty.js';
4
+ import { n as nanoid } from './index.browser.js';
4
5
 
5
- const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:var(--post-contrast-color-inverted);color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.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]) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.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]) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-secondary .tab-title{background-color:#666}.bg-secondary .tab-title.active{background-color:#666}.bg-secondary .nav-item{background-color:#666}.bg-success .tab-title{background-color:#2c871d}.bg-success .tab-title.active{background-color:#2c871d}.bg-success .nav-item{background-color:#2c871d}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-error .tab-title{background-color:#a51728}.bg-error .tab-title.active{background-color:#a51728}.bg-error .nav-item{background-color:#a51728}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}";
6
+ const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{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}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}";
6
7
  const PostTabHeaderStyle0 = postTabHeaderCss;
7
8
 
8
9
  const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
@@ -13,16 +14,16 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
13
14
  this.tabId = undefined;
14
15
  this.panel = undefined;
15
16
  }
16
- validateFor(newValue) {
17
- checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
17
+ get host() { return this; }
18
+ validateFor() {
19
+ checkNonEmpty(this, 'panel');
18
20
  }
19
21
  componentWillLoad() {
20
- this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
22
+ this.tabId = `tab-${this.host.id || nanoid(6)}`;
21
23
  }
22
24
  render() {
23
- return (h(Host, { key: '5912b0379fbde496a165cc18bd8025e02858dd20', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '14d7d226e09a018139570ded2acef36ade7ad501' })));
25
+ return (h(Host, { key: '336824660de90bf5c570e9739947927a32612fbd', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '8bfe0b57fa96044692e2db3fd983ccde427558e7' })));
24
26
  }
25
- get host() { return this; }
26
27
  static get watchers() { return {
27
28
  "panel": ["validateFor"]
28
29
  }; }
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
+ import { n as nanoid } from './index.browser.js';
3
4
 
4
5
  const postTabPanelCss = ":host{display:none}";
5
6
  const PostTabPanelStyle0 = postTabPanelCss;
@@ -12,14 +13,14 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
12
13
  this.panelId = undefined;
13
14
  this.name = undefined;
14
15
  }
16
+ get host() { return this; }
15
17
  componentWillLoad() {
16
18
  // get the id set on the host element or use a random id by default
17
- this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
19
+ this.panelId = `panel-${this.host.id || nanoid(6)}`;
18
20
  }
19
21
  render() {
20
- return (h(Host, { key: 'b3cf3aa9d4a89fc1f561ba7ecd62ff456e3392eb', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '63be1c4ea7c1c57a1438eeb164b446d39613f926' })));
22
+ return (h(Host, { key: '8331ab54bda793a120dc467d8406cc0a02a5c480', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '7da6d67b69150a70ee290ad8ef9b95684ea3f83d' })));
21
23
  }
22
- get host() { return this; }
23
24
  static get style() { return PostTabPanelStyle0; }
24
25
  }, [1, "post-tab-panel", {
25
26
  "name": [1],
@@ -6,7 +6,7 @@ import { f as fadeOut, a as fadeIn } from './fade.js';
6
6
  * Invoke the `componentOnReady` method if it is available, simulate it otherwise
7
7
  * @see https://stenciljs.com/docs/api#componentonready
8
8
  */
9
- const componentOnReady = (el) => {
9
+ function componentOnReady(el) {
10
10
  if (typeof el.componentOnReady === 'function') {
11
11
  return el.componentOnReady();
12
12
  }
@@ -15,15 +15,15 @@ const componentOnReady = (el) => {
15
15
  resolve(el);
16
16
  }));
17
17
  }
18
- };
19
- const customOnReady = (callback) => {
18
+ }
19
+ function customOnReady(callback) {
20
20
  if (typeof requestAnimationFrame === 'function') {
21
21
  return requestAnimationFrame(callback);
22
22
  }
23
23
  return setTimeout(callback);
24
- };
24
+ }
25
25
 
26
- const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{margin:0;padding:0;list-style:none;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}";
26
+ const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(0,0,0,.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}:host{display:block}";
27
27
  const PostTabsStyle0 = postTabsCss;
28
28
 
29
29
  const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLElement {
@@ -32,16 +32,25 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
32
32
  this.__registerHost();
33
33
  this.__attachShadow();
34
34
  this.postChange = createEvent(this, "postChange", 7);
35
- this.isLoaded = false;
36
35
  this.activePanel = undefined;
37
36
  }
37
+ activeTab;
38
+ showing;
39
+ hiding;
40
+ isLoaded = false;
38
41
  get tabs() {
39
- return this.host.querySelectorAll('post-tab-header');
42
+ return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
40
43
  }
44
+ get host() { return this; }
45
+ /**
46
+ * An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.
47
+ * The payload is the name of the newly shown panel.
48
+ */
49
+ postChange;
41
50
  componentDidLoad() {
42
51
  this.moveMisplacedTabs();
43
52
  this.enableTabs();
44
- const initiallyActivePanel = this.activePanel || this.tabs.item(0).panel;
53
+ const initiallyActivePanel = this.activePanel || this.tabs[0]?.panel;
45
54
  void this.show(initiallyActivePanel);
46
55
  this.isLoaded = true;
47
56
  }
@@ -50,9 +59,8 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
50
59
  * Any other panel that was previously shown becomes hidden and its associated tab is unselected.
51
60
  */
52
61
  async show(panelName) {
53
- var _a;
54
62
  // do nothing if the tab is already active
55
- if (panelName === ((_a = this.activeTab) === null || _a === void 0 ? void 0 : _a.panel)) {
63
+ if (panelName === this.activeTab?.panel) {
56
64
  return;
57
65
  }
58
66
  const previousTab = this.activeTab;
@@ -112,7 +120,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
112
120
  });
113
121
  // if the currently active tab was removed from the DOM then select the first one
114
122
  if (this.activeTab && !this.activeTab.isConnected) {
115
- void this.show(this.tabs.item(0).panel);
123
+ void this.show(this.tabs[0]?.panel);
116
124
  }
117
125
  }
118
126
  activateTab(tab) {
@@ -164,9 +172,8 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
164
172
  nextTab.focus();
165
173
  }
166
174
  render() {
167
- return (h(Host, { key: '443b79a70c7e0128a01094a8d06e8846225a534f', "data-version": version }, h("div", { key: '0f7ce12730170ec5197a458f7d8c995a30400260', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '0f97c05226414525b18f74cf39eba9dd724b2ae7', class: "tabs", role: "tablist" }, h("slot", { key: '63b83a89e4fa49508c2a5885bf0ab0c895c1d6bc', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '234bfca1c275439f15b38b5b0953f5875c071436', class: "tab-content", part: "content" }, h("slot", { key: '77ef898a040b7f59d90afab6a9a0fd47c00e0ab5', onSlotchange: () => this.moveMisplacedTabs() }))));
175
+ return (h(Host, { key: 'dae24eee55a75f9b825f590883a9c1e896c1e9fc', "data-version": version }, h("div", { key: '0a26de80b8267ddc30455b0b5afbf10ae521232b', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '826cb0a4355eeb5ddc07288e1e68fc72785c095f', class: "tabs", role: "tablist" }, h("slot", { key: '94ce90bc3dc8ff4b5012fcfa3c0039b188c14002', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '462f80f3368431344910cc317f1c0f42112dc99a', class: "tab-content", part: "content" }, h("slot", { key: '57a80ac790ca75f3b62382994c21a3a3c78004cc', onSlotchange: () => this.moveMisplacedTabs() }))));
168
176
  }
169
- get host() { return this; }
170
177
  static get style() { return PostTabsStyle0; }
171
178
  }, [1, "post-tabs", {
172
179
  "activePanel": [1, "active-panel"],
@@ -2,10 +2,11 @@ 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 * 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:#000}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 {
9
+ get host() { return this; }
9
10
  constructor() {
10
11
  super();
11
12
  this.__registerHost();
@@ -35,9 +36,8 @@ const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEle
35
36
  this.setClasses();
36
37
  }
37
38
  render() {
38
- return (h(Host, { key: '0696ad0df9ebe7a349090d8a7ed8fd9f60194e46', "data-version": version }, h("div", { key: 'a656792f0bea60ffb006ea52a53c72200e67cb52', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: 'f8886d0eca17458e71649584bb3d3d082272dc03', class: "tag-text" }, h("slot", { key: 'fa66eef13f726a169f62fdbdd2f914932bfde61d' })))));
39
+ return (h(Host, { key: '4ca273166b81099dd8fc0f69d3d38215e3d7ccbc', "data-version": version }, h("div", { key: 'b6c4eb6a3bf8cbaad18cf6277dab79bd6e350f0a', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '4f9e8cf6b2c723e31d60e30464c1106a9f72b5b4', class: "tag-text" }, h("slot", { key: '819a4e6ff743386f8d5d6b1d94dea9ee4a612784' })))));
39
40
  }
40
- get host() { return this; }
41
41
  static get watchers() { return {
42
42
  "variant": ["variantChanged"],
43
43
  "size": ["sizeChanged"]
@@ -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.toggled = false;
14
+ }
15
+ get host() { return this; }
16
+ validateToggled() {
17
+ checkType(this, 'toggled', 'boolean');
18
+ }
19
+ componentWillLoad() {
20
+ this.validateToggled();
21
+ // add event listener to not override listener that might be set on the host
22
+ this.host.addEventListener('click', () => this.handleClick());
23
+ this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
24
+ }
25
+ handleClick = () => {
26
+ this.toggled = !this.toggled;
27
+ };
28
+ handleKeydown = (event) => {
29
+ // perform a click when enter or spaced are pressed to mimic the button behavior
30
+ if (event.key === 'Enter' || event.key === ' ') {
31
+ event.preventDefault(); // prevents the page from scrolling when space is pressed
32
+ this.host.click();
33
+ }
34
+ };
35
+ render() {
36
+ return (h(Host, { key: '3a1429a9b67b8cfafae184fe0d060ee3a04974e0', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '9ab1537574423740fc335fde732c699698acac25' })));
37
+ }
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[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:calc(224px - var(--post-core-dimension-8));min-height:var(--post-core-dimension-16)}";
4781
4777
  const PostTooltipStyle0 = postTooltipCss;
4782
4778
 
4783
4779
  const OPEN_DELAY = 650; // matches HTML title delay
@@ -4791,6 +4787,8 @@ 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
@@ -4803,15 +4801,18 @@ const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
4803
4801
  */
4804
4802
  const globalInterestHandler = (e) => {
4805
4803
  const targetElement = e.target.closest(tooltipTargetAttributeSelector);
4806
- if (!targetElement || !('getAttribute' in targetElement))
4804
+ globalCurrentTarget = targetElement;
4805
+ if (!targetElement || !('getAttribute' in targetElement)) {
4806
+ clearTimeout(tooltipTimeout);
4807
4807
  return;
4808
+ }
4808
4809
  const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
4809
4810
  if (!tooltipTarget || tooltipTarget === '')
4810
4811
  return;
4811
4812
  const tooltip = document.getElementById(tooltipTarget);
4812
4813
  // Determine if the tooltip was triggered by a focus event
4813
4814
  const triggeredByFocus = e.type === 'focusin';
4814
- void (tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(targetElement, triggeredByFocus));
4815
+ void tooltip?.show(targetElement, triggeredByFocus);
4815
4816
  if (hideTooltipTimeout) {
4816
4817
  window.clearTimeout(hideTooltipTimeout);
4817
4818
  hideTooltipTimeout = null;
@@ -4852,7 +4853,7 @@ const patchAccessibilityFeatures = (trigger) => {
4852
4853
  const describedBy = trigger.getAttribute('aria-describedby');
4853
4854
  const id = trigger.getAttribute(tooltipTargetAttribute);
4854
4855
  // Add tooltip to aria-describedby
4855
- if (!(describedBy === null || describedBy === void 0 ? void 0 : describedBy.includes(id))) {
4856
+ if (!describedBy?.includes(id)) {
4856
4857
  const newDescribedBy = describedBy ? `${describedBy} ${id}` : id;
4857
4858
  trigger.setAttribute('aria-describedby', newDescribedBy);
4858
4859
  }
@@ -4868,13 +4869,15 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4868
4869
  super();
4869
4870
  this.__registerHost();
4870
4871
  this.__attachShadow();
4871
- this.wasOpenedByFocus = false;
4872
4872
  this.placement = 'top';
4873
4873
  this.arrow = true;
4874
4874
  this.delayed = false;
4875
4875
  }
4876
+ popoverRef;
4877
+ wasOpenedByFocus = false;
4878
+ get host() { return this; }
4876
4879
  validateDelayed() {
4877
- checkEmptyOrType(this.delayed, 'boolean', 'The post-tooltip "delayed" property should be a boolean.');
4880
+ checkEmptyOrType(this, 'delayed', 'boolean');
4878
4881
  }
4879
4882
  connectedCallback() {
4880
4883
  this.validateDelayed();
@@ -4931,18 +4934,29 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4931
4934
  * @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
4932
4935
  */
4933
4936
  async show(target, triggeredByFocus = false) {
4934
- if (this.delayed)
4935
- await timeout(OPEN_DELAY);
4936
- // Determine if the tooltip was opened by a focus event
4937
- this.wasOpenedByFocus = triggeredByFocus;
4938
- // Disable pointer events if triggered by focus, otherwise enable them
4939
- if (this.wasOpenedByFocus) {
4940
- this.host.style.pointerEvents = 'none';
4937
+ const showTooltip = () => {
4938
+ // If focus or pointer event is not on the button anymore, don't show the tooltip
4939
+ if (globalCurrentTarget !== target)
4940
+ return;
4941
+ // Determine if the tooltip was opened by a focus event
4942
+ this.wasOpenedByFocus = triggeredByFocus;
4943
+ // Disable pointer events if triggered by focus, otherwise enable them
4944
+ if (this.wasOpenedByFocus) {
4945
+ this.host.style.pointerEvents = 'none';
4946
+ }
4947
+ else {
4948
+ this.host.style.pointerEvents = 'auto';
4949
+ }
4950
+ this.popoverRef.show(target);
4951
+ };
4952
+ if (this.delayed) {
4953
+ tooltipTimeout = setTimeout(() => {
4954
+ showTooltip();
4955
+ }, OPEN_DELAY);
4941
4956
  }
4942
4957
  else {
4943
- this.host.style.pointerEvents = 'auto';
4958
+ showTooltip();
4944
4959
  }
4945
- this.popoverRef.show(target);
4946
4960
  }
4947
4961
  /**
4948
4962
  * Programmatically hide this tooltip
@@ -4977,9 +4991,8 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4977
4991
  }
4978
4992
  render() {
4979
4993
  const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
4980
- return (h(Host, { key: '95188177d36478c25892238d67427b250a5d0978', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'feb6016cb20946f5578aecc693c2813382580562', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '6d7b69f543c0f550952dfa985e9ca3222af8ac18' }))));
4994
+ return (h(Host, { key: '89b0e64fd5fde4c21d9c1eb624facff38b287e4a', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '8006874c12a2eebe39682a09db677e8b315dd6bb', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'cf3bd12703885fe886f1703038437b59a4d79fd3' }))));
4981
4995
  }
4982
- get host() { return this; }
4983
4996
  static get watchers() { return {
4984
4997
  "delayed": ["validateDelayed"]
4985
4998
  }; }
@@ -0,0 +1,25 @@
1
+ const easing = 'ease';
2
+ const duration = 500;
3
+ const fill = 'forwards';
4
+ function slideUp(el, translateSize = '-100%') {
5
+ return el.animate([
6
+ { transform: 'translateY(0)' }, // Starting position (no translation)
7
+ { transform: `translateY(${translateSize})` }, // End position
8
+ ], {
9
+ duration: duration,
10
+ easing,
11
+ fill,
12
+ });
13
+ }
14
+ function slideDown(el, translateSize = '-100%') {
15
+ return el.animate([
16
+ { transform: `translateY(${translateSize})` }, // Starting position (no translation)
17
+ { transform: 'translateY(0)' }, // End position
18
+ ], {
19
+ duration: duration,
20
+ easing,
21
+ fill,
22
+ });
23
+ }
24
+
25
+ export { slideUp as a, slideDown 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.3",
3
+ "version": "9.0.0-next.30",
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",
@@ -24,35 +24,41 @@
24
24
  "linkDirectory": true
25
25
  },
26
26
  "dependencies": {
27
- "@floating-ui/dom": "1.6.8",
27
+ "@floating-ui/dom": "1.6.13",
28
28
  "@oddbird/popover-polyfill": "0.3.7",
29
- "@swisspost/design-system-styles": "9.0.0-next.3",
29
+ "@swisspost/design-system-icons": "9.0.0-next.30",
30
+ "@swisspost/design-system-styles": "9.0.0-next.30",
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
- "@percy/cli": "1.29.1",
36
+ "@eslint/compat": "1.2.5",
37
+ "@eslint/js": "9.18.0",
38
+ "@percy/cli": "1.30.6",
35
39
  "@percy/cypress": "3.1.2",
36
- "@stencil-community/eslint-plugin": "0.8.0",
40
+ "@stencil-community/eslint-plugin": "0.9.0",
37
41
  "@stencil/angular-output-target": "0.8.4",
38
42
  "@stencil/core": "4.19.2",
39
43
  "@stencil/react-output-target": "0.5.3",
40
44
  "@stencil/sass": "3.0.12",
41
- "@types/jest": "29.5.12",
42
- "@types/node": "20.14.14",
43
- "@typescript-eslint/eslint-plugin": "7.18.0",
45
+ "@types/jest": "29.5.14",
46
+ "@types/node": "22.10.5",
44
47
  "@typescript-eslint/parser": "7.18.0",
45
48
  "bootstrap": "5.3.3",
46
49
  "cypress": "13.13.2",
47
50
  "cypress-axe": "1.5.0",
48
51
  "cypress-storybook": "1.0.0",
49
- "eslint": "8.57.0",
50
- "eslint-plugin-react": "7.35.0",
52
+ "eslint": "9.18.0",
53
+ "eslint-plugin-react": "7.37.4",
54
+ "globals": "15.14.0",
51
55
  "rimraf": "6.0.1",
52
56
  "rollup-plugin-postcss": "4.0.2",
53
57
  "sass": "1.78.0",
54
- "ts-jest": "29.2.4",
55
- "typescript": "5.5.4"
58
+ "throttle-debounce": "5.0.2",
59
+ "ts-jest": "29.2.5",
60
+ "typescript": "5.5.4",
61
+ "typescript-eslint": "8.20.0"
56
62
  },
57
63
  "keywords": [
58
64
  "components",
@@ -63,17 +69,17 @@
63
69
  "frontend"
64
70
  ],
65
71
  "scripts": {
66
- "dev": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
72
+ "play": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
67
73
  "start": "stencil build --dev --watch --docs --docs-readme",
68
- "build": "stencil build --docs-readme",
74
+ "build": "pnpm clean && stencil build --docs-readme",
69
75
  "clean": "rimraf www dist loader loaders",
70
- "test": "pnpm run unit",
71
76
  "unit": "stencil test --spec",
72
77
  "unit:watch": "stencil test --spec --watchAll --silent",
73
- "e2e": "cypress run",
74
- "e2e:ci": "xvfb-run -a cypress run",
78
+ "e2e": "cypress run --browser chrome",
75
79
  "e2e:watch": "cypress open",
76
- "generate": "stencil generate",
77
- "lint": "eslint src/**/*{.ts,.tsx}"
80
+ "e2e:ci": "xvfb-run -a cypress run --browser chrome",
81
+ "lint": "eslint",
82
+ "lint:fix": "eslint --fix",
83
+ "generate": "stencil generate"
78
84
  }
79
85
  }
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- const constants = require('./constants-238701d3.js');
4
-
5
- function checkNonEmpty(value, error) {
6
- if (constants.EMPTY_VALUES.some(v => v === value)) {
7
- throw new Error(error);
8
- }
9
- }
10
-
11
- exports.checkNonEmpty = checkNonEmpty;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- function checkOneOf(value, possibleValues, error) {
4
- if (!possibleValues.includes(value))
5
- throw new Error(error);
6
- }
7
-
8
- exports.checkOneOf = checkOneOf;
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- const fadeDuration = 200;
4
- const fadedOutKeyframe = { opacity: '0' };
5
- const fadedInKeyframe = { opacity: '1' };
6
- const fadeIn = (el) => el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
7
- const fadeOut = (el) => el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
8
-
9
- exports.fadeIn = fadeIn;
10
- exports.fadeOut = fadeOut;
@@ -1,52 +0,0 @@
1
- 'use strict';
2
-
3
- const constants = require('./constants-238701d3.js');
4
- const checkOneOf = require('./check-one-of-f4f5d0c0.js');
5
-
6
- function emptyOr(check) {
7
- return (...args) => {
8
- const value = args[0];
9
- if (!constants.EMPTY_VALUES.some(v => v === value))
10
- check(...args);
11
- };
12
- }
13
-
14
- function checkPattern(value, pattern, errorMessage) {
15
- if (typeof value !== 'string' || !pattern.test(value))
16
- throw new Error(errorMessage);
17
- }
18
-
19
- function checkType(value, type, error) {
20
- const typeIsArray = type === 'array';
21
- const valueIsArray = Array.isArray(value);
22
- if (typeIsArray || valueIsArray) {
23
- if (valueIsArray !== typeIsArray)
24
- throw new Error(error);
25
- }
26
- else {
27
- if (typeof value !== type)
28
- throw new Error(error);
29
- }
30
- }
31
-
32
- function checkUrl(value, error) {
33
- if (typeof value !== 'string' && !(value instanceof URL))
34
- throw new Error(error);
35
- try {
36
- new URL(value);
37
- }
38
- catch (e) {
39
- throw new Error(error);
40
- }
41
- }
42
-
43
- const checkEmptyOrOneOf = emptyOr(checkOneOf.checkOneOf);
44
- const checkEmptyOrPattern = emptyOr(checkPattern);
45
- const checkEmptyOrType = emptyOr(checkType);
46
- const checkEmptyOrUrl = emptyOr(checkUrl);
47
-
48
- exports.checkEmptyOrOneOf = checkEmptyOrOneOf;
49
- exports.checkEmptyOrPattern = checkEmptyOrPattern;
50
- exports.checkEmptyOrType = checkEmptyOrType;
51
- exports.checkEmptyOrUrl = checkEmptyOrUrl;
52
- exports.checkType = checkType;