@swisspost/design-system-components 9.0.0-next.5 → 9.0.0-next.7

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 (287) hide show
  1. package/dist/cjs/get-root-7a3498ef.js +11 -0
  2. package/dist/cjs/index-e1f32cce.js +8 -4
  3. package/dist/cjs/index.cjs.js +24 -21
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{package-53892d3d.js → package-bc44930e.js} +1 -1
  6. package/dist/cjs/{post-accordion-7f627ffd.js → post-accordion-c55fef06.js} +1 -1
  7. package/dist/cjs/{post-accordion-item-ceb5399f.js → post-accordion-item-641f0b42.js} +1 -1
  8. package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
  9. package/dist/cjs/post-accordion.cjs.entry.js +2 -2
  10. package/dist/cjs/{post-avatar-a8123d38.js → post-avatar-10d7b5c0.js} +1 -1
  11. package/dist/cjs/post-avatar.cjs.entry.js +2 -2
  12. package/dist/cjs/post-banner-b286d37f.js +90 -0
  13. package/dist/cjs/{post-alert.cjs.entry.js → post-banner.cjs.entry.js} +3 -3
  14. package/dist/cjs/{post-breadcrumb-item-6e4704e5.js → post-breadcrumb-item-8cdc59a8.js} +1 -1
  15. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +2 -2
  16. package/dist/cjs/post-card-control-fc4aca2a.js +272 -0
  17. package/dist/cjs/post-card-control.cjs.entry.js +2 -2
  18. package/dist/cjs/post-closebutton_10.cjs.entry.js +2 -2
  19. package/dist/cjs/{post-collapsible-trigger-e4862a5b.js → post-collapsible-trigger-c8b3e767.js} +3 -10
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -2
  21. package/dist/cjs/post-components.cjs.js +1 -1
  22. package/dist/cjs/{post-language-option-62414842.js → post-language-option-8c1ec4fd.js} +2 -2
  23. package/dist/cjs/post-language-option.cjs.entry.js +2 -2
  24. package/dist/cjs/{post-megadropdown-trigger-da912fed.js → post-megadropdown-trigger-9b9f1036.js} +32 -37
  25. package/dist/cjs/{post-menu-54fa65d3.js → post-menu-5a71a6fe.js} +2 -2
  26. package/dist/cjs/{post-menu-item-8c3090b1.js → post-menu-item-5c5c1aaf.js} +2 -2
  27. package/dist/cjs/post-menu-item.cjs.entry.js +2 -2
  28. package/dist/cjs/{post-menu-trigger-71449876.js → post-menu-trigger-02d128c4.js} +5 -3
  29. package/dist/cjs/post-menu-trigger.cjs.entry.js +3 -2
  30. package/dist/cjs/post-menu.cjs.entry.js +2 -2
  31. package/dist/cjs/{post-popover-5f639e4f.js → post-popover-91a83e9d.js} +3 -3
  32. package/dist/cjs/post-popover.cjs.entry.js +2 -2
  33. package/dist/cjs/{post-rating-3d166fed.js → post-rating-57fcf949.js} +2 -2
  34. package/dist/cjs/post-rating.cjs.entry.js +2 -2
  35. package/dist/cjs/post-tab-header-ce56b760.js +32 -0
  36. package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
  37. package/dist/cjs/{post-tab-panel-e5685f3d.js → post-tab-panel-70e49260.js} +2 -2
  38. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  39. package/dist/cjs/{post-tabs-e871c911.js → post-tabs-39262e55.js} +3 -3
  40. package/dist/cjs/post-tabs.cjs.entry.js +2 -2
  41. package/dist/cjs/{post-tag-62f31d0e.js → post-tag-b6bc5785.js} +2 -2
  42. package/dist/cjs/post-tag.cjs.entry.js +2 -2
  43. package/dist/cjs/post-togglebutton-2f39442e.js +28 -0
  44. package/dist/cjs/post-togglebutton.cjs.entry.js +11 -0
  45. package/dist/cjs/{post-tooltip-851c342c.js → post-tooltip-8be3b2aa.js} +28 -16
  46. package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
  47. package/dist/collection/collection-manifest.json +2 -1
  48. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  49. package/dist/collection/components/post-banner/banner-types.js +1 -0
  50. package/dist/collection/components/post-banner/post-banner.css +3 -0
  51. package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +39 -68
  52. package/dist/collection/components/post-card-control/post-card-control.css +1 -1
  53. package/dist/collection/components/post-card-control/post-card-control.js +8 -8
  54. package/dist/collection/components/post-header/post-header.js +1 -1
  55. package/dist/collection/components/post-icon/post-icon.css +1 -1
  56. package/dist/collection/components/post-icon/post-icon.js +20 -31
  57. package/dist/collection/components/post-language-option/post-language-option.js +1 -1
  58. package/dist/collection/components/post-list/post-list.js +2 -2
  59. package/dist/collection/components/post-list-item/post-list-item.js +1 -1
  60. package/dist/collection/components/post-logo/post-logo.js +1 -1
  61. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
  62. package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
  63. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
  64. package/dist/collection/components/post-menu/post-menu.js +1 -1
  65. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  66. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +4 -3
  67. package/dist/collection/components/post-popover/post-popover.css +1 -1
  68. package/dist/collection/components/post-popover/post-popover.js +1 -1
  69. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
  70. package/dist/collection/components/post-rating/post-rating.js +1 -1
  71. package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
  72. package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
  73. package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
  74. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  75. package/dist/collection/components/post-tabs/post-tabs.js +1 -1
  76. package/dist/collection/components/post-tag/post-tag.js +2 -2
  77. package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
  78. package/dist/collection/components/post-togglebutton/post-togglebutton.js +56 -0
  79. package/dist/collection/components/post-tooltip/post-tooltip.js +28 -12
  80. package/dist/collection/index.js +2 -1
  81. package/dist/components/get-root.js +9 -0
  82. package/dist/components/index.js +2 -1
  83. package/dist/components/package.js +1 -1
  84. package/dist/components/{post-alert.d.ts → post-banner.d.ts} +4 -4
  85. package/dist/components/post-banner.js +6 -0
  86. package/dist/components/post-banner2.js +125 -0
  87. package/dist/components/post-card-control2.js +3 -3
  88. package/dist/components/post-collapsible-trigger2.js +1 -8
  89. package/dist/components/post-header2.js +1 -1
  90. package/dist/components/post-icon2.js +22 -29
  91. package/dist/components/post-language-option2.js +1 -1
  92. package/dist/components/post-list-item2.js +1 -1
  93. package/dist/components/post-list2.js +2 -2
  94. package/dist/components/post-logo2.js +1 -1
  95. package/dist/components/post-mainnavigation2.js +1 -1
  96. package/dist/components/post-megadropdown-trigger2.js +1 -1
  97. package/dist/components/post-megadropdown2.js +1 -1
  98. package/dist/components/post-menu-item2.js +1 -1
  99. package/dist/components/post-menu-trigger2.js +4 -2
  100. package/dist/components/post-menu2.js +1 -1
  101. package/dist/components/post-popover2.js +2 -2
  102. package/dist/components/post-popovercontainer2.js +2 -2
  103. package/dist/components/post-rating2.js +1 -1
  104. package/dist/components/post-tab-header2.js +2 -2
  105. package/dist/components/post-tab-panel2.js +1 -1
  106. package/dist/components/post-tabs2.js +2 -2
  107. package/dist/components/post-tag2.js +1 -1
  108. package/dist/components/post-togglebutton.d.ts +11 -0
  109. package/dist/components/post-togglebutton.js +6 -0
  110. package/dist/components/post-togglebutton2.js +43 -0
  111. package/dist/components/post-tooltip2.js +27 -15
  112. package/dist/docs.json +209 -175
  113. package/dist/esm/get-root-7af2e0d1.js +9 -0
  114. package/dist/esm/index-e1b64755.js +8 -4
  115. package/dist/esm/index.js +22 -20
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/esm/package-180da9f3.js +3 -0
  118. package/dist/esm/{post-accordion-b2762084.js → post-accordion-7268e29b.js} +1 -1
  119. package/dist/esm/{post-accordion-item-82ef1c4a.js → post-accordion-item-a5a76abb.js} +1 -1
  120. package/dist/esm/post-accordion-item.entry.js +2 -2
  121. package/dist/esm/post-accordion.entry.js +2 -2
  122. package/dist/esm/{post-avatar-e84c49cb.js → post-avatar-19162f90.js} +1 -1
  123. package/dist/esm/post-avatar.entry.js +2 -2
  124. package/dist/esm/post-banner-132709ad.js +88 -0
  125. package/dist/esm/{post-alert.entry.js → post-banner.entry.js} +2 -2
  126. package/dist/esm/{post-breadcrumb-item-ff752018.js → post-breadcrumb-item-5a77f988.js} +1 -1
  127. package/dist/esm/post-breadcrumb-item.entry.js +2 -2
  128. package/dist/esm/post-card-control-5be9c80a.js +270 -0
  129. package/dist/esm/post-card-control.entry.js +2 -2
  130. package/dist/esm/post-closebutton_10.entry.js +2 -2
  131. package/dist/esm/{post-collapsible-trigger-34740fa6.js → post-collapsible-trigger-43fbbf03.js} +2 -9
  132. package/dist/esm/post-collapsible_2.entry.js +3 -2
  133. package/dist/esm/post-components.js +1 -1
  134. package/dist/esm/{post-language-option-e2a76752.js → post-language-option-f41240c3.js} +2 -2
  135. package/dist/esm/post-language-option.entry.js +2 -2
  136. package/dist/esm/{post-megadropdown-trigger-7e577245.js → post-megadropdown-trigger-813b5140.js} +32 -37
  137. package/dist/esm/{post-menu-e6337859.js → post-menu-62c3e49a.js} +2 -2
  138. package/dist/esm/{post-menu-item-c10a0a93.js → post-menu-item-f63a1521.js} +2 -2
  139. package/dist/esm/post-menu-item.entry.js +2 -2
  140. package/dist/esm/{post-menu-trigger-5f31ad60.js → post-menu-trigger-b84f728d.js} +5 -3
  141. package/dist/esm/post-menu-trigger.entry.js +3 -2
  142. package/dist/esm/post-menu.entry.js +2 -2
  143. package/dist/esm/{post-popover-d78547b4.js → post-popover-abae1f3a.js} +3 -3
  144. package/dist/esm/post-popover.entry.js +2 -2
  145. package/dist/esm/{post-rating-d04d0349.js → post-rating-b963d4f2.js} +2 -2
  146. package/dist/esm/post-rating.entry.js +2 -2
  147. package/dist/esm/post-tab-header-c16feb72.js +30 -0
  148. package/dist/esm/post-tab-header.entry.js +2 -2
  149. package/dist/esm/{post-tab-panel-d9ecc10e.js → post-tab-panel-cb02df49.js} +2 -2
  150. package/dist/esm/post-tab-panel.entry.js +2 -2
  151. package/dist/esm/{post-tabs-e98a47e8.js → post-tabs-81085d7b.js} +3 -3
  152. package/dist/esm/post-tabs.entry.js +2 -2
  153. package/dist/esm/{post-tag-40a65871.js → post-tag-103bfff5.js} +2 -2
  154. package/dist/esm/post-tag.entry.js +2 -2
  155. package/dist/esm/post-togglebutton-0e714838.js +26 -0
  156. package/dist/esm/post-togglebutton.entry.js +3 -0
  157. package/dist/esm/{post-tooltip-3b1e121c.js → post-tooltip-2c5ff736.js} +28 -16
  158. package/dist/esm/post-tooltip.entry.js +2 -2
  159. package/dist/post-components/index.esm.js +1 -1
  160. package/dist/post-components/p-06980a04.js +1 -0
  161. package/dist/post-components/p-0af7dfbb.js +1 -0
  162. package/dist/post-components/p-0f699dbc.js +1 -0
  163. package/dist/post-components/p-12262945.entry.js +1 -0
  164. package/dist/post-components/p-2504dace.entry.js +1 -0
  165. package/dist/post-components/p-27343d32.entry.js +1 -0
  166. package/dist/post-components/{p-42c628fd.js → p-2a456317.js} +1 -1
  167. package/dist/post-components/p-2c3980d2.js +1 -0
  168. package/dist/post-components/p-31d38040.js +1 -0
  169. package/dist/post-components/{p-76dbca34.entry.js → p-339e000e.entry.js} +1 -1
  170. package/dist/post-components/p-3b325360.entry.js +1 -0
  171. package/dist/post-components/{p-2069e764.js → p-3e65ba47.js} +1 -1
  172. package/dist/post-components/p-3f417208.entry.js +1 -0
  173. package/dist/post-components/p-4922deaf.entry.js +1 -0
  174. package/dist/post-components/p-6c7546b8.entry.js +1 -0
  175. package/dist/post-components/{p-e0dc4fac.js → p-6f56a13d.js} +3 -3
  176. package/dist/post-components/p-7eee2b6a.js +1 -0
  177. package/dist/post-components/p-816623f0.entry.js +1 -0
  178. package/dist/post-components/p-83cd3885.entry.js +1 -0
  179. package/dist/post-components/{p-879ae242.js → p-8b6f7f04.js} +1 -1
  180. package/dist/post-components/p-9abe554b.js +1 -0
  181. package/dist/post-components/p-9ea6103e.entry.js +1 -0
  182. package/dist/post-components/p-a0a7c2c1.entry.js +1 -0
  183. package/dist/post-components/p-abf9ffdc.entry.js +1 -0
  184. package/dist/post-components/p-b4a2c7b7.entry.js +1 -0
  185. package/dist/post-components/{p-77a757d4.js → p-b7ef401f.js} +1 -1
  186. package/dist/post-components/p-b8a9cf2d.js +1 -0
  187. package/dist/post-components/p-bb103905.js +1 -0
  188. package/dist/post-components/{p-75514d7d.js → p-c819933c.js} +1 -1
  189. package/dist/post-components/p-ccd8a221.entry.js +1 -0
  190. package/dist/post-components/p-cfc1727f.entry.js +1 -0
  191. package/dist/post-components/{p-fc2c7222.js → p-d4465c2b.js} +1 -1
  192. package/dist/post-components/{p-af8cfb8e.js → p-d4cef624.js} +1 -1
  193. package/dist/post-components/p-da449573.js +1 -0
  194. package/dist/post-components/p-df5bdda5.entry.js +1 -0
  195. package/dist/post-components/{p-7a20605b.js → p-ed834dde.js} +1 -1
  196. package/dist/post-components/p-f1416918.entry.js +1 -0
  197. package/dist/post-components/p-f171b18b.entry.js +1 -0
  198. package/dist/post-components/p-f4dbd35f.entry.js +1 -0
  199. package/dist/post-components/p-f6b44820.js +1 -0
  200. package/dist/post-components/p-fa7af203.js +1 -0
  201. package/dist/post-components/p-fc91cbc2.js +1 -0
  202. package/dist/post-components/post-components.esm.js +1 -1
  203. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  204. package/dist/types/components/post-banner/banner-types.d.ts +2 -0
  205. package/dist/types/components/post-banner/post-banner.d.ts +49 -0
  206. package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
  207. package/dist/types/components/post-icon/post-icon.d.ts +2 -5
  208. package/dist/types/components/post-list/post-list.d.ts +1 -1
  209. package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -0
  210. package/dist/types/components/post-tag/post-tag.d.ts +1 -1
  211. package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +13 -0
  212. package/dist/types/components.d.ts +92 -79
  213. package/dist/types/index.d.ts +2 -1
  214. package/loaders/get-root.js +9 -0
  215. package/loaders/index.d.ts +4 -2
  216. package/loaders/index.js +2 -1
  217. package/loaders/package.js +1 -1
  218. package/loaders/{post-alert.d.ts → post-banner.d.ts} +4 -4
  219. package/loaders/post-banner.js +128 -0
  220. package/loaders/post-card-control.js +3 -3
  221. package/loaders/post-collapsible-trigger2.js +1 -8
  222. package/loaders/post-header.js +1 -1
  223. package/loaders/post-icon2.js +22 -29
  224. package/loaders/post-language-option.js +1 -1
  225. package/loaders/post-list-item.js +1 -1
  226. package/loaders/post-list.js +2 -2
  227. package/loaders/post-logo.js +1 -1
  228. package/loaders/post-mainnavigation.js +1 -1
  229. package/loaders/post-megadropdown-trigger.js +1 -1
  230. package/loaders/post-megadropdown.js +1 -1
  231. package/loaders/post-menu-item.js +1 -1
  232. package/loaders/post-menu-trigger.js +4 -2
  233. package/loaders/post-menu.js +1 -1
  234. package/loaders/post-popover.js +2 -2
  235. package/loaders/post-popovercontainer2.js +2 -2
  236. package/loaders/post-rating.js +1 -1
  237. package/loaders/post-tab-header.js +2 -2
  238. package/loaders/post-tab-panel.js +1 -1
  239. package/loaders/post-tabs.js +2 -2
  240. package/loaders/post-tag.js +1 -1
  241. package/loaders/post-togglebutton.d.ts +11 -0
  242. package/loaders/post-togglebutton.js +46 -0
  243. package/loaders/post-tooltip.js +27 -15
  244. package/package.json +5 -5
  245. package/dist/cjs/post-alert-5333a23c.js +0 -99
  246. package/dist/cjs/post-card-control-b289ddcf.js +0 -272
  247. package/dist/cjs/post-tab-header-03b20f24.js +0 -32
  248. package/dist/collection/components/post-alert/alert-types.js +0 -1
  249. package/dist/collection/components/post-alert/post-alert.css +0 -7
  250. package/dist/components/post-alert.js +0 -6
  251. package/dist/components/post-alert2.js +0 -136
  252. package/dist/esm/package-d0380f19.js +0 -3
  253. package/dist/esm/post-alert-0679e14b.js +0 -97
  254. package/dist/esm/post-card-control-53b9ca94.js +0 -270
  255. package/dist/esm/post-tab-header-6efc530f.js +0 -30
  256. package/dist/post-components/p-029c91d8.entry.js +0 -1
  257. package/dist/post-components/p-03c850fa.entry.js +0 -1
  258. package/dist/post-components/p-1d8a41d3.js +0 -1
  259. package/dist/post-components/p-3705d2b4.js +0 -1
  260. package/dist/post-components/p-3aaea2a7.js +0 -1
  261. package/dist/post-components/p-3b4342e4.entry.js +0 -1
  262. package/dist/post-components/p-3b5bd4a4.entry.js +0 -1
  263. package/dist/post-components/p-3f785d16.entry.js +0 -1
  264. package/dist/post-components/p-40a57111.entry.js +0 -1
  265. package/dist/post-components/p-41f5f626.entry.js +0 -1
  266. package/dist/post-components/p-43451d07.js +0 -1
  267. package/dist/post-components/p-49a42850.js +0 -1
  268. package/dist/post-components/p-4f1a40dd.entry.js +0 -1
  269. package/dist/post-components/p-6e7bde44.js +0 -1
  270. package/dist/post-components/p-70c016ab.js +0 -1
  271. package/dist/post-components/p-77af2367.entry.js +0 -1
  272. package/dist/post-components/p-976c2742.js +0 -1
  273. package/dist/post-components/p-9cda2b0d.entry.js +0 -1
  274. package/dist/post-components/p-9fab4d3c.js +0 -1
  275. package/dist/post-components/p-a0226aec.js +0 -1
  276. package/dist/post-components/p-aa890e24.entry.js +0 -1
  277. package/dist/post-components/p-ac6d9496.js +0 -1
  278. package/dist/post-components/p-ad6e41d5.entry.js +0 -1
  279. package/dist/post-components/p-c95813b2.entry.js +0 -1
  280. package/dist/post-components/p-d3814644.entry.js +0 -1
  281. package/dist/post-components/p-d5b02b44.entry.js +0 -1
  282. package/dist/post-components/p-f404d0bb.entry.js +0 -1
  283. package/dist/post-components/p-f5b933bc.entry.js +0 -1
  284. package/dist/post-components/p-fbda2556.entry.js +0 -1
  285. package/dist/types/components/post-alert/alert-types.d.ts +0 -2
  286. package/dist/types/components/post-alert/post-alert.d.ts +0 -54
  287. package/loaders/post-alert.js +0 -139
