@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.56

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 (400) hide show
  1. package/dist/{esm/breakpoints-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
  2. package/dist/cjs/debounce-BsIBi_-2.js +13 -0
  3. package/dist/cjs/environment-BQE9Unf_.js +52 -0
  4. package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
  5. package/dist/cjs/fade-CPQhl1fP.js +26 -0
  6. package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
  7. package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
  8. package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
  9. package/dist/cjs/{index-B4gYpuJF.js → index-CKNxhb0S.js} +21 -13
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{package-DkJrv93P.js → package-CY7IOoiw.js} +1 -1
  12. package/dist/cjs/post-accordion_2.cjs.entry.js +11 -11
  13. package/dist/cjs/post-avatar.cjs.entry.js +10 -10
  14. package/dist/cjs/post-back-to-top.cjs.entry.js +16 -40
  15. package/dist/cjs/post-banner.cjs.entry.js +11 -10
  16. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +7 -7
  17. package/dist/cjs/post-breadcrumbs.cjs.entry.js +22 -31
  18. package/dist/cjs/post-card-control.cjs.entry.js +16 -16
  19. package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +481 -484
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +33 -33
  21. package/dist/cjs/post-components.cjs.js +2 -2
  22. package/dist/cjs/post-env-test.cjs.entry.js +15 -0
  23. package/dist/cjs/post-footer.cjs.entry.js +21 -19
  24. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  25. package/dist/cjs/post-pagination.cjs.entry.js +589 -0
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +46 -30
  27. package/dist/cjs/post-popover.cjs.entry.js +11 -11
  28. package/dist/cjs/post-rating.cjs.entry.js +13 -13
  29. package/dist/cjs/post-stepper-item.cjs.entry.js +4 -4
  30. package/dist/cjs/post-stepper.cjs.entry.js +29 -26
  31. package/dist/cjs/post-tab-item.cjs.entry.js +49 -0
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +9 -9
  33. package/dist/cjs/post-tabs.cjs.entry.js +191 -38
  34. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +8 -8
  35. package/dist/cjs/post-tooltip.cjs.entry.js +6 -6
  36. package/dist/cjs/utils-s05L2ulk.js +26 -0
  37. package/dist/collection/animations/collapse.js +3 -3
  38. package/dist/collection/animations/fade-slide.js +33 -0
  39. package/dist/collection/animations/fade.js +19 -7
  40. package/dist/collection/animations/index.js +2 -0
  41. package/dist/collection/animations/slide.js +25 -21
  42. package/dist/collection/animations/types.js +14 -0
  43. package/dist/collection/animations/utils.js +8 -0
  44. package/dist/collection/collection-manifest.json +6 -6
  45. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  46. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  47. package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -4
  48. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  49. package/dist/collection/components/post-back-to-top/post-back-to-top.js +14 -14
  50. package/dist/collection/components/post-banner/post-banner.css +4 -1
  51. package/dist/collection/components/post-banner/post-banner.js +3 -3
  52. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
  53. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +24 -24
  54. package/dist/collection/components/post-card-control/post-card-control.js +2 -2
  55. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  56. package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
  57. package/dist/collection/components/post-collapsible/post-collapsible.js +27 -27
  58. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
  59. package/dist/collection/components/post-footer/post-footer.css +1 -1
  60. package/dist/collection/components/post-footer/post-footer.js +17 -15
  61. package/dist/collection/components/post-header/post-header.css +1 -1
  62. package/dist/collection/components/post-header/post-header.js +113 -82
  63. package/dist/collection/components/post-icon/post-icon.js +6 -4
  64. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
  65. package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +23 -23
  66. package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
  67. package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +13 -13
  68. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  69. package/dist/collection/components/post-logo/post-logo.css +3 -1
  70. package/dist/collection/components/post-logo/post-logo.js +1 -1
  71. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  72. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
  73. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  74. package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
  75. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
  76. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +79 -73
  77. package/dist/collection/components/post-menu/post-menu.css +1 -1
  78. package/dist/collection/components/post-menu/post-menu.js +34 -34
  79. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  80. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
  81. package/dist/collection/components/post-pagination/post-pagination.css +1 -0
  82. package/dist/collection/components/post-pagination/post-pagination.js +838 -0
  83. package/dist/collection/components/post-popover/post-popover.js +9 -9
  84. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +43 -27
  85. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  86. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +45 -92
  87. package/dist/collection/components/post-rating/post-rating.js +2 -2
  88. package/dist/collection/components/post-stepper/post-stepper.js +34 -31
  89. package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
  90. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  91. package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
  92. package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
  93. package/dist/collection/components/post-tab-panel/post-tab-panel.js +9 -9
  94. package/dist/collection/components/post-tabs/post-tabs.js +230 -57
  95. package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
  96. package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
  97. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
  98. package/dist/collection/utils/environment.js +47 -2
  99. package/dist/collection/utils/event-from.js +2 -2
  100. package/dist/collection/utils/get-focusable-children.js +29 -21
  101. package/dist/collection/utils/is-motion-reduced.js +1 -1
  102. package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
  103. package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
  104. package/dist/component-names.json +4 -5
  105. package/dist/components/breakpoints.js +90 -3
  106. package/dist/components/debounce.js +11 -0
  107. package/dist/components/environment.js +49 -0
  108. package/dist/components/event-from.js +2 -2
  109. package/dist/components/fade-slide.js +36 -0
  110. package/dist/components/fade.js +21 -8
  111. package/dist/components/get-focusable-children.js +29 -21
  112. package/dist/components/get-root.js +1 -1
  113. package/dist/components/index.d.ts +10 -10
  114. package/dist/components/index.js +5 -5
  115. package/dist/components/package.js +1 -1
  116. package/dist/components/post-accordion-item2.js +4 -5
  117. package/dist/components/post-accordion2.js +2 -3
  118. package/dist/components/post-avatar.js +2 -3
  119. package/dist/components/post-back-to-top.js +14 -40
  120. package/dist/components/post-banner.js +5 -6
  121. package/dist/components/post-breadcrumb-item2.js +2 -3
  122. package/dist/components/post-breadcrumbs.js +23 -33
  123. package/dist/components/post-card-control.js +3 -4
  124. package/dist/components/post-closebutton2.js +3 -4
  125. package/dist/components/post-collapsible-trigger2.js +2 -3
  126. package/dist/components/post-collapsible2.js +25 -25
  127. package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
  128. package/dist/components/post-env-test.js +31 -0
  129. package/dist/components/post-footer.js +17 -16
  130. package/dist/components/post-header.js +97 -95
  131. package/dist/components/post-icon2.js +8 -6
  132. package/dist/components/post-language-menu-item.d.ts +11 -0
  133. package/dist/components/post-language-menu-item.js +98 -0
  134. package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
  135. package/dist/components/post-language-menu.js +156 -0
  136. package/dist/components/post-linkarea.js +1 -1
  137. package/dist/components/post-logo.js +3 -4
  138. package/dist/components/post-mainnavigation.js +21 -32
  139. package/dist/components/post-megadropdown-trigger.js +71 -78
  140. package/dist/components/post-megadropdown.js +182 -77
  141. package/dist/components/post-menu-item2.js +1 -1
  142. package/dist/components/post-menu-trigger2.js +2 -3
  143. package/dist/components/post-menu2.js +34 -35
  144. package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  145. package/dist/components/post-pagination.js +635 -0
  146. package/dist/components/post-popover-trigger.js +41 -26
  147. package/dist/components/post-popover.js +8 -9
  148. package/dist/components/post-popovercontainer2.js +44 -40
  149. package/dist/components/post-rating.js +2 -3
  150. package/dist/components/post-stepper-item.js +2 -2
  151. package/dist/components/post-stepper.js +31 -29
  152. package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  153. package/dist/components/post-tab-item.js +70 -0
  154. package/dist/components/post-tab-panel.js +8 -9
  155. package/dist/components/post-tabs.js +192 -37
  156. package/dist/components/post-togglebutton.js +1 -51
  157. package/dist/components/post-togglebutton2.js +53 -0
  158. package/dist/components/post-tooltip-trigger.js +3 -3
  159. package/dist/components/post-tooltip.js +2 -3
  160. package/dist/components/react/index.js +1 -1
  161. package/dist/{cjs/breakpoints-CEkeixld.js → components/react/p-B8YiQ3mz.js} +89 -6
  162. package/dist/components/react/{p-DBPOV12C.js → p-BOLlAY91.js} +9 -7
  163. package/dist/components/react/p-BVCjnh6Q.js +36 -0
  164. package/dist/components/react/{p-CBFgkSgY.js → p-BVGcVycs.js} +1 -1
  165. package/dist/components/react/{p-LtiDhYis.js → p-BYCGzO-t.js} +5 -6
  166. package/dist/components/react/p-C9hMpmsD.js +11 -0
  167. package/dist/components/react/{p-BVXiQdHq.js → p-CJ13r5fi.js} +29 -21
  168. package/dist/components/react/{p-CSAMO7iJ.js → p-CnZWXrbA.js} +39 -40
  169. package/dist/components/react/p-CoDiS_Ik.js +24 -0
  170. package/dist/components/react/p-CyniMNY-.js +54 -0
  171. package/dist/components/react/p-D5knoiyy.js +24 -0
  172. package/dist/components/react/{p-Djvj8fd2.js → p-DBO6FfHt.js} +4 -5
  173. package/dist/components/react/{p-Ccrl2AQn.js → p-DRfa3MOV.js} +26 -26
  174. package/dist/components/react/{p-Cwiv86_f.js → p-DYImHx0e.js} +4 -5
  175. package/dist/components/react/p-DZ5m2Ttg.js +3 -0
  176. package/dist/components/react/p-FxUVQ4Tx.js +49 -0
  177. package/dist/components/react/{p-D2waO0Zc.js → p-L36-yvgK.js} +2 -2
  178. package/dist/components/react/{p-CewRvBtg.js → p-NCAcc7ZZ.js} +4 -5
  179. package/dist/components/react/{p-DVGEExot.js → p-QNPIvxLq.js} +45 -41
  180. package/dist/components/react/{p-XrZzCOKT.js → p-_pLhqTys.js} +5 -6
  181. package/dist/components/react/p-c6yNOQwn.js +113 -0
  182. package/dist/components/react/{p-CzIKqBrS.js → p-rEfV4v4a.js} +2 -2
  183. package/dist/components/react/post-accordion-item.js +1 -1
  184. package/dist/components/react/post-accordion.js +1 -1
  185. package/dist/components/react/post-avatar.js +3 -4
  186. package/dist/components/react/post-back-to-top.js +16 -42
  187. package/dist/components/react/post-banner.js +7 -8
  188. package/dist/components/react/post-breadcrumb-item.js +1 -1
  189. package/dist/components/react/post-breadcrumbs.js +30 -40
  190. package/dist/components/react/post-card-control.js +5 -6
  191. package/dist/components/react/post-closebutton.js +1 -1
  192. package/dist/components/react/post-collapsible-trigger.js +1 -1
  193. package/dist/components/react/post-collapsible.js +1 -1
  194. package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
  195. package/dist/components/react/post-env-test.js +32 -0
  196. package/dist/components/react/post-footer.js +23 -22
  197. package/dist/components/react/post-header.js +99 -97
  198. package/dist/components/react/post-icon.js +1 -1
  199. package/dist/components/react/post-language-menu-item.d.ts +11 -0
  200. package/dist/components/react/post-language-menu-item.js +99 -0
  201. package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
  202. package/dist/components/react/post-language-menu.js +157 -0
  203. package/dist/components/react/post-linkarea.js +2 -2
  204. package/dist/components/react/post-logo.js +4 -5
  205. package/dist/components/react/post-mainnavigation.js +23 -34
  206. package/dist/components/react/post-megadropdown-trigger.js +73 -80
  207. package/dist/components/react/post-megadropdown.js +184 -79
  208. package/dist/components/react/post-menu-item.js +1 -1
  209. package/dist/components/react/post-menu-trigger.js +1 -1
  210. package/dist/components/react/post-menu.js +1 -1
  211. package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  212. package/dist/components/react/post-pagination.js +636 -0
  213. package/dist/components/react/post-popover-trigger.js +42 -27
  214. package/dist/components/react/post-popover.js +13 -14
  215. package/dist/components/react/post-popovercontainer.js +1 -1
  216. package/dist/components/react/post-rating.js +4 -5
  217. package/dist/components/react/post-stepper-item.js +3 -3
  218. package/dist/components/react/post-stepper.js +32 -30
  219. package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  220. package/dist/components/react/post-tab-item.js +71 -0
  221. package/dist/components/react/post-tab-panel.js +9 -10
  222. package/dist/components/react/post-tabs.js +193 -38
  223. package/dist/components/react/post-togglebutton.js +1 -52
  224. package/dist/components/react/post-tooltip-trigger.js +4 -4
  225. package/dist/components/react/post-tooltip.js +4 -5
  226. package/dist/components/utils.js +24 -0
  227. package/dist/docs.json +854 -597
  228. package/dist/{components/react/p-CJ80BZ06.js → esm/breakpoints-DYoSKGHO.js} +90 -3
  229. package/dist/esm/debounce-C9hMpmsD.js +11 -0
  230. package/dist/esm/environment-CEmnRoA6.js +49 -0
  231. package/dist/esm/{event-from-CzIKqBrS.js → event-from-rEfV4v4a.js} +2 -2
  232. package/dist/esm/fade-DsgPYmAa.js +24 -0
  233. package/dist/esm/fade-slide-CvOvauo9.js +36 -0
  234. package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
  235. package/dist/esm/{get-root-BkQ3CrLq.js → get-root-CXfAA093.js} +1 -1
  236. package/dist/esm/{index-wEFJ-c34.js → index-1ReqxAnI.js} +21 -13
  237. package/dist/esm/loader.js +3 -3
  238. package/dist/esm/package-DZ5m2Ttg.js +3 -0
  239. package/dist/esm/post-accordion_2.entry.js +9 -9
  240. package/dist/esm/post-avatar.entry.js +5 -5
  241. package/dist/esm/post-back-to-top.entry.js +16 -40
  242. package/dist/esm/post-banner.entry.js +10 -9
  243. package/dist/esm/post-breadcrumb-item_2.entry.js +6 -6
  244. package/dist/esm/post-breadcrumbs.entry.js +20 -29
  245. package/dist/esm/post-card-control.entry.js +6 -6
  246. package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +462 -463
  247. package/dist/esm/post-collapsible_2.entry.js +30 -30
  248. package/dist/esm/post-components.js +3 -3
  249. package/dist/esm/post-env-test.entry.js +13 -0
  250. package/dist/esm/post-footer.entry.js +18 -16
  251. package/dist/esm/post-linkarea.entry.js +3 -3
  252. package/dist/esm/post-pagination.entry.js +587 -0
  253. package/dist/esm/post-popover-trigger.entry.js +44 -28
  254. package/dist/esm/post-popover.entry.js +10 -10
  255. package/dist/esm/post-rating.entry.js +5 -5
  256. package/dist/esm/post-stepper-item.entry.js +4 -4
  257. package/dist/esm/post-stepper.entry.js +28 -25
  258. package/dist/esm/post-tab-item.entry.js +47 -0
  259. package/dist/esm/post-tab-panel.entry.js +9 -9
  260. package/dist/esm/post-tabs.entry.js +191 -38
  261. package/dist/esm/post-tooltip-trigger.entry.js +5 -5
  262. package/dist/esm/post-tooltip.entry.js +5 -5
  263. package/dist/esm/utils-CoDiS_Ik.js +24 -0
  264. package/dist/post-components/{p-7f635728.entry.js → p-130eb074.entry.js} +1 -1
  265. package/dist/post-components/p-13d018fe.entry.js +1 -0
  266. package/dist/post-components/p-143e5a84.entry.js +1 -0
  267. package/dist/post-components/p-1ReqxAnI.js +2 -0
  268. package/dist/post-components/p-2b220851.entry.js +1 -0
  269. package/dist/post-components/{p-a9644e54.entry.js → p-390f111f.entry.js} +1 -1
  270. package/dist/post-components/p-3cf09fbd.entry.js +1 -0
  271. package/dist/post-components/p-52e584ca.entry.js +1 -0
  272. package/dist/post-components/p-56a4040c.entry.js +1 -0
  273. package/dist/post-components/p-675dab57.entry.js +1 -0
  274. package/dist/post-components/p-6857fd9d.entry.js +1 -0
  275. package/dist/post-components/p-7cd00e3e.entry.js +1 -0
  276. package/dist/post-components/p-7f5d2487.entry.js +1 -0
  277. package/dist/post-components/{p-cd03e6f2.entry.js → p-88201353.entry.js} +1 -1
  278. package/dist/post-components/p-89360cd1.entry.js +1 -0
  279. package/dist/post-components/p-B7ebLhHc.js +1 -0
  280. package/dist/post-components/p-BVCjnh6Q.js +1 -0
  281. package/dist/post-components/p-BXNs2_sw.js +1 -0
  282. package/dist/post-components/p-C9hMpmsD.js +1 -0
  283. package/dist/post-components/p-CEmnRoA6.js +1 -0
  284. package/dist/post-components/p-CoDiS_Ik.js +1 -0
  285. package/dist/post-components/p-D5knoiyy.js +1 -0
  286. package/dist/post-components/p-DI-h_mEL.js +1 -0
  287. package/dist/post-components/p-DZ5m2Ttg.js +1 -0
  288. package/dist/post-components/p-a740eaed.entry.js +1 -0
  289. package/dist/post-components/{p-57288cb2.entry.js → p-a79590f5.entry.js} +1 -1
  290. package/dist/post-components/p-b708d96a.entry.js +1 -0
  291. package/dist/post-components/p-bcf5786f.entry.js +1 -0
  292. package/dist/post-components/p-c92512f5.entry.js +1 -0
  293. package/dist/post-components/{p-af030a3a.entry.js → p-d7cb3a61.entry.js} +1 -1
  294. package/dist/post-components/p-d7f33813.entry.js +1 -0
  295. package/dist/post-components/p-da97ee21.entry.js +1 -0
  296. package/dist/post-components/{p-e62e1f57.entry.js → p-ed4db774.entry.js} +1 -1
  297. package/dist/post-components/post-components.css +1 -1
  298. package/dist/post-components/post-components.esm.js +1 -1
  299. package/dist/prebuild.js +46 -0
  300. package/dist/types/animations/collapse.d.ts +1 -0
  301. package/dist/types/animations/fade-slide.d.ts +11 -0
  302. package/dist/types/animations/fade.d.ts +2 -2
  303. package/dist/types/animations/index.d.ts +2 -0
  304. package/dist/types/animations/slide.d.ts +9 -2
  305. package/dist/types/animations/types.d.ts +13 -0
  306. package/dist/types/animations/utils.d.ts +2 -0
  307. package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
  308. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
  309. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
  310. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
  311. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
  312. package/dist/types/components/post-footer/post-footer.d.ts +4 -4
  313. package/dist/types/components/post-header/post-header.d.ts +18 -13
  314. package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +6 -6
  315. package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
  316. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
  317. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
  318. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
  319. package/dist/types/components/post-menu/post-menu.d.ts +4 -4
  320. package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
  321. package/dist/types/components/post-popover/post-popover.d.ts +3 -3
  322. package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
  323. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +13 -16
  324. package/dist/types/components/post-rating/post-rating.d.ts +1 -1
  325. package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
  326. package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
  327. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
  328. package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
  329. package/dist/types/components.d.ts +311 -200
  330. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
  331. package/dist/types/types/heading-levels.d.ts +1 -1
  332. package/dist/types/utils/environment.d.ts +25 -1
  333. package/dist/types/utils/get-focusable-children.d.ts +2 -2
  334. package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
  335. package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
  336. package/hydrate/index.js +1740 -863
  337. package/hydrate/index.mjs +1740 -863
  338. package/package.json +6 -7
  339. package/dist/cjs/fade-nS5zzDQS.js +0 -14
  340. package/dist/cjs/index-UFKR6Ok0.js +0 -98
  341. package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
  342. package/dist/collection/animations/slide-and-fade.js +0 -25
  343. package/dist/collection/components/post-language-option/post-language-option.css +0 -1
  344. package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
  345. package/dist/collection/components/post-list/post-list.css +0 -1
  346. package/dist/collection/components/post-list/post-list.js +0 -97
  347. package/dist/collection/components/post-list-item/post-list-item.css +0 -1
  348. package/dist/collection/components/post-list-item/post-list-item.js +0 -26
  349. package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
  350. package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
  351. package/dist/components/index2.js +0 -89
  352. package/dist/components/post-language-option.d.ts +0 -11
  353. package/dist/components/post-language-option.js +0 -99
  354. package/dist/components/post-language-switch.js +0 -157
  355. package/dist/components/post-list-item.js +0 -38
  356. package/dist/components/post-list.js +0 -61
  357. package/dist/components/post-tab-header.js +0 -52
  358. package/dist/components/react/p-BhxZzOEC.js +0 -3
  359. package/dist/components/react/p-CYkf_7Y5.js +0 -89
  360. package/dist/components/react/p-SbIC4aZX.js +0 -11
  361. package/dist/components/react/p-v3pOrMNQ.js +0 -114
  362. package/dist/components/react/post-language-option.js +0 -100
  363. package/dist/components/react/post-language-switch.d.ts +0 -11
  364. package/dist/components/react/post-language-switch.js +0 -158
  365. package/dist/components/react/post-list-item.js +0 -39
  366. package/dist/components/react/post-list.js +0 -62
  367. package/dist/components/react/post-tab-header.js +0 -53
  368. package/dist/esm/fade-SbIC4aZX.js +0 -11
  369. package/dist/esm/index-Beaz8wEe.js +0 -89
  370. package/dist/esm/package-BhxZzOEC.js +0 -3
  371. package/dist/esm/post-tab-header.entry.js +0 -29
  372. package/dist/post-components/p-01e678c9.entry.js +0 -1
  373. package/dist/post-components/p-034a453f.entry.js +0 -1
  374. package/dist/post-components/p-15a4cdbf.entry.js +0 -1
  375. package/dist/post-components/p-24dc54d1.entry.js +0 -1
  376. package/dist/post-components/p-2a2030bf.entry.js +0 -1
  377. package/dist/post-components/p-2ed84cc3.entry.js +0 -1
  378. package/dist/post-components/p-3228968f.entry.js +0 -1
  379. package/dist/post-components/p-3c01ddfe.entry.js +0 -1
  380. package/dist/post-components/p-748b1f01.entry.js +0 -1
  381. package/dist/post-components/p-7745e46e.entry.js +0 -1
  382. package/dist/post-components/p-82c178a3.entry.js +0 -1
  383. package/dist/post-components/p-9b5f8319.entry.js +0 -1
  384. package/dist/post-components/p-Beaz8wEe.js +0 -1
  385. package/dist/post-components/p-BhxZzOEC.js +0 -1
  386. package/dist/post-components/p-CBFgkSgY.js +0 -1
  387. package/dist/post-components/p-CJ80BZ06.js +0 -1
  388. package/dist/post-components/p-D9ZHp2FP.js +0 -1
  389. package/dist/post-components/p-SbIC4aZX.js +0 -1
  390. package/dist/post-components/p-b8ba8139.entry.js +0 -1
  391. package/dist/post-components/p-db935e8e.entry.js +0 -1
  392. package/dist/post-components/p-fb4b1641.entry.js +0 -1
  393. package/dist/post-components/p-wEFJ-c34.js +0 -2
  394. package/dist/types/animations/slide-and-fade.d.ts +0 -2
  395. package/dist/types/components/post-list/post-list.d.ts +0 -24
  396. package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
  397. package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
  398. /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
  399. /package/dist/post-components/{p-CzIKqBrS.js → p-rEfV4v4a.js} +0 -0
  400. /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-components",
3
- "version": "10.0.0-next.55",
3
+ "version": "10.0.0-next.56",
4
4
  "description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
5
5
  "author": "Swiss Post <design-system@post.ch>",
6
6
  "license": "Apache-2.0",
@@ -69,8 +69,8 @@
69
69
  "@floating-ui/dom": "1.7.4",
70
70
  "@oddbird/popover-polyfill": "0.6.0",
71
71
  "@stencil/core": "4.35.0",
72
- "@swisspost/design-system-icons": "10.0.0-next.55",
73
- "@swisspost/design-system-styles": "10.0.0-next.55",
72
+ "@swisspost/design-system-icons": "10.0.0-next.56",
73
+ "@swisspost/design-system-styles": "10.0.0-next.56",
74
74
  "ally.js": "1.4.1",
75
75
  "long-press-event": "2.5.0",
76
76
  "nanoid": "5.1.6"
@@ -84,9 +84,8 @@
84
84
  "@stencil/angular-output-target": "1.1.1",
85
85
  "@stencil/react-output-target": "1.2.0",
86
86
  "@stencil/sass": "3.0.12",
87
- "@swisspost/design-system-eslint": "10.0.0-next.55",
87
+ "@swisspost/design-system-eslint": "10.0.0-next.56",
88
88
  "@types/jest": "29.5.14",
89
- "@types/mock-fs": "4.13.4",
90
89
  "@types/node": "22.10.5",
91
90
  "@typescript-eslint/parser": "7.18.0",
92
91
  "copyfiles": "2.4.1",
@@ -97,8 +96,8 @@
97
96
  "eslint-plugin-cypress": "4.2.0",
98
97
  "eslint-plugin-react": "7.37.5",
99
98
  "globals": "16.0.0",
100
- "mock-fs": "5.5.0",
101
- "prettier": "2.8.8",
99
+ "memfs": "4.51.0",
100
+ "prettier": "3.6.2",
102
101
  "replace": "1.2.2",
103
102
  "rimraf": "6.0.1",
104
103
  "rollup-plugin-postcss": "4.0.2",
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- const fadeDuration = 200;
4
- const fadedOutKeyframe = { opacity: '0' };
5
- const fadedInKeyframe = { opacity: '1' };
6
- function fadeIn(el) {
7
- return el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
8
- }
9
- function fadeOut(el) {
10
- return el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
11
- }
12
-
13
- exports.fadeIn = fadeIn;
14
- exports.fadeOut = fadeOut;
@@ -1,98 +0,0 @@
1
- 'use strict';
2
-
3
- const EMPTY_VALUES = [undefined, null, '', NaN];
4
-
5
- function isValueEmpty(value) {
6
- return EMPTY_VALUES.some(v => v === value);
7
- }
8
-
9
- function requiredAnd(check) {
10
- return (component, prop, ...extraArgs) => {
11
- const componentName = component.host.localName;
12
- const value = component[prop];
13
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is not defined.`;
14
- if (isValueEmpty(value)) {
15
- throw new Error(message);
16
- }
17
- else {
18
- check(component, prop, ...extraArgs);
19
- }
20
- };
21
- }
22
-
23
- function checkOneOf(component, prop, possibleValues) {
24
- const componentName = component.host.localName;
25
- const value = component[prop];
26
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
27
- if (!possibleValues.includes(value)) {
28
- console.error(message);
29
- }
30
- }
31
-
32
- function checkPattern(component, prop, pattern) {
33
- const componentName = component.host.localName;
34
- const value = component[prop];
35
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must follow the format \`${pattern}\`.`;
36
- if (typeof value !== 'string' || !pattern.test(value)) {
37
- console.error(message);
38
- }
39
- }
40
-
41
- function checkType(component, prop, type) {
42
- const componentName = component.host.localName;
43
- const value = component[prop];
44
- const typeIsArray = type === 'array';
45
- const valueIsArray = Array.isArray(value);
46
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`${type}\`.`;
47
- if (typeIsArray || valueIsArray) {
48
- if (valueIsArray !== typeIsArray) {
49
- console.error(message);
50
- }
51
- }
52
- else if (typeof value !== type) {
53
- console.error(message);
54
- }
55
- }
56
-
57
- function checkUrl(component, prop) {
58
- const componentName = component.host.localName;
59
- const value = component[prop];
60
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
61
- if (typeof value !== 'string' && !(value instanceof URL)) {
62
- console.error(message);
63
- return;
64
- }
65
- try {
66
- new URL(value, 'https://www.post.ch');
67
- }
68
- catch {
69
- console.error(message);
70
- }
71
- }
72
-
73
- function emptyOr(check) {
74
- return (component, prop, ...extraArgs) => {
75
- const value = component[prop];
76
- if (!isValueEmpty(value)) {
77
- check(component, prop, ...extraArgs);
78
- }
79
- };
80
- }
81
-
82
- const checkEmptyOrOneOf = emptyOr(checkOneOf);
83
- const checkEmptyOrPattern = emptyOr(checkPattern);
84
- const checkEmptyOrType = emptyOr(checkType);
85
- const checkEmptyOrUrl = emptyOr(checkUrl);
86
- const checkRequiredAndOneOf = requiredAnd(checkOneOf);
87
- const checkRequiredAndPattern = requiredAnd(checkPattern);
88
- const checkRequiredAndType = requiredAnd(checkType);
89
- const checkRequiredAndUrl = requiredAnd(checkUrl);
90
-
91
- exports.checkEmptyOrOneOf = checkEmptyOrOneOf;
92
- exports.checkEmptyOrPattern = checkEmptyOrPattern;
93
- exports.checkEmptyOrType = checkEmptyOrType;
94
- exports.checkEmptyOrUrl = checkEmptyOrUrl;
95
- exports.checkRequiredAndOneOf = checkRequiredAndOneOf;
96
- exports.checkRequiredAndPattern = checkRequiredAndPattern;
97
- exports.checkRequiredAndType = checkRequiredAndType;
98
- exports.checkRequiredAndUrl = checkRequiredAndUrl;
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-B4gYpuJF.js');
4
- var _package = require('./package-DkJrv93P.js');
5
- var index$1 = require('./index-UFKR6Ok0.js');
6
- require('./breakpoints-CEkeixld.js');
7
- var index_browser = require('./index.browser-Doj636JV.js');
8
-
9
- 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}}: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}}";
10
-
11
- const PostTabHeader = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- }
15
- validateFor() {
16
- index$1.checkRequiredAndType(this, 'panel', 'string');
17
- }
18
- componentWillLoad() {
19
- this.tabId = `tab-${this.host.id || index_browser.nanoid(6)}`;
20
- }
21
- render() {
22
- return (index.h(index.Host, { key: 'b350fb9392e74af452470d72f97678aa1ac2d430', id: this.tabId, role: "tab", "data-version": _package.version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, index.h("slot", { key: '49722204330b3b2d760b8718b349b1417fd29a71' })));
23
- }
24
- get host() { return index.getElement(this); }
25
- static get watchers() { return {
26
- "panel": ["validateFor"]
27
- }; }
28
- };
29
- PostTabHeader.style = postTabHeaderCss;
30
-
31
- exports.post_tab_header = PostTabHeader;
@@ -1,25 +0,0 @@
1
- // Define common animation options
2
- const easing = 'ease';
3
- const defaultDuration = 500;
4
- const fill = 'forwards';
5
- function createSlideFadeAnimation(el, keyframes, duration = defaultDuration) {
6
- return el.animate(keyframes, {
7
- duration: duration,
8
- easing,
9
- fill,
10
- });
11
- }
12
- export function slideUpAndFadeOut(el, translateY = '-100%', duration = defaultDuration) {
13
- const keyframes = [
14
- { transform: 'translateY(0)', opacity: '1' },
15
- { transform: `translateY(${translateY})`, opacity: '0' },
16
- ];
17
- return createSlideFadeAnimation(el, keyframes, duration);
18
- }
19
- export function slideDownAndFadeIn(el, translateY = '-100%', duration = defaultDuration) {
20
- const keyframes = [
21
- { transform: `translateY(${translateY})`, opacity: '0' },
22
- { transform: 'translateY(0)', opacity: '1' },
23
- ];
24
- return createSlideFadeAnimation(el, keyframes, duration);
25
- }
@@ -1 +0,0 @@
1
- post-language-option{display:inline-block}post-language-option button{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){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-option a{color:var(--post-current-fg);text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-option :is(a,button){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-language-option :is(a,button):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){post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-option :is(a,button):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){post-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-option:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-option:where([variant=list]) :is(a,button):hover{color:#504f4b}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list]) :is(a,button){border:1px solid ButtonBorder;color:ButtonText}}post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:Highlight !important;color:HighlightText}}post-language-option:where([variant=menu]){min-width:72px}post-language-option:where([variant=menu])[active]:not([active=false]){display:none}post-language-option:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:16px;box-sizing:border-box;justify-content:flex-start;position:relative;border-radius:0}post-language-option:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}post-language-option:where([variant=menu]):first-child :is(a,button){border-start-start-radius:4px;border-start-end-radius:4px}post-language-option:where([variant=menu]):last-child :is(a,button){border-end-start-radius:4px;border-end-end-radius:4px}
@@ -1 +0,0 @@
1
- :host{display:flex !important;flex-wrap:wrap;gap:.5rem}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;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;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}post-menu::part(menu){padding-block:0}.post-language-switch-list{margin-top:1rem}
@@ -1 +0,0 @@
1
- post-list{display:flex;flex-direction:column;gap:var(--post-list-title-gap, 0)}post-list>[role=list]{display:flex;flex-direction:column;gap:var(--post-list-item-gap, 0)}post-list:where([horizontal]:not([horizontal=false])){flex-direction:row;align-items:center}post-list:where([horizontal]:not([horizontal=false]))>[role=list]{flex-direction:row;align-items:center}post-list>.list-title.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
@@ -1,97 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { version } from "../../../../package";
3
- import { nanoid } from "nanoid";
4
- /**
5
- * @slot default - Slot for placing the list title.
6
- * @slot post-list-item - Slot for placing post-list-item components.
7
- */
8
- export class PostList {
9
- constructor() {
10
- /**
11
- * If `true`, the list title will be hidden. Otherwise, it will be displayed.`
12
- */
13
- this.titleHidden = false;
14
- /**
15
- * The list can become horizontal by setting `horizontal="true"` or just `horizontal`
16
- */
17
- this.horizontal = false;
18
- }
19
- componentWillLoad() {
20
- /**
21
- * Get the id set on the host element or use a random id by default
22
- */
23
- this.titleId = `title-${this.host.id || nanoid(6)}`;
24
- }
25
- componentDidLoad() {
26
- this.checkTitle();
27
- }
28
- checkTitle() {
29
- if (!this.titleEl.textContent.trim()) {
30
- console.error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
31
- }
32
- }
33
- render() {
34
- return (h(Host, { key: '85193bec2b2ff22ed76c93a4037f353b091192bc', "data-version": version }, h("div", { key: '32cdc5ccb95b48e3f81e90ac93f0207d935c9d3b', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: '890dd411e370a7829354dcaa00fae75e8f538f01' })), h("div", { key: '72867a1d81f2e186ed3d68f5185a46c7c96fdd3b', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '2cd5a5e9ca717c675f9db3a19fbf13ff49a7312c', name: "post-list-item" }))));
35
- }
36
- static get is() { return "post-list"; }
37
- static get originalStyleUrls() {
38
- return {
39
- "$": ["post-list.scss"]
40
- };
41
- }
42
- static get styleUrls() {
43
- return {
44
- "$": ["post-list.css"]
45
- };
46
- }
47
- static get properties() {
48
- return {
49
- "titleHidden": {
50
- "type": "boolean",
51
- "attribute": "title-hidden",
52
- "mutable": false,
53
- "complexType": {
54
- "original": "boolean",
55
- "resolved": "boolean",
56
- "references": {}
57
- },
58
- "required": false,
59
- "optional": false,
60
- "docs": {
61
- "tags": [],
62
- "text": "If `true`, the list title will be hidden. Otherwise, it will be displayed.`"
63
- },
64
- "getter": false,
65
- "setter": false,
66
- "reflect": false,
67
- "defaultValue": "false"
68
- },
69
- "horizontal": {
70
- "type": "boolean",
71
- "attribute": "horizontal",
72
- "mutable": false,
73
- "complexType": {
74
- "original": "boolean",
75
- "resolved": "boolean",
76
- "references": {}
77
- },
78
- "required": false,
79
- "optional": false,
80
- "docs": {
81
- "tags": [],
82
- "text": "The list can become horizontal by setting `horizontal=\"true\"` or just `horizontal`"
83
- },
84
- "getter": false,
85
- "setter": false,
86
- "reflect": true,
87
- "defaultValue": "false"
88
- }
89
- };
90
- }
91
- static get states() {
92
- return {
93
- "titleId": {}
94
- };
95
- }
96
- static get elementRef() { return "host"; }
97
- }
@@ -1 +0,0 @@
1
- :host{display:flex}
@@ -1,26 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { version } from "../../../../package";
3
- /**
4
- * @slot default- Slot for placing the content of the list item.
5
- */
6
- export class PostListItem {
7
- connectedCallback() {
8
- this.host.setAttribute('slot', 'post-list-item');
9
- }
10
- render() {
11
- return (h(Host, { key: '98f83a8ef6ff73461bfc7b67d8113543e94d66cb', role: "listitem", slot: "post-list-item", version: version }, h("slot", { key: '1ee5c021183b30ba7b560a58042a196aa9c1127e' })));
12
- }
13
- static get is() { return "post-list-item"; }
14
- static get encapsulation() { return "shadow"; }
15
- static get originalStyleUrls() {
16
- return {
17
- "$": ["post-list-item.scss"]
18
- };
19
- }
20
- static get styleUrls() {
21
- return {
22
- "$": ["post-list-item.css"]
23
- };
24
- }
25
- static get elementRef() { return "host"; }
26
- }
@@ -1 +0,0 @@
1
- .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}}: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}}
@@ -1,65 +0,0 @@
1
- import { h, Host } from "@stencil/core";
2
- import { version } from "../../../../package";
3
- import { checkRequiredAndType } from "../../utils/index";
4
- import { nanoid } from "nanoid";
5
- /**
6
- * @slot default - Slot for the content of the tab header.
7
- */
8
- export class PostTabHeader {
9
- validateFor() {
10
- checkRequiredAndType(this, 'panel', 'string');
11
- }
12
- componentWillLoad() {
13
- this.tabId = `tab-${this.host.id || nanoid(6)}`;
14
- }
15
- render() {
16
- return (h(Host, { key: 'b350fb9392e74af452470d72f97678aa1ac2d430', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '49722204330b3b2d760b8718b349b1417fd29a71' })));
17
- }
18
- static get is() { return "post-tab-header"; }
19
- static get encapsulation() { return "shadow"; }
20
- static get originalStyleUrls() {
21
- return {
22
- "$": ["post-tab-header.scss"]
23
- };
24
- }
25
- static get styleUrls() {
26
- return {
27
- "$": ["post-tab-header.css"]
28
- };
29
- }
30
- static get properties() {
31
- return {
32
- "panel": {
33
- "type": "string",
34
- "attribute": "panel",
35
- "mutable": false,
36
- "complexType": {
37
- "original": "string",
38
- "resolved": "string",
39
- "references": {}
40
- },
41
- "required": true,
42
- "optional": false,
43
- "docs": {
44
- "tags": [],
45
- "text": "The name of the panel controlled by the tab header."
46
- },
47
- "getter": false,
48
- "setter": false,
49
- "reflect": true
50
- }
51
- };
52
- }
53
- static get states() {
54
- return {
55
- "tabId": {}
56
- };
57
- }
58
- static get elementRef() { return "host"; }
59
- static get watchers() {
60
- return [{
61
- "propName": "panel",
62
- "methodName": "validateFor"
63
- }];
64
- }
65
- }
@@ -1,89 +0,0 @@
1
- const EMPTY_VALUES = [undefined, null, '', NaN];
2
-
3
- function isValueEmpty(value) {
4
- return EMPTY_VALUES.some(v => v === value);
5
- }
6
-
7
- function requiredAnd(check) {
8
- return (component, prop, ...extraArgs) => {
9
- const componentName = component.host.localName;
10
- const value = component[prop];
11
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is not defined.`;
12
- if (isValueEmpty(value)) {
13
- throw new Error(message);
14
- }
15
- else {
16
- check(component, prop, ...extraArgs);
17
- }
18
- };
19
- }
20
-
21
- function checkOneOf(component, prop, possibleValues) {
22
- const componentName = component.host.localName;
23
- const value = component[prop];
24
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
25
- if (!possibleValues.includes(value)) {
26
- console.error(message);
27
- }
28
- }
29
-
30
- function checkPattern(component, prop, pattern) {
31
- const componentName = component.host.localName;
32
- const value = component[prop];
33
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must follow the format \`${pattern}\`.`;
34
- if (typeof value !== 'string' || !pattern.test(value)) {
35
- console.error(message);
36
- }
37
- }
38
-
39
- function checkType(component, prop, type) {
40
- const componentName = component.host.localName;
41
- const value = component[prop];
42
- const typeIsArray = type === 'array';
43
- const valueIsArray = Array.isArray(value);
44
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`${type}\`.`;
45
- if (typeIsArray || valueIsArray) {
46
- if (valueIsArray !== typeIsArray) {
47
- console.error(message);
48
- }
49
- }
50
- else if (typeof value !== type) {
51
- console.error(message);
52
- }
53
- }
54
-
55
- function checkUrl(component, prop) {
56
- const componentName = component.host.localName;
57
- const value = component[prop];
58
- const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
59
- if (typeof value !== 'string' && !(value instanceof URL)) {
60
- console.error(message);
61
- return;
62
- }
63
- try {
64
- new URL(value, 'https://www.post.ch');
65
- }
66
- catch {
67
- console.error(message);
68
- }
69
- }
70
-
71
- function emptyOr(check) {
72
- return (component, prop, ...extraArgs) => {
73
- const value = component[prop];
74
- if (!isValueEmpty(value)) {
75
- check(component, prop, ...extraArgs);
76
- }
77
- };
78
- }
79
-
80
- const checkEmptyOrOneOf = emptyOr(checkOneOf);
81
- const checkEmptyOrPattern = emptyOr(checkPattern);
82
- const checkEmptyOrType = emptyOr(checkType);
83
- const checkEmptyOrUrl = emptyOr(checkUrl);
84
- const checkRequiredAndOneOf = requiredAnd(checkOneOf);
85
- const checkRequiredAndPattern = requiredAnd(checkPattern);
86
- const checkRequiredAndType = requiredAnd(checkType);
87
- const checkRequiredAndUrl = requiredAnd(checkUrl);
88
-
89
- export { checkEmptyOrUrl as a, checkRequiredAndOneOf as b, checkRequiredAndType as c, checkEmptyOrOneOf as d, checkEmptyOrType as e, checkRequiredAndPattern as f, checkEmptyOrPattern as g, checkRequiredAndUrl as h };
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface PostLanguageOption extends Components.PostLanguageOption, HTMLElement {}
4
- export const PostLanguageOption: {
5
- prototype: PostLanguageOption;
6
- new (): PostLanguageOption;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,99 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { c as checkRequiredAndType, d as checkEmptyOrOneOf, e as checkEmptyOrType, a as checkEmptyOrUrl } from './index2.js';
3
- import './breakpoints.js';
4
- import { v as version } from './package.js';
5
- import { S as SWITCH_VARIANTS } from './switch-variants.js';
6
-
7
- const postLanguageOptionCss = "post-language-option{display:inline-block}post-language-option button{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){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option button .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}post-language-option a{color:var(--post-current-fg);text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;text-transform:uppercase}post-language-option :is(a,button){outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-language-option :is(a,button):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){post-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-option :is(a,button):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){post-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-option:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-option:where([variant=list]) :is(a,button):hover{color:#504f4b}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list]) :is(a,button){border:1px solid ButtonBorder;color:ButtonText}}post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:Highlight !important;color:HighlightText}}post-language-option:where([variant=menu]){min-width:72px}post-language-option:where([variant=menu])[active]:not([active=false]){display:none}post-language-option:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:16px;box-sizing:border-box;justify-content:flex-start;position:relative;border-radius:0}post-language-option:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}post-language-option:where([variant=menu]):first-child :is(a,button){border-start-start-radius:4px;border-start-end-radius:4px}post-language-option:where([variant=menu]):last-child :is(a,button){border-end-start-radius:4px;border-end-end-radius:4px}";
8
-
9
- const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguageOption extends HTMLElement {
10
- constructor() {
11
- super();
12
- this.__registerHost();
13
- this.postChange = createEvent(this, "postChange", 7);
14
- this.postLanguageOptionInitiallyActive = createEvent(this, "postLanguageOptionInitiallyActive", 7);
15
- }
16
- validateCode() {
17
- checkRequiredAndType(this, 'code', 'string');
18
- }
19
- validateVariant() {
20
- checkEmptyOrOneOf(this, 'variant', SWITCH_VARIANTS);
21
- }
22
- validateName() {
23
- checkEmptyOrType(this, 'name', 'string');
24
- }
25
- validateUrl() {
26
- checkEmptyOrUrl(this, 'url');
27
- }
28
- componentDidLoad() {
29
- this.validateCode();
30
- this.validateName();
31
- this.validateUrl();
32
- if (!this.name && this.isNameRequired()) {
33
- throw new Error('The "name" property of the post-language-option component is required when the full language name is not displayed.');
34
- }
35
- if (this.active) {
36
- this.postLanguageOptionInitiallyActive.emit(this.code);
37
- }
38
- }
39
- /**
40
- * Selects the language option programmatically.
41
- */
42
- async select() {
43
- this.active = true;
44
- this.emitChange();
45
- }
46
- emitChange() {
47
- this.postChange.emit(this.code);
48
- }
49
- isNameRequired() {
50
- return this.host.textContent.toLowerCase() === this.code.toLowerCase();
51
- }
52
- render() {
53
- const lang = this.code.toLowerCase();
54
- const emitOnKeyDown = (e) => {
55
- if (e.key === 'Enter' || e.key === ' ') {
56
- this.emitChange();
57
- }
58
- };
59
- return (h(Host, { key: '06ba54de702d5014b34f1b0cb6396cb947ac3ca6', "data-version": version, role: this.variant === 'list' ? 'listitem' : undefined }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name))) : (h("button", { "aria-current": this.active ? 'true' : undefined, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null), h("span", { class: "visually-hidden" }, this.name)))));
60
- }
61
- get host() { return this; }
62
- static get watchers() { return {
63
- "code": ["validateCode"],
64
- "variant": ["validateVariant"],
65
- "name": ["validateName"],
66
- "url": ["validateUrl"]
67
- }; }
68
- static get style() { return postLanguageOptionCss; }
69
- }, [4, "post-language-option", {
70
- "code": [513],
71
- "active": [1540],
72
- "variant": [1],
73
- "name": [1],
74
- "url": [1],
75
- "select": [64]
76
- }, undefined, {
77
- "code": ["validateCode"],
78
- "variant": ["validateVariant"],
79
- "name": ["validateName"],
80
- "url": ["validateUrl"]
81
- }]);
82
- function defineCustomElement$1() {
83
- if (typeof customElements === "undefined") {
84
- return;
85
- }
86
- const components = ["post-language-option"];
87
- components.forEach(tagName => { switch (tagName) {
88
- case "post-language-option":
89
- if (!customElements.get(tagName)) {
90
- customElements.define(tagName, PostLanguageOption$1);
91
- }
92
- break;
93
- } });
94
- }
95
-
96
- const PostLanguageOption = PostLanguageOption$1;
97
- const defineCustomElement = defineCustomElement$1;
98
-
99
- export { PostLanguageOption, defineCustomElement };