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

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 (443) hide show
  1. package/dist/{components/react/p-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-B4rc1pqu.js} +2150 -292
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{package-DkJrv93P.js → package-uQ5oiSiN.js} +1 -1
  12. package/dist/cjs/post-accordion_2.cjs.entry.js +19 -15
  13. package/dist/cjs/post-avatar.cjs.entry.js +27 -17
  14. package/dist/cjs/post-back-to-top.cjs.entry.js +23 -43
  15. package/dist/cjs/post-banner.cjs.entry.js +15 -12
  16. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +14 -12
  17. package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
  18. package/dist/cjs/post-card-control.cjs.entry.js +42 -26
  19. package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +618 -531
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +41 -37
  21. package/dist/cjs/post-components.cjs.js +3 -3
  22. package/dist/cjs/post-env-test.cjs.entry.js +15 -0
  23. package/dist/cjs/post-footer.cjs.entry.js +24 -20
  24. package/dist/cjs/post-linkarea.cjs.entry.js +5 -5
  25. package/dist/cjs/post-pagination.cjs.entry.js +615 -0
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +54 -34
  27. package/dist/cjs/post-popover.cjs.entry.js +26 -17
  28. package/dist/cjs/post-rating.cjs.entry.js +24 -18
  29. package/dist/cjs/post-stepper-item.cjs.entry.js +5 -5
  30. package/dist/cjs/post-stepper.cjs.entry.js +40 -29
  31. package/dist/cjs/post-tab-item.cjs.entry.js +51 -0
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +13 -11
  33. package/dist/cjs/post-tabs.cjs.entry.js +195 -40
  34. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -11
  35. package/dist/cjs/post-tooltip.cjs.entry.js +14 -12
  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 +8 -8
  45. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  46. package/dist/collection/components/post-accordion/post-accordion.js +5 -4
  47. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  48. package/dist/collection/components/post-accordion-item/post-accordion-item.js +9 -8
  49. package/dist/collection/components/post-avatar/post-avatar.js +11 -11
  50. package/dist/collection/components/post-back-to-top/post-back-to-top.js +15 -15
  51. package/dist/collection/components/post-banner/post-banner.css +4 -1
  52. package/dist/collection/components/post-banner/post-banner.js +6 -5
  53. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +3 -3
  54. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -29
  55. package/dist/collection/components/post-card-control/post-card-control.js +18 -18
  56. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  57. package/dist/collection/components/post-closebutton/post-closebutton.js +4 -3
  58. package/dist/collection/components/post-collapsible/post-collapsible.js +28 -28
  59. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +3 -3
  60. package/dist/collection/components/post-footer/post-footer.css +1 -1
  61. package/dist/collection/components/post-footer/post-footer.js +18 -16
  62. package/dist/collection/components/post-header/post-header.css +1 -1
  63. package/dist/collection/components/post-header/post-header.js +144 -82
  64. package/dist/collection/components/post-icon/post-icon.js +18 -16
  65. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
  66. package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +45 -36
  67. package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
  68. package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +24 -23
  69. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  70. package/dist/collection/components/post-logo/post-logo.css +3 -1
  71. package/dist/collection/components/post-logo/post-logo.js +3 -3
  72. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  73. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
  74. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  75. package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
  76. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
  77. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +81 -75
  78. package/dist/collection/components/post-menu/post-menu.css +1 -1
  79. package/dist/collection/components/post-menu/post-menu.js +39 -38
  80. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  81. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
  82. package/dist/collection/components/post-pagination/post-pagination.css +1 -0
  83. package/dist/collection/components/post-pagination/post-pagination.js +838 -0
  84. package/dist/collection/components/post-popover/post-popover.js +22 -16
  85. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +45 -29
  86. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  87. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +82 -131
  88. package/dist/collection/components/post-rating/post-rating.js +7 -7
  89. package/dist/collection/components/post-stepper/post-stepper.js +38 -35
  90. package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
  91. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  92. package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
  93. package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
  94. package/dist/collection/components/post-tab-panel/post-tab-panel.js +10 -10
  95. package/dist/collection/components/post-tabs/post-tabs.js +232 -59
  96. package/dist/collection/components/post-togglebutton/post-togglebutton.js +2 -2
  97. package/dist/collection/components/post-tooltip/post-tooltip.js +9 -27
  98. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +4 -4
  99. package/dist/collection/utils/environment.js +47 -2
  100. package/dist/collection/utils/event-from.js +2 -2
  101. package/dist/collection/utils/get-focusable-children.js +29 -21
  102. package/dist/collection/utils/is-motion-reduced.js +1 -1
  103. package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
  104. package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
  105. package/dist/component-names.json +4 -5
  106. package/dist/components/breakpoints.js +1 -178
  107. package/dist/components/debounce.js +1 -0
  108. package/dist/components/environment.js +1 -0
  109. package/dist/components/event-from.js +1 -119
  110. package/dist/components/fade-slide.js +1 -0
  111. package/dist/components/fade.js +1 -11
  112. package/dist/components/focusable.js +1 -5018
  113. package/dist/components/get-focusable-children.js +1 -64
  114. package/dist/components/get-root.js +1 -15
  115. package/dist/components/heading-levels.js +1 -3
  116. package/dist/components/index.browser.js +1 -14
  117. package/dist/components/index.d.ts +11 -10
  118. package/dist/components/index.js +1 -39
  119. package/dist/components/long-press-event.js +1 -257
  120. package/dist/components/package.js +1 -3
  121. package/dist/components/post-accordion-item.js +1 -6
  122. package/dist/components/post-accordion-item2.js +1 -113
  123. package/dist/components/post-accordion.js +1 -6
  124. package/dist/components/post-accordion2.js +1 -138
  125. package/dist/components/post-avatar.js +1 -217
  126. package/dist/components/post-back-to-top.js +1 -144
  127. package/dist/components/post-banner.js +1 -98
  128. package/dist/components/post-breadcrumb-item.js +1 -6
  129. package/dist/components/post-breadcrumb-item2.js +1 -79
  130. package/dist/components/post-breadcrumbs.js +1 -196
  131. package/dist/components/post-card-control.js +1 -326
  132. package/dist/components/post-closebutton.js +1 -6
  133. package/dist/components/post-closebutton2.js +1 -77
  134. package/dist/components/post-collapsible-trigger.js +1 -6
  135. package/dist/components/post-collapsible-trigger2.js +1 -136
  136. package/dist/components/post-collapsible.js +1 -6
  137. package/dist/components/post-collapsible2.js +1 -110
  138. package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
  139. package/dist/components/post-env-test.js +1 -0
  140. package/dist/components/post-footer.js +1 -116
  141. package/dist/components/post-header.js +1 -372
  142. package/dist/components/post-icon.js +1 -6
  143. package/dist/components/post-icon2.js +1 -159
  144. package/dist/components/post-language-menu-item.d.ts +11 -0
  145. package/dist/components/post-language-menu-item.js +1 -0
  146. package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
  147. package/dist/components/post-language-menu.js +1 -0
  148. package/dist/components/post-linkarea.js +1 -58
  149. package/dist/components/post-logo.js +1 -58
  150. package/dist/components/post-mainnavigation.js +1 -180
  151. package/dist/components/post-megadropdown-trigger.js +1 -136
  152. package/dist/components/post-megadropdown.js +1 -267
  153. package/dist/components/post-menu-item.js +1 -6
  154. package/dist/components/post-menu-item2.js +1 -30
  155. package/dist/components/post-menu-trigger.js +1 -6
  156. package/dist/components/post-menu-trigger2.js +1 -110
  157. package/dist/components/post-menu.js +1 -6
  158. package/dist/components/post-menu2.js +1 -242
  159. package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  160. package/dist/components/post-pagination.js +1 -0
  161. package/dist/components/post-popover-trigger.js +1 -132
  162. package/dist/components/post-popover.js +1 -118
  163. package/dist/components/post-popovercontainer.js +1 -6
  164. package/dist/components/post-popovercontainer2.js +1 -3127
  165. package/dist/components/post-rating.js +1 -148
  166. package/dist/components/post-stepper-item.js +1 -33
  167. package/dist/components/post-stepper.js +1 -134
  168. package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  169. package/dist/components/post-tab-item.js +1 -0
  170. package/dist/components/post-tab-panel.js +1 -54
  171. package/dist/components/post-tabs.js +1 -196
  172. package/dist/components/post-togglebutton.js +1 -56
  173. package/dist/components/post-togglebutton2.js +1 -0
  174. package/dist/components/post-tooltip-trigger.js +1 -206
  175. package/dist/components/post-tooltip.js +1 -114
  176. package/dist/components/react/index.d.ts +2 -0
  177. package/dist/components/react/index.js +1 -2315
  178. package/dist/components/react/p-B8YiQ3mz.js +1 -0
  179. package/dist/components/react/p-BC5nlBvn.js +1 -0
  180. package/dist/components/react/p-BLchVpF6.js +1 -14
  181. package/dist/components/react/p-BVCjnh6Q.js +1 -0
  182. package/dist/{post-components/p-CBFgkSgY.js → components/react/p-BVGcVycs.js} +1 -1
  183. package/dist/components/react/p-B_XPj2c8.js +1 -0
  184. package/dist/components/react/p-BllOMLDs.js +1 -0
  185. package/dist/components/react/p-BmRNjQUZ.js +1 -0
  186. package/dist/components/react/p-ByFh05IW.js +1 -0
  187. package/dist/components/react/p-C9hMpmsD.js +1 -0
  188. package/dist/components/react/p-CJ13r5fi.js +1 -0
  189. package/dist/components/react/p-CZvbetqX.js +1 -0
  190. package/dist/components/react/p-C_2k3G1c.js +1 -257
  191. package/dist/components/react/p-CoDiS_Ik.js +1 -0
  192. package/dist/components/react/p-Cou17ld8.js +1 -0
  193. package/dist/components/react/p-D5knoiyy.js +1 -0
  194. package/dist/components/react/p-D9DDtvFM.js +1 -0
  195. package/dist/components/react/p-DY2U5CQt.js +1 -0
  196. package/dist/components/react/p-DjIHLduJ.js +1 -3
  197. package/dist/components/react/p-DpATRD2W.js +1 -0
  198. package/dist/components/react/p-FxUVQ4Tx.js +1 -0
  199. package/dist/components/react/p-HygIVKXC.js +1 -5018
  200. package/dist/components/react/p-YR7U0Z_g.js +1 -0
  201. package/dist/components/react/p-ZeKXASQs.js +1 -0
  202. package/dist/components/react/p-r4txK0AC.js +1 -3
  203. package/dist/components/react/p-sSn0kXFi.js +1 -0
  204. package/dist/components/react/post-accordion-item.js +1 -6
  205. package/dist/components/react/post-accordion.js +1 -6
  206. package/dist/components/react/post-avatar.js +1 -218
  207. package/dist/components/react/post-back-to-top.js +1 -145
  208. package/dist/components/react/post-banner.js +1 -99
  209. package/dist/components/react/post-breadcrumb-item.js +1 -6
  210. package/dist/components/react/post-breadcrumbs.js +1 -197
  211. package/dist/components/react/post-card-control.js +1 -327
  212. package/dist/components/react/post-closebutton.js +1 -6
  213. package/dist/components/react/post-collapsible-trigger.js +1 -6
  214. package/dist/components/react/post-collapsible.js +1 -6
  215. package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
  216. package/dist/components/react/post-env-test.js +1 -0
  217. package/dist/components/react/post-footer.js +1 -117
  218. package/dist/components/react/post-header.js +1 -373
  219. package/dist/components/react/post-icon.js +1 -6
  220. package/dist/components/react/post-language-menu-item.d.ts +11 -0
  221. package/dist/components/react/post-language-menu-item.js +1 -0
  222. package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
  223. package/dist/components/react/post-language-menu.js +1 -0
  224. package/dist/components/react/post-linkarea.js +1 -59
  225. package/dist/components/react/post-logo.js +1 -59
  226. package/dist/components/react/post-mainnavigation.js +1 -181
  227. package/dist/components/react/post-megadropdown-trigger.js +1 -137
  228. package/dist/components/react/post-megadropdown.js +1 -268
  229. package/dist/components/react/post-menu-item.js +1 -6
  230. package/dist/components/react/post-menu-trigger.js +1 -6
  231. package/dist/components/react/post-menu.js +1 -6
  232. package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  233. package/dist/components/react/post-pagination.js +1 -0
  234. package/dist/components/react/post-popover-trigger.js +1 -133
  235. package/dist/components/react/post-popover.js +1 -119
  236. package/dist/components/react/post-popovercontainer.js +1 -6
  237. package/dist/components/react/post-rating.js +1 -149
  238. package/dist/components/react/post-stepper-item.js +1 -34
  239. package/dist/components/react/post-stepper.js +1 -135
  240. package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  241. package/dist/components/react/post-tab-item.js +1 -0
  242. package/dist/components/react/post-tab-panel.js +1 -55
  243. package/dist/components/react/post-tabs.js +1 -197
  244. package/dist/components/react/post-togglebutton.js +1 -57
  245. package/dist/components/react/post-tooltip-trigger.js +1 -207
  246. package/dist/components/react/post-tooltip.js +1 -115
  247. package/dist/components/switch-variants.js +1 -3
  248. package/dist/components/utils.js +1 -0
  249. package/dist/docs.d.ts +11 -0
  250. package/dist/docs.json +873 -631
  251. package/dist/{cjs/breakpoints-CEkeixld.js → esm/breakpoints-DYoSKGHO.js} +89 -6
  252. package/dist/esm/debounce-C9hMpmsD.js +11 -0
  253. package/dist/esm/environment-CEmnRoA6.js +49 -0
  254. package/dist/{components/react/p-CzIKqBrS.js → esm/event-from-rEfV4v4a.js} +2 -2
  255. package/dist/esm/fade-DsgPYmAa.js +24 -0
  256. package/dist/esm/fade-slide-CvOvauo9.js +36 -0
  257. package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
  258. package/dist/{components/react/p-CBFgkSgY.js → esm/get-root-CXfAA093.js} +1 -1
  259. package/dist/esm/{index-wEFJ-c34.js → index-CDZBzSdV.js} +2150 -292
  260. package/dist/esm/loader.js +3 -3
  261. package/dist/esm/package-CZvbetqX.js +3 -0
  262. package/dist/esm/post-accordion_2.entry.js +17 -13
  263. package/dist/esm/post-avatar.entry.js +22 -12
  264. package/dist/esm/post-back-to-top.entry.js +23 -43
  265. package/dist/esm/post-banner.entry.js +14 -11
  266. package/dist/esm/post-breadcrumb-item_2.entry.js +13 -11
  267. package/dist/esm/post-breadcrumbs.entry.js +31 -32
  268. package/dist/esm/post-card-control.entry.js +32 -16
  269. package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +599 -510
  270. package/dist/esm/post-collapsible_2.entry.js +38 -34
  271. package/dist/esm/post-components.js +4 -4
  272. package/dist/esm/post-env-test.entry.js +13 -0
  273. package/dist/esm/post-footer.entry.js +21 -17
  274. package/dist/esm/post-linkarea.entry.js +5 -5
  275. package/dist/esm/post-pagination.entry.js +613 -0
  276. package/dist/esm/post-popover-trigger.entry.js +52 -32
  277. package/dist/esm/post-popover.entry.js +25 -16
  278. package/dist/esm/post-rating.entry.js +16 -10
  279. package/dist/esm/post-stepper-item.entry.js +5 -5
  280. package/dist/esm/post-stepper.entry.js +39 -28
  281. package/dist/esm/post-tab-item.entry.js +49 -0
  282. package/dist/esm/post-tab-panel.entry.js +13 -11
  283. package/dist/esm/post-tabs.entry.js +195 -40
  284. package/dist/esm/post-tooltip-trigger.entry.js +10 -8
  285. package/dist/esm/post-tooltip.entry.js +13 -11
  286. package/dist/esm/utils-CoDiS_Ik.js +24 -0
  287. package/dist/post-components/p-09ba7cf9.entry.js +1 -0
  288. package/dist/post-components/p-0c091898.entry.js +1 -0
  289. package/dist/post-components/{p-cd03e6f2.entry.js → p-0e97fcfd.entry.js} +1 -1
  290. package/dist/post-components/p-296f1dd5.entry.js +1 -0
  291. package/dist/post-components/p-32ad2b21.entry.js +1 -0
  292. package/dist/post-components/p-366c28cb.entry.js +1 -0
  293. package/dist/post-components/p-41ae68d5.entry.js +1 -0
  294. package/dist/post-components/p-448e7265.entry.js +1 -0
  295. package/dist/post-components/p-554da188.entry.js +1 -0
  296. package/dist/post-components/p-5912f8f1.entry.js +1 -0
  297. package/dist/post-components/p-790f300d.entry.js +1 -0
  298. package/dist/post-components/p-7ed5a493.entry.js +1 -0
  299. package/dist/post-components/p-85bea1b6.entry.js +1 -0
  300. package/dist/post-components/p-8bcff4d2.entry.js +1 -0
  301. package/dist/post-components/p-9dc9c245.entry.js +1 -0
  302. package/dist/post-components/p-B7ebLhHc.js +1 -0
  303. package/dist/post-components/p-BVCjnh6Q.js +1 -0
  304. package/dist/post-components/p-BXNs2_sw.js +1 -0
  305. package/dist/post-components/p-C9hMpmsD.js +1 -0
  306. package/dist/post-components/p-CDZBzSdV.js +2 -0
  307. package/dist/post-components/p-CEmnRoA6.js +1 -0
  308. package/dist/post-components/p-CZvbetqX.js +1 -0
  309. package/dist/post-components/p-CoDiS_Ik.js +1 -0
  310. package/dist/post-components/p-D5knoiyy.js +1 -0
  311. package/dist/post-components/p-DI-h_mEL.js +1 -0
  312. package/dist/post-components/p-a06f9695.entry.js +1 -0
  313. package/dist/post-components/p-a191f1df.entry.js +1 -0
  314. package/dist/post-components/p-c5d19d62.entry.js +1 -0
  315. package/dist/post-components/{p-24dc54d1.entry.js → p-c8c4d05b.entry.js} +1 -1
  316. package/dist/post-components/{p-57288cb2.entry.js → p-d1a5c980.entry.js} +1 -1
  317. package/dist/post-components/p-d4e2c556.entry.js +1 -0
  318. package/dist/post-components/p-f96a310c.entry.js +1 -0
  319. package/dist/post-components/p-fab2327d.entry.js +1 -0
  320. package/dist/post-components/p-rEfV4v4a.js +1 -0
  321. package/dist/post-components/post-components.css +1 -1
  322. package/dist/post-components/post-components.esm.js +1 -1
  323. package/dist/prebuild.js +46 -0
  324. package/dist/types/animations/collapse.d.ts +1 -0
  325. package/dist/types/animations/fade-slide.d.ts +11 -0
  326. package/dist/types/animations/fade.d.ts +2 -2
  327. package/dist/types/animations/index.d.ts +2 -0
  328. package/dist/types/animations/slide.d.ts +9 -2
  329. package/dist/types/animations/types.d.ts +13 -0
  330. package/dist/types/animations/utils.d.ts +2 -0
  331. package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
  332. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
  333. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
  334. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
  335. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
  336. package/dist/types/components/post-footer/post-footer.d.ts +4 -4
  337. package/dist/types/components/post-header/post-header.d.ts +23 -13
  338. package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +12 -11
  339. package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
  340. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
  341. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
  342. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
  343. package/dist/types/components/post-menu/post-menu.d.ts +4 -4
  344. package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
  345. package/dist/types/components/post-popover/post-popover.d.ts +4 -3
  346. package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
  347. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -21
  348. package/dist/types/components/post-rating/post-rating.d.ts +1 -1
  349. package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
  350. package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
  351. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
  352. package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
  353. package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -5
  354. package/dist/types/components.d.ts +322 -219
  355. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
  356. package/dist/types/stencil-public-runtime.d.ts +147 -10
  357. package/dist/types/types/heading-levels.d.ts +1 -1
  358. package/dist/types/utils/environment.d.ts +25 -1
  359. package/dist/types/utils/get-focusable-children.d.ts +2 -2
  360. package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
  361. package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
  362. package/hydrate/index.d.ts +14 -0
  363. package/hydrate/index.js +7494 -2714
  364. package/hydrate/index.mjs +7493 -2715
  365. package/package.json +7 -8
  366. package/dist/cjs/fade-nS5zzDQS.js +0 -14
  367. package/dist/cjs/index-UFKR6Ok0.js +0 -98
  368. package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
  369. package/dist/collection/animations/slide-and-fade.js +0 -25
  370. package/dist/collection/components/post-language-option/post-language-option.css +0 -1
  371. package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
  372. package/dist/collection/components/post-list/post-list.css +0 -1
  373. package/dist/collection/components/post-list/post-list.js +0 -97
  374. package/dist/collection/components/post-list-item/post-list-item.css +0 -1
  375. package/dist/collection/components/post-list-item/post-list-item.js +0 -26
  376. package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
  377. package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
  378. package/dist/components/index2.js +0 -89
  379. package/dist/components/post-language-option.d.ts +0 -11
  380. package/dist/components/post-language-option.js +0 -99
  381. package/dist/components/post-language-switch.js +0 -157
  382. package/dist/components/post-list-item.js +0 -38
  383. package/dist/components/post-list.js +0 -61
  384. package/dist/components/post-tab-header.js +0 -52
  385. package/dist/components/react/p-BVXiQdHq.js +0 -64
  386. package/dist/components/react/p-BhxZzOEC.js +0 -3
  387. package/dist/components/react/p-CSAMO7iJ.js +0 -243
  388. package/dist/components/react/p-CYkf_7Y5.js +0 -89
  389. package/dist/components/react/p-Ccrl2AQn.js +0 -111
  390. package/dist/components/react/p-CewRvBtg.js +0 -139
  391. package/dist/components/react/p-Cwiv86_f.js +0 -111
  392. package/dist/components/react/p-D2waO0Zc.js +0 -31
  393. package/dist/components/react/p-DBPOV12C.js +0 -160
  394. package/dist/components/react/p-DVGEExot.js +0 -3128
  395. package/dist/components/react/p-Djvj8fd2.js +0 -80
  396. package/dist/components/react/p-LtiDhYis.js +0 -137
  397. package/dist/components/react/p-SbIC4aZX.js +0 -11
  398. package/dist/components/react/p-XrZzCOKT.js +0 -78
  399. package/dist/components/react/p-v3pOrMNQ.js +0 -114
  400. package/dist/components/react/post-language-option.js +0 -100
  401. package/dist/components/react/post-language-switch.d.ts +0 -11
  402. package/dist/components/react/post-language-switch.js +0 -158
  403. package/dist/components/react/post-list-item.js +0 -39
  404. package/dist/components/react/post-list.js +0 -62
  405. package/dist/components/react/post-tab-header.js +0 -53
  406. package/dist/esm/breakpoints-CJ80BZ06.js +0 -178
  407. package/dist/esm/event-from-CzIKqBrS.js +0 -119
  408. package/dist/esm/fade-SbIC4aZX.js +0 -11
  409. package/dist/esm/get-root-BkQ3CrLq.js +0 -15
  410. package/dist/esm/index-Beaz8wEe.js +0 -89
  411. package/dist/esm/package-BhxZzOEC.js +0 -3
  412. package/dist/esm/post-tab-header.entry.js +0 -29
  413. package/dist/post-components/p-01e678c9.entry.js +0 -1
  414. package/dist/post-components/p-034a453f.entry.js +0 -1
  415. package/dist/post-components/p-15a4cdbf.entry.js +0 -1
  416. package/dist/post-components/p-2a2030bf.entry.js +0 -1
  417. package/dist/post-components/p-2ed84cc3.entry.js +0 -1
  418. package/dist/post-components/p-3228968f.entry.js +0 -1
  419. package/dist/post-components/p-3c01ddfe.entry.js +0 -1
  420. package/dist/post-components/p-748b1f01.entry.js +0 -1
  421. package/dist/post-components/p-7745e46e.entry.js +0 -1
  422. package/dist/post-components/p-7f635728.entry.js +0 -1
  423. package/dist/post-components/p-82c178a3.entry.js +0 -1
  424. package/dist/post-components/p-9b5f8319.entry.js +0 -1
  425. package/dist/post-components/p-Beaz8wEe.js +0 -1
  426. package/dist/post-components/p-BhxZzOEC.js +0 -1
  427. package/dist/post-components/p-CJ80BZ06.js +0 -1
  428. package/dist/post-components/p-D9ZHp2FP.js +0 -1
  429. package/dist/post-components/p-SbIC4aZX.js +0 -1
  430. package/dist/post-components/p-a9644e54.entry.js +0 -1
  431. package/dist/post-components/p-af030a3a.entry.js +0 -1
  432. package/dist/post-components/p-b8ba8139.entry.js +0 -1
  433. package/dist/post-components/p-db935e8e.entry.js +0 -1
  434. package/dist/post-components/p-e62e1f57.entry.js +0 -1
  435. package/dist/post-components/p-fb4b1641.entry.js +0 -1
  436. package/dist/post-components/p-wEFJ-c34.js +0 -2
  437. package/dist/types/animations/slide-and-fade.d.ts +0 -2
  438. package/dist/types/components/post-list/post-list.d.ts +0 -24
  439. package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
  440. package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
  441. /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
  442. /package/dist/{post-components/p-CzIKqBrS.js → components/react/p-rEfV4v4a.js} +0 -0
  443. /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