@@ -37,7 +37,7 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
37
37
  this.hide();
38
38
  }
39
39
  render() {
40
- return (h(Host, { key: '6b30399852561a911c04a79c7c785bb5cf8e68ff', slot: "post-mainnavigation" }, h("post-popovercontainer", { key: 'caa196c59c0177948a73c43033f7399344068d77', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: '7c88bd1ca7fac00b9ab0cb1d73252c6990484fb2', class: "megadropdown" }, h("div", { key: '25073177e9c9a05fca93b3b0abbed18f6b2a075b', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '06a153e974f60476f2796e03afea3ad86c7560ca', name: "back-button" })), h("slot", { key: 'ea95044efbd609894dd96b3aa8662756e14711af' })))));
40
+ return (h(Host, { key: '96d71da6b3cfcd8980d7e60cb383d545c754d7b3', slot: "post-mainnavigation" }, h("post-popovercontainer", { key: 'ec27bcdae9da77299d59d8869be60c08816eef85', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: '0b97d183a5fad18401aa876cf19d3975a1757d18', class: "megadropdown" }, h("div", { key: '4eb9715d7cf88898dddae702f71d430f1e3810af', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: 'a21d4b50b1d04211ecfb5d0b145452a6bbae0ae0', name: "back-button" })), h("slot", { key: '5a4dd77f0f91bf6a61ef1cf9bdd4371875a52d2e' })))));
41
41
  }
42
42
  static get style() { return PostMegadropdownStyle0; }
43
43
  }, [4, "post-megadropdown", {
@@ -11,7 +11,7 @@ const PostMenuItem$1 = /*@__PURE__*/ proxyCustomElement(class PostMenuItem exten
11
11
  this.__attachShadow();
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: '7984d6be0ae981f54618b4c0d7a80bfcc71f16a3', role: "menuitem", "data-version": version }, h("slot", { key: '7fbb20f1586676b1c8f933e0f067144bbcca825f' })));
14
+ return (h(Host, { key: '48720f09bc2ab4a979d215f590dcb80e39422e46', role: "menuitem", "data-version": version }, h("slot", { key: '5a0c1aeb2c96a02c2e4567d3e1e83fd6e3a3aace' })));
15
15
  }
16
16
  get host() { return this; }
17
17
  static get style() { return PostMenuItemStyle0; }
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { v as version } from './package.js';
3
3
  import { c as checkType } from './check-type.js';
4
+ import { g as getRoot } from './get-root.js';
4
5
 
5
6
  const postMenuTriggerCss = ":host{display:inline-block}";
6
7
  const PostMenuTriggerStyle0 = postMenuTriggerCss;
@@ -31,7 +32,7 @@ const PostMenuTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger
31
32
  checkType(forValue, 'string', 'The "for" property is required and should be a string.');
32
33
  }
33
34
  get menu() {
34
- const ref = document.getElementById(this.for);
35
+ const ref = this.root.getElementById(this.for);
35
36
  return ref && ref.localName === 'post-menu' ? ref : null;
36
37
  }
37
38
  handleToggle() {
@@ -46,6 +47,7 @@ const PostMenuTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger
46
47
  }
47
48
  }
48
49
  componentDidLoad() {
50
+ this.root = getRoot(this.host);
49
51
  this.validateControlFor();
50
52
  this.slottedButton = this.host.querySelector('button');
51
53
  if (this.slottedButton) {
@@ -60,7 +62,7 @@ const PostMenuTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger
60
62
  }
61
63
  }
62
64
  render() {
63
- return (h(Host, { key: 'ce2a30260fae6eecae5b2feb0538ac2ce66b989c', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'a69d7dc4a1a798332bd9881cedb216ef82d279ab' })));
65
+ return (h(Host, { key: '5c07c2a808f5048b870d77f1f65d84bc2007431f', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'ab779f01983e2c88f09707ab8b12eb326ac6946b' })));
64
66
  }
65
67
  get host() { return this; }
66
68
  static get watchers() { return {
@@ -168,7 +168,7 @@ const PostMenu$1 = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLE
168
168
  return menuItems;
169
169
  }
170
170
  render() {
171
- return (h(Host, { key: '4447ff6878a1b0f38b533196466b33217f9499d4', "data-version": version }, h("post-popovercontainer", { key: '918e2b8a662cdb64972cb0729b8b077e1bca5e0a', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '40b04b6c0d65cc3c10f6b8b037ec3ff24d1b907b', class: "popover-container" }, h("slot", { key: 'e836fdb9e29961f3b6c6c13261e8eef0f874cfb6' })))));
171
+ return (h(Host, { key: '80720b7f1d029833de466c84c9fe931460a5b9b1', "data-version": version }, h("post-popovercontainer", { key: 'b1e610ad0c0f33a09ac3fee5954567e957653e76', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'a9cd7f6efcd762b548acb7c8d3bf614ccdedd504', class: "popover-container" }, h("slot", { key: 'e278c4020b70c8bd5f6a1e4a3ac8cbaf37f2b786' })))));
172
172
  }