@@ -1,52 +1,172 @@
1
- import { h, Host } from "@stencil/core";
1
+ import { h, Host, } from "@stencil/core";
2
2
  import { version } from "../../../../package";
3
- import { fadeIn, fadeOut } from "../../animations/index";
4
- import { componentOnReady } from "../../utils/index";
3
+ import { fade } from "../../animations/index";
4
+ import { componentOnReady, checkRequiredAndType } from "../../utils/index";
5
5
  /**
6
- * @slot tabs - Slot for placing tab headers. Each tab header should be a <post-tab-header> element.
7
- * @slot default - Slot for placing tab panels. Each tab panel should be a <post-tab-panel> element.
8
- * @part tabs - The container element that holds the set of tabs.
9
- * @part content - The container element that displays the content of the currently active tab.
6
+ * @slot default - Slot for placing tab items. Each tab item should be a <post-tab-item> element.
7
+ * @slot panels - Slot for placing tab panels. Each tab panel should be a <post-tab-panel> element.
8
+ * @part post-tabs - The container element that holds the set of tabs.
9
+ * @part post-tabs-content - The container element that displays the content of the currently active tab. Only available in panels mode.
10
10
  */
11
11
  export class PostTabs {
12
12
  constructor() {
13
13
  this.isLoaded = false;
14
+ this.isNavigationMode = false;
14
15
  /**
15
16
  * When set to true, this property allows the tabs container to span the
17
+ * Changing this value after initialization has no effect.
16
18
  * full width of the screen, from edge to edge.
17
19
  */
18
20
  this.fullWidth = false;
19
21
  }
20
22
  get tabs() {
21
- return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
23
+ return Array.from(this.host.querySelectorAll('post-tab-item')).filter(tab => tab.closest('post-tabs') === this.host);
24
+ }
25
+ get panels() {
26
+ return Array.from(this.host.querySelectorAll('post-tab-panel')).filter(panel => panel.closest('post-tabs') === this.host);
27
+ }
28
+ validateLabel() {
29
+ if (this.isNavigationMode) {
30
+ checkRequiredAndType(this, 'label', 'string');
31
+ }
32
+ }
33
+ componentWillRender() {
34
+ this.detectMode();
22
35
  }
23
36
  componentDidLoad() {
24
37
  this.moveMisplacedTabs();
38
+ this.moveMisplacedPanels();
25
39
  this.enableTabs();
26
- const initiallyActivePanel = this.activePanel || this.tabs[0]?.panel;
27
- void this.show(initiallyActivePanel);
28
- this.isLoaded = true;
40
+ this.setupContentObserver();
41
+ this.validateLabel();
42
+ if (this.isNavigationMode) {
43
+ const activeTab = this.findActiveNavigationTab();
44
+ if (activeTab) {
45
+ this.activateTab(activeTab);
46
+ }
47
+ }
48
+ else {
49
+ const tabToActivate = this.activeTab || this.tabs[0]?.name;
50
+ if (tabToActivate) {
51
+ void this.show(tabToActivate);
52
+ }
53
+ }
54
+ }
55
+ disconnectedCallback() {
56
+ if (this.showing) {
57
+ this.showing.cancel();
58
+ this.showing = null;
59
+ }
60
+ if (this.hiding) {
61
+ this.hiding.cancel();
62
+ this.hiding = null;
63
+ }
64
+ if (this.contentObserver) {
65
+ this.contentObserver.disconnect();
66
+ }
67
+ }
68
+ setupContentObserver() {
69
+ const config = {
70
+ childList: true,
71
+ subtree: true,
72
+ attributes: true,
73
+ attributeFilter: ['data-navigation-mode', 'aria-current'],
74
+ };
75
+ this.contentObserver = new MutationObserver(this.handleContentChange.bind(this));
76
+ this.contentObserver.observe(this.host, config);
77
+ }
78
+ handleContentChange(mutations) {
79
+ const shouldRedetect = this.shouldRedetectMode(mutations);
80
+ const ariaCurrentChanged = this.hasAriaCurrentChanged(mutations);
81
+ if (ariaCurrentChanged && this.isNavigationMode) {
82
+ this.updateActiveNavigationTab();
83
+ }
84
+ if (shouldRedetect) {
85
+ this.handleModeChange();
86
+ }
87
+ }
88
+ shouldRedetectMode(mutations) {
89
+ return mutations.some(mutation => {
90
+ if (mutation.type === 'childList') {
91
+ return mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0;
92
+ }
93
+ if (mutation.type === 'attributes' && mutation.attributeName === 'data-navigation-mode') {
94
+ return true;
95
+ }
96
+ return false;
97
+ });
98
+ }
99
+ hasAriaCurrentChanged(mutations) {
100
+ return mutations.some(mutation => mutation.type === 'attributes' && mutation.attributeName === 'aria-current');
101
+ }
102
+ updateActiveNavigationTab() {
103
+ const activeTab = this.findActiveNavigationTab();
104
+ if (activeTab && activeTab !== this.currentActiveTab) {
105
+ this.activateTab(activeTab);
106
+ }
107
+ }
108
+ handleModeChange() {
109
+ const previousMode = this.isNavigationMode;
110
+ this.detectMode();
111
+ if (previousMode !== this.isNavigationMode) {
112
+ this.enableTabs();
113
+ this.initializeActiveTab();
114
+ }
115
+ }
116
+ initializeActiveTab() {
117
+ if (this.isNavigationMode) {
118
+ const activeTab = this.findActiveNavigationTab();
119
+ if (activeTab) {
120
+ this.activateTab(activeTab);
121
+ }
122
+ }
123
+ else {
124
+ const tabToActivate = this.activeTab || this.tabs[0]?.name;
125
+ if (tabToActivate) {
126
+ void this.show(tabToActivate);
127
+ }
128
+ }
129
+ }
130
+ detectMode() {
131
+ // Check for navigation mode by looking for anchor elements in tabs
132
+ // This works even before post-tab-item sets data-navigation-mode attribute
133
+ const hasNavigationTabs = this.tabs.some(tab => {
134
+ const hasAnchor = tab.querySelector('a') !== null;
135
+ const navModeAttr = tab.getAttribute('data-navigation-mode') === 'true';
136
+ return hasAnchor || navModeAttr;
137
+ });
138
+ const hasPanels = this.panels.length > 0;
139
+ if (hasNavigationTabs && hasPanels) {
140
+ throw new Error('PostTabs: Mixed mode detected. Cannot use both navigation mode (anchor elements) and panel mode (post-tab-panel elements) at the same time.');
141
+ }
142
+ this.isNavigationMode = hasNavigationTabs;
143
+ }
144
+ findActiveNavigationTab() {
145
+ return (this.tabs.find(tab => {
146
+ const anchor = tab.querySelector('a[aria-current="page"]');
147
+ return anchor !== null;
148
+ }) || null);
29
149
  }
30
150
  /**
31
151
  * Shows the panel with the given name and selects its associated tab.
32
152
  * Any other panel that was previously shown becomes hidden and its associated tab is unselected.
33
153
  */
34
- async show(panelName) {
154
+ async show(tabName) {
35
155
  // do nothing if the tab is already active
36
- if (panelName === this.activeTab?.panel) {
156
+ if (tabName === this.currentActiveTab?.name) {
37
157
  return;
38
158
  }
39
- const previousTab = this.activeTab;
40
- const newTab = this.host.querySelector(`post-tab-header[panel=${panelName}]`);
159
+ const previousTab = this.currentActiveTab;
160
+ const newTab = this.host.querySelector(`post-tab-item[name=${tabName}]`);
41
161
  this.activateTab(newTab);
42
162
  // if a panel is currently being displayed, remove it from the view and complete the associated animation
43
163
  if (this.showing) {
44
- this.showing.effect['target'].style.display = 'none';
45
164
  this.showing.finish();
165
+ this.showing = null;
46
166
  }
47
167
  // hide the currently visible panel only if no other animation is running
48
168
  if (previousTab && !this.showing && !this.hiding)
49
- this.hidePanel(previousTab.panel);
169
+ this.hidePanel(previousTab.name);
50
170
  // wait for any hiding animation to complete before showing the selected tab
51
171
  if (this.hiding)
52
172
  await this.hiding.finished;
@@ -55,15 +175,25 @@ export class PostTabs {
55
175
  if (this.showing)
56
176
  await this.showing.finished;
57
177
  if (this.isLoaded)
58
- this.postChange.emit(this.activeTab.panel);
178
+ this.postChange.emit(this.currentActiveTab.name);
59
179
  }
60
180
  moveMisplacedTabs() {
61
181
  if (!this.tabs)
62
182
  return;
63
183
  this.tabs.forEach(tab => {
64
- if (tab.getAttribute('slot') === 'tabs')
65
- return;
66
- tab.setAttribute('slot', 'tabs');
184
+ // Tab items should go in the default slot, so remove any slot attribute
185
+ if (tab.getAttribute('slot')) {
186
+ tab.removeAttribute('slot');
187
+ }
188
+ });
189
+ }
190
+ moveMisplacedPanels() {
191
+ if (!this.panels)
192
+ return;
193
+ this.panels.forEach(panel => {
194
+ if (panel.getAttribute('slot') !== 'panels') {
195
+ panel.setAttribute('slot', 'panels');
196
+ }
67
197
  });
68
198
  }
69
199
  enableTabs() {
@@ -71,19 +201,25 @@ export class PostTabs {
71
201
  return;
72
202
  this.tabs.forEach(async (tab) => {
73
203
  await componentOnReady(tab);
74
- // if the tab has an "aria-controls" attribute it was already linked to its panel: do nothing
204
+ // In navigation mode, navigation is handled by the consumer's routing
205
+ if (this.isNavigationMode) {
206
+ return;
207
+ }
208
+ // Panel mode: set up ARIA relationships and event handlers
75
209
  if (tab.getAttribute('aria-controls'))
76
210
  return;
77
- const tabPanel = this.getPanel(tab.panel);
78
- tab.setAttribute('aria-controls', tabPanel.id);
79
- tabPanel.setAttribute('aria-labelledby', tab.id);
211
+ const tabPanel = this.getPanel(tab.name);
212
+ if (tabPanel) {
213
+ tab.setAttribute('aria-controls', tabPanel.id);
214
+ tabPanel.setAttribute('aria-labelledby', tab.id);
215
+ }
80
216
  tab.addEventListener('click', () => {
81
- void this.show(tab.panel);
217
+ void this.show(tab.name);
82
218
  });
83
219
  tab.addEventListener('keydown', (e) => {
84
220
  if (e.key === 'Enter' || e.key === ' ') {
85
221
  e.preventDefault();
86
- void this.show(tab.panel);
222
+ void this.show(tab.name);
87
223
  }
88
224
  });
89
225
  tab.addEventListener('keydown', (e) => {
@@ -92,44 +228,51 @@ export class PostTabs {
92
228
  });
93
229
  });
94
230
  // if the currently active tab was removed from the DOM then select the first one
95
- if (this.activeTab && !this.activeTab.isConnected) {
96
- void this.show(this.tabs[0]?.panel);
231
+ if (this.currentActiveTab && !this.currentActiveTab.isConnected) {
232
+ void this.show(this.tabs[0]?.name);
97
233
  }
98
234
  }
99
235
  activateTab(tab) {
100
- if (this.activeTab) {
101
- this.activeTab.setAttribute('aria-selected', 'false');
102
- this.activeTab.setAttribute('tabindex', '-1');
103
- this.activeTab.classList.remove('active');
236
+ // Deactivate previous tab
237
+ if (this.currentActiveTab) {
238
+ this.currentActiveTab.classList.remove('active');
239
+ if (!this.isNavigationMode) {
240
+ this.currentActiveTab.setAttribute('aria-selected', 'false');
241
+ this.currentActiveTab.setAttribute('tabindex', '-1');
242
+ }
104
243
  }
105
- tab.setAttribute('aria-selected', 'true');
106
- tab.setAttribute('tabindex', '0');
107
244
  tab.classList.add('active');
108
- this.activeTab = tab;
245
+ if (!this.isNavigationMode) {
246
+ tab.setAttribute('aria-selected', 'true');
247
+ tab.setAttribute('tabindex', '0');
248
+ }
249
+ this.currentActiveTab = tab;
109
250
  }
110
251
  hidePanel(panelName) {
111
252
  const previousPanel = this.getPanel(panelName);
112
253
  if (!previousPanel)
113
254
  return;
114
- this.hiding = fadeOut(previousPanel);
255
+ this.hiding = fade(previousPanel, 'out');
115
256
  this.hiding.onfinish = () => {
116
257
  previousPanel.style.display = 'none';
117
258
  this.hiding = null;
118
259
  };
119
260
  }
120
261
  showSelectedPanel() {
121
- const panel = this.getPanel(this.activeTab.panel);
262
+ const panel = this.getPanel(this.currentActiveTab.name);
263
+ if (!panel)
264
+ return;
122
265
  panel.style.display = 'block';
123
266
  // prevent the initially selected panel from fading in
124
267
  if (!this.isLoaded)
125
268
  return;
126
- this.showing = fadeIn(panel);
269
+ this.showing = fade(panel, 'in');
127
270
  this.showing.onfinish = () => {
128
271
  this.showing = null;
129
272
  };
130
273
  }
131
274
  getPanel(name) {
132
- return this.host.querySelector(`post-tab-panel[name=${name}]`);
275
+ return this.host.querySelector(`post-tab-panel[for=${name}]`);
133
276
  }
134
277
  navigateTabs(tab, key) {
135
278
  const activeTabIndex = Array.from(this.tabs).indexOf(tab);
@@ -143,9 +286,14 @@ export class PostTabs {
143
286
  if (!nextTab)
144
287
  return;
145
288
  nextTab.focus();
289
+ void this.show(nextTab.name);
146
290
  }
147
291
  render() {
148
- return (h(Host, { key: 'f3534a3b05c379ce1cb311d4c5ea950c8eba87d0', "data-version": version }, h("div", { key: 'd812db6b2a895504fce8ac9dae2663821b9dd759', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '9abd0ee00204a085ceaebce5e11fcff527273605', class: "tabs", role: "tablist" }, h("slot", { key: '89f09f443ca740dc9af66fedb1367cdb4885074d', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '4a94a19fd67814482934bd31bb219470bea8dec6', class: "tab-content", part: "content" }, h("slot", { key: '44db446865edacb1b1c0fc20ef391adfa189e8cb', onSlotchange: () => this.moveMisplacedTabs() }))));
292
+ const TabsContainer = this.isNavigationMode ? 'nav' : 'div';
293
+ return (h(Host, { key: '89edc2a79734ee9cd60c9db0f01e2f05f2849071', "data-version": version }, h("div", { key: 'd85aa2320cef490831bf59117b54dc7c4edd9d65', class: "tabs-wrapper", part: "post-tabs" }, h(TabsContainer, { key: 'e4aa70db5e2d0f3391d8ebfaab6374c1966d6678', class: "tabs", role: this.isNavigationMode ? undefined : 'tablist', "aria-label": this.isNavigationMode ? this.label : undefined }, h("slot", { key: '7ab6f1e7bbe24ef642d5917b810b62e362ae2dc1', onSlotchange: () => {
294
+ this.moveMisplacedTabs();
295
+ this.enableTabs();
296
+ } }))), !this.isNavigationMode && (h("div", { key: '354eafcea40f6aa9bbb206a93bc2155eac725bb4', class: "tab-content", part: "post-tabs-content" }, h("slot", { key: 'a133b48cea08eade14a954933062380edf112523', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
149
297
  }
150
298
  static get is() { return "post-tabs"; }
151
299
  static get encapsulation() { return "shadow"; }
@@ -161,33 +309,27 @@ export class PostTabs {
161
309
  }
162
310
  static get properties() {
163
311
  return {
164
- "activePanel": {
312
+ "activeTab": {
165
313
  "type": "string",
166
- "attribute": "active-panel",
167
314
  "mutable": false,
168
315
  "complexType": {
169
- "original": "HTMLPostTabPanelElement['name']",
316
+ "original": "string",
170
317
  "resolved": "string",
171
- "references": {
172
- "HTMLPostTabPanelElement": {
173
- "location": "global",
174
- "id": "global::HTMLPostTabPanelElement"
175
- }
176
- }
318
+ "references": {}
177
319
  },
178
320
  "required": false,
179
321
  "optional": true,
180
322
  "docs": {
181
323
  "tags": [],
182
- "text": "The name of the panel that is initially shown.\nIf not specified, it defaults to the panel associated with the first tab.\n\n**Changing this value after initialization has no effect.**"
324
+ "text": "The name of the tab in the panel mode that is initially active.\nChanging this value after initialization has no effect.\nIf not specified, defaults to the first tab."
183
325
  },
184
326
  "getter": false,
185
327
  "setter": false,
186
- "reflect": false
328
+ "reflect": false,
329
+ "attribute": "active-tab"
187
330
  },
188
331
  "fullWidth": {
189
332
  "type": "boolean",
190
- "attribute": "full-width",
191
333
  "mutable": false,
192
334
  "complexType": {
193
335
  "original": "boolean",
@@ -198,15 +340,40 @@ export class PostTabs {
198
340
  "optional": false,
199
341
  "docs": {
200
342
  "tags": [],
201
- "text": "When set to true, this property allows the tabs container to span the\nfull width of the screen, from edge to edge."
343
+ "text": "When set to true, this property allows the tabs container to span the\nChanging this value after initialization has no effect.\nfull width of the screen, from edge to edge."
202
344
  },
203
345
  "getter": false,
204
346
  "setter": false,
205
347
  "reflect": true,
348
+ "attribute": "full-width",
206
349
  "defaultValue": "false"
350
+ },
351
+ "label": {
352
+ "type": "string",
353
+ "mutable": false,
354
+ "complexType": {
355
+ "original": "string",
356
+ "resolved": "string",
357
+ "references": {}
358
+ },
359
+ "required": false,
360
+ "optional": true,
361
+ "docs": {
362
+ "tags": [],
363
+ "text": "The accessible label for the tabs component in navigation mode."
364
+ },
365
+ "getter": false,
366
+ "setter": false,
367
+ "reflect": true,
368
+ "attribute": "label"
207
369
  }
208
370
  };
209
371
  }
372
+ static get states() {
373
+ return {
374
+ "isNavigationMode": {}
375
+ };
376
+ }
210
377
  static get events() {
211
378
  return [{
212
379
  "method": "postChange",
@@ -216,7 +383,7 @@ export class PostTabs {
216
383
  "composed": true,
217
384
  "docs": {
218
385
  "tags": [],
219
- "text": "An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\nThe payload is the name of the newly shown panel."
386
+ "text": "An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\nThe payload is the name of the newly active tab.\nOnly emitted in panel mode."
220
387
  },
221
388
  "complexType": {
222
389
  "original": "string",
@@ -229,9 +396,9 @@ export class PostTabs {
229
396
  return {
230
397
  "show": {
231
398
  "complexType": {
232
- "signature": "(panelName: string) => Promise<void>",
399
+ "signature": "(tabName: string) => Promise<void>",
233
400
  "parameters": [{
234
- "name": "panelName",
401
+ "name": "tabName",
235
402
  "type": "string",
236
403
  "docs": ""
237
404
  }],
@@ -240,9 +407,9 @@ export class PostTabs {
240
407
  "location": "global",
241
408
  "id": "global::Promise"
242
409
  },
243
- "HTMLPostTabHeaderElement": {
410
+ "HTMLPostTabItemElement": {
244
411
  "location": "global",
245
- "id": "global::HTMLPostTabHeaderElement"
412
+ "id": "global::HTMLPostTabItemElement"
246
413
  }
247
414
  },
248
415
  "return": "Promise<void>"
@@ -255,4 +422,10 @@ export class PostTabs {
255
422
  };
256
423
  }
257
424
  static get elementRef() { return "host"; }
425
+ static get watchers() {
426
+ return [{
427
+ "propName": "label",
428
+ "methodName": "validateLabel"
429
+ }];
430
+ }
258
431
  }
@@ -26,7 +26,7 @@ export class PostTogglebutton {
26
26
  this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
27
27
  }
28
28
  render() {
29
- return (h(Host, { key: 'ecd5772b09be8842e5c6fc3bf34932b27d90c533', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '3bb32b33155e71ced9375afb5a26d1d4e63a83c8' })));
29
+ return (h(Host, { key: 'e0708bda008257aeab8e9ad82c33c66eff4aedb6', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: 'a10862573155edbef1a88bd8a1f9f8abf9dbe4c0' })));
30
30
  }
31
31
  static get is() { return "post-togglebutton"; }
32
32
  static get encapsulation() { return "shadow"; }
@@ -44,7 +44,6 @@ export class PostTogglebutton {
44
44
  return {
45
45
  "toggled": {
46
46
  "type": "boolean",
47
- "attribute": "toggled",
48
47
  "mutable": true,
49
48
  "complexType": {
50
49
  "original": "boolean",
@@ -60,6 +59,7 @@ export class PostTogglebutton {
60
59
  "getter": false,
61
60
  "setter": false,
62
61
  "reflect": false,
62
+ "attribute": "toggled",
63
63
  "defaultValue": "false"
64
64
  }
65
65
  };
@@ -39,7 +39,7 @@ export class PostTooltip {
39
39
  async show(target) {
40
40
  if (this.open)
41
41
  return;
42
- this.popoverRef.show(target);
42
+ await this.popoverRef.show(target);
43
43
  }
44
44
  /**
45
45
  * Programmatically hide this tooltip.
@@ -59,12 +59,12 @@ export class PostTooltip {
59
59
  * Set the open state based on the toggle event.
60
60
  * @param e Popovercontainer toggle event
61
61
  */
62
- handleToggle(e) {
63
- this.open = e.detail.isOpen;
62
+ handleBeforeToggle(e) {
63
+ this.open = e.detail.willOpen;
64
64
  }
65
65
  render() {
66
66
  const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
67
- return (h(Host, { key: 'ebc25bd8a9615a13be82d58f246b5a5d42113cf2', "data-version": version }, h("post-popovercontainer", { key: 'dba7a96c1f354752475a6f1d9116b0097dddf320', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, animation: this.animation, placement: this.placement, onPostToggle: e => this.handleToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '537370b88912d323a72ee074767b4cf2b4bc1b57' }))));
67
+ return (h(Host, { key: '5de53c10c2556ddb974a65ba06e27ccc99311762', "data-version": version }, h("post-popovercontainer", { key: 'ae3a26fc69d983884eb5aee2b024e74d91983c73', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, placement: this.placement, onPostBeforeToggle: e => this.handleBeforeToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '1fd537504554e094894f8549de5c29c515322866' }))));
68
68
  }
69
69
  static get is() { return "post-tooltip"; }
70
70
  static get encapsulation() { return "shadow"; }
@@ -82,7 +82,6 @@ export class PostTooltip {
82
82
  return {
83
83
  "placement": {
84
84
  "type": "string",
85
- "attribute": "placement",
86
85
  "mutable": false,
87
86
  "complexType": {
88
87
  "original": "Placement",
@@ -91,7 +90,8 @@ export class PostTooltip {
91
90
  "Placement": {
92
91
  "location": "import",
93
92
  "path": "@floating-ui/dom",
94
- "id": "../../node_modules/.pnpm/@floating-ui+dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
93
+ "id": "../../node_modules/.pnpm/@floating-ui+dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts::Placement",
94
+ "referenceLocation": "Placement"
95
95
  }
96
96
  }
97
97
  },
@@ -104,11 +104,11 @@ export class PostTooltip {
104
104
  "getter": false,
105
105
  "setter": false,
106
106
  "reflect": false,
107
+ "attribute": "placement",
107
108
  "defaultValue": "'top'"
108
109
  },
109
110
  "arrow": {
110
111
  "type": "boolean",
111
- "attribute": "arrow",
112
112
  "mutable": false,
113
113
  "complexType": {
114
114
  "original": "boolean",
@@ -124,30 +124,11 @@ export class PostTooltip {
124
124
  "getter": false,
125
125
  "setter": false,
126
126
  "reflect": false,
127
+ "attribute": "arrow",
127
128
  "defaultValue": "false"
128
129
  },
129
- "animation": {
130
- "type": "string",
131
- "attribute": "animation",
132
- "mutable": false,
133
- "complexType": {
134
- "original": "'pop-in'",
135
- "resolved": "\"pop-in\"",
136
- "references": {}
137
- },
138
- "required": false,
139
- "optional": true,
140
- "docs": {
141
- "tags": [],
142
- "text": "Choose a tooltip animation"
143
- },
144
- "getter": false,
145
- "setter": false,
146
- "reflect": false
147
- },
148
130
  "open": {
149
131
  "type": "boolean",
150
- "attribute": "open",
151
132
  "mutable": true,
152
133
  "complexType": {
153
134
  "original": "boolean",
@@ -163,6 +144,7 @@ export class PostTooltip {
163
144
  "getter": false,
164
145
  "setter": false,
165
146
  "reflect": true,
147
+ "attribute": "open",
166
148
  "defaultValue": "false"
167
149
  }
168
150
  };
@@ -169,7 +169,7 @@ export class PostTooltipTrigger {
169
169
  this.tooltip?.hide();
170
170
  }
171
171
  render() {
172
- return (h(Host, { key: '48246523aabaf1851e05d0273346d3e26e7ad866', "data-version": version }, h("slot", { key: '0442aeadddd59642c317b6f10c93008adf3e6585', onSlotchange: () => this.handleSlotChange() })));
172
+ return (h(Host, { key: '4f6165e23284794b677748c495401ed7c110d134', "data-version": version }, h("slot", { key: '87a8d412ed0e3fb145853aebb9426dfe13677853', onSlotchange: () => this.handleSlotChange() })));
173
173
  }
174
174
  static get is() { return "post-tooltip-trigger"; }
175
175
  static get encapsulation() { return "shadow"; }
@@ -187,7 +187,6 @@ export class PostTooltipTrigger {
187
187
  return {
188
188
  "for": {
189
189
  "type": "string",
190
- "attribute": "for",
191
190
  "mutable": false,
192
191
  "complexType": {
193
192
  "original": "string",
@@ -202,11 +201,11 @@ export class PostTooltipTrigger {
202
201
  },
203
202
  "getter": false,
204
203
  "setter": false,
205
- "reflect": true
204
+ "reflect": true,
205
+ "attribute": "for"
206
206
  },
207
207
  "delay": {
208
208
  "type": "number",
209
- "attribute": "delay",
210
209
  "mutable": false,
211
210
  "complexType": {
212
211
  "original": "number",
@@ -222,6 +221,7 @@ export class PostTooltipTrigger {
222
221
  "getter": false,
223
222
  "setter": false,
224
223
  "reflect": false,
224
+ "attribute": "delay",
225
225
  "defaultValue": "0"
226
226
  }
227
227
  };
@@ -1,2 +1,47 @@
1
- export const IS_SERVER = typeof window === 'undefined';
2
- export const IS_BROWSER = !IS_SERVER;
1
+ /**
2
+ * Environment detection helper
3
+ *
4
+ * Goal: Distinguish between real browser execution and Stencil's server-side
5
+ * hydration context. During SSR/hydration Stencil provides a mocked `window`
6
+ * (Domino / JSDOM–like) so naive checks (e.g. `typeof window !== 'undefined'`)
7
+ * incorrectly classify the environment as a browser.
8
+ *
9
+ * Detection strategy:
10
+ * - Stencils hydrate context uses a hardcoded user agent string ('MockNavigator')
11
+ * and origin ('http://mockdoc.stenciljs.com') for its mocked `window` object.
12
+ * We can use this to identify the hydrate context.
13
+ * - Stencils unit test context also uses the same hardcoded user agent string,
14
+ * but a differnet value for the origin.
15
+ * That's why comparing the origin is aboslutely mandatory.
16
+ * - Since we test the hydrate app in the test context, the origin is getting
17
+ * overwritten by the test setup, leading to a false positive in the
18
+ * `isHydrateApp` detection.
19
+ * To circumvent this, we use a global flag (`isHydrateAppTestEnv`),
20
+ * that we set/reset during the server test, so we can correctly identify
21
+ * the hydrate app in the test context.
22
+ * As a drawback, we can't properly test if the hydrate app is detected as
23
+ * expected, in a real world scenario (elsewhere than in our tests).
24
+ */
25
+ const MOCKED_USERAGENT = 'MockNavigator';
26
+ const MOCKED_ORIGIN = 'http://mockdoc.stenciljs.com';
27
+ const isNodeEnv = typeof global !== 'undefined';
28
+ const hasWindow = typeof window !== 'undefined';
29
+ const isMockedUserAgent = hasWindow && window.navigator.userAgent === MOCKED_USERAGENT;
30
+ const isMockedOrigin = hasWindow && window.location.origin === MOCKED_ORIGIN;
31
+ /**
32
+ * This is the natural hydrate app environment
33
+ * Is `true` if the hydrate app runs on server
34
+ */
35
+ const isHydrateAppEnv = isNodeEnv && isMockedUserAgent && isMockedOrigin;
36
+ /**
37
+ * This is the test app server test env
38
+ * Is `true` if the server unit test runs (`false` if the browser unit test runs)
39
+ */
40
+ const isTestAppServerTestEnv = isNodeEnv && isMockedUserAgent && global.IS_HYDRATEAPP_SERVERTEST;
41
+ /**
42
+ * This is the final hydrate app flag
43
+ * if it`s `true`, IS_BROWSER equals `false` and IS_SERVER equals `true
44
+ */
45
+ const isHydrateApp = isHydrateAppEnv || isTestAppServerTestEnv;
46
+ export const IS_BROWSER = hasWindow && !isHydrateApp;
47
+ export const IS_SERVER = !IS_BROWSER;