173
173
  get host() { return this; }
174
174
  static get style() { return PostMenuStyle0; }
@@ -3,7 +3,7 @@ import { v as version } from './package.js';
3
3
  import { g as getAttributeObserver } from './attribute-observer.js';
4
4
  import { d as defineCustomElement$2 } from './post-popovercontainer2.js';
5
5
 
6
- const postPopoverCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.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:var(--post-device-border-radius-round);color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-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,.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}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
6
+ const postPopoverCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.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:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-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}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.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}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px;max-width:100%}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
7
7
  const PostPopoverStyle0 = postPopoverCss;
8
8
 
9
9
  /**
@@ -96,7 +96,7 @@ const PostPopover$1 = /*@__PURE__*/ proxyCustomElement(class PostPopover extends
96
96
  this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
97
97
  }
98
98
  render() {
99
- return (h(Host, { key: '22964a2be347979d1ebaaec468edfd4b079776ff', "data-version": version }, h("post-popovercontainer", { key: 'a108ed03721a453ce73a850913d93b8bfaf83922', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '943f1a914ada58c3f8b085613b47ed4b7c55e591', class: "popover-container" }, h("div", { key: 'a6a8dec53c9190c48d1b3b217c979d78b2f32995', class: "popover-content" }, h("slot", { key: '555bc4537d6bd62b60186db9700588eb3ec38ac2' })), h("button", { key: 'db0826565312bba9bc48a88cd84636a903eeb94f', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'aef92ba6e586e02924a09d459e4d753ad18f72f7', class: "visually-hidden" }, this.closeButtonCaption))))));
99
+ return (h(Host, { key: 'e716f0b45da8a21c43afba019dbf84a87bc49fab', "data-version": version }, h("post-popovercontainer", { key: '530ffbd07a0f2b2edc26db0c5667c9de372edf01', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '4d7420876786f835aef9decf92030651f5117f52', class: "popover-container" }, h("div", { key: 'e557e3e1f4566fc81b1255ef628e7c58d59fc596', class: "popover-content" }, h("slot", { key: 'ea5e3407ec41868471d388a02cb8a4ba32889d6c' })), h("button", { key: 'af21850867d713f7c5a825d4ac824b12ce40f3e7', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'b2f85d5efd0fd424448efa73ee9ad07c5bab2947', class: "visually-hidden" }, this.closeButtonCaption))))));
100
100
  }
101
101
  get host() { return this; }
102
102
  static get style() { return PostPopoverStyle0; }
@@ -2176,9 +2176,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
2176
2176
  }
2177
2177
  }
2178
2178
  render() {
2179
- return (h(Host, { key: '97a63bfbf098bd3463eb75678e54ddcc9e4790b3', "data-version": version }, this.arrow && (h("span", { key: 'f6eaa7bd6cd3eb63d15e7d91825365661daae7dd', class: "arrow", ref: el => {
2179
+ return (h(Host, { key: '11e3be5293791aa58da291f2a0f17677ad0e0e63', "data-version": version }, this.arrow && (h("span", { key: '00d76dcd41bf267bb50290ae439c49333ade68b3', class: "arrow", ref: el => {
2180
2180
  this.arrowRef = el;
2181
- } })), h("slot", { key: '414055000891719b74c2c449fec2c87a60b62047' })));
2181
+ } })), h("slot", { key: '7c579254fc1b76c91ddecf0952945339cf5bc7fd' })));
2182
2182
  }
2183
2183
  get host() { return this; }
2184
2184
  static get style() { return PostPopovercontainerStyle0; }
@@ -74,7 +74,7 @@ const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends H
74
74
  }
75
75
  }
76
76
  render() {
77
- return (h(Host, { key: '0202a629d68bc85d00fb3ccae63073938fb174d3', "data-version": version }, h("div", { key: '7de2c78d498957dbd988472729fde2ea04162490', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
77
+ return (h(Host, { key: 'd5bce841329555bdb71e7f861b7d1f74d93dbcbc', "data-version": version }, h("div", { key: '0c81664652bd279c833ffabe63f082e4849e611a', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
78
78
  'star': true,
79
79
  'before-hover': i < this.hoveredIndex,
80
80
  'active': i < Math.round(this.currentRating),
@@ -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 { c as checkNonEmpty } from './check-non-empty.js';
4
4
 
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}";
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) .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: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
6
  const PostTabHeaderStyle0 = postTabHeaderCss;
7
7
 
8
8
  const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
@@ -20,7 +20,7 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
20
20
  this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: 'f105dabe8a61308d5aa361a6aeaad2f938cf7656', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '3abc0c8fab0a0ab1dd538e20831980b4672ae79a' })));
23
+ return (h(Host, { key: '4ca8efb0e3a6a429442be5406eb43f9cd2406b49', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '049d4c8378c42fc31b572d8b073fef523fbc6f37' })));
24
24
  }
25
25
  get host() { return this; }
26
26
  static get watchers() { return {
@@ -17,7 +17,7 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
17
17
  this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
18
18
  }
19
19
  render() {
20
- return (h(Host, { key: '9018d11d85d1ce0b83e74987f8fb96eb1b873a40', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '45e2214fbeb5d4c2b4e5e35eb5ad74d99033a0a3' })));
20
+ return (h(Host, { key: '8116daf192361e9c9333c1a94afa4d9eb5cce3d1', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '646fc0fa564f76c6f2a1f706cc753f11306ca231' })));
21
21
  }
22
22
  get host() { return this; }
23
23
  static get style() { return PostTabPanelStyle0; }
@@ -23,7 +23,7 @@ const customOnReady = (callback) => {
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.list-bullet>li{margin:0;padding:0}.tabs.list-bullet>li::before{display:none}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}";
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{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}";
27
27
  const PostTabsStyle0 = postTabsCss;
28
28
 
29
29
  const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLElement {
@@ -164,7 +164,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
164
164
  nextTab.focus();
165
165
  }
166
166
  render() {
167
- return (h(Host, { key: '3c9d7351fa09531238892f0bd05447379f46fdb4', "data-version": version }, h("div", { key: '1eff106f6324302155e809a58cd3367bb7bdbd76', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'fc5917d92b577f99fb19fa80ecd1a863ffeaa4d8', class: "tabs", role: "tablist" }, h("slot", { key: 'af35884271ca9d75dbbd113e05fd052c4691c53e', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '4908774e2306e432af65b94a9dd5e1d257569652', class: "tab-content", part: "content" }, h("slot", { key: 'c0eb44e39b0cffe57c42c51dd74e605e74241f70', onSlotchange: () => this.moveMisplacedTabs() }))));
167
+ return (h(Host, { key: '2a7fe6d86dc18dcebaa25b5466ffc88de96114e6', "data-version": version }, h("div", { key: '71940a2be5c36f591f0948c7f8dedbb26e98736d', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'bd9fa6ba6e2bd037a0a09365d4906b7288f929c6', class: "tabs", role: "tablist" }, h("slot", { key: '72a369206b0f81e88ff9741a69e6b58ba3239f5e', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '9c544b7bae6dc2abb3e297015216c88872a78b8e', class: "tab-content", part: "content" }, h("slot", { key: '2f2e274ecb2bbe19c8f016b8d7a1f7a7038d6646', onSlotchange: () => this.moveMisplacedTabs() }))));
168
168
  }
169
169
  get host() { return this; }
170
170
  static get style() { return PostTabsStyle0; }
@@ -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: '01f369b7c6803f710fb0b5eae652d6d1beb340ed', "data-version": version }, h("div", { key: 'bba40e4deaa43e64c9bc32c2ad4a3e3515bdf8dd', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '9addb054f9555c9a97d8825a148958b2e2b863a7', class: "tag-text" }, h("slot", { key: '315cf79690fa489c61edd6ce6b304b94a3866b8c' })))));
38
+ return (h(Host, { key: '52768516080d294eaf20034e18e6a776149fa97e', "data-version": version }, h("div", { key: 'f342d20bfccfdf650f5c6e943065f090a13fd94c', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '5286cb07cbfa5b20e0dfbbd4847a3dda49a19278', class: "tag-text" }, h("slot", { key: '6215a61b4e10d6c0274019f183ef90e46d282114' })))));
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,46 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { v as version } from './package.js';
3
+
4
+ const postTogglebuttonCss = ":host{cursor:pointer}";
5
+ const PostTogglebuttonStyle0 = postTogglebuttonCss;
6
+
7
+ const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ this.__attachShadow();
12
+ this.handleClick = () => {
13
+ this.toggled = !this.toggled;
14
+ };
15
+ this.handleKeydown = (event) => {
16
+ if (event.key === 'Enter') {
17
+ this.toggled = !this.toggled;
18
+ }
19
+ };
20
+ this.toggled = false;
21
+ }
22
+ render() {
23
+ return (h(Host, { key: '253ca4026764e8d2c0979341a617fffb6d0d2e8e', slot: "post-togglebutton", tabindex: "0", "data-version": version, role: "button", "aria-pressed": this.toggled.toString(), onClick: this.handleClick, onKeyDown: this.handleKeydown }, h("span", { key: 'e8c7c7492986993ca1ec6c38743555030b068dbb', hidden: this.toggled }, h("slot", { key: 'd012a64cf1da8acc149ad4c5929cfe3fa31619a3', name: "untoggled" })), h("span", { key: '6603b12b05870348e979a9283ac4a17f15a217c6', hidden: !this.toggled }, h("slot", { key: '1306cb988d645ca297fb32d8b743ae65abfe644b', name: "toggled" }))));
24
+ }
25
+ static get style() { return PostTogglebuttonStyle0; }
26
+ }, [1, "post-togglebutton", {
27
+ "toggled": [1540]
28
+ }]);
29
+ function defineCustomElement$1() {
30
+ if (typeof customElements === "undefined") {
31
+ return;
32
+ }
33
+ const components = ["post-togglebutton"];
34
+ components.forEach(tagName => { switch (tagName) {
35
+ case "post-togglebutton":
36
+ if (!customElements.get(tagName)) {
37
+ customElements.define(tagName, PostTogglebutton$1);
38
+ }
39
+ break;
40
+ } });
41
+ }
42
+
43
+ const PostTogglebutton = PostTogglebutton$1;
44
+ const defineCustomElement = defineCustomElement$1;
45
+
46
+ 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) {
@@ -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,8 +4801,11 @@ 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;
@@ -4931,18 +4932,29 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4931
4932
  * @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
4932
4933
  */
4933
4934
  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';
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);
4941
4954
  }
4942
4955
  else {
4943
- this.host.style.pointerEvents = 'auto';
4956
+ showTooltip();
4944
4957
  }
4945
- this.popoverRef.show(target);
4946
4958
  }
4947
4959
  /**
4948
4960
  * Programmatically hide this tooltip
@@ -4977,7 +4989,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
4977
4989
  }
4978
4990
  render() {
4979
4991
  const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
4980
- return (h(Host, { key: '8e2bd1f11a44a0d39ad797f12b880338d59ea006', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'ff4fdbf72ca4b95d5f4e925fedbfbcf7e281410f', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '770a98cff11b963ec37559683a27a216250e8bde' }))));
4992
+ return (h(Host, { key: '8c14096295ee459a3a727e361eaacf0892eb1824', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '65138a845ec05bd830e6534519ac4df7bb00067d', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '5296d0864df7d07b498924a40a475ff7c94be6b8' }))));
4981
4993
  }
4982
4994
  get host() { return this; }
4983
4995
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-components",
3
- "version": "9.0.0-next.5",
3
+ "version": "9.0.0-next.7",
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,7 +26,7 @@
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.5",
29
+ "@swisspost/design-system-styles": "9.0.0-next.7",
30
30
  "ally.js": "1.4.1",
31
31
  "long-press-event": "2.5.0"
32
32
  },
@@ -66,13 +66,13 @@
66
66
  "scripts": {
67
67
  "dev": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
68
68
  "start": "stencil build --dev --watch --docs --docs-readme",
69
- "build": "stencil build --docs-readme",
69
+ "build": "rimraf dist && stencil build --docs-readme",
70
70
  "clean": "rimraf www dist loader loaders",
71
71
  "test": "pnpm run unit",
72
72
  "unit": "stencil test --spec",
73
73
  "unit:watch": "stencil test --spec --watchAll --silent",
74
- "e2e": "cypress run",
75
- "e2e:ci": "xvfb-run -a cypress run",
74
+ "e2e": "cypress run --browser chrome",
75
+ "e2e:ci": "xvfb-run -a cypress run --browser chrome",
76
76
  "e2e:watch": "cypress open",
77
77
  "generate": "stencil generate",
78
78
  "lint": "eslint src/**/*{.ts,.tsx}"
@@ -1,99 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-e1f32cce.js');
4
- const _package = require('./package-53892d3d.js');
5
- const fade = require('./fade-35a3633a.js');
6
- const index$1 = require('./index-824d2b71.js');
7
- const checkType = require('./check-type-64af82a9.js');
8
- const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
9
-
10
- const ALERT_TYPES = ['primary', 'success', 'warning', 'danger', 'info', 'gray'];
11
-
12
- const postAlertCss = ".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-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}.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::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert.no-icon::before{content:unset}.alert.no-icon>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}.alert-action>.alert-content{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 )}.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)::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)::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)::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)::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)::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)::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)::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)::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:var(--post-device-border-radius-round);color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-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,.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}";
13
- const PostAlertStyle0 = postAlertCss;
14
-
15
- const PostAlert = class {
16
- constructor(hostRef) {
17
- index.registerInstance(this, hostRef);
18
- this.postDismissed = index.createEvent(this, "postDismissed", 7);
19
- this.alertId = crypto.randomUUID();
20
- this.classes = undefined;
21
- this.hasActions = undefined;
22
- this.hasHeading = undefined;
23
- this.onDismissButtonClick = () => this.dismiss();
24
- this.dismissible = false;
25
- this.dismissLabel = undefined;
26
- this.fixed = false;
27
- this.icon = undefined;
28
- this.type = 'primary';
29
- }
30
- validateDismissible(isDismissible = this.dismissible) {
31
- checkType.checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
32
- setTimeout(() => this.validateDismissLabel());
33
- }
34
- validateDismissLabel(dismissLabel = this.dismissLabel) {
35
- if (this.dismissible) {
36
- checkNonEmpty.checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
37
- }
38
- }
39
- validateFixed(isFixed = this.fixed) {
40
- checkType.checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
41
- }
42
- validateIcon(icon = this.icon) {
43
- index$1.checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
44
- }
45
- validateType(type = this.type) {
46
- index$1.checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
47
- }
48
- componentDidLoad() {
49
- this.validateDismissible();
50
- this.validateFixed();
51
- this.validateIcon();
52
- this.validateType();
53
- }
54
- componentWillRender() {
55
- var _a;
56
- this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
57
- this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
58
- this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
59
- if (this.dismissible)
60
- this.classes += ' alert-dismissible';
61
- if (this.hasActions)
62
- this.classes += ' alert-action';
63
- if (this.fixed)
64
- this.classes += ' alert-fixed-bottom';
65
- if (this.icon === 'none')
66
- this.classes += ' no-icon';
67
- }
68
- /**
69
- * Triggers alert dismissal programmatically (same as clicking on the close button (×)).
70
- */
71
- async dismiss() {
72
- const dismissal = fade.fadeOut(this.host);
73
- await dismissal.finished;
74
- this.host.remove();
75
- this.postDismissed.emit();
76
- }
77
- render() {
78
- const defaultAlertContent = [
79
- this.hasHeading && (index.h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, index.h("slot", { key: 'a3404eee0322cc2b50125bf4ca08969e33d15763', name: "heading" }))),
80
- index.h("slot", { key: `${this.alertId}-message` }),
81
- ];
82
- const actionAlertContent = [
83
- index.h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
84
- index.h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, index.h("slot", { key: '50941abd468008cd58a1e05577243d1046a0e20e', name: "actions" })),
85
- ];
86
- return (index.h(index.Host, { key: '99c1e3b4cc943d8be2d5abe7b2b27dce03548d15', "data-version": _package.version }, index.h("div", { key: 'a290771bcc1234684502f524fe6e7e44501fc004', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (index.h("button", { key: '57c9cdbec53430b0fc6e121b5928bb14b86c37e0', class: "btn-close", onClick: this.onDismissButtonClick }, index.h("span", { key: '82d59b6deb736b4053b2b0876c87456c160928ee', 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)));
87
- }
88
- get host() { return index.getElement(this); }
89
- static get watchers() { return {
90
- "dismissible": ["validateDismissible"],
91
- "dismissLabel": ["validateDismissLabel"],
92
- "fixed": ["validateFixed"],
93
- "icon": ["validateIcon"],
94
- "type": ["validateType"]
95
- }; }
96
- };
97
- PostAlert.style = PostAlertStyle0;
98
-
99
- exports.PostAlert = PostAlert